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

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

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

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

	return ""
}

// Generator of AutoPauseProperties_STATUS instances for property testing - lazily instantiated by
// AutoPauseProperties_STATUSGenerator()
var autoPauseProperties_STATUSGenerator gopter.Gen

// AutoPauseProperties_STATUSGenerator returns a generator of AutoPauseProperties_STATUS instances for property testing.
func AutoPauseProperties_STATUSGenerator() gopter.Gen {
	if autoPauseProperties_STATUSGenerator != nil {
		return autoPauseProperties_STATUSGenerator
	}

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

	return autoPauseProperties_STATUSGenerator
}

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

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

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

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

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

	return ""
}

// Generator of AutoScaleProperties_STATUS instances for property testing - lazily instantiated by
// AutoScaleProperties_STATUSGenerator()
var autoScaleProperties_STATUSGenerator gopter.Gen

// AutoScaleProperties_STATUSGenerator returns a generator of AutoScaleProperties_STATUS instances for property testing.
func AutoScaleProperties_STATUSGenerator() gopter.Gen {
	if autoScaleProperties_STATUSGenerator != nil {
		return autoScaleProperties_STATUSGenerator
	}

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

	return autoScaleProperties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForAutoScaleProperties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForAutoScaleProperties_STATUS(gens map[string]gopter.Gen) {
	gens["Enabled"] = gen.PtrOf(gen.Bool())
	gens["MaxNodeCount"] = gen.PtrOf(gen.Int())
	gens["MinNodeCount"] = gen.PtrOf(gen.Int())
}

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

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

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

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

	return ""
}

// Generator of BigDataPoolResourceProperties_STATUS instances for property testing - lazily instantiated by
// BigDataPoolResourceProperties_STATUSGenerator()
var bigDataPoolResourceProperties_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForBigDataPoolResourceProperties_STATUS(generators)
	AddRelatedPropertyGeneratorsForBigDataPoolResourceProperties_STATUS(generators)
	bigDataPoolResourceProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(BigDataPoolResourceProperties_STATUS{}), generators)

	return bigDataPoolResourceProperties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForBigDataPoolResourceProperties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForBigDataPoolResourceProperties_STATUS(gens map[string]gopter.Gen) {
	gens["CacheSize"] = gen.PtrOf(gen.Int())
	gens["CreationDate"] = gen.PtrOf(gen.AlphaString())
	gens["DefaultSparkLogFolder"] = gen.PtrOf(gen.AlphaString())
	gens["IsAutotuneEnabled"] = gen.PtrOf(gen.Bool())
	gens["IsComputeIsolationEnabled"] = gen.PtrOf(gen.Bool())
	gens["LastSucceededTimestamp"] = gen.PtrOf(gen.AlphaString())
	gens["NodeCount"] = gen.PtrOf(gen.Int())
	gens["NodeSize"] = gen.PtrOf(gen.OneConstOf(
		BigDataPoolResourceProperties_NodeSize_STATUS_Large,
		BigDataPoolResourceProperties_NodeSize_STATUS_Medium,
		BigDataPoolResourceProperties_NodeSize_STATUS_None,
		BigDataPoolResourceProperties_NodeSize_STATUS_Small,
		BigDataPoolResourceProperties_NodeSize_STATUS_XLarge,
		BigDataPoolResourceProperties_NodeSize_STATUS_XXLarge,
		BigDataPoolResourceProperties_NodeSize_STATUS_XXXLarge))
	gens["NodeSizeFamily"] = gen.PtrOf(gen.OneConstOf(
		BigDataPoolResourceProperties_NodeSizeFamily_STATUS_HardwareAcceleratedFPGA,
		BigDataPoolResourceProperties_NodeSizeFamily_STATUS_HardwareAcceleratedGPU,
		BigDataPoolResourceProperties_NodeSizeFamily_STATUS_MemoryOptimized,
		BigDataPoolResourceProperties_NodeSizeFamily_STATUS_None))
	gens["ProvisioningState"] = gen.PtrOf(gen.AlphaString())
	gens["SessionLevelPackagesEnabled"] = gen.PtrOf(gen.Bool())
	gens["SparkEventsFolder"] = gen.PtrOf(gen.AlphaString())
	gens["SparkVersion"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForBigDataPoolResourceProperties_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForBigDataPoolResourceProperties_STATUS(gens map[string]gopter.Gen) {
	gens["AutoPause"] = gen.PtrOf(AutoPauseProperties_STATUSGenerator())
	gens["AutoScale"] = gen.PtrOf(AutoScaleProperties_STATUSGenerator())
	gens["CustomLibraries"] = gen.SliceOf(LibraryInfo_STATUSGenerator())
	gens["DynamicExecutorAllocation"] = gen.PtrOf(DynamicExecutorAllocation_STATUSGenerator())
	gens["LibraryRequirements"] = gen.PtrOf(LibraryRequirements_STATUSGenerator())
	gens["SparkConfigProperties"] = gen.PtrOf(SparkConfigProperties_STATUSGenerator())
}

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

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

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

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

	return ""
}

// Generator of DynamicExecutorAllocation_STATUS instances for property testing - lazily instantiated by
// DynamicExecutorAllocation_STATUSGenerator()
var dynamicExecutorAllocation_STATUSGenerator gopter.Gen

// DynamicExecutorAllocation_STATUSGenerator returns a generator of DynamicExecutorAllocation_STATUS instances for property testing.
func DynamicExecutorAllocation_STATUSGenerator() gopter.Gen {
	if dynamicExecutorAllocation_STATUSGenerator != nil {
		return dynamicExecutorAllocation_STATUSGenerator
	}

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

	return dynamicExecutorAllocation_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForDynamicExecutorAllocation_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForDynamicExecutorAllocation_STATUS(gens map[string]gopter.Gen) {
	gens["Enabled"] = gen.PtrOf(gen.Bool())
	gens["MaxExecutors"] = gen.PtrOf(gen.Int())
	gens["MinExecutors"] = gen.PtrOf(gen.Int())
}

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

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

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

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

	return ""
}

// Generator of LibraryInfo_STATUS instances for property testing - lazily instantiated by LibraryInfo_STATUSGenerator()
var libraryInfo_STATUSGenerator gopter.Gen

// LibraryInfo_STATUSGenerator returns a generator of LibraryInfo_STATUS instances for property testing.
func LibraryInfo_STATUSGenerator() gopter.Gen {
	if libraryInfo_STATUSGenerator != nil {
		return libraryInfo_STATUSGenerator
	}

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

	return libraryInfo_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForLibraryInfo_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForLibraryInfo_STATUS(gens map[string]gopter.Gen) {
	gens["ContainerName"] = gen.PtrOf(gen.AlphaString())
	gens["CreatorId"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["Path"] = gen.PtrOf(gen.AlphaString())
	gens["ProvisioningStatus"] = gen.PtrOf(gen.AlphaString())
	gens["Type"] = gen.PtrOf(gen.AlphaString())
	gens["UploadedTimestamp"] = gen.PtrOf(gen.AlphaString())
}

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

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

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

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

	return ""
}

// Generator of LibraryRequirements_STATUS instances for property testing - lazily instantiated by
// LibraryRequirements_STATUSGenerator()
var libraryRequirements_STATUSGenerator gopter.Gen

// LibraryRequirements_STATUSGenerator returns a generator of LibraryRequirements_STATUS instances for property testing.
func LibraryRequirements_STATUSGenerator() gopter.Gen {
	if libraryRequirements_STATUSGenerator != nil {
		return libraryRequirements_STATUSGenerator
	}

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

	return libraryRequirements_STATUSGenerator
}

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

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

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

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

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

	return ""
}

// Generator of SparkConfigProperties_STATUS instances for property testing - lazily instantiated by
// SparkConfigProperties_STATUSGenerator()
var sparkConfigProperties_STATUSGenerator gopter.Gen

// SparkConfigProperties_STATUSGenerator returns a generator of SparkConfigProperties_STATUS instances for property testing.
func SparkConfigProperties_STATUSGenerator() gopter.Gen {
	if sparkConfigProperties_STATUSGenerator != nil {
		return sparkConfigProperties_STATUSGenerator
	}

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

	return sparkConfigProperties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForSparkConfigProperties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSparkConfigProperties_STATUS(gens map[string]gopter.Gen) {
	gens["ConfigurationType"] = gen.PtrOf(gen.OneConstOf(SparkConfigProperties_ConfigurationType_STATUS_Artifact, SparkConfigProperties_ConfigurationType_STATUS_File))
	gens["Content"] = gen.PtrOf(gen.AlphaString())
	gens["Filename"] = gen.PtrOf(gen.AlphaString())
	gens["Time"] = gen.PtrOf(gen.AlphaString())
}

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

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

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

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

	return ""
}

// Generator of WorkspacesBigDataPool_STATUS instances for property testing - lazily instantiated by
// WorkspacesBigDataPool_STATUSGenerator()
var workspacesBigDataPool_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForWorkspacesBigDataPool_STATUS(generators)
	AddRelatedPropertyGeneratorsForWorkspacesBigDataPool_STATUS(generators)
	workspacesBigDataPool_STATUSGenerator = gen.Struct(reflect.TypeOf(WorkspacesBigDataPool_STATUS{}), generators)

	return workspacesBigDataPool_STATUSGenerator
}

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

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