// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package storage

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

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

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

// JobGenerator returns a generator of Job instances for property testing.
func JobGenerator() gopter.Gen {
	if jobGenerator != nil {
		return jobGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddRelatedPropertyGeneratorsForJob(generators)
	jobGenerator = gen.Struct(reflect.TypeOf(Job{}), generators)

	return jobGenerator
}

// AddRelatedPropertyGeneratorsForJob is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForJob(gens map[string]gopter.Gen) {
	gens["Spec"] = Job_SpecGenerator()
	gens["Status"] = Job_STATUSGenerator()
}

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

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

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

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

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobConfiguration(generators)
	jobConfigurationGenerator = gen.Struct(reflect.TypeOf(JobConfiguration{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobConfiguration(generators)
	AddRelatedPropertyGeneratorsForJobConfiguration(generators)
	jobConfigurationGenerator = gen.Struct(reflect.TypeOf(JobConfiguration{}), generators)

	return jobConfigurationGenerator
}

// AddIndependentPropertyGeneratorsForJobConfiguration is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForJobConfiguration(gens map[string]gopter.Gen) {
	gens["ReplicaRetryLimit"] = gen.PtrOf(gen.Int())
	gens["ReplicaTimeout"] = gen.PtrOf(gen.Int())
	gens["TriggerType"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForJobConfiguration is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForJobConfiguration(gens map[string]gopter.Gen) {
	gens["EventTriggerConfig"] = gen.PtrOf(JobConfiguration_EventTriggerConfigGenerator())
	gens["IdentitySettings"] = gen.SliceOf(IdentitySettingsGenerator())
	gens["ManualTriggerConfig"] = gen.PtrOf(JobConfiguration_ManualTriggerConfigGenerator())
	gens["Registries"] = gen.SliceOf(RegistryCredentialsGenerator())
	gens["ScheduleTriggerConfig"] = gen.PtrOf(JobConfiguration_ScheduleTriggerConfigGenerator())
	gens["Secrets"] = gen.SliceOf(SecretGenerator())
}

func Test_JobConfiguration_EventTriggerConfig_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 JobConfiguration_EventTriggerConfig via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobConfiguration_EventTriggerConfig, JobConfiguration_EventTriggerConfigGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobConfiguration_EventTriggerConfig(generators)
	jobConfiguration_EventTriggerConfigGenerator = gen.Struct(reflect.TypeOf(JobConfiguration_EventTriggerConfig{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobConfiguration_EventTriggerConfig(generators)
	AddRelatedPropertyGeneratorsForJobConfiguration_EventTriggerConfig(generators)
	jobConfiguration_EventTriggerConfigGenerator = gen.Struct(reflect.TypeOf(JobConfiguration_EventTriggerConfig{}), generators)

	return jobConfiguration_EventTriggerConfigGenerator
}

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

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

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_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 JobConfiguration_ManualTriggerConfig via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobConfiguration_ManualTriggerConfig, JobConfiguration_ManualTriggerConfigGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// JobConfiguration_ManualTriggerConfigGenerator returns a generator of JobConfiguration_ManualTriggerConfig instances for property testing.
func JobConfiguration_ManualTriggerConfigGenerator() gopter.Gen {
	if jobConfiguration_ManualTriggerConfigGenerator != nil {
		return jobConfiguration_ManualTriggerConfigGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobConfiguration_ManualTriggerConfig(generators)
	jobConfiguration_ManualTriggerConfigGenerator = gen.Struct(reflect.TypeOf(JobConfiguration_ManualTriggerConfig{}), generators)

	return jobConfiguration_ManualTriggerConfigGenerator
}

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

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.AlphaString())
}

// 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_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 JobConfiguration_ScheduleTriggerConfig via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobConfiguration_ScheduleTriggerConfig, JobConfiguration_ScheduleTriggerConfigGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// JobConfiguration_ScheduleTriggerConfigGenerator returns a generator of JobConfiguration_ScheduleTriggerConfig instances for property testing.
func JobConfiguration_ScheduleTriggerConfigGenerator() gopter.Gen {
	if jobConfiguration_ScheduleTriggerConfigGenerator != nil {
		return jobConfiguration_ScheduleTriggerConfigGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobConfiguration_ScheduleTriggerConfig(generators)
	jobConfiguration_ScheduleTriggerConfigGenerator = gen.Struct(reflect.TypeOf(JobConfiguration_ScheduleTriggerConfig{}), generators)

	return jobConfiguration_ScheduleTriggerConfigGenerator
}

// AddIndependentPropertyGeneratorsForJobConfiguration_ScheduleTriggerConfig is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForJobConfiguration_ScheduleTriggerConfig(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_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_JobOperatorSpec_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 JobOperatorSpec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobOperatorSpec, JobOperatorSpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// JobOperatorSpecGenerator returns a generator of JobOperatorSpec instances for property testing.
func JobOperatorSpecGenerator() gopter.Gen {
	if jobOperatorSpecGenerator != nil {
		return jobOperatorSpecGenerator
	}

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

	return jobOperatorSpecGenerator
}

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

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

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

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

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobScale(generators)
	jobScaleGenerator = gen.Struct(reflect.TypeOf(JobScale{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobScale(generators)
	AddRelatedPropertyGeneratorsForJobScale(generators)
	jobScaleGenerator = gen.Struct(reflect.TypeOf(JobScale{}), generators)

	return jobScaleGenerator
}

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

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

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

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

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

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

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobScaleRule(generators)
	jobScaleRuleGenerator = gen.Struct(reflect.TypeOf(JobScaleRule{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJobScaleRule(generators)
	AddRelatedPropertyGeneratorsForJobScaleRule(generators)
	jobScaleRuleGenerator = gen.Struct(reflect.TypeOf(JobScaleRule{}), generators)

	return jobScaleRuleGenerator
}

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

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

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_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 JobTemplate via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForJobTemplate, JobTemplateGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// JobTemplateGenerator returns a generator of JobTemplate instances for property testing.
func JobTemplateGenerator() gopter.Gen {
	if jobTemplateGenerator != nil {
		return jobTemplateGenerator
	}

	generators := make(map[string]gopter.Gen)
	AddRelatedPropertyGeneratorsForJobTemplate(generators)
	jobTemplateGenerator = gen.Struct(reflect.TypeOf(JobTemplate{}), generators)

	return jobTemplateGenerator
}

// AddRelatedPropertyGeneratorsForJobTemplate is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForJobTemplate(gens map[string]gopter.Gen) {
	gens["Containers"] = gen.SliceOf(ContainerGenerator())
	gens["InitContainers"] = gen.SliceOf(BaseContainerGenerator())
	gens["Volumes"] = gen.SliceOf(VolumeGenerator())
}

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_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["EnvironmentId"] = gen.PtrOf(gen.AlphaString())
	gens["EventStreamEndpoint"] = gen.PtrOf(gen.AlphaString())
	gens["Id"] = gen.PtrOf(gen.AlphaString())
	gens["Location"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["OutboundIpAddresses"] = gen.SliceOf(gen.AlphaString())
	gens["ProvisioningState"] = gen.PtrOf(gen.AlphaString())
	gens["Tags"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["Type"] = gen.PtrOf(gen.AlphaString())
	gens["WorkloadProfileName"] = gen.PtrOf(gen.AlphaString())
}

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

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

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

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

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

	generators := make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJob_Spec(generators)
	job_SpecGenerator = gen.Struct(reflect.TypeOf(Job_Spec{}), generators)

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForJob_Spec(generators)
	AddRelatedPropertyGeneratorsForJob_Spec(generators)
	job_SpecGenerator = gen.Struct(reflect.TypeOf(Job_Spec{}), generators)

	return job_SpecGenerator
}

// AddIndependentPropertyGeneratorsForJob_Spec is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForJob_Spec(gens map[string]gopter.Gen) {
	gens["AzureName"] = gen.AlphaString()
	gens["Location"] = gen.PtrOf(gen.AlphaString())
	gens["OriginalVersion"] = gen.AlphaString()
	gens["Tags"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["WorkloadProfileName"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForJob_Spec is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForJob_Spec(gens map[string]gopter.Gen) {
	gens["Configuration"] = gen.PtrOf(JobConfigurationGenerator())
	gens["Identity"] = gen.PtrOf(ManagedServiceIdentityGenerator())
	gens["OperatorSpec"] = gen.PtrOf(JobOperatorSpecGenerator())
	gens["Template"] = gen.PtrOf(JobTemplateGenerator())
}
