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

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_Backend_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 20
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of Backend via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackend, BackendGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BackendGenerator returns a generator of Backend instances for property testing.
func BackendGenerator() gopter.Gen {
	if backendGenerator != nil {
		return backendGenerator
	}

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

	return backendGenerator
}

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

func Test_BackendAuthorizationHeaderCredentials_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 BackendAuthorizationHeaderCredentials via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendAuthorizationHeaderCredentials, BackendAuthorizationHeaderCredentialsGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BackendAuthorizationHeaderCredentialsGenerator returns a generator of BackendAuthorizationHeaderCredentials instances for property testing.
func BackendAuthorizationHeaderCredentialsGenerator() gopter.Gen {
	if backendAuthorizationHeaderCredentialsGenerator != nil {
		return backendAuthorizationHeaderCredentialsGenerator
	}

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

	return backendAuthorizationHeaderCredentialsGenerator
}

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

func Test_BackendAuthorizationHeaderCredentials_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of BackendAuthorizationHeaderCredentials_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendAuthorizationHeaderCredentials_STATUS, BackendAuthorizationHeaderCredentials_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual BackendAuthorizationHeaderCredentials_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of BackendAuthorizationHeaderCredentials_STATUS instances for property testing - lazily instantiated by
// BackendAuthorizationHeaderCredentials_STATUSGenerator()
var backendAuthorizationHeaderCredentials_STATUSGenerator gopter.Gen

// BackendAuthorizationHeaderCredentials_STATUSGenerator returns a generator of BackendAuthorizationHeaderCredentials_STATUS instances for property testing.
func BackendAuthorizationHeaderCredentials_STATUSGenerator() gopter.Gen {
	if backendAuthorizationHeaderCredentials_STATUSGenerator != nil {
		return backendAuthorizationHeaderCredentials_STATUSGenerator
	}

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

	return backendAuthorizationHeaderCredentials_STATUSGenerator
}

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

func Test_BackendCircuitBreaker_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 BackendCircuitBreaker via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendCircuitBreaker, BackendCircuitBreakerGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BackendCircuitBreakerGenerator returns a generator of BackendCircuitBreaker instances for property testing.
func BackendCircuitBreakerGenerator() gopter.Gen {
	if backendCircuitBreakerGenerator != nil {
		return backendCircuitBreakerGenerator
	}

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

	return backendCircuitBreakerGenerator
}

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

func Test_BackendCircuitBreaker_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of BackendCircuitBreaker_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendCircuitBreaker_STATUS, BackendCircuitBreaker_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual BackendCircuitBreaker_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of BackendCircuitBreaker_STATUS instances for property testing - lazily instantiated by
// BackendCircuitBreaker_STATUSGenerator()
var backendCircuitBreaker_STATUSGenerator gopter.Gen

// BackendCircuitBreaker_STATUSGenerator returns a generator of BackendCircuitBreaker_STATUS instances for property testing.
func BackendCircuitBreaker_STATUSGenerator() gopter.Gen {
	if backendCircuitBreaker_STATUSGenerator != nil {
		return backendCircuitBreaker_STATUSGenerator
	}

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

	return backendCircuitBreaker_STATUSGenerator
}

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

func Test_BackendCredentialsContract_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 BackendCredentialsContract via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendCredentialsContract, BackendCredentialsContractGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForBackendCredentialsContract(generators)
	AddRelatedPropertyGeneratorsForBackendCredentialsContract(generators)
	backendCredentialsContractGenerator = gen.Struct(reflect.TypeOf(BackendCredentialsContract{}), generators)

	return backendCredentialsContractGenerator
}

// AddIndependentPropertyGeneratorsForBackendCredentialsContract is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBackendCredentialsContract(gens map[string]gopter.Gen) {
	gens["Certificate"] = gen.SliceOf(gen.AlphaString())
	gens["CertificateIds"] = gen.SliceOf(gen.AlphaString())
	gens["Header"] = gen.MapOf(
		gen.AlphaString(),
		gen.SliceOf(gen.AlphaString()))
	gens["Query"] = gen.MapOf(
		gen.AlphaString(),
		gen.SliceOf(gen.AlphaString()))
}

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

func Test_BackendCredentialsContract_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of BackendCredentialsContract_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendCredentialsContract_STATUS, BackendCredentialsContract_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual BackendCredentialsContract_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of BackendCredentialsContract_STATUS instances for property testing - lazily instantiated by
// BackendCredentialsContract_STATUSGenerator()
var backendCredentialsContract_STATUSGenerator gopter.Gen

// BackendCredentialsContract_STATUSGenerator returns a generator of BackendCredentialsContract_STATUS instances for property testing.
// We first initialize backendCredentialsContract_STATUSGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func BackendCredentialsContract_STATUSGenerator() gopter.Gen {
	if backendCredentialsContract_STATUSGenerator != nil {
		return backendCredentialsContract_STATUSGenerator
	}

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForBackendCredentialsContract_STATUS(generators)
	AddRelatedPropertyGeneratorsForBackendCredentialsContract_STATUS(generators)
	backendCredentialsContract_STATUSGenerator = gen.Struct(reflect.TypeOf(BackendCredentialsContract_STATUS{}), generators)

	return backendCredentialsContract_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForBackendCredentialsContract_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBackendCredentialsContract_STATUS(gens map[string]gopter.Gen) {
	gens["Certificate"] = gen.SliceOf(gen.AlphaString())
	gens["CertificateIds"] = gen.SliceOf(gen.AlphaString())
	gens["Header"] = gen.MapOf(
		gen.AlphaString(),
		gen.SliceOf(gen.AlphaString()))
	gens["Query"] = gen.MapOf(
		gen.AlphaString(),
		gen.SliceOf(gen.AlphaString()))
}

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

func Test_BackendOperatorSpec_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 BackendOperatorSpec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendOperatorSpec, BackendOperatorSpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BackendOperatorSpecGenerator returns a generator of BackendOperatorSpec instances for property testing.
func BackendOperatorSpecGenerator() gopter.Gen {
	if backendOperatorSpecGenerator != nil {
		return backendOperatorSpecGenerator
	}

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

	return backendOperatorSpecGenerator
}

func Test_BackendPool_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 BackendPool via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendPool, BackendPoolGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BackendPoolGenerator returns a generator of BackendPool instances for property testing.
func BackendPoolGenerator() gopter.Gen {
	if backendPoolGenerator != nil {
		return backendPoolGenerator
	}

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

	return backendPoolGenerator
}

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

func Test_BackendPoolItem_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 BackendPoolItem via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendPoolItem, BackendPoolItemGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BackendPoolItemGenerator returns a generator of BackendPoolItem instances for property testing.
func BackendPoolItemGenerator() gopter.Gen {
	if backendPoolItemGenerator != nil {
		return backendPoolItemGenerator
	}

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

	return backendPoolItemGenerator
}

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

func Test_BackendPoolItem_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of BackendPoolItem_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendPoolItem_STATUS, BackendPoolItem_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual BackendPoolItem_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of BackendPoolItem_STATUS instances for property testing - lazily instantiated by
// BackendPoolItem_STATUSGenerator()
var backendPoolItem_STATUSGenerator gopter.Gen

// BackendPoolItem_STATUSGenerator returns a generator of BackendPoolItem_STATUS instances for property testing.
func BackendPoolItem_STATUSGenerator() gopter.Gen {
	if backendPoolItem_STATUSGenerator != nil {
		return backendPoolItem_STATUSGenerator
	}

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

	return backendPoolItem_STATUSGenerator
}

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

func Test_BackendPool_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of BackendPool_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendPool_STATUS, BackendPool_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual BackendPool_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of BackendPool_STATUS instances for property testing - lazily instantiated by BackendPool_STATUSGenerator()
var backendPool_STATUSGenerator gopter.Gen

// BackendPool_STATUSGenerator returns a generator of BackendPool_STATUS instances for property testing.
func BackendPool_STATUSGenerator() gopter.Gen {
	if backendPool_STATUSGenerator != nil {
		return backendPool_STATUSGenerator
	}

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

	return backendPool_STATUSGenerator
}

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

func Test_BackendProperties_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 BackendProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendProperties, BackendPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BackendPropertiesGenerator returns a generator of BackendProperties instances for property testing.
func BackendPropertiesGenerator() gopter.Gen {
	if backendPropertiesGenerator != nil {
		return backendPropertiesGenerator
	}

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

	return backendPropertiesGenerator
}

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

func Test_BackendProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of BackendProperties_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendProperties_STATUS, BackendProperties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual BackendProperties_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of BackendProperties_STATUS instances for property testing - lazily instantiated by
// BackendProperties_STATUSGenerator()
var backendProperties_STATUSGenerator gopter.Gen

// BackendProperties_STATUSGenerator returns a generator of BackendProperties_STATUS instances for property testing.
func BackendProperties_STATUSGenerator() gopter.Gen {
	if backendProperties_STATUSGenerator != nil {
		return backendProperties_STATUSGenerator
	}

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

	return backendProperties_STATUSGenerator
}

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

func Test_BackendProxyContract_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 BackendProxyContract via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendProxyContract, BackendProxyContractGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BackendProxyContractGenerator returns a generator of BackendProxyContract instances for property testing.
func BackendProxyContractGenerator() gopter.Gen {
	if backendProxyContractGenerator != nil {
		return backendProxyContractGenerator
	}

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

	return backendProxyContractGenerator
}

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

func Test_BackendProxyContract_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of BackendProxyContract_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendProxyContract_STATUS, BackendProxyContract_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual BackendProxyContract_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of BackendProxyContract_STATUS instances for property testing - lazily instantiated by
// BackendProxyContract_STATUSGenerator()
var backendProxyContract_STATUSGenerator gopter.Gen

// BackendProxyContract_STATUSGenerator returns a generator of BackendProxyContract_STATUS instances for property testing.
func BackendProxyContract_STATUSGenerator() gopter.Gen {
	if backendProxyContract_STATUSGenerator != nil {
		return backendProxyContract_STATUSGenerator
	}

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

	return backendProxyContract_STATUSGenerator
}

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

func Test_BackendServiceFabricClusterProperties_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 BackendServiceFabricClusterProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendServiceFabricClusterProperties, BackendServiceFabricClusterPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForBackendServiceFabricClusterProperties(generators)
	AddRelatedPropertyGeneratorsForBackendServiceFabricClusterProperties(generators)
	backendServiceFabricClusterPropertiesGenerator = gen.Struct(reflect.TypeOf(BackendServiceFabricClusterProperties{}), generators)

	return backendServiceFabricClusterPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForBackendServiceFabricClusterProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBackendServiceFabricClusterProperties(gens map[string]gopter.Gen) {
	gens["ClientCertificateId"] = gen.PtrOf(gen.AlphaString())
	gens["ClientCertificatethumbprint"] = gen.PtrOf(gen.AlphaString())
	gens["ManagementEndpoints"] = gen.SliceOf(gen.AlphaString())
	gens["MaxPartitionResolutionRetries"] = gen.PtrOf(gen.Int())
	gens["ServerCertificateThumbprints"] = gen.SliceOf(gen.AlphaString())
}

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

func Test_BackendServiceFabricClusterProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of BackendServiceFabricClusterProperties_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendServiceFabricClusterProperties_STATUS, BackendServiceFabricClusterProperties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual BackendServiceFabricClusterProperties_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of BackendServiceFabricClusterProperties_STATUS instances for property testing - lazily instantiated by
// BackendServiceFabricClusterProperties_STATUSGenerator()
var backendServiceFabricClusterProperties_STATUSGenerator gopter.Gen

// BackendServiceFabricClusterProperties_STATUSGenerator returns a generator of BackendServiceFabricClusterProperties_STATUS instances for property testing.
// We first initialize backendServiceFabricClusterProperties_STATUSGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func BackendServiceFabricClusterProperties_STATUSGenerator() gopter.Gen {
	if backendServiceFabricClusterProperties_STATUSGenerator != nil {
		return backendServiceFabricClusterProperties_STATUSGenerator
	}

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForBackendServiceFabricClusterProperties_STATUS(generators)
	AddRelatedPropertyGeneratorsForBackendServiceFabricClusterProperties_STATUS(generators)
	backendServiceFabricClusterProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(BackendServiceFabricClusterProperties_STATUS{}), generators)

	return backendServiceFabricClusterProperties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForBackendServiceFabricClusterProperties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBackendServiceFabricClusterProperties_STATUS(gens map[string]gopter.Gen) {
	gens["ClientCertificateId"] = gen.PtrOf(gen.AlphaString())
	gens["ClientCertificatethumbprint"] = gen.PtrOf(gen.AlphaString())
	gens["ManagementEndpoints"] = gen.SliceOf(gen.AlphaString())
	gens["MaxPartitionResolutionRetries"] = gen.PtrOf(gen.Int())
	gens["ServerCertificateThumbprints"] = gen.SliceOf(gen.AlphaString())
}

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

func Test_BackendTlsProperties_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 BackendTlsProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendTlsProperties, BackendTlsPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BackendTlsPropertiesGenerator returns a generator of BackendTlsProperties instances for property testing.
func BackendTlsPropertiesGenerator() gopter.Gen {
	if backendTlsPropertiesGenerator != nil {
		return backendTlsPropertiesGenerator
	}

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

	return backendTlsPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForBackendTlsProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBackendTlsProperties(gens map[string]gopter.Gen) {
	gens["ValidateCertificateChain"] = gen.PtrOf(gen.Bool())
	gens["ValidateCertificateName"] = gen.PtrOf(gen.Bool())
}

func Test_BackendTlsProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of BackendTlsProperties_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackendTlsProperties_STATUS, BackendTlsProperties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual BackendTlsProperties_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of BackendTlsProperties_STATUS instances for property testing - lazily instantiated by
// BackendTlsProperties_STATUSGenerator()
var backendTlsProperties_STATUSGenerator gopter.Gen

// BackendTlsProperties_STATUSGenerator returns a generator of BackendTlsProperties_STATUS instances for property testing.
func BackendTlsProperties_STATUSGenerator() gopter.Gen {
	if backendTlsProperties_STATUSGenerator != nil {
		return backendTlsProperties_STATUSGenerator
	}

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

	return backendTlsProperties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForBackendTlsProperties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBackendTlsProperties_STATUS(gens map[string]gopter.Gen) {
	gens["ValidateCertificateChain"] = gen.PtrOf(gen.Bool())
	gens["ValidateCertificateName"] = gen.PtrOf(gen.Bool())
}

func Test_Backend_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of Backend_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackend_STATUS, Backend_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Backend_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of Backend_STATUS instances for property testing - lazily instantiated by Backend_STATUSGenerator()
var backend_STATUSGenerator gopter.Gen

// Backend_STATUSGenerator returns a generator of Backend_STATUS instances for property testing.
// We first initialize backend_STATUSGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func Backend_STATUSGenerator() gopter.Gen {
	if backend_STATUSGenerator != nil {
		return backend_STATUSGenerator
	}

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForBackend_STATUS(generators)
	AddRelatedPropertyGeneratorsForBackend_STATUS(generators)
	backend_STATUSGenerator = gen.Struct(reflect.TypeOf(Backend_STATUS{}), generators)

	return backend_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForBackend_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBackend_STATUS(gens map[string]gopter.Gen) {
	gens["Description"] = gen.PtrOf(gen.AlphaString())
	gens["Id"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["PropertiesType"] = gen.PtrOf(gen.AlphaString())
	gens["Protocol"] = gen.PtrOf(gen.AlphaString())
	gens["ResourceId"] = gen.PtrOf(gen.AlphaString())
	gens["Title"] = gen.PtrOf(gen.AlphaString())
	gens["Type"] = gen.PtrOf(gen.AlphaString())
	gens["Url"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForBackend_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForBackend_STATUS(gens map[string]gopter.Gen) {
	gens["CircuitBreaker"] = gen.PtrOf(BackendCircuitBreaker_STATUSGenerator())
	gens["Credentials"] = gen.PtrOf(BackendCredentialsContract_STATUSGenerator())
	gens["Pool"] = gen.PtrOf(BackendPool_STATUSGenerator())
	gens["Properties"] = gen.PtrOf(BackendProperties_STATUSGenerator())
	gens["Proxy"] = gen.PtrOf(BackendProxyContract_STATUSGenerator())
	gens["Tls"] = gen.PtrOf(BackendTlsProperties_STATUSGenerator())
}

func Test_Backend_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 Backend_Spec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBackend_Spec, Backend_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Backend_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 Backend_Spec instances for property testing - lazily instantiated by Backend_SpecGenerator()
var backend_SpecGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForBackend_Spec(generators)
	AddRelatedPropertyGeneratorsForBackend_Spec(generators)
	backend_SpecGenerator = gen.Struct(reflect.TypeOf(Backend_Spec{}), generators)

	return backend_SpecGenerator
}

// AddIndependentPropertyGeneratorsForBackend_Spec is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBackend_Spec(gens map[string]gopter.Gen) {
	gens["AzureName"] = gen.AlphaString()
	gens["Description"] = gen.PtrOf(gen.AlphaString())
	gens["OriginalVersion"] = gen.AlphaString()
	gens["Protocol"] = gen.PtrOf(gen.AlphaString())
	gens["Title"] = gen.PtrOf(gen.AlphaString())
	gens["Type"] = gen.PtrOf(gen.AlphaString())
	gens["Url"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForBackend_Spec is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForBackend_Spec(gens map[string]gopter.Gen) {
	gens["CircuitBreaker"] = gen.PtrOf(BackendCircuitBreakerGenerator())
	gens["Credentials"] = gen.PtrOf(BackendCredentialsContractGenerator())
	gens["OperatorSpec"] = gen.PtrOf(BackendOperatorSpecGenerator())
	gens["Pool"] = gen.PtrOf(BackendPoolGenerator())
	gens["Properties"] = gen.PtrOf(BackendPropertiesGenerator())
	gens["Proxy"] = gen.PtrOf(BackendProxyContractGenerator())
	gens["Tls"] = gen.PtrOf(BackendTlsPropertiesGenerator())
}

func Test_CircuitBreakerFailureCondition_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 CircuitBreakerFailureCondition via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCircuitBreakerFailureCondition, CircuitBreakerFailureConditionGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForCircuitBreakerFailureCondition(generators)
	AddRelatedPropertyGeneratorsForCircuitBreakerFailureCondition(generators)
	circuitBreakerFailureConditionGenerator = gen.Struct(reflect.TypeOf(CircuitBreakerFailureCondition{}), generators)

	return circuitBreakerFailureConditionGenerator
}

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

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

func Test_CircuitBreakerFailureCondition_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of CircuitBreakerFailureCondition_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCircuitBreakerFailureCondition_STATUS, CircuitBreakerFailureCondition_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual CircuitBreakerFailureCondition_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of CircuitBreakerFailureCondition_STATUS instances for property testing - lazily instantiated by
// CircuitBreakerFailureCondition_STATUSGenerator()
var circuitBreakerFailureCondition_STATUSGenerator gopter.Gen

// CircuitBreakerFailureCondition_STATUSGenerator returns a generator of CircuitBreakerFailureCondition_STATUS instances for property testing.
// We first initialize circuitBreakerFailureCondition_STATUSGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func CircuitBreakerFailureCondition_STATUSGenerator() gopter.Gen {
	if circuitBreakerFailureCondition_STATUSGenerator != nil {
		return circuitBreakerFailureCondition_STATUSGenerator
	}

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForCircuitBreakerFailureCondition_STATUS(generators)
	AddRelatedPropertyGeneratorsForCircuitBreakerFailureCondition_STATUS(generators)
	circuitBreakerFailureCondition_STATUSGenerator = gen.Struct(reflect.TypeOf(CircuitBreakerFailureCondition_STATUS{}), generators)

	return circuitBreakerFailureCondition_STATUSGenerator
}

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

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

func Test_CircuitBreakerRule_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 CircuitBreakerRule via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCircuitBreakerRule, CircuitBreakerRuleGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForCircuitBreakerRule(generators)
	AddRelatedPropertyGeneratorsForCircuitBreakerRule(generators)
	circuitBreakerRuleGenerator = gen.Struct(reflect.TypeOf(CircuitBreakerRule{}), generators)

	return circuitBreakerRuleGenerator
}

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

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

func Test_CircuitBreakerRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of CircuitBreakerRule_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCircuitBreakerRule_STATUS, CircuitBreakerRule_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual CircuitBreakerRule_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of CircuitBreakerRule_STATUS instances for property testing - lazily instantiated by
// CircuitBreakerRule_STATUSGenerator()
var circuitBreakerRule_STATUSGenerator gopter.Gen

// CircuitBreakerRule_STATUSGenerator returns a generator of CircuitBreakerRule_STATUS instances for property testing.
// We first initialize circuitBreakerRule_STATUSGenerator with a simplified generator based on the
// fields with primitive types then replacing it with a more complex one that also handles complex fields
// to ensure any cycles in the object graph properly terminate.
func CircuitBreakerRule_STATUSGenerator() gopter.Gen {
	if circuitBreakerRule_STATUSGenerator != nil {
		return circuitBreakerRule_STATUSGenerator
	}

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForCircuitBreakerRule_STATUS(generators)
	AddRelatedPropertyGeneratorsForCircuitBreakerRule_STATUS(generators)
	circuitBreakerRule_STATUSGenerator = gen.Struct(reflect.TypeOf(CircuitBreakerRule_STATUS{}), generators)

	return circuitBreakerRule_STATUSGenerator
}

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

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

func Test_FailureStatusCodeRange_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 FailureStatusCodeRange via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForFailureStatusCodeRange, FailureStatusCodeRangeGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// FailureStatusCodeRangeGenerator returns a generator of FailureStatusCodeRange instances for property testing.
func FailureStatusCodeRangeGenerator() gopter.Gen {
	if failureStatusCodeRangeGenerator != nil {
		return failureStatusCodeRangeGenerator
	}

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

	return failureStatusCodeRangeGenerator
}

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

func Test_FailureStatusCodeRange_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of FailureStatusCodeRange_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForFailureStatusCodeRange_STATUS, FailureStatusCodeRange_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual FailureStatusCodeRange_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of FailureStatusCodeRange_STATUS instances for property testing - lazily instantiated by
// FailureStatusCodeRange_STATUSGenerator()
var failureStatusCodeRange_STATUSGenerator gopter.Gen

// FailureStatusCodeRange_STATUSGenerator returns a generator of FailureStatusCodeRange_STATUS instances for property testing.
func FailureStatusCodeRange_STATUSGenerator() gopter.Gen {
	if failureStatusCodeRange_STATUSGenerator != nil {
		return failureStatusCodeRange_STATUSGenerator
	}

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

	return failureStatusCodeRange_STATUSGenerator
}

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

func Test_X509CertificateName_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 X509CertificateName via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForX509CertificateName, X509CertificateNameGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// X509CertificateNameGenerator returns a generator of X509CertificateName instances for property testing.
func X509CertificateNameGenerator() gopter.Gen {
	if x509CertificateNameGenerator != nil {
		return x509CertificateNameGenerator
	}

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

	return x509CertificateNameGenerator
}

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

func Test_X509CertificateName_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MinSuccessfulTests = 80
	parameters.MaxSize = 3
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip of X509CertificateName_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForX509CertificateName_STATUS, X509CertificateName_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual X509CertificateName_STATUS
	err = json.Unmarshal(bin, &actual)
	if err != nil {
		return err.Error()
	}

	// Check for outcome
	match := cmp.Equal(subject, actual, cmpopts.EquateEmpty())
	if !match {
		actualFmt := pretty.Sprint(actual)
		subjectFmt := pretty.Sprint(subject)
		result := diff.Diff(subjectFmt, actualFmt)
		return result
	}

	return ""
}

// Generator of X509CertificateName_STATUS instances for property testing - lazily instantiated by
// X509CertificateName_STATUSGenerator()
var x509CertificateName_STATUSGenerator gopter.Gen

// X509CertificateName_STATUSGenerator returns a generator of X509CertificateName_STATUS instances for property testing.
func X509CertificateName_STATUSGenerator() gopter.Gen {
	if x509CertificateName_STATUSGenerator != nil {
		return x509CertificateName_STATUSGenerator
	}

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

	return x509CertificateName_STATUSGenerator
}

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