// 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_JobConfiguration_EventTriggerConfig_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 JobConfiguration_EventTriggerConfig_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobConfiguration_EventTriggerConfig_STATUS, JobConfiguration_EventTriggerConfig_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual JobConfiguration_EventTriggerConfig_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 JobConfiguration_EventTriggerConfig_STATUS instances for property testing - lazily instantiated by
// JobConfiguration_EventTriggerConfig_STATUSGenerator()
var jobConfiguration_EventTriggerConfig_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobConfiguration_EventTriggerConfig_STATUS(generators)
	AddRelatedPropertyGeneratorsForJobConfiguration_EventTriggerConfig_STATUS(generators)
	jobConfiguration_EventTriggerConfig_STATUSGenerator = gen.Struct(reflect.TypeOf(JobConfiguration_EventTriggerConfig_STATUS{}), generators)

	return jobConfiguration_EventTriggerConfig_STATUSGenerator
}

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

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

func Test_JobConfiguration_ManualTriggerConfig_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 JobConfiguration_ManualTriggerConfig_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobConfiguration_ManualTriggerConfig_STATUS, JobConfiguration_ManualTriggerConfig_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual JobConfiguration_ManualTriggerConfig_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 JobConfiguration_ManualTriggerConfig_STATUS instances for property testing - lazily instantiated by
// JobConfiguration_ManualTriggerConfig_STATUSGenerator()
var jobConfiguration_ManualTriggerConfig_STATUSGenerator gopter.Gen

// JobConfiguration_ManualTriggerConfig_STATUSGenerator returns a generator of JobConfiguration_ManualTriggerConfig_STATUS instances for property testing.
func JobConfiguration_ManualTriggerConfig_STATUSGenerator() gopter.Gen {
	if jobConfiguration_ManualTriggerConfig_STATUSGenerator != nil {
		return jobConfiguration_ManualTriggerConfig_STATUSGenerator
	}

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

	return jobConfiguration_ManualTriggerConfig_STATUSGenerator
}

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

func Test_JobConfiguration_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 JobConfiguration_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobConfiguration_STATUS, JobConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual JobConfiguration_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 JobConfiguration_STATUS instances for property testing - lazily instantiated by
// JobConfiguration_STATUSGenerator()
var jobConfiguration_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobConfiguration_STATUS(generators)
	AddRelatedPropertyGeneratorsForJobConfiguration_STATUS(generators)
	jobConfiguration_STATUSGenerator = gen.Struct(reflect.TypeOf(JobConfiguration_STATUS{}), generators)

	return jobConfiguration_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForJobConfiguration_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForJobConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["ReplicaRetryLimit"] = gen.PtrOf(gen.Int())
	gens["ReplicaTimeout"] = gen.PtrOf(gen.Int())
	gens["TriggerType"] = gen.PtrOf(gen.OneConstOf(JobConfiguration_TriggerType_STATUS_Event, JobConfiguration_TriggerType_STATUS_Manual, JobConfiguration_TriggerType_STATUS_Schedule))
}

// AddRelatedPropertyGeneratorsForJobConfiguration_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForJobConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["EventTriggerConfig"] = gen.PtrOf(JobConfiguration_EventTriggerConfig_STATUSGenerator())
	gens["IdentitySettings"] = gen.SliceOf(IdentitySettings_STATUSGenerator())
	gens["ManualTriggerConfig"] = gen.PtrOf(JobConfiguration_ManualTriggerConfig_STATUSGenerator())
	gens["Registries"] = gen.SliceOf(RegistryCredentials_STATUSGenerator())
	gens["ScheduleTriggerConfig"] = gen.PtrOf(JobConfiguration_ScheduleTriggerConfig_STATUSGenerator())
	gens["Secrets"] = gen.SliceOf(Secret_STATUSGenerator())
}

func Test_JobConfiguration_ScheduleTriggerConfig_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 JobConfiguration_ScheduleTriggerConfig_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobConfiguration_ScheduleTriggerConfig_STATUS, JobConfiguration_ScheduleTriggerConfig_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual JobConfiguration_ScheduleTriggerConfig_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 JobConfiguration_ScheduleTriggerConfig_STATUS instances for property testing - lazily instantiated by
// JobConfiguration_ScheduleTriggerConfig_STATUSGenerator()
var jobConfiguration_ScheduleTriggerConfig_STATUSGenerator gopter.Gen

// JobConfiguration_ScheduleTriggerConfig_STATUSGenerator returns a generator of JobConfiguration_ScheduleTriggerConfig_STATUS instances for property testing.
func JobConfiguration_ScheduleTriggerConfig_STATUSGenerator() gopter.Gen {
	if jobConfiguration_ScheduleTriggerConfig_STATUSGenerator != nil {
		return jobConfiguration_ScheduleTriggerConfig_STATUSGenerator
	}

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

	return jobConfiguration_ScheduleTriggerConfig_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForJobConfiguration_ScheduleTriggerConfig_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForJobConfiguration_ScheduleTriggerConfig_STATUS(gens map[string]gopter.Gen) {
	gens["CronExpression"] = gen.PtrOf(gen.AlphaString())
	gens["Parallelism"] = gen.PtrOf(gen.Int())
	gens["ReplicaCompletionCount"] = gen.PtrOf(gen.Int())
}

func Test_JobScaleRule_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 JobScaleRule_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobScaleRule_STATUS, JobScaleRule_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual JobScaleRule_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 JobScaleRule_STATUS instances for property testing - lazily instantiated by
// JobScaleRule_STATUSGenerator()
var jobScaleRule_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobScaleRule_STATUS(generators)
	AddRelatedPropertyGeneratorsForJobScaleRule_STATUS(generators)
	jobScaleRule_STATUSGenerator = gen.Struct(reflect.TypeOf(JobScaleRule_STATUS{}), generators)

	return jobScaleRule_STATUSGenerator
}

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

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

func Test_JobScale_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 JobScale_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobScale_STATUS, JobScale_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual JobScale_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 JobScale_STATUS instances for property testing - lazily instantiated by JobScale_STATUSGenerator()
var jobScale_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobScale_STATUS(generators)
	AddRelatedPropertyGeneratorsForJobScale_STATUS(generators)
	jobScale_STATUSGenerator = gen.Struct(reflect.TypeOf(JobScale_STATUS{}), generators)

	return jobScale_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForJobScale_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForJobScale_STATUS(gens map[string]gopter.Gen) {
	gens["MaxExecutions"] = gen.PtrOf(gen.Int())
	gens["MinExecutions"] = gen.PtrOf(gen.Int())
	gens["PollingInterval"] = gen.PtrOf(gen.Int())
}

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

func Test_JobTemplate_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 JobTemplate_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobTemplate_STATUS, JobTemplate_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual JobTemplate_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 JobTemplate_STATUS instances for property testing - lazily instantiated by JobTemplate_STATUSGenerator()
var jobTemplate_STATUSGenerator gopter.Gen

// JobTemplate_STATUSGenerator returns a generator of JobTemplate_STATUS instances for property testing.
func JobTemplate_STATUSGenerator() gopter.Gen {
	if jobTemplate_STATUSGenerator != nil {
		return jobTemplate_STATUSGenerator
	}

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

	return jobTemplate_STATUSGenerator
}

// AddRelatedPropertyGeneratorsForJobTemplate_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForJobTemplate_STATUS(gens map[string]gopter.Gen) {
	gens["Containers"] = gen.SliceOf(Container_STATUSGenerator())
	gens["InitContainers"] = gen.SliceOf(BaseContainer_STATUSGenerator())
	gens["Volumes"] = gen.SliceOf(Volume_STATUSGenerator())
}

func Test_Job_Properties_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 Job_Properties_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJob_Properties_STATUS, Job_Properties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Job_Properties_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 Job_Properties_STATUS instances for property testing - lazily instantiated by
// Job_Properties_STATUSGenerator()
var job_Properties_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJob_Properties_STATUS(generators)
	AddRelatedPropertyGeneratorsForJob_Properties_STATUS(generators)
	job_Properties_STATUSGenerator = gen.Struct(reflect.TypeOf(Job_Properties_STATUS{}), generators)

	return job_Properties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForJob_Properties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForJob_Properties_STATUS(gens map[string]gopter.Gen) {
	gens["EnvironmentId"] = gen.PtrOf(gen.AlphaString())
	gens["EventStreamEndpoint"] = gen.PtrOf(gen.AlphaString())
	gens["OutboundIpAddresses"] = gen.SliceOf(gen.AlphaString())
	gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(
		Job_Properties_ProvisioningState_STATUS_Canceled,
		Job_Properties_ProvisioningState_STATUS_Deleting,
		Job_Properties_ProvisioningState_STATUS_Failed,
		Job_Properties_ProvisioningState_STATUS_InProgress,
		Job_Properties_ProvisioningState_STATUS_Succeeded))
	gens["WorkloadProfileName"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForJob_Properties_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForJob_Properties_STATUS(gens map[string]gopter.Gen) {
	gens["Configuration"] = gen.PtrOf(JobConfiguration_STATUSGenerator())
	gens["Template"] = gen.PtrOf(JobTemplate_STATUSGenerator())
}

func Test_Job_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 Job_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJob_STATUS, Job_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual Job_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 Job_STATUS instances for property testing - lazily instantiated by Job_STATUSGenerator()
var job_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJob_STATUS(generators)
	AddRelatedPropertyGeneratorsForJob_STATUS(generators)
	job_STATUSGenerator = gen.Struct(reflect.TypeOf(Job_STATUS{}), generators)

	return job_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForJob_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForJob_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())
}

// AddRelatedPropertyGeneratorsForJob_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForJob_STATUS(gens map[string]gopter.Gen) {
	gens["Identity"] = gen.PtrOf(ManagedServiceIdentity_STATUSGenerator())
	gens["Properties"] = gen.PtrOf(Job_Properties_STATUSGenerator())
	gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator())
}
