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

import (
	"encoding/json"
	"github.com/google/go-cmp/cmp"
	"github.com/google/go-cmp/cmp/cmpopts"
	"github.com/kr/pretty"
	"github.com/kylelemons/godebug/diff"
	"github.com/leanovate/gopter"
	"github.com/leanovate/gopter/gen"
	"github.com/leanovate/gopter/prop"
	"os"
	"reflect"
	"testing"
)

func Test_ARecord_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 ARecord_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForARecord_STATUS, ARecord_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual ARecord_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 ARecord_STATUS instances for property testing - lazily instantiated by ARecord_STATUSGenerator()
var aRecord_STATUSGenerator gopter.Gen

// ARecord_STATUSGenerator returns a generator of ARecord_STATUS instances for property testing.
func ARecord_STATUSGenerator() gopter.Gen {
	if aRecord_STATUSGenerator != nil {
		return aRecord_STATUSGenerator
	}

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

	return aRecord_STATUSGenerator
}

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

func Test_AaaaRecord_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 AaaaRecord_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAaaaRecord_STATUS, AaaaRecord_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual AaaaRecord_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 AaaaRecord_STATUS instances for property testing - lazily instantiated by AaaaRecord_STATUSGenerator()
var aaaaRecord_STATUSGenerator gopter.Gen

// AaaaRecord_STATUSGenerator returns a generator of AaaaRecord_STATUS instances for property testing.
func AaaaRecord_STATUSGenerator() gopter.Gen {
	if aaaaRecord_STATUSGenerator != nil {
		return aaaaRecord_STATUSGenerator
	}

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

	return aaaaRecord_STATUSGenerator
}

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

func Test_CnameRecord_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 CnameRecord_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForCnameRecord_STATUS, CnameRecord_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual CnameRecord_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 CnameRecord_STATUS instances for property testing - lazily instantiated by CnameRecord_STATUSGenerator()
var cnameRecord_STATUSGenerator gopter.Gen

// CnameRecord_STATUSGenerator returns a generator of CnameRecord_STATUS instances for property testing.
func CnameRecord_STATUSGenerator() gopter.Gen {
	if cnameRecord_STATUSGenerator != nil {
		return cnameRecord_STATUSGenerator
	}

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

	return cnameRecord_STATUSGenerator
}

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

func Test_MxRecord_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 MxRecord_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForMxRecord_STATUS, MxRecord_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual MxRecord_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 MxRecord_STATUS instances for property testing - lazily instantiated by MxRecord_STATUSGenerator()
var mxRecord_STATUSGenerator gopter.Gen

// MxRecord_STATUSGenerator returns a generator of MxRecord_STATUS instances for property testing.
func MxRecord_STATUSGenerator() gopter.Gen {
	if mxRecord_STATUSGenerator != nil {
		return mxRecord_STATUSGenerator
	}

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

	return mxRecord_STATUSGenerator
}

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

func Test_PrivateDnsZonesAAAARecord_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 PrivateDnsZonesAAAARecord_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForPrivateDnsZonesAAAARecord_STATUS, PrivateDnsZonesAAAARecord_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual PrivateDnsZonesAAAARecord_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 PrivateDnsZonesAAAARecord_STATUS instances for property testing - lazily instantiated by
// PrivateDnsZonesAAAARecord_STATUSGenerator()
var privateDnsZonesAAAARecord_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForPrivateDnsZonesAAAARecord_STATUS(generators)
	AddRelatedPropertyGeneratorsForPrivateDnsZonesAAAARecord_STATUS(generators)
	privateDnsZonesAAAARecord_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateDnsZonesAAAARecord_STATUS{}), generators)

	return privateDnsZonesAAAARecord_STATUSGenerator
}

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

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

func Test_PtrRecord_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 PtrRecord_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForPtrRecord_STATUS, PtrRecord_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual PtrRecord_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 PtrRecord_STATUS instances for property testing - lazily instantiated by PtrRecord_STATUSGenerator()
var ptrRecord_STATUSGenerator gopter.Gen

// PtrRecord_STATUSGenerator returns a generator of PtrRecord_STATUS instances for property testing.
func PtrRecord_STATUSGenerator() gopter.Gen {
	if ptrRecord_STATUSGenerator != nil {
		return ptrRecord_STATUSGenerator
	}

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

	return ptrRecord_STATUSGenerator
}

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

func Test_RecordSetProperties_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 RecordSetProperties_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForRecordSetProperties_STATUS, RecordSetProperties_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual RecordSetProperties_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 RecordSetProperties_STATUS instances for property testing - lazily instantiated by
// RecordSetProperties_STATUSGenerator()
var recordSetProperties_STATUSGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForRecordSetProperties_STATUS(generators)
	AddRelatedPropertyGeneratorsForRecordSetProperties_STATUS(generators)
	recordSetProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(RecordSetProperties_STATUS{}), generators)

	return recordSetProperties_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForRecordSetProperties_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForRecordSetProperties_STATUS(gens map[string]gopter.Gen) {
	gens["Fqdn"] = gen.PtrOf(gen.AlphaString())
	gens["IsAutoRegistered"] = gen.PtrOf(gen.Bool())
	gens["Metadata"] = gen.MapOf(
		gen.AlphaString(),
		gen.AlphaString())
	gens["Ttl"] = gen.PtrOf(gen.Int())
}

// AddRelatedPropertyGeneratorsForRecordSetProperties_STATUS is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForRecordSetProperties_STATUS(gens map[string]gopter.Gen) {
	gens["ARecords"] = gen.SliceOf(ARecord_STATUSGenerator())
	gens["AaaaRecords"] = gen.SliceOf(AaaaRecord_STATUSGenerator())
	gens["CnameRecord"] = gen.PtrOf(CnameRecord_STATUSGenerator())
	gens["MxRecords"] = gen.SliceOf(MxRecord_STATUSGenerator())
	gens["PtrRecords"] = gen.SliceOf(PtrRecord_STATUSGenerator())
	gens["SoaRecord"] = gen.PtrOf(SoaRecord_STATUSGenerator())
	gens["SrvRecords"] = gen.SliceOf(SrvRecord_STATUSGenerator())
	gens["TxtRecords"] = gen.SliceOf(TxtRecord_STATUSGenerator())
}

func Test_SoaRecord_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 SoaRecord_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSoaRecord_STATUS, SoaRecord_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual SoaRecord_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 SoaRecord_STATUS instances for property testing - lazily instantiated by SoaRecord_STATUSGenerator()
var soaRecord_STATUSGenerator gopter.Gen

// SoaRecord_STATUSGenerator returns a generator of SoaRecord_STATUS instances for property testing.
func SoaRecord_STATUSGenerator() gopter.Gen {
	if soaRecord_STATUSGenerator != nil {
		return soaRecord_STATUSGenerator
	}

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

	return soaRecord_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForSoaRecord_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSoaRecord_STATUS(gens map[string]gopter.Gen) {
	gens["Email"] = gen.PtrOf(gen.AlphaString())
	gens["ExpireTime"] = gen.PtrOf(gen.Int())
	gens["Host"] = gen.PtrOf(gen.AlphaString())
	gens["MinimumTtl"] = gen.PtrOf(gen.Int())
	gens["RefreshTime"] = gen.PtrOf(gen.Int())
	gens["RetryTime"] = gen.PtrOf(gen.Int())
	gens["SerialNumber"] = gen.PtrOf(gen.Int())
}

func Test_SrvRecord_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 SrvRecord_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForSrvRecord_STATUS, SrvRecord_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual SrvRecord_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 SrvRecord_STATUS instances for property testing - lazily instantiated by SrvRecord_STATUSGenerator()
var srvRecord_STATUSGenerator gopter.Gen

// SrvRecord_STATUSGenerator returns a generator of SrvRecord_STATUS instances for property testing.
func SrvRecord_STATUSGenerator() gopter.Gen {
	if srvRecord_STATUSGenerator != nil {
		return srvRecord_STATUSGenerator
	}

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

	return srvRecord_STATUSGenerator
}

// AddIndependentPropertyGeneratorsForSrvRecord_STATUS is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForSrvRecord_STATUS(gens map[string]gopter.Gen) {
	gens["Port"] = gen.PtrOf(gen.Int())
	gens["Priority"] = gen.PtrOf(gen.Int())
	gens["Target"] = gen.PtrOf(gen.AlphaString())
	gens["Weight"] = gen.PtrOf(gen.Int())
}

func Test_TxtRecord_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 TxtRecord_STATUS via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForTxtRecord_STATUS, TxtRecord_STATUSGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual TxtRecord_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 TxtRecord_STATUS instances for property testing - lazily instantiated by TxtRecord_STATUSGenerator()
var txtRecord_STATUSGenerator gopter.Gen

// TxtRecord_STATUSGenerator returns a generator of TxtRecord_STATUS instances for property testing.
func TxtRecord_STATUSGenerator() gopter.Gen {
	if txtRecord_STATUSGenerator != nil {
		return txtRecord_STATUSGenerator
	}

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

	return txtRecord_STATUSGenerator
}

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