// 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_ApiDefinitionInfo_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 ApiDefinitionInfo via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForApiDefinitionInfo, ApiDefinitionInfoGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// ApiDefinitionInfoGenerator returns a generator of ApiDefinitionInfo instances for property testing.
func ApiDefinitionInfoGenerator() gopter.Gen {
	if apiDefinitionInfoGenerator != nil {
		return apiDefinitionInfoGenerator
	}

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

	return apiDefinitionInfoGenerator
}

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

func Test_ApiManagementConfig_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 ApiManagementConfig via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForApiManagementConfig, ApiManagementConfigGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// ApiManagementConfigGenerator returns a generator of ApiManagementConfig instances for property testing.
func ApiManagementConfigGenerator() gopter.Gen {
	if apiManagementConfigGenerator != nil {
		return apiManagementConfigGenerator
	}

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

	return apiManagementConfigGenerator
}

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

func Test_AutoHealActions_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 AutoHealActions via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAutoHealActions, AutoHealActionsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForAutoHealActions(generators)
	AddRelatedPropertyGeneratorsForAutoHealActions(generators)
	autoHealActionsGenerator = gen.Struct(reflect.TypeOf(AutoHealActions{}), generators)

	return autoHealActionsGenerator
}

// AddIndependentPropertyGeneratorsForAutoHealActions is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForAutoHealActions(gens map[string]gopter.Gen) {
	gens["ActionType"] = gen.PtrOf(gen.OneConstOf(AutoHealActions_ActionType_CustomAction, AutoHealActions_ActionType_LogEvent, AutoHealActions_ActionType_Recycle))
	gens["MinProcessExecutionTime"] = gen.PtrOf(gen.AlphaString())
}

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

func Test_AutoHealCustomAction_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 AutoHealCustomAction via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAutoHealCustomAction, AutoHealCustomActionGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// AutoHealCustomActionGenerator returns a generator of AutoHealCustomAction instances for property testing.
func AutoHealCustomActionGenerator() gopter.Gen {
	if autoHealCustomActionGenerator != nil {
		return autoHealCustomActionGenerator
	}

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

	return autoHealCustomActionGenerator
}

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

func Test_AutoHealRules_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 AutoHealRules via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAutoHealRules, AutoHealRulesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// AutoHealRulesGenerator returns a generator of AutoHealRules instances for property testing.
func AutoHealRulesGenerator() gopter.Gen {
	if autoHealRulesGenerator != nil {
		return autoHealRulesGenerator
	}

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

	return autoHealRulesGenerator
}

// AddRelatedPropertyGeneratorsForAutoHealRules is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForAutoHealRules(gens map[string]gopter.Gen) {
	gens["Actions"] = gen.PtrOf(AutoHealActionsGenerator())
	gens["Triggers"] = gen.PtrOf(AutoHealTriggersGenerator())
}

func Test_AutoHealTriggers_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 AutoHealTriggers via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAutoHealTriggers, AutoHealTriggersGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForAutoHealTriggers(generators)
	AddRelatedPropertyGeneratorsForAutoHealTriggers(generators)
	autoHealTriggersGenerator = gen.Struct(reflect.TypeOf(AutoHealTriggers{}), generators)

	return autoHealTriggersGenerator
}

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

// AddRelatedPropertyGeneratorsForAutoHealTriggers is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForAutoHealTriggers(gens map[string]gopter.Gen) {
	gens["Requests"] = gen.PtrOf(RequestsBasedTriggerGenerator())
	gens["SlowRequests"] = gen.PtrOf(SlowRequestsBasedTriggerGenerator())
	gens["SlowRequestsWithPath"] = gen.SliceOf(SlowRequestsBasedTriggerGenerator())
	gens["StatusCodes"] = gen.SliceOf(StatusCodesBasedTriggerGenerator())
	gens["StatusCodesRange"] = gen.SliceOf(StatusCodesRangeBasedTriggerGenerator())
}

func Test_AzureStorageInfoValue_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 AzureStorageInfoValue via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAzureStorageInfoValue, AzureStorageInfoValueGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// AzureStorageInfoValueGenerator returns a generator of AzureStorageInfoValue instances for property testing.
func AzureStorageInfoValueGenerator() gopter.Gen {
	if azureStorageInfoValueGenerator != nil {
		return azureStorageInfoValueGenerator
	}

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

	return azureStorageInfoValueGenerator
}

// AddIndependentPropertyGeneratorsForAzureStorageInfoValue is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForAzureStorageInfoValue(gens map[string]gopter.Gen) {
	gens["AccessKey"] = gen.PtrOf(gen.AlphaString())
	gens["AccountName"] = gen.PtrOf(gen.AlphaString())
	gens["MountPath"] = gen.PtrOf(gen.AlphaString())
	gens["ShareName"] = gen.PtrOf(gen.AlphaString())
	gens["Type"] = gen.PtrOf(gen.OneConstOf(AzureStorageInfoValue_Type_AzureBlob, AzureStorageInfoValue_Type_AzureFiles))
}

func Test_CloningInfo_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 CloningInfo via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCloningInfo, CloningInfoGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// CloningInfoGenerator returns a generator of CloningInfo instances for property testing.
func CloningInfoGenerator() gopter.Gen {
	if cloningInfoGenerator != nil {
		return cloningInfoGenerator
	}

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

	return cloningInfoGenerator
}

// AddIndependentPropertyGeneratorsForCloningInfo is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForCloningInfo(gens map[string]gopter.Gen) {
	gens["AppSettingsOverrides"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["CloneCustomHostNames"] = gen.PtrOf(gen.Bool())
	gens["CloneSourceControl"] = gen.PtrOf(gen.Bool())
	gens["ConfigureLoadBalancing"] = gen.PtrOf(gen.Bool())
	gens["CorrelationId"] = gen.PtrOf(gen.AlphaString())
	gens["HostingEnvironment"] = gen.PtrOf(gen.AlphaString())
	gens["Overwrite"] = gen.PtrOf(gen.Bool())
	gens["SourceWebAppId"] = gen.PtrOf(gen.AlphaString())
	gens["SourceWebAppLocation"] = gen.PtrOf(gen.AlphaString())
	gens["TrafficManagerProfileId"] = gen.PtrOf(gen.AlphaString())
	gens["TrafficManagerProfileName"] = gen.PtrOf(gen.AlphaString())
}

func Test_ConnStringInfo_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 ConnStringInfo via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForConnStringInfo, ConnStringInfoGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// ConnStringInfoGenerator returns a generator of ConnStringInfo instances for property testing.
func ConnStringInfoGenerator() gopter.Gen {
	if connStringInfoGenerator != nil {
		return connStringInfoGenerator
	}

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

	return connStringInfoGenerator
}

// AddIndependentPropertyGeneratorsForConnStringInfo is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForConnStringInfo(gens map[string]gopter.Gen) {
	gens["ConnectionString"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["Type"] = gen.PtrOf(gen.OneConstOf(
		ConnStringInfo_Type_ApiHub,
		ConnStringInfo_Type_Custom,
		ConnStringInfo_Type_DocDb,
		ConnStringInfo_Type_EventHub,
		ConnStringInfo_Type_MySql,
		ConnStringInfo_Type_NotificationHub,
		ConnStringInfo_Type_PostgreSQL,
		ConnStringInfo_Type_RedisCache,
		ConnStringInfo_Type_SQLAzure,
		ConnStringInfo_Type_SQLServer,
		ConnStringInfo_Type_ServiceBus))
}

func Test_CorsSettings_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 CorsSettings via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCorsSettings, CorsSettingsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// CorsSettingsGenerator returns a generator of CorsSettings instances for property testing.
func CorsSettingsGenerator() gopter.Gen {
	if corsSettingsGenerator != nil {
		return corsSettingsGenerator
	}

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

	return corsSettingsGenerator
}

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

func Test_Experiments_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 Experiments via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForExperiments, ExperimentsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// ExperimentsGenerator returns a generator of Experiments instances for property testing.
func ExperimentsGenerator() gopter.Gen {
	if experimentsGenerator != nil {
		return experimentsGenerator
	}

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

	return experimentsGenerator
}

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

func Test_HandlerMapping_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 HandlerMapping via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForHandlerMapping, HandlerMappingGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// HandlerMappingGenerator returns a generator of HandlerMapping instances for property testing.
func HandlerMappingGenerator() gopter.Gen {
	if handlerMappingGenerator != nil {
		return handlerMappingGenerator
	}

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

	return handlerMappingGenerator
}

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

func Test_HostNameSslState_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 HostNameSslState via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForHostNameSslState, HostNameSslStateGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// HostNameSslStateGenerator returns a generator of HostNameSslState instances for property testing.
func HostNameSslStateGenerator() gopter.Gen {
	if hostNameSslStateGenerator != nil {
		return hostNameSslStateGenerator
	}

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

	return hostNameSslStateGenerator
}

// AddIndependentPropertyGeneratorsForHostNameSslState is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForHostNameSslState(gens map[string]gopter.Gen) {
	gens["HostType"] = gen.PtrOf(gen.OneConstOf(HostNameSslState_HostType_Repository, HostNameSslState_HostType_Standard))
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["SslState"] = gen.PtrOf(gen.OneConstOf(HostNameSslState_SslState_Disabled, HostNameSslState_SslState_IpBasedEnabled, HostNameSslState_SslState_SniEnabled))
	gens["Thumbprint"] = gen.PtrOf(gen.AlphaString())
	gens["ToUpdate"] = gen.PtrOf(gen.Bool())
	gens["VirtualIP"] = gen.PtrOf(gen.AlphaString())
}

func Test_IpSecurityRestriction_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 IpSecurityRestriction via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForIpSecurityRestriction, IpSecurityRestrictionGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// IpSecurityRestrictionGenerator returns a generator of IpSecurityRestriction instances for property testing.
func IpSecurityRestrictionGenerator() gopter.Gen {
	if ipSecurityRestrictionGenerator != nil {
		return ipSecurityRestrictionGenerator
	}

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

	return ipSecurityRestrictionGenerator
}

// AddIndependentPropertyGeneratorsForIpSecurityRestriction is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForIpSecurityRestriction(gens map[string]gopter.Gen) {
	gens["Action"] = gen.PtrOf(gen.AlphaString())
	gens["Description"] = gen.PtrOf(gen.AlphaString())
	gens["Headers"] = gen.MapOf(
		gen.AlphaString(),
		gen.SliceOf(gen.AlphaString()))
	gens["IpAddress"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["Priority"] = gen.PtrOf(gen.Int())
	gens["SubnetMask"] = gen.PtrOf(gen.AlphaString())
	gens["SubnetTrafficTag"] = gen.PtrOf(gen.Int())
	gens["Tag"] = gen.PtrOf(gen.OneConstOf(IpSecurityRestriction_Tag_Default, IpSecurityRestriction_Tag_ServiceTag, IpSecurityRestriction_Tag_XffProxy))
	gens["VnetSubnetResourceId"] = gen.PtrOf(gen.AlphaString())
	gens["VnetTrafficTag"] = gen.PtrOf(gen.Int())
}

func Test_ManagedServiceIdentity_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 ManagedServiceIdentity via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagedServiceIdentity, ManagedServiceIdentityGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForManagedServiceIdentity(generators)
	AddRelatedPropertyGeneratorsForManagedServiceIdentity(generators)
	managedServiceIdentityGenerator = gen.Struct(reflect.TypeOf(ManagedServiceIdentity{}), generators)

	return managedServiceIdentityGenerator
}

// AddIndependentPropertyGeneratorsForManagedServiceIdentity is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForManagedServiceIdentity(gens map[string]gopter.Gen) {
	gens["Type"] = gen.PtrOf(gen.OneConstOf(
		ManagedServiceIdentity_Type_None,
		ManagedServiceIdentity_Type_SystemAssigned,
		ManagedServiceIdentity_Type_SystemAssignedUserAssigned,
		ManagedServiceIdentity_Type_UserAssigned))
}

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

func Test_NameValuePair_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 NameValuePair via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForNameValuePair, NameValuePairGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// NameValuePairGenerator returns a generator of NameValuePair instances for property testing.
func NameValuePairGenerator() gopter.Gen {
	if nameValuePairGenerator != nil {
		return nameValuePairGenerator
	}

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

	return nameValuePairGenerator
}

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

func Test_PushSettings_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 PushSettings via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForPushSettings, PushSettingsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForPushSettings(generators)
	AddRelatedPropertyGeneratorsForPushSettings(generators)
	pushSettingsGenerator = gen.Struct(reflect.TypeOf(PushSettings{}), generators)

	return pushSettingsGenerator
}

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

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

func Test_PushSettings_Properties_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 PushSettings_Properties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForPushSettings_Properties, PushSettings_PropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// PushSettings_PropertiesGenerator returns a generator of PushSettings_Properties instances for property testing.
func PushSettings_PropertiesGenerator() gopter.Gen {
	if pushSettings_PropertiesGenerator != nil {
		return pushSettings_PropertiesGenerator
	}

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

	return pushSettings_PropertiesGenerator
}

// AddIndependentPropertyGeneratorsForPushSettings_Properties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForPushSettings_Properties(gens map[string]gopter.Gen) {
	gens["DynamicTagsJson"] = gen.PtrOf(gen.AlphaString())
	gens["IsPushEnabled"] = gen.PtrOf(gen.Bool())
	gens["TagWhitelistJson"] = gen.PtrOf(gen.AlphaString())
	gens["TagsRequiringAuth"] = gen.PtrOf(gen.AlphaString())
}

func Test_RampUpRule_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 RampUpRule via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForRampUpRule, RampUpRuleGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// RampUpRuleGenerator returns a generator of RampUpRule instances for property testing.
func RampUpRuleGenerator() gopter.Gen {
	if rampUpRuleGenerator != nil {
		return rampUpRuleGenerator
	}

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

	return rampUpRuleGenerator
}

// AddIndependentPropertyGeneratorsForRampUpRule is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForRampUpRule(gens map[string]gopter.Gen) {
	gens["ActionHostName"] = gen.PtrOf(gen.AlphaString())
	gens["ChangeDecisionCallbackUrl"] = gen.PtrOf(gen.AlphaString())
	gens["ChangeIntervalInMinutes"] = gen.PtrOf(gen.Int())
	gens["ChangeStep"] = gen.PtrOf(gen.Float64())
	gens["MaxReroutePercentage"] = gen.PtrOf(gen.Float64())
	gens["MinReroutePercentage"] = gen.PtrOf(gen.Float64())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["ReroutePercentage"] = gen.PtrOf(gen.Float64())
}

func Test_RequestsBasedTrigger_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 RequestsBasedTrigger via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForRequestsBasedTrigger, RequestsBasedTriggerGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// RequestsBasedTriggerGenerator returns a generator of RequestsBasedTrigger instances for property testing.
func RequestsBasedTriggerGenerator() gopter.Gen {
	if requestsBasedTriggerGenerator != nil {
		return requestsBasedTriggerGenerator
	}

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

	return requestsBasedTriggerGenerator
}

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

func Test_SiteConfig_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 SiteConfig via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSiteConfig, SiteConfigGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// SiteConfigGenerator returns a generator of SiteConfig instances for property testing.
func SiteConfigGenerator() gopter.Gen {
	if siteConfigGenerator != nil {
		return siteConfigGenerator
	}

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

	return siteConfigGenerator
}

// AddRelatedPropertyGeneratorsForSiteConfig is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForSiteConfig(gens map[string]gopter.Gen) {
	gens["ApiDefinition"] = gen.PtrOf(ApiDefinitionInfoGenerator())
	gens["ApiManagementConfig"] = gen.PtrOf(ApiManagementConfigGenerator())
	gens["AppSettings"] = gen.SliceOf(NameValuePairGenerator())
	gens["AutoHealRules"] = gen.PtrOf(AutoHealRulesGenerator())
	gens["AzureStorageAccounts"] = gen.MapOf(
		gen.AlphaString(),
		AzureStorageInfoValueGenerator())
	gens["ConnectionStrings"] = gen.SliceOf(ConnStringInfoGenerator())
	gens["Cors"] = gen.PtrOf(CorsSettingsGenerator())
	gens["Experiments"] = gen.PtrOf(ExperimentsGenerator())
	gens["HandlerMappings"] = gen.SliceOf(HandlerMappingGenerator())
	gens["IpSecurityRestrictions"] = gen.SliceOf(IpSecurityRestrictionGenerator())
	gens["Limits"] = gen.PtrOf(SiteLimitsGenerator())
	gens["Push"] = gen.PtrOf(PushSettingsGenerator())
	gens["ScmIpSecurityRestrictions"] = gen.SliceOf(IpSecurityRestrictionGenerator())
	gens["VirtualApplications"] = gen.SliceOf(VirtualApplicationGenerator())
}

func Test_SiteLimits_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 SiteLimits via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSiteLimits, SiteLimitsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// SiteLimitsGenerator returns a generator of SiteLimits instances for property testing.
func SiteLimitsGenerator() gopter.Gen {
	if siteLimitsGenerator != nil {
		return siteLimitsGenerator
	}

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

	return siteLimitsGenerator
}

// AddIndependentPropertyGeneratorsForSiteLimits is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSiteLimits(gens map[string]gopter.Gen) {
	gens["MaxDiskSizeInMb"] = gen.PtrOf(gen.Int())
	gens["MaxMemoryInMb"] = gen.PtrOf(gen.Int())
	gens["MaxPercentageCpu"] = gen.PtrOf(gen.Float64())
}

func Test_Site_Properties_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 Site_Properties_Spec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSite_Properties_Spec, Site_Properties_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Site_Properties_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 Site_Properties_Spec instances for property testing - lazily instantiated by
// Site_Properties_SpecGenerator()
var site_Properties_SpecGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForSite_Properties_Spec(generators)
	AddRelatedPropertyGeneratorsForSite_Properties_Spec(generators)
	site_Properties_SpecGenerator = gen.Struct(reflect.TypeOf(Site_Properties_Spec{}), generators)

	return site_Properties_SpecGenerator
}

// AddIndependentPropertyGeneratorsForSite_Properties_Spec is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSite_Properties_Spec(gens map[string]gopter.Gen) {
	gens["ClientAffinityEnabled"] = gen.PtrOf(gen.Bool())
	gens["ClientCertEnabled"] = gen.PtrOf(gen.Bool())
	gens["ClientCertExclusionPaths"] = gen.PtrOf(gen.AlphaString())
	gens["ClientCertMode"] = gen.PtrOf(gen.OneConstOf(Site_Properties_ClientCertMode_Spec_Optional, Site_Properties_ClientCertMode_Spec_OptionalInteractiveUser, Site_Properties_ClientCertMode_Spec_Required))
	gens["ContainerSize"] = gen.PtrOf(gen.Int())
	gens["CustomDomainVerificationId"] = gen.PtrOf(gen.AlphaString())
	gens["DailyMemoryTimeQuota"] = gen.PtrOf(gen.Int())
	gens["Enabled"] = gen.PtrOf(gen.Bool())
	gens["HostNamesDisabled"] = gen.PtrOf(gen.Bool())
	gens["HttpsOnly"] = gen.PtrOf(gen.Bool())
	gens["HyperV"] = gen.PtrOf(gen.Bool())
	gens["IsXenon"] = gen.PtrOf(gen.Bool())
	gens["KeyVaultReferenceIdentity"] = gen.PtrOf(gen.AlphaString())
	gens["PublicNetworkAccess"] = gen.PtrOf(gen.AlphaString())
	gens["RedundancyMode"] = gen.PtrOf(gen.OneConstOf(
		Site_Properties_RedundancyMode_Spec_ActiveActive,
		Site_Properties_RedundancyMode_Spec_Failover,
		Site_Properties_RedundancyMode_Spec_GeoRedundant,
		Site_Properties_RedundancyMode_Spec_Manual,
		Site_Properties_RedundancyMode_Spec_None))
	gens["Reserved"] = gen.PtrOf(gen.Bool())
	gens["ScmSiteAlsoStopped"] = gen.PtrOf(gen.Bool())
	gens["ServerFarmId"] = gen.PtrOf(gen.AlphaString())
	gens["StorageAccountRequired"] = gen.PtrOf(gen.Bool())
	gens["VirtualNetworkSubnetId"] = gen.PtrOf(gen.AlphaString())
	gens["VnetContentShareEnabled"] = gen.PtrOf(gen.Bool())
	gens["VnetImagePullEnabled"] = gen.PtrOf(gen.Bool())
	gens["VnetRouteAllEnabled"] = gen.PtrOf(gen.Bool())
}

// AddRelatedPropertyGeneratorsForSite_Properties_Spec is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForSite_Properties_Spec(gens map[string]gopter.Gen) {
	gens["CloningInfo"] = gen.PtrOf(CloningInfoGenerator())
	gens["HostNameSslStates"] = gen.SliceOf(HostNameSslStateGenerator())
	gens["HostingEnvironmentProfile"] = gen.PtrOf(HostingEnvironmentProfileGenerator())
	gens["SiteConfig"] = gen.PtrOf(SiteConfigGenerator())
}

func Test_Site_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 Site_Spec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSite_Spec, Site_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Site_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 Site_Spec instances for property testing - lazily instantiated by Site_SpecGenerator()
var site_SpecGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForSite_Spec(generators)
	AddRelatedPropertyGeneratorsForSite_Spec(generators)
	site_SpecGenerator = gen.Struct(reflect.TypeOf(Site_Spec{}), generators)

	return site_SpecGenerator
}

// AddIndependentPropertyGeneratorsForSite_Spec is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSite_Spec(gens map[string]gopter.Gen) {
	gens["Kind"] = gen.PtrOf(gen.AlphaString())
	gens["Location"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.AlphaString()
	gens["Tags"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
}

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

func Test_SlowRequestsBasedTrigger_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 SlowRequestsBasedTrigger via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSlowRequestsBasedTrigger, SlowRequestsBasedTriggerGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// SlowRequestsBasedTriggerGenerator returns a generator of SlowRequestsBasedTrigger instances for property testing.
func SlowRequestsBasedTriggerGenerator() gopter.Gen {
	if slowRequestsBasedTriggerGenerator != nil {
		return slowRequestsBasedTriggerGenerator
	}

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

	return slowRequestsBasedTriggerGenerator
}

// AddIndependentPropertyGeneratorsForSlowRequestsBasedTrigger is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSlowRequestsBasedTrigger(gens map[string]gopter.Gen) {
	gens["Count"] = gen.PtrOf(gen.Int())
	gens["Path"] = gen.PtrOf(gen.AlphaString())
	gens["TimeInterval"] = gen.PtrOf(gen.AlphaString())
	gens["TimeTaken"] = gen.PtrOf(gen.AlphaString())
}

func Test_StatusCodesBasedTrigger_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 StatusCodesBasedTrigger via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForStatusCodesBasedTrigger, StatusCodesBasedTriggerGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// StatusCodesBasedTriggerGenerator returns a generator of StatusCodesBasedTrigger instances for property testing.
func StatusCodesBasedTriggerGenerator() gopter.Gen {
	if statusCodesBasedTriggerGenerator != nil {
		return statusCodesBasedTriggerGenerator
	}

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

	return statusCodesBasedTriggerGenerator
}

// AddIndependentPropertyGeneratorsForStatusCodesBasedTrigger is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForStatusCodesBasedTrigger(gens map[string]gopter.Gen) {
	gens["Count"] = gen.PtrOf(gen.Int())
	gens["Path"] = gen.PtrOf(gen.AlphaString())
	gens["Status"] = gen.PtrOf(gen.Int())
	gens["SubStatus"] = gen.PtrOf(gen.Int())
	gens["TimeInterval"] = gen.PtrOf(gen.AlphaString())
	gens["Win32Status"] = gen.PtrOf(gen.Int())
}

func Test_StatusCodesRangeBasedTrigger_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 StatusCodesRangeBasedTrigger via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForStatusCodesRangeBasedTrigger, StatusCodesRangeBasedTriggerGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// StatusCodesRangeBasedTriggerGenerator returns a generator of StatusCodesRangeBasedTrigger instances for property testing.
func StatusCodesRangeBasedTriggerGenerator() gopter.Gen {
	if statusCodesRangeBasedTriggerGenerator != nil {
		return statusCodesRangeBasedTriggerGenerator
	}

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

	return statusCodesRangeBasedTriggerGenerator
}

// AddIndependentPropertyGeneratorsForStatusCodesRangeBasedTrigger is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForStatusCodesRangeBasedTrigger(gens map[string]gopter.Gen) {
	gens["Count"] = gen.PtrOf(gen.Int())
	gens["Path"] = gen.PtrOf(gen.AlphaString())
	gens["StatusCodes"] = gen.PtrOf(gen.AlphaString())
	gens["TimeInterval"] = gen.PtrOf(gen.AlphaString())
}

func Test_UserAssignedIdentityDetails_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 UserAssignedIdentityDetails via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// UserAssignedIdentityDetailsGenerator returns a generator of UserAssignedIdentityDetails instances for property testing.
func UserAssignedIdentityDetailsGenerator() gopter.Gen {
	if userAssignedIdentityDetailsGenerator != nil {
		return userAssignedIdentityDetailsGenerator
	}

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

	return userAssignedIdentityDetailsGenerator
}

func Test_VirtualApplication_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 VirtualApplication via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualApplication, VirtualApplicationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForVirtualApplication(generators)
	AddRelatedPropertyGeneratorsForVirtualApplication(generators)
	virtualApplicationGenerator = gen.Struct(reflect.TypeOf(VirtualApplication{}), generators)

	return virtualApplicationGenerator
}

// AddIndependentPropertyGeneratorsForVirtualApplication is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForVirtualApplication(gens map[string]gopter.Gen) {
	gens["PhysicalPath"] = gen.PtrOf(gen.AlphaString())
	gens["PreloadEnabled"] = gen.PtrOf(gen.Bool())
	gens["VirtualPath"] = gen.PtrOf(gen.AlphaString())
}

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

func Test_VirtualDirectory_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 VirtualDirectory via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForVirtualDirectory, VirtualDirectoryGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// VirtualDirectoryGenerator returns a generator of VirtualDirectory instances for property testing.
func VirtualDirectoryGenerator() gopter.Gen {
	if virtualDirectoryGenerator != nil {
		return virtualDirectoryGenerator
	}

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

	return virtualDirectoryGenerator
}

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