// 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_IpRule_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 IpRule_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForIpRule_STATUS, IpRule_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual IpRule_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 IpRule_STATUS instances for property testing - lazily instantiated by IpRule_STATUSGenerator()
var ipRule_STATUSGenerator gopter.Gen

// IpRule_STATUSGenerator returns a generator of IpRule_STATUS instances for property testing.
func IpRule_STATUSGenerator() gopter.Gen {
	if ipRule_STATUSGenerator != nil {
		return ipRule_STATUSGenerator
	}

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

	return ipRule_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForIpRule_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForIpRule_STATUS(gens map[string]gopter.Gen) {
	gens["IpMask"] = gen.PtrOf(gen.AlphaString())
	gens["Rights"] = gen.SliceOf(gen.OneConstOf(AccessRights_STATUS_Listen, AccessRights_STATUS_Manage, AccessRights_STATUS_Send))
}

func Test_NamespaceProperties_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 NamespaceProperties_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForNamespaceProperties_STATUS, NamespaceProperties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual NamespaceProperties_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 NamespaceProperties_STATUS instances for property testing - lazily instantiated by
// NamespaceProperties_STATUSGenerator()
var namespaceProperties_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForNamespaceProperties_STATUS(generators)
	AddRelatedPropertyGeneratorsForNamespaceProperties_STATUS(generators)
	namespaceProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(NamespaceProperties_STATUS{}), generators)

	return namespaceProperties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForNamespaceProperties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForNamespaceProperties_STATUS(gens map[string]gopter.Gen) {
	gens["CreatedAt"] = gen.PtrOf(gen.AlphaString())
	gens["Critical"] = gen.PtrOf(gen.Bool())
	gens["DataCenter"] = gen.PtrOf(gen.AlphaString())
	gens["Enabled"] = gen.PtrOf(gen.Bool())
	gens["MetricId"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["NamespaceType"] = gen.PtrOf(gen.OneConstOf(NamespaceType_STATUS_Messaging, NamespaceType_STATUS_NotificationHub))
	gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(
		OperationProvisioningState_STATUS_Canceled,
		OperationProvisioningState_STATUS_Disabled,
		OperationProvisioningState_STATUS_Failed,
		OperationProvisioningState_STATUS_InProgress,
		OperationProvisioningState_STATUS_Pending,
		OperationProvisioningState_STATUS_Succeeded,
		OperationProvisioningState_STATUS_Unknown))
	gens["PublicNetworkAccess"] = gen.PtrOf(gen.OneConstOf(PublicNetworkAccess_STATUS_Disabled, PublicNetworkAccess_STATUS_Enabled))
	gens["Region"] = gen.PtrOf(gen.AlphaString())
	gens["ReplicationRegion"] = gen.PtrOf(gen.OneConstOf(
		ReplicationRegion_STATUS_AustraliaEast,
		ReplicationRegion_STATUS_BrazilSouth,
		ReplicationRegion_STATUS_Default,
		ReplicationRegion_STATUS_None,
		ReplicationRegion_STATUS_NorthEurope,
		ReplicationRegion_STATUS_SouthAfricaNorth,
		ReplicationRegion_STATUS_SouthEastAsia,
		ReplicationRegion_STATUS_WestUs2))
	gens["ScaleUnit"] = gen.PtrOf(gen.AlphaString())
	gens["ServiceBusEndpoint"] = gen.PtrOf(gen.AlphaString())
	gens["Status"] = gen.PtrOf(gen.OneConstOf(
		NamespaceStatus_STATUS_Created,
		NamespaceStatus_STATUS_Creating,
		NamespaceStatus_STATUS_Deleting,
		NamespaceStatus_STATUS_Suspended))
	gens["SubscriptionId"] = gen.PtrOf(gen.AlphaString())
	gens["UpdatedAt"] = gen.PtrOf(gen.AlphaString())
	gens["ZoneRedundancy"] = gen.PtrOf(gen.OneConstOf(ZoneRedundancyPreference_STATUS_Disabled, ZoneRedundancyPreference_STATUS_Enabled))
}

// AddRelatedPropertyGeneratorsForNamespaceProperties_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForNamespaceProperties_STATUS(gens map[string]gopter.Gen) {
	gens["NetworkAcls"] = gen.PtrOf(NetworkAcls_STATUSGenerator())
	gens["PnsCredentials"] = gen.PtrOf(PnsCredentials_STATUSGenerator())
	gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnectionResource_STATUSGenerator())
}

func Test_Namespace_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 Namespace_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForNamespace_STATUS, Namespace_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Namespace_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 Namespace_STATUS instances for property testing - lazily instantiated by Namespace_STATUSGenerator()
var namespace_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForNamespace_STATUS(generators)
	AddRelatedPropertyGeneratorsForNamespace_STATUS(generators)
	namespace_STATUSGenerator = gen.Struct(reflect.TypeOf(Namespace_STATUS{}), generators)

	return namespace_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForNamespace_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForNamespace_STATUS(gens map[string]gopter.Gen) {
	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())
}

// AddRelatedPropertyGeneratorsForNamespace_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForNamespace_STATUS(gens map[string]gopter.Gen) {
	gens["Properties"] = gen.PtrOf(NamespaceProperties_STATUSGenerator())
	gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator())
	gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator())
}

func Test_NetworkAcls_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 NetworkAcls_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForNetworkAcls_STATUS, NetworkAcls_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual NetworkAcls_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 NetworkAcls_STATUS instances for property testing - lazily instantiated by NetworkAcls_STATUSGenerator()
var networkAcls_STATUSGenerator gopter.Gen

// NetworkAcls_STATUSGenerator returns a generator of NetworkAcls_STATUS instances for property testing.
func NetworkAcls_STATUSGenerator() gopter.Gen {
	if networkAcls_STATUSGenerator != nil {
		return networkAcls_STATUSGenerator
	}

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

	return networkAcls_STATUSGenerator
}

// AddRelatedPropertyGeneratorsForNetworkAcls_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForNetworkAcls_STATUS(gens map[string]gopter.Gen) {
	gens["IpRules"] = gen.SliceOf(IpRule_STATUSGenerator())
	gens["PublicNetworkRule"] = gen.PtrOf(PublicInternetAuthorizationRule_STATUSGenerator())
}

func Test_PnsCredentials_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 PnsCredentials_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForPnsCredentials_STATUS, PnsCredentials_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual PnsCredentials_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 PnsCredentials_STATUS instances for property testing - lazily instantiated by
// PnsCredentials_STATUSGenerator()
var pnsCredentials_STATUSGenerator gopter.Gen

// PnsCredentials_STATUSGenerator returns a generator of PnsCredentials_STATUS instances for property testing.
func PnsCredentials_STATUSGenerator() gopter.Gen {
	if pnsCredentials_STATUSGenerator != nil {
		return pnsCredentials_STATUSGenerator
	}

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

	return pnsCredentials_STATUSGenerator
}

// AddRelatedPropertyGeneratorsForPnsCredentials_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForPnsCredentials_STATUS(gens map[string]gopter.Gen) {
	gens["AdmCredential"] = gen.PtrOf(AdmCredential_STATUSGenerator())
	gens["ApnsCredential"] = gen.PtrOf(ApnsCredential_STATUSGenerator())
	gens["BaiduCredential"] = gen.PtrOf(BaiduCredential_STATUSGenerator())
	gens["BrowserCredential"] = gen.PtrOf(BrowserCredential_STATUSGenerator())
	gens["GcmCredential"] = gen.PtrOf(GcmCredential_STATUSGenerator())
	gens["MpnsCredential"] = gen.PtrOf(MpnsCredential_STATUSGenerator())
	gens["WnsCredential"] = gen.PtrOf(WnsCredential_STATUSGenerator())
	gens["XiaomiCredential"] = gen.PtrOf(XiaomiCredential_STATUSGenerator())
}

func Test_PrivateEndpointConnectionResource_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 PrivateEndpointConnectionResource_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnectionResource_STATUS, PrivateEndpointConnectionResource_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual PrivateEndpointConnectionResource_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 PrivateEndpointConnectionResource_STATUS instances for property testing - lazily instantiated by
// PrivateEndpointConnectionResource_STATUSGenerator()
var privateEndpointConnectionResource_STATUSGenerator gopter.Gen

// PrivateEndpointConnectionResource_STATUSGenerator returns a generator of PrivateEndpointConnectionResource_STATUS instances for property testing.
func PrivateEndpointConnectionResource_STATUSGenerator() gopter.Gen {
	if privateEndpointConnectionResource_STATUSGenerator != nil {
		return privateEndpointConnectionResource_STATUSGenerator
	}

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

	return privateEndpointConnectionResource_STATUSGenerator
}

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

func Test_PublicInternetAuthorizationRule_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 PublicInternetAuthorizationRule_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForPublicInternetAuthorizationRule_STATUS, PublicInternetAuthorizationRule_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual PublicInternetAuthorizationRule_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 PublicInternetAuthorizationRule_STATUS instances for property testing - lazily instantiated by
// PublicInternetAuthorizationRule_STATUSGenerator()
var publicInternetAuthorizationRule_STATUSGenerator gopter.Gen

// PublicInternetAuthorizationRule_STATUSGenerator returns a generator of PublicInternetAuthorizationRule_STATUS instances for property testing.
func PublicInternetAuthorizationRule_STATUSGenerator() gopter.Gen {
	if publicInternetAuthorizationRule_STATUSGenerator != nil {
		return publicInternetAuthorizationRule_STATUSGenerator
	}

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

	return publicInternetAuthorizationRule_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForPublicInternetAuthorizationRule_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForPublicInternetAuthorizationRule_STATUS(gens map[string]gopter.Gen) {
	gens["Rights"] = gen.SliceOf(gen.OneConstOf(AccessRights_STATUS_Listen, AccessRights_STATUS_Manage, AccessRights_STATUS_Send))
}

func Test_Sku_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 Sku_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSku_STATUS, Sku_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Sku_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 Sku_STATUS instances for property testing - lazily instantiated by Sku_STATUSGenerator()
var sku_STATUSGenerator gopter.Gen

// Sku_STATUSGenerator returns a generator of Sku_STATUS instances for property testing.
func Sku_STATUSGenerator() gopter.Gen {
	if sku_STATUSGenerator != nil {
		return sku_STATUSGenerator
	}

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

	return sku_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForSku_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSku_STATUS(gens map[string]gopter.Gen) {
	gens["Capacity"] = gen.PtrOf(gen.Int())
	gens["Family"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.OneConstOf(SkuName_STATUS_Basic, SkuName_STATUS_Free, SkuName_STATUS_Standard))
	gens["Size"] = gen.PtrOf(gen.AlphaString())
	gens["Tier"] = gen.PtrOf(gen.AlphaString())
}

func Test_SystemData_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 SystemData_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSystemData_STATUS, SystemData_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual SystemData_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 SystemData_STATUS instances for property testing - lazily instantiated by SystemData_STATUSGenerator()
var systemData_STATUSGenerator gopter.Gen

// SystemData_STATUSGenerator returns a generator of SystemData_STATUS instances for property testing.
func SystemData_STATUSGenerator() gopter.Gen {
	if systemData_STATUSGenerator != nil {
		return systemData_STATUSGenerator
	}

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

	return systemData_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForSystemData_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSystemData_STATUS(gens map[string]gopter.Gen) {
	gens["CreatedAt"] = gen.PtrOf(gen.AlphaString())
	gens["CreatedBy"] = gen.PtrOf(gen.AlphaString())
	gens["CreatedByType"] = gen.PtrOf(gen.OneConstOf(
		SystemData_CreatedByType_STATUS_Application,
		SystemData_CreatedByType_STATUS_Key,
		SystemData_CreatedByType_STATUS_ManagedIdentity,
		SystemData_CreatedByType_STATUS_User))
	gens["LastModifiedAt"] = gen.PtrOf(gen.AlphaString())
	gens["LastModifiedBy"] = gen.PtrOf(gen.AlphaString())
	gens["LastModifiedByType"] = gen.PtrOf(gen.OneConstOf(
		SystemData_LastModifiedByType_STATUS_Application,
		SystemData_LastModifiedByType_STATUS_Key,
		SystemData_LastModifiedByType_STATUS_ManagedIdentity,
		SystemData_LastModifiedByType_STATUS_User))
}
