// 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_DateAfterCreation_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 DateAfterCreation_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDateAfterCreation_STATUS, DateAfterCreation_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual DateAfterCreation_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 DateAfterCreation_STATUS instances for property testing - lazily instantiated by
// DateAfterCreation_STATUSGenerator()
var dateAfterCreation_STATUSGenerator gopter.Gen

// DateAfterCreation_STATUSGenerator returns a generator of DateAfterCreation_STATUS instances for property testing.
func DateAfterCreation_STATUSGenerator() gopter.Gen {
	if dateAfterCreation_STATUSGenerator != nil {
		return dateAfterCreation_STATUSGenerator
	}

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

	return dateAfterCreation_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDateAfterCreation_STATUS(gens map[string]gopter.Gen) {
	gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Float64())
	gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Float64())
}

func Test_DateAfterModification_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 DateAfterModification_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForDateAfterModification_STATUS, DateAfterModification_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual DateAfterModification_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 DateAfterModification_STATUS instances for property testing - lazily instantiated by
// DateAfterModification_STATUSGenerator()
var dateAfterModification_STATUSGenerator gopter.Gen

// DateAfterModification_STATUSGenerator returns a generator of DateAfterModification_STATUS instances for property testing.
func DateAfterModification_STATUSGenerator() gopter.Gen {
	if dateAfterModification_STATUSGenerator != nil {
		return dateAfterModification_STATUSGenerator
	}

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

	return dateAfterModification_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForDateAfterModification_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDateAfterModification_STATUS(gens map[string]gopter.Gen) {
	gens["DaysAfterCreationGreaterThan"] = gen.PtrOf(gen.Float64())
	gens["DaysAfterLastAccessTimeGreaterThan"] = gen.PtrOf(gen.Float64())
	gens["DaysAfterLastTierChangeGreaterThan"] = gen.PtrOf(gen.Float64())
	gens["DaysAfterModificationGreaterThan"] = gen.PtrOf(gen.Float64())
}

func Test_ManagementPolicyAction_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 ManagementPolicyAction_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagementPolicyAction_STATUS, ManagementPolicyAction_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ManagementPolicyAction_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 ManagementPolicyAction_STATUS instances for property testing - lazily instantiated by
// ManagementPolicyAction_STATUSGenerator()
var managementPolicyAction_STATUSGenerator gopter.Gen

// ManagementPolicyAction_STATUSGenerator returns a generator of ManagementPolicyAction_STATUS instances for property testing.
func ManagementPolicyAction_STATUSGenerator() gopter.Gen {
	if managementPolicyAction_STATUSGenerator != nil {
		return managementPolicyAction_STATUSGenerator
	}

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

	return managementPolicyAction_STATUSGenerator
}

// AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForManagementPolicyAction_STATUS(gens map[string]gopter.Gen) {
	gens["BaseBlob"] = gen.PtrOf(ManagementPolicyBaseBlob_STATUSGenerator())
	gens["Snapshot"] = gen.PtrOf(ManagementPolicySnapShot_STATUSGenerator())
	gens["Version"] = gen.PtrOf(ManagementPolicyVersion_STATUSGenerator())
}

func Test_ManagementPolicyBaseBlob_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 ManagementPolicyBaseBlob_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagementPolicyBaseBlob_STATUS, ManagementPolicyBaseBlob_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ManagementPolicyBaseBlob_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 ManagementPolicyBaseBlob_STATUS instances for property testing - lazily instantiated by
// ManagementPolicyBaseBlob_STATUSGenerator()
var managementPolicyBaseBlob_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(generators)
	AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(generators)
	managementPolicyBaseBlob_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyBaseBlob_STATUS{}), generators)

	return managementPolicyBaseBlob_STATUSGenerator
}

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

// AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForManagementPolicyBaseBlob_STATUS(gens map[string]gopter.Gen) {
	gens["Delete"] = gen.PtrOf(DateAfterModification_STATUSGenerator())
	gens["TierToArchive"] = gen.PtrOf(DateAfterModification_STATUSGenerator())
	gens["TierToCold"] = gen.PtrOf(DateAfterModification_STATUSGenerator())
	gens["TierToCool"] = gen.PtrOf(DateAfterModification_STATUSGenerator())
	gens["TierToHot"] = gen.PtrOf(DateAfterModification_STATUSGenerator())
}

func Test_ManagementPolicyDefinition_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 ManagementPolicyDefinition_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagementPolicyDefinition_STATUS, ManagementPolicyDefinition_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ManagementPolicyDefinition_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 ManagementPolicyDefinition_STATUS instances for property testing - lazily instantiated by
// ManagementPolicyDefinition_STATUSGenerator()
var managementPolicyDefinition_STATUSGenerator gopter.Gen

// ManagementPolicyDefinition_STATUSGenerator returns a generator of ManagementPolicyDefinition_STATUS instances for property testing.
func ManagementPolicyDefinition_STATUSGenerator() gopter.Gen {
	if managementPolicyDefinition_STATUSGenerator != nil {
		return managementPolicyDefinition_STATUSGenerator
	}

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

	return managementPolicyDefinition_STATUSGenerator
}

// AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForManagementPolicyDefinition_STATUS(gens map[string]gopter.Gen) {
	gens["Actions"] = gen.PtrOf(ManagementPolicyAction_STATUSGenerator())
	gens["Filters"] = gen.PtrOf(ManagementPolicyFilter_STATUSGenerator())
}

func Test_ManagementPolicyFilter_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 ManagementPolicyFilter_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagementPolicyFilter_STATUS, ManagementPolicyFilter_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ManagementPolicyFilter_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 ManagementPolicyFilter_STATUS instances for property testing - lazily instantiated by
// ManagementPolicyFilter_STATUSGenerator()
var managementPolicyFilter_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS(generators)
	AddRelatedPropertyGeneratorsForManagementPolicyFilter_STATUS(generators)
	managementPolicyFilter_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyFilter_STATUS{}), generators)

	return managementPolicyFilter_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForManagementPolicyFilter_STATUS(gens map[string]gopter.Gen) {
	gens["BlobTypes"] = gen.SliceOf(gen.AlphaString())
	gens["PrefixMatch"] = gen.SliceOf(gen.AlphaString())
}

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

func Test_ManagementPolicyProperties_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 ManagementPolicyProperties_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagementPolicyProperties_STATUS, ManagementPolicyProperties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ManagementPolicyProperties_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 ManagementPolicyProperties_STATUS instances for property testing - lazily instantiated by
// ManagementPolicyProperties_STATUSGenerator()
var managementPolicyProperties_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForManagementPolicyProperties_STATUS(generators)
	AddRelatedPropertyGeneratorsForManagementPolicyProperties_STATUS(generators)
	managementPolicyProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyProperties_STATUS{}), generators)

	return managementPolicyProperties_STATUSGenerator
}

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

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

func Test_ManagementPolicyRule_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 ManagementPolicyRule_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagementPolicyRule_STATUS, ManagementPolicyRule_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ManagementPolicyRule_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 ManagementPolicyRule_STATUS instances for property testing - lazily instantiated by
// ManagementPolicyRule_STATUSGenerator()
var managementPolicyRule_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForManagementPolicyRule_STATUS(generators)
	AddRelatedPropertyGeneratorsForManagementPolicyRule_STATUS(generators)
	managementPolicyRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagementPolicyRule_STATUS{}), generators)

	return managementPolicyRule_STATUSGenerator
}

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

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

func Test_ManagementPolicySchema_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 ManagementPolicySchema_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagementPolicySchema_STATUS, ManagementPolicySchema_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ManagementPolicySchema_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 ManagementPolicySchema_STATUS instances for property testing - lazily instantiated by
// ManagementPolicySchema_STATUSGenerator()
var managementPolicySchema_STATUSGenerator gopter.Gen

// ManagementPolicySchema_STATUSGenerator returns a generator of ManagementPolicySchema_STATUS instances for property testing.
func ManagementPolicySchema_STATUSGenerator() gopter.Gen {
	if managementPolicySchema_STATUSGenerator != nil {
		return managementPolicySchema_STATUSGenerator
	}

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

	return managementPolicySchema_STATUSGenerator
}

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

func Test_ManagementPolicySnapShot_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 ManagementPolicySnapShot_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagementPolicySnapShot_STATUS, ManagementPolicySnapShot_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ManagementPolicySnapShot_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 ManagementPolicySnapShot_STATUS instances for property testing - lazily instantiated by
// ManagementPolicySnapShot_STATUSGenerator()
var managementPolicySnapShot_STATUSGenerator gopter.Gen

// ManagementPolicySnapShot_STATUSGenerator returns a generator of ManagementPolicySnapShot_STATUS instances for property testing.
func ManagementPolicySnapShot_STATUSGenerator() gopter.Gen {
	if managementPolicySnapShot_STATUSGenerator != nil {
		return managementPolicySnapShot_STATUSGenerator
	}

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

	return managementPolicySnapShot_STATUSGenerator
}

// AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForManagementPolicySnapShot_STATUS(gens map[string]gopter.Gen) {
	gens["Delete"] = gen.PtrOf(DateAfterCreation_STATUSGenerator())
	gens["TierToArchive"] = gen.PtrOf(DateAfterCreation_STATUSGenerator())
	gens["TierToCold"] = gen.PtrOf(DateAfterCreation_STATUSGenerator())
	gens["TierToCool"] = gen.PtrOf(DateAfterCreation_STATUSGenerator())
	gens["TierToHot"] = gen.PtrOf(DateAfterCreation_STATUSGenerator())
}

func Test_ManagementPolicyVersion_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 ManagementPolicyVersion_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagementPolicyVersion_STATUS, ManagementPolicyVersion_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ManagementPolicyVersion_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 ManagementPolicyVersion_STATUS instances for property testing - lazily instantiated by
// ManagementPolicyVersion_STATUSGenerator()
var managementPolicyVersion_STATUSGenerator gopter.Gen

// ManagementPolicyVersion_STATUSGenerator returns a generator of ManagementPolicyVersion_STATUS instances for property testing.
func ManagementPolicyVersion_STATUSGenerator() gopter.Gen {
	if managementPolicyVersion_STATUSGenerator != nil {
		return managementPolicyVersion_STATUSGenerator
	}

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

	return managementPolicyVersion_STATUSGenerator
}

// AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForManagementPolicyVersion_STATUS(gens map[string]gopter.Gen) {
	gens["Delete"] = gen.PtrOf(DateAfterCreation_STATUSGenerator())
	gens["TierToArchive"] = gen.PtrOf(DateAfterCreation_STATUSGenerator())
	gens["TierToCold"] = gen.PtrOf(DateAfterCreation_STATUSGenerator())
	gens["TierToCool"] = gen.PtrOf(DateAfterCreation_STATUSGenerator())
	gens["TierToHot"] = gen.PtrOf(DateAfterCreation_STATUSGenerator())
}

func Test_StorageAccountsManagementPolicy_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 StorageAccountsManagementPolicy_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForStorageAccountsManagementPolicy_STATUS, StorageAccountsManagementPolicy_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual StorageAccountsManagementPolicy_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 StorageAccountsManagementPolicy_STATUS instances for property testing - lazily instantiated by
// StorageAccountsManagementPolicy_STATUSGenerator()
var storageAccountsManagementPolicy_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForStorageAccountsManagementPolicy_STATUS(generators)
	AddRelatedPropertyGeneratorsForStorageAccountsManagementPolicy_STATUS(generators)
	storageAccountsManagementPolicy_STATUSGenerator = gen.Struct(reflect.TypeOf(StorageAccountsManagementPolicy_STATUS{}), generators)

	return storageAccountsManagementPolicy_STATUSGenerator
}

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

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

func Test_TagFilter_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 TagFilter_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForTagFilter_STATUS, TagFilter_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual TagFilter_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 TagFilter_STATUS instances for property testing - lazily instantiated by TagFilter_STATUSGenerator()
var tagFilter_STATUSGenerator gopter.Gen

// TagFilter_STATUSGenerator returns a generator of TagFilter_STATUS instances for property testing.
func TagFilter_STATUSGenerator() gopter.Gen {
	if tagFilter_STATUSGenerator != nil {
		return tagFilter_STATUSGenerator
	}

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

	return tagFilter_STATUSGenerator
}

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