// 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_CMKIdentityDefinition_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 CMKIdentityDefinition_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCMKIdentityDefinition_STATUS, CMKIdentityDefinition_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual CMKIdentityDefinition_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 CMKIdentityDefinition_STATUS instances for property testing - lazily instantiated by
// CMKIdentityDefinition_STATUSGenerator()
var cmkIdentityDefinition_STATUSGenerator gopter.Gen

// CMKIdentityDefinition_STATUSGenerator returns a generator of CMKIdentityDefinition_STATUS instances for property testing.
func CMKIdentityDefinition_STATUSGenerator() gopter.Gen {
	if cmkIdentityDefinition_STATUSGenerator != nil {
		return cmkIdentityDefinition_STATUSGenerator
	}

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

	return cmkIdentityDefinition_STATUSGenerator
}

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

func Test_EncryptionConfiguration_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 EncryptionConfiguration_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForEncryptionConfiguration_STATUS, EncryptionConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual EncryptionConfiguration_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 EncryptionConfiguration_STATUS instances for property testing - lazily instantiated by
// EncryptionConfiguration_STATUSGenerator()
var encryptionConfiguration_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForEncryptionConfiguration_STATUS(generators)
	AddRelatedPropertyGeneratorsForEncryptionConfiguration_STATUS(generators)
	encryptionConfiguration_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionConfiguration_STATUS{}), generators)

	return encryptionConfiguration_STATUSGenerator
}

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

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

func Test_FactoryGitHubConfiguration_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 FactoryGitHubConfiguration_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForFactoryGitHubConfiguration_STATUS, FactoryGitHubConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual FactoryGitHubConfiguration_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 FactoryGitHubConfiguration_STATUS instances for property testing - lazily instantiated by
// FactoryGitHubConfiguration_STATUSGenerator()
var factoryGitHubConfiguration_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForFactoryGitHubConfiguration_STATUS(generators)
	AddRelatedPropertyGeneratorsForFactoryGitHubConfiguration_STATUS(generators)
	factoryGitHubConfiguration_STATUSGenerator = gen.Struct(reflect.TypeOf(FactoryGitHubConfiguration_STATUS{}), generators)

	return factoryGitHubConfiguration_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForFactoryGitHubConfiguration_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForFactoryGitHubConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["AccountName"] = gen.PtrOf(gen.AlphaString())
	gens["ClientId"] = gen.PtrOf(gen.AlphaString())
	gens["CollaborationBranch"] = gen.PtrOf(gen.AlphaString())
	gens["DisablePublish"] = gen.PtrOf(gen.Bool())
	gens["HostName"] = gen.PtrOf(gen.AlphaString())
	gens["LastCommitId"] = gen.PtrOf(gen.AlphaString())
	gens["RepositoryName"] = gen.PtrOf(gen.AlphaString())
	gens["RootFolder"] = gen.PtrOf(gen.AlphaString())
	gens["Type"] = gen.OneConstOf(FactoryGitHubConfiguration_Type_STATUS_FactoryGitHubConfiguration)
}

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

func Test_FactoryIdentity_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 FactoryIdentity_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForFactoryIdentity_STATUS, FactoryIdentity_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual FactoryIdentity_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 FactoryIdentity_STATUS instances for property testing - lazily instantiated by
// FactoryIdentity_STATUSGenerator()
var factoryIdentity_STATUSGenerator gopter.Gen

// FactoryIdentity_STATUSGenerator returns a generator of FactoryIdentity_STATUS instances for property testing.
func FactoryIdentity_STATUSGenerator() gopter.Gen {
	if factoryIdentity_STATUSGenerator != nil {
		return factoryIdentity_STATUSGenerator
	}

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

	return factoryIdentity_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForFactoryIdentity_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForFactoryIdentity_STATUS(gens map[string]gopter.Gen) {
	gens["PrincipalId"] = gen.PtrOf(gen.AlphaString())
	gens["TenantId"] = gen.PtrOf(gen.AlphaString())
	gens["Type"] = gen.PtrOf(gen.OneConstOf(FactoryIdentity_Type_STATUS_SystemAssigned, FactoryIdentity_Type_STATUS_SystemAssignedUserAssigned, FactoryIdentity_Type_STATUS_UserAssigned))
}

func Test_FactoryProperties_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 FactoryProperties_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForFactoryProperties_STATUS, FactoryProperties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual FactoryProperties_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 FactoryProperties_STATUS instances for property testing - lazily instantiated by
// FactoryProperties_STATUSGenerator()
var factoryProperties_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForFactoryProperties_STATUS(generators)
	AddRelatedPropertyGeneratorsForFactoryProperties_STATUS(generators)
	factoryProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(FactoryProperties_STATUS{}), generators)

	return factoryProperties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForFactoryProperties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForFactoryProperties_STATUS(gens map[string]gopter.Gen) {
	gens["CreateTime"] = gen.PtrOf(gen.AlphaString())
	gens["ProvisioningState"] = gen.PtrOf(gen.AlphaString())
	gens["PublicNetworkAccess"] = gen.PtrOf(gen.OneConstOf(FactoryProperties_PublicNetworkAccess_STATUS_Disabled, FactoryProperties_PublicNetworkAccess_STATUS_Enabled))
	gens["Version"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForFactoryProperties_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForFactoryProperties_STATUS(gens map[string]gopter.Gen) {
	gens["Encryption"] = gen.PtrOf(EncryptionConfiguration_STATUSGenerator())
	gens["GlobalParameters"] = gen.MapOf(
		gen.AlphaString(),
		GlobalParameterSpecification_STATUSGenerator())
	gens["PurviewConfiguration"] = gen.PtrOf(PurviewConfiguration_STATUSGenerator())
	gens["RepoConfiguration"] = gen.PtrOf(FactoryRepoConfiguration_STATUSGenerator())
}

func Test_FactoryRepoConfiguration_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 FactoryRepoConfiguration_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForFactoryRepoConfiguration_STATUS, FactoryRepoConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual FactoryRepoConfiguration_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 FactoryRepoConfiguration_STATUS instances for property testing - lazily instantiated by
// FactoryRepoConfiguration_STATUSGenerator()
var factoryRepoConfiguration_STATUSGenerator gopter.Gen

// FactoryRepoConfiguration_STATUSGenerator returns a generator of FactoryRepoConfiguration_STATUS instances for property testing.
func FactoryRepoConfiguration_STATUSGenerator() gopter.Gen {
	if factoryRepoConfiguration_STATUSGenerator != nil {
		return factoryRepoConfiguration_STATUSGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddRelatedPropertyGeneratorsForFactoryRepoConfiguration_STATUS(generators)

	// handle OneOf by choosing only one field to instantiate
	var gens []gopter.Gen
	for propName, propGen := range generators {
		props := map[string]gopter.Gen{propName: propGen}
		gens = append(gens, gen.Struct(reflect.TypeOf(FactoryRepoConfiguration_STATUS{}), props))
	}
	factoryRepoConfiguration_STATUSGenerator = gen.OneGenOf(gens...)

	return factoryRepoConfiguration_STATUSGenerator
}

// AddRelatedPropertyGeneratorsForFactoryRepoConfiguration_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForFactoryRepoConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["FactoryGitHub"] = FactoryGitHubConfiguration_STATUSGenerator().Map(func(it FactoryGitHubConfiguration_STATUS) *FactoryGitHubConfiguration_STATUS {
		return &it
	}) // generate one case for OneOf type
	gens["FactoryVSTS"] = FactoryVSTSConfiguration_STATUSGenerator().Map(func(it FactoryVSTSConfiguration_STATUS) *FactoryVSTSConfiguration_STATUS {
		return &it
	}) // generate one case for OneOf type
}

func Test_FactoryVSTSConfiguration_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 FactoryVSTSConfiguration_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForFactoryVSTSConfiguration_STATUS, FactoryVSTSConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual FactoryVSTSConfiguration_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 FactoryVSTSConfiguration_STATUS instances for property testing - lazily instantiated by
// FactoryVSTSConfiguration_STATUSGenerator()
var factoryVSTSConfiguration_STATUSGenerator gopter.Gen

// FactoryVSTSConfiguration_STATUSGenerator returns a generator of FactoryVSTSConfiguration_STATUS instances for property testing.
func FactoryVSTSConfiguration_STATUSGenerator() gopter.Gen {
	if factoryVSTSConfiguration_STATUSGenerator != nil {
		return factoryVSTSConfiguration_STATUSGenerator
	}

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

	return factoryVSTSConfiguration_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForFactoryVSTSConfiguration_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForFactoryVSTSConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["AccountName"] = gen.PtrOf(gen.AlphaString())
	gens["CollaborationBranch"] = gen.PtrOf(gen.AlphaString())
	gens["DisablePublish"] = gen.PtrOf(gen.Bool())
	gens["LastCommitId"] = gen.PtrOf(gen.AlphaString())
	gens["ProjectName"] = gen.PtrOf(gen.AlphaString())
	gens["RepositoryName"] = gen.PtrOf(gen.AlphaString())
	gens["RootFolder"] = gen.PtrOf(gen.AlphaString())
	gens["TenantId"] = gen.PtrOf(gen.AlphaString())
	gens["Type"] = gen.OneConstOf(FactoryVSTSConfiguration_Type_STATUS_FactoryVSTSConfiguration)
}

func Test_Factory_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 Factory_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForFactory_STATUS, Factory_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Factory_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 Factory_STATUS instances for property testing - lazily instantiated by Factory_STATUSGenerator()
var factory_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForFactory_STATUS(generators)
	AddRelatedPropertyGeneratorsForFactory_STATUS(generators)
	factory_STATUSGenerator = gen.Struct(reflect.TypeOf(Factory_STATUS{}), generators)

	return factory_STATUSGenerator
}

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

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

func Test_GitHubClientSecret_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 GitHubClientSecret_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForGitHubClientSecret_STATUS, GitHubClientSecret_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual GitHubClientSecret_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 GitHubClientSecret_STATUS instances for property testing - lazily instantiated by
// GitHubClientSecret_STATUSGenerator()
var gitHubClientSecret_STATUSGenerator gopter.Gen

// GitHubClientSecret_STATUSGenerator returns a generator of GitHubClientSecret_STATUS instances for property testing.
func GitHubClientSecret_STATUSGenerator() gopter.Gen {
	if gitHubClientSecret_STATUSGenerator != nil {
		return gitHubClientSecret_STATUSGenerator
	}

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

	return gitHubClientSecret_STATUSGenerator
}

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

func Test_GlobalParameterSpecification_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 GlobalParameterSpecification_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForGlobalParameterSpecification_STATUS, GlobalParameterSpecification_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual GlobalParameterSpecification_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 GlobalParameterSpecification_STATUS instances for property testing - lazily instantiated by
// GlobalParameterSpecification_STATUSGenerator()
var globalParameterSpecification_STATUSGenerator gopter.Gen

// GlobalParameterSpecification_STATUSGenerator returns a generator of GlobalParameterSpecification_STATUS instances for property testing.
func GlobalParameterSpecification_STATUSGenerator() gopter.Gen {
	if globalParameterSpecification_STATUSGenerator != nil {
		return globalParameterSpecification_STATUSGenerator
	}

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

	return globalParameterSpecification_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForGlobalParameterSpecification_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForGlobalParameterSpecification_STATUS(gens map[string]gopter.Gen) {
	gens["Type"] = gen.PtrOf(gen.OneConstOf(
		GlobalParameterSpecification_Type_STATUS_Array,
		GlobalParameterSpecification_Type_STATUS_Bool,
		GlobalParameterSpecification_Type_STATUS_Float,
		GlobalParameterSpecification_Type_STATUS_Int,
		GlobalParameterSpecification_Type_STATUS_Object,
		GlobalParameterSpecification_Type_STATUS_String))
}

func Test_PurviewConfiguration_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 PurviewConfiguration_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForPurviewConfiguration_STATUS, PurviewConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual PurviewConfiguration_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 PurviewConfiguration_STATUS instances for property testing - lazily instantiated by
// PurviewConfiguration_STATUSGenerator()
var purviewConfiguration_STATUSGenerator gopter.Gen

// PurviewConfiguration_STATUSGenerator returns a generator of PurviewConfiguration_STATUS instances for property testing.
func PurviewConfiguration_STATUSGenerator() gopter.Gen {
	if purviewConfiguration_STATUSGenerator != nil {
		return purviewConfiguration_STATUSGenerator
	}

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

	return purviewConfiguration_STATUSGenerator
}

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