// 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_AADAuthTypeWorkspaceConnectionProperties_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 AADAuthTypeWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAADAuthTypeWorkspaceConnectionProperties, AADAuthTypeWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// AADAuthTypeWorkspaceConnectionPropertiesGenerator returns a generator of AADAuthTypeWorkspaceConnectionProperties instances for property testing.
func AADAuthTypeWorkspaceConnectionPropertiesGenerator() gopter.Gen {
	if aadAuthTypeWorkspaceConnectionPropertiesGenerator != nil {
		return aadAuthTypeWorkspaceConnectionPropertiesGenerator
	}

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

	return aadAuthTypeWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForAADAuthTypeWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForAADAuthTypeWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(AADAuthTypeWorkspaceConnectionProperties_AuthType_AAD)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(AADAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON))
}

func Test_AccessKeyAuthTypeWorkspaceConnectionProperties_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 AccessKeyAuthTypeWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAccessKeyAuthTypeWorkspaceConnectionProperties, AccessKeyAuthTypeWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForAccessKeyAuthTypeWorkspaceConnectionProperties(generators)
	AddRelatedPropertyGeneratorsForAccessKeyAuthTypeWorkspaceConnectionProperties(generators)
	accessKeyAuthTypeWorkspaceConnectionPropertiesGenerator = gen.Struct(reflect.TypeOf(AccessKeyAuthTypeWorkspaceConnectionProperties{}), generators)

	return accessKeyAuthTypeWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForAccessKeyAuthTypeWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForAccessKeyAuthTypeWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(AccessKeyAuthTypeWorkspaceConnectionProperties_AuthType_AccessKey)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(AccessKeyAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON))
}

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

func Test_AccountKeyAuthTypeWorkspaceConnectionProperties_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 AccountKeyAuthTypeWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAccountKeyAuthTypeWorkspaceConnectionProperties, AccountKeyAuthTypeWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForAccountKeyAuthTypeWorkspaceConnectionProperties(generators)
	AddRelatedPropertyGeneratorsForAccountKeyAuthTypeWorkspaceConnectionProperties(generators)
	accountKeyAuthTypeWorkspaceConnectionPropertiesGenerator = gen.Struct(reflect.TypeOf(AccountKeyAuthTypeWorkspaceConnectionProperties{}), generators)

	return accountKeyAuthTypeWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForAccountKeyAuthTypeWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForAccountKeyAuthTypeWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(AccountKeyAuthTypeWorkspaceConnectionProperties_AuthType_AccountKey)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(AccountKeyAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON))
}

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

func Test_ApiKeyAuthWorkspaceConnectionProperties_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 ApiKeyAuthWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForApiKeyAuthWorkspaceConnectionProperties, ApiKeyAuthWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForApiKeyAuthWorkspaceConnectionProperties(generators)
	AddRelatedPropertyGeneratorsForApiKeyAuthWorkspaceConnectionProperties(generators)
	apiKeyAuthWorkspaceConnectionPropertiesGenerator = gen.Struct(reflect.TypeOf(ApiKeyAuthWorkspaceConnectionProperties{}), generators)

	return apiKeyAuthWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForApiKeyAuthWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForApiKeyAuthWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(ApiKeyAuthWorkspaceConnectionProperties_AuthType_ApiKey)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(ApiKeyAuthWorkspaceConnectionProperties_ValueFormat_JSON))
}

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

func Test_CustomKeys_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 CustomKeys via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCustomKeys, CustomKeysGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// CustomKeysGenerator returns a generator of CustomKeys instances for property testing.
func CustomKeysGenerator() gopter.Gen {
	if customKeysGenerator != nil {
		return customKeysGenerator
	}

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

	return customKeysGenerator
}

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

func Test_CustomKeysWorkspaceConnectionProperties_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 CustomKeysWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCustomKeysWorkspaceConnectionProperties, CustomKeysWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForCustomKeysWorkspaceConnectionProperties(generators)
	AddRelatedPropertyGeneratorsForCustomKeysWorkspaceConnectionProperties(generators)
	customKeysWorkspaceConnectionPropertiesGenerator = gen.Struct(reflect.TypeOf(CustomKeysWorkspaceConnectionProperties{}), generators)

	return customKeysWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForCustomKeysWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForCustomKeysWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(CustomKeysWorkspaceConnectionProperties_AuthType_CustomKeys)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(CustomKeysWorkspaceConnectionProperties_ValueFormat_JSON))
}

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

func Test_ManagedIdentityAuthTypeWorkspaceConnectionProperties_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 ManagedIdentityAuthTypeWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForManagedIdentityAuthTypeWorkspaceConnectionProperties, ManagedIdentityAuthTypeWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForManagedIdentityAuthTypeWorkspaceConnectionProperties(generators)
	AddRelatedPropertyGeneratorsForManagedIdentityAuthTypeWorkspaceConnectionProperties(generators)
	managedIdentityAuthTypeWorkspaceConnectionPropertiesGenerator = gen.Struct(reflect.TypeOf(ManagedIdentityAuthTypeWorkspaceConnectionProperties{}), generators)

	return managedIdentityAuthTypeWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForManagedIdentityAuthTypeWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForManagedIdentityAuthTypeWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(ManagedIdentityAuthTypeWorkspaceConnectionProperties_AuthType_ManagedIdentity)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(ManagedIdentityAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON))
}

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

func Test_NoneAuthTypeWorkspaceConnectionProperties_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 NoneAuthTypeWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForNoneAuthTypeWorkspaceConnectionProperties, NoneAuthTypeWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// NoneAuthTypeWorkspaceConnectionPropertiesGenerator returns a generator of NoneAuthTypeWorkspaceConnectionProperties instances for property testing.
func NoneAuthTypeWorkspaceConnectionPropertiesGenerator() gopter.Gen {
	if noneAuthTypeWorkspaceConnectionPropertiesGenerator != nil {
		return noneAuthTypeWorkspaceConnectionPropertiesGenerator
	}

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

	return noneAuthTypeWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForNoneAuthTypeWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForNoneAuthTypeWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(NoneAuthTypeWorkspaceConnectionProperties_AuthType_None)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(NoneAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON))
}

func Test_OAuth2AuthTypeWorkspaceConnectionProperties_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 OAuth2AuthTypeWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForOAuth2AuthTypeWorkspaceConnectionProperties, OAuth2AuthTypeWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForOAuth2AuthTypeWorkspaceConnectionProperties(generators)
	AddRelatedPropertyGeneratorsForOAuth2AuthTypeWorkspaceConnectionProperties(generators)
	oAuth2AuthTypeWorkspaceConnectionPropertiesGenerator = gen.Struct(reflect.TypeOf(OAuth2AuthTypeWorkspaceConnectionProperties{}), generators)

	return oAuth2AuthTypeWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForOAuth2AuthTypeWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForOAuth2AuthTypeWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(OAuth2AuthTypeWorkspaceConnectionProperties_AuthType_OAuth2)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(OAuth2AuthTypeWorkspaceConnectionProperties_ValueFormat_JSON))
}

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

func Test_PATAuthTypeWorkspaceConnectionProperties_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 PATAuthTypeWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForPATAuthTypeWorkspaceConnectionProperties, PATAuthTypeWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForPATAuthTypeWorkspaceConnectionProperties(generators)
	AddRelatedPropertyGeneratorsForPATAuthTypeWorkspaceConnectionProperties(generators)
	patAuthTypeWorkspaceConnectionPropertiesGenerator = gen.Struct(reflect.TypeOf(PATAuthTypeWorkspaceConnectionProperties{}), generators)

	return patAuthTypeWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForPATAuthTypeWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForPATAuthTypeWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(PATAuthTypeWorkspaceConnectionProperties_AuthType_PAT)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(PATAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON))
}

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

func Test_SASAuthTypeWorkspaceConnectionProperties_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 SASAuthTypeWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSASAuthTypeWorkspaceConnectionProperties, SASAuthTypeWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForSASAuthTypeWorkspaceConnectionProperties(generators)
	AddRelatedPropertyGeneratorsForSASAuthTypeWorkspaceConnectionProperties(generators)
	sasAuthTypeWorkspaceConnectionPropertiesGenerator = gen.Struct(reflect.TypeOf(SASAuthTypeWorkspaceConnectionProperties{}), generators)

	return sasAuthTypeWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForSASAuthTypeWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSASAuthTypeWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(SASAuthTypeWorkspaceConnectionProperties_AuthType_SAS)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(SASAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON))
}

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

func Test_ServicePrincipalAuthTypeWorkspaceConnectionProperties_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 ServicePrincipalAuthTypeWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForServicePrincipalAuthTypeWorkspaceConnectionProperties, ServicePrincipalAuthTypeWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForServicePrincipalAuthTypeWorkspaceConnectionProperties(generators)
	AddRelatedPropertyGeneratorsForServicePrincipalAuthTypeWorkspaceConnectionProperties(generators)
	servicePrincipalAuthTypeWorkspaceConnectionPropertiesGenerator = gen.Struct(reflect.TypeOf(ServicePrincipalAuthTypeWorkspaceConnectionProperties{}), generators)

	return servicePrincipalAuthTypeWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForServicePrincipalAuthTypeWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForServicePrincipalAuthTypeWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(ServicePrincipalAuthTypeWorkspaceConnectionProperties_AuthType_ServicePrincipal)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(ServicePrincipalAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON))
}

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

func Test_UsernamePasswordAuthTypeWorkspaceConnectionProperties_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 UsernamePasswordAuthTypeWorkspaceConnectionProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForUsernamePasswordAuthTypeWorkspaceConnectionProperties, UsernamePasswordAuthTypeWorkspaceConnectionPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForUsernamePasswordAuthTypeWorkspaceConnectionProperties(generators)
	AddRelatedPropertyGeneratorsForUsernamePasswordAuthTypeWorkspaceConnectionProperties(generators)
	usernamePasswordAuthTypeWorkspaceConnectionPropertiesGenerator = gen.Struct(reflect.TypeOf(UsernamePasswordAuthTypeWorkspaceConnectionProperties{}), generators)

	return usernamePasswordAuthTypeWorkspaceConnectionPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForUsernamePasswordAuthTypeWorkspaceConnectionProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForUsernamePasswordAuthTypeWorkspaceConnectionProperties(gens map[string]gopter.Gen) {
	gens["AuthType"] = gen.OneConstOf(UsernamePasswordAuthTypeWorkspaceConnectionProperties_AuthType_UsernamePassword)
	gens["Category"] = gen.PtrOf(gen.OneConstOf(
		ConnectionCategory_ADLSGen2,
		ConnectionCategory_AIServices,
		ConnectionCategory_AmazonMws,
		ConnectionCategory_AmazonRdsForOracle,
		ConnectionCategory_AmazonRdsForSqlServer,
		ConnectionCategory_AmazonRedshift,
		ConnectionCategory_AmazonS3Compatible,
		ConnectionCategory_ApiKey,
		ConnectionCategory_AzureBlob,
		ConnectionCategory_AzureDataExplorer,
		ConnectionCategory_AzureDatabricksDeltaLake,
		ConnectionCategory_AzureMariaDb,
		ConnectionCategory_AzureMySqlDb,
		ConnectionCategory_AzureOneLake,
		ConnectionCategory_AzureOpenAI,
		ConnectionCategory_AzurePostgresDb,
		ConnectionCategory_AzureSqlDb,
		ConnectionCategory_AzureSqlMi,
		ConnectionCategory_AzureSynapseAnalytics,
		ConnectionCategory_AzureTableStorage,
		ConnectionCategory_BingLLMSearch,
		ConnectionCategory_Cassandra,
		ConnectionCategory_CognitiveSearch,
		ConnectionCategory_CognitiveService,
		ConnectionCategory_Concur,
		ConnectionCategory_ContainerRegistry,
		ConnectionCategory_CosmosDb,
		ConnectionCategory_CosmosDbMongoDbApi,
		ConnectionCategory_Couchbase,
		ConnectionCategory_CustomKeys,
		ConnectionCategory_Db2,
		ConnectionCategory_Drill,
		ConnectionCategory_Dynamics,
		ConnectionCategory_DynamicsAx,
		ConnectionCategory_DynamicsCrm,
		ConnectionCategory_Eloqua,
		ConnectionCategory_FileServer,
		ConnectionCategory_FtpServer,
		ConnectionCategory_GenericContainerRegistry,
		ConnectionCategory_GenericHttp,
		ConnectionCategory_GenericRest,
		ConnectionCategory_Git,
		ConnectionCategory_GoogleAdWords,
		ConnectionCategory_GoogleBigQuery,
		ConnectionCategory_GoogleCloudStorage,
		ConnectionCategory_Greenplum,
		ConnectionCategory_Hbase,
		ConnectionCategory_Hdfs,
		ConnectionCategory_Hive,
		ConnectionCategory_Hubspot,
		ConnectionCategory_Impala,
		ConnectionCategory_Informix,
		ConnectionCategory_Jira,
		ConnectionCategory_Magento,
		ConnectionCategory_MariaDb,
		ConnectionCategory_Marketo,
		ConnectionCategory_MicrosoftAccess,
		ConnectionCategory_MongoDbAtlas,
		ConnectionCategory_MongoDbV2,
		ConnectionCategory_MySql,
		ConnectionCategory_Netezza,
		ConnectionCategory_ODataRest,
		ConnectionCategory_Odbc,
		ConnectionCategory_Office365,
		ConnectionCategory_OpenAI,
		ConnectionCategory_Oracle,
		ConnectionCategory_OracleCloudStorage,
		ConnectionCategory_OracleServiceCloud,
		ConnectionCategory_PayPal,
		ConnectionCategory_Phoenix,
		ConnectionCategory_PostgreSql,
		ConnectionCategory_Presto,
		ConnectionCategory_PythonFeed,
		ConnectionCategory_QuickBooks,
		ConnectionCategory_Redis,
		ConnectionCategory_Responsys,
		ConnectionCategory_S3,
		ConnectionCategory_Salesforce,
		ConnectionCategory_SalesforceMarketingCloud,
		ConnectionCategory_SalesforceServiceCloud,
		ConnectionCategory_SapBw,
		ConnectionCategory_SapCloudForCustomer,
		ConnectionCategory_SapEcc,
		ConnectionCategory_SapHana,
		ConnectionCategory_SapOpenHub,
		ConnectionCategory_SapTable,
		ConnectionCategory_Serp,
		ConnectionCategory_Serverless,
		ConnectionCategory_ServiceNow,
		ConnectionCategory_Sftp,
		ConnectionCategory_SharePointOnlineList,
		ConnectionCategory_Shopify,
		ConnectionCategory_Snowflake,
		ConnectionCategory_Spark,
		ConnectionCategory_SqlServer,
		ConnectionCategory_Square,
		ConnectionCategory_Sybase,
		ConnectionCategory_Teradata,
		ConnectionCategory_Vertica,
		ConnectionCategory_WebTable,
		ConnectionCategory_Xero,
		ConnectionCategory_Zoho))
	gens["ExpiryTime"] = gen.PtrOf(gen.AlphaString())
	gens["IsSharedToAll"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["SharedUserList"] = gen.SliceOf(gen.AlphaString())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Value"] = gen.PtrOf(gen.AlphaString())
	gens["ValueFormat"] = gen.PtrOf(gen.OneConstOf(UsernamePasswordAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON))
}

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

func Test_WorkspaceConnectionAccessKey_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 WorkspaceConnectionAccessKey via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspaceConnectionAccessKey, WorkspaceConnectionAccessKeyGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WorkspaceConnectionAccessKeyGenerator returns a generator of WorkspaceConnectionAccessKey instances for property testing.
func WorkspaceConnectionAccessKeyGenerator() gopter.Gen {
	if workspaceConnectionAccessKeyGenerator != nil {
		return workspaceConnectionAccessKeyGenerator
	}

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

	return workspaceConnectionAccessKeyGenerator
}

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

func Test_WorkspaceConnectionAccountKey_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 WorkspaceConnectionAccountKey via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspaceConnectionAccountKey, WorkspaceConnectionAccountKeyGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WorkspaceConnectionAccountKeyGenerator returns a generator of WorkspaceConnectionAccountKey instances for property testing.
func WorkspaceConnectionAccountKeyGenerator() gopter.Gen {
	if workspaceConnectionAccountKeyGenerator != nil {
		return workspaceConnectionAccountKeyGenerator
	}

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

	return workspaceConnectionAccountKeyGenerator
}

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

func Test_WorkspaceConnectionApiKey_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 WorkspaceConnectionApiKey via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspaceConnectionApiKey, WorkspaceConnectionApiKeyGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WorkspaceConnectionApiKeyGenerator returns a generator of WorkspaceConnectionApiKey instances for property testing.
func WorkspaceConnectionApiKeyGenerator() gopter.Gen {
	if workspaceConnectionApiKeyGenerator != nil {
		return workspaceConnectionApiKeyGenerator
	}

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

	return workspaceConnectionApiKeyGenerator
}

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

func Test_WorkspaceConnectionManagedIdentity_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 WorkspaceConnectionManagedIdentity via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspaceConnectionManagedIdentity, WorkspaceConnectionManagedIdentityGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WorkspaceConnectionManagedIdentityGenerator returns a generator of WorkspaceConnectionManagedIdentity instances for property testing.
func WorkspaceConnectionManagedIdentityGenerator() gopter.Gen {
	if workspaceConnectionManagedIdentityGenerator != nil {
		return workspaceConnectionManagedIdentityGenerator
	}

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

	return workspaceConnectionManagedIdentityGenerator
}

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

func Test_WorkspaceConnectionOAuth2_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 WorkspaceConnectionOAuth2 via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspaceConnectionOAuth2, WorkspaceConnectionOAuth2Generator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WorkspaceConnectionOAuth2Generator returns a generator of WorkspaceConnectionOAuth2 instances for property testing.
func WorkspaceConnectionOAuth2Generator() gopter.Gen {
	if workspaceConnectionOAuth2Generator != nil {
		return workspaceConnectionOAuth2Generator
	}

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

	return workspaceConnectionOAuth2Generator
}

// AddIndependentPropertyGeneratorsForWorkspaceConnectionOAuth2 is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForWorkspaceConnectionOAuth2(gens map[string]gopter.Gen) {
	gens["AuthUrl"] = gen.PtrOf(gen.AlphaString())
	gens["ClientId"] = gen.PtrOf(gen.AlphaString())
	gens["ClientSecret"] = gen.PtrOf(gen.AlphaString())
	gens["DeveloperToken"] = gen.PtrOf(gen.AlphaString())
	gens["Password"] = gen.PtrOf(gen.AlphaString())
	gens["RefreshToken"] = gen.PtrOf(gen.AlphaString())
	gens["TenantId"] = gen.PtrOf(gen.AlphaString())
	gens["Username"] = gen.PtrOf(gen.AlphaString())
}

func Test_WorkspaceConnectionPersonalAccessToken_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 WorkspaceConnectionPersonalAccessToken via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspaceConnectionPersonalAccessToken, WorkspaceConnectionPersonalAccessTokenGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WorkspaceConnectionPersonalAccessTokenGenerator returns a generator of WorkspaceConnectionPersonalAccessToken instances for property testing.
func WorkspaceConnectionPersonalAccessTokenGenerator() gopter.Gen {
	if workspaceConnectionPersonalAccessTokenGenerator != nil {
		return workspaceConnectionPersonalAccessTokenGenerator
	}

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

	return workspaceConnectionPersonalAccessTokenGenerator
}

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

func Test_WorkspaceConnectionPropertiesV2_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 WorkspaceConnectionPropertiesV2 via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspaceConnectionPropertiesV2, WorkspaceConnectionPropertiesV2Generator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WorkspaceConnectionPropertiesV2Generator returns a generator of WorkspaceConnectionPropertiesV2 instances for property testing.
func WorkspaceConnectionPropertiesV2Generator() gopter.Gen {
	if workspaceConnectionPropertiesV2Generator != nil {
		return workspaceConnectionPropertiesV2Generator
	}

	generators := make(map[string]gopter.Gen)
	AddRelatedPropertyGeneratorsForWorkspaceConnectionPropertiesV2(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(WorkspaceConnectionPropertiesV2{}), props))
	}
	workspaceConnectionPropertiesV2Generator = gen.OneGenOf(gens...)

	return workspaceConnectionPropertiesV2Generator
}

// AddRelatedPropertyGeneratorsForWorkspaceConnectionPropertiesV2 is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForWorkspaceConnectionPropertiesV2(gens map[string]gopter.Gen) {
	gens["AAD"] = AADAuthTypeWorkspaceConnectionPropertiesGenerator().Map(func(it AADAuthTypeWorkspaceConnectionProperties) *AADAuthTypeWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["AccessKey"] = AccessKeyAuthTypeWorkspaceConnectionPropertiesGenerator().Map(func(it AccessKeyAuthTypeWorkspaceConnectionProperties) *AccessKeyAuthTypeWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["AccountKey"] = AccountKeyAuthTypeWorkspaceConnectionPropertiesGenerator().Map(func(it AccountKeyAuthTypeWorkspaceConnectionProperties) *AccountKeyAuthTypeWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["ApiKey"] = ApiKeyAuthWorkspaceConnectionPropertiesGenerator().Map(func(it ApiKeyAuthWorkspaceConnectionProperties) *ApiKeyAuthWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["CustomKeys"] = CustomKeysWorkspaceConnectionPropertiesGenerator().Map(func(it CustomKeysWorkspaceConnectionProperties) *CustomKeysWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["ManagedIdentity"] = ManagedIdentityAuthTypeWorkspaceConnectionPropertiesGenerator().Map(func(it ManagedIdentityAuthTypeWorkspaceConnectionProperties) *ManagedIdentityAuthTypeWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["None"] = NoneAuthTypeWorkspaceConnectionPropertiesGenerator().Map(func(it NoneAuthTypeWorkspaceConnectionProperties) *NoneAuthTypeWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["OAuth2"] = OAuth2AuthTypeWorkspaceConnectionPropertiesGenerator().Map(func(it OAuth2AuthTypeWorkspaceConnectionProperties) *OAuth2AuthTypeWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["PAT"] = PATAuthTypeWorkspaceConnectionPropertiesGenerator().Map(func(it PATAuthTypeWorkspaceConnectionProperties) *PATAuthTypeWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["SAS"] = SASAuthTypeWorkspaceConnectionPropertiesGenerator().Map(func(it SASAuthTypeWorkspaceConnectionProperties) *SASAuthTypeWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["ServicePrincipal"] = ServicePrincipalAuthTypeWorkspaceConnectionPropertiesGenerator().Map(func(it ServicePrincipalAuthTypeWorkspaceConnectionProperties) *ServicePrincipalAuthTypeWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
	gens["UsernamePassword"] = UsernamePasswordAuthTypeWorkspaceConnectionPropertiesGenerator().Map(func(it UsernamePasswordAuthTypeWorkspaceConnectionProperties) *UsernamePasswordAuthTypeWorkspaceConnectionProperties {
		return &it
	}) // generate one case for OneOf type
}

func Test_WorkspaceConnectionServicePrincipal_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 WorkspaceConnectionServicePrincipal via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspaceConnectionServicePrincipal, WorkspaceConnectionServicePrincipalGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WorkspaceConnectionServicePrincipalGenerator returns a generator of WorkspaceConnectionServicePrincipal instances for property testing.
func WorkspaceConnectionServicePrincipalGenerator() gopter.Gen {
	if workspaceConnectionServicePrincipalGenerator != nil {
		return workspaceConnectionServicePrincipalGenerator
	}

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

	return workspaceConnectionServicePrincipalGenerator
}

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

func Test_WorkspaceConnectionSharedAccessSignature_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 WorkspaceConnectionSharedAccessSignature via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspaceConnectionSharedAccessSignature, WorkspaceConnectionSharedAccessSignatureGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WorkspaceConnectionSharedAccessSignatureGenerator returns a generator of WorkspaceConnectionSharedAccessSignature instances for property testing.
func WorkspaceConnectionSharedAccessSignatureGenerator() gopter.Gen {
	if workspaceConnectionSharedAccessSignatureGenerator != nil {
		return workspaceConnectionSharedAccessSignatureGenerator
	}

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

	return workspaceConnectionSharedAccessSignatureGenerator
}

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

func Test_WorkspaceConnectionUsernamePassword_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 WorkspaceConnectionUsernamePassword via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspaceConnectionUsernamePassword, WorkspaceConnectionUsernamePasswordGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WorkspaceConnectionUsernamePasswordGenerator returns a generator of WorkspaceConnectionUsernamePassword instances for property testing.
func WorkspaceConnectionUsernamePasswordGenerator() gopter.Gen {
	if workspaceConnectionUsernamePasswordGenerator != nil {
		return workspaceConnectionUsernamePasswordGenerator
	}

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

	return workspaceConnectionUsernamePasswordGenerator
}

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

func Test_WorkspacesConnection_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 WorkspacesConnection_Spec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWorkspacesConnection_Spec, WorkspacesConnection_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual WorkspacesConnection_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 WorkspacesConnection_Spec instances for property testing - lazily instantiated by
// WorkspacesConnection_SpecGenerator()
var workspacesConnection_SpecGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForWorkspacesConnection_Spec(generators)
	AddRelatedPropertyGeneratorsForWorkspacesConnection_Spec(generators)
	workspacesConnection_SpecGenerator = gen.Struct(reflect.TypeOf(WorkspacesConnection_Spec{}), generators)

	return workspacesConnection_SpecGenerator
}

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

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