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

import (
	"encoding/json"
	storage "github.com/Azure/azure-service-operator/v2/api/sql/v1api20211101/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_ServersDatabasesVulnerabilityAssessment_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 ServersDatabasesVulnerabilityAssessment to hub returns original",
		prop.ForAll(RunResourceConversionTestForServersDatabasesVulnerabilityAssessment, ServersDatabasesVulnerabilityAssessmentGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

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

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

// ServersDatabasesVulnerabilityAssessmentGenerator returns a generator of ServersDatabasesVulnerabilityAssessment instances for property testing.
func ServersDatabasesVulnerabilityAssessmentGenerator() gopter.Gen {
	if serversDatabasesVulnerabilityAssessmentGenerator != nil {
		return serversDatabasesVulnerabilityAssessmentGenerator
	}

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

	return serversDatabasesVulnerabilityAssessmentGenerator
}

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

func Test_ServersDatabasesVulnerabilityAssessmentOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ServersDatabasesVulnerabilityAssessmentOperatorSpec to ServersDatabasesVulnerabilityAssessmentOperatorSpec via AssignProperties_To_ServersDatabasesVulnerabilityAssessmentOperatorSpec & AssignProperties_From_ServersDatabasesVulnerabilityAssessmentOperatorSpec returns original",
		prop.ForAll(RunPropertyAssignmentTestForServersDatabasesVulnerabilityAssessmentOperatorSpec, ServersDatabasesVulnerabilityAssessmentOperatorSpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

// ServersDatabasesVulnerabilityAssessmentOperatorSpecGenerator returns a generator of ServersDatabasesVulnerabilityAssessmentOperatorSpec instances for property testing.
func ServersDatabasesVulnerabilityAssessmentOperatorSpecGenerator() gopter.Gen {
	if serversDatabasesVulnerabilityAssessmentOperatorSpecGenerator != nil {
		return serversDatabasesVulnerabilityAssessmentOperatorSpecGenerator
	}

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

	return serversDatabasesVulnerabilityAssessmentOperatorSpecGenerator
}

func Test_ServersDatabasesVulnerabilityAssessment_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ServersDatabasesVulnerabilityAssessment_STATUS to ServersDatabasesVulnerabilityAssessment_STATUS via AssignProperties_To_ServersDatabasesVulnerabilityAssessment_STATUS & AssignProperties_From_ServersDatabasesVulnerabilityAssessment_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForServersDatabasesVulnerabilityAssessment_STATUS, ServersDatabasesVulnerabilityAssessment_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual ServersDatabasesVulnerabilityAssessment_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 ServersDatabasesVulnerabilityAssessment_STATUS instances for property testing - lazily instantiated by
// ServersDatabasesVulnerabilityAssessment_STATUSGenerator()
var serversDatabasesVulnerabilityAssessment_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForServersDatabasesVulnerabilityAssessment_STATUS(generators)
	AddRelatedPropertyGeneratorsForServersDatabasesVulnerabilityAssessment_STATUS(generators)
	serversDatabasesVulnerabilityAssessment_STATUSGenerator = gen.Struct(reflect.TypeOf(ServersDatabasesVulnerabilityAssessment_STATUS{}), generators)

	return serversDatabasesVulnerabilityAssessment_STATUSGenerator
}

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

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

func Test_ServersDatabasesVulnerabilityAssessment_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from ServersDatabasesVulnerabilityAssessment_Spec to ServersDatabasesVulnerabilityAssessment_Spec via AssignProperties_To_ServersDatabasesVulnerabilityAssessment_Spec & AssignProperties_From_ServersDatabasesVulnerabilityAssessment_Spec returns original",
		prop.ForAll(RunPropertyAssignmentTestForServersDatabasesVulnerabilityAssessment_Spec, ServersDatabasesVulnerabilityAssessment_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual ServersDatabasesVulnerabilityAssessment_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 ServersDatabasesVulnerabilityAssessment_Spec instances for property testing - lazily instantiated by
// ServersDatabasesVulnerabilityAssessment_SpecGenerator()
var serversDatabasesVulnerabilityAssessment_SpecGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForServersDatabasesVulnerabilityAssessment_Spec(generators)
	AddRelatedPropertyGeneratorsForServersDatabasesVulnerabilityAssessment_Spec(generators)
	serversDatabasesVulnerabilityAssessment_SpecGenerator = gen.Struct(reflect.TypeOf(ServersDatabasesVulnerabilityAssessment_Spec{}), generators)

	return serversDatabasesVulnerabilityAssessment_SpecGenerator
}

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

// AddRelatedPropertyGeneratorsForServersDatabasesVulnerabilityAssessment_Spec is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForServersDatabasesVulnerabilityAssessment_Spec(gens map[string]gopter.Gen) {
	gens["OperatorSpec"] = gen.PtrOf(ServersDatabasesVulnerabilityAssessmentOperatorSpecGenerator())
	gens["RecurringScans"] = gen.PtrOf(VulnerabilityAssessmentRecurringScansPropertiesGenerator())
}

func Test_VulnerabilityAssessmentRecurringScansProperties_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VulnerabilityAssessmentRecurringScansProperties to VulnerabilityAssessmentRecurringScansProperties via AssignProperties_To_VulnerabilityAssessmentRecurringScansProperties & AssignProperties_From_VulnerabilityAssessmentRecurringScansProperties returns original",
		prop.ForAll(RunPropertyAssignmentTestForVulnerabilityAssessmentRecurringScansProperties, VulnerabilityAssessmentRecurringScansPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

// VulnerabilityAssessmentRecurringScansPropertiesGenerator returns a generator of VulnerabilityAssessmentRecurringScansProperties instances for property testing.
func VulnerabilityAssessmentRecurringScansPropertiesGenerator() gopter.Gen {
	if vulnerabilityAssessmentRecurringScansPropertiesGenerator != nil {
		return vulnerabilityAssessmentRecurringScansPropertiesGenerator
	}

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

	return vulnerabilityAssessmentRecurringScansPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForVulnerabilityAssessmentRecurringScansProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVulnerabilityAssessmentRecurringScansProperties(gens map[string]gopter.Gen) {
	gens["EmailSubscriptionAdmins"] = gen.PtrOf(gen.Bool())
	gens["Emails"] = gen.SliceOf(gen.AlphaString())
	gens["IsEnabled"] = gen.PtrOf(gen.Bool())
}

func Test_VulnerabilityAssessmentRecurringScansProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VulnerabilityAssessmentRecurringScansProperties_STATUS to VulnerabilityAssessmentRecurringScansProperties_STATUS via AssignProperties_To_VulnerabilityAssessmentRecurringScansProperties_STATUS & AssignProperties_From_VulnerabilityAssessmentRecurringScansProperties_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForVulnerabilityAssessmentRecurringScansProperties_STATUS, VulnerabilityAssessmentRecurringScansProperties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual VulnerabilityAssessmentRecurringScansProperties_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 VulnerabilityAssessmentRecurringScansProperties_STATUS instances for property testing - lazily
// instantiated by VulnerabilityAssessmentRecurringScansProperties_STATUSGenerator()
var vulnerabilityAssessmentRecurringScansProperties_STATUSGenerator gopter.Gen

// VulnerabilityAssessmentRecurringScansProperties_STATUSGenerator returns a generator of VulnerabilityAssessmentRecurringScansProperties_STATUS instances for property testing.
func VulnerabilityAssessmentRecurringScansProperties_STATUSGenerator() gopter.Gen {
	if vulnerabilityAssessmentRecurringScansProperties_STATUSGenerator != nil {
		return vulnerabilityAssessmentRecurringScansProperties_STATUSGenerator
	}

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

	return vulnerabilityAssessmentRecurringScansProperties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForVulnerabilityAssessmentRecurringScansProperties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVulnerabilityAssessmentRecurringScansProperties_STATUS(gens map[string]gopter.Gen) {
	gens["EmailSubscriptionAdmins"] = gen.PtrOf(gen.Bool())
	gens["Emails"] = gen.SliceOf(gen.AlphaString())
	gens["IsEnabled"] = gen.PtrOf(gen.Bool())
}
