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

import (
	"encoding/json"
	"github.com/google/go-cmp/cmp"
	"github.com/google/go-cmp/cmp/cmpopts"
	"github.com/kr/pretty"
	"github.com/kylelemons/godebug/diff"
	"github.com/leanovate/gopter"
	"github.com/leanovate/gopter/gen"
	"github.com/leanovate/gopter/prop"
	"os"
	"reflect"
	"testing"
)

func Test_AddressSpace_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 AddressSpace via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAddressSpace, AddressSpaceGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// AddressSpaceGenerator returns a generator of AddressSpace instances for property testing.
func AddressSpaceGenerator() gopter.Gen {
	if addressSpaceGenerator != nil {
		return addressSpaceGenerator
	}

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

	return addressSpaceGenerator
}

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

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_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_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_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_VirtualNetworkGatewayAutoScaleBounds_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 VirtualNetworkGatewayAutoScaleBounds via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualNetworkGatewayAutoScaleBounds, VirtualNetworkGatewayAutoScaleBoundsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// VirtualNetworkGatewayAutoScaleBoundsGenerator returns a generator of VirtualNetworkGatewayAutoScaleBounds instances for property testing.
func VirtualNetworkGatewayAutoScaleBoundsGenerator() gopter.Gen {
	if virtualNetworkGatewayAutoScaleBoundsGenerator != nil {
		return virtualNetworkGatewayAutoScaleBoundsGenerator
	}

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

	return virtualNetworkGatewayAutoScaleBoundsGenerator
}

// AddIndependentPropertyGeneratorsForVirtualNetworkGatewayAutoScaleBounds is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualNetworkGatewayAutoScaleBounds(gens map[string]gopter.Gen) {
	gens["Max"] = gen.PtrOf(gen.Int())
	gens["Min"] = gen.PtrOf(gen.Int())
}

func Test_VirtualNetworkGatewayAutoScaleConfiguration_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 VirtualNetworkGatewayAutoScaleConfiguration via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualNetworkGatewayAutoScaleConfiguration, VirtualNetworkGatewayAutoScaleConfigurationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// VirtualNetworkGatewayAutoScaleConfigurationGenerator returns a generator of VirtualNetworkGatewayAutoScaleConfiguration instances for property testing.
func VirtualNetworkGatewayAutoScaleConfigurationGenerator() gopter.Gen {
	if virtualNetworkGatewayAutoScaleConfigurationGenerator != nil {
		return virtualNetworkGatewayAutoScaleConfigurationGenerator
	}

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

	return virtualNetworkGatewayAutoScaleConfigurationGenerator
}

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

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())
}

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

func Test_VirtualNetworkGatewayIPConfigurationPropertiesFormat_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 VirtualNetworkGatewayIPConfigurationPropertiesFormat via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualNetworkGatewayIPConfigurationPropertiesFormat, VirtualNetworkGatewayIPConfigurationPropertiesFormatGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualNetworkGatewayIPConfigurationPropertiesFormat(generators)
	AddRelatedPropertyGeneratorsForVirtualNetworkGatewayIPConfigurationPropertiesFormat(generators)
	virtualNetworkGatewayIPConfigurationPropertiesFormatGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkGatewayIPConfigurationPropertiesFormat{}), generators)

	return virtualNetworkGatewayIPConfigurationPropertiesFormatGenerator
}

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

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

func Test_VirtualNetworkGatewayNatRule_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 VirtualNetworkGatewayNatRule via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualNetworkGatewayNatRule, VirtualNetworkGatewayNatRuleGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualNetworkGatewayNatRule(generators)
	AddRelatedPropertyGeneratorsForVirtualNetworkGatewayNatRule(generators)
	virtualNetworkGatewayNatRuleGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkGatewayNatRule{}), generators)

	return virtualNetworkGatewayNatRuleGenerator
}

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

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

func Test_VirtualNetworkGatewayNatRuleProperties_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 VirtualNetworkGatewayNatRuleProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualNetworkGatewayNatRuleProperties, VirtualNetworkGatewayNatRulePropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualNetworkGatewayNatRuleProperties(generators)
	AddRelatedPropertyGeneratorsForVirtualNetworkGatewayNatRuleProperties(generators)
	virtualNetworkGatewayNatRulePropertiesGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkGatewayNatRuleProperties{}), generators)

	return virtualNetworkGatewayNatRulePropertiesGenerator
}

// AddIndependentPropertyGeneratorsForVirtualNetworkGatewayNatRuleProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualNetworkGatewayNatRuleProperties(gens map[string]gopter.Gen) {
	gens["IpConfigurationId"] = gen.PtrOf(gen.AlphaString())
	gens["Mode"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayNatRuleProperties_Mode_EgressSnat, VirtualNetworkGatewayNatRuleProperties_Mode_IngressSnat))
	gens["Type"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayNatRuleProperties_Type_Dynamic, VirtualNetworkGatewayNatRuleProperties_Type_Static))
}

// AddRelatedPropertyGeneratorsForVirtualNetworkGatewayNatRuleProperties is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForVirtualNetworkGatewayNatRuleProperties(gens map[string]gopter.Gen) {
	gens["ExternalMappings"] = gen.SliceOf(VpnNatRuleMappingGenerator())
	gens["InternalMappings"] = gen.SliceOf(VpnNatRuleMappingGenerator())
}

func Test_VirtualNetworkGatewayPolicyGroup_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 VirtualNetworkGatewayPolicyGroup via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualNetworkGatewayPolicyGroup, VirtualNetworkGatewayPolicyGroupGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualNetworkGatewayPolicyGroup(generators)
	AddRelatedPropertyGeneratorsForVirtualNetworkGatewayPolicyGroup(generators)
	virtualNetworkGatewayPolicyGroupGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkGatewayPolicyGroup{}), generators)

	return virtualNetworkGatewayPolicyGroupGenerator
}

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

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

func Test_VirtualNetworkGatewayPolicyGroupMember_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 VirtualNetworkGatewayPolicyGroupMember via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualNetworkGatewayPolicyGroupMember, VirtualNetworkGatewayPolicyGroupMemberGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// VirtualNetworkGatewayPolicyGroupMemberGenerator returns a generator of VirtualNetworkGatewayPolicyGroupMember instances for property testing.
func VirtualNetworkGatewayPolicyGroupMemberGenerator() gopter.Gen {
	if virtualNetworkGatewayPolicyGroupMemberGenerator != nil {
		return virtualNetworkGatewayPolicyGroupMemberGenerator
	}

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

	return virtualNetworkGatewayPolicyGroupMemberGenerator
}

// AddIndependentPropertyGeneratorsForVirtualNetworkGatewayPolicyGroupMember is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualNetworkGatewayPolicyGroupMember(gens map[string]gopter.Gen) {
	gens["AttributeType"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayPolicyGroupMember_AttributeType_AADGroupId, VirtualNetworkGatewayPolicyGroupMember_AttributeType_CertificateGroupId, VirtualNetworkGatewayPolicyGroupMember_AttributeType_RadiusAzureGroupId))
	gens["AttributeValue"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
}

func Test_VirtualNetworkGatewayPolicyGroupProperties_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 VirtualNetworkGatewayPolicyGroupProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualNetworkGatewayPolicyGroupProperties, VirtualNetworkGatewayPolicyGroupPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualNetworkGatewayPolicyGroupProperties(generators)
	AddRelatedPropertyGeneratorsForVirtualNetworkGatewayPolicyGroupProperties(generators)
	virtualNetworkGatewayPolicyGroupPropertiesGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkGatewayPolicyGroupProperties{}), generators)

	return virtualNetworkGatewayPolicyGroupPropertiesGenerator
}

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

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

func Test_VirtualNetworkGatewayPropertiesFormat_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 VirtualNetworkGatewayPropertiesFormat via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualNetworkGatewayPropertiesFormat, VirtualNetworkGatewayPropertiesFormatGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualNetworkGatewayPropertiesFormat(generators)
	AddRelatedPropertyGeneratorsForVirtualNetworkGatewayPropertiesFormat(generators)
	virtualNetworkGatewayPropertiesFormatGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkGatewayPropertiesFormat{}), generators)

	return virtualNetworkGatewayPropertiesFormatGenerator
}

// AddIndependentPropertyGeneratorsForVirtualNetworkGatewayPropertiesFormat is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualNetworkGatewayPropertiesFormat(gens map[string]gopter.Gen) {
	gens["ActiveActive"] = gen.PtrOf(gen.Bool())
	gens["AdminState"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayPropertiesFormat_AdminState_Disabled, VirtualNetworkGatewayPropertiesFormat_AdminState_Enabled))
	gens["AllowRemoteVnetTraffic"] = gen.PtrOf(gen.Bool())
	gens["AllowVirtualWanTraffic"] = gen.PtrOf(gen.Bool())
	gens["DisableIPSecReplayProtection"] = gen.PtrOf(gen.Bool())
	gens["EnableBgp"] = gen.PtrOf(gen.Bool())
	gens["EnableBgpRouteTranslationForNat"] = 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["ResiliencyModel"] = gen.PtrOf(gen.OneConstOf(VirtualNetworkGatewayPropertiesFormat_ResiliencyModel_MultiHomed, VirtualNetworkGatewayPropertiesFormat_ResiliencyModel_SingleHomed))
	gens["VNetExtendedLocationResourceId"] = gen.PtrOf(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))
}

// AddRelatedPropertyGeneratorsForVirtualNetworkGatewayPropertiesFormat is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForVirtualNetworkGatewayPropertiesFormat(gens map[string]gopter.Gen) {
	gens["AutoScaleConfiguration"] = gen.PtrOf(VirtualNetworkGatewayAutoScaleConfigurationGenerator())
	gens["BgpSettings"] = gen.PtrOf(BgpSettingsGenerator())
	gens["CustomRoutes"] = gen.PtrOf(AddressSpaceGenerator())
	gens["GatewayDefaultSite"] = gen.PtrOf(SubResourceGenerator())
	gens["IpConfigurations"] = gen.SliceOf(VirtualNetworkGatewayIPConfigurationGenerator())
	gens["NatRules"] = gen.SliceOf(VirtualNetworkGatewayNatRuleGenerator())
	gens["Sku"] = gen.PtrOf(VirtualNetworkGatewaySkuGenerator())
	gens["VirtualNetworkGatewayPolicyGroups"] = gen.SliceOf(VirtualNetworkGatewayPolicyGroupGenerator())
	gens["VpnClientConfiguration"] = gen.PtrOf(VpnClientConfigurationGenerator())
}

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_ErGwScale,
		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_ErGwScale,
		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_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["Location"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.AlphaString()
	gens["Tags"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForVirtualNetworkGateway_Spec is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForVirtualNetworkGateway_Spec(gens map[string]gopter.Gen) {
	gens["ExtendedLocation"] = gen.PtrOf(ExtendedLocationGenerator())
	gens["Identity"] = gen.PtrOf(ManagedServiceIdentityGenerator())
	gens["Properties"] = gen.PtrOf(VirtualNetworkGatewayPropertiesFormatGenerator())
}

func Test_VngClientConnectionConfiguration_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 VngClientConnectionConfiguration via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVngClientConnectionConfiguration, VngClientConnectionConfigurationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// VngClientConnectionConfigurationGenerator returns a generator of VngClientConnectionConfiguration instances for property testing.
func VngClientConnectionConfigurationGenerator() gopter.Gen {
	if vngClientConnectionConfigurationGenerator != nil {
		return vngClientConnectionConfigurationGenerator
	}

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

	return vngClientConnectionConfigurationGenerator
}

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

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["VngClientConnectionConfigurations"] = gen.SliceOf(VngClientConnectionConfigurationGenerator())
	gens["VpnClientAddressPool"] = gen.PtrOf(AddressSpaceGenerator())
	gens["VpnClientIpsecPolicies"] = gen.SliceOf(IpsecPolicyGenerator())
	gens["VpnClientRevokedCertificates"] = gen.SliceOf(VpnClientRevokedCertificateGenerator())
	gens["VpnClientRootCertificates"] = gen.SliceOf(VpnClientRootCertificateGenerator())
}

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.
// We first initialize vpnClientRevokedCertificateGenerator 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 VpnClientRevokedCertificateGenerator() gopter.Gen {
	if vpnClientRevokedCertificateGenerator != nil {
		return vpnClientRevokedCertificateGenerator
	}

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVpnClientRevokedCertificate(generators)
	AddRelatedPropertyGeneratorsForVpnClientRevokedCertificate(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())
}

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

func Test_VpnClientRevokedCertificatePropertiesFormat_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 VpnClientRevokedCertificatePropertiesFormat via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVpnClientRevokedCertificatePropertiesFormat, VpnClientRevokedCertificatePropertiesFormatGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// VpnClientRevokedCertificatePropertiesFormatGenerator returns a generator of VpnClientRevokedCertificatePropertiesFormat instances for property testing.
func VpnClientRevokedCertificatePropertiesFormatGenerator() gopter.Gen {
	if vpnClientRevokedCertificatePropertiesFormatGenerator != nil {
		return vpnClientRevokedCertificatePropertiesFormatGenerator
	}

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

	return vpnClientRevokedCertificatePropertiesFormatGenerator
}

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

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.
// We first initialize vpnClientRootCertificateGenerator 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 VpnClientRootCertificateGenerator() gopter.Gen {
	if vpnClientRootCertificateGenerator != nil {
		return vpnClientRootCertificateGenerator
	}

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVpnClientRootCertificate(generators)
	AddRelatedPropertyGeneratorsForVpnClientRootCertificate(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())
}

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

func Test_VpnClientRootCertificatePropertiesFormat_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 VpnClientRootCertificatePropertiesFormat via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVpnClientRootCertificatePropertiesFormat, VpnClientRootCertificatePropertiesFormatGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// VpnClientRootCertificatePropertiesFormatGenerator returns a generator of VpnClientRootCertificatePropertiesFormat instances for property testing.
func VpnClientRootCertificatePropertiesFormatGenerator() gopter.Gen {
	if vpnClientRootCertificatePropertiesFormatGenerator != nil {
		return vpnClientRootCertificatePropertiesFormatGenerator
	}

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

	return vpnClientRootCertificatePropertiesFormatGenerator
}

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

func Test_VpnNatRuleMapping_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 VpnNatRuleMapping via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVpnNatRuleMapping, VpnNatRuleMappingGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// VpnNatRuleMappingGenerator returns a generator of VpnNatRuleMapping instances for property testing.
func VpnNatRuleMappingGenerator() gopter.Gen {
	if vpnNatRuleMappingGenerator != nil {
		return vpnNatRuleMappingGenerator
	}

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

	return vpnNatRuleMappingGenerator
}

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