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

import (
	"encoding/json"
	storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20201001/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_ActionGroupReference_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ActionGroupReference to ActionGroupReference via AssignProperties_To_ActionGroupReference & AssignProperties_From_ActionGroupReference returns original",
		prop.ForAll(RunPropertyAssignmentTestForActionGroupReference, ActionGroupReferenceGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForActionGroupReference tests if a specific instance of ActionGroupReference can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForActionGroupReference(subject ActionGroupReference) 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.ActionGroupReference
	err := copied.AssignProperties_To_ActionGroupReference(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual ActionGroupReference
	err = actual.AssignProperties_From_ActionGroupReference(&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_ActionGroupReference_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 ActionGroupReference via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForActionGroupReference, ActionGroupReferenceGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ActionGroupReference
	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 ActionGroupReference instances for property testing - lazily instantiated by
// ActionGroupReferenceGenerator()
var actionGroupReferenceGenerator gopter.Gen

// ActionGroupReferenceGenerator returns a generator of ActionGroupReference instances for property testing.
func ActionGroupReferenceGenerator() gopter.Gen {
	if actionGroupReferenceGenerator != nil {
		return actionGroupReferenceGenerator
	}

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

	return actionGroupReferenceGenerator
}

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

func Test_ActionGroup_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ActionGroup_STATUS to ActionGroup_STATUS via AssignProperties_To_ActionGroup_STATUS & AssignProperties_From_ActionGroup_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForActionGroup_STATUS, ActionGroup_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForActionGroup_STATUS tests if a specific instance of ActionGroup_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForActionGroup_STATUS(subject ActionGroup_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.ActionGroup_STATUS
	err := copied.AssignProperties_To_ActionGroup_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual ActionGroup_STATUS
	err = actual.AssignProperties_From_ActionGroup_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_ActionGroup_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 ActionGroup_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForActionGroup_STATUS, ActionGroup_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ActionGroup_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 ActionGroup_STATUS instances for property testing - lazily instantiated by ActionGroup_STATUSGenerator()
var actionGroup_STATUSGenerator gopter.Gen

// ActionGroup_STATUSGenerator returns a generator of ActionGroup_STATUS instances for property testing.
func ActionGroup_STATUSGenerator() gopter.Gen {
	if actionGroup_STATUSGenerator != nil {
		return actionGroup_STATUSGenerator
	}

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

	return actionGroup_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForActionGroup_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForActionGroup_STATUS(gens map[string]gopter.Gen) {
	gens["ActionGroupId"] = gen.PtrOf(gen.AlphaString())
	gens["WebhookProperties"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
}

func Test_ActionList_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ActionList to ActionList via AssignProperties_To_ActionList & AssignProperties_From_ActionList returns original",
		prop.ForAll(RunPropertyAssignmentTestForActionList, ActionListGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForActionList tests if a specific instance of ActionList can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForActionList(subject ActionList) 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.ActionList
	err := copied.AssignProperties_To_ActionList(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual ActionList
	err = actual.AssignProperties_From_ActionList(&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_ActionList_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 ActionList via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForActionList, ActionListGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ActionList
	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 ActionList instances for property testing - lazily instantiated by ActionListGenerator()
var actionListGenerator gopter.Gen

// ActionListGenerator returns a generator of ActionList instances for property testing.
func ActionListGenerator() gopter.Gen {
	if actionListGenerator != nil {
		return actionListGenerator
	}

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

	return actionListGenerator
}

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

func Test_ActionList_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ActionList_STATUS to ActionList_STATUS via AssignProperties_To_ActionList_STATUS & AssignProperties_From_ActionList_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForActionList_STATUS, ActionList_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForActionList_STATUS tests if a specific instance of ActionList_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForActionList_STATUS(subject ActionList_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.ActionList_STATUS
	err := copied.AssignProperties_To_ActionList_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual ActionList_STATUS
	err = actual.AssignProperties_From_ActionList_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_ActionList_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 ActionList_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForActionList_STATUS, ActionList_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ActionList_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 ActionList_STATUS instances for property testing - lazily instantiated by ActionList_STATUSGenerator()
var actionList_STATUSGenerator gopter.Gen

// ActionList_STATUSGenerator returns a generator of ActionList_STATUS instances for property testing.
func ActionList_STATUSGenerator() gopter.Gen {
	if actionList_STATUSGenerator != nil {
		return actionList_STATUSGenerator
	}

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

	return actionList_STATUSGenerator
}

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

func Test_ActivityLogAlert_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 ActivityLogAlert to hub returns original",
		prop.ForAll(RunResourceConversionTestForActivityLogAlert, ActivityLogAlertGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

	// Convert from our hub version
	var actual ActivityLogAlert
	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_ActivityLogAlert_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ActivityLogAlert to ActivityLogAlert via AssignProperties_To_ActivityLogAlert & AssignProperties_From_ActivityLogAlert returns original",
		prop.ForAll(RunPropertyAssignmentTestForActivityLogAlert, ActivityLogAlertGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForActivityLogAlert tests if a specific instance of ActivityLogAlert can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForActivityLogAlert(subject ActivityLogAlert) 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.ActivityLogAlert
	err := copied.AssignProperties_To_ActivityLogAlert(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual ActivityLogAlert
	err = actual.AssignProperties_From_ActivityLogAlert(&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_ActivityLogAlert_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 ActivityLogAlert via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForActivityLogAlert, ActivityLogAlertGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ActivityLogAlert
	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 ActivityLogAlert instances for property testing - lazily instantiated by ActivityLogAlertGenerator()
var activityLogAlertGenerator gopter.Gen

// ActivityLogAlertGenerator returns a generator of ActivityLogAlert instances for property testing.
func ActivityLogAlertGenerator() gopter.Gen {
	if activityLogAlertGenerator != nil {
		return activityLogAlertGenerator
	}

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

	return activityLogAlertGenerator
}

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

func Test_ActivityLogAlertOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ActivityLogAlertOperatorSpec to ActivityLogAlertOperatorSpec via AssignProperties_To_ActivityLogAlertOperatorSpec & AssignProperties_From_ActivityLogAlertOperatorSpec returns original",
		prop.ForAll(RunPropertyAssignmentTestForActivityLogAlertOperatorSpec, ActivityLogAlertOperatorSpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForActivityLogAlertOperatorSpec tests if a specific instance of ActivityLogAlertOperatorSpec can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForActivityLogAlertOperatorSpec(subject ActivityLogAlertOperatorSpec) 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.ActivityLogAlertOperatorSpec
	err := copied.AssignProperties_To_ActivityLogAlertOperatorSpec(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual ActivityLogAlertOperatorSpec
	err = actual.AssignProperties_From_ActivityLogAlertOperatorSpec(&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_ActivityLogAlertOperatorSpec_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 ActivityLogAlertOperatorSpec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForActivityLogAlertOperatorSpec, ActivityLogAlertOperatorSpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ActivityLogAlertOperatorSpec
	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 ActivityLogAlertOperatorSpec instances for property testing - lazily instantiated by
// ActivityLogAlertOperatorSpecGenerator()
var activityLogAlertOperatorSpecGenerator gopter.Gen

// ActivityLogAlertOperatorSpecGenerator returns a generator of ActivityLogAlertOperatorSpec instances for property testing.
func ActivityLogAlertOperatorSpecGenerator() gopter.Gen {
	if activityLogAlertOperatorSpecGenerator != nil {
		return activityLogAlertOperatorSpecGenerator
	}

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

	return activityLogAlertOperatorSpecGenerator
}

func Test_ActivityLogAlert_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ActivityLogAlert_STATUS to ActivityLogAlert_STATUS via AssignProperties_To_ActivityLogAlert_STATUS & AssignProperties_From_ActivityLogAlert_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForActivityLogAlert_STATUS, ActivityLogAlert_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForActivityLogAlert_STATUS tests if a specific instance of ActivityLogAlert_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForActivityLogAlert_STATUS(subject ActivityLogAlert_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.ActivityLogAlert_STATUS
	err := copied.AssignProperties_To_ActivityLogAlert_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual ActivityLogAlert_STATUS
	err = actual.AssignProperties_From_ActivityLogAlert_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_ActivityLogAlert_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 ActivityLogAlert_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForActivityLogAlert_STATUS, ActivityLogAlert_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ActivityLogAlert_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 ActivityLogAlert_STATUS instances for property testing - lazily instantiated by
// ActivityLogAlert_STATUSGenerator()
var activityLogAlert_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForActivityLogAlert_STATUS(generators)
	AddRelatedPropertyGeneratorsForActivityLogAlert_STATUS(generators)
	activityLogAlert_STATUSGenerator = gen.Struct(reflect.TypeOf(ActivityLogAlert_STATUS{}), generators)

	return activityLogAlert_STATUSGenerator
}

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

// AddRelatedPropertyGeneratorsForActivityLogAlert_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForActivityLogAlert_STATUS(gens map[string]gopter.Gen) {
	gens["Actions"] = gen.PtrOf(ActionList_STATUSGenerator())
	gens["Condition"] = gen.PtrOf(AlertRuleAllOfCondition_STATUSGenerator())
}

func Test_ActivityLogAlert_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ActivityLogAlert_Spec to ActivityLogAlert_Spec via AssignProperties_To_ActivityLogAlert_Spec & AssignProperties_From_ActivityLogAlert_Spec returns original",
		prop.ForAll(RunPropertyAssignmentTestForActivityLogAlert_Spec, ActivityLogAlert_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForActivityLogAlert_Spec tests if a specific instance of ActivityLogAlert_Spec can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForActivityLogAlert_Spec(subject ActivityLogAlert_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.ActivityLogAlert_Spec
	err := copied.AssignProperties_To_ActivityLogAlert_Spec(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual ActivityLogAlert_Spec
	err = actual.AssignProperties_From_ActivityLogAlert_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_ActivityLogAlert_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 ActivityLogAlert_Spec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForActivityLogAlert_Spec, ActivityLogAlert_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ActivityLogAlert_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 ActivityLogAlert_Spec instances for property testing - lazily instantiated by
// ActivityLogAlert_SpecGenerator()
var activityLogAlert_SpecGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForActivityLogAlert_Spec(generators)
	AddRelatedPropertyGeneratorsForActivityLogAlert_Spec(generators)
	activityLogAlert_SpecGenerator = gen.Struct(reflect.TypeOf(ActivityLogAlert_Spec{}), generators)

	return activityLogAlert_SpecGenerator
}

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

// AddRelatedPropertyGeneratorsForActivityLogAlert_Spec is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForActivityLogAlert_Spec(gens map[string]gopter.Gen) {
	gens["Actions"] = gen.PtrOf(ActionListGenerator())
	gens["Condition"] = gen.PtrOf(AlertRuleAllOfConditionGenerator())
	gens["OperatorSpec"] = gen.PtrOf(ActivityLogAlertOperatorSpecGenerator())
}

func Test_AlertRuleAllOfCondition_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from AlertRuleAllOfCondition to AlertRuleAllOfCondition via AssignProperties_To_AlertRuleAllOfCondition & AssignProperties_From_AlertRuleAllOfCondition returns original",
		prop.ForAll(RunPropertyAssignmentTestForAlertRuleAllOfCondition, AlertRuleAllOfConditionGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForAlertRuleAllOfCondition tests if a specific instance of AlertRuleAllOfCondition can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForAlertRuleAllOfCondition(subject AlertRuleAllOfCondition) 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.AlertRuleAllOfCondition
	err := copied.AssignProperties_To_AlertRuleAllOfCondition(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual AlertRuleAllOfCondition
	err = actual.AssignProperties_From_AlertRuleAllOfCondition(&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_AlertRuleAllOfCondition_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 AlertRuleAllOfCondition via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAlertRuleAllOfCondition, AlertRuleAllOfConditionGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual AlertRuleAllOfCondition
	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 AlertRuleAllOfCondition instances for property testing - lazily instantiated by
// AlertRuleAllOfConditionGenerator()
var alertRuleAllOfConditionGenerator gopter.Gen

// AlertRuleAllOfConditionGenerator returns a generator of AlertRuleAllOfCondition instances for property testing.
func AlertRuleAllOfConditionGenerator() gopter.Gen {
	if alertRuleAllOfConditionGenerator != nil {
		return alertRuleAllOfConditionGenerator
	}

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

	return alertRuleAllOfConditionGenerator
}

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

func Test_AlertRuleAllOfCondition_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from AlertRuleAllOfCondition_STATUS to AlertRuleAllOfCondition_STATUS via AssignProperties_To_AlertRuleAllOfCondition_STATUS & AssignProperties_From_AlertRuleAllOfCondition_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForAlertRuleAllOfCondition_STATUS, AlertRuleAllOfCondition_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForAlertRuleAllOfCondition_STATUS tests if a specific instance of AlertRuleAllOfCondition_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForAlertRuleAllOfCondition_STATUS(subject AlertRuleAllOfCondition_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.AlertRuleAllOfCondition_STATUS
	err := copied.AssignProperties_To_AlertRuleAllOfCondition_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual AlertRuleAllOfCondition_STATUS
	err = actual.AssignProperties_From_AlertRuleAllOfCondition_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_AlertRuleAllOfCondition_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 AlertRuleAllOfCondition_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAlertRuleAllOfCondition_STATUS, AlertRuleAllOfCondition_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual AlertRuleAllOfCondition_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 AlertRuleAllOfCondition_STATUS instances for property testing - lazily instantiated by
// AlertRuleAllOfCondition_STATUSGenerator()
var alertRuleAllOfCondition_STATUSGenerator gopter.Gen

// AlertRuleAllOfCondition_STATUSGenerator returns a generator of AlertRuleAllOfCondition_STATUS instances for property testing.
func AlertRuleAllOfCondition_STATUSGenerator() gopter.Gen {
	if alertRuleAllOfCondition_STATUSGenerator != nil {
		return alertRuleAllOfCondition_STATUSGenerator
	}

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

	return alertRuleAllOfCondition_STATUSGenerator
}

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

func Test_AlertRuleAnyOfOrLeafCondition_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from AlertRuleAnyOfOrLeafCondition to AlertRuleAnyOfOrLeafCondition via AssignProperties_To_AlertRuleAnyOfOrLeafCondition & AssignProperties_From_AlertRuleAnyOfOrLeafCondition returns original",
		prop.ForAll(RunPropertyAssignmentTestForAlertRuleAnyOfOrLeafCondition, AlertRuleAnyOfOrLeafConditionGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForAlertRuleAnyOfOrLeafCondition tests if a specific instance of AlertRuleAnyOfOrLeafCondition can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForAlertRuleAnyOfOrLeafCondition(subject AlertRuleAnyOfOrLeafCondition) 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.AlertRuleAnyOfOrLeafCondition
	err := copied.AssignProperties_To_AlertRuleAnyOfOrLeafCondition(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual AlertRuleAnyOfOrLeafCondition
	err = actual.AssignProperties_From_AlertRuleAnyOfOrLeafCondition(&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_AlertRuleAnyOfOrLeafCondition_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 AlertRuleAnyOfOrLeafCondition via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAlertRuleAnyOfOrLeafCondition, AlertRuleAnyOfOrLeafConditionGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual AlertRuleAnyOfOrLeafCondition
	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 AlertRuleAnyOfOrLeafCondition instances for property testing - lazily instantiated by
// AlertRuleAnyOfOrLeafConditionGenerator()
var alertRuleAnyOfOrLeafConditionGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForAlertRuleAnyOfOrLeafCondition(generators)
	AddRelatedPropertyGeneratorsForAlertRuleAnyOfOrLeafCondition(generators)
	alertRuleAnyOfOrLeafConditionGenerator = gen.Struct(reflect.TypeOf(AlertRuleAnyOfOrLeafCondition{}), generators)

	return alertRuleAnyOfOrLeafConditionGenerator
}

// AddIndependentPropertyGeneratorsForAlertRuleAnyOfOrLeafCondition is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForAlertRuleAnyOfOrLeafCondition(gens map[string]gopter.Gen) {
	gens["ContainsAny"] = gen.SliceOf(gen.AlphaString())
	gens["Equals"] = gen.PtrOf(gen.AlphaString())
	gens["Field"] = gen.PtrOf(gen.AlphaString())
}

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

func Test_AlertRuleAnyOfOrLeafCondition_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from AlertRuleAnyOfOrLeafCondition_STATUS to AlertRuleAnyOfOrLeafCondition_STATUS via AssignProperties_To_AlertRuleAnyOfOrLeafCondition_STATUS & AssignProperties_From_AlertRuleAnyOfOrLeafCondition_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForAlertRuleAnyOfOrLeafCondition_STATUS, AlertRuleAnyOfOrLeafCondition_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForAlertRuleAnyOfOrLeafCondition_STATUS tests if a specific instance of AlertRuleAnyOfOrLeafCondition_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForAlertRuleAnyOfOrLeafCondition_STATUS(subject AlertRuleAnyOfOrLeafCondition_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.AlertRuleAnyOfOrLeafCondition_STATUS
	err := copied.AssignProperties_To_AlertRuleAnyOfOrLeafCondition_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual AlertRuleAnyOfOrLeafCondition_STATUS
	err = actual.AssignProperties_From_AlertRuleAnyOfOrLeafCondition_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_AlertRuleAnyOfOrLeafCondition_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 AlertRuleAnyOfOrLeafCondition_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAlertRuleAnyOfOrLeafCondition_STATUS, AlertRuleAnyOfOrLeafCondition_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual AlertRuleAnyOfOrLeafCondition_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 AlertRuleAnyOfOrLeafCondition_STATUS instances for property testing - lazily instantiated by
// AlertRuleAnyOfOrLeafCondition_STATUSGenerator()
var alertRuleAnyOfOrLeafCondition_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForAlertRuleAnyOfOrLeafCondition_STATUS(generators)
	AddRelatedPropertyGeneratorsForAlertRuleAnyOfOrLeafCondition_STATUS(generators)
	alertRuleAnyOfOrLeafCondition_STATUSGenerator = gen.Struct(reflect.TypeOf(AlertRuleAnyOfOrLeafCondition_STATUS{}), generators)

	return alertRuleAnyOfOrLeafCondition_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForAlertRuleAnyOfOrLeafCondition_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForAlertRuleAnyOfOrLeafCondition_STATUS(gens map[string]gopter.Gen) {
	gens["ContainsAny"] = gen.SliceOf(gen.AlphaString())
	gens["Equals"] = gen.PtrOf(gen.AlphaString())
	gens["Field"] = gen.PtrOf(gen.AlphaString())
}

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

func Test_AlertRuleLeafCondition_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from AlertRuleLeafCondition to AlertRuleLeafCondition via AssignProperties_To_AlertRuleLeafCondition & AssignProperties_From_AlertRuleLeafCondition returns original",
		prop.ForAll(RunPropertyAssignmentTestForAlertRuleLeafCondition, AlertRuleLeafConditionGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForAlertRuleLeafCondition tests if a specific instance of AlertRuleLeafCondition can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForAlertRuleLeafCondition(subject AlertRuleLeafCondition) 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.AlertRuleLeafCondition
	err := copied.AssignProperties_To_AlertRuleLeafCondition(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual AlertRuleLeafCondition
	err = actual.AssignProperties_From_AlertRuleLeafCondition(&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_AlertRuleLeafCondition_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 AlertRuleLeafCondition via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAlertRuleLeafCondition, AlertRuleLeafConditionGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual AlertRuleLeafCondition
	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 AlertRuleLeafCondition instances for property testing - lazily instantiated by
// AlertRuleLeafConditionGenerator()
var alertRuleLeafConditionGenerator gopter.Gen

// AlertRuleLeafConditionGenerator returns a generator of AlertRuleLeafCondition instances for property testing.
func AlertRuleLeafConditionGenerator() gopter.Gen {
	if alertRuleLeafConditionGenerator != nil {
		return alertRuleLeafConditionGenerator
	}

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

	return alertRuleLeafConditionGenerator
}

// AddIndependentPropertyGeneratorsForAlertRuleLeafCondition is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForAlertRuleLeafCondition(gens map[string]gopter.Gen) {
	gens["ContainsAny"] = gen.SliceOf(gen.AlphaString())
	gens["Equals"] = gen.PtrOf(gen.AlphaString())
	gens["Field"] = gen.PtrOf(gen.AlphaString())
}

func Test_AlertRuleLeafCondition_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from AlertRuleLeafCondition_STATUS to AlertRuleLeafCondition_STATUS via AssignProperties_To_AlertRuleLeafCondition_STATUS & AssignProperties_From_AlertRuleLeafCondition_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForAlertRuleLeafCondition_STATUS, AlertRuleLeafCondition_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForAlertRuleLeafCondition_STATUS tests if a specific instance of AlertRuleLeafCondition_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForAlertRuleLeafCondition_STATUS(subject AlertRuleLeafCondition_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.AlertRuleLeafCondition_STATUS
	err := copied.AssignProperties_To_AlertRuleLeafCondition_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual AlertRuleLeafCondition_STATUS
	err = actual.AssignProperties_From_AlertRuleLeafCondition_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_AlertRuleLeafCondition_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 AlertRuleLeafCondition_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAlertRuleLeafCondition_STATUS, AlertRuleLeafCondition_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual AlertRuleLeafCondition_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 AlertRuleLeafCondition_STATUS instances for property testing - lazily instantiated by
// AlertRuleLeafCondition_STATUSGenerator()
var alertRuleLeafCondition_STATUSGenerator gopter.Gen

// AlertRuleLeafCondition_STATUSGenerator returns a generator of AlertRuleLeafCondition_STATUS instances for property testing.
func AlertRuleLeafCondition_STATUSGenerator() gopter.Gen {
	if alertRuleLeafCondition_STATUSGenerator != nil {
		return alertRuleLeafCondition_STATUSGenerator
	}

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

	return alertRuleLeafCondition_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForAlertRuleLeafCondition_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForAlertRuleLeafCondition_STATUS(gens map[string]gopter.Gen) {
	gens["ContainsAny"] = gen.SliceOf(gen.AlphaString())
	gens["Equals"] = gen.PtrOf(gen.AlphaString())
	gens["Field"] = gen.PtrOf(gen.AlphaString())
}
