func createIgnoreMetricDefinitionDifferencesOption(parent interface{}) cmp.Option {
	return cmpopts.IgnoreFields(parent, "MetricDefinitions")
}
SageMaker adds MetricDefinitions to the AlgorithmSpecification for 1p algorithms.
package sdkutil
import (
	batchtransformjobv1 "github.com/aws/amazon-sagemaker-operator-for-k8s/api/v1/batchtransformjob"
	commonv1 "github.com/aws/amazon-sagemaker-operator-for-k8s/api/v1/common"
	endpointconfigv1 "github.com/aws/amazon-sagemaker-operator-for-k8s/api/v1/endpointconfig"
	hostingautoscalingpolicyv1 "github.com/aws/amazon-sagemaker-operator-for-k8s/api/v1/hostingautoscalingpolicy"
	hpojobv1 "github.com/aws/amazon-sagemaker-operator-for-k8s/api/v1/hyperparametertuningjob"
	modelv1 "github.com/aws/amazon-sagemaker-operator-for-k8s/api/v1/model"
	trainingjobv1 "github.com/aws/amazon-sagemaker-operator-for-k8s/api/v1/trainingjob"
	"github.com/aws/aws-sdk-go/service/applicationautoscaling"
	"github.com/aws/aws-sdk-go/service/sagemaker"
	"github.com/google/go-cmp/cmp"
	"github.com/google/go-cmp/cmp/cmpopts"
)
type Comparison struct {
	Differences string
	Equal bool
}
var trainingJobSpecComparisonOptions = []cmp.Option{
	createIgnoreMetricDefinitionDifferencesOption(commonv1.AlgorithmSpecification{}),
	createIgnoreRegionOption(trainingjobv1.TrainingJobSpec{}),
	createIgnoreSageMakerEndpointOption(trainingjobv1.TrainingJobSpec{}),
	createIgnoreTagsOption(trainingjobv1.TrainingJobSpec{}),
	equateEmptyChannelFieldsToNone,
	equateEmptySlicesAndMapsToNil,
	equateNilBoolToFalse,
	equateNilStringToEmptyString,
	ignoreKeyValuePairSliceOrder,
}
func createComparison(differences string) Comparison {
	return Comparison{
		Differences: differences,
		Equal:       differences == "",
	}
}
func HyperparameterTuningJobSpecMatchesDescription(description sagemaker.DescribeHyperParameterTuningJobOutput, spec hpojobv1.HyperparameterTuningJobSpec) Comparison {
	remoteSpec := CreateHyperParameterTuningJobSpecFromDescription(description)
	differences := cmp.Diff(remoteSpec, spec, hyperparameterTuningJobSpecComparisonOptions...)
	return createComparison(differences)
}
var hyperparameterTuningJobSpecComparisonOptions = []cmp.Option{
	createIgnoreMetricDefinitionDifferencesOption(commonv1.HyperParameterAlgorithmSpecification{}),
	createIgnoreRegionOption(hpojobv1.HyperparameterTuningJobSpec{}),
	createIgnoreSageMakerEndpointOption(hpojobv1.HyperparameterTuningJobSpec{}),
	createIgnoreTagsOption(hpojobv1.HyperparameterTuningJobSpec{}),
	equateEmptyChannelFieldsToNone,
	equateEmptySlicesAndMapsToNil,
	equateNilBoolToFalse,
	equateNilStringToEmptyString,
	ignoreKeyValuePairSliceOrder,
	ignoreKeyValuePairsWithUnderscoreNamePrefix,
}
func TransformJobSpecMatchesDescription(description sagemaker.DescribeTransformJobOutput, spec batchtransformjobv1.BatchTransformJobSpec) Comparison {
	remoteSpec := CreateTransformJobSpecFromDescription(description)
	differences := cmp.Diff(remoteSpec, spec, transformJobSpecComparisonOptions...)
	return createComparison(differences)
}
var transformJobSpecComparisonOptions = []cmp.Option{
	createIgnoreRegionOption(batchtransformjobv1.BatchTransformJobSpec{}),
	createIgnoreSageMakerEndpointOption(batchtransformjobv1.BatchTransformJobSpec{}),
	createIgnoreTagsOption(batchtransformjobv1.BatchTransformJobSpec{}),
	equateEmptyChannelFieldsToNone,
	equateEmptySlicesAndMapsToNil,
	equateEmptyTransformInputFieldsToNone,
	equateEmptyTransformOutputFieldsToNone,
	equateNilStringToEmptyString,
	ignoreDataProcessingOption,
	ignoreKeyValuePairSliceOrder,
}
func ModelSpecMatchesDescription(description sagemaker.DescribeModelOutput, spec modelv1.ModelSpec) (Comparison, error) {
	remoteSpec, err := CreateModelSpecFromDescription(&description)
	if err != nil {
		return Comparison{}, err
	}
	differences := cmp.Diff(*remoteSpec, spec, modelSpecComparisonOptions...)
	return createComparison(differences), nil
}
var modelSpecComparisonOptions = []cmp.Option{
	createIgnoreRegionOption(modelv1.ModelSpec{}),
	createIgnoreSageMakerEndpointOption(modelv1.ModelSpec{}),
	createIgnoreTagsOption(modelv1.ModelSpec{}),
	equateEmptySlicesAndMapsToNil,
	equateNilBoolToFalse,
	equateNilStringToEmptyString,
	ignoreKeyValuePairSliceOrder,
}
func EndpointConfigSpecMatchesDescription(description sagemaker.DescribeEndpointConfigOutput, spec endpointconfigv1.EndpointConfigSpec) (Comparison, error) {
	remoteSpec, err := CreateEndpointConfigSpecFromDescription(&description)
	if err != nil {
		return Comparison{}, err
	}
	differences := cmp.Diff(*remoteSpec, spec, endpointConfigSpecComparisonOptions...)
	return createComparison(differences), nil
}
var endpointConfigSpecComparisonOptions = []cmp.Option{
	createIgnoreRegionOption(endpointconfigv1.EndpointConfigSpec{}),
	createIgnoreSageMakerEndpointOption(endpointconfigv1.EndpointConfigSpec{}),
	createIgnoreTagsOption(endpointconfigv1.EndpointConfigSpec{}),
	equateEmptySlicesAndMapsToNil,
	equateNilStringToEmptyString,
	ignoreKeyValuePairSliceOrder,
}
func HostingAutoscalingPolicySpecMatchesDescription(targetDescriptions []*applicationautoscaling.DescribeScalableTargetsOutput, descriptions []*applicationautoscaling.ScalingPolicy, spec hostingautoscalingpolicyv1.HostingAutoscalingPolicySpec, oldResourceIDList []string) (Comparison, error) {
	remoteSpec, err := CreateHostingAutoscalingPolicySpecFromDescription(targetDescriptions, descriptions, oldResourceIDList)
	if err != nil {
		return Comparison{}, err
	}
	differences := cmp.Diff(remoteSpec, spec, hostingAutoscalingPolicySpecComparisonOptions...)
	return createComparison(differences), nil
}
var hostingAutoscalingPolicySpecComparisonOptions = []cmp.Option{
	createIgnoreRegionOption(hostingautoscalingpolicyv1.HostingAutoscalingPolicySpec{}),
	createIgnoreSageMakerEndpointOption(hostingautoscalingpolicyv1.HostingAutoscalingPolicySpec{}),
	equateEmptySlicesAndMapsToNil,
	equateNilBoolToFalse,
	equateNilStringToEmptyString,
	ignoreKeyValuePairSliceOrder,
}
var equateNilBoolToFalse = cmp.Transformer("", func(value *bool) bool {
	if value == nil {
		return false
	}
	return *value
})
var equateNilStringToEmptyString = cmp.Transformer("", func(value *string) string {
	if value == nil {
		return ""
	}
	return *value
})
var equateEmptyTransformInputFieldsToNone = cmp.Transformer("", func(value commonv1.TransformInput) commonv1.TransformInput {
	if value.CompressionType == "" {
		value.CompressionType = "None"
	}
	if value.SplitType == "" {
		value.SplitType = "None"
	}
	return value
})
var equateEmptyTransformOutputFieldsToNone = cmp.Transformer("", func(value commonv1.TransformOutput) commonv1.TransformOutput {
	if value.AssembleWith == "" {
		value.AssembleWith = "None"
	}
	return value
})
var equateEmptyChannelFieldsToNone = cmp.Transformer("", func(value commonv1.Channel) commonv1.Channel {
	if value.RecordWrapperType == "" {
		value.RecordWrapperType = "None"
	}
	if value.CompressionType == "" {
		value.CompressionType = "None"
	}
	return value
})
var equateEmptySlicesAndMapsToNil = cmpopts.EquateEmpty()
var ignoreKeyValuePairSliceOrder = cmpopts.SortSlices(func(left, right *commonv1.KeyValuePair) bool {
	if left == nil && right == nil {
		return true
	} else if left != nil && right == nil {
		return true
	} else if left == nil && right != nil {
		return false
	}
	if left.Name != right.Name {
		return left.Name < right.Name
	} else {
		return left.Value < right.Value
	}
})
var ignoreKeyValuePairsWithUnderscoreNamePrefix = cmpopts.IgnoreSliceElements(func(kvp *commonv1.KeyValuePair) bool {
	if kvp == nil {
		return false
	}
	if len(kvp.Name) > 0 && kvp.Name[0:1] == "_" {
		return true
	}
	return false
})
var ignoreDataProcessingOption = cmp.FilterValues(isEitherDataProcessingNodeNil, cmp.Comparer(equateAlways))