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

import (
	"encoding/json"
	"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_Capability_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 Capability_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCapability_STATUS, Capability_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Capability_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 Capability_STATUS instances for property testing - lazily instantiated by Capability_STATUSGenerator()
var capability_STATUSGenerator gopter.Gen

// Capability_STATUSGenerator returns a generator of Capability_STATUS instances for property testing.
func Capability_STATUSGenerator() gopter.Gen {
	if capability_STATUSGenerator != nil {
		return capability_STATUSGenerator
	}

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

	return capability_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForCapability_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForCapability_STATUS(gens map[string]gopter.Gen) {
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["Reason"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
}

func Test_ExtendedLocation_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 ExtendedLocation_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForExtendedLocation_STATUS, ExtendedLocation_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ExtendedLocation_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 ExtendedLocation_STATUS instances for property testing - lazily instantiated by
// ExtendedLocation_STATUSGenerator()
var extendedLocation_STATUSGenerator gopter.Gen

// ExtendedLocation_STATUSGenerator returns a generator of ExtendedLocation_STATUS instances for property testing.
func ExtendedLocation_STATUSGenerator() gopter.Gen {
	if extendedLocation_STATUSGenerator != nil {
		return extendedLocation_STATUSGenerator
	}

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

	return extendedLocation_STATUSGenerator
}

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

func Test_HostingEnvironmentProfile_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 HostingEnvironmentProfile_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForHostingEnvironmentProfile_STATUS, HostingEnvironmentProfile_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual HostingEnvironmentProfile_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 HostingEnvironmentProfile_STATUS instances for property testing - lazily instantiated by
// HostingEnvironmentProfile_STATUSGenerator()
var hostingEnvironmentProfile_STATUSGenerator gopter.Gen

// HostingEnvironmentProfile_STATUSGenerator returns a generator of HostingEnvironmentProfile_STATUS instances for property testing.
func HostingEnvironmentProfile_STATUSGenerator() gopter.Gen {
	if hostingEnvironmentProfile_STATUSGenerator != nil {
		return hostingEnvironmentProfile_STATUSGenerator
	}

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

	return hostingEnvironmentProfile_STATUSGenerator
}

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

func Test_KubeEnvironmentProfile_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 KubeEnvironmentProfile_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForKubeEnvironmentProfile_STATUS, KubeEnvironmentProfile_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual KubeEnvironmentProfile_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 KubeEnvironmentProfile_STATUS instances for property testing - lazily instantiated by
// KubeEnvironmentProfile_STATUSGenerator()
var kubeEnvironmentProfile_STATUSGenerator gopter.Gen

// KubeEnvironmentProfile_STATUSGenerator returns a generator of KubeEnvironmentProfile_STATUS instances for property testing.
func KubeEnvironmentProfile_STATUSGenerator() gopter.Gen {
	if kubeEnvironmentProfile_STATUSGenerator != nil {
		return kubeEnvironmentProfile_STATUSGenerator
	}

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

	return kubeEnvironmentProfile_STATUSGenerator
}

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

func Test_ServerFarm_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 ServerFarm_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForServerFarm_STATUS, ServerFarm_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ServerFarm_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 ServerFarm_STATUS instances for property testing - lazily instantiated by ServerFarm_STATUSGenerator()
var serverFarm_STATUSGenerator gopter.Gen

// ServerFarm_STATUSGenerator returns a generator of ServerFarm_STATUS instances for property testing.
// We first initialize serverFarm_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 ServerFarm_STATUSGenerator() gopter.Gen {
	if serverFarm_STATUSGenerator != nil {
		return serverFarm_STATUSGenerator
	}

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForServerFarm_STATUS(generators)
	AddRelatedPropertyGeneratorsForServerFarm_STATUS(generators)
	serverFarm_STATUSGenerator = gen.Struct(reflect.TypeOf(ServerFarm_STATUS{}), generators)

	return serverFarm_STATUSGenerator
}

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

// AddRelatedPropertyGeneratorsForServerFarm_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForServerFarm_STATUS(gens map[string]gopter.Gen) {
	gens["ExtendedLocation"] = gen.PtrOf(ExtendedLocation_STATUSGenerator())
	gens["Properties"] = gen.PtrOf(Serverfarm_Properties_STATUSGenerator())
	gens["Sku"] = gen.PtrOf(SkuDescription_STATUSGenerator())
}

func Test_Serverfarm_Properties_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 Serverfarm_Properties_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForServerfarm_Properties_STATUS, Serverfarm_Properties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Serverfarm_Properties_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 Serverfarm_Properties_STATUS instances for property testing - lazily instantiated by
// Serverfarm_Properties_STATUSGenerator()
var serverfarm_Properties_STATUSGenerator gopter.Gen

// Serverfarm_Properties_STATUSGenerator returns a generator of Serverfarm_Properties_STATUS instances for property testing.
// We first initialize serverfarm_Properties_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 Serverfarm_Properties_STATUSGenerator() gopter.Gen {
	if serverfarm_Properties_STATUSGenerator != nil {
		return serverfarm_Properties_STATUSGenerator
	}

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForServerfarm_Properties_STATUS(generators)
	AddRelatedPropertyGeneratorsForServerfarm_Properties_STATUS(generators)
	serverfarm_Properties_STATUSGenerator = gen.Struct(reflect.TypeOf(Serverfarm_Properties_STATUS{}), generators)

	return serverfarm_Properties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForServerfarm_Properties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForServerfarm_Properties_STATUS(gens map[string]gopter.Gen) {
	gens["ElasticScaleEnabled"] = gen.PtrOf(gen.Bool())
	gens["FreeOfferExpirationTime"] = gen.PtrOf(gen.AlphaString())
	gens["GeoRegion"] = gen.PtrOf(gen.AlphaString())
	gens["HyperV"] = gen.PtrOf(gen.Bool())
	gens["IsSpot"] = gen.PtrOf(gen.Bool())
	gens["IsXenon"] = gen.PtrOf(gen.Bool())
	gens["MaximumElasticWorkerCount"] = gen.PtrOf(gen.Int())
	gens["MaximumNumberOfWorkers"] = gen.PtrOf(gen.Int())
	gens["NumberOfSites"] = gen.PtrOf(gen.Int())
	gens["NumberOfWorkers"] = gen.PtrOf(gen.Int())
	gens["PerSiteScaling"] = gen.PtrOf(gen.Bool())
	gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(
		Serverfarm_Properties_ProvisioningState_STATUS_Canceled,
		Serverfarm_Properties_ProvisioningState_STATUS_Deleting,
		Serverfarm_Properties_ProvisioningState_STATUS_Failed,
		Serverfarm_Properties_ProvisioningState_STATUS_InProgress,
		Serverfarm_Properties_ProvisioningState_STATUS_Succeeded))
	gens["Reserved"] = gen.PtrOf(gen.Bool())
	gens["ResourceGroup"] = gen.PtrOf(gen.AlphaString())
	gens["SpotExpirationTime"] = gen.PtrOf(gen.AlphaString())
	gens["Status"] = gen.PtrOf(gen.OneConstOf(Serverfarm_Properties_Status_STATUS_Creating, Serverfarm_Properties_Status_STATUS_Pending, Serverfarm_Properties_Status_STATUS_Ready))
	gens["Subscription"] = gen.PtrOf(gen.AlphaString())
	gens["TargetWorkerCount"] = gen.PtrOf(gen.Int())
	gens["TargetWorkerSizeId"] = gen.PtrOf(gen.Int())
	gens["WorkerTierName"] = gen.PtrOf(gen.AlphaString())
	gens["ZoneRedundant"] = gen.PtrOf(gen.Bool())
}

// AddRelatedPropertyGeneratorsForServerfarm_Properties_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForServerfarm_Properties_STATUS(gens map[string]gopter.Gen) {
	gens["HostingEnvironmentProfile"] = gen.PtrOf(HostingEnvironmentProfile_STATUSGenerator())
	gens["KubeEnvironmentProfile"] = gen.PtrOf(KubeEnvironmentProfile_STATUSGenerator())
}

func Test_SkuCapacity_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 SkuCapacity_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSkuCapacity_STATUS, SkuCapacity_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual SkuCapacity_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 SkuCapacity_STATUS instances for property testing - lazily instantiated by SkuCapacity_STATUSGenerator()
var skuCapacity_STATUSGenerator gopter.Gen

// SkuCapacity_STATUSGenerator returns a generator of SkuCapacity_STATUS instances for property testing.
func SkuCapacity_STATUSGenerator() gopter.Gen {
	if skuCapacity_STATUSGenerator != nil {
		return skuCapacity_STATUSGenerator
	}

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

	return skuCapacity_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForSkuCapacity_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSkuCapacity_STATUS(gens map[string]gopter.Gen) {
	gens["Default"] = gen.PtrOf(gen.Int())
	gens["ElasticMaximum"] = gen.PtrOf(gen.Int())
	gens["Maximum"] = gen.PtrOf(gen.Int())
	gens["Minimum"] = gen.PtrOf(gen.Int())
	gens["ScaleType"] = gen.PtrOf(gen.AlphaString())
}

func Test_SkuDescription_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 SkuDescription_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSkuDescription_STATUS, SkuDescription_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual SkuDescription_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 SkuDescription_STATUS instances for property testing - lazily instantiated by
// SkuDescription_STATUSGenerator()
var skuDescription_STATUSGenerator gopter.Gen

// SkuDescription_STATUSGenerator returns a generator of SkuDescription_STATUS instances for property testing.
// We first initialize skuDescription_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 SkuDescription_STATUSGenerator() gopter.Gen {
	if skuDescription_STATUSGenerator != nil {
		return skuDescription_STATUSGenerator
	}

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForSkuDescription_STATUS(generators)
	AddRelatedPropertyGeneratorsForSkuDescription_STATUS(generators)
	skuDescription_STATUSGenerator = gen.Struct(reflect.TypeOf(SkuDescription_STATUS{}), generators)

	return skuDescription_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForSkuDescription_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSkuDescription_STATUS(gens map[string]gopter.Gen) {
	gens["Capacity"] = gen.PtrOf(gen.Int())
	gens["Family"] = gen.PtrOf(gen.AlphaString())
	gens["Locations"] = gen.SliceOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["Size"] = gen.PtrOf(gen.AlphaString())
	gens["Tier"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForSkuDescription_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForSkuDescription_STATUS(gens map[string]gopter.Gen) {
	gens["Capabilities"] = gen.SliceOf(Capability_STATUSGenerator())
	gens["SkuCapacity"] = gen.PtrOf(SkuCapacity_STATUSGenerator())
}
