// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package v1api20250601

import (
	"encoding/json"
	storage "github.com/Azure/azure-service-operator/v2/api/cognitiveservices/v1api20250601/storage"
	"github.com/google/go-cmp/cmp"
	"github.com/google/go-cmp/cmp/cmpopts"
	"github.com/kr/pretty"
	"github.com/kylelemons/godebug/diff"
	"github.com/leanovate/gopter"
	"github.com/leanovate/gopter/gen"
	"github.com/leanovate/gopter/prop"
	"os"
	"reflect"
	"testing"
)

func Test_Deployment_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	parameters.MinSuccessfulTests = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from Deployment to hub returns original",
		prop.ForAll(RunResourceConversionTestForDeployment, DeploymentGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunResourceConversionTestForDeployment tests if a specific instance of Deployment round trips to the hub storage version and back losslessly
func RunResourceConversionTestForDeployment(subject Deployment) string {
	// Copy subject to make sure conversion doesn't modify it
	copied := subject.DeepCopy()

	// Convert to our hub version
	var hub storage.Deployment
	err := copied.ConvertTo(&hub)
	if err != nil {
		return err.Error()
	}

	// Convert from our hub version
	var actual Deployment
	err = actual.ConvertFrom(&hub)
	if err != nil {
		return err.Error()
	}

	// Compare actual with what we started with
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_Deployment_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from Deployment to Deployment via AssignProperties_To_Deployment & AssignProperties_From_Deployment returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeployment, DeploymentGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeployment tests if a specific instance of Deployment can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeployment(subject Deployment) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.Deployment
	err := copied.AssignProperties_To_Deployment(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual Deployment
	err = actual.AssignProperties_From_Deployment(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_Deployment_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 20
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of Deployment via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeployment, DeploymentGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeployment runs a test to see if a specific instance of Deployment round trips to JSON and back losslessly
func RunJSONSerializationTestForDeployment(subject Deployment) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual Deployment
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of Deployment instances for property testing - lazily instantiated by DeploymentGenerator()
var deploymentGenerator gopter.Gen

// DeploymentGenerator returns a generator of Deployment instances for property testing.
func DeploymentGenerator() gopter.Gen {
	if deploymentGenerator != nil {
		return deploymentGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddRelatedPropertyGeneratorsForDeployment(generators)
	deploymentGenerator = gen.Struct(reflect.TypeOf(Deployment{}), generators)

	return deploymentGenerator
}

// AddRelatedPropertyGeneratorsForDeployment is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForDeployment(gens map[string]gopter.Gen) {
	gens["Spec"] = Deployment_SpecGenerator()
	gens["Status"] = Deployment_STATUSGenerator()
}

func Test_DeploymentCapacitySettings_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from DeploymentCapacitySettings to DeploymentCapacitySettings via AssignProperties_To_DeploymentCapacitySettings & AssignProperties_From_DeploymentCapacitySettings returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeploymentCapacitySettings, DeploymentCapacitySettingsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeploymentCapacitySettings tests if a specific instance of DeploymentCapacitySettings can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeploymentCapacitySettings(subject DeploymentCapacitySettings) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.DeploymentCapacitySettings
	err := copied.AssignProperties_To_DeploymentCapacitySettings(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual DeploymentCapacitySettings
	err = actual.AssignProperties_From_DeploymentCapacitySettings(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_DeploymentCapacitySettings_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 100
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of DeploymentCapacitySettings via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeploymentCapacitySettings, DeploymentCapacitySettingsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeploymentCapacitySettings runs a test to see if a specific instance of DeploymentCapacitySettings round trips to JSON and back losslessly
func RunJSONSerializationTestForDeploymentCapacitySettings(subject DeploymentCapacitySettings) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual DeploymentCapacitySettings
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of DeploymentCapacitySettings instances for property testing - lazily instantiated by
// DeploymentCapacitySettingsGenerator()
var deploymentCapacitySettingsGenerator gopter.Gen

// DeploymentCapacitySettingsGenerator returns a generator of DeploymentCapacitySettings instances for property testing.
func DeploymentCapacitySettingsGenerator() gopter.Gen {
	if deploymentCapacitySettingsGenerator != nil {
		return deploymentCapacitySettingsGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentCapacitySettings(generators)
	deploymentCapacitySettingsGenerator = gen.Struct(reflect.TypeOf(DeploymentCapacitySettings{}), generators)

	return deploymentCapacitySettingsGenerator
}

// AddIndependentPropertyGeneratorsForDeploymentCapacitySettings is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDeploymentCapacitySettings(gens map[string]gopter.Gen) {
	gens["DesignatedCapacity"] = gen.PtrOf(gen.Int())
	gens["Priority"] = gen.PtrOf(gen.Int())
}

func Test_DeploymentCapacitySettings_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from DeploymentCapacitySettings_STATUS to DeploymentCapacitySettings_STATUS via AssignProperties_To_DeploymentCapacitySettings_STATUS & AssignProperties_From_DeploymentCapacitySettings_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeploymentCapacitySettings_STATUS, DeploymentCapacitySettings_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeploymentCapacitySettings_STATUS tests if a specific instance of DeploymentCapacitySettings_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeploymentCapacitySettings_STATUS(subject DeploymentCapacitySettings_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.DeploymentCapacitySettings_STATUS
	err := copied.AssignProperties_To_DeploymentCapacitySettings_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual DeploymentCapacitySettings_STATUS
	err = actual.AssignProperties_From_DeploymentCapacitySettings_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_DeploymentCapacitySettings_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of DeploymentCapacitySettings_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeploymentCapacitySettings_STATUS, DeploymentCapacitySettings_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeploymentCapacitySettings_STATUS runs a test to see if a specific instance of DeploymentCapacitySettings_STATUS round trips to JSON and back losslessly
func RunJSONSerializationTestForDeploymentCapacitySettings_STATUS(subject DeploymentCapacitySettings_STATUS) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual DeploymentCapacitySettings_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of DeploymentCapacitySettings_STATUS instances for property testing - lazily instantiated by
// DeploymentCapacitySettings_STATUSGenerator()
var deploymentCapacitySettings_STATUSGenerator gopter.Gen

// DeploymentCapacitySettings_STATUSGenerator returns a generator of DeploymentCapacitySettings_STATUS instances for property testing.
func DeploymentCapacitySettings_STATUSGenerator() gopter.Gen {
	if deploymentCapacitySettings_STATUSGenerator != nil {
		return deploymentCapacitySettings_STATUSGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentCapacitySettings_STATUS(generators)
	deploymentCapacitySettings_STATUSGenerator = gen.Struct(reflect.TypeOf(DeploymentCapacitySettings_STATUS{}), generators)

	return deploymentCapacitySettings_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForDeploymentCapacitySettings_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDeploymentCapacitySettings_STATUS(gens map[string]gopter.Gen) {
	gens["DesignatedCapacity"] = gen.PtrOf(gen.Int())
	gens["Priority"] = gen.PtrOf(gen.Int())
}

func Test_DeploymentModel_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from DeploymentModel to DeploymentModel via AssignProperties_To_DeploymentModel & AssignProperties_From_DeploymentModel returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeploymentModel, DeploymentModelGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeploymentModel tests if a specific instance of DeploymentModel can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeploymentModel(subject DeploymentModel) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.DeploymentModel
	err := copied.AssignProperties_To_DeploymentModel(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual DeploymentModel
	err = actual.AssignProperties_From_DeploymentModel(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_DeploymentModel_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 100
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of DeploymentModel via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeploymentModel, DeploymentModelGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeploymentModel runs a test to see if a specific instance of DeploymentModel round trips to JSON and back losslessly
func RunJSONSerializationTestForDeploymentModel(subject DeploymentModel) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual DeploymentModel
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of DeploymentModel instances for property testing - lazily instantiated by DeploymentModelGenerator()
var deploymentModelGenerator gopter.Gen

// DeploymentModelGenerator returns a generator of DeploymentModel instances for property testing.
func DeploymentModelGenerator() gopter.Gen {
	if deploymentModelGenerator != nil {
		return deploymentModelGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentModel(generators)
	deploymentModelGenerator = gen.Struct(reflect.TypeOf(DeploymentModel{}), generators)

	return deploymentModelGenerator
}

// AddIndependentPropertyGeneratorsForDeploymentModel is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDeploymentModel(gens map[string]gopter.Gen) {
	gens["Format"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["Publisher"] = gen.PtrOf(gen.AlphaString())
	gens["Version"] = gen.PtrOf(gen.AlphaString())
}

func Test_DeploymentModel_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from DeploymentModel_STATUS to DeploymentModel_STATUS via AssignProperties_To_DeploymentModel_STATUS & AssignProperties_From_DeploymentModel_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeploymentModel_STATUS, DeploymentModel_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeploymentModel_STATUS tests if a specific instance of DeploymentModel_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeploymentModel_STATUS(subject DeploymentModel_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.DeploymentModel_STATUS
	err := copied.AssignProperties_To_DeploymentModel_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual DeploymentModel_STATUS
	err = actual.AssignProperties_From_DeploymentModel_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_DeploymentModel_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of DeploymentModel_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeploymentModel_STATUS, DeploymentModel_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeploymentModel_STATUS runs a test to see if a specific instance of DeploymentModel_STATUS round trips to JSON and back losslessly
func RunJSONSerializationTestForDeploymentModel_STATUS(subject DeploymentModel_STATUS) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual DeploymentModel_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of DeploymentModel_STATUS instances for property testing - lazily instantiated by
// DeploymentModel_STATUSGenerator()
var deploymentModel_STATUSGenerator gopter.Gen

// DeploymentModel_STATUSGenerator returns a generator of DeploymentModel_STATUS instances for property testing.
// We first initialize deploymentModel_STATUSGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func DeploymentModel_STATUSGenerator() gopter.Gen {
	if deploymentModel_STATUSGenerator != nil {
		return deploymentModel_STATUSGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentModel_STATUS(generators)
	deploymentModel_STATUSGenerator = gen.Struct(reflect.TypeOf(DeploymentModel_STATUS{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentModel_STATUS(generators)
	AddRelatedPropertyGeneratorsForDeploymentModel_STATUS(generators)
	deploymentModel_STATUSGenerator = gen.Struct(reflect.TypeOf(DeploymentModel_STATUS{}), generators)

	return deploymentModel_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForDeploymentModel_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDeploymentModel_STATUS(gens map[string]gopter.Gen) {
	gens["Format"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["Publisher"] = gen.PtrOf(gen.AlphaString())
	gens["Source"] = gen.PtrOf(gen.AlphaString())
	gens["SourceAccount"] = gen.PtrOf(gen.AlphaString())
	gens["Version"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForDeploymentModel_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForDeploymentModel_STATUS(gens map[string]gopter.Gen) {
	gens["CallRateLimit"] = gen.PtrOf(CallRateLimit_STATUSGenerator())
}

func Test_DeploymentOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from DeploymentOperatorSpec to DeploymentOperatorSpec via AssignProperties_To_DeploymentOperatorSpec & AssignProperties_From_DeploymentOperatorSpec returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeploymentOperatorSpec, DeploymentOperatorSpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeploymentOperatorSpec tests if a specific instance of DeploymentOperatorSpec can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeploymentOperatorSpec(subject DeploymentOperatorSpec) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.DeploymentOperatorSpec
	err := copied.AssignProperties_To_DeploymentOperatorSpec(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual DeploymentOperatorSpec
	err = actual.AssignProperties_From_DeploymentOperatorSpec(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_DeploymentOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 100
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of DeploymentOperatorSpec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeploymentOperatorSpec, DeploymentOperatorSpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeploymentOperatorSpec runs a test to see if a specific instance of DeploymentOperatorSpec round trips to JSON and back losslessly
func RunJSONSerializationTestForDeploymentOperatorSpec(subject DeploymentOperatorSpec) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual DeploymentOperatorSpec
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of DeploymentOperatorSpec instances for property testing - lazily instantiated by
// DeploymentOperatorSpecGenerator()
var deploymentOperatorSpecGenerator gopter.Gen

// DeploymentOperatorSpecGenerator returns a generator of DeploymentOperatorSpec instances for property testing.
func DeploymentOperatorSpecGenerator() gopter.Gen {
	if deploymentOperatorSpecGenerator != nil {
		return deploymentOperatorSpecGenerator
	}

	generators := make(map[string]gopter.Gen)
	deploymentOperatorSpecGenerator = gen.Struct(reflect.TypeOf(DeploymentOperatorSpec{}), generators)

	return deploymentOperatorSpecGenerator
}

func Test_DeploymentProperties_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from DeploymentProperties to DeploymentProperties via AssignProperties_To_DeploymentProperties & AssignProperties_From_DeploymentProperties returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeploymentProperties, DeploymentPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeploymentProperties tests if a specific instance of DeploymentProperties can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeploymentProperties(subject DeploymentProperties) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.DeploymentProperties
	err := copied.AssignProperties_To_DeploymentProperties(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual DeploymentProperties
	err = actual.AssignProperties_From_DeploymentProperties(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_DeploymentProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 100
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of DeploymentProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeploymentProperties, DeploymentPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeploymentProperties runs a test to see if a specific instance of DeploymentProperties round trips to JSON and back losslessly
func RunJSONSerializationTestForDeploymentProperties(subject DeploymentProperties) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual DeploymentProperties
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of DeploymentProperties instances for property testing - lazily instantiated by
// DeploymentPropertiesGenerator()
var deploymentPropertiesGenerator gopter.Gen

// DeploymentPropertiesGenerator returns a generator of DeploymentProperties instances for property testing.
// We first initialize deploymentPropertiesGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func DeploymentPropertiesGenerator() gopter.Gen {
	if deploymentPropertiesGenerator != nil {
		return deploymentPropertiesGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentProperties(generators)
	deploymentPropertiesGenerator = gen.Struct(reflect.TypeOf(DeploymentProperties{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentProperties(generators)
	AddRelatedPropertyGeneratorsForDeploymentProperties(generators)
	deploymentPropertiesGenerator = gen.Struct(reflect.TypeOf(DeploymentProperties{}), generators)

	return deploymentPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForDeploymentProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDeploymentProperties(gens map[string]gopter.Gen) {
	gens["ParentDeploymentName"] = gen.PtrOf(gen.AlphaString())
	gens["RaiPolicyName"] = gen.PtrOf(gen.AlphaString())
	gens["SpilloverDeploymentName"] = gen.PtrOf(gen.AlphaString())
	gens["VersionUpgradeOption"] = gen.PtrOf(gen.OneConstOf(DeploymentProperties_VersionUpgradeOption_NoAutoUpgrade, DeploymentProperties_VersionUpgradeOption_OnceCurrentVersionExpired, DeploymentProperties_VersionUpgradeOption_OnceNewDefaultVersionAvailable))
}

// AddRelatedPropertyGeneratorsForDeploymentProperties is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForDeploymentProperties(gens map[string]gopter.Gen) {
	gens["CapacitySettings"] = gen.PtrOf(DeploymentCapacitySettingsGenerator())
	gens["Model"] = gen.PtrOf(DeploymentModelGenerator())
	gens["ScaleSettings"] = gen.PtrOf(DeploymentScaleSettingsGenerator())
}

func Test_DeploymentProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from DeploymentProperties_STATUS to DeploymentProperties_STATUS via AssignProperties_To_DeploymentProperties_STATUS & AssignProperties_From_DeploymentProperties_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeploymentProperties_STATUS, DeploymentProperties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeploymentProperties_STATUS tests if a specific instance of DeploymentProperties_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeploymentProperties_STATUS(subject DeploymentProperties_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.DeploymentProperties_STATUS
	err := copied.AssignProperties_To_DeploymentProperties_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual DeploymentProperties_STATUS
	err = actual.AssignProperties_From_DeploymentProperties_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_DeploymentProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of DeploymentProperties_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeploymentProperties_STATUS, DeploymentProperties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeploymentProperties_STATUS runs a test to see if a specific instance of DeploymentProperties_STATUS round trips to JSON and back losslessly
func RunJSONSerializationTestForDeploymentProperties_STATUS(subject DeploymentProperties_STATUS) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual DeploymentProperties_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of DeploymentProperties_STATUS instances for property testing - lazily instantiated by
// DeploymentProperties_STATUSGenerator()
var deploymentProperties_STATUSGenerator gopter.Gen

// DeploymentProperties_STATUSGenerator returns a generator of DeploymentProperties_STATUS instances for property testing.
// We first initialize deploymentProperties_STATUSGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func DeploymentProperties_STATUSGenerator() gopter.Gen {
	if deploymentProperties_STATUSGenerator != nil {
		return deploymentProperties_STATUSGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentProperties_STATUS(generators)
	deploymentProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(DeploymentProperties_STATUS{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentProperties_STATUS(generators)
	AddRelatedPropertyGeneratorsForDeploymentProperties_STATUS(generators)
	deploymentProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(DeploymentProperties_STATUS{}), generators)

	return deploymentProperties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForDeploymentProperties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDeploymentProperties_STATUS(gens map[string]gopter.Gen) {
	gens["Capabilities"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["CurrentCapacity"] = gen.PtrOf(gen.Int())
	gens["DynamicThrottlingEnabled"] = gen.PtrOf(gen.Bool())
	gens["ParentDeploymentName"] = gen.PtrOf(gen.AlphaString())
	gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(
		DeploymentProperties_ProvisioningState_STATUS_Accepted,
		DeploymentProperties_ProvisioningState_STATUS_Canceled,
		DeploymentProperties_ProvisioningState_STATUS_Creating,
		DeploymentProperties_ProvisioningState_STATUS_Deleting,
		DeploymentProperties_ProvisioningState_STATUS_Disabled,
		DeploymentProperties_ProvisioningState_STATUS_Failed,
		DeploymentProperties_ProvisioningState_STATUS_Moving,
		DeploymentProperties_ProvisioningState_STATUS_Succeeded))
	gens["RaiPolicyName"] = gen.PtrOf(gen.AlphaString())
	gens["SpilloverDeploymentName"] = gen.PtrOf(gen.AlphaString())
	gens["VersionUpgradeOption"] = gen.PtrOf(gen.OneConstOf(DeploymentProperties_VersionUpgradeOption_STATUS_NoAutoUpgrade, DeploymentProperties_VersionUpgradeOption_STATUS_OnceCurrentVersionExpired, DeploymentProperties_VersionUpgradeOption_STATUS_OnceNewDefaultVersionAvailable))
}

// AddRelatedPropertyGeneratorsForDeploymentProperties_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForDeploymentProperties_STATUS(gens map[string]gopter.Gen) {
	gens["CallRateLimit"] = gen.PtrOf(CallRateLimit_STATUSGenerator())
	gens["CapacitySettings"] = gen.PtrOf(DeploymentCapacitySettings_STATUSGenerator())
	gens["Model"] = gen.PtrOf(DeploymentModel_STATUSGenerator())
	gens["RateLimits"] = gen.SliceOf(ThrottlingRule_STATUSGenerator())
	gens["ScaleSettings"] = gen.PtrOf(DeploymentScaleSettings_STATUSGenerator())
}

func Test_DeploymentScaleSettings_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from DeploymentScaleSettings to DeploymentScaleSettings via AssignProperties_To_DeploymentScaleSettings & AssignProperties_From_DeploymentScaleSettings returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeploymentScaleSettings, DeploymentScaleSettingsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeploymentScaleSettings tests if a specific instance of DeploymentScaleSettings can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeploymentScaleSettings(subject DeploymentScaleSettings) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.DeploymentScaleSettings
	err := copied.AssignProperties_To_DeploymentScaleSettings(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual DeploymentScaleSettings
	err = actual.AssignProperties_From_DeploymentScaleSettings(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_DeploymentScaleSettings_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 100
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of DeploymentScaleSettings via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeploymentScaleSettings, DeploymentScaleSettingsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeploymentScaleSettings runs a test to see if a specific instance of DeploymentScaleSettings round trips to JSON and back losslessly
func RunJSONSerializationTestForDeploymentScaleSettings(subject DeploymentScaleSettings) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual DeploymentScaleSettings
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of DeploymentScaleSettings instances for property testing - lazily instantiated by
// DeploymentScaleSettingsGenerator()
var deploymentScaleSettingsGenerator gopter.Gen

// DeploymentScaleSettingsGenerator returns a generator of DeploymentScaleSettings instances for property testing.
func DeploymentScaleSettingsGenerator() gopter.Gen {
	if deploymentScaleSettingsGenerator != nil {
		return deploymentScaleSettingsGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentScaleSettings(generators)
	deploymentScaleSettingsGenerator = gen.Struct(reflect.TypeOf(DeploymentScaleSettings{}), generators)

	return deploymentScaleSettingsGenerator
}

// AddIndependentPropertyGeneratorsForDeploymentScaleSettings is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDeploymentScaleSettings(gens map[string]gopter.Gen) {
	gens["Capacity"] = gen.PtrOf(gen.Int())
	gens["ScaleType"] = gen.PtrOf(gen.OneConstOf(DeploymentScaleSettings_ScaleType_Manual, DeploymentScaleSettings_ScaleType_Standard))
}

func Test_DeploymentScaleSettings_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from DeploymentScaleSettings_STATUS to DeploymentScaleSettings_STATUS via AssignProperties_To_DeploymentScaleSettings_STATUS & AssignProperties_From_DeploymentScaleSettings_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeploymentScaleSettings_STATUS, DeploymentScaleSettings_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeploymentScaleSettings_STATUS tests if a specific instance of DeploymentScaleSettings_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeploymentScaleSettings_STATUS(subject DeploymentScaleSettings_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.DeploymentScaleSettings_STATUS
	err := copied.AssignProperties_To_DeploymentScaleSettings_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual DeploymentScaleSettings_STATUS
	err = actual.AssignProperties_From_DeploymentScaleSettings_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_DeploymentScaleSettings_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of DeploymentScaleSettings_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeploymentScaleSettings_STATUS, DeploymentScaleSettings_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeploymentScaleSettings_STATUS runs a test to see if a specific instance of DeploymentScaleSettings_STATUS round trips to JSON and back losslessly
func RunJSONSerializationTestForDeploymentScaleSettings_STATUS(subject DeploymentScaleSettings_STATUS) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual DeploymentScaleSettings_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of DeploymentScaleSettings_STATUS instances for property testing - lazily instantiated by
// DeploymentScaleSettings_STATUSGenerator()
var deploymentScaleSettings_STATUSGenerator gopter.Gen

// DeploymentScaleSettings_STATUSGenerator returns a generator of DeploymentScaleSettings_STATUS instances for property testing.
func DeploymentScaleSettings_STATUSGenerator() gopter.Gen {
	if deploymentScaleSettings_STATUSGenerator != nil {
		return deploymentScaleSettings_STATUSGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeploymentScaleSettings_STATUS(generators)
	deploymentScaleSettings_STATUSGenerator = gen.Struct(reflect.TypeOf(DeploymentScaleSettings_STATUS{}), generators)

	return deploymentScaleSettings_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForDeploymentScaleSettings_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDeploymentScaleSettings_STATUS(gens map[string]gopter.Gen) {
	gens["ActiveCapacity"] = gen.PtrOf(gen.Int())
	gens["Capacity"] = gen.PtrOf(gen.Int())
	gens["ScaleType"] = gen.PtrOf(gen.OneConstOf(DeploymentScaleSettings_ScaleType_STATUS_Manual, DeploymentScaleSettings_ScaleType_STATUS_Standard))
}

func Test_Deployment_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from Deployment_STATUS to Deployment_STATUS via AssignProperties_To_Deployment_STATUS & AssignProperties_From_Deployment_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeployment_STATUS, Deployment_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeployment_STATUS tests if a specific instance of Deployment_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeployment_STATUS(subject Deployment_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.Deployment_STATUS
	err := copied.AssignProperties_To_Deployment_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual Deployment_STATUS
	err = actual.AssignProperties_From_Deployment_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_Deployment_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of Deployment_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeployment_STATUS, Deployment_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeployment_STATUS runs a test to see if a specific instance of Deployment_STATUS round trips to JSON and back losslessly
func RunJSONSerializationTestForDeployment_STATUS(subject Deployment_STATUS) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual Deployment_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of Deployment_STATUS instances for property testing - lazily instantiated by Deployment_STATUSGenerator()
var deployment_STATUSGenerator gopter.Gen

// Deployment_STATUSGenerator returns a generator of Deployment_STATUS instances for property testing.
// We first initialize deployment_STATUSGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func Deployment_STATUSGenerator() gopter.Gen {
	if deployment_STATUSGenerator != nil {
		return deployment_STATUSGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeployment_STATUS(generators)
	deployment_STATUSGenerator = gen.Struct(reflect.TypeOf(Deployment_STATUS{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeployment_STATUS(generators)
	AddRelatedPropertyGeneratorsForDeployment_STATUS(generators)
	deployment_STATUSGenerator = gen.Struct(reflect.TypeOf(Deployment_STATUS{}), generators)

	return deployment_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForDeployment_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDeployment_STATUS(gens map[string]gopter.Gen) {
	gens["Etag"] = gen.PtrOf(gen.AlphaString())
	gens["Id"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["Tags"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["Type"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForDeployment_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForDeployment_STATUS(gens map[string]gopter.Gen) {
	gens["Properties"] = gen.PtrOf(DeploymentProperties_STATUSGenerator())
	gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator())
	gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator())
}

func Test_Deployment_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from Deployment_Spec to Deployment_Spec via AssignProperties_To_Deployment_Spec & AssignProperties_From_Deployment_Spec returns original",
		prop.ForAll(RunPropertyAssignmentTestForDeployment_Spec, Deployment_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForDeployment_Spec tests if a specific instance of Deployment_Spec can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForDeployment_Spec(subject Deployment_Spec) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.Deployment_Spec
	err := copied.AssignProperties_To_Deployment_Spec(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual Deployment_Spec
	err = actual.AssignProperties_From_Deployment_Spec(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_Deployment_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of Deployment_Spec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDeployment_Spec, Deployment_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForDeployment_Spec runs a test to see if a specific instance of Deployment_Spec round trips to JSON and back losslessly
func RunJSONSerializationTestForDeployment_Spec(subject Deployment_Spec) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual Deployment_Spec
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of Deployment_Spec instances for property testing - lazily instantiated by Deployment_SpecGenerator()
var deployment_SpecGenerator gopter.Gen

// Deployment_SpecGenerator returns a generator of Deployment_Spec instances for property testing.
// We first initialize deployment_SpecGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func Deployment_SpecGenerator() gopter.Gen {
	if deployment_SpecGenerator != nil {
		return deployment_SpecGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeployment_Spec(generators)
	deployment_SpecGenerator = gen.Struct(reflect.TypeOf(Deployment_Spec{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForDeployment_Spec(generators)
	AddRelatedPropertyGeneratorsForDeployment_Spec(generators)
	deployment_SpecGenerator = gen.Struct(reflect.TypeOf(Deployment_Spec{}), generators)

	return deployment_SpecGenerator
}

// AddIndependentPropertyGeneratorsForDeployment_Spec is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDeployment_Spec(gens map[string]gopter.Gen) {
	gens["AzureName"] = gen.AlphaString()
	gens["Tags"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForDeployment_Spec is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForDeployment_Spec(gens map[string]gopter.Gen) {
	gens["OperatorSpec"] = gen.PtrOf(DeploymentOperatorSpecGenerator())
	gens["Properties"] = gen.PtrOf(DeploymentPropertiesGenerator())
	gens["Sku"] = gen.PtrOf(SkuGenerator())
}

func Test_RequestMatchPattern_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from RequestMatchPattern_STATUS to RequestMatchPattern_STATUS via AssignProperties_To_RequestMatchPattern_STATUS & AssignProperties_From_RequestMatchPattern_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForRequestMatchPattern_STATUS, RequestMatchPattern_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForRequestMatchPattern_STATUS tests if a specific instance of RequestMatchPattern_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForRequestMatchPattern_STATUS(subject RequestMatchPattern_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.RequestMatchPattern_STATUS
	err := copied.AssignProperties_To_RequestMatchPattern_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual RequestMatchPattern_STATUS
	err = actual.AssignProperties_From_RequestMatchPattern_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_RequestMatchPattern_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of RequestMatchPattern_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForRequestMatchPattern_STATUS, RequestMatchPattern_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForRequestMatchPattern_STATUS runs a test to see if a specific instance of RequestMatchPattern_STATUS round trips to JSON and back losslessly
func RunJSONSerializationTestForRequestMatchPattern_STATUS(subject RequestMatchPattern_STATUS) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual RequestMatchPattern_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of RequestMatchPattern_STATUS instances for property testing - lazily instantiated by
// RequestMatchPattern_STATUSGenerator()
var requestMatchPattern_STATUSGenerator gopter.Gen

// RequestMatchPattern_STATUSGenerator returns a generator of RequestMatchPattern_STATUS instances for property testing.
func RequestMatchPattern_STATUSGenerator() gopter.Gen {
	if requestMatchPattern_STATUSGenerator != nil {
		return requestMatchPattern_STATUSGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForRequestMatchPattern_STATUS(generators)
	requestMatchPattern_STATUSGenerator = gen.Struct(reflect.TypeOf(RequestMatchPattern_STATUS{}), generators)

	return requestMatchPattern_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForRequestMatchPattern_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForRequestMatchPattern_STATUS(gens map[string]gopter.Gen) {
	gens["Method"] = gen.PtrOf(gen.AlphaString())
	gens["Path"] = gen.PtrOf(gen.AlphaString())
}

func Test_ThrottlingRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ThrottlingRule_STATUS to ThrottlingRule_STATUS via AssignProperties_To_ThrottlingRule_STATUS & AssignProperties_From_ThrottlingRule_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForThrottlingRule_STATUS, ThrottlingRule_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForThrottlingRule_STATUS tests if a specific instance of ThrottlingRule_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForThrottlingRule_STATUS(subject ThrottlingRule_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.ThrottlingRule_STATUS
	err := copied.AssignProperties_To_ThrottlingRule_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual ThrottlingRule_STATUS
	err = actual.AssignProperties_From_ThrottlingRule_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

func Test_ThrottlingRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of ThrottlingRule_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForThrottlingRule_STATUS, ThrottlingRule_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

// RunJSONSerializationTestForThrottlingRule_STATUS runs a test to see if a specific instance of ThrottlingRule_STATUS round trips to JSON and back losslessly
func RunJSONSerializationTestForThrottlingRule_STATUS(subject ThrottlingRule_STATUS) string {
	// Serialize to JSON
	bin, err := json.Marshal(subject)
	if err != nil {
		return err.Error()
	}

	// Deserialize back into memory
	var actual ThrottlingRule_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of ThrottlingRule_STATUS instances for property testing - lazily instantiated by
// ThrottlingRule_STATUSGenerator()
var throttlingRule_STATUSGenerator gopter.Gen

// ThrottlingRule_STATUSGenerator returns a generator of ThrottlingRule_STATUS instances for property testing.
// We first initialize throttlingRule_STATUSGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func ThrottlingRule_STATUSGenerator() gopter.Gen {
	if throttlingRule_STATUSGenerator != nil {
		return throttlingRule_STATUSGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForThrottlingRule_STATUS(generators)
	throttlingRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ThrottlingRule_STATUS{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForThrottlingRule_STATUS(generators)
	AddRelatedPropertyGeneratorsForThrottlingRule_STATUS(generators)
	throttlingRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ThrottlingRule_STATUS{}), generators)

	return throttlingRule_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForThrottlingRule_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForThrottlingRule_STATUS(gens map[string]gopter.Gen) {
	gens["Count"] = gen.PtrOf(gen.Float64())
	gens["DynamicThrottlingEnabled"] = gen.PtrOf(gen.Bool())
	gens["Key"] = gen.PtrOf(gen.AlphaString())
	gens["MinCount"] = gen.PtrOf(gen.Float64())
	gens["RenewalPeriod"] = gen.PtrOf(gen.Float64())
}

// AddRelatedPropertyGeneratorsForThrottlingRule_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForThrottlingRule_STATUS(gens map[string]gopter.Gen) {
	gens["MatchPatterns"] = gen.SliceOf(RequestMatchPattern_STATUSGenerator())
}
