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

import (
	"encoding/json"
	storage "github.com/Azure/azure-service-operator/v2/api/web/v1api20220301/storage"
	"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_GitHubActionCodeConfiguration_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from GitHubActionCodeConfiguration to GitHubActionCodeConfiguration via AssignProperties_To_GitHubActionCodeConfiguration & AssignProperties_From_GitHubActionCodeConfiguration returns original",
		prop.ForAll(RunPropertyAssignmentTestForGitHubActionCodeConfiguration, GitHubActionCodeConfigurationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForGitHubActionCodeConfiguration tests if a specific instance of GitHubActionCodeConfiguration can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForGitHubActionCodeConfiguration(subject GitHubActionCodeConfiguration) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.GitHubActionCodeConfiguration
	err := copied.AssignProperties_To_GitHubActionCodeConfiguration(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual GitHubActionCodeConfiguration
	err = actual.AssignProperties_From_GitHubActionCodeConfiguration(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	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 ""
}

func Test_GitHubActionCodeConfiguration_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 GitHubActionCodeConfiguration via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForGitHubActionCodeConfiguration, GitHubActionCodeConfigurationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// GitHubActionCodeConfigurationGenerator returns a generator of GitHubActionCodeConfiguration instances for property testing.
func GitHubActionCodeConfigurationGenerator() gopter.Gen {
	if gitHubActionCodeConfigurationGenerator != nil {
		return gitHubActionCodeConfigurationGenerator
	}

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

	return gitHubActionCodeConfigurationGenerator
}

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

func Test_GitHubActionCodeConfiguration_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from GitHubActionCodeConfiguration_STATUS to GitHubActionCodeConfiguration_STATUS via AssignProperties_To_GitHubActionCodeConfiguration_STATUS & AssignProperties_From_GitHubActionCodeConfiguration_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForGitHubActionCodeConfiguration_STATUS, GitHubActionCodeConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForGitHubActionCodeConfiguration_STATUS tests if a specific instance of GitHubActionCodeConfiguration_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForGitHubActionCodeConfiguration_STATUS(subject GitHubActionCodeConfiguration_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.GitHubActionCodeConfiguration_STATUS
	err := copied.AssignProperties_To_GitHubActionCodeConfiguration_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual GitHubActionCodeConfiguration_STATUS
	err = actual.AssignProperties_From_GitHubActionCodeConfiguration_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	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 ""
}

func Test_GitHubActionCodeConfiguration_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 GitHubActionCodeConfiguration_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForGitHubActionCodeConfiguration_STATUS, GitHubActionCodeConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual GitHubActionCodeConfiguration_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 GitHubActionCodeConfiguration_STATUS instances for property testing - lazily instantiated by
// GitHubActionCodeConfiguration_STATUSGenerator()
var gitHubActionCodeConfiguration_STATUSGenerator gopter.Gen

// GitHubActionCodeConfiguration_STATUSGenerator returns a generator of GitHubActionCodeConfiguration_STATUS instances for property testing.
func GitHubActionCodeConfiguration_STATUSGenerator() gopter.Gen {
	if gitHubActionCodeConfiguration_STATUSGenerator != nil {
		return gitHubActionCodeConfiguration_STATUSGenerator
	}

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

	return gitHubActionCodeConfiguration_STATUSGenerator
}

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

func Test_GitHubActionConfiguration_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from GitHubActionConfiguration to GitHubActionConfiguration via AssignProperties_To_GitHubActionConfiguration & AssignProperties_From_GitHubActionConfiguration returns original",
		prop.ForAll(RunPropertyAssignmentTestForGitHubActionConfiguration, GitHubActionConfigurationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForGitHubActionConfiguration tests if a specific instance of GitHubActionConfiguration can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForGitHubActionConfiguration(subject GitHubActionConfiguration) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.GitHubActionConfiguration
	err := copied.AssignProperties_To_GitHubActionConfiguration(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual GitHubActionConfiguration
	err = actual.AssignProperties_From_GitHubActionConfiguration(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	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 ""
}

func Test_GitHubActionConfiguration_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 GitHubActionConfiguration via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForGitHubActionConfiguration, GitHubActionConfigurationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForGitHubActionConfiguration(generators)
	AddRelatedPropertyGeneratorsForGitHubActionConfiguration(generators)
	gitHubActionConfigurationGenerator = gen.Struct(reflect.TypeOf(GitHubActionConfiguration{}), generators)

	return gitHubActionConfigurationGenerator
}

// AddIndependentPropertyGeneratorsForGitHubActionConfiguration is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForGitHubActionConfiguration(gens map[string]gopter.Gen) {
	gens["GenerateWorkflowFile"] = gen.PtrOf(gen.Bool())
	gens["IsLinux"] = gen.PtrOf(gen.Bool())
}

// AddRelatedPropertyGeneratorsForGitHubActionConfiguration is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForGitHubActionConfiguration(gens map[string]gopter.Gen) {
	gens["CodeConfiguration"] = gen.PtrOf(GitHubActionCodeConfigurationGenerator())
	gens["ContainerConfiguration"] = gen.PtrOf(GitHubActionContainerConfigurationGenerator())
}

func Test_GitHubActionConfiguration_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from GitHubActionConfiguration_STATUS to GitHubActionConfiguration_STATUS via AssignProperties_To_GitHubActionConfiguration_STATUS & AssignProperties_From_GitHubActionConfiguration_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForGitHubActionConfiguration_STATUS, GitHubActionConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForGitHubActionConfiguration_STATUS tests if a specific instance of GitHubActionConfiguration_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForGitHubActionConfiguration_STATUS(subject GitHubActionConfiguration_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.GitHubActionConfiguration_STATUS
	err := copied.AssignProperties_To_GitHubActionConfiguration_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual GitHubActionConfiguration_STATUS
	err = actual.AssignProperties_From_GitHubActionConfiguration_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	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 ""
}

func Test_GitHubActionConfiguration_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 GitHubActionConfiguration_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForGitHubActionConfiguration_STATUS, GitHubActionConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual GitHubActionConfiguration_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 GitHubActionConfiguration_STATUS instances for property testing - lazily instantiated by
// GitHubActionConfiguration_STATUSGenerator()
var gitHubActionConfiguration_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForGitHubActionConfiguration_STATUS(generators)
	AddRelatedPropertyGeneratorsForGitHubActionConfiguration_STATUS(generators)
	gitHubActionConfiguration_STATUSGenerator = gen.Struct(reflect.TypeOf(GitHubActionConfiguration_STATUS{}), generators)

	return gitHubActionConfiguration_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForGitHubActionConfiguration_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForGitHubActionConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["GenerateWorkflowFile"] = gen.PtrOf(gen.Bool())
	gens["IsLinux"] = gen.PtrOf(gen.Bool())
}

// AddRelatedPropertyGeneratorsForGitHubActionConfiguration_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForGitHubActionConfiguration_STATUS(gens map[string]gopter.Gen) {
	gens["CodeConfiguration"] = gen.PtrOf(GitHubActionCodeConfiguration_STATUSGenerator())
	gens["ContainerConfiguration"] = gen.PtrOf(GitHubActionContainerConfiguration_STATUSGenerator())
}

func Test_GitHubActionContainerConfiguration_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from GitHubActionContainerConfiguration to GitHubActionContainerConfiguration via AssignProperties_To_GitHubActionContainerConfiguration & AssignProperties_From_GitHubActionContainerConfiguration returns original",
		prop.ForAll(RunPropertyAssignmentTestForGitHubActionContainerConfiguration, GitHubActionContainerConfigurationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForGitHubActionContainerConfiguration tests if a specific instance of GitHubActionContainerConfiguration can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForGitHubActionContainerConfiguration(subject GitHubActionContainerConfiguration) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.GitHubActionContainerConfiguration
	err := copied.AssignProperties_To_GitHubActionContainerConfiguration(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual GitHubActionContainerConfiguration
	err = actual.AssignProperties_From_GitHubActionContainerConfiguration(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	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 ""
}

func Test_GitHubActionContainerConfiguration_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 GitHubActionContainerConfiguration via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForGitHubActionContainerConfiguration, GitHubActionContainerConfigurationGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// GitHubActionContainerConfigurationGenerator returns a generator of GitHubActionContainerConfiguration instances for property testing.
func GitHubActionContainerConfigurationGenerator() gopter.Gen {
	if gitHubActionContainerConfigurationGenerator != nil {
		return gitHubActionContainerConfigurationGenerator
	}

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

	return gitHubActionContainerConfigurationGenerator
}

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

func Test_GitHubActionContainerConfiguration_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from GitHubActionContainerConfiguration_STATUS to GitHubActionContainerConfiguration_STATUS via AssignProperties_To_GitHubActionContainerConfiguration_STATUS & AssignProperties_From_GitHubActionContainerConfiguration_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForGitHubActionContainerConfiguration_STATUS, GitHubActionContainerConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForGitHubActionContainerConfiguration_STATUS tests if a specific instance of GitHubActionContainerConfiguration_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForGitHubActionContainerConfiguration_STATUS(subject GitHubActionContainerConfiguration_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.GitHubActionContainerConfiguration_STATUS
	err := copied.AssignProperties_To_GitHubActionContainerConfiguration_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual GitHubActionContainerConfiguration_STATUS
	err = actual.AssignProperties_From_GitHubActionContainerConfiguration_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	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 ""
}

func Test_GitHubActionContainerConfiguration_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 GitHubActionContainerConfiguration_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForGitHubActionContainerConfiguration_STATUS, GitHubActionContainerConfiguration_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual GitHubActionContainerConfiguration_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 GitHubActionContainerConfiguration_STATUS instances for property testing - lazily instantiated by
// GitHubActionContainerConfiguration_STATUSGenerator()
var gitHubActionContainerConfiguration_STATUSGenerator gopter.Gen

// GitHubActionContainerConfiguration_STATUSGenerator returns a generator of GitHubActionContainerConfiguration_STATUS instances for property testing.
func GitHubActionContainerConfiguration_STATUSGenerator() gopter.Gen {
	if gitHubActionContainerConfiguration_STATUSGenerator != nil {
		return gitHubActionContainerConfiguration_STATUSGenerator
	}

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

	return gitHubActionContainerConfiguration_STATUSGenerator
}

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

func Test_SitesSourcecontrol_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	parameters.MinSuccessfulTests = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from SitesSourcecontrol to hub returns original",
		prop.ForAll(RunResourceConversionTestForSitesSourcecontrol, SitesSourcecontrolGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunResourceConversionTestForSitesSourcecontrol tests if a specific instance of SitesSourcecontrol round trips to the hub storage version and back losslessly
func RunResourceConversionTestForSitesSourcecontrol(subject SitesSourcecontrol) string {
	// Copy subject to make sure conversion doesn't modify it
	copied := subject.DeepCopy()

	// Convert to our hub version
	var hub storage.SitesSourcecontrol
	err := copied.ConvertTo(&hub)
	if err != nil {
		return err.Error()
	}

	// Convert from our hub version
	var actual SitesSourcecontrol
	err = actual.ConvertFrom(&hub)
	if err != nil {
		return err.Error()
	}

	// Compare actual with what we started with
	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 ""
}

func Test_SitesSourcecontrol_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from SitesSourcecontrol to SitesSourcecontrol via AssignProperties_To_SitesSourcecontrol & AssignProperties_From_SitesSourcecontrol returns original",
		prop.ForAll(RunPropertyAssignmentTestForSitesSourcecontrol, SitesSourcecontrolGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForSitesSourcecontrol tests if a specific instance of SitesSourcecontrol can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForSitesSourcecontrol(subject SitesSourcecontrol) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.SitesSourcecontrol
	err := copied.AssignProperties_To_SitesSourcecontrol(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual SitesSourcecontrol
	err = actual.AssignProperties_From_SitesSourcecontrol(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	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 ""
}

func Test_SitesSourcecontrol_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 SitesSourcecontrol via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSitesSourcecontrol, SitesSourcecontrolGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// SitesSourcecontrolGenerator returns a generator of SitesSourcecontrol instances for property testing.
func SitesSourcecontrolGenerator() gopter.Gen {
	if sitesSourcecontrolGenerator != nil {
		return sitesSourcecontrolGenerator
	}

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

	return sitesSourcecontrolGenerator
}

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

func Test_SitesSourcecontrolOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from SitesSourcecontrolOperatorSpec to SitesSourcecontrolOperatorSpec via AssignProperties_To_SitesSourcecontrolOperatorSpec & AssignProperties_From_SitesSourcecontrolOperatorSpec returns original",
		prop.ForAll(RunPropertyAssignmentTestForSitesSourcecontrolOperatorSpec, SitesSourcecontrolOperatorSpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForSitesSourcecontrolOperatorSpec tests if a specific instance of SitesSourcecontrolOperatorSpec can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForSitesSourcecontrolOperatorSpec(subject SitesSourcecontrolOperatorSpec) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.SitesSourcecontrolOperatorSpec
	err := copied.AssignProperties_To_SitesSourcecontrolOperatorSpec(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual SitesSourcecontrolOperatorSpec
	err = actual.AssignProperties_From_SitesSourcecontrolOperatorSpec(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	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 ""
}

func Test_SitesSourcecontrolOperatorSpec_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 SitesSourcecontrolOperatorSpec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSitesSourcecontrolOperatorSpec, SitesSourcecontrolOperatorSpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// SitesSourcecontrolOperatorSpecGenerator returns a generator of SitesSourcecontrolOperatorSpec instances for property testing.
func SitesSourcecontrolOperatorSpecGenerator() gopter.Gen {
	if sitesSourcecontrolOperatorSpecGenerator != nil {
		return sitesSourcecontrolOperatorSpecGenerator
	}

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

	return sitesSourcecontrolOperatorSpecGenerator
}

func Test_SitesSourcecontrol_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from SitesSourcecontrol_STATUS to SitesSourcecontrol_STATUS via AssignProperties_To_SitesSourcecontrol_STATUS & AssignProperties_From_SitesSourcecontrol_STATUS returns original",
		prop.ForAll(RunPropertyAssignmentTestForSitesSourcecontrol_STATUS, SitesSourcecontrol_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForSitesSourcecontrol_STATUS tests if a specific instance of SitesSourcecontrol_STATUS can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForSitesSourcecontrol_STATUS(subject SitesSourcecontrol_STATUS) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.SitesSourcecontrol_STATUS
	err := copied.AssignProperties_To_SitesSourcecontrol_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual SitesSourcecontrol_STATUS
	err = actual.AssignProperties_From_SitesSourcecontrol_STATUS(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	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 ""
}

func Test_SitesSourcecontrol_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 SitesSourcecontrol_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSitesSourcecontrol_STATUS, SitesSourcecontrol_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual SitesSourcecontrol_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 SitesSourcecontrol_STATUS instances for property testing - lazily instantiated by
// SitesSourcecontrol_STATUSGenerator()
var sitesSourcecontrol_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForSitesSourcecontrol_STATUS(generators)
	AddRelatedPropertyGeneratorsForSitesSourcecontrol_STATUS(generators)
	sitesSourcecontrol_STATUSGenerator = gen.Struct(reflect.TypeOf(SitesSourcecontrol_STATUS{}), generators)

	return sitesSourcecontrol_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForSitesSourcecontrol_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSitesSourcecontrol_STATUS(gens map[string]gopter.Gen) {
	gens["Branch"] = gen.PtrOf(gen.AlphaString())
	gens["DeploymentRollbackEnabled"] = gen.PtrOf(gen.Bool())
	gens["Id"] = gen.PtrOf(gen.AlphaString())
	gens["IsGitHubAction"] = gen.PtrOf(gen.Bool())
	gens["IsManualIntegration"] = gen.PtrOf(gen.Bool())
	gens["IsMercurial"] = gen.PtrOf(gen.Bool())
	gens["Kind"] = gen.PtrOf(gen.AlphaString())
	gens["Name"] = gen.PtrOf(gen.AlphaString())
	gens["RepoUrl"] = gen.PtrOf(gen.AlphaString())
	gens["Type"] = gen.PtrOf(gen.AlphaString())
}

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

func Test_SitesSourcecontrol_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
	t.Parallel()
	parameters := gopter.DefaultTestParameters()
	parameters.MaxSize = 10
	properties := gopter.NewProperties(parameters)
	properties.Property(
		"Round trip from SitesSourcecontrol_Spec to SitesSourcecontrol_Spec via AssignProperties_To_SitesSourcecontrol_Spec & AssignProperties_From_SitesSourcecontrol_Spec returns original",
		prop.ForAll(RunPropertyAssignmentTestForSitesSourcecontrol_Spec, SitesSourcecontrol_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout))
}

// RunPropertyAssignmentTestForSitesSourcecontrol_Spec tests if a specific instance of SitesSourcecontrol_Spec can be assigned to storage and back losslessly
func RunPropertyAssignmentTestForSitesSourcecontrol_Spec(subject SitesSourcecontrol_Spec) string {
	// Copy subject to make sure assignment doesn't modify it
	copied := subject.DeepCopy()

	// Use AssignPropertiesTo() for the first stage of conversion
	var other storage.SitesSourcecontrol_Spec
	err := copied.AssignProperties_To_SitesSourcecontrol_Spec(&other)
	if err != nil {
		return err.Error()
	}

	// Use AssignPropertiesFrom() to convert back to our original type
	var actual SitesSourcecontrol_Spec
	err = actual.AssignProperties_From_SitesSourcecontrol_Spec(&other)
	if err != nil {
		return err.Error()
	}

	// Check for a match
	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 ""
}

func Test_SitesSourcecontrol_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 SitesSourcecontrol_Spec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSitesSourcecontrol_Spec, SitesSourcecontrol_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual SitesSourcecontrol_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 SitesSourcecontrol_Spec instances for property testing - lazily instantiated by
// SitesSourcecontrol_SpecGenerator()
var sitesSourcecontrol_SpecGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForSitesSourcecontrol_Spec(generators)
	AddRelatedPropertyGeneratorsForSitesSourcecontrol_Spec(generators)
	sitesSourcecontrol_SpecGenerator = gen.Struct(reflect.TypeOf(SitesSourcecontrol_Spec{}), generators)

	return sitesSourcecontrol_SpecGenerator
}

// AddIndependentPropertyGeneratorsForSitesSourcecontrol_Spec is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSitesSourcecontrol_Spec(gens map[string]gopter.Gen) {
	gens["Branch"] = gen.PtrOf(gen.AlphaString())
	gens["DeploymentRollbackEnabled"] = gen.PtrOf(gen.Bool())
	gens["IsGitHubAction"] = gen.PtrOf(gen.Bool())
	gens["IsManualIntegration"] = gen.PtrOf(gen.Bool())
	gens["IsMercurial"] = gen.PtrOf(gen.Bool())
	gens["Kind"] = gen.PtrOf(gen.AlphaString())
	gens["RepoUrl"] = gen.PtrOf(gen.AlphaString())
}

// AddRelatedPropertyGeneratorsForSitesSourcecontrol_Spec is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForSitesSourcecontrol_Spec(gens map[string]gopter.Gen) {
	gens["GitHubActionConfiguration"] = gen.PtrOf(GitHubActionConfigurationGenerator())
	gens["OperatorSpec"] = gen.PtrOf(SitesSourcecontrolOperatorSpecGenerator())
}
