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

import (
	"encoding/json"
	v20201101s "github.com/Azure/azure-service-operator/v2/api/network/v1api20201101/storage"
	v20240301s "github.com/Azure/azure-service-operator/v2/api/network/v1api20240301/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_BgpSettings_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from BgpSettings to BgpSettings via AssignProperties_To_BgpSettings & AssignProperties_From_BgpSettings returns original",
		prop.ForAll(RunPropertyAssignmentTestForBgpSettings, BgpSettingsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForBgpSettings(generators)
	AddRelatedPropertyGeneratorsForBgpSettings(generators)
	bgpSettingsGenerator = gen.Struct(reflect.TypeOf(BgpSettings{}), generators)

	return bgpSettingsGenerator
}

// AddIndependentPropertyGeneratorsForBgpSettings is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBgpSettings(gens map[string]gopter.Gen) {
	gens["Asn"] = gen.PtrOf(gen.UInt32())
	gens["BgpPeeringAddress"] = gen.PtrOf(gen.AlphaString())
	gens["PeerWeight"] = gen.PtrOf(gen.Int())
}

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

func Test_BgpSettings_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from BgpSettings_STATUS to BgpSettings_STATUS via AssignProperties_To_BgpSettings_STATUS & AssignProperties_From_BgpSettings_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForBgpSettings_STATUS, BgpSettings_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual BgpSettings_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 BgpSettings_STATUS instances for property testing - lazily instantiated by BgpSettings_STATUSGenerator()
var bgpSettings_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForBgpSettings_STATUS(generators)
	AddRelatedPropertyGeneratorsForBgpSettings_STATUS(generators)
	bgpSettings_STATUSGenerator = gen.Struct(reflect.TypeOf(BgpSettings_STATUS{}), generators)

	return bgpSettings_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForBgpSettings_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBgpSettings_STATUS(gens map[string]gopter.Gen) {
	gens["Asn"] = gen.PtrOf(gen.UInt32())
	gens["BgpPeeringAddress"] = gen.PtrOf(gen.AlphaString())
	gens["PeerWeight"] = gen.PtrOf(gen.Int())
}

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

func Test_IPConfigurationBgpPeeringAddress_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from IPConfigurationBgpPeeringAddress to IPConfigurationBgpPeeringAddress via AssignProperties_To_IPConfigurationBgpPeeringAddress & AssignProperties_From_IPConfigurationBgpPeeringAddress returns original",
		prop.ForAll(RunPropertyAssignmentTestForIPConfigurationBgpPeeringAddress, IPConfigurationBgpPeeringAddressGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

// IPConfigurationBgpPeeringAddressGenerator returns a generator of IPConfigurationBgpPeeringAddress instances for property testing.
func IPConfigurationBgpPeeringAddressGenerator() gopter.Gen {
	if ipConfigurationBgpPeeringAddressGenerator != nil {
		return ipConfigurationBgpPeeringAddressGenerator
	}

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

	return ipConfigurationBgpPeeringAddressGenerator
}

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

func Test_IPConfigurationBgpPeeringAddress_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from IPConfigurationBgpPeeringAddress_STATUS to IPConfigurationBgpPeeringAddress_STATUS via AssignProperties_To_IPConfigurationBgpPeeringAddress_STATUS & AssignProperties_From_IPConfigurationBgpPeeringAddress_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForIPConfigurationBgpPeeringAddress_STATUS, IPConfigurationBgpPeeringAddress_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual IPConfigurationBgpPeeringAddress_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 IPConfigurationBgpPeeringAddress_STATUS instances for property testing - lazily instantiated by
// IPConfigurationBgpPeeringAddress_STATUSGenerator()
var ipConfigurationBgpPeeringAddress_STATUSGenerator gopter.Gen

// IPConfigurationBgpPeeringAddress_STATUSGenerator returns a generator of IPConfigurationBgpPeeringAddress_STATUS instances for property testing.
func IPConfigurationBgpPeeringAddress_STATUSGenerator() gopter.Gen {
	if ipConfigurationBgpPeeringAddress_STATUSGenerator != nil {
		return ipConfigurationBgpPeeringAddress_STATUSGenerator
	}

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

	return ipConfigurationBgpPeeringAddress_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForIPConfigurationBgpPeeringAddress_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForIPConfigurationBgpPeeringAddress_STATUS(gens map[string]gopter.Gen) {
	gens["CustomBgpIpAddresses"] = gen.SliceOf(gen.AlphaString())
	gens["DefaultBgpIpAddresses"] = gen.SliceOf(gen.AlphaString())
	gens["IpconfigurationId"] = gen.PtrOf(gen.AlphaString())
	gens["TunnelIpAddresses"] = gen.SliceOf(gen.AlphaString())
}

func Test_IpsecPolicy_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from IpsecPolicy to IpsecPolicy via AssignProperties_To_IpsecPolicy & AssignProperties_From_IpsecPolicy returns original",
		prop.ForAll(RunPropertyAssignmentTestForIpsecPolicy, IpsecPolicyGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

// IpsecPolicyGenerator returns a generator of IpsecPolicy instances for property testing.
func IpsecPolicyGenerator() gopter.Gen {
	if ipsecPolicyGenerator != nil {
		return ipsecPolicyGenerator
	}

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

	return ipsecPolicyGenerator
}

// AddIndependentPropertyGeneratorsForIpsecPolicy is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForIpsecPolicy(gens map[string]gopter.Gen) {
	gens["DhGroup"] = gen.PtrOf(gen.OneConstOf(
		DhGroup_DHGroup1,
		DhGroup_DHGroup14,
		DhGroup_DHGroup2,
		DhGroup_DHGroup2048,
		DhGroup_DHGroup24,
		DhGroup_ECP256,
		DhGroup_ECP384,
		DhGroup_None))
	gens["IkeEncryption"] = gen.PtrOf(gen.OneConstOf(
		IkeEncryption_AES128,
		IkeEncryption_AES192,
		IkeEncryption_AES256,
		IkeEncryption_DES,
		IkeEncryption_DES3,
		IkeEncryption_GCMAES128,
		IkeEncryption_GCMAES256))
	gens["IkeIntegrity"] = gen.PtrOf(gen.OneConstOf(
		IkeIntegrity_GCMAES128,
		IkeIntegrity_GCMAES256,
		IkeIntegrity_MD5,
		IkeIntegrity_SHA1,
		IkeIntegrity_SHA256,
		IkeIntegrity_SHA384))
	gens["IpsecEncryption"] = gen.PtrOf(gen.OneConstOf(
		IpsecEncryption_AES128,
		IpsecEncryption_AES192,
		IpsecEncryption_AES256,
		IpsecEncryption_DES,
		IpsecEncryption_DES3,
		IpsecEncryption_GCMAES128,
		IpsecEncryption_GCMAES192,
		IpsecEncryption_GCMAES256,
		IpsecEncryption_None))
	gens["IpsecIntegrity"] = gen.PtrOf(gen.OneConstOf(
		IpsecIntegrity_GCMAES128,
		IpsecIntegrity_GCMAES192,
		IpsecIntegrity_GCMAES256,
		IpsecIntegrity_MD5,
		IpsecIntegrity_SHA1,
		IpsecIntegrity_SHA256))
	gens["PfsGroup"] = gen.PtrOf(gen.OneConstOf(
		PfsGroup_ECP256,
		PfsGroup_ECP384,
		PfsGroup_None,
		PfsGroup_PFS1,
		PfsGroup_PFS14,
		PfsGroup_PFS2,
		PfsGroup_PFS2048,
		PfsGroup_PFS24,
		PfsGroup_PFSMM))
	gens["SaDataSizeKilobytes"] = gen.PtrOf(gen.Int())
	gens["SaLifeTimeSeconds"] = gen.PtrOf(gen.Int())
}

func Test_IpsecPolicy_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from IpsecPolicy_STATUS to IpsecPolicy_STATUS via AssignProperties_To_IpsecPolicy_STATUS & AssignProperties_From_IpsecPolicy_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForIpsecPolicy_STATUS, IpsecPolicy_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual IpsecPolicy_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 IpsecPolicy_STATUS instances for property testing - lazily instantiated by IpsecPolicy_STATUSGenerator()
var ipsecPolicy_STATUSGenerator gopter.Gen

// IpsecPolicy_STATUSGenerator returns a generator of IpsecPolicy_STATUS instances for property testing.
func IpsecPolicy_STATUSGenerator() gopter.Gen {
	if ipsecPolicy_STATUSGenerator != nil {
		return ipsecPolicy_STATUSGenerator
	}

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

	return ipsecPolicy_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForIpsecPolicy_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForIpsecPolicy_STATUS(gens map[string]gopter.Gen) {
	gens["DhGroup"] = gen.PtrOf(gen.OneConstOf(
		DhGroup_STATUS_DHGroup1,
		DhGroup_STATUS_DHGroup14,
		DhGroup_STATUS_DHGroup2,
		DhGroup_STATUS_DHGroup2048,
		DhGroup_STATUS_DHGroup24,
		DhGroup_STATUS_ECP256,
		DhGroup_STATUS_ECP384,
		DhGroup_STATUS_None))
	gens["IkeEncryption"] = gen.PtrOf(gen.OneConstOf(
		IkeEncryption_STATUS_AES128,
		IkeEncryption_STATUS_AES192,
		IkeEncryption_STATUS_AES256,
		IkeEncryption_STATUS_DES,
		IkeEncryption_STATUS_DES3,
		IkeEncryption_STATUS_GCMAES128,
		IkeEncryption_STATUS_GCMAES256))
	gens["IkeIntegrity"] = gen.PtrOf(gen.OneConstOf(
		IkeIntegrity_STATUS_GCMAES128,
		IkeIntegrity_STATUS_GCMAES256,
		IkeIntegrity_STATUS_MD5,
		IkeIntegrity_STATUS_SHA1,
		IkeIntegrity_STATUS_SHA256,
		IkeIntegrity_STATUS_SHA384))
	gens["IpsecEncryption"] = gen.PtrOf(gen.OneConstOf(
		IpsecEncryption_STATUS_AES128,
		IpsecEncryption_STATUS_AES192,
		IpsecEncryption_STATUS_AES256,
		IpsecEncryption_STATUS_DES,
		IpsecEncryption_STATUS_DES3,
		IpsecEncryption_STATUS_GCMAES128,
		IpsecEncryption_STATUS_GCMAES192,
		IpsecEncryption_STATUS_GCMAES256,
		IpsecEncryption_STATUS_None))
	gens["IpsecIntegrity"] = gen.PtrOf(gen.OneConstOf(
		IpsecIntegrity_STATUS_GCMAES128,
		IpsecIntegrity_STATUS_GCMAES192,
		IpsecIntegrity_STATUS_GCMAES256,
		IpsecIntegrity_STATUS_MD5,
		IpsecIntegrity_STATUS_SHA1,
		IpsecIntegrity_STATUS_SHA256))
	gens["PfsGroup"] = gen.PtrOf(gen.OneConstOf(
		PfsGroup_STATUS_ECP256,
		PfsGroup_STATUS_ECP384,
		PfsGroup_STATUS_None,
		PfsGroup_STATUS_PFS1,
		PfsGroup_STATUS_PFS14,
		PfsGroup_STATUS_PFS2,
		PfsGroup_STATUS_PFS2048,
		PfsGroup_STATUS_PFS24,
		PfsGroup_STATUS_PFSMM))
	gens["SaDataSizeKilobytes"] = gen.PtrOf(gen.Int())
	gens["SaLifeTimeSeconds"] = gen.PtrOf(gen.Int())
}

func Test_RadiusServer_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from RadiusServer to RadiusServer via AssignProperties_To_RadiusServer & AssignProperties_From_RadiusServer returns original",
		prop.ForAll(RunPropertyAssignmentTestForRadiusServer, RadiusServerGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

// RadiusServerGenerator returns a generator of RadiusServer instances for property testing.
func RadiusServerGenerator() gopter.Gen {
	if radiusServerGenerator != nil {
		return radiusServerGenerator
	}

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

	return radiusServerGenerator
}

// AddIndependentPropertyGeneratorsForRadiusServer is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForRadiusServer(gens map[string]gopter.Gen) {
	gens["RadiusServerAddress"] = gen.PtrOf(gen.AlphaString())
	gens["RadiusServerScore"] = gen.PtrOf(gen.Int())
	gens["RadiusServerSecret"] = gen.PtrOf(gen.AlphaString())
}

func Test_RadiusServer_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from RadiusServer_STATUS to RadiusServer_STATUS via AssignProperties_To_RadiusServer_STATUS & AssignProperties_From_RadiusServer_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForRadiusServer_STATUS, RadiusServer_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual RadiusServer_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 RadiusServer_STATUS instances for property testing - lazily instantiated by
// RadiusServer_STATUSGenerator()
var radiusServer_STATUSGenerator gopter.Gen

// RadiusServer_STATUSGenerator returns a generator of RadiusServer_STATUS instances for property testing.
func RadiusServer_STATUSGenerator() gopter.Gen {
	if radiusServer_STATUSGenerator != nil {
		return radiusServer_STATUSGenerator
	}

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

	return radiusServer_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForRadiusServer_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForRadiusServer_STATUS(gens map[string]gopter.Gen) {
	gens["RadiusServerAddress"] = gen.PtrOf(gen.AlphaString())
	gens["RadiusServerScore"] = gen.PtrOf(gen.Int())
	gens["RadiusServerSecret"] = gen.PtrOf(gen.AlphaString())
}

func Test_VirtualNetworkGateway_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 VirtualNetworkGateway to hub returns original",
		prop.ForAll(RunResourceConversionTestForVirtualNetworkGateway, VirtualNetworkGatewayGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

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

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

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

// VirtualNetworkGatewayGenerator returns a generator of VirtualNetworkGateway instances for property testing.
func VirtualNetworkGatewayGenerator() gopter.Gen {
	if virtualNetworkGatewayGenerator != nil {
		return virtualNetworkGatewayGenerator
	}

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

	return virtualNetworkGatewayGenerator
}

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

func Test_VirtualNetworkGatewayIPConfiguration_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VirtualNetworkGatewayIPConfiguration to VirtualNetworkGatewayIPConfiguration via AssignProperties_To_VirtualNetworkGatewayIPConfiguration & AssignProperties_From_VirtualNetworkGatewayIPConfiguration returns original",
		prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkGatewayIPConfiguration, VirtualNetworkGatewayIPConfigurationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration(generators)
	AddRelatedPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration(generators)
	virtualNetworkGatewayIPConfigurationGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkGatewayIPConfiguration{}), generators)

	return virtualNetworkGatewayIPConfigurationGenerator
}

// AddIndependentPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration(gens map[string]gopter.Gen) {
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["PrivateIPAllocationMethod"] = gen.PtrOf(gen.OneConstOf(IPAllocationMethod_Dynamic, IPAllocationMethod_Static))
}

// AddRelatedPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration(gens map[string]gopter.Gen) {
	gens["PublicIPAddress"] = gen.PtrOf(SubResourceGenerator())
	gens["Subnet"] = gen.PtrOf(SubResourceGenerator())
}

func Test_VirtualNetworkGatewayIPConfiguration_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VirtualNetworkGatewayIPConfiguration_STATUS to VirtualNetworkGatewayIPConfiguration_STATUS via AssignProperties_To_VirtualNetworkGatewayIPConfiguration_STATUS & AssignProperties_From_VirtualNetworkGatewayIPConfiguration_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkGatewayIPConfiguration_STATUS, VirtualNetworkGatewayIPConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual VirtualNetworkGatewayIPConfiguration_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 VirtualNetworkGatewayIPConfiguration_STATUS instances for property testing - lazily instantiated by
// VirtualNetworkGatewayIPConfiguration_STATUSGenerator()
var virtualNetworkGatewayIPConfiguration_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration_STATUS(generators)
	AddRelatedPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration_STATUS(generators)
	virtualNetworkGatewayIPConfiguration_STATUSGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkGatewayIPConfiguration_STATUS{}), generators)

	return virtualNetworkGatewayIPConfiguration_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["Etag"] = gen.PtrOf(gen.AlphaString())
	gens["Id"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["PrivateIPAddress"] = gen.PtrOf(gen.AlphaString())
	gens["PrivateIPAllocationMethod"] = gen.PtrOf(gen.OneConstOf(IPAllocationMethod_STATUS_Dynamic, IPAllocationMethod_STATUS_Static))
	gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(
		ProvisioningState_STATUS_Deleting,
		ProvisioningState_STATUS_Failed,
		ProvisioningState_STATUS_Succeeded,
		ProvisioningState_STATUS_Updating))
}

// AddRelatedPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForVirtualNetworkGatewayIPConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["PublicIPAddress"] = gen.PtrOf(SubResource_STATUSGenerator())
	gens["Subnet"] = gen.PtrOf(SubResource_STATUSGenerator())
}

func Test_VirtualNetworkGatewayOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VirtualNetworkGatewayOperatorSpec to VirtualNetworkGatewayOperatorSpec via AssignProperties_To_VirtualNetworkGatewayOperatorSpec & AssignProperties_From_VirtualNetworkGatewayOperatorSpec returns original",
		prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkGatewayOperatorSpec, VirtualNetworkGatewayOperatorSpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

// VirtualNetworkGatewayOperatorSpecGenerator returns a generator of VirtualNetworkGatewayOperatorSpec instances for property testing.
func VirtualNetworkGatewayOperatorSpecGenerator() gopter.Gen {
	if virtualNetworkGatewayOperatorSpecGenerator != nil {
		return virtualNetworkGatewayOperatorSpecGenerator
	}

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

	return virtualNetworkGatewayOperatorSpecGenerator
}

func Test_VirtualNetworkGatewaySku_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VirtualNetworkGatewaySku to VirtualNetworkGatewaySku via AssignProperties_To_VirtualNetworkGatewaySku & AssignProperties_From_VirtualNetworkGatewaySku returns original",
		prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkGatewaySku, VirtualNetworkGatewaySkuGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

// VirtualNetworkGatewaySkuGenerator returns a generator of VirtualNetworkGatewaySku instances for property testing.
func VirtualNetworkGatewaySkuGenerator() gopter.Gen {
	if virtualNetworkGatewaySkuGenerator != nil {
		return virtualNetworkGatewaySkuGenerator
	}

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

	return virtualNetworkGatewaySkuGenerator
}

// AddIndependentPropertyGeneratorsForVirtualNetworkGatewaySku is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualNetworkGatewaySku(gens map[string]gopter.Gen) {
	gens["Name"] = gen.PtrOf(gen.OneConstOf(
		VirtualNetworkGatewaySku_Name_Basic,
		VirtualNetworkGatewaySku_Name_ErGw1AZ,
		VirtualNetworkGatewaySku_Name_ErGw2AZ,
		VirtualNetworkGatewaySku_Name_ErGw3AZ,
		VirtualNetworkGatewaySku_Name_HighPerformance,
		VirtualNetworkGatewaySku_Name_Standard,
		VirtualNetworkGatewaySku_Name_UltraPerformance,
		VirtualNetworkGatewaySku_Name_VpnGw1,
		VirtualNetworkGatewaySku_Name_VpnGw1AZ,
		VirtualNetworkGatewaySku_Name_VpnGw2,
		VirtualNetworkGatewaySku_Name_VpnGw2AZ,
		VirtualNetworkGatewaySku_Name_VpnGw3,
		VirtualNetworkGatewaySku_Name_VpnGw3AZ,
		VirtualNetworkGatewaySku_Name_VpnGw4,
		VirtualNetworkGatewaySku_Name_VpnGw4AZ,
		VirtualNetworkGatewaySku_Name_VpnGw5,
		VirtualNetworkGatewaySku_Name_VpnGw5AZ))
	gens["Tier"] = gen.PtrOf(gen.OneConstOf(
		VirtualNetworkGatewaySku_Tier_Basic,
		VirtualNetworkGatewaySku_Tier_ErGw1AZ,
		VirtualNetworkGatewaySku_Tier_ErGw2AZ,
		VirtualNetworkGatewaySku_Tier_ErGw3AZ,
		VirtualNetworkGatewaySku_Tier_HighPerformance,
		VirtualNetworkGatewaySku_Tier_Standard,
		VirtualNetworkGatewaySku_Tier_UltraPerformance,
		VirtualNetworkGatewaySku_Tier_VpnGw1,
		VirtualNetworkGatewaySku_Tier_VpnGw1AZ,
		VirtualNetworkGatewaySku_Tier_VpnGw2,
		VirtualNetworkGatewaySku_Tier_VpnGw2AZ,
		VirtualNetworkGatewaySku_Tier_VpnGw3,
		VirtualNetworkGatewaySku_Tier_VpnGw3AZ,
		VirtualNetworkGatewaySku_Tier_VpnGw4,
		VirtualNetworkGatewaySku_Tier_VpnGw4AZ,
		VirtualNetworkGatewaySku_Tier_VpnGw5,
		VirtualNetworkGatewaySku_Tier_VpnGw5AZ))
}

func Test_VirtualNetworkGatewaySku_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VirtualNetworkGatewaySku_STATUS to VirtualNetworkGatewaySku_STATUS via AssignProperties_To_VirtualNetworkGatewaySku_STATUS & AssignProperties_From_VirtualNetworkGatewaySku_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkGatewaySku_STATUS, VirtualNetworkGatewaySku_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual VirtualNetworkGatewaySku_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 VirtualNetworkGatewaySku_STATUS instances for property testing - lazily instantiated by
// VirtualNetworkGatewaySku_STATUSGenerator()
var virtualNetworkGatewaySku_STATUSGenerator gopter.Gen

// VirtualNetworkGatewaySku_STATUSGenerator returns a generator of VirtualNetworkGatewaySku_STATUS instances for property testing.
func VirtualNetworkGatewaySku_STATUSGenerator() gopter.Gen {
	if virtualNetworkGatewaySku_STATUSGenerator != nil {
		return virtualNetworkGatewaySku_STATUSGenerator
	}

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

	return virtualNetworkGatewaySku_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForVirtualNetworkGatewaySku_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualNetworkGatewaySku_STATUS(gens map[string]gopter.Gen) {
	gens["Capacity"] = gen.PtrOf(gen.Int())
	gens["Name"] = gen.PtrOf(gen.OneConstOf(
		VirtualNetworkGatewaySku_Name_STATUS_Basic,
		VirtualNetworkGatewaySku_Name_STATUS_ErGw1AZ,
		VirtualNetworkGatewaySku_Name_STATUS_ErGw2AZ,
		VirtualNetworkGatewaySku_Name_STATUS_ErGw3AZ,
		VirtualNetworkGatewaySku_Name_STATUS_HighPerformance,
		VirtualNetworkGatewaySku_Name_STATUS_Standard,
		VirtualNetworkGatewaySku_Name_STATUS_UltraPerformance,
		VirtualNetworkGatewaySku_Name_STATUS_VpnGw1,
		VirtualNetworkGatewaySku_Name_STATUS_VpnGw1AZ,
		VirtualNetworkGatewaySku_Name_STATUS_VpnGw2,
		VirtualNetworkGatewaySku_Name_STATUS_VpnGw2AZ,
		VirtualNetworkGatewaySku_Name_STATUS_VpnGw3,
		VirtualNetworkGatewaySku_Name_STATUS_VpnGw3AZ,
		VirtualNetworkGatewaySku_Name_STATUS_VpnGw4,
		VirtualNetworkGatewaySku_Name_STATUS_VpnGw4AZ,
		VirtualNetworkGatewaySku_Name_STATUS_VpnGw5,
		VirtualNetworkGatewaySku_Name_STATUS_VpnGw5AZ))
	gens["Tier"] = gen.PtrOf(gen.OneConstOf(
		VirtualNetworkGatewaySku_Tier_STATUS_Basic,
		VirtualNetworkGatewaySku_Tier_STATUS_ErGw1AZ,
		VirtualNetworkGatewaySku_Tier_STATUS_ErGw2AZ,
		VirtualNetworkGatewaySku_Tier_STATUS_ErGw3AZ,
		VirtualNetworkGatewaySku_Tier_STATUS_HighPerformance,
		VirtualNetworkGatewaySku_Tier_STATUS_Standard,
		VirtualNetworkGatewaySku_Tier_STATUS_UltraPerformance,
		VirtualNetworkGatewaySku_Tier_STATUS_VpnGw1,
		VirtualNetworkGatewaySku_Tier_STATUS_VpnGw1AZ,
		VirtualNetworkGatewaySku_Tier_STATUS_VpnGw2,
		VirtualNetworkGatewaySku_Tier_STATUS_VpnGw2AZ,
		VirtualNetworkGatewaySku_Tier_STATUS_VpnGw3,
		VirtualNetworkGatewaySku_Tier_STATUS_VpnGw3AZ,
		VirtualNetworkGatewaySku_Tier_STATUS_VpnGw4,
		VirtualNetworkGatewaySku_Tier_STATUS_VpnGw4AZ,
		VirtualNetworkGatewaySku_Tier_STATUS_VpnGw5,
		VirtualNetworkGatewaySku_Tier_STATUS_VpnGw5AZ))
}

func Test_VirtualNetworkGateway_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VirtualNetworkGateway_STATUS to VirtualNetworkGateway_STATUS via AssignProperties_To_VirtualNetworkGateway_STATUS & AssignProperties_From_VirtualNetworkGateway_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkGateway_STATUS, VirtualNetworkGateway_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual VirtualNetworkGateway_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 VirtualNetworkGateway_STATUS instances for property testing - lazily instantiated by
// VirtualNetworkGateway_STATUSGenerator()
var virtualNetworkGateway_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualNetworkGateway_STATUS(generators)
	AddRelatedPropertyGeneratorsForVirtualNetworkGateway_STATUS(generators)
	virtualNetworkGateway_STATUSGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkGateway_STATUS{}), generators)

	return virtualNetworkGateway_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForVirtualNetworkGateway_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualNetworkGateway_STATUS(gens map[string]gopter.Gen) {
	gens["ActiveActive"] = gen.PtrOf(gen.Bool())
	gens["EnableBgp"] = gen.PtrOf(gen.Bool())
	gens["EnableDnsForwarding"] = gen.PtrOf(gen.Bool())
	gens["EnablePrivateIpAddress"] = gen.PtrOf(gen.Bool())
	gens["Etag"] = gen.PtrOf(gen.AlphaString())
	gens["GatewayType"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS_ExpressRoute, VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS_LocalGateway, VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS_Vpn))
	gens["Id"] = gen.PtrOf(gen.AlphaString())
	gens["InboundDnsForwardingEndpoint"] = gen.PtrOf(gen.AlphaString())
	gens["Location"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(
		ProvisioningState_STATUS_Deleting,
		ProvisioningState_STATUS_Failed,
		ProvisioningState_STATUS_Succeeded,
		ProvisioningState_STATUS_Updating))
	gens["ResourceGuid"] = gen.PtrOf(gen.AlphaString())
	gens["Tags"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["Type"] = gen.PtrOf(gen.AlphaString())
	gens["VNetExtendedLocationResourceId"] = gen.PtrOf(gen.AlphaString())
	gens["VpnGatewayGeneration"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS_Generation1, VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS_Generation2, VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS_None))
	gens["VpnType"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayPropertiesFormat_VpnType_STATUS_PolicyBased, VirtualNetworkGatewayPropertiesFormat_VpnType_STATUS_RouteBased))
}

// AddRelatedPropertyGeneratorsForVirtualNetworkGateway_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForVirtualNetworkGateway_STATUS(gens map[string]gopter.Gen) {
	gens["BgpSettings"] = gen.PtrOf(BgpSettings_STATUSGenerator())
	gens["CustomRoutes"] = gen.PtrOf(AddressSpace_STATUSGenerator())
	gens["ExtendedLocation"] = gen.PtrOf(ExtendedLocation_STATUSGenerator())
	gens["GatewayDefaultSite"] = gen.PtrOf(SubResource_STATUSGenerator())
	gens["IpConfigurations"] = gen.SliceOf(VirtualNetworkGatewayIPConfiguration_STATUSGenerator())
	gens["Sku"] = gen.PtrOf(VirtualNetworkGatewaySku_STATUSGenerator())
	gens["VpnClientConfiguration"] = gen.PtrOf(VpnClientConfiguration_STATUSGenerator())
}

func Test_VirtualNetworkGateway_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VirtualNetworkGateway_Spec to VirtualNetworkGateway_Spec via AssignProperties_To_VirtualNetworkGateway_Spec & AssignProperties_From_VirtualNetworkGateway_Spec returns original",
		prop.ForAll(RunPropertyAssignmentTestForVirtualNetworkGateway_Spec, VirtualNetworkGateway_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual VirtualNetworkGateway_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 VirtualNetworkGateway_Spec instances for property testing - lazily instantiated by
// VirtualNetworkGateway_SpecGenerator()
var virtualNetworkGateway_SpecGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualNetworkGateway_Spec(generators)
	AddRelatedPropertyGeneratorsForVirtualNetworkGateway_Spec(generators)
	virtualNetworkGateway_SpecGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkGateway_Spec{}), generators)

	return virtualNetworkGateway_SpecGenerator
}

// AddIndependentPropertyGeneratorsForVirtualNetworkGateway_Spec is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualNetworkGateway_Spec(gens map[string]gopter.Gen) {
	gens["ActiveActive"] = gen.PtrOf(gen.Bool())
	gens["AzureName"] = gen.AlphaString()
	gens["EnableBgp"] = gen.PtrOf(gen.Bool())
	gens["EnableDnsForwarding"] = gen.PtrOf(gen.Bool())
	gens["EnablePrivateIpAddress"] = gen.PtrOf(gen.Bool())
	gens["GatewayType"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayPropertiesFormat_GatewayType_ExpressRoute, VirtualNetworkGatewayPropertiesFormat_GatewayType_LocalGateway, VirtualNetworkGatewayPropertiesFormat_GatewayType_Vpn))
	gens["Location"] = gen.PtrOf(gen.AlphaString())
	gens["Tags"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["VpnGatewayGeneration"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_Generation1, VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_Generation2, VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_None))
	gens["VpnType"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayPropertiesFormat_VpnType_PolicyBased, VirtualNetworkGatewayPropertiesFormat_VpnType_RouteBased))
}

// AddRelatedPropertyGeneratorsForVirtualNetworkGateway_Spec is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForVirtualNetworkGateway_Spec(gens map[string]gopter.Gen) {
	gens["BgpSettings"] = gen.PtrOf(BgpSettingsGenerator())
	gens["CustomRoutes"] = gen.PtrOf(AddressSpaceGenerator())
	gens["ExtendedLocation"] = gen.PtrOf(ExtendedLocationGenerator())
	gens["GatewayDefaultSite"] = gen.PtrOf(SubResourceGenerator())
	gens["IpConfigurations"] = gen.SliceOf(VirtualNetworkGatewayIPConfigurationGenerator())
	gens["OperatorSpec"] = gen.PtrOf(VirtualNetworkGatewayOperatorSpecGenerator())
	gens["Sku"] = gen.PtrOf(VirtualNetworkGatewaySkuGenerator())
	gens["VpnClientConfiguration"] = gen.PtrOf(VpnClientConfigurationGenerator())
}

func Test_VpnClientConfiguration_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VpnClientConfiguration to VpnClientConfiguration via AssignProperties_To_VpnClientConfiguration & AssignProperties_From_VpnClientConfiguration returns original",
		prop.ForAll(RunPropertyAssignmentTestForVpnClientConfiguration, VpnClientConfigurationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVpnClientConfiguration(generators)
	AddRelatedPropertyGeneratorsForVpnClientConfiguration(generators)
	vpnClientConfigurationGenerator = gen.Struct(reflect.TypeOf(VpnClientConfiguration{}), generators)

	return vpnClientConfigurationGenerator
}

// AddIndependentPropertyGeneratorsForVpnClientConfiguration is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVpnClientConfiguration(gens map[string]gopter.Gen) {
	gens["AadAudience"] = gen.PtrOf(gen.AlphaString())
	gens["AadIssuer"] = gen.PtrOf(gen.AlphaString())
	gens["AadTenant"] = gen.PtrOf(gen.AlphaString())
	gens["RadiusServerAddress"] = gen.PtrOf(gen.AlphaString())
	gens["RadiusServerSecret"] = gen.PtrOf(gen.AlphaString())
	gens["VpnAuthenticationTypes"] = gen.SliceOf(gen.OneConstOf(VpnClientConfiguration_VpnAuthenticationTypes_AAD, VpnClientConfiguration_VpnAuthenticationTypes_Certificate, VpnClientConfiguration_VpnAuthenticationTypes_Radius))
	gens["VpnClientProtocols"] = gen.SliceOf(gen.OneConstOf(VpnClientConfiguration_VpnClientProtocols_IkeV2, VpnClientConfiguration_VpnClientProtocols_OpenVPN, VpnClientConfiguration_VpnClientProtocols_SSTP))
}

// AddRelatedPropertyGeneratorsForVpnClientConfiguration is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForVpnClientConfiguration(gens map[string]gopter.Gen) {
	gens["RadiusServers"] = gen.SliceOf(RadiusServerGenerator())
	gens["VpnClientAddressPool"] = gen.PtrOf(AddressSpaceGenerator())
	gens["VpnClientIpsecPolicies"] = gen.SliceOf(IpsecPolicyGenerator())
	gens["VpnClientRevokedCertificates"] = gen.SliceOf(VpnClientRevokedCertificateGenerator())
	gens["VpnClientRootCertificates"] = gen.SliceOf(VpnClientRootCertificateGenerator())
}

func Test_VpnClientConfiguration_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VpnClientConfiguration_STATUS to VpnClientConfiguration_STATUS via AssignProperties_To_VpnClientConfiguration_STATUS & AssignProperties_From_VpnClientConfiguration_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForVpnClientConfiguration_STATUS, VpnClientConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual VpnClientConfiguration_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 VpnClientConfiguration_STATUS instances for property testing - lazily instantiated by
// VpnClientConfiguration_STATUSGenerator()
var vpnClientConfiguration_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVpnClientConfiguration_STATUS(generators)
	AddRelatedPropertyGeneratorsForVpnClientConfiguration_STATUS(generators)
	vpnClientConfiguration_STATUSGenerator = gen.Struct(reflect.TypeOf(VpnClientConfiguration_STATUS{}), generators)

	return vpnClientConfiguration_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForVpnClientConfiguration_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVpnClientConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["AadAudience"] = gen.PtrOf(gen.AlphaString())
	gens["AadIssuer"] = gen.PtrOf(gen.AlphaString())
	gens["AadTenant"] = gen.PtrOf(gen.AlphaString())
	gens["RadiusServerAddress"] = gen.PtrOf(gen.AlphaString())
	gens["RadiusServerSecret"] = gen.PtrOf(gen.AlphaString())
	gens["VpnAuthenticationTypes"] = gen.SliceOf(gen.OneConstOf(VpnClientConfiguration_VpnAuthenticationTypes_STATUS_AAD, VpnClientConfiguration_VpnAuthenticationTypes_STATUS_Certificate, VpnClientConfiguration_VpnAuthenticationTypes_STATUS_Radius))
	gens["VpnClientProtocols"] = gen.SliceOf(gen.OneConstOf(VpnClientConfiguration_VpnClientProtocols_STATUS_IkeV2, VpnClientConfiguration_VpnClientProtocols_STATUS_OpenVPN, VpnClientConfiguration_VpnClientProtocols_STATUS_SSTP))
}

// AddRelatedPropertyGeneratorsForVpnClientConfiguration_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForVpnClientConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["RadiusServers"] = gen.SliceOf(RadiusServer_STATUSGenerator())
	gens["VpnClientAddressPool"] = gen.PtrOf(AddressSpace_STATUSGenerator())
	gens["VpnClientIpsecPolicies"] = gen.SliceOf(IpsecPolicy_STATUSGenerator())
	gens["VpnClientRevokedCertificates"] = gen.SliceOf(VpnClientRevokedCertificate_STATUSGenerator())
	gens["VpnClientRootCertificates"] = gen.SliceOf(VpnClientRootCertificate_STATUSGenerator())
}

func Test_VpnClientRevokedCertificate_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VpnClientRevokedCertificate to VpnClientRevokedCertificate via AssignProperties_To_VpnClientRevokedCertificate & AssignProperties_From_VpnClientRevokedCertificate returns original",
		prop.ForAll(RunPropertyAssignmentTestForVpnClientRevokedCertificate, VpnClientRevokedCertificateGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

// VpnClientRevokedCertificateGenerator returns a generator of VpnClientRevokedCertificate instances for property testing.
func VpnClientRevokedCertificateGenerator() gopter.Gen {
	if vpnClientRevokedCertificateGenerator != nil {
		return vpnClientRevokedCertificateGenerator
	}

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

	return vpnClientRevokedCertificateGenerator
}

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

func Test_VpnClientRevokedCertificate_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VpnClientRevokedCertificate_STATUS to VpnClientRevokedCertificate_STATUS via AssignProperties_To_VpnClientRevokedCertificate_STATUS & AssignProperties_From_VpnClientRevokedCertificate_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForVpnClientRevokedCertificate_STATUS, VpnClientRevokedCertificate_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual VpnClientRevokedCertificate_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 VpnClientRevokedCertificate_STATUS instances for property testing - lazily instantiated by
// VpnClientRevokedCertificate_STATUSGenerator()
var vpnClientRevokedCertificate_STATUSGenerator gopter.Gen

// VpnClientRevokedCertificate_STATUSGenerator returns a generator of VpnClientRevokedCertificate_STATUS instances for property testing.
func VpnClientRevokedCertificate_STATUSGenerator() gopter.Gen {
	if vpnClientRevokedCertificate_STATUSGenerator != nil {
		return vpnClientRevokedCertificate_STATUSGenerator
	}

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

	return vpnClientRevokedCertificate_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForVpnClientRevokedCertificate_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVpnClientRevokedCertificate_STATUS(gens map[string]gopter.Gen) {
	gens["Etag"] = gen.PtrOf(gen.AlphaString())
	gens["Id"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(
		ProvisioningState_STATUS_Deleting,
		ProvisioningState_STATUS_Failed,
		ProvisioningState_STATUS_Succeeded,
		ProvisioningState_STATUS_Updating))
	gens["Thumbprint"] = gen.PtrOf(gen.AlphaString())
}

func Test_VpnClientRootCertificate_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VpnClientRootCertificate to VpnClientRootCertificate via AssignProperties_To_VpnClientRootCertificate & AssignProperties_From_VpnClientRootCertificate returns original",
		prop.ForAll(RunPropertyAssignmentTestForVpnClientRootCertificate, VpnClientRootCertificateGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

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

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

// VpnClientRootCertificateGenerator returns a generator of VpnClientRootCertificate instances for property testing.
func VpnClientRootCertificateGenerator() gopter.Gen {
	if vpnClientRootCertificateGenerator != nil {
		return vpnClientRootCertificateGenerator
	}

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

	return vpnClientRootCertificateGenerator
}

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

func Test_VpnClientRootCertificate_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from VpnClientRootCertificate_STATUS to VpnClientRootCertificate_STATUS via AssignProperties_To_VpnClientRootCertificate_STATUS & AssignProperties_From_VpnClientRootCertificate_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForVpnClientRootCertificate_STATUS, VpnClientRootCertificate_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

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

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

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

	// Deserialize back into memory
	var actual VpnClientRootCertificate_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 VpnClientRootCertificate_STATUS instances for property testing - lazily instantiated by
// VpnClientRootCertificate_STATUSGenerator()
var vpnClientRootCertificate_STATUSGenerator gopter.Gen

// VpnClientRootCertificate_STATUSGenerator returns a generator of VpnClientRootCertificate_STATUS instances for property testing.
func VpnClientRootCertificate_STATUSGenerator() gopter.Gen {
	if vpnClientRootCertificate_STATUSGenerator != nil {
		return vpnClientRootCertificate_STATUSGenerator
	}

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

	return vpnClientRootCertificate_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForVpnClientRootCertificate_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVpnClientRootCertificate_STATUS(gens map[string]gopter.Gen) {
	gens["Etag"] = gen.PtrOf(gen.AlphaString())
	gens["Id"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(
		ProvisioningState_STATUS_Deleting,
		ProvisioningState_STATUS_Failed,
		ProvisioningState_STATUS_Succeeded,
		ProvisioningState_STATUS_Updating))
	gens["PublicCertData"] = gen.PtrOf(gen.AlphaString())
}
