// 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_AdmCredential_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 AdmCredential via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAdmCredential, AdmCredentialGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// AdmCredentialGenerator returns a generator of AdmCredential instances for property testing.
func AdmCredentialGenerator() gopter.Gen {
	if admCredentialGenerator != nil {
		return admCredentialGenerator
	}

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

	return admCredentialGenerator
}

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

func Test_AdmCredentialProperties_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 AdmCredentialProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForAdmCredentialProperties, AdmCredentialPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// AdmCredentialPropertiesGenerator returns a generator of AdmCredentialProperties instances for property testing.
func AdmCredentialPropertiesGenerator() gopter.Gen {
	if admCredentialPropertiesGenerator != nil {
		return admCredentialPropertiesGenerator
	}

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

	return admCredentialPropertiesGenerator
}

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

func Test_ApnsCredential_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 ApnsCredential via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForApnsCredential, ApnsCredentialGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// ApnsCredentialGenerator returns a generator of ApnsCredential instances for property testing.
func ApnsCredentialGenerator() gopter.Gen {
	if apnsCredentialGenerator != nil {
		return apnsCredentialGenerator
	}

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

	return apnsCredentialGenerator
}

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

func Test_ApnsCredentialProperties_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 ApnsCredentialProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForApnsCredentialProperties, ApnsCredentialPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// ApnsCredentialPropertiesGenerator returns a generator of ApnsCredentialProperties instances for property testing.
func ApnsCredentialPropertiesGenerator() gopter.Gen {
	if apnsCredentialPropertiesGenerator != nil {
		return apnsCredentialPropertiesGenerator
	}

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

	return apnsCredentialPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForApnsCredentialProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForApnsCredentialProperties(gens map[string]gopter.Gen) {
	gens["ApnsCertificate"] = gen.PtrOf(gen.AlphaString())
	gens["AppId"] = gen.PtrOf(gen.AlphaString())
	gens["AppName"] = gen.PtrOf(gen.AlphaString())
	gens["CertificateKey"] = gen.PtrOf(gen.AlphaString())
	gens["Endpoint"] = gen.PtrOf(gen.AlphaString())
	gens["KeyId"] = gen.PtrOf(gen.AlphaString())
	gens["Thumbprint"] = gen.PtrOf(gen.AlphaString())
	gens["Token"] = gen.PtrOf(gen.AlphaString())
}

func Test_BaiduCredential_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 BaiduCredential via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBaiduCredential, BaiduCredentialGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BaiduCredentialGenerator returns a generator of BaiduCredential instances for property testing.
func BaiduCredentialGenerator() gopter.Gen {
	if baiduCredentialGenerator != nil {
		return baiduCredentialGenerator
	}

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

	return baiduCredentialGenerator
}

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

func Test_BaiduCredentialProperties_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 BaiduCredentialProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBaiduCredentialProperties, BaiduCredentialPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BaiduCredentialPropertiesGenerator returns a generator of BaiduCredentialProperties instances for property testing.
func BaiduCredentialPropertiesGenerator() gopter.Gen {
	if baiduCredentialPropertiesGenerator != nil {
		return baiduCredentialPropertiesGenerator
	}

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

	return baiduCredentialPropertiesGenerator
}

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

func Test_BrowserCredential_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 BrowserCredential via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBrowserCredential, BrowserCredentialGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BrowserCredentialGenerator returns a generator of BrowserCredential instances for property testing.
func BrowserCredentialGenerator() gopter.Gen {
	if browserCredentialGenerator != nil {
		return browserCredentialGenerator
	}

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

	return browserCredentialGenerator
}

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

func Test_BrowserCredentialProperties_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 BrowserCredentialProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForBrowserCredentialProperties, BrowserCredentialPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// BrowserCredentialPropertiesGenerator returns a generator of BrowserCredentialProperties instances for property testing.
func BrowserCredentialPropertiesGenerator() gopter.Gen {
	if browserCredentialPropertiesGenerator != nil {
		return browserCredentialPropertiesGenerator
	}

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

	return browserCredentialPropertiesGenerator
}

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

func Test_GcmCredential_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 GcmCredential via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForGcmCredential, GcmCredentialGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// GcmCredentialGenerator returns a generator of GcmCredential instances for property testing.
func GcmCredentialGenerator() gopter.Gen {
	if gcmCredentialGenerator != nil {
		return gcmCredentialGenerator
	}

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

	return gcmCredentialGenerator
}

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

func Test_GcmCredentialProperties_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 GcmCredentialProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForGcmCredentialProperties, GcmCredentialPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// GcmCredentialPropertiesGenerator returns a generator of GcmCredentialProperties instances for property testing.
func GcmCredentialPropertiesGenerator() gopter.Gen {
	if gcmCredentialPropertiesGenerator != nil {
		return gcmCredentialPropertiesGenerator
	}

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

	return gcmCredentialPropertiesGenerator
}

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

func Test_MpnsCredential_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 MpnsCredential via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForMpnsCredential, MpnsCredentialGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// MpnsCredentialGenerator returns a generator of MpnsCredential instances for property testing.
func MpnsCredentialGenerator() gopter.Gen {
	if mpnsCredentialGenerator != nil {
		return mpnsCredentialGenerator
	}

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

	return mpnsCredentialGenerator
}

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

func Test_MpnsCredentialProperties_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 MpnsCredentialProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForMpnsCredentialProperties, MpnsCredentialPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// MpnsCredentialPropertiesGenerator returns a generator of MpnsCredentialProperties instances for property testing.
func MpnsCredentialPropertiesGenerator() gopter.Gen {
	if mpnsCredentialPropertiesGenerator != nil {
		return mpnsCredentialPropertiesGenerator
	}

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

	return mpnsCredentialPropertiesGenerator
}

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

func Test_NotificationHubProperties_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 NotificationHubProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForNotificationHubProperties, NotificationHubPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForNotificationHubProperties(generators)
	AddRelatedPropertyGeneratorsForNotificationHubProperties(generators)
	notificationHubPropertiesGenerator = gen.Struct(reflect.TypeOf(NotificationHubProperties{}), generators)

	return notificationHubPropertiesGenerator
}

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

// AddRelatedPropertyGeneratorsForNotificationHubProperties is a factory method for creating gopter generators
func AddRelatedPropertyGeneratorsForNotificationHubProperties(gens map[string]gopter.Gen) {
	gens["AdmCredential"] = gen.PtrOf(AdmCredentialGenerator())
	gens["ApnsCredential"] = gen.PtrOf(ApnsCredentialGenerator())
	gens["BaiduCredential"] = gen.PtrOf(BaiduCredentialGenerator())
	gens["BrowserCredential"] = gen.PtrOf(BrowserCredentialGenerator())
	gens["GcmCredential"] = gen.PtrOf(GcmCredentialGenerator())
	gens["MpnsCredential"] = gen.PtrOf(MpnsCredentialGenerator())
	gens["WnsCredential"] = gen.PtrOf(WnsCredentialGenerator())
	gens["XiaomiCredential"] = gen.PtrOf(XiaomiCredentialGenerator())
}

func Test_NotificationHub_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 NotificationHub_Spec via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForNotificationHub_Spec, NotificationHub_SpecGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

	// Deserialize back into memory
	var actual NotificationHub_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 NotificationHub_Spec instances for property testing - lazily instantiated by
// NotificationHub_SpecGenerator()
var notificationHub_SpecGenerator gopter.Gen

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

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

	// The above call to gen.Struct() captures the map, so create a new one
	generators = make(map[string]gopter.Gen)
	AddIndependentPropertyGeneratorsForNotificationHub_Spec(generators)
	AddRelatedPropertyGeneratorsForNotificationHub_Spec(generators)
	notificationHub_SpecGenerator = gen.Struct(reflect.TypeOf(NotificationHub_Spec{}), generators)

	return notificationHub_SpecGenerator
}

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

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

func Test_WnsCredential_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 WnsCredential via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWnsCredential, WnsCredentialGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WnsCredentialGenerator returns a generator of WnsCredential instances for property testing.
func WnsCredentialGenerator() gopter.Gen {
	if wnsCredentialGenerator != nil {
		return wnsCredentialGenerator
	}

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

	return wnsCredentialGenerator
}

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

func Test_WnsCredentialProperties_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 WnsCredentialProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForWnsCredentialProperties, WnsCredentialPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// WnsCredentialPropertiesGenerator returns a generator of WnsCredentialProperties instances for property testing.
func WnsCredentialPropertiesGenerator() gopter.Gen {
	if wnsCredentialPropertiesGenerator != nil {
		return wnsCredentialPropertiesGenerator
	}

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

	return wnsCredentialPropertiesGenerator
}

// AddIndependentPropertyGeneratorsForWnsCredentialProperties is a factory method for creating gopter generators
func AddIndependentPropertyGeneratorsForWnsCredentialProperties(gens map[string]gopter.Gen) {
	gens["CertificateKey"] = gen.PtrOf(gen.AlphaString())
	gens["PackageSid"] = gen.PtrOf(gen.AlphaString())
	gens["SecretKey"] = gen.PtrOf(gen.AlphaString())
	gens["WindowsLiveEndpoint"] = gen.PtrOf(gen.AlphaString())
	gens["WnsCertificate"] = gen.PtrOf(gen.AlphaString())
}

func Test_XiaomiCredential_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 XiaomiCredential via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForXiaomiCredential, XiaomiCredentialGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// XiaomiCredentialGenerator returns a generator of XiaomiCredential instances for property testing.
func XiaomiCredentialGenerator() gopter.Gen {
	if xiaomiCredentialGenerator != nil {
		return xiaomiCredentialGenerator
	}

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

	return xiaomiCredentialGenerator
}

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

func Test_XiaomiCredentialProperties_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 XiaomiCredentialProperties via JSON returns original",
		prop.ForAll(RunJSONSerializationTestForXiaomiCredentialProperties, XiaomiCredentialPropertiesGenerator()))
	properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout))
}

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

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

// XiaomiCredentialPropertiesGenerator returns a generator of XiaomiCredentialProperties instances for property testing.
func XiaomiCredentialPropertiesGenerator() gopter.Gen {
	if xiaomiCredentialPropertiesGenerator != nil {
		return xiaomiCredentialPropertiesGenerator
	}

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

	return xiaomiCredentialPropertiesGenerator
}

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