From 8757da636cefb2380930f2dfad0b98b31ca779c0 Mon Sep 17 00:00:00 2001 From: "Harshdeep Singh (harshdsingh)" <38904804+super-harsh@users.noreply.github.com> Date: Wed, 17 Apr 2024 16:51:21 +1200 Subject: [PATCH] Add support for Insight/Webtest 2022-06-15 (#3911) * Add support for Insight/Webtest 2022-06-15 * Update submodule * Add extra line * Merge main and run generator --- docs/hugo/content/reference/_index.md | 8 + .../hugo/content/reference/insights/_index.md | 8 + .../webtest_extension_types_gen.go | 6 +- .../storage/structure.txt | 195 +- .../storage/webtest_types_gen.go | 1879 +++++++++- .../storage/webtest_types_gen_test.go | 674 ++++ .../v1api20180501preview/webtest_types_gen.go | 297 +- .../webtest_types_gen_test.go | 3 +- .../v1api20220615/storage/structure.txt | 90 + .../storage/webtest_types_gen.go | 336 ++ .../storage/webtest_types_gen_test.go | 1066 ++++++ .../storage/zz_generated.deepcopy.go | 731 ++++ v2/api/insights/v1api20220615/structure.txt | 264 +- .../webtest_spec_arm_types_gen.go | 145 + .../webtest_spec_arm_types_gen_test.go | 584 +++ .../webtest_status_arm_types_gen.go | 139 + .../webtest_status_arm_types_gen_test.go | 588 +++ .../v1api20220615/webtest_types_gen.go | 3273 +++++++++++++++++ .../v1api20220615/webtest_types_gen_test.go | 1739 +++++++++ .../v1api20220615/zz_generated.deepcopy.go | 1235 +++++++ v2/api/insights/versions_matrix.md | 38 +- v2/azure-arm.yaml | 6 + .../controllers/controller_resources_gen.go | 12 +- .../crd_insights_component_test.go | 98 +- .../Test_Insights_Component_CRUD.yaml | 2068 +++++++---- .../insights/v1api/v1api20220615_webtest.yaml | 25 + 26 files changed, 14217 insertions(+), 1290 deletions(-) create mode 100644 v2/api/insights/v1api20220615/storage/webtest_types_gen.go create mode 100644 v2/api/insights/v1api20220615/storage/webtest_types_gen_test.go create mode 100644 v2/api/insights/v1api20220615/webtest_spec_arm_types_gen.go create mode 100644 v2/api/insights/v1api20220615/webtest_spec_arm_types_gen_test.go create mode 100644 v2/api/insights/v1api20220615/webtest_status_arm_types_gen.go create mode 100644 v2/api/insights/v1api20220615/webtest_status_arm_types_gen_test.go create mode 100644 v2/api/insights/v1api20220615/webtest_types_gen.go create mode 100644 v2/api/insights/v1api20220615/webtest_types_gen_test.go create mode 100644 v2/samples/insights/v1api/v1api20220615_webtest.yaml diff --git a/docs/hugo/content/reference/_index.md b/docs/hugo/content/reference/_index.md index 439997785bf..ca7776c9d02 100644 --- a/docs/hugo/content/reference/_index.md +++ b/docs/hugo/content/reference/_index.md @@ -380,6 +380,14 @@ These resource(s) are available for use in the current release of ASO. Different To install the CRDs for these resources, your ASO configuration must include `insights.azure.com/*` as a one of the configured CRD patterns. See [CRD Management in ASO](https://azure.github.io/azure-service-operator/guide/crd-management/) for details on doing this for both [Helm](https://azure.github.io/azure-service-operator/guide/crd-management/#helm) and [YAML](https://azure.github.io/azure-service-operator/guide/crd-management/#yaml) based installations. +### Next Release + +Development of these new resources is complete and they will be available in the next release of ASO. + +| Resource | ARM Version | CRD Version | Supported From | Sample | +|--------------------------------------------------------------------------------------------------------------------------------------|-------------|---------------|----------------|------------------------------------------------------------------------------------------------------------------------| +| [Webtest](https://azure.github.io/azure-service-operator/reference/insights/v1api20220615/#insights.azure.com/v1api20220615.Webtest) | 2022-06-15 | v1api20220615 | v2.7.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20220615_webtest.yaml) | + ### Released These resource(s) are available for use in the current release of ASO. Different versions of a given resource reflect different versions of the Azure ARM API. diff --git a/docs/hugo/content/reference/insights/_index.md b/docs/hugo/content/reference/insights/_index.md index 5891d5feea0..e6bc4224b0b 100644 --- a/docs/hugo/content/reference/insights/_index.md +++ b/docs/hugo/content/reference/insights/_index.md @@ -5,6 +5,14 @@ no_list: true --- To install the CRDs for these resources, your ASO configuration must include `insights.azure.com/*` as a one of the configured CRD patterns. See [CRD Management in ASO](https://azure.github.io/azure-service-operator/guide/crd-management/) for details on doing this for both [Helm](https://azure.github.io/azure-service-operator/guide/crd-management/#helm) and [YAML](https://azure.github.io/azure-service-operator/guide/crd-management/#yaml) based installations. +### Next Release + +Development of these new resources is complete and they will be available in the next release of ASO. + +| Resource | ARM Version | CRD Version | Supported From | Sample | +|--------------------------------------------------------------------------------------------------------------------------------------|-------------|---------------|----------------|------------------------------------------------------------------------------------------------------------------------| +| [Webtest](https://azure.github.io/azure-service-operator/reference/insights/v1api20220615/#insights.azure.com/v1api20220615.Webtest) | 2022-06-15 | v1api20220615 | v2.7.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20220615_webtest.yaml) | + ### Released These resource(s) are available for use in the current release of ASO. Different versions of a given resource reflect different versions of the Azure ARM API. diff --git a/v2/api/insights/customizations/webtest_extension_types_gen.go b/v2/api/insights/customizations/webtest_extension_types_gen.go index facb7d0afc0..e1996e28e07 100644 --- a/v2/api/insights/customizations/webtest_extension_types_gen.go +++ b/v2/api/insights/customizations/webtest_extension_types_gen.go @@ -6,6 +6,8 @@ package customizations import ( v20180501p "github.com/Azure/azure-service-operator/v2/api/insights/v1api20180501preview" v20180501ps "github.com/Azure/azure-service-operator/v2/api/insights/v1api20180501preview/storage" + v20220615 "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -16,5 +18,7 @@ type WebtestExtension struct { func (extension *WebtestExtension) GetExtendedResources() []genruntime.KubernetesResource { return []genruntime.KubernetesResource{ &v20180501p.Webtest{}, - &v20180501ps.Webtest{}} + &v20180501ps.Webtest{}, + &v20220615.Webtest{}, + &v20220615s.Webtest{}} } diff --git a/v2/api/insights/v1api20180501preview/storage/structure.txt b/v2/api/insights/v1api20180501preview/storage/structure.txt index 295b31a75c9..01a25ef0010 100644 --- a/v2/api/insights/v1api20180501preview/storage/structure.txt +++ b/v2/api/insights/v1api20180501preview/storage/structure.txt @@ -2,93 +2,108 @@ github.com/Azure/azure-service-operator/v2/api/insights/v1api20180501preview/storage ├── APIVersion: Enum (1 value) │ └── "2018-05-01-preview" -└── Webtest: Resource - ├── Owner: resources/v1apiv20191001.ResourceGroup - ├── Spec: Object (18 properties) - │ ├── AzureName: string - │ ├── Configuration: *Object (2 properties) - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── WebTest: *string - │ ├── Description: *string - │ ├── Enabled: *bool - │ ├── Frequency: *int - │ ├── Kind: *string - │ ├── Location: *string - │ ├── Locations: Object (2 properties)[] - │ │ ├── Id: *string - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── Name: *string - │ ├── OriginalVersion: string - │ ├── Owner: *genruntime.KnownResourceReference - │ ├── PropertyBag: genruntime.PropertyBag - │ ├── Request: *Object (7 properties) - │ │ ├── FollowRedirects: *bool - │ │ ├── Headers: Object (3 properties)[] - │ │ │ ├── Key: *string - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ └── Value: *string - │ │ ├── HttpVerb: *string - │ │ ├── ParseDependentRequests: *bool - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ ├── RequestBody: *string - │ │ └── RequestUrl: *string - │ ├── RetryEnabled: *bool - │ ├── SyntheticMonitorId: *string - │ ├── Tags: map[string]string - │ ├── Timeout: *int - │ └── ValidationRules: *Object (6 properties) - │ ├── ContentValidation: *Object (4 properties) - │ │ ├── ContentMatch: *string - │ │ ├── IgnoreCase: *bool - │ │ ├── PassIfTextFound: *bool - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── ExpectedHttpStatusCode: *int - │ ├── IgnoreHttpsStatusCode: *bool - │ ├── PropertyBag: genruntime.PropertyBag - │ ├── SSLCertRemainingLifetimeCheck: *int - │ └── SSLCheck: *bool - └── Status: Object (20 properties) - ├── Conditions: conditions.Condition[] - ├── Configuration: *Object (2 properties) - │ ├── PropertyBag: genruntime.PropertyBag - │ └── WebTest: *string - ├── Description: *string - ├── Enabled: *bool - ├── Frequency: *int - ├── Id: *string - ├── Kind: *string - ├── Location: *string - ├── Locations: Object (2 properties)[] - │ ├── Id: *string - │ └── PropertyBag: genruntime.PropertyBag - ├── Name: *string - ├── PropertiesName: *string - ├── PropertyBag: genruntime.PropertyBag - ├── ProvisioningState: *string - ├── Request: *Object (7 properties) - │ ├── FollowRedirects: *bool - │ ├── Headers: Object (3 properties)[] - │ │ ├── Key: *string - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── Value: *string - │ ├── HttpVerb: *string - │ ├── ParseDependentRequests: *bool - │ ├── PropertyBag: genruntime.PropertyBag - │ ├── RequestBody: *string - │ └── RequestUrl: *string - ├── RetryEnabled: *bool - ├── SyntheticMonitorId: *string - ├── Tags: map[string]string - ├── Timeout: *int - ├── Type: *string - └── ValidationRules: *Object (6 properties) - ├── ContentValidation: *Object (4 properties) - │ ├── ContentMatch: *string - │ ├── IgnoreCase: *bool - │ ├── PassIfTextFound: *bool - │ └── PropertyBag: genruntime.PropertyBag - ├── ExpectedHttpStatusCode: *int - ├── IgnoreHttpsStatusCode: *bool - ├── PropertyBag: genruntime.PropertyBag - ├── SSLCertRemainingLifetimeCheck: *int - └── SSLCheck: *bool +├── Webtest: Resource +│ ├── Owner: resources/v1apiv20191001.ResourceGroup +│ ├── Spec: Object (18 properties) +│ │ ├── AzureName: string +│ │ ├── Configuration: *Object (2 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── WebTest: *string +│ │ ├── Description: *string +│ │ ├── Enabled: *bool +│ │ ├── Frequency: *int +│ │ ├── Kind: *string +│ │ ├── Location: *string +│ │ ├── Locations: Object (2 properties)[] +│ │ │ ├── Id: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── Name: *string +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── Request: *Object (7 properties) +│ │ │ ├── FollowRedirects: *bool +│ │ │ ├── Headers: Object (3 properties)[] +│ │ │ │ ├── Key: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── Value: *string +│ │ │ ├── HttpVerb: *string +│ │ │ ├── ParseDependentRequests: *bool +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── RequestBody: *string +│ │ │ └── RequestUrl: *string +│ │ ├── RetryEnabled: *bool +│ │ ├── SyntheticMonitorId: *string +│ │ ├── Tags: map[string]string +│ │ ├── Timeout: *int +│ │ └── ValidationRules: *Object (6 properties) +│ │ ├── ContentValidation: *Object (4 properties) +│ │ │ ├── ContentMatch: *string +│ │ │ ├── IgnoreCase: *bool +│ │ │ ├── PassIfTextFound: *bool +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── ExpectedHttpStatusCode: *int +│ │ ├── IgnoreHttpsStatusCode: *bool +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── SSLCertRemainingLifetimeCheck: *int +│ │ └── SSLCheck: *bool +│ └── Status: Object (20 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Configuration: *Object (2 properties) +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── WebTest: *string +│ ├── Description: *string +│ ├── Enabled: *bool +│ ├── Frequency: *int +│ ├── Id: *string +│ ├── Kind: *string +│ ├── Location: *string +│ ├── Locations: Object (2 properties)[] +│ │ ├── Id: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Name: *string +│ ├── PropertiesName: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── ProvisioningState: *string +│ ├── Request: *Object (7 properties) +│ │ ├── FollowRedirects: *bool +│ │ ├── Headers: Object (3 properties)[] +│ │ │ ├── Key: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Value: *string +│ │ ├── HttpVerb: *string +│ │ ├── ParseDependentRequests: *bool +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── RequestBody: *string +│ │ └── RequestUrl: *string +│ ├── RetryEnabled: *bool +│ ├── SyntheticMonitorId: *string +│ ├── Tags: map[string]string +│ ├── Timeout: *int +│ ├── Type: *string +│ └── ValidationRules: *Object (6 properties) +│ ├── ContentValidation: *Object (4 properties) +│ │ ├── ContentMatch: *string +│ │ ├── IgnoreCase: *bool +│ │ ├── PassIfTextFound: *bool +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── ExpectedHttpStatusCode: *int +│ ├── IgnoreHttpsStatusCode: *bool +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── SSLCertRemainingLifetimeCheck: *int +│ └── SSLCheck: *bool +├── augmentConversionForHeaderField: Interface +├── augmentConversionForHeaderField_STATUS: Interface +├── augmentConversionForWebTestGeolocation: Interface +├── augmentConversionForWebTestGeolocation_STATUS: Interface +├── augmentConversionForWebTestProperties_Configuration: Interface +├── augmentConversionForWebTestProperties_Configuration_STATUS: Interface +├── augmentConversionForWebTestProperties_Request: Interface +├── augmentConversionForWebTestProperties_Request_STATUS: Interface +├── augmentConversionForWebTestProperties_ValidationRules: Interface +├── augmentConversionForWebTestProperties_ValidationRules_ContentValidation: Interface +├── augmentConversionForWebTestProperties_ValidationRules_ContentValidation_STATUS: Interface +├── augmentConversionForWebTestProperties_ValidationRules_STATUS: Interface +├── augmentConversionForWebtest: Interface +├── augmentConversionForWebtest_STATUS: Interface +└── augmentConversionForWebtest_Spec: Interface diff --git a/v2/api/insights/v1api20180501preview/storage/webtest_types_gen.go b/v2/api/insights/v1api20180501preview/storage/webtest_types_gen.go index 1818f1a31fa..10aef2cbea2 100644 --- a/v2/api/insights/v1api20180501preview/storage/webtest_types_gen.go +++ b/v2/api/insights/v1api20180501preview/storage/webtest_types_gen.go @@ -4,19 +4,18 @@ package storage import ( + "fmt" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// +kubebuilder:rbac:groups=insights.azure.com,resources=webtests,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=insights.azure.com,resources={webtests/status,webtests/finalizers},verbs=get;update;patch - // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" // +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" @@ -44,6 +43,28 @@ func (webtest *Webtest) SetConditions(conditions conditions.Conditions) { webtest.Status.Conditions = conditions } +var _ conversion.Convertible = &Webtest{} + +// ConvertFrom populates our Webtest from the provided hub Webtest +func (webtest *Webtest) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20220615s.Webtest) + if !ok { + return fmt.Errorf("expected insights/v1api20220615/storage/Webtest but received %T instead", hub) + } + + return webtest.AssignProperties_From_Webtest(source) +} + +// ConvertTo populates the provided hub Webtest from our Webtest +func (webtest *Webtest) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20220615s.Webtest) + if !ok { + return fmt.Errorf("expected insights/v1api20220615/storage/Webtest but received %T instead", hub) + } + + return webtest.AssignProperties_To_Webtest(destination) +} + var _ genruntime.KubernetesResource = &Webtest{} // AzureName returns the Azure name of the resource @@ -115,8 +136,75 @@ func (webtest *Webtest) SetStatus(status genruntime.ConvertibleStatus) error { return nil } -// Hub marks that this Webtest is the hub type for conversion -func (webtest *Webtest) Hub() {} +// AssignProperties_From_Webtest populates our Webtest from the provided source Webtest +func (webtest *Webtest) AssignProperties_From_Webtest(source *v20220615s.Webtest) error { + + // ObjectMeta + webtest.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec Webtest_Spec + err := spec.AssignProperties_From_Webtest_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Webtest_Spec() to populate field Spec") + } + webtest.Spec = spec + + // Status + var status Webtest_STATUS + err = status.AssignProperties_From_Webtest_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Webtest_STATUS() to populate field Status") + } + webtest.Status = status + + // Invoke the augmentConversionForWebtest interface (if implemented) to customize the conversion + var webtestAsAny any = webtest + if augmentedWebtest, ok := webtestAsAny.(augmentConversionForWebtest); ok { + err := augmentedWebtest.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Webtest populates the provided destination Webtest from our Webtest +func (webtest *Webtest) AssignProperties_To_Webtest(destination *v20220615s.Webtest) error { + + // ObjectMeta + destination.ObjectMeta = *webtest.ObjectMeta.DeepCopy() + + // Spec + var spec v20220615s.Webtest_Spec + err := webtest.Spec.AssignProperties_To_Webtest_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Webtest_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20220615s.Webtest_STATUS + err = webtest.Status.AssignProperties_To_Webtest_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Webtest_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForWebtest interface (if implemented) to customize the conversion + var webtestAsAny any = webtest + if augmentedWebtest, ok := webtestAsAny.(augmentConversionForWebtest); ok { + err := augmentedWebtest.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (webtest *Webtest) OriginalGVK() *schema.GroupVersionKind { @@ -144,6 +232,11 @@ type APIVersion string const APIVersion_Value = APIVersion("2018-05-01-preview") +type augmentConversionForWebtest interface { + AssignPropertiesFrom(src *v20220615s.Webtest) error + AssignPropertiesTo(dst *v20220615s.Webtest) error +} + // Storage version of v1api20180501preview.Webtest_Spec type Webtest_Spec struct { // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it @@ -177,20 +270,316 @@ var _ genruntime.ConvertibleSpec = &Webtest_Spec{} // ConvertSpecFrom populates our Webtest_Spec from the provided source func (webtest *Webtest_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == webtest { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20220615s.Webtest_Spec) + if ok { + // Populate our instance from source + return webtest.AssignProperties_From_Webtest_Spec(src) + } + + // Convert to an intermediate form + src = &v20220615s.Webtest_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") } - return source.ConvertSpecTo(webtest) + // Update our instance from src + err = webtest.AssignProperties_From_Webtest_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil } // ConvertSpecTo populates the provided destination from our Webtest_Spec func (webtest *Webtest_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == webtest { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20220615s.Webtest_Spec) + if ok { + // Populate destination from our instance + return webtest.AssignProperties_To_Webtest_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20220615s.Webtest_Spec{} + err := webtest.AssignProperties_To_Webtest_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_Webtest_Spec populates our Webtest_Spec from the provided source Webtest_Spec +func (webtest *Webtest_Spec) AssignProperties_From_Webtest_Spec(source *v20220615s.Webtest_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AzureName + webtest.AzureName = source.AzureName + + // Configuration + if source.Configuration != nil { + var configuration WebTestProperties_Configuration + err := configuration.AssignProperties_From_WebTestProperties_Configuration(source.Configuration) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_Configuration() to populate field Configuration") + } + webtest.Configuration = &configuration + } else { + webtest.Configuration = nil + } + + // Description + webtest.Description = genruntime.ClonePointerToString(source.Description) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + webtest.Enabled = &enabled + } else { + webtest.Enabled = nil + } + + // Frequency + webtest.Frequency = genruntime.ClonePointerToInt(source.Frequency) + + // Kind + webtest.Kind = genruntime.ClonePointerToString(source.Kind) + + // Location + webtest.Location = genruntime.ClonePointerToString(source.Location) + + // Locations + if source.Locations != nil { + locationList := make([]WebTestGeolocation, len(source.Locations)) + for locationIndex, locationItem := range source.Locations { + // Shadow the loop variable to avoid aliasing + locationItem := locationItem + var location WebTestGeolocation + err := location.AssignProperties_From_WebTestGeolocation(&locationItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestGeolocation() to populate field Locations") + } + locationList[locationIndex] = location + } + webtest.Locations = locationList + } else { + webtest.Locations = nil + } + + // Name + webtest.Name = genruntime.ClonePointerToString(source.Name) + + // OriginalVersion + webtest.OriginalVersion = source.OriginalVersion + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + webtest.Owner = &owner + } else { + webtest.Owner = nil + } + + // Request + if source.Request != nil { + var request WebTestProperties_Request + err := request.AssignProperties_From_WebTestProperties_Request(source.Request) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_Request() to populate field Request") + } + webtest.Request = &request + } else { + webtest.Request = nil + } + + // RetryEnabled + if source.RetryEnabled != nil { + retryEnabled := *source.RetryEnabled + webtest.RetryEnabled = &retryEnabled + } else { + webtest.RetryEnabled = nil + } + + // SyntheticMonitorId + webtest.SyntheticMonitorId = genruntime.ClonePointerToString(source.SyntheticMonitorId) + + // Tags + webtest.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // Timeout + webtest.Timeout = genruntime.ClonePointerToInt(source.Timeout) + + // ValidationRules + if source.ValidationRules != nil { + var validationRule WebTestProperties_ValidationRules + err := validationRule.AssignProperties_From_WebTestProperties_ValidationRules(source.ValidationRules) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_ValidationRules() to populate field ValidationRules") + } + webtest.ValidationRules = &validationRule + } else { + webtest.ValidationRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + webtest.PropertyBag = propertyBag + } else { + webtest.PropertyBag = nil + } + + // Invoke the augmentConversionForWebtest_Spec interface (if implemented) to customize the conversion + var webtestAsAny any = webtest + if augmentedWebtest, ok := webtestAsAny.(augmentConversionForWebtest_Spec); ok { + err := augmentedWebtest.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Webtest_Spec populates the provided destination Webtest_Spec from our Webtest_Spec +func (webtest *Webtest_Spec) AssignProperties_To_Webtest_Spec(destination *v20220615s.Webtest_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(webtest.PropertyBag) + + // AzureName + destination.AzureName = webtest.AzureName + + // Configuration + if webtest.Configuration != nil { + var configuration v20220615s.WebTestProperties_Configuration + err := webtest.Configuration.AssignProperties_To_WebTestProperties_Configuration(&configuration) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_Configuration() to populate field Configuration") + } + destination.Configuration = &configuration + } else { + destination.Configuration = nil + } + + // Description + destination.Description = genruntime.ClonePointerToString(webtest.Description) + + // Enabled + if webtest.Enabled != nil { + enabled := *webtest.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Frequency + destination.Frequency = genruntime.ClonePointerToInt(webtest.Frequency) + + // Kind + destination.Kind = genruntime.ClonePointerToString(webtest.Kind) + + // Location + destination.Location = genruntime.ClonePointerToString(webtest.Location) + + // Locations + if webtest.Locations != nil { + locationList := make([]v20220615s.WebTestGeolocation, len(webtest.Locations)) + for locationIndex, locationItem := range webtest.Locations { + // Shadow the loop variable to avoid aliasing + locationItem := locationItem + var location v20220615s.WebTestGeolocation + err := locationItem.AssignProperties_To_WebTestGeolocation(&location) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestGeolocation() to populate field Locations") + } + locationList[locationIndex] = location + } + destination.Locations = locationList + } else { + destination.Locations = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(webtest.Name) + + // OriginalVersion + destination.OriginalVersion = webtest.OriginalVersion + + // Owner + if webtest.Owner != nil { + owner := webtest.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Request + if webtest.Request != nil { + var request v20220615s.WebTestProperties_Request + err := webtest.Request.AssignProperties_To_WebTestProperties_Request(&request) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_Request() to populate field Request") + } + destination.Request = &request + } else { + destination.Request = nil + } + + // RetryEnabled + if webtest.RetryEnabled != nil { + retryEnabled := *webtest.RetryEnabled + destination.RetryEnabled = &retryEnabled + } else { + destination.RetryEnabled = nil + } + + // SyntheticMonitorId + destination.SyntheticMonitorId = genruntime.ClonePointerToString(webtest.SyntheticMonitorId) + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(webtest.Tags) + + // Timeout + destination.Timeout = genruntime.ClonePointerToInt(webtest.Timeout) + + // ValidationRules + if webtest.ValidationRules != nil { + var validationRule v20220615s.WebTestProperties_ValidationRules + err := webtest.ValidationRules.AssignProperties_To_WebTestProperties_ValidationRules(&validationRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_ValidationRules() to populate field ValidationRules") + } + destination.ValidationRules = &validationRule + } else { + destination.ValidationRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil } - return destination.ConvertSpecFrom(webtest) + // Invoke the augmentConversionForWebtest_Spec interface (if implemented) to customize the conversion + var webtestAsAny any = webtest + if augmentedWebtest, ok := webtestAsAny.(augmentConversionForWebtest_Spec); ok { + err := augmentedWebtest.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20180501preview.Webtest_STATUS @@ -221,20 +610,328 @@ var _ genruntime.ConvertibleStatus = &Webtest_STATUS{} // ConvertStatusFrom populates our Webtest_STATUS from the provided source func (webtest *Webtest_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == webtest { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + src, ok := source.(*v20220615s.Webtest_STATUS) + if ok { + // Populate our instance from source + return webtest.AssignProperties_From_Webtest_STATUS(src) + } + + // Convert to an intermediate form + src = &v20220615s.Webtest_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = webtest.AssignProperties_From_Webtest_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") } - return source.ConvertStatusTo(webtest) + return nil } // ConvertStatusTo populates the provided destination from our Webtest_STATUS func (webtest *Webtest_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == webtest { - return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + dst, ok := destination.(*v20220615s.Webtest_STATUS) + if ok { + // Populate destination from our instance + return webtest.AssignProperties_To_Webtest_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20220615s.Webtest_STATUS{} + err := webtest.AssignProperties_To_Webtest_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") } - return destination.ConvertStatusFrom(webtest) + return nil +} + +// AssignProperties_From_Webtest_STATUS populates our Webtest_STATUS from the provided source Webtest_STATUS +func (webtest *Webtest_STATUS) AssignProperties_From_Webtest_STATUS(source *v20220615s.Webtest_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Conditions + webtest.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Configuration + if source.Configuration != nil { + var configuration WebTestProperties_Configuration_STATUS + err := configuration.AssignProperties_From_WebTestProperties_Configuration_STATUS(source.Configuration) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_Configuration_STATUS() to populate field Configuration") + } + webtest.Configuration = &configuration + } else { + webtest.Configuration = nil + } + + // Description + webtest.Description = genruntime.ClonePointerToString(source.Description) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + webtest.Enabled = &enabled + } else { + webtest.Enabled = nil + } + + // Frequency + webtest.Frequency = genruntime.ClonePointerToInt(source.Frequency) + + // Id + webtest.Id = genruntime.ClonePointerToString(source.Id) + + // Kind + webtest.Kind = genruntime.ClonePointerToString(source.Kind) + + // Location + webtest.Location = genruntime.ClonePointerToString(source.Location) + + // Locations + if source.Locations != nil { + locationList := make([]WebTestGeolocation_STATUS, len(source.Locations)) + for locationIndex, locationItem := range source.Locations { + // Shadow the loop variable to avoid aliasing + locationItem := locationItem + var location WebTestGeolocation_STATUS + err := location.AssignProperties_From_WebTestGeolocation_STATUS(&locationItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestGeolocation_STATUS() to populate field Locations") + } + locationList[locationIndex] = location + } + webtest.Locations = locationList + } else { + webtest.Locations = nil + } + + // Name + webtest.Name = genruntime.ClonePointerToString(source.Name) + + // PropertiesName + webtest.PropertiesName = genruntime.ClonePointerToString(source.PropertiesName) + + // ProvisioningState + webtest.ProvisioningState = genruntime.ClonePointerToString(source.ProvisioningState) + + // Request + if source.Request != nil { + var request WebTestProperties_Request_STATUS + err := request.AssignProperties_From_WebTestProperties_Request_STATUS(source.Request) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_Request_STATUS() to populate field Request") + } + webtest.Request = &request + } else { + webtest.Request = nil + } + + // RetryEnabled + if source.RetryEnabled != nil { + retryEnabled := *source.RetryEnabled + webtest.RetryEnabled = &retryEnabled + } else { + webtest.RetryEnabled = nil + } + + // SyntheticMonitorId + webtest.SyntheticMonitorId = genruntime.ClonePointerToString(source.SyntheticMonitorId) + + // Tags + webtest.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // Timeout + webtest.Timeout = genruntime.ClonePointerToInt(source.Timeout) + + // Type + webtest.Type = genruntime.ClonePointerToString(source.Type) + + // ValidationRules + if source.ValidationRules != nil { + var validationRule WebTestProperties_ValidationRules_STATUS + err := validationRule.AssignProperties_From_WebTestProperties_ValidationRules_STATUS(source.ValidationRules) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_ValidationRules_STATUS() to populate field ValidationRules") + } + webtest.ValidationRules = &validationRule + } else { + webtest.ValidationRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + webtest.PropertyBag = propertyBag + } else { + webtest.PropertyBag = nil + } + + // Invoke the augmentConversionForWebtest_STATUS interface (if implemented) to customize the conversion + var webtestAsAny any = webtest + if augmentedWebtest, ok := webtestAsAny.(augmentConversionForWebtest_STATUS); ok { + err := augmentedWebtest.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Webtest_STATUS populates the provided destination Webtest_STATUS from our Webtest_STATUS +func (webtest *Webtest_STATUS) AssignProperties_To_Webtest_STATUS(destination *v20220615s.Webtest_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(webtest.PropertyBag) + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(webtest.Conditions) + + // Configuration + if webtest.Configuration != nil { + var configuration v20220615s.WebTestProperties_Configuration_STATUS + err := webtest.Configuration.AssignProperties_To_WebTestProperties_Configuration_STATUS(&configuration) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_Configuration_STATUS() to populate field Configuration") + } + destination.Configuration = &configuration + } else { + destination.Configuration = nil + } + + // Description + destination.Description = genruntime.ClonePointerToString(webtest.Description) + + // Enabled + if webtest.Enabled != nil { + enabled := *webtest.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Frequency + destination.Frequency = genruntime.ClonePointerToInt(webtest.Frequency) + + // Id + destination.Id = genruntime.ClonePointerToString(webtest.Id) + + // Kind + destination.Kind = genruntime.ClonePointerToString(webtest.Kind) + + // Location + destination.Location = genruntime.ClonePointerToString(webtest.Location) + + // Locations + if webtest.Locations != nil { + locationList := make([]v20220615s.WebTestGeolocation_STATUS, len(webtest.Locations)) + for locationIndex, locationItem := range webtest.Locations { + // Shadow the loop variable to avoid aliasing + locationItem := locationItem + var location v20220615s.WebTestGeolocation_STATUS + err := locationItem.AssignProperties_To_WebTestGeolocation_STATUS(&location) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestGeolocation_STATUS() to populate field Locations") + } + locationList[locationIndex] = location + } + destination.Locations = locationList + } else { + destination.Locations = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(webtest.Name) + + // PropertiesName + destination.PropertiesName = genruntime.ClonePointerToString(webtest.PropertiesName) + + // ProvisioningState + destination.ProvisioningState = genruntime.ClonePointerToString(webtest.ProvisioningState) + + // Request + if webtest.Request != nil { + var request v20220615s.WebTestProperties_Request_STATUS + err := webtest.Request.AssignProperties_To_WebTestProperties_Request_STATUS(&request) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_Request_STATUS() to populate field Request") + } + destination.Request = &request + } else { + destination.Request = nil + } + + // RetryEnabled + if webtest.RetryEnabled != nil { + retryEnabled := *webtest.RetryEnabled + destination.RetryEnabled = &retryEnabled + } else { + destination.RetryEnabled = nil + } + + // SyntheticMonitorId + destination.SyntheticMonitorId = genruntime.ClonePointerToString(webtest.SyntheticMonitorId) + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(webtest.Tags) + + // Timeout + destination.Timeout = genruntime.ClonePointerToInt(webtest.Timeout) + + // Type + destination.Type = genruntime.ClonePointerToString(webtest.Type) + + // ValidationRules + if webtest.ValidationRules != nil { + var validationRule v20220615s.WebTestProperties_ValidationRules_STATUS + err := webtest.ValidationRules.AssignProperties_To_WebTestProperties_ValidationRules_STATUS(&validationRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_ValidationRules_STATUS() to populate field ValidationRules") + } + destination.ValidationRules = &validationRule + } else { + destination.ValidationRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebtest_STATUS interface (if implemented) to customize the conversion + var webtestAsAny any = webtest + if augmentedWebtest, ok := webtestAsAny.(augmentConversionForWebtest_STATUS); ok { + err := augmentedWebtest.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForWebtest_Spec interface { + AssignPropertiesFrom(src *v20220615s.Webtest_Spec) error + AssignPropertiesTo(dst *v20220615s.Webtest_Spec) error +} + +type augmentConversionForWebtest_STATUS interface { + AssignPropertiesFrom(src *v20220615s.Webtest_STATUS) error + AssignPropertiesTo(dst *v20220615s.Webtest_STATUS) error } // Storage version of v1api20180501preview.WebTestGeolocation @@ -244,6 +941,62 @@ type WebTestGeolocation struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_WebTestGeolocation populates our WebTestGeolocation from the provided source WebTestGeolocation +func (geolocation *WebTestGeolocation) AssignProperties_From_WebTestGeolocation(source *v20220615s.WebTestGeolocation) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Id + geolocation.Id = genruntime.ClonePointerToString(source.Id) + + // Update the property bag + if len(propertyBag) > 0 { + geolocation.PropertyBag = propertyBag + } else { + geolocation.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestGeolocation interface (if implemented) to customize the conversion + var geolocationAsAny any = geolocation + if augmentedGeolocation, ok := geolocationAsAny.(augmentConversionForWebTestGeolocation); ok { + err := augmentedGeolocation.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_WebTestGeolocation populates the provided destination WebTestGeolocation from our WebTestGeolocation +func (geolocation *WebTestGeolocation) AssignProperties_To_WebTestGeolocation(destination *v20220615s.WebTestGeolocation) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(geolocation.PropertyBag) + + // Id + destination.Id = genruntime.ClonePointerToString(geolocation.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestGeolocation interface (if implemented) to customize the conversion + var geolocationAsAny any = geolocation + if augmentedGeolocation, ok := geolocationAsAny.(augmentConversionForWebTestGeolocation); ok { + err := augmentedGeolocation.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20180501preview.WebTestGeolocation_STATUS // Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. type WebTestGeolocation_STATUS struct { @@ -251,21 +1004,189 @@ type WebTestGeolocation_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_WebTestGeolocation_STATUS populates our WebTestGeolocation_STATUS from the provided source WebTestGeolocation_STATUS +func (geolocation *WebTestGeolocation_STATUS) AssignProperties_From_WebTestGeolocation_STATUS(source *v20220615s.WebTestGeolocation_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Id + geolocation.Id = genruntime.ClonePointerToString(source.Id) + + // Update the property bag + if len(propertyBag) > 0 { + geolocation.PropertyBag = propertyBag + } else { + geolocation.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestGeolocation_STATUS interface (if implemented) to customize the conversion + var geolocationAsAny any = geolocation + if augmentedGeolocation, ok := geolocationAsAny.(augmentConversionForWebTestGeolocation_STATUS); ok { + err := augmentedGeolocation.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_WebTestGeolocation_STATUS populates the provided destination WebTestGeolocation_STATUS from our WebTestGeolocation_STATUS +func (geolocation *WebTestGeolocation_STATUS) AssignProperties_To_WebTestGeolocation_STATUS(destination *v20220615s.WebTestGeolocation_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(geolocation.PropertyBag) + + // Id + destination.Id = genruntime.ClonePointerToString(geolocation.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestGeolocation_STATUS interface (if implemented) to customize the conversion + var geolocationAsAny any = geolocation + if augmentedGeolocation, ok := geolocationAsAny.(augmentConversionForWebTestGeolocation_STATUS); ok { + err := augmentedGeolocation.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20180501preview.WebTestProperties_Configuration type WebTestProperties_Configuration struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` WebTest *string `json:"WebTest,omitempty"` } +// AssignProperties_From_WebTestProperties_Configuration populates our WebTestProperties_Configuration from the provided source WebTestProperties_Configuration +func (configuration *WebTestProperties_Configuration) AssignProperties_From_WebTestProperties_Configuration(source *v20220615s.WebTestProperties_Configuration) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // WebTest + configuration.WebTest = genruntime.ClonePointerToString(source.WebTest) + + // Update the property bag + if len(propertyBag) > 0 { + configuration.PropertyBag = propertyBag + } else { + configuration.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_Configuration interface (if implemented) to customize the conversion + var configurationAsAny any = configuration + if augmentedConfiguration, ok := configurationAsAny.(augmentConversionForWebTestProperties_Configuration); ok { + err := augmentedConfiguration.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_Configuration populates the provided destination WebTestProperties_Configuration from our WebTestProperties_Configuration +func (configuration *WebTestProperties_Configuration) AssignProperties_To_WebTestProperties_Configuration(destination *v20220615s.WebTestProperties_Configuration) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(configuration.PropertyBag) + + // WebTest + destination.WebTest = genruntime.ClonePointerToString(configuration.WebTest) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_Configuration interface (if implemented) to customize the conversion + var configurationAsAny any = configuration + if augmentedConfiguration, ok := configurationAsAny.(augmentConversionForWebTestProperties_Configuration); ok { + err := augmentedConfiguration.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20180501preview.WebTestProperties_Configuration_STATUS type WebTestProperties_Configuration_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` WebTest *string `json:"WebTest,omitempty"` } -// Storage version of v1api20180501preview.WebTestProperties_Request -type WebTestProperties_Request struct { - FollowRedirects *bool `json:"FollowRedirects,omitempty"` +// AssignProperties_From_WebTestProperties_Configuration_STATUS populates our WebTestProperties_Configuration_STATUS from the provided source WebTestProperties_Configuration_STATUS +func (configuration *WebTestProperties_Configuration_STATUS) AssignProperties_From_WebTestProperties_Configuration_STATUS(source *v20220615s.WebTestProperties_Configuration_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // WebTest + configuration.WebTest = genruntime.ClonePointerToString(source.WebTest) + + // Update the property bag + if len(propertyBag) > 0 { + configuration.PropertyBag = propertyBag + } else { + configuration.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_Configuration_STATUS interface (if implemented) to customize the conversion + var configurationAsAny any = configuration + if augmentedConfiguration, ok := configurationAsAny.(augmentConversionForWebTestProperties_Configuration_STATUS); ok { + err := augmentedConfiguration.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_Configuration_STATUS populates the provided destination WebTestProperties_Configuration_STATUS from our WebTestProperties_Configuration_STATUS +func (configuration *WebTestProperties_Configuration_STATUS) AssignProperties_To_WebTestProperties_Configuration_STATUS(destination *v20220615s.WebTestProperties_Configuration_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(configuration.PropertyBag) + + // WebTest + destination.WebTest = genruntime.ClonePointerToString(configuration.WebTest) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_Configuration_STATUS interface (if implemented) to customize the conversion + var configurationAsAny any = configuration + if augmentedConfiguration, ok := configurationAsAny.(augmentConversionForWebTestProperties_Configuration_STATUS); ok { + err := augmentedConfiguration.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20180501preview.WebTestProperties_Request +type WebTestProperties_Request struct { + FollowRedirects *bool `json:"FollowRedirects,omitempty"` Headers []HeaderField `json:"Headers,omitempty"` HttpVerb *string `json:"HttpVerb,omitempty"` ParseDependentRequests *bool `json:"ParseDependentRequests,omitempty"` @@ -274,6 +1195,142 @@ type WebTestProperties_Request struct { RequestUrl *string `json:"RequestUrl,omitempty"` } +// AssignProperties_From_WebTestProperties_Request populates our WebTestProperties_Request from the provided source WebTestProperties_Request +func (request *WebTestProperties_Request) AssignProperties_From_WebTestProperties_Request(source *v20220615s.WebTestProperties_Request) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // FollowRedirects + if source.FollowRedirects != nil { + followRedirect := *source.FollowRedirects + request.FollowRedirects = &followRedirect + } else { + request.FollowRedirects = nil + } + + // Headers + if source.Headers != nil { + headerList := make([]HeaderField, len(source.Headers)) + for headerIndex, headerItem := range source.Headers { + // Shadow the loop variable to avoid aliasing + headerItem := headerItem + var header HeaderField + err := header.AssignProperties_From_HeaderField(&headerItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_HeaderField() to populate field Headers") + } + headerList[headerIndex] = header + } + request.Headers = headerList + } else { + request.Headers = nil + } + + // HttpVerb + request.HttpVerb = genruntime.ClonePointerToString(source.HttpVerb) + + // ParseDependentRequests + if source.ParseDependentRequests != nil { + parseDependentRequest := *source.ParseDependentRequests + request.ParseDependentRequests = &parseDependentRequest + } else { + request.ParseDependentRequests = nil + } + + // RequestBody + request.RequestBody = genruntime.ClonePointerToString(source.RequestBody) + + // RequestUrl + request.RequestUrl = genruntime.ClonePointerToString(source.RequestUrl) + + // Update the property bag + if len(propertyBag) > 0 { + request.PropertyBag = propertyBag + } else { + request.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_Request interface (if implemented) to customize the conversion + var requestAsAny any = request + if augmentedRequest, ok := requestAsAny.(augmentConversionForWebTestProperties_Request); ok { + err := augmentedRequest.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_Request populates the provided destination WebTestProperties_Request from our WebTestProperties_Request +func (request *WebTestProperties_Request) AssignProperties_To_WebTestProperties_Request(destination *v20220615s.WebTestProperties_Request) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(request.PropertyBag) + + // FollowRedirects + if request.FollowRedirects != nil { + followRedirect := *request.FollowRedirects + destination.FollowRedirects = &followRedirect + } else { + destination.FollowRedirects = nil + } + + // Headers + if request.Headers != nil { + headerList := make([]v20220615s.HeaderField, len(request.Headers)) + for headerIndex, headerItem := range request.Headers { + // Shadow the loop variable to avoid aliasing + headerItem := headerItem + var header v20220615s.HeaderField + err := headerItem.AssignProperties_To_HeaderField(&header) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_HeaderField() to populate field Headers") + } + headerList[headerIndex] = header + } + destination.Headers = headerList + } else { + destination.Headers = nil + } + + // HttpVerb + destination.HttpVerb = genruntime.ClonePointerToString(request.HttpVerb) + + // ParseDependentRequests + if request.ParseDependentRequests != nil { + parseDependentRequest := *request.ParseDependentRequests + destination.ParseDependentRequests = &parseDependentRequest + } else { + destination.ParseDependentRequests = nil + } + + // RequestBody + destination.RequestBody = genruntime.ClonePointerToString(request.RequestBody) + + // RequestUrl + destination.RequestUrl = genruntime.ClonePointerToString(request.RequestUrl) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_Request interface (if implemented) to customize the conversion + var requestAsAny any = request + if augmentedRequest, ok := requestAsAny.(augmentConversionForWebTestProperties_Request); ok { + err := augmentedRequest.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20180501preview.WebTestProperties_Request_STATUS type WebTestProperties_Request_STATUS struct { FollowRedirects *bool `json:"FollowRedirects,omitempty"` @@ -285,6 +1342,142 @@ type WebTestProperties_Request_STATUS struct { RequestUrl *string `json:"RequestUrl,omitempty"` } +// AssignProperties_From_WebTestProperties_Request_STATUS populates our WebTestProperties_Request_STATUS from the provided source WebTestProperties_Request_STATUS +func (request *WebTestProperties_Request_STATUS) AssignProperties_From_WebTestProperties_Request_STATUS(source *v20220615s.WebTestProperties_Request_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // FollowRedirects + if source.FollowRedirects != nil { + followRedirect := *source.FollowRedirects + request.FollowRedirects = &followRedirect + } else { + request.FollowRedirects = nil + } + + // Headers + if source.Headers != nil { + headerList := make([]HeaderField_STATUS, len(source.Headers)) + for headerIndex, headerItem := range source.Headers { + // Shadow the loop variable to avoid aliasing + headerItem := headerItem + var header HeaderField_STATUS + err := header.AssignProperties_From_HeaderField_STATUS(&headerItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_HeaderField_STATUS() to populate field Headers") + } + headerList[headerIndex] = header + } + request.Headers = headerList + } else { + request.Headers = nil + } + + // HttpVerb + request.HttpVerb = genruntime.ClonePointerToString(source.HttpVerb) + + // ParseDependentRequests + if source.ParseDependentRequests != nil { + parseDependentRequest := *source.ParseDependentRequests + request.ParseDependentRequests = &parseDependentRequest + } else { + request.ParseDependentRequests = nil + } + + // RequestBody + request.RequestBody = genruntime.ClonePointerToString(source.RequestBody) + + // RequestUrl + request.RequestUrl = genruntime.ClonePointerToString(source.RequestUrl) + + // Update the property bag + if len(propertyBag) > 0 { + request.PropertyBag = propertyBag + } else { + request.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_Request_STATUS interface (if implemented) to customize the conversion + var requestAsAny any = request + if augmentedRequest, ok := requestAsAny.(augmentConversionForWebTestProperties_Request_STATUS); ok { + err := augmentedRequest.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_Request_STATUS populates the provided destination WebTestProperties_Request_STATUS from our WebTestProperties_Request_STATUS +func (request *WebTestProperties_Request_STATUS) AssignProperties_To_WebTestProperties_Request_STATUS(destination *v20220615s.WebTestProperties_Request_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(request.PropertyBag) + + // FollowRedirects + if request.FollowRedirects != nil { + followRedirect := *request.FollowRedirects + destination.FollowRedirects = &followRedirect + } else { + destination.FollowRedirects = nil + } + + // Headers + if request.Headers != nil { + headerList := make([]v20220615s.HeaderField_STATUS, len(request.Headers)) + for headerIndex, headerItem := range request.Headers { + // Shadow the loop variable to avoid aliasing + headerItem := headerItem + var header v20220615s.HeaderField_STATUS + err := headerItem.AssignProperties_To_HeaderField_STATUS(&header) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_HeaderField_STATUS() to populate field Headers") + } + headerList[headerIndex] = header + } + destination.Headers = headerList + } else { + destination.Headers = nil + } + + // HttpVerb + destination.HttpVerb = genruntime.ClonePointerToString(request.HttpVerb) + + // ParseDependentRequests + if request.ParseDependentRequests != nil { + parseDependentRequest := *request.ParseDependentRequests + destination.ParseDependentRequests = &parseDependentRequest + } else { + destination.ParseDependentRequests = nil + } + + // RequestBody + destination.RequestBody = genruntime.ClonePointerToString(request.RequestBody) + + // RequestUrl + destination.RequestUrl = genruntime.ClonePointerToString(request.RequestUrl) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_Request_STATUS interface (if implemented) to customize the conversion + var requestAsAny any = request + if augmentedRequest, ok := requestAsAny.(augmentConversionForWebTestProperties_Request_STATUS); ok { + err := augmentedRequest.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20180501preview.WebTestProperties_ValidationRules type WebTestProperties_ValidationRules struct { ContentValidation *WebTestProperties_ValidationRules_ContentValidation `json:"ContentValidation,omitempty"` @@ -295,6 +1488,148 @@ type WebTestProperties_ValidationRules struct { SSLCheck *bool `json:"SSLCheck,omitempty"` } +// AssignProperties_From_WebTestProperties_ValidationRules populates our WebTestProperties_ValidationRules from the provided source WebTestProperties_ValidationRules +func (rules *WebTestProperties_ValidationRules) AssignProperties_From_WebTestProperties_ValidationRules(source *v20220615s.WebTestProperties_ValidationRules) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ContentValidation + if source.ContentValidation != nil { + var contentValidation WebTestProperties_ValidationRules_ContentValidation + err := contentValidation.AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation(source.ContentValidation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation() to populate field ContentValidation") + } + rules.ContentValidation = &contentValidation + } else { + rules.ContentValidation = nil + } + + // ExpectedHttpStatusCode + rules.ExpectedHttpStatusCode = genruntime.ClonePointerToInt(source.ExpectedHttpStatusCode) + + // IgnoreHttpStatusCode + if source.IgnoreHttpStatusCode != nil { + propertyBag.Add("IgnoreHttpStatusCode", *source.IgnoreHttpStatusCode) + } else { + propertyBag.Remove("IgnoreHttpStatusCode") + } + + // IgnoreHttpsStatusCode + if propertyBag.Contains("IgnoreHttpsStatusCode") { + var ignoreHttpsStatusCode bool + err := propertyBag.Pull("IgnoreHttpsStatusCode", &ignoreHttpsStatusCode) + if err != nil { + return errors.Wrap(err, "pulling 'IgnoreHttpsStatusCode' from propertyBag") + } + + rules.IgnoreHttpsStatusCode = &ignoreHttpsStatusCode + } else { + rules.IgnoreHttpsStatusCode = nil + } + + // SSLCertRemainingLifetimeCheck + rules.SSLCertRemainingLifetimeCheck = genruntime.ClonePointerToInt(source.SSLCertRemainingLifetimeCheck) + + // SSLCheck + if source.SSLCheck != nil { + sslCheck := *source.SSLCheck + rules.SSLCheck = &sslCheck + } else { + rules.SSLCheck = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + rules.PropertyBag = propertyBag + } else { + rules.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_ValidationRules interface (if implemented) to customize the conversion + var rulesAsAny any = rules + if augmentedRules, ok := rulesAsAny.(augmentConversionForWebTestProperties_ValidationRules); ok { + err := augmentedRules.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_ValidationRules populates the provided destination WebTestProperties_ValidationRules from our WebTestProperties_ValidationRules +func (rules *WebTestProperties_ValidationRules) AssignProperties_To_WebTestProperties_ValidationRules(destination *v20220615s.WebTestProperties_ValidationRules) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rules.PropertyBag) + + // ContentValidation + if rules.ContentValidation != nil { + var contentValidation v20220615s.WebTestProperties_ValidationRules_ContentValidation + err := rules.ContentValidation.AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation(&contentValidation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation() to populate field ContentValidation") + } + destination.ContentValidation = &contentValidation + } else { + destination.ContentValidation = nil + } + + // ExpectedHttpStatusCode + destination.ExpectedHttpStatusCode = genruntime.ClonePointerToInt(rules.ExpectedHttpStatusCode) + + // IgnoreHttpStatusCode + if propertyBag.Contains("IgnoreHttpStatusCode") { + var ignoreHttpStatusCode bool + err := propertyBag.Pull("IgnoreHttpStatusCode", &ignoreHttpStatusCode) + if err != nil { + return errors.Wrap(err, "pulling 'IgnoreHttpStatusCode' from propertyBag") + } + + destination.IgnoreHttpStatusCode = &ignoreHttpStatusCode + } else { + destination.IgnoreHttpStatusCode = nil + } + + // IgnoreHttpsStatusCode + if rules.IgnoreHttpsStatusCode != nil { + propertyBag.Add("IgnoreHttpsStatusCode", *rules.IgnoreHttpsStatusCode) + } else { + propertyBag.Remove("IgnoreHttpsStatusCode") + } + + // SSLCertRemainingLifetimeCheck + destination.SSLCertRemainingLifetimeCheck = genruntime.ClonePointerToInt(rules.SSLCertRemainingLifetimeCheck) + + // SSLCheck + if rules.SSLCheck != nil { + sslCheck := *rules.SSLCheck + destination.SSLCheck = &sslCheck + } else { + destination.SSLCheck = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_ValidationRules interface (if implemented) to customize the conversion + var rulesAsAny any = rules + if augmentedRules, ok := rulesAsAny.(augmentConversionForWebTestProperties_ValidationRules); ok { + err := augmentedRules.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20180501preview.WebTestProperties_ValidationRules_STATUS type WebTestProperties_ValidationRules_STATUS struct { ContentValidation *WebTestProperties_ValidationRules_ContentValidation_STATUS `json:"ContentValidation,omitempty"` @@ -305,6 +1640,188 @@ type WebTestProperties_ValidationRules_STATUS struct { SSLCheck *bool `json:"SSLCheck,omitempty"` } +// AssignProperties_From_WebTestProperties_ValidationRules_STATUS populates our WebTestProperties_ValidationRules_STATUS from the provided source WebTestProperties_ValidationRules_STATUS +func (rules *WebTestProperties_ValidationRules_STATUS) AssignProperties_From_WebTestProperties_ValidationRules_STATUS(source *v20220615s.WebTestProperties_ValidationRules_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ContentValidation + if source.ContentValidation != nil { + var contentValidation WebTestProperties_ValidationRules_ContentValidation_STATUS + err := contentValidation.AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_STATUS(source.ContentValidation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_STATUS() to populate field ContentValidation") + } + rules.ContentValidation = &contentValidation + } else { + rules.ContentValidation = nil + } + + // ExpectedHttpStatusCode + rules.ExpectedHttpStatusCode = genruntime.ClonePointerToInt(source.ExpectedHttpStatusCode) + + // IgnoreHttpStatusCode + if source.IgnoreHttpStatusCode != nil { + propertyBag.Add("IgnoreHttpStatusCode", *source.IgnoreHttpStatusCode) + } else { + propertyBag.Remove("IgnoreHttpStatusCode") + } + + // IgnoreHttpsStatusCode + if propertyBag.Contains("IgnoreHttpsStatusCode") { + var ignoreHttpsStatusCode bool + err := propertyBag.Pull("IgnoreHttpsStatusCode", &ignoreHttpsStatusCode) + if err != nil { + return errors.Wrap(err, "pulling 'IgnoreHttpsStatusCode' from propertyBag") + } + + rules.IgnoreHttpsStatusCode = &ignoreHttpsStatusCode + } else { + rules.IgnoreHttpsStatusCode = nil + } + + // SSLCertRemainingLifetimeCheck + rules.SSLCertRemainingLifetimeCheck = genruntime.ClonePointerToInt(source.SSLCertRemainingLifetimeCheck) + + // SSLCheck + if source.SSLCheck != nil { + sslCheck := *source.SSLCheck + rules.SSLCheck = &sslCheck + } else { + rules.SSLCheck = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + rules.PropertyBag = propertyBag + } else { + rules.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_ValidationRules_STATUS interface (if implemented) to customize the conversion + var rulesAsAny any = rules + if augmentedRules, ok := rulesAsAny.(augmentConversionForWebTestProperties_ValidationRules_STATUS); ok { + err := augmentedRules.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_ValidationRules_STATUS populates the provided destination WebTestProperties_ValidationRules_STATUS from our WebTestProperties_ValidationRules_STATUS +func (rules *WebTestProperties_ValidationRules_STATUS) AssignProperties_To_WebTestProperties_ValidationRules_STATUS(destination *v20220615s.WebTestProperties_ValidationRules_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rules.PropertyBag) + + // ContentValidation + if rules.ContentValidation != nil { + var contentValidation v20220615s.WebTestProperties_ValidationRules_ContentValidation_STATUS + err := rules.ContentValidation.AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS(&contentValidation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS() to populate field ContentValidation") + } + destination.ContentValidation = &contentValidation + } else { + destination.ContentValidation = nil + } + + // ExpectedHttpStatusCode + destination.ExpectedHttpStatusCode = genruntime.ClonePointerToInt(rules.ExpectedHttpStatusCode) + + // IgnoreHttpStatusCode + if propertyBag.Contains("IgnoreHttpStatusCode") { + var ignoreHttpStatusCode bool + err := propertyBag.Pull("IgnoreHttpStatusCode", &ignoreHttpStatusCode) + if err != nil { + return errors.Wrap(err, "pulling 'IgnoreHttpStatusCode' from propertyBag") + } + + destination.IgnoreHttpStatusCode = &ignoreHttpStatusCode + } else { + destination.IgnoreHttpStatusCode = nil + } + + // IgnoreHttpsStatusCode + if rules.IgnoreHttpsStatusCode != nil { + propertyBag.Add("IgnoreHttpsStatusCode", *rules.IgnoreHttpsStatusCode) + } else { + propertyBag.Remove("IgnoreHttpsStatusCode") + } + + // SSLCertRemainingLifetimeCheck + destination.SSLCertRemainingLifetimeCheck = genruntime.ClonePointerToInt(rules.SSLCertRemainingLifetimeCheck) + + // SSLCheck + if rules.SSLCheck != nil { + sslCheck := *rules.SSLCheck + destination.SSLCheck = &sslCheck + } else { + destination.SSLCheck = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_ValidationRules_STATUS interface (if implemented) to customize the conversion + var rulesAsAny any = rules + if augmentedRules, ok := rulesAsAny.(augmentConversionForWebTestProperties_ValidationRules_STATUS); ok { + err := augmentedRules.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForWebTestGeolocation interface { + AssignPropertiesFrom(src *v20220615s.WebTestGeolocation) error + AssignPropertiesTo(dst *v20220615s.WebTestGeolocation) error +} + +type augmentConversionForWebTestGeolocation_STATUS interface { + AssignPropertiesFrom(src *v20220615s.WebTestGeolocation_STATUS) error + AssignPropertiesTo(dst *v20220615s.WebTestGeolocation_STATUS) error +} + +type augmentConversionForWebTestProperties_Configuration interface { + AssignPropertiesFrom(src *v20220615s.WebTestProperties_Configuration) error + AssignPropertiesTo(dst *v20220615s.WebTestProperties_Configuration) error +} + +type augmentConversionForWebTestProperties_Configuration_STATUS interface { + AssignPropertiesFrom(src *v20220615s.WebTestProperties_Configuration_STATUS) error + AssignPropertiesTo(dst *v20220615s.WebTestProperties_Configuration_STATUS) error +} + +type augmentConversionForWebTestProperties_Request interface { + AssignPropertiesFrom(src *v20220615s.WebTestProperties_Request) error + AssignPropertiesTo(dst *v20220615s.WebTestProperties_Request) error +} + +type augmentConversionForWebTestProperties_Request_STATUS interface { + AssignPropertiesFrom(src *v20220615s.WebTestProperties_Request_STATUS) error + AssignPropertiesTo(dst *v20220615s.WebTestProperties_Request_STATUS) error +} + +type augmentConversionForWebTestProperties_ValidationRules interface { + AssignPropertiesFrom(src *v20220615s.WebTestProperties_ValidationRules) error + AssignPropertiesTo(dst *v20220615s.WebTestProperties_ValidationRules) error +} + +type augmentConversionForWebTestProperties_ValidationRules_STATUS interface { + AssignPropertiesFrom(src *v20220615s.WebTestProperties_ValidationRules_STATUS) error + AssignPropertiesTo(dst *v20220615s.WebTestProperties_ValidationRules_STATUS) error +} + // Storage version of v1api20180501preview.HeaderField // A header to add to the WebTest. type HeaderField struct { @@ -313,6 +1830,68 @@ type HeaderField struct { Value *string `json:"value,omitempty"` } +// AssignProperties_From_HeaderField populates our HeaderField from the provided source HeaderField +func (field *HeaderField) AssignProperties_From_HeaderField(source *v20220615s.HeaderField) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Key + field.Key = genruntime.ClonePointerToString(source.Key) + + // Value + field.Value = genruntime.ClonePointerToString(source.Value) + + // Update the property bag + if len(propertyBag) > 0 { + field.PropertyBag = propertyBag + } else { + field.PropertyBag = nil + } + + // Invoke the augmentConversionForHeaderField interface (if implemented) to customize the conversion + var fieldAsAny any = field + if augmentedField, ok := fieldAsAny.(augmentConversionForHeaderField); ok { + err := augmentedField.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_HeaderField populates the provided destination HeaderField from our HeaderField +func (field *HeaderField) AssignProperties_To_HeaderField(destination *v20220615s.HeaderField) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(field.PropertyBag) + + // Key + destination.Key = genruntime.ClonePointerToString(field.Key) + + // Value + destination.Value = genruntime.ClonePointerToString(field.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForHeaderField interface (if implemented) to customize the conversion + var fieldAsAny any = field + if augmentedField, ok := fieldAsAny.(augmentConversionForHeaderField); ok { + err := augmentedField.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20180501preview.HeaderField_STATUS // A header to add to the WebTest. type HeaderField_STATUS struct { @@ -321,6 +1900,68 @@ type HeaderField_STATUS struct { Value *string `json:"value,omitempty"` } +// AssignProperties_From_HeaderField_STATUS populates our HeaderField_STATUS from the provided source HeaderField_STATUS +func (field *HeaderField_STATUS) AssignProperties_From_HeaderField_STATUS(source *v20220615s.HeaderField_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Key + field.Key = genruntime.ClonePointerToString(source.Key) + + // Value + field.Value = genruntime.ClonePointerToString(source.Value) + + // Update the property bag + if len(propertyBag) > 0 { + field.PropertyBag = propertyBag + } else { + field.PropertyBag = nil + } + + // Invoke the augmentConversionForHeaderField_STATUS interface (if implemented) to customize the conversion + var fieldAsAny any = field + if augmentedField, ok := fieldAsAny.(augmentConversionForHeaderField_STATUS); ok { + err := augmentedField.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_HeaderField_STATUS populates the provided destination HeaderField_STATUS from our HeaderField_STATUS +func (field *HeaderField_STATUS) AssignProperties_To_HeaderField_STATUS(destination *v20220615s.HeaderField_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(field.PropertyBag) + + // Key + destination.Key = genruntime.ClonePointerToString(field.Key) + + // Value + destination.Value = genruntime.ClonePointerToString(field.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForHeaderField_STATUS interface (if implemented) to customize the conversion + var fieldAsAny any = field + if augmentedField, ok := fieldAsAny.(augmentConversionForHeaderField_STATUS); ok { + err := augmentedField.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20180501preview.WebTestProperties_ValidationRules_ContentValidation type WebTestProperties_ValidationRules_ContentValidation struct { ContentMatch *string `json:"ContentMatch,omitempty"` @@ -329,6 +1970,94 @@ type WebTestProperties_ValidationRules_ContentValidation struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation populates our WebTestProperties_ValidationRules_ContentValidation from the provided source WebTestProperties_ValidationRules_ContentValidation +func (validation *WebTestProperties_ValidationRules_ContentValidation) AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation(source *v20220615s.WebTestProperties_ValidationRules_ContentValidation) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ContentMatch + validation.ContentMatch = genruntime.ClonePointerToString(source.ContentMatch) + + // IgnoreCase + if source.IgnoreCase != nil { + ignoreCase := *source.IgnoreCase + validation.IgnoreCase = &ignoreCase + } else { + validation.IgnoreCase = nil + } + + // PassIfTextFound + if source.PassIfTextFound != nil { + passIfTextFound := *source.PassIfTextFound + validation.PassIfTextFound = &passIfTextFound + } else { + validation.PassIfTextFound = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + validation.PropertyBag = propertyBag + } else { + validation.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_ValidationRules_ContentValidation interface (if implemented) to customize the conversion + var validationAsAny any = validation + if augmentedValidation, ok := validationAsAny.(augmentConversionForWebTestProperties_ValidationRules_ContentValidation); ok { + err := augmentedValidation.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation populates the provided destination WebTestProperties_ValidationRules_ContentValidation from our WebTestProperties_ValidationRules_ContentValidation +func (validation *WebTestProperties_ValidationRules_ContentValidation) AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation(destination *v20220615s.WebTestProperties_ValidationRules_ContentValidation) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(validation.PropertyBag) + + // ContentMatch + destination.ContentMatch = genruntime.ClonePointerToString(validation.ContentMatch) + + // IgnoreCase + if validation.IgnoreCase != nil { + ignoreCase := *validation.IgnoreCase + destination.IgnoreCase = &ignoreCase + } else { + destination.IgnoreCase = nil + } + + // PassIfTextFound + if validation.PassIfTextFound != nil { + passIfTextFound := *validation.PassIfTextFound + destination.PassIfTextFound = &passIfTextFound + } else { + destination.PassIfTextFound = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_ValidationRules_ContentValidation interface (if implemented) to customize the conversion + var validationAsAny any = validation + if augmentedValidation, ok := validationAsAny.(augmentConversionForWebTestProperties_ValidationRules_ContentValidation); ok { + err := augmentedValidation.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20180501preview.WebTestProperties_ValidationRules_ContentValidation_STATUS type WebTestProperties_ValidationRules_ContentValidation_STATUS struct { ContentMatch *string `json:"ContentMatch,omitempty"` @@ -337,6 +2066,114 @@ type WebTestProperties_ValidationRules_ContentValidation_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_STATUS populates our WebTestProperties_ValidationRules_ContentValidation_STATUS from the provided source WebTestProperties_ValidationRules_ContentValidation_STATUS +func (validation *WebTestProperties_ValidationRules_ContentValidation_STATUS) AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_STATUS(source *v20220615s.WebTestProperties_ValidationRules_ContentValidation_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ContentMatch + validation.ContentMatch = genruntime.ClonePointerToString(source.ContentMatch) + + // IgnoreCase + if source.IgnoreCase != nil { + ignoreCase := *source.IgnoreCase + validation.IgnoreCase = &ignoreCase + } else { + validation.IgnoreCase = nil + } + + // PassIfTextFound + if source.PassIfTextFound != nil { + passIfTextFound := *source.PassIfTextFound + validation.PassIfTextFound = &passIfTextFound + } else { + validation.PassIfTextFound = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + validation.PropertyBag = propertyBag + } else { + validation.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_ValidationRules_ContentValidation_STATUS interface (if implemented) to customize the conversion + var validationAsAny any = validation + if augmentedValidation, ok := validationAsAny.(augmentConversionForWebTestProperties_ValidationRules_ContentValidation_STATUS); ok { + err := augmentedValidation.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS populates the provided destination WebTestProperties_ValidationRules_ContentValidation_STATUS from our WebTestProperties_ValidationRules_ContentValidation_STATUS +func (validation *WebTestProperties_ValidationRules_ContentValidation_STATUS) AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS(destination *v20220615s.WebTestProperties_ValidationRules_ContentValidation_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(validation.PropertyBag) + + // ContentMatch + destination.ContentMatch = genruntime.ClonePointerToString(validation.ContentMatch) + + // IgnoreCase + if validation.IgnoreCase != nil { + ignoreCase := *validation.IgnoreCase + destination.IgnoreCase = &ignoreCase + } else { + destination.IgnoreCase = nil + } + + // PassIfTextFound + if validation.PassIfTextFound != nil { + passIfTextFound := *validation.PassIfTextFound + destination.PassIfTextFound = &passIfTextFound + } else { + destination.PassIfTextFound = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForWebTestProperties_ValidationRules_ContentValidation_STATUS interface (if implemented) to customize the conversion + var validationAsAny any = validation + if augmentedValidation, ok := validationAsAny.(augmentConversionForWebTestProperties_ValidationRules_ContentValidation_STATUS); ok { + err := augmentedValidation.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForHeaderField interface { + AssignPropertiesFrom(src *v20220615s.HeaderField) error + AssignPropertiesTo(dst *v20220615s.HeaderField) error +} + +type augmentConversionForHeaderField_STATUS interface { + AssignPropertiesFrom(src *v20220615s.HeaderField_STATUS) error + AssignPropertiesTo(dst *v20220615s.HeaderField_STATUS) error +} + +type augmentConversionForWebTestProperties_ValidationRules_ContentValidation interface { + AssignPropertiesFrom(src *v20220615s.WebTestProperties_ValidationRules_ContentValidation) error + AssignPropertiesTo(dst *v20220615s.WebTestProperties_ValidationRules_ContentValidation) error +} + +type augmentConversionForWebTestProperties_ValidationRules_ContentValidation_STATUS interface { + AssignPropertiesFrom(src *v20220615s.WebTestProperties_ValidationRules_ContentValidation_STATUS) error + AssignPropertiesTo(dst *v20220615s.WebTestProperties_ValidationRules_ContentValidation_STATUS) error +} + func init() { SchemeBuilder.Register(&Webtest{}, &WebtestList{}) } diff --git a/v2/api/insights/v1api20180501preview/storage/webtest_types_gen_test.go b/v2/api/insights/v1api20180501preview/storage/webtest_types_gen_test.go index 5ce56045d45..7668664d03d 100644 --- a/v2/api/insights/v1api20180501preview/storage/webtest_types_gen_test.go +++ b/v2/api/insights/v1api20180501preview/storage/webtest_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +18,91 @@ import ( "testing" ) +func Test_Webtest_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 Webtest to hub returns original", + prop.ForAll(RunResourceConversionTestForWebtest, WebtestGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForWebtest tests if a specific instance of Webtest round trips to the hub storage version and back losslessly +func RunResourceConversionTestForWebtest(subject Webtest) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20220615s.Webtest + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual Webtest + 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_Webtest_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Webtest to Webtest via AssignProperties_To_Webtest & AssignProperties_From_Webtest returns original", + prop.ForAll(RunPropertyAssignmentTestForWebtest, WebtestGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebtest tests if a specific instance of Webtest can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebtest(subject Webtest) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.Webtest + err := copied.AssignProperties_To_Webtest(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Webtest + err = actual.AssignProperties_From_Webtest(&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_Webtest_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -78,6 +164,48 @@ func AddRelatedPropertyGeneratorsForWebtest(gens map[string]gopter.Gen) { gens["Status"] = Webtest_STATUSGenerator() } +func Test_Webtest_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Webtest_Spec to Webtest_Spec via AssignProperties_To_Webtest_Spec & AssignProperties_From_Webtest_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForWebtest_Spec, Webtest_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebtest_Spec tests if a specific instance of Webtest_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebtest_Spec(subject Webtest_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 v20220615s.Webtest_Spec + err := copied.AssignProperties_To_Webtest_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Webtest_Spec + err = actual.AssignProperties_From_Webtest_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_Webtest_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -168,6 +296,48 @@ func AddRelatedPropertyGeneratorsForWebtest_Spec(gens map[string]gopter.Gen) { gens["ValidationRules"] = gen.PtrOf(WebTestProperties_ValidationRulesGenerator()) } +func Test_Webtest_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Webtest_STATUS to Webtest_STATUS via AssignProperties_To_Webtest_STATUS & AssignProperties_From_Webtest_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebtest_STATUS, Webtest_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebtest_STATUS tests if a specific instance of Webtest_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebtest_STATUS(subject Webtest_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 v20220615s.Webtest_STATUS + err := copied.AssignProperties_To_Webtest_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Webtest_STATUS + err = actual.AssignProperties_From_Webtest_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_Webtest_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -260,6 +430,48 @@ func AddRelatedPropertyGeneratorsForWebtest_STATUS(gens map[string]gopter.Gen) { gens["ValidationRules"] = gen.PtrOf(WebTestProperties_ValidationRules_STATUSGenerator()) } +func Test_WebTestGeolocation_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestGeolocation to WebTestGeolocation via AssignProperties_To_WebTestGeolocation & AssignProperties_From_WebTestGeolocation returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestGeolocation, WebTestGeolocationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestGeolocation tests if a specific instance of WebTestGeolocation can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestGeolocation(subject WebTestGeolocation) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.WebTestGeolocation + err := copied.AssignProperties_To_WebTestGeolocation(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestGeolocation + err = actual.AssignProperties_From_WebTestGeolocation(&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_WebTestGeolocation_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -320,6 +532,48 @@ func AddIndependentPropertyGeneratorsForWebTestGeolocation(gens map[string]gopte gens["Id"] = gen.PtrOf(gen.AlphaString()) } +func Test_WebTestGeolocation_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestGeolocation_STATUS to WebTestGeolocation_STATUS via AssignProperties_To_WebTestGeolocation_STATUS & AssignProperties_From_WebTestGeolocation_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestGeolocation_STATUS, WebTestGeolocation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestGeolocation_STATUS tests if a specific instance of WebTestGeolocation_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestGeolocation_STATUS(subject WebTestGeolocation_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 v20220615s.WebTestGeolocation_STATUS + err := copied.AssignProperties_To_WebTestGeolocation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestGeolocation_STATUS + err = actual.AssignProperties_From_WebTestGeolocation_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_WebTestGeolocation_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -381,6 +635,48 @@ func AddIndependentPropertyGeneratorsForWebTestGeolocation_STATUS(gens map[strin gens["Id"] = gen.PtrOf(gen.AlphaString()) } +func Test_WebTestProperties_Configuration_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_Configuration to WebTestProperties_Configuration via AssignProperties_To_WebTestProperties_Configuration & AssignProperties_From_WebTestProperties_Configuration returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_Configuration, WebTestProperties_ConfigurationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_Configuration tests if a specific instance of WebTestProperties_Configuration can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_Configuration(subject WebTestProperties_Configuration) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.WebTestProperties_Configuration + err := copied.AssignProperties_To_WebTestProperties_Configuration(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_Configuration + err = actual.AssignProperties_From_WebTestProperties_Configuration(&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_WebTestProperties_Configuration_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -442,6 +738,48 @@ func AddIndependentPropertyGeneratorsForWebTestProperties_Configuration(gens map gens["WebTest"] = gen.PtrOf(gen.AlphaString()) } +func Test_WebTestProperties_Configuration_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_Configuration_STATUS to WebTestProperties_Configuration_STATUS via AssignProperties_To_WebTestProperties_Configuration_STATUS & AssignProperties_From_WebTestProperties_Configuration_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_Configuration_STATUS, WebTestProperties_Configuration_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_Configuration_STATUS tests if a specific instance of WebTestProperties_Configuration_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_Configuration_STATUS(subject WebTestProperties_Configuration_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 v20220615s.WebTestProperties_Configuration_STATUS + err := copied.AssignProperties_To_WebTestProperties_Configuration_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_Configuration_STATUS + err = actual.AssignProperties_From_WebTestProperties_Configuration_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_WebTestProperties_Configuration_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -503,6 +841,48 @@ func AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_STATUS(g gens["WebTest"] = gen.PtrOf(gen.AlphaString()) } +func Test_WebTestProperties_Request_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_Request to WebTestProperties_Request via AssignProperties_To_WebTestProperties_Request & AssignProperties_From_WebTestProperties_Request returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_Request, WebTestProperties_RequestGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_Request tests if a specific instance of WebTestProperties_Request can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_Request(subject WebTestProperties_Request) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.WebTestProperties_Request + err := copied.AssignProperties_To_WebTestProperties_Request(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_Request + err = actual.AssignProperties_From_WebTestProperties_Request(&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_WebTestProperties_Request_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -582,6 +962,48 @@ func AddRelatedPropertyGeneratorsForWebTestProperties_Request(gens map[string]go gens["Headers"] = gen.SliceOf(HeaderFieldGenerator()) } +func Test_WebTestProperties_Request_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_Request_STATUS to WebTestProperties_Request_STATUS via AssignProperties_To_WebTestProperties_Request_STATUS & AssignProperties_From_WebTestProperties_Request_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_Request_STATUS, WebTestProperties_Request_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_Request_STATUS tests if a specific instance of WebTestProperties_Request_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_Request_STATUS(subject WebTestProperties_Request_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 v20220615s.WebTestProperties_Request_STATUS + err := copied.AssignProperties_To_WebTestProperties_Request_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_Request_STATUS + err = actual.AssignProperties_From_WebTestProperties_Request_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_WebTestProperties_Request_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -661,6 +1083,48 @@ func AddRelatedPropertyGeneratorsForWebTestProperties_Request_STATUS(gens map[st gens["Headers"] = gen.SliceOf(HeaderField_STATUSGenerator()) } +func Test_WebTestProperties_ValidationRules_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_ValidationRules to WebTestProperties_ValidationRules via AssignProperties_To_WebTestProperties_ValidationRules & AssignProperties_From_WebTestProperties_ValidationRules returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_ValidationRules, WebTestProperties_ValidationRulesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_ValidationRules tests if a specific instance of WebTestProperties_ValidationRules can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_ValidationRules(subject WebTestProperties_ValidationRules) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.WebTestProperties_ValidationRules + err := copied.AssignProperties_To_WebTestProperties_ValidationRules(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_ValidationRules + err = actual.AssignProperties_From_WebTestProperties_ValidationRules(&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_WebTestProperties_ValidationRules_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -739,6 +1203,48 @@ func AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules(gens map[s gens["ContentValidation"] = gen.PtrOf(WebTestProperties_ValidationRules_ContentValidationGenerator()) } +func Test_WebTestProperties_ValidationRules_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_ValidationRules_STATUS to WebTestProperties_ValidationRules_STATUS via AssignProperties_To_WebTestProperties_ValidationRules_STATUS & AssignProperties_From_WebTestProperties_ValidationRules_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_ValidationRules_STATUS, WebTestProperties_ValidationRules_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_ValidationRules_STATUS tests if a specific instance of WebTestProperties_ValidationRules_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_ValidationRules_STATUS(subject WebTestProperties_ValidationRules_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 v20220615s.WebTestProperties_ValidationRules_STATUS + err := copied.AssignProperties_To_WebTestProperties_ValidationRules_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_ValidationRules_STATUS + err = actual.AssignProperties_From_WebTestProperties_ValidationRules_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_WebTestProperties_ValidationRules_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -817,6 +1323,48 @@ func AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(gen gens["ContentValidation"] = gen.PtrOf(WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator()) } +func Test_HeaderField_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from HeaderField to HeaderField via AssignProperties_To_HeaderField & AssignProperties_From_HeaderField returns original", + prop.ForAll(RunPropertyAssignmentTestForHeaderField, HeaderFieldGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForHeaderField tests if a specific instance of HeaderField can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForHeaderField(subject HeaderField) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.HeaderField + err := copied.AssignProperties_To_HeaderField(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual HeaderField + err = actual.AssignProperties_From_HeaderField(&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_HeaderField_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -878,6 +1426,48 @@ func AddIndependentPropertyGeneratorsForHeaderField(gens map[string]gopter.Gen) gens["Value"] = gen.PtrOf(gen.AlphaString()) } +func Test_HeaderField_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from HeaderField_STATUS to HeaderField_STATUS via AssignProperties_To_HeaderField_STATUS & AssignProperties_From_HeaderField_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForHeaderField_STATUS, HeaderField_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForHeaderField_STATUS tests if a specific instance of HeaderField_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForHeaderField_STATUS(subject HeaderField_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 v20220615s.HeaderField_STATUS + err := copied.AssignProperties_To_HeaderField_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual HeaderField_STATUS + err = actual.AssignProperties_From_HeaderField_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_HeaderField_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -939,6 +1529,48 @@ func AddIndependentPropertyGeneratorsForHeaderField_STATUS(gens map[string]gopte gens["Value"] = gen.PtrOf(gen.AlphaString()) } +func Test_WebTestProperties_ValidationRules_ContentValidation_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_ValidationRules_ContentValidation to WebTestProperties_ValidationRules_ContentValidation via AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation & AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation, WebTestProperties_ValidationRules_ContentValidationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation tests if a specific instance of WebTestProperties_ValidationRules_ContentValidation can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation(subject WebTestProperties_ValidationRules_ContentValidation) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.WebTestProperties_ValidationRules_ContentValidation + err := copied.AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_ValidationRules_ContentValidation + err = actual.AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation(&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_WebTestProperties_ValidationRules_ContentValidation_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1002,6 +1634,48 @@ func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_Conten gens["PassIfTextFound"] = gen.PtrOf(gen.Bool()) } +func Test_WebTestProperties_ValidationRules_ContentValidation_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_ValidationRules_ContentValidation_STATUS to WebTestProperties_ValidationRules_ContentValidation_STATUS via AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS & AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation_STATUS, WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation_STATUS tests if a specific instance of WebTestProperties_ValidationRules_ContentValidation_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation_STATUS(subject WebTestProperties_ValidationRules_ContentValidation_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 v20220615s.WebTestProperties_ValidationRules_ContentValidation_STATUS + err := copied.AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_ValidationRules_ContentValidation_STATUS + err = actual.AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_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_WebTestProperties_ValidationRules_ContentValidation_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/insights/v1api20180501preview/webtest_types_gen.go b/v2/api/insights/v1api20180501preview/webtest_types_gen.go index 87349df9bef..37fd2aaff76 100644 --- a/v2/api/insights/v1api20180501preview/webtest_types_gen.go +++ b/v2/api/insights/v1api20180501preview/webtest_types_gen.go @@ -49,22 +49,36 @@ var _ conversion.Convertible = &Webtest{} // ConvertFrom populates our Webtest from the provided hub Webtest func (webtest *Webtest) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20180501ps.Webtest) - if !ok { - return fmt.Errorf("expected insights/v1api20180501preview/storage/Webtest but received %T instead", hub) + // intermediate variable for conversion + var source v20180501ps.Webtest + + err := source.ConvertFrom(hub) + if err != nil { + return errors.Wrap(err, "converting from hub to source") + } + + err = webtest.AssignProperties_From_Webtest(&source) + if err != nil { + return errors.Wrap(err, "converting from source to webtest") } - return webtest.AssignProperties_From_Webtest(source) + return nil } // ConvertTo populates the provided hub Webtest from our Webtest func (webtest *Webtest) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20180501ps.Webtest) - if !ok { - return fmt.Errorf("expected insights/v1api20180501preview/storage/Webtest but received %T instead", hub) + // intermediate variable for conversion + var destination v20180501ps.Webtest + err := webtest.AssignProperties_To_Webtest(&destination) + if err != nil { + return errors.Wrap(err, "converting to destination from webtest") + } + err = destination.ConvertTo(hub) + if err != nil { + return errors.Wrap(err, "converting from destination to hub") } - return webtest.AssignProperties_To_Webtest(destination) + return nil } // +kubebuilder:webhook:path=/mutate-insights-azure-com-v1api20180501preview-webtest,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=webtests,verbs=create;update,versions=v1api20180501preview,name=default.v1api20180501preview.webtests.insights.azure.com,admissionReviewVersions=v1 @@ -90,17 +104,6 @@ func (webtest *Webtest) defaultAzureName() { // defaultImpl applies the code generated defaults to the Webtest resource func (webtest *Webtest) defaultImpl() { webtest.defaultAzureName() } -var _ genruntime.ImportableResource = &Webtest{} - -// InitializeSpec initializes the spec for this resource from the given status -func (webtest *Webtest) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*Webtest_STATUS); ok { - return webtest.Spec.Initialize_From_Webtest_STATUS(s) - } - - return fmt.Errorf("expected Status of type Webtest_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &Webtest{} // AzureName returns the Azure name of the resource @@ -959,112 +962,6 @@ func (webtest *Webtest_Spec) AssignProperties_To_Webtest_Spec(destination *v2018 return nil } -// Initialize_From_Webtest_STATUS populates our Webtest_Spec from the provided source Webtest_STATUS -func (webtest *Webtest_Spec) Initialize_From_Webtest_STATUS(source *Webtest_STATUS) error { - - // Configuration - if source.Configuration != nil { - var configuration WebTestProperties_Configuration - err := configuration.Initialize_From_WebTestProperties_Configuration_STATUS(source.Configuration) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_WebTestProperties_Configuration_STATUS() to populate field Configuration") - } - webtest.Configuration = &configuration - } else { - webtest.Configuration = nil - } - - // Description - webtest.Description = genruntime.ClonePointerToString(source.Description) - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - webtest.Enabled = &enabled - } else { - webtest.Enabled = nil - } - - // Frequency - webtest.Frequency = genruntime.ClonePointerToInt(source.Frequency) - - // Kind - if source.Kind != nil { - kind := WebTestProperties_Kind(*source.Kind) - webtest.Kind = &kind - } else { - webtest.Kind = nil - } - - // Location - webtest.Location = genruntime.ClonePointerToString(source.Location) - - // Locations - if source.Locations != nil { - locationList := make([]WebTestGeolocation, len(source.Locations)) - for locationIndex, locationItem := range source.Locations { - // Shadow the loop variable to avoid aliasing - locationItem := locationItem - var location WebTestGeolocation - err := location.Initialize_From_WebTestGeolocation_STATUS(&locationItem) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_WebTestGeolocation_STATUS() to populate field Locations") - } - locationList[locationIndex] = location - } - webtest.Locations = locationList - } else { - webtest.Locations = nil - } - - // Name - webtest.Name = genruntime.ClonePointerToString(source.Name) - - // Request - if source.Request != nil { - var request WebTestProperties_Request - err := request.Initialize_From_WebTestProperties_Request_STATUS(source.Request) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_WebTestProperties_Request_STATUS() to populate field Request") - } - webtest.Request = &request - } else { - webtest.Request = nil - } - - // RetryEnabled - if source.RetryEnabled != nil { - retryEnabled := *source.RetryEnabled - webtest.RetryEnabled = &retryEnabled - } else { - webtest.RetryEnabled = nil - } - - // SyntheticMonitorId - webtest.SyntheticMonitorId = genruntime.ClonePointerToString(source.SyntheticMonitorId) - - // Tags - webtest.Tags = genruntime.CloneMapOfStringToString(source.Tags) - - // Timeout - webtest.Timeout = genruntime.ClonePointerToInt(source.Timeout) - - // ValidationRules - if source.ValidationRules != nil { - var validationRule WebTestProperties_ValidationRules - err := validationRule.Initialize_From_WebTestProperties_ValidationRules_STATUS(source.ValidationRules) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_WebTestProperties_ValidationRules_STATUS() to populate field ValidationRules") - } - webtest.ValidationRules = &validationRule - } else { - webtest.ValidationRules = nil - } - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (webtest *Webtest_Spec) OriginalVersion() string { return GroupVersion.Version @@ -1699,16 +1596,6 @@ func (geolocation *WebTestGeolocation) AssignProperties_To_WebTestGeolocation(de return nil } -// Initialize_From_WebTestGeolocation_STATUS populates our WebTestGeolocation from the provided source WebTestGeolocation_STATUS -func (geolocation *WebTestGeolocation) Initialize_From_WebTestGeolocation_STATUS(source *WebTestGeolocation_STATUS) error { - - // Id - geolocation.Id = genruntime.ClonePointerToString(source.Id) - - // No error - return nil -} - // Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. type WebTestGeolocation_STATUS struct { // Id: Location ID for the WebTest to run from. @@ -1841,16 +1728,6 @@ func (configuration *WebTestProperties_Configuration) AssignProperties_To_WebTes return nil } -// Initialize_From_WebTestProperties_Configuration_STATUS populates our WebTestProperties_Configuration from the provided source WebTestProperties_Configuration_STATUS -func (configuration *WebTestProperties_Configuration) Initialize_From_WebTestProperties_Configuration_STATUS(source *WebTestProperties_Configuration_STATUS) error { - - // WebTest - configuration.WebTest = genruntime.ClonePointerToString(source.WebTest) - - // No error - return nil -} - type WebTestProperties_Configuration_STATUS struct { // WebTest: The XML specification of a WebTest to run against an application. WebTest *string `json:"WebTest,omitempty"` @@ -2179,56 +2056,6 @@ func (request *WebTestProperties_Request) AssignProperties_To_WebTestProperties_ return nil } -// Initialize_From_WebTestProperties_Request_STATUS populates our WebTestProperties_Request from the provided source WebTestProperties_Request_STATUS -func (request *WebTestProperties_Request) Initialize_From_WebTestProperties_Request_STATUS(source *WebTestProperties_Request_STATUS) error { - - // FollowRedirects - if source.FollowRedirects != nil { - followRedirect := *source.FollowRedirects - request.FollowRedirects = &followRedirect - } else { - request.FollowRedirects = nil - } - - // Headers - if source.Headers != nil { - headerList := make([]HeaderField, len(source.Headers)) - for headerIndex, headerItem := range source.Headers { - // Shadow the loop variable to avoid aliasing - headerItem := headerItem - var header HeaderField - err := header.Initialize_From_HeaderField_STATUS(&headerItem) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_HeaderField_STATUS() to populate field Headers") - } - headerList[headerIndex] = header - } - request.Headers = headerList - } else { - request.Headers = nil - } - - // HttpVerb - request.HttpVerb = genruntime.ClonePointerToString(source.HttpVerb) - - // ParseDependentRequests - if source.ParseDependentRequests != nil { - parseDependentRequest := *source.ParseDependentRequests - request.ParseDependentRequests = &parseDependentRequest - } else { - request.ParseDependentRequests = nil - } - - // RequestBody - request.RequestBody = genruntime.ClonePointerToString(source.RequestBody) - - // RequestUrl - request.RequestUrl = genruntime.ClonePointerToString(source.RequestUrl) - - // No error - return nil -} - type WebTestProperties_Request_STATUS struct { // FollowRedirects: Follow redirects for this web test. FollowRedirects *bool `json:"FollowRedirects,omitempty"` @@ -2621,47 +2448,6 @@ func (rules *WebTestProperties_ValidationRules) AssignProperties_To_WebTestPrope return nil } -// Initialize_From_WebTestProperties_ValidationRules_STATUS populates our WebTestProperties_ValidationRules from the provided source WebTestProperties_ValidationRules_STATUS -func (rules *WebTestProperties_ValidationRules) Initialize_From_WebTestProperties_ValidationRules_STATUS(source *WebTestProperties_ValidationRules_STATUS) error { - - // ContentValidation - if source.ContentValidation != nil { - var contentValidation WebTestProperties_ValidationRules_ContentValidation - err := contentValidation.Initialize_From_WebTestProperties_ValidationRules_ContentValidation_STATUS(source.ContentValidation) - if err != nil { - return errors.Wrap(err, "calling Initialize_From_WebTestProperties_ValidationRules_ContentValidation_STATUS() to populate field ContentValidation") - } - rules.ContentValidation = &contentValidation - } else { - rules.ContentValidation = nil - } - - // ExpectedHttpStatusCode - rules.ExpectedHttpStatusCode = genruntime.ClonePointerToInt(source.ExpectedHttpStatusCode) - - // IgnoreHttpsStatusCode - if source.IgnoreHttpsStatusCode != nil { - ignoreHttpsStatusCode := *source.IgnoreHttpsStatusCode - rules.IgnoreHttpsStatusCode = &ignoreHttpsStatusCode - } else { - rules.IgnoreHttpsStatusCode = nil - } - - // SSLCertRemainingLifetimeCheck - rules.SSLCertRemainingLifetimeCheck = genruntime.ClonePointerToInt(source.SSLCertRemainingLifetimeCheck) - - // SSLCheck - if source.SSLCheck != nil { - sslCheck := *source.SSLCheck - rules.SSLCheck = &sslCheck - } else { - rules.SSLCheck = nil - } - - // No error - return nil -} - type WebTestProperties_ValidationRules_STATUS struct { // ContentValidation: The collection of content validation properties ContentValidation *WebTestProperties_ValidationRules_ContentValidation_STATUS `json:"ContentValidation,omitempty"` @@ -2919,19 +2705,6 @@ func (field *HeaderField) AssignProperties_To_HeaderField(destination *v20180501 return nil } -// Initialize_From_HeaderField_STATUS populates our HeaderField from the provided source HeaderField_STATUS -func (field *HeaderField) Initialize_From_HeaderField_STATUS(source *HeaderField_STATUS) error { - - // Key - field.Key = genruntime.ClonePointerToString(source.Key) - - // Value - field.Value = genruntime.ClonePointerToString(source.Value) - - // No error - return nil -} - // A header to add to the WebTest. type HeaderField_STATUS struct { // Key: The name of the header. @@ -3142,32 +2915,6 @@ func (validation *WebTestProperties_ValidationRules_ContentValidation) AssignPro return nil } -// Initialize_From_WebTestProperties_ValidationRules_ContentValidation_STATUS populates our WebTestProperties_ValidationRules_ContentValidation from the provided source WebTestProperties_ValidationRules_ContentValidation_STATUS -func (validation *WebTestProperties_ValidationRules_ContentValidation) Initialize_From_WebTestProperties_ValidationRules_ContentValidation_STATUS(source *WebTestProperties_ValidationRules_ContentValidation_STATUS) error { - - // ContentMatch - validation.ContentMatch = genruntime.ClonePointerToString(source.ContentMatch) - - // IgnoreCase - if source.IgnoreCase != nil { - ignoreCase := *source.IgnoreCase - validation.IgnoreCase = &ignoreCase - } else { - validation.IgnoreCase = nil - } - - // PassIfTextFound - if source.PassIfTextFound != nil { - passIfTextFound := *source.PassIfTextFound - validation.PassIfTextFound = &passIfTextFound - } else { - validation.PassIfTextFound = nil - } - - // No error - return nil -} - type WebTestProperties_ValidationRules_ContentValidation_STATUS struct { // ContentMatch: Content to look for in the return of the WebTest. Must not be null or empty. ContentMatch *string `json:"ContentMatch,omitempty"` diff --git a/v2/api/insights/v1api20180501preview/webtest_types_gen_test.go b/v2/api/insights/v1api20180501preview/webtest_types_gen_test.go index 4832928141d..fb664dd5b81 100644 --- a/v2/api/insights/v1api20180501preview/webtest_types_gen_test.go +++ b/v2/api/insights/v1api20180501preview/webtest_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20180501preview import ( "encoding/json" v20180501ps "github.com/Azure/azure-service-operator/v2/api/insights/v1api20180501preview/storage" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -36,7 +37,7 @@ func RunResourceConversionTestForWebtest(subject Webtest) string { copied := subject.DeepCopy() // Convert to our hub version - var hub v20180501ps.Webtest + var hub v20220615s.Webtest err := copied.ConvertTo(&hub) if err != nil { return err.Error() diff --git a/v2/api/insights/v1api20220615/storage/structure.txt b/v2/api/insights/v1api20220615/storage/structure.txt index 72d8a1394d5..91105e1f3b5 100644 --- a/v2/api/insights/v1api20220615/storage/structure.txt +++ b/v2/api/insights/v1api20220615/storage/structure.txt @@ -107,4 +107,94 @@ github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage │ ├── TargetResourceTypes: string[] │ ├── Type: *string │ └── WindowSize: *string +├── Webtest: Resource +│ ├── Owner: resources/v1apiv20191001.ResourceGroup +│ ├── Spec: Object (18 properties) +│ │ ├── AzureName: string +│ │ ├── Configuration: *Object (2 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── WebTest: *string +│ │ ├── Description: *string +│ │ ├── Enabled: *bool +│ │ ├── Frequency: *int +│ │ ├── Kind: *string +│ │ ├── Location: *string +│ │ ├── Locations: Object (2 properties)[] +│ │ │ ├── Id: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── Name: *string +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── Request: *Object (7 properties) +│ │ │ ├── FollowRedirects: *bool +│ │ │ ├── Headers: Object (3 properties)[] +│ │ │ │ ├── Key: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── Value: *string +│ │ │ ├── HttpVerb: *string +│ │ │ ├── ParseDependentRequests: *bool +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── RequestBody: *string +│ │ │ └── RequestUrl: *string +│ │ ├── RetryEnabled: *bool +│ │ ├── SyntheticMonitorId: *string +│ │ ├── Tags: map[string]string +│ │ ├── Timeout: *int +│ │ └── ValidationRules: *Object (6 properties) +│ │ ├── ContentValidation: *Object (4 properties) +│ │ │ ├── ContentMatch: *string +│ │ │ ├── IgnoreCase: *bool +│ │ │ ├── PassIfTextFound: *bool +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── ExpectedHttpStatusCode: *int +│ │ ├── IgnoreHttpStatusCode: *bool +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── SSLCertRemainingLifetimeCheck: *int +│ │ └── SSLCheck: *bool +│ └── Status: Object (20 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Configuration: *Object (2 properties) +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── WebTest: *string +│ ├── Description: *string +│ ├── Enabled: *bool +│ ├── Frequency: *int +│ ├── Id: *string +│ ├── Kind: *string +│ ├── Location: *string +│ ├── Locations: Object (2 properties)[] +│ │ ├── Id: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Name: *string +│ ├── PropertiesName: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── ProvisioningState: *string +│ ├── Request: *Object (7 properties) +│ │ ├── FollowRedirects: *bool +│ │ ├── Headers: Object (3 properties)[] +│ │ │ ├── Key: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Value: *string +│ │ ├── HttpVerb: *string +│ │ ├── ParseDependentRequests: *bool +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── RequestBody: *string +│ │ └── RequestUrl: *string +│ ├── RetryEnabled: *bool +│ ├── SyntheticMonitorId: *string +│ ├── Tags: map[string]string +│ ├── Timeout: *int +│ ├── Type: *string +│ └── ValidationRules: *Object (6 properties) +│ ├── ContentValidation: *Object (4 properties) +│ │ ├── ContentMatch: *string +│ │ ├── IgnoreCase: *bool +│ │ ├── PassIfTextFound: *bool +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── ExpectedHttpStatusCode: *int +│ ├── IgnoreHttpStatusCode: *bool +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── SSLCertRemainingLifetimeCheck: *int +│ └── SSLCheck: *bool └── augmentConversionForSystemData_STATUS: Interface diff --git a/v2/api/insights/v1api20220615/storage/webtest_types_gen.go b/v2/api/insights/v1api20220615/storage/webtest_types_gen.go new file mode 100644 index 00000000000..8ecb944cb71 --- /dev/null +++ b/v2/api/insights/v1api20220615/storage/webtest_types_gen.go @@ -0,0 +1,336 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=insights.azure.com,resources=webtests,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=insights.azure.com,resources={webtests/status,webtests/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20220615.Webtest +// Generator information: +// - Generated from: /applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/webTests_API.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName} +type Webtest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec Webtest_Spec `json:"spec,omitempty"` + Status Webtest_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &Webtest{} + +// GetConditions returns the conditions of the resource +func (webtest *Webtest) GetConditions() conditions.Conditions { + return webtest.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (webtest *Webtest) SetConditions(conditions conditions.Conditions) { + webtest.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &Webtest{} + +// AzureName returns the Azure name of the resource +func (webtest *Webtest) AzureName() string { + return webtest.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2022-06-15" +func (webtest Webtest) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (webtest *Webtest) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (webtest *Webtest) GetSpec() genruntime.ConvertibleSpec { + return &webtest.Spec +} + +// GetStatus returns the status of this resource +func (webtest *Webtest) GetStatus() genruntime.ConvertibleStatus { + return &webtest.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (webtest *Webtest) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Insights/webtests" +func (webtest *Webtest) GetType() string { + return "Microsoft.Insights/webtests" +} + +// NewEmptyStatus returns a new empty (blank) status +func (webtest *Webtest) NewEmptyStatus() genruntime.ConvertibleStatus { + return &Webtest_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (webtest *Webtest) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(webtest.Spec) + return webtest.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (webtest *Webtest) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*Webtest_STATUS); ok { + webtest.Status = *st + return nil + } + + // Convert status to required version + var st Webtest_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + webtest.Status = st + return nil +} + +// Hub marks that this Webtest is the hub type for conversion +func (webtest *Webtest) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (webtest *Webtest) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: webtest.Spec.OriginalVersion, + Kind: "Webtest", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20220615.Webtest +// Generator information: +// - Generated from: /applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/webTests_API.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName} +type WebtestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Webtest `json:"items"` +} + +// Storage version of v1api20220615.Webtest_Spec +type Webtest_Spec struct { + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + Configuration *WebTestProperties_Configuration `json:"Configuration,omitempty"` + Description *string `json:"Description,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + Frequency *int `json:"Frequency,omitempty"` + Kind *string `json:"Kind,omitempty"` + Location *string `json:"location,omitempty"` + Locations []WebTestGeolocation `json:"Locations,omitempty"` + Name *string `json:"Name,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Request *WebTestProperties_Request `json:"Request,omitempty"` + RetryEnabled *bool `json:"RetryEnabled,omitempty"` + SyntheticMonitorId *string `json:"SyntheticMonitorId,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + Timeout *int `json:"Timeout,omitempty"` + ValidationRules *WebTestProperties_ValidationRules `json:"ValidationRules,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &Webtest_Spec{} + +// ConvertSpecFrom populates our Webtest_Spec from the provided source +func (webtest *Webtest_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == webtest { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(webtest) +} + +// ConvertSpecTo populates the provided destination from our Webtest_Spec +func (webtest *Webtest_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == webtest { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(webtest) +} + +// Storage version of v1api20220615.Webtest_STATUS +type Webtest_STATUS struct { + Conditions []conditions.Condition `json:"conditions,omitempty"` + Configuration *WebTestProperties_Configuration_STATUS `json:"Configuration,omitempty"` + Description *string `json:"Description,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + Frequency *int `json:"Frequency,omitempty"` + Id *string `json:"id,omitempty"` + Kind *string `json:"Kind,omitempty"` + Location *string `json:"location,omitempty"` + Locations []WebTestGeolocation_STATUS `json:"Locations,omitempty"` + Name *string `json:"name,omitempty"` + PropertiesName *string `json:"properties_name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + Request *WebTestProperties_Request_STATUS `json:"Request,omitempty"` + RetryEnabled *bool `json:"RetryEnabled,omitempty"` + SyntheticMonitorId *string `json:"SyntheticMonitorId,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + Timeout *int `json:"Timeout,omitempty"` + Type *string `json:"type,omitempty"` + ValidationRules *WebTestProperties_ValidationRules_STATUS `json:"ValidationRules,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &Webtest_STATUS{} + +// ConvertStatusFrom populates our Webtest_STATUS from the provided source +func (webtest *Webtest_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == webtest { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(webtest) +} + +// ConvertStatusTo populates the provided destination from our Webtest_STATUS +func (webtest *Webtest_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == webtest { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(webtest) +} + +// Storage version of v1api20220615.WebTestGeolocation +// Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. +type WebTestGeolocation struct { + Id *string `json:"Id,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20220615.WebTestGeolocation_STATUS +// Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. +type WebTestGeolocation_STATUS struct { + Id *string `json:"Id,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20220615.WebTestProperties_Configuration +type WebTestProperties_Configuration struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + WebTest *string `json:"WebTest,omitempty"` +} + +// Storage version of v1api20220615.WebTestProperties_Configuration_STATUS +type WebTestProperties_Configuration_STATUS struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + WebTest *string `json:"WebTest,omitempty"` +} + +// Storage version of v1api20220615.WebTestProperties_Request +type WebTestProperties_Request struct { + FollowRedirects *bool `json:"FollowRedirects,omitempty"` + Headers []HeaderField `json:"Headers,omitempty"` + HttpVerb *string `json:"HttpVerb,omitempty"` + ParseDependentRequests *bool `json:"ParseDependentRequests,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RequestBody *string `json:"RequestBody,omitempty"` + RequestUrl *string `json:"RequestUrl,omitempty"` +} + +// Storage version of v1api20220615.WebTestProperties_Request_STATUS +type WebTestProperties_Request_STATUS struct { + FollowRedirects *bool `json:"FollowRedirects,omitempty"` + Headers []HeaderField_STATUS `json:"Headers,omitempty"` + HttpVerb *string `json:"HttpVerb,omitempty"` + ParseDependentRequests *bool `json:"ParseDependentRequests,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RequestBody *string `json:"RequestBody,omitempty"` + RequestUrl *string `json:"RequestUrl,omitempty"` +} + +// Storage version of v1api20220615.WebTestProperties_ValidationRules +type WebTestProperties_ValidationRules struct { + ContentValidation *WebTestProperties_ValidationRules_ContentValidation `json:"ContentValidation,omitempty"` + ExpectedHttpStatusCode *int `json:"ExpectedHttpStatusCode,omitempty"` + IgnoreHttpStatusCode *bool `json:"IgnoreHttpStatusCode,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SSLCertRemainingLifetimeCheck *int `json:"SSLCertRemainingLifetimeCheck,omitempty"` + SSLCheck *bool `json:"SSLCheck,omitempty"` +} + +// Storage version of v1api20220615.WebTestProperties_ValidationRules_STATUS +type WebTestProperties_ValidationRules_STATUS struct { + ContentValidation *WebTestProperties_ValidationRules_ContentValidation_STATUS `json:"ContentValidation,omitempty"` + ExpectedHttpStatusCode *int `json:"ExpectedHttpStatusCode,omitempty"` + IgnoreHttpStatusCode *bool `json:"IgnoreHttpStatusCode,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SSLCertRemainingLifetimeCheck *int `json:"SSLCertRemainingLifetimeCheck,omitempty"` + SSLCheck *bool `json:"SSLCheck,omitempty"` +} + +// Storage version of v1api20220615.HeaderField +// A header to add to the WebTest. +type HeaderField struct { + Key *string `json:"key,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Value *string `json:"value,omitempty"` +} + +// Storage version of v1api20220615.HeaderField_STATUS +// A header to add to the WebTest. +type HeaderField_STATUS struct { + Key *string `json:"key,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Value *string `json:"value,omitempty"` +} + +// Storage version of v1api20220615.WebTestProperties_ValidationRules_ContentValidation +type WebTestProperties_ValidationRules_ContentValidation struct { + ContentMatch *string `json:"ContentMatch,omitempty"` + IgnoreCase *bool `json:"IgnoreCase,omitempty"` + PassIfTextFound *bool `json:"PassIfTextFound,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20220615.WebTestProperties_ValidationRules_ContentValidation_STATUS +type WebTestProperties_ValidationRules_ContentValidation_STATUS struct { + ContentMatch *string `json:"ContentMatch,omitempty"` + IgnoreCase *bool `json:"IgnoreCase,omitempty"` + PassIfTextFound *bool `json:"PassIfTextFound,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +func init() { + SchemeBuilder.Register(&Webtest{}, &WebtestList{}) +} diff --git a/v2/api/insights/v1api20220615/storage/webtest_types_gen_test.go b/v2/api/insights/v1api20220615/storage/webtest_types_gen_test.go new file mode 100644 index 00000000000..6ffdef47142 --- /dev/null +++ b/v2/api/insights/v1api20220615/storage/webtest_types_gen_test.go @@ -0,0 +1,1066 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_Webtest_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 Webtest via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebtest, WebtestGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebtest runs a test to see if a specific instance of Webtest round trips to JSON and back losslessly +func RunJSONSerializationTestForWebtest(subject Webtest) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Webtest + 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 Webtest instances for property testing - lazily instantiated by WebtestGenerator() +var webtestGenerator gopter.Gen + +// WebtestGenerator returns a generator of Webtest instances for property testing. +func WebtestGenerator() gopter.Gen { + if webtestGenerator != nil { + return webtestGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForWebtest(generators) + webtestGenerator = gen.Struct(reflect.TypeOf(Webtest{}), generators) + + return webtestGenerator +} + +// AddRelatedPropertyGeneratorsForWebtest is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebtest(gens map[string]gopter.Gen) { + gens["Spec"] = Webtest_SpecGenerator() + gens["Status"] = Webtest_STATUSGenerator() +} + +func Test_Webtest_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 Webtest_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebtest_Spec, Webtest_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebtest_Spec runs a test to see if a specific instance of Webtest_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForWebtest_Spec(subject Webtest_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Webtest_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 Webtest_Spec instances for property testing - lazily instantiated by Webtest_SpecGenerator() +var webtest_SpecGenerator gopter.Gen + +// Webtest_SpecGenerator returns a generator of Webtest_Spec instances for property testing. +// We first initialize webtest_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 Webtest_SpecGenerator() gopter.Gen { + if webtest_SpecGenerator != nil { + return webtest_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_Spec(generators) + webtest_SpecGenerator = gen.Struct(reflect.TypeOf(Webtest_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_Spec(generators) + AddRelatedPropertyGeneratorsForWebtest_Spec(generators) + webtest_SpecGenerator = gen.Struct(reflect.TypeOf(Webtest_Spec{}), generators) + + return webtest_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForWebtest_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebtest_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Frequency"] = gen.PtrOf(gen.Int()) + gens["Kind"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["OriginalVersion"] = gen.AlphaString() + gens["RetryEnabled"] = gen.PtrOf(gen.Bool()) + gens["SyntheticMonitorId"] = gen.PtrOf(gen.AlphaString()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["Timeout"] = gen.PtrOf(gen.Int()) +} + +// AddRelatedPropertyGeneratorsForWebtest_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebtest_Spec(gens map[string]gopter.Gen) { + gens["Configuration"] = gen.PtrOf(WebTestProperties_ConfigurationGenerator()) + gens["Locations"] = gen.SliceOf(WebTestGeolocationGenerator()) + gens["Request"] = gen.PtrOf(WebTestProperties_RequestGenerator()) + gens["ValidationRules"] = gen.PtrOf(WebTestProperties_ValidationRulesGenerator()) +} + +func Test_Webtest_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 Webtest_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebtest_STATUS, Webtest_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebtest_STATUS runs a test to see if a specific instance of Webtest_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebtest_STATUS(subject Webtest_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Webtest_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 Webtest_STATUS instances for property testing - lazily instantiated by Webtest_STATUSGenerator() +var webtest_STATUSGenerator gopter.Gen + +// Webtest_STATUSGenerator returns a generator of Webtest_STATUS instances for property testing. +// We first initialize webtest_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 Webtest_STATUSGenerator() gopter.Gen { + if webtest_STATUSGenerator != nil { + return webtest_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_STATUS(generators) + webtest_STATUSGenerator = gen.Struct(reflect.TypeOf(Webtest_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_STATUS(generators) + AddRelatedPropertyGeneratorsForWebtest_STATUS(generators) + webtest_STATUSGenerator = gen.Struct(reflect.TypeOf(Webtest_STATUS{}), generators) + + return webtest_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebtest_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebtest_STATUS(gens map[string]gopter.Gen) { + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Frequency"] = gen.PtrOf(gen.Int()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Kind"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["PropertiesName"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.AlphaString()) + gens["RetryEnabled"] = gen.PtrOf(gen.Bool()) + gens["SyntheticMonitorId"] = gen.PtrOf(gen.AlphaString()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["Timeout"] = gen.PtrOf(gen.Int()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForWebtest_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebtest_STATUS(gens map[string]gopter.Gen) { + gens["Configuration"] = gen.PtrOf(WebTestProperties_Configuration_STATUSGenerator()) + gens["Locations"] = gen.SliceOf(WebTestGeolocation_STATUSGenerator()) + gens["Request"] = gen.PtrOf(WebTestProperties_Request_STATUSGenerator()) + gens["ValidationRules"] = gen.PtrOf(WebTestProperties_ValidationRules_STATUSGenerator()) +} + +func Test_WebTestGeolocation_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 WebTestGeolocation via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestGeolocation, WebTestGeolocationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestGeolocation runs a test to see if a specific instance of WebTestGeolocation round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestGeolocation(subject WebTestGeolocation) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestGeolocation + 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 WebTestGeolocation instances for property testing - lazily instantiated by WebTestGeolocationGenerator() +var webTestGeolocationGenerator gopter.Gen + +// WebTestGeolocationGenerator returns a generator of WebTestGeolocation instances for property testing. +func WebTestGeolocationGenerator() gopter.Gen { + if webTestGeolocationGenerator != nil { + return webTestGeolocationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestGeolocation(generators) + webTestGeolocationGenerator = gen.Struct(reflect.TypeOf(WebTestGeolocation{}), generators) + + return webTestGeolocationGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestGeolocation is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestGeolocation(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestGeolocation_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 WebTestGeolocation_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestGeolocation_STATUS, WebTestGeolocation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestGeolocation_STATUS runs a test to see if a specific instance of WebTestGeolocation_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestGeolocation_STATUS(subject WebTestGeolocation_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestGeolocation_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 WebTestGeolocation_STATUS instances for property testing - lazily instantiated by +// WebTestGeolocation_STATUSGenerator() +var webTestGeolocation_STATUSGenerator gopter.Gen + +// WebTestGeolocation_STATUSGenerator returns a generator of WebTestGeolocation_STATUS instances for property testing. +func WebTestGeolocation_STATUSGenerator() gopter.Gen { + if webTestGeolocation_STATUSGenerator != nil { + return webTestGeolocation_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestGeolocation_STATUS(generators) + webTestGeolocation_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestGeolocation_STATUS{}), generators) + + return webTestGeolocation_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestGeolocation_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestGeolocation_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_Configuration_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 WebTestProperties_Configuration via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Configuration, WebTestProperties_ConfigurationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Configuration runs a test to see if a specific instance of WebTestProperties_Configuration round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Configuration(subject WebTestProperties_Configuration) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Configuration + 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 WebTestProperties_Configuration instances for property testing - lazily instantiated by +// WebTestProperties_ConfigurationGenerator() +var webTestProperties_ConfigurationGenerator gopter.Gen + +// WebTestProperties_ConfigurationGenerator returns a generator of WebTestProperties_Configuration instances for property testing. +func WebTestProperties_ConfigurationGenerator() gopter.Gen { + if webTestProperties_ConfigurationGenerator != nil { + return webTestProperties_ConfigurationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Configuration(generators) + webTestProperties_ConfigurationGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Configuration{}), generators) + + return webTestProperties_ConfigurationGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Configuration is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Configuration(gens map[string]gopter.Gen) { + gens["WebTest"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_Configuration_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 WebTestProperties_Configuration_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Configuration_STATUS, WebTestProperties_Configuration_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Configuration_STATUS runs a test to see if a specific instance of WebTestProperties_Configuration_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Configuration_STATUS(subject WebTestProperties_Configuration_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Configuration_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 WebTestProperties_Configuration_STATUS instances for property testing - lazily instantiated by +// WebTestProperties_Configuration_STATUSGenerator() +var webTestProperties_Configuration_STATUSGenerator gopter.Gen + +// WebTestProperties_Configuration_STATUSGenerator returns a generator of WebTestProperties_Configuration_STATUS instances for property testing. +func WebTestProperties_Configuration_STATUSGenerator() gopter.Gen { + if webTestProperties_Configuration_STATUSGenerator != nil { + return webTestProperties_Configuration_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_STATUS(generators) + webTestProperties_Configuration_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Configuration_STATUS{}), generators) + + return webTestProperties_Configuration_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_STATUS(gens map[string]gopter.Gen) { + gens["WebTest"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_Request_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 WebTestProperties_Request via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Request, WebTestProperties_RequestGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Request runs a test to see if a specific instance of WebTestProperties_Request round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Request(subject WebTestProperties_Request) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Request + 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 WebTestProperties_Request instances for property testing - lazily instantiated by +// WebTestProperties_RequestGenerator() +var webTestProperties_RequestGenerator gopter.Gen + +// WebTestProperties_RequestGenerator returns a generator of WebTestProperties_Request instances for property testing. +// We first initialize webTestProperties_RequestGenerator 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 WebTestProperties_RequestGenerator() gopter.Gen { + if webTestProperties_RequestGenerator != nil { + return webTestProperties_RequestGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request(generators) + webTestProperties_RequestGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_Request(generators) + webTestProperties_RequestGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request{}), generators) + + return webTestProperties_RequestGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Request is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Request(gens map[string]gopter.Gen) { + gens["FollowRedirects"] = gen.PtrOf(gen.Bool()) + gens["HttpVerb"] = gen.PtrOf(gen.AlphaString()) + gens["ParseDependentRequests"] = gen.PtrOf(gen.Bool()) + gens["RequestBody"] = gen.PtrOf(gen.AlphaString()) + gens["RequestUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_Request is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_Request(gens map[string]gopter.Gen) { + gens["Headers"] = gen.SliceOf(HeaderFieldGenerator()) +} + +func Test_WebTestProperties_Request_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 WebTestProperties_Request_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Request_STATUS, WebTestProperties_Request_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Request_STATUS runs a test to see if a specific instance of WebTestProperties_Request_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Request_STATUS(subject WebTestProperties_Request_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Request_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 WebTestProperties_Request_STATUS instances for property testing - lazily instantiated by +// WebTestProperties_Request_STATUSGenerator() +var webTestProperties_Request_STATUSGenerator gopter.Gen + +// WebTestProperties_Request_STATUSGenerator returns a generator of WebTestProperties_Request_STATUS instances for property testing. +// We first initialize webTestProperties_Request_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 WebTestProperties_Request_STATUSGenerator() gopter.Gen { + if webTestProperties_Request_STATUSGenerator != nil { + return webTestProperties_Request_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS(generators) + webTestProperties_Request_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_Request_STATUS(generators) + webTestProperties_Request_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request_STATUS{}), generators) + + return webTestProperties_Request_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS(gens map[string]gopter.Gen) { + gens["FollowRedirects"] = gen.PtrOf(gen.Bool()) + gens["HttpVerb"] = gen.PtrOf(gen.AlphaString()) + gens["ParseDependentRequests"] = gen.PtrOf(gen.Bool()) + gens["RequestBody"] = gen.PtrOf(gen.AlphaString()) + gens["RequestUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_Request_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_Request_STATUS(gens map[string]gopter.Gen) { + gens["Headers"] = gen.SliceOf(HeaderField_STATUSGenerator()) +} + +func Test_WebTestProperties_ValidationRules_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 WebTestProperties_ValidationRules via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules, WebTestProperties_ValidationRulesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules runs a test to see if a specific instance of WebTestProperties_ValidationRules round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules(subject WebTestProperties_ValidationRules) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules + 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 WebTestProperties_ValidationRules instances for property testing - lazily instantiated by +// WebTestProperties_ValidationRulesGenerator() +var webTestProperties_ValidationRulesGenerator gopter.Gen + +// WebTestProperties_ValidationRulesGenerator returns a generator of WebTestProperties_ValidationRules instances for property testing. +// We first initialize webTestProperties_ValidationRulesGenerator 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 WebTestProperties_ValidationRulesGenerator() gopter.Gen { + if webTestProperties_ValidationRulesGenerator != nil { + return webTestProperties_ValidationRulesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules(generators) + webTestProperties_ValidationRulesGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules(generators) + webTestProperties_ValidationRulesGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules{}), generators) + + return webTestProperties_ValidationRulesGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules(gens map[string]gopter.Gen) { + gens["ExpectedHttpStatusCode"] = gen.PtrOf(gen.Int()) + gens["IgnoreHttpStatusCode"] = gen.PtrOf(gen.Bool()) + gens["SSLCertRemainingLifetimeCheck"] = gen.PtrOf(gen.Int()) + gens["SSLCheck"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules(gens map[string]gopter.Gen) { + gens["ContentValidation"] = gen.PtrOf(WebTestProperties_ValidationRules_ContentValidationGenerator()) +} + +func Test_WebTestProperties_ValidationRules_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 WebTestProperties_ValidationRules_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules_STATUS, WebTestProperties_ValidationRules_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules_STATUS runs a test to see if a specific instance of WebTestProperties_ValidationRules_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules_STATUS(subject WebTestProperties_ValidationRules_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules_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 WebTestProperties_ValidationRules_STATUS instances for property testing - lazily instantiated by +// WebTestProperties_ValidationRules_STATUSGenerator() +var webTestProperties_ValidationRules_STATUSGenerator gopter.Gen + +// WebTestProperties_ValidationRules_STATUSGenerator returns a generator of WebTestProperties_ValidationRules_STATUS instances for property testing. +// We first initialize webTestProperties_ValidationRules_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 WebTestProperties_ValidationRules_STATUSGenerator() gopter.Gen { + if webTestProperties_ValidationRules_STATUSGenerator != nil { + return webTestProperties_ValidationRules_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(generators) + webTestProperties_ValidationRules_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(generators) + webTestProperties_ValidationRules_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_STATUS{}), generators) + + return webTestProperties_ValidationRules_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(gens map[string]gopter.Gen) { + gens["ExpectedHttpStatusCode"] = gen.PtrOf(gen.Int()) + gens["IgnoreHttpStatusCode"] = gen.PtrOf(gen.Bool()) + gens["SSLCertRemainingLifetimeCheck"] = gen.PtrOf(gen.Int()) + gens["SSLCheck"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(gens map[string]gopter.Gen) { + gens["ContentValidation"] = gen.PtrOf(WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator()) +} + +func Test_HeaderField_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 HeaderField via JSON returns original", + prop.ForAll(RunJSONSerializationTestForHeaderField, HeaderFieldGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForHeaderField runs a test to see if a specific instance of HeaderField round trips to JSON and back losslessly +func RunJSONSerializationTestForHeaderField(subject HeaderField) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual HeaderField + 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 HeaderField instances for property testing - lazily instantiated by HeaderFieldGenerator() +var headerFieldGenerator gopter.Gen + +// HeaderFieldGenerator returns a generator of HeaderField instances for property testing. +func HeaderFieldGenerator() gopter.Gen { + if headerFieldGenerator != nil { + return headerFieldGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForHeaderField(generators) + headerFieldGenerator = gen.Struct(reflect.TypeOf(HeaderField{}), generators) + + return headerFieldGenerator +} + +// AddIndependentPropertyGeneratorsForHeaderField is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForHeaderField(gens map[string]gopter.Gen) { + gens["Key"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_HeaderField_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 HeaderField_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForHeaderField_STATUS, HeaderField_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForHeaderField_STATUS runs a test to see if a specific instance of HeaderField_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForHeaderField_STATUS(subject HeaderField_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual HeaderField_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 HeaderField_STATUS instances for property testing - lazily instantiated by HeaderField_STATUSGenerator() +var headerField_STATUSGenerator gopter.Gen + +// HeaderField_STATUSGenerator returns a generator of HeaderField_STATUS instances for property testing. +func HeaderField_STATUSGenerator() gopter.Gen { + if headerField_STATUSGenerator != nil { + return headerField_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForHeaderField_STATUS(generators) + headerField_STATUSGenerator = gen.Struct(reflect.TypeOf(HeaderField_STATUS{}), generators) + + return headerField_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForHeaderField_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForHeaderField_STATUS(gens map[string]gopter.Gen) { + gens["Key"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_ValidationRules_ContentValidation_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 WebTestProperties_ValidationRules_ContentValidation via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation, WebTestProperties_ValidationRules_ContentValidationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation runs a test to see if a specific instance of WebTestProperties_ValidationRules_ContentValidation round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation(subject WebTestProperties_ValidationRules_ContentValidation) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules_ContentValidation + 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 WebTestProperties_ValidationRules_ContentValidation instances for property testing - lazily instantiated +// by WebTestProperties_ValidationRules_ContentValidationGenerator() +var webTestProperties_ValidationRules_ContentValidationGenerator gopter.Gen + +// WebTestProperties_ValidationRules_ContentValidationGenerator returns a generator of WebTestProperties_ValidationRules_ContentValidation instances for property testing. +func WebTestProperties_ValidationRules_ContentValidationGenerator() gopter.Gen { + if webTestProperties_ValidationRules_ContentValidationGenerator != nil { + return webTestProperties_ValidationRules_ContentValidationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation(generators) + webTestProperties_ValidationRules_ContentValidationGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_ContentValidation{}), generators) + + return webTestProperties_ValidationRules_ContentValidationGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation(gens map[string]gopter.Gen) { + gens["ContentMatch"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreCase"] = gen.PtrOf(gen.Bool()) + gens["PassIfTextFound"] = gen.PtrOf(gen.Bool()) +} + +func Test_WebTestProperties_ValidationRules_ContentValidation_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 WebTestProperties_ValidationRules_ContentValidation_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_STATUS, WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_STATUS runs a test to see if a specific instance of WebTestProperties_ValidationRules_ContentValidation_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_STATUS(subject WebTestProperties_ValidationRules_ContentValidation_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules_ContentValidation_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 WebTestProperties_ValidationRules_ContentValidation_STATUS instances for property testing - lazily +// instantiated by WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator() +var webTestProperties_ValidationRules_ContentValidation_STATUSGenerator gopter.Gen + +// WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator returns a generator of WebTestProperties_ValidationRules_ContentValidation_STATUS instances for property testing. +func WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator() gopter.Gen { + if webTestProperties_ValidationRules_ContentValidation_STATUSGenerator != nil { + return webTestProperties_ValidationRules_ContentValidation_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_STATUS(generators) + webTestProperties_ValidationRules_ContentValidation_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_ContentValidation_STATUS{}), generators) + + return webTestProperties_ValidationRules_ContentValidation_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_STATUS(gens map[string]gopter.Gen) { + gens["ContentMatch"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreCase"] = gen.PtrOf(gen.Bool()) + gens["PassIfTextFound"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/insights/v1api20220615/storage/zz_generated.deepcopy.go b/v2/api/insights/v1api20220615/storage/zz_generated.deepcopy.go index fb8336e7481..52c4147b8d8 100644 --- a/v2/api/insights/v1api20220615/storage/zz_generated.deepcopy.go +++ b/v2/api/insights/v1api20220615/storage/zz_generated.deepcopy.go @@ -359,6 +359,70 @@ func (in *Dimension_STATUS) DeepCopy() *Dimension_STATUS { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HeaderField) DeepCopyInto(out *HeaderField) { + *out = *in + if in.Key != nil { + in, out := &in.Key, &out.Key + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderField. +func (in *HeaderField) DeepCopy() *HeaderField { + if in == nil { + return nil + } + out := new(HeaderField) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HeaderField_STATUS) DeepCopyInto(out *HeaderField_STATUS) { + *out = *in + if in.Key != nil { + in, out := &in.Key, &out.Key + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderField_STATUS. +func (in *HeaderField_STATUS) DeepCopy() *HeaderField_STATUS { + if in == nil { + return nil + } + out := new(HeaderField_STATUS) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ScheduledQueryRule) DeepCopyInto(out *ScheduledQueryRule) { *out = *in @@ -807,3 +871,670 @@ func (in *SystemData_STATUS) DeepCopy() *SystemData_STATUS { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestGeolocation) DeepCopyInto(out *WebTestGeolocation) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestGeolocation. +func (in *WebTestGeolocation) DeepCopy() *WebTestGeolocation { + if in == nil { + return nil + } + out := new(WebTestGeolocation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestGeolocation_STATUS) DeepCopyInto(out *WebTestGeolocation_STATUS) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestGeolocation_STATUS. +func (in *WebTestGeolocation_STATUS) DeepCopy() *WebTestGeolocation_STATUS { + if in == nil { + return nil + } + out := new(WebTestGeolocation_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Configuration) DeepCopyInto(out *WebTestProperties_Configuration) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.WebTest != nil { + in, out := &in.WebTest, &out.WebTest + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Configuration. +func (in *WebTestProperties_Configuration) DeepCopy() *WebTestProperties_Configuration { + if in == nil { + return nil + } + out := new(WebTestProperties_Configuration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Configuration_STATUS) DeepCopyInto(out *WebTestProperties_Configuration_STATUS) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.WebTest != nil { + in, out := &in.WebTest, &out.WebTest + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Configuration_STATUS. +func (in *WebTestProperties_Configuration_STATUS) DeepCopy() *WebTestProperties_Configuration_STATUS { + if in == nil { + return nil + } + out := new(WebTestProperties_Configuration_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Request) DeepCopyInto(out *WebTestProperties_Request) { + *out = *in + if in.FollowRedirects != nil { + in, out := &in.FollowRedirects, &out.FollowRedirects + *out = new(bool) + **out = **in + } + if in.Headers != nil { + in, out := &in.Headers, &out.Headers + *out = make([]HeaderField, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.HttpVerb != nil { + in, out := &in.HttpVerb, &out.HttpVerb + *out = new(string) + **out = **in + } + if in.ParseDependentRequests != nil { + in, out := &in.ParseDependentRequests, &out.ParseDependentRequests + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RequestBody != nil { + in, out := &in.RequestBody, &out.RequestBody + *out = new(string) + **out = **in + } + if in.RequestUrl != nil { + in, out := &in.RequestUrl, &out.RequestUrl + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Request. +func (in *WebTestProperties_Request) DeepCopy() *WebTestProperties_Request { + if in == nil { + return nil + } + out := new(WebTestProperties_Request) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Request_STATUS) DeepCopyInto(out *WebTestProperties_Request_STATUS) { + *out = *in + if in.FollowRedirects != nil { + in, out := &in.FollowRedirects, &out.FollowRedirects + *out = new(bool) + **out = **in + } + if in.Headers != nil { + in, out := &in.Headers, &out.Headers + *out = make([]HeaderField_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.HttpVerb != nil { + in, out := &in.HttpVerb, &out.HttpVerb + *out = new(string) + **out = **in + } + if in.ParseDependentRequests != nil { + in, out := &in.ParseDependentRequests, &out.ParseDependentRequests + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RequestBody != nil { + in, out := &in.RequestBody, &out.RequestBody + *out = new(string) + **out = **in + } + if in.RequestUrl != nil { + in, out := &in.RequestUrl, &out.RequestUrl + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Request_STATUS. +func (in *WebTestProperties_Request_STATUS) DeepCopy() *WebTestProperties_Request_STATUS { + if in == nil { + return nil + } + out := new(WebTestProperties_Request_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules) DeepCopyInto(out *WebTestProperties_ValidationRules) { + *out = *in + if in.ContentValidation != nil { + in, out := &in.ContentValidation, &out.ContentValidation + *out = new(WebTestProperties_ValidationRules_ContentValidation) + (*in).DeepCopyInto(*out) + } + if in.ExpectedHttpStatusCode != nil { + in, out := &in.ExpectedHttpStatusCode, &out.ExpectedHttpStatusCode + *out = new(int) + **out = **in + } + if in.IgnoreHttpStatusCode != nil { + in, out := &in.IgnoreHttpStatusCode, &out.IgnoreHttpStatusCode + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SSLCertRemainingLifetimeCheck != nil { + in, out := &in.SSLCertRemainingLifetimeCheck, &out.SSLCertRemainingLifetimeCheck + *out = new(int) + **out = **in + } + if in.SSLCheck != nil { + in, out := &in.SSLCheck, &out.SSLCheck + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules. +func (in *WebTestProperties_ValidationRules) DeepCopy() *WebTestProperties_ValidationRules { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules_ContentValidation) DeepCopyInto(out *WebTestProperties_ValidationRules_ContentValidation) { + *out = *in + if in.ContentMatch != nil { + in, out := &in.ContentMatch, &out.ContentMatch + *out = new(string) + **out = **in + } + if in.IgnoreCase != nil { + in, out := &in.IgnoreCase, &out.IgnoreCase + *out = new(bool) + **out = **in + } + if in.PassIfTextFound != nil { + in, out := &in.PassIfTextFound, &out.PassIfTextFound + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules_ContentValidation. +func (in *WebTestProperties_ValidationRules_ContentValidation) DeepCopy() *WebTestProperties_ValidationRules_ContentValidation { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules_ContentValidation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules_ContentValidation_STATUS) DeepCopyInto(out *WebTestProperties_ValidationRules_ContentValidation_STATUS) { + *out = *in + if in.ContentMatch != nil { + in, out := &in.ContentMatch, &out.ContentMatch + *out = new(string) + **out = **in + } + if in.IgnoreCase != nil { + in, out := &in.IgnoreCase, &out.IgnoreCase + *out = new(bool) + **out = **in + } + if in.PassIfTextFound != nil { + in, out := &in.PassIfTextFound, &out.PassIfTextFound + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules_ContentValidation_STATUS. +func (in *WebTestProperties_ValidationRules_ContentValidation_STATUS) DeepCopy() *WebTestProperties_ValidationRules_ContentValidation_STATUS { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules_ContentValidation_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules_STATUS) DeepCopyInto(out *WebTestProperties_ValidationRules_STATUS) { + *out = *in + if in.ContentValidation != nil { + in, out := &in.ContentValidation, &out.ContentValidation + *out = new(WebTestProperties_ValidationRules_ContentValidation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.ExpectedHttpStatusCode != nil { + in, out := &in.ExpectedHttpStatusCode, &out.ExpectedHttpStatusCode + *out = new(int) + **out = **in + } + if in.IgnoreHttpStatusCode != nil { + in, out := &in.IgnoreHttpStatusCode, &out.IgnoreHttpStatusCode + *out = new(bool) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SSLCertRemainingLifetimeCheck != nil { + in, out := &in.SSLCertRemainingLifetimeCheck, &out.SSLCertRemainingLifetimeCheck + *out = new(int) + **out = **in + } + if in.SSLCheck != nil { + in, out := &in.SSLCheck, &out.SSLCheck + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules_STATUS. +func (in *WebTestProperties_ValidationRules_STATUS) DeepCopy() *WebTestProperties_ValidationRules_STATUS { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Webtest) DeepCopyInto(out *Webtest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webtest. +func (in *Webtest) DeepCopy() *Webtest { + if in == nil { + return nil + } + out := new(Webtest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Webtest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebtestList) DeepCopyInto(out *WebtestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Webtest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebtestList. +func (in *WebtestList) DeepCopy() *WebtestList { + if in == nil { + return nil + } + out := new(WebtestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *WebtestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Webtest_STATUS) DeepCopyInto(out *Webtest_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = new(WebTestProperties_Configuration_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Frequency != nil { + in, out := &in.Frequency, &out.Frequency + *out = new(int) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(string) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Locations != nil { + in, out := &in.Locations, &out.Locations + *out = make([]WebTestGeolocation_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertiesName != nil { + in, out := &in.PropertiesName, &out.PropertiesName + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(string) + **out = **in + } + if in.Request != nil { + in, out := &in.Request, &out.Request + *out = new(WebTestProperties_Request_STATUS) + (*in).DeepCopyInto(*out) + } + if in.RetryEnabled != nil { + in, out := &in.RetryEnabled, &out.RetryEnabled + *out = new(bool) + **out = **in + } + if in.SyntheticMonitorId != nil { + in, out := &in.SyntheticMonitorId, &out.SyntheticMonitorId + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(int) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.ValidationRules != nil { + in, out := &in.ValidationRules, &out.ValidationRules + *out = new(WebTestProperties_ValidationRules_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webtest_STATUS. +func (in *Webtest_STATUS) DeepCopy() *Webtest_STATUS { + if in == nil { + return nil + } + out := new(Webtest_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Webtest_Spec) DeepCopyInto(out *Webtest_Spec) { + *out = *in + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = new(WebTestProperties_Configuration) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Frequency != nil { + in, out := &in.Frequency, &out.Frequency + *out = new(int) + **out = **in + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(string) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Locations != nil { + in, out := &in.Locations, &out.Locations + *out = make([]WebTestGeolocation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Request != nil { + in, out := &in.Request, &out.Request + *out = new(WebTestProperties_Request) + (*in).DeepCopyInto(*out) + } + if in.RetryEnabled != nil { + in, out := &in.RetryEnabled, &out.RetryEnabled + *out = new(bool) + **out = **in + } + if in.SyntheticMonitorId != nil { + in, out := &in.SyntheticMonitorId, &out.SyntheticMonitorId + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(int) + **out = **in + } + if in.ValidationRules != nil { + in, out := &in.ValidationRules, &out.ValidationRules + *out = new(WebTestProperties_ValidationRules) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webtest_Spec. +func (in *Webtest_Spec) DeepCopy() *Webtest_Spec { + if in == nil { + return nil + } + out := new(Webtest_Spec) + in.DeepCopyInto(out) + return out +} diff --git a/v2/api/insights/v1api20220615/structure.txt b/v2/api/insights/v1api20220615/structure.txt index 2275cfd6364..787a0251054 100644 --- a/v2/api/insights/v1api20220615/structure.txt +++ b/v2/api/insights/v1api20220615/structure.txt @@ -217,60 +217,220 @@ github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615 │ │ └── "User" │ ├── Tags: map[string]string │ └── Type: *string -└── ScheduledQueryRule_Spec_ARM: Object (5 properties) - ├── Kind: *Enum (2 values) - │ ├── "LogAlert" - │ └── "LogToMetric" +├── ScheduledQueryRule_Spec_ARM: Object (5 properties) +│ ├── Kind: *Enum (2 values) +│ │ ├── "LogAlert" +│ │ └── "LogToMetric" +│ ├── Location: *string +│ ├── Name: string +│ ├── Properties: *Object (15 properties) +│ │ ├── Actions: *Object (2 properties) +│ │ │ ├── ActionGroups: string[] +│ │ │ └── CustomProperties: map[string]string +│ │ ├── AutoMitigate: *bool +│ │ ├── CheckWorkspaceAlertsStorageConfigured: *bool +│ │ ├── Criteria: *Object (1 property) +│ │ │ └── AllOf: Object (9 properties)[] +│ │ │ ├── Dimensions: Object (3 properties)[] +│ │ │ │ ├── Name: *string +│ │ │ │ ├── Operator: *Enum (2 values) +│ │ │ │ │ ├── "Exclude" +│ │ │ │ │ └── "Include" +│ │ │ │ └── Values: string[] +│ │ │ ├── FailingPeriods: *Object (2 properties) +│ │ │ │ ├── MinFailingPeriodsToAlert: *int +│ │ │ │ └── NumberOfEvaluationPeriods: *int +│ │ │ ├── MetricMeasureColumn: *string +│ │ │ ├── MetricName: *string +│ │ │ ├── Operator: *Enum (5 values) +│ │ │ │ ├── "Equals" +│ │ │ │ ├── "GreaterThan" +│ │ │ │ ├── "GreaterThanOrEqual" +│ │ │ │ ├── "LessThan" +│ │ │ │ └── "LessThanOrEqual" +│ │ │ ├── Query: *string +│ │ │ ├── ResourceIdColumn: *string +│ │ │ ├── Threshold: *float64 +│ │ │ └── TimeAggregation: *Enum (5 values) +│ │ │ ├── "Average" +│ │ │ ├── "Count" +│ │ │ ├── "Maximum" +│ │ │ ├── "Minimum" +│ │ │ └── "Total" +│ │ ├── Description: *string +│ │ ├── DisplayName: *string +│ │ ├── Enabled: *bool +│ │ ├── EvaluationFrequency: *string +│ │ ├── MuteActionsDuration: *string +│ │ ├── OverrideQueryTimeRange: *string +│ │ ├── Scopes: string[] +│ │ ├── Severity: *Enum (5 values) +│ │ │ ├── 0 +│ │ │ ├── 1 +│ │ │ ├── 2 +│ │ │ ├── 3 +│ │ │ └── 4 +│ │ ├── SkipQueryValidation: *bool +│ │ ├── TargetResourceTypes: string[] +│ │ └── WindowSize: *string +│ └── Tags: map[string]string +├── Webtest: Resource +│ ├── Owner: resources/v1apiv20191001.ResourceGroup +│ ├── Spec: Object (16 properties) +│ │ ├── AzureName: string +│ │ ├── Configuration: *Object (1 property) +│ │ │ └── WebTest: *string +│ │ ├── Description: *string +│ │ ├── Enabled: *bool +│ │ ├── Frequency: *int +│ │ ├── Kind: *Enum (3 values) +│ │ │ ├── "multistep" +│ │ │ ├── "ping" +│ │ │ └── "standard" +│ │ ├── Location: *string +│ │ ├── Locations: Object (1 property)[] +│ │ │ └── Id: *string +│ │ ├── Name: *string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── Request: *Object (6 properties) +│ │ │ ├── FollowRedirects: *bool +│ │ │ ├── Headers: Object (2 properties)[] +│ │ │ │ ├── Key: *string +│ │ │ │ └── Value: *string +│ │ │ ├── HttpVerb: *string +│ │ │ ├── ParseDependentRequests: *bool +│ │ │ ├── RequestBody: *string +│ │ │ └── RequestUrl: *string +│ │ ├── RetryEnabled: *bool +│ │ ├── SyntheticMonitorId: *string +│ │ ├── Tags: map[string]string +│ │ ├── Timeout: *int +│ │ └── ValidationRules: *Object (5 properties) +│ │ ├── ContentValidation: *Object (3 properties) +│ │ │ ├── ContentMatch: *string +│ │ │ ├── IgnoreCase: *bool +│ │ │ └── PassIfTextFound: *bool +│ │ ├── ExpectedHttpStatusCode: *int +│ │ ├── IgnoreHttpStatusCode: *bool +│ │ ├── SSLCertRemainingLifetimeCheck: *int +│ │ └── SSLCheck: *bool +│ └── Status: Object (19 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Configuration: *Object (1 property) +│ │ └── WebTest: *string +│ ├── Description: *string +│ ├── Enabled: *bool +│ ├── Frequency: *int +│ ├── Id: *string +│ ├── Kind: *Enum (3 values) +│ │ ├── "multistep" +│ │ ├── "ping" +│ │ └── "standard" +│ ├── Location: *string +│ ├── Locations: Object (1 property)[] +│ │ └── Id: *string +│ ├── Name: *string +│ ├── PropertiesName: *string +│ ├── ProvisioningState: *string +│ ├── Request: *Object (6 properties) +│ │ ├── FollowRedirects: *bool +│ │ ├── Headers: Object (2 properties)[] +│ │ │ ├── Key: *string +│ │ │ └── Value: *string +│ │ ├── HttpVerb: *string +│ │ ├── ParseDependentRequests: *bool +│ │ ├── RequestBody: *string +│ │ └── RequestUrl: *string +│ ├── RetryEnabled: *bool +│ ├── SyntheticMonitorId: *string +│ ├── Tags: map[string]string +│ ├── Timeout: *int +│ ├── Type: *string +│ └── ValidationRules: *Object (5 properties) +│ ├── ContentValidation: *Object (3 properties) +│ │ ├── ContentMatch: *string +│ │ ├── IgnoreCase: *bool +│ │ └── PassIfTextFound: *bool +│ ├── ExpectedHttpStatusCode: *int +│ ├── IgnoreHttpStatusCode: *bool +│ ├── SSLCertRemainingLifetimeCheck: *int +│ └── SSLCheck: *bool +├── Webtest_STATUS_ARM: Object (6 properties) +│ ├── Id: *string +│ ├── Location: *string +│ ├── Name: *string +│ ├── Properties: *Object (13 properties) +│ │ ├── Configuration: *Object (1 property) +│ │ │ └── WebTest: *string +│ │ ├── Description: *string +│ │ ├── Enabled: *bool +│ │ ├── Frequency: *int +│ │ ├── Kind: *Enum (3 values) +│ │ │ ├── "multistep" +│ │ │ ├── "ping" +│ │ │ └── "standard" +│ │ ├── Locations: Object (1 property)[] +│ │ │ └── Id: *string +│ │ ├── Name: *string +│ │ ├── ProvisioningState: *string +│ │ ├── Request: *Object (6 properties) +│ │ │ ├── FollowRedirects: *bool +│ │ │ ├── Headers: Object (2 properties)[] +│ │ │ │ ├── Key: *string +│ │ │ │ └── Value: *string +│ │ │ ├── HttpVerb: *string +│ │ │ ├── ParseDependentRequests: *bool +│ │ │ ├── RequestBody: *string +│ │ │ └── RequestUrl: *string +│ │ ├── RetryEnabled: *bool +│ │ ├── SyntheticMonitorId: *string +│ │ ├── Timeout: *int +│ │ └── ValidationRules: *Object (5 properties) +│ │ ├── ContentValidation: *Object (3 properties) +│ │ │ ├── ContentMatch: *string +│ │ │ ├── IgnoreCase: *bool +│ │ │ └── PassIfTextFound: *bool +│ │ ├── ExpectedHttpStatusCode: *int +│ │ ├── IgnoreHttpStatusCode: *bool +│ │ ├── SSLCertRemainingLifetimeCheck: *int +│ │ └── SSLCheck: *bool +│ ├── Tags: map[string]string +│ └── Type: *string +└── Webtest_Spec_ARM: Object (4 properties) ├── Location: *string ├── Name: string - ├── Properties: *Object (15 properties) - │ ├── Actions: *Object (2 properties) - │ │ ├── ActionGroups: string[] - │ │ └── CustomProperties: map[string]string - │ ├── AutoMitigate: *bool - │ ├── CheckWorkspaceAlertsStorageConfigured: *bool - │ ├── Criteria: *Object (1 property) - │ │ └── AllOf: Object (9 properties)[] - │ │ ├── Dimensions: Object (3 properties)[] - │ │ │ ├── Name: *string - │ │ │ ├── Operator: *Enum (2 values) - │ │ │ │ ├── "Exclude" - │ │ │ │ └── "Include" - │ │ │ └── Values: string[] - │ │ ├── FailingPeriods: *Object (2 properties) - │ │ │ ├── MinFailingPeriodsToAlert: *int - │ │ │ └── NumberOfEvaluationPeriods: *int - │ │ ├── MetricMeasureColumn: *string - │ │ ├── MetricName: *string - │ │ ├── Operator: *Enum (5 values) - │ │ │ ├── "Equals" - │ │ │ ├── "GreaterThan" - │ │ │ ├── "GreaterThanOrEqual" - │ │ │ ├── "LessThan" - │ │ │ └── "LessThanOrEqual" - │ │ ├── Query: *string - │ │ ├── ResourceIdColumn: *string - │ │ ├── Threshold: *float64 - │ │ └── TimeAggregation: *Enum (5 values) - │ │ ├── "Average" - │ │ ├── "Count" - │ │ ├── "Maximum" - │ │ ├── "Minimum" - │ │ └── "Total" + ├── Properties: *Object (12 properties) + │ ├── Configuration: *Object (1 property) + │ │ └── WebTest: *string │ ├── Description: *string - │ ├── DisplayName: *string │ ├── Enabled: *bool - │ ├── EvaluationFrequency: *string - │ ├── MuteActionsDuration: *string - │ ├── OverrideQueryTimeRange: *string - │ ├── Scopes: string[] - │ ├── Severity: *Enum (5 values) - │ │ ├── 0 - │ │ ├── 1 - │ │ ├── 2 - │ │ ├── 3 - │ │ └── 4 - │ ├── SkipQueryValidation: *bool - │ ├── TargetResourceTypes: string[] - │ └── WindowSize: *string + │ ├── Frequency: *int + │ ├── Kind: *Enum (3 values) + │ │ ├── "multistep" + │ │ ├── "ping" + │ │ └── "standard" + │ ├── Locations: Object (1 property)[] + │ │ └── Id: *string + │ ├── Name: *string + │ ├── Request: *Object (6 properties) + │ │ ├── FollowRedirects: *bool + │ │ ├── Headers: Object (2 properties)[] + │ │ │ ├── Key: *string + │ │ │ └── Value: *string + │ │ ├── HttpVerb: *string + │ │ ├── ParseDependentRequests: *bool + │ │ ├── RequestBody: *string + │ │ └── RequestUrl: *string + │ ├── RetryEnabled: *bool + │ ├── SyntheticMonitorId: *string + │ ├── Timeout: *int + │ └── ValidationRules: *Object (5 properties) + │ ├── ContentValidation: *Object (3 properties) + │ │ ├── ContentMatch: *string + │ │ ├── IgnoreCase: *bool + │ │ └── PassIfTextFound: *bool + │ ├── ExpectedHttpStatusCode: *int + │ ├── IgnoreHttpStatusCode: *bool + │ ├── SSLCertRemainingLifetimeCheck: *int + │ └── SSLCheck: *bool └── Tags: map[string]string diff --git a/v2/api/insights/v1api20220615/webtest_spec_arm_types_gen.go b/v2/api/insights/v1api20220615/webtest_spec_arm_types_gen.go new file mode 100644 index 00000000000..b05c32edd0a --- /dev/null +++ b/v2/api/insights/v1api20220615/webtest_spec_arm_types_gen.go @@ -0,0 +1,145 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220615 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type Webtest_Spec_ARM struct { + // Location: Resource location + Location *string `json:"location,omitempty"` + Name string `json:"name,omitempty"` + + // Properties: Metadata describing a web test for an Azure resource. + Properties *WebTestProperties_ARM `json:"properties,omitempty"` + + // Tags: Resource tags + Tags map[string]string `json:"tags,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &Webtest_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2022-06-15" +func (webtest Webtest_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (webtest *Webtest_Spec_ARM) GetName() string { + return webtest.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Insights/webtests" +func (webtest *Webtest_Spec_ARM) GetType() string { + return "Microsoft.Insights/webtests" +} + +// Metadata describing a web test for an Azure resource. +type WebTestProperties_ARM struct { + // Configuration: An XML configuration specification for a WebTest. + Configuration *WebTestProperties_Configuration_ARM `json:"Configuration,omitempty"` + + // Description: User defined description for this WebTest. + Description *string `json:"Description,omitempty"` + + // Enabled: Is the test actively being monitored. + Enabled *bool `json:"Enabled,omitempty"` + + // Frequency: Interval in seconds between test runs for this WebTest. Default value is 300. + Frequency *int `json:"Frequency,omitempty"` + + // Kind: The kind of web test this is, valid choices are ping, multistep and standard. + Kind *WebTestProperties_Kind `json:"Kind,omitempty"` + + // Locations: A list of where to physically run the tests from to give global coverage for accessibility of your + // application. + Locations []WebTestGeolocation_ARM `json:"Locations,omitempty"` + + // Name: User defined name if this WebTest. + Name *string `json:"Name,omitempty"` + + // Request: The collection of request properties + Request *WebTestProperties_Request_ARM `json:"Request,omitempty"` + + // RetryEnabled: Allow for retries should this WebTest fail. + RetryEnabled *bool `json:"RetryEnabled,omitempty"` + + // SyntheticMonitorId: Unique ID of this WebTest. This is typically the same value as the Name field. + SyntheticMonitorId *string `json:"SyntheticMonitorId,omitempty"` + + // Timeout: Seconds until this WebTest will timeout and fail. Default value is 30. + Timeout *int `json:"Timeout,omitempty"` + + // ValidationRules: The collection of validation rule properties + ValidationRules *WebTestProperties_ValidationRules_ARM `json:"ValidationRules,omitempty"` +} + +// Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. +type WebTestGeolocation_ARM struct { + // Id: Location ID for the WebTest to run from. + Id *string `json:"Id,omitempty"` +} + +type WebTestProperties_Configuration_ARM struct { + // WebTest: The XML specification of a WebTest to run against an application. + WebTest *string `json:"WebTest,omitempty"` +} + +type WebTestProperties_Request_ARM struct { + // FollowRedirects: Follow redirects for this web test. + FollowRedirects *bool `json:"FollowRedirects,omitempty"` + + // Headers: List of headers and their values to add to the WebTest call. + Headers []HeaderField_ARM `json:"Headers,omitempty"` + + // HttpVerb: Http verb to use for this web test. + HttpVerb *string `json:"HttpVerb,omitempty"` + + // ParseDependentRequests: Parse Dependent request for this WebTest. + ParseDependentRequests *bool `json:"ParseDependentRequests,omitempty"` + + // RequestBody: Base64 encoded string body to send with this web test. + RequestBody *string `json:"RequestBody,omitempty"` + + // RequestUrl: Url location to test. + RequestUrl *string `json:"RequestUrl,omitempty"` +} + +type WebTestProperties_ValidationRules_ARM struct { + // ContentValidation: The collection of content validation properties + ContentValidation *WebTestProperties_ValidationRules_ContentValidation_ARM `json:"ContentValidation,omitempty"` + + // ExpectedHttpStatusCode: Validate that the WebTest returns the http status code provided. + ExpectedHttpStatusCode *int `json:"ExpectedHttpStatusCode,omitempty"` + + // IgnoreHttpStatusCode: When set, validation will ignore the status code. + IgnoreHttpStatusCode *bool `json:"IgnoreHttpStatusCode,omitempty"` + + // SSLCertRemainingLifetimeCheck: A number of days to check still remain before the the existing SSL cert expires. Value + // must be positive and the SSLCheck must be set to true. + SSLCertRemainingLifetimeCheck *int `json:"SSLCertRemainingLifetimeCheck,omitempty"` + + // SSLCheck: Checks to see if the SSL cert is still valid. + SSLCheck *bool `json:"SSLCheck,omitempty"` +} + +// A header to add to the WebTest. +type HeaderField_ARM struct { + // Key: The name of the header. + Key *string `json:"key,omitempty"` + + // Value: The value of the header. + Value *string `json:"value,omitempty"` +} + +type WebTestProperties_ValidationRules_ContentValidation_ARM struct { + // ContentMatch: Content to look for in the return of the WebTest. Must not be null or empty. + ContentMatch *string `json:"ContentMatch,omitempty"` + + // IgnoreCase: When set, this value makes the ContentMatch validation case insensitive. + IgnoreCase *bool `json:"IgnoreCase,omitempty"` + + // PassIfTextFound: When true, validation will pass if there is a match for the ContentMatch string. If false, validation + // will fail if there is a match + PassIfTextFound *bool `json:"PassIfTextFound,omitempty"` +} diff --git a/v2/api/insights/v1api20220615/webtest_spec_arm_types_gen_test.go b/v2/api/insights/v1api20220615/webtest_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..86a419827a4 --- /dev/null +++ b/v2/api/insights/v1api20220615/webtest_spec_arm_types_gen_test.go @@ -0,0 +1,584 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220615 + +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_Webtest_Spec_ARM_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 Webtest_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebtest_Spec_ARM, Webtest_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebtest_Spec_ARM runs a test to see if a specific instance of Webtest_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebtest_Spec_ARM(subject Webtest_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Webtest_Spec_ARM + 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 Webtest_Spec_ARM instances for property testing - lazily instantiated by Webtest_Spec_ARMGenerator() +var webtest_Spec_ARMGenerator gopter.Gen + +// Webtest_Spec_ARMGenerator returns a generator of Webtest_Spec_ARM instances for property testing. +// We first initialize webtest_Spec_ARMGenerator 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 Webtest_Spec_ARMGenerator() gopter.Gen { + if webtest_Spec_ARMGenerator != nil { + return webtest_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_Spec_ARM(generators) + webtest_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(Webtest_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForWebtest_Spec_ARM(generators) + webtest_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(Webtest_Spec_ARM{}), generators) + + return webtest_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebtest_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebtest_Spec_ARM(gens map[string]gopter.Gen) { + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.AlphaString() + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForWebtest_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebtest_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(WebTestProperties_ARMGenerator()) +} + +func Test_WebTestProperties_ARM_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 WebTestProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ARM, WebTestProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ARM runs a test to see if a specific instance of WebTestProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ARM(subject WebTestProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ARM + 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 WebTestProperties_ARM instances for property testing - lazily instantiated by +// WebTestProperties_ARMGenerator() +var webTestProperties_ARMGenerator gopter.Gen + +// WebTestProperties_ARMGenerator returns a generator of WebTestProperties_ARM instances for property testing. +// We first initialize webTestProperties_ARMGenerator 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 WebTestProperties_ARMGenerator() gopter.Gen { + if webTestProperties_ARMGenerator != nil { + return webTestProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ARM(generators) + webTestProperties_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ARM(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_ARM(generators) + webTestProperties_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ARM{}), generators) + + return webTestProperties_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ARM(gens map[string]gopter.Gen) { + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Frequency"] = gen.PtrOf(gen.Int()) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(WebTestProperties_Kind_Multistep, WebTestProperties_Kind_Ping, WebTestProperties_Kind_Standard)) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["RetryEnabled"] = gen.PtrOf(gen.Bool()) + gens["SyntheticMonitorId"] = gen.PtrOf(gen.AlphaString()) + gens["Timeout"] = gen.PtrOf(gen.Int()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_ARM(gens map[string]gopter.Gen) { + gens["Configuration"] = gen.PtrOf(WebTestProperties_Configuration_ARMGenerator()) + gens["Locations"] = gen.SliceOf(WebTestGeolocation_ARMGenerator()) + gens["Request"] = gen.PtrOf(WebTestProperties_Request_ARMGenerator()) + gens["ValidationRules"] = gen.PtrOf(WebTestProperties_ValidationRules_ARMGenerator()) +} + +func Test_WebTestGeolocation_ARM_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 WebTestGeolocation_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestGeolocation_ARM, WebTestGeolocation_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestGeolocation_ARM runs a test to see if a specific instance of WebTestGeolocation_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestGeolocation_ARM(subject WebTestGeolocation_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestGeolocation_ARM + 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 WebTestGeolocation_ARM instances for property testing - lazily instantiated by +// WebTestGeolocation_ARMGenerator() +var webTestGeolocation_ARMGenerator gopter.Gen + +// WebTestGeolocation_ARMGenerator returns a generator of WebTestGeolocation_ARM instances for property testing. +func WebTestGeolocation_ARMGenerator() gopter.Gen { + if webTestGeolocation_ARMGenerator != nil { + return webTestGeolocation_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestGeolocation_ARM(generators) + webTestGeolocation_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestGeolocation_ARM{}), generators) + + return webTestGeolocation_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestGeolocation_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestGeolocation_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_Configuration_ARM_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 WebTestProperties_Configuration_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Configuration_ARM, WebTestProperties_Configuration_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Configuration_ARM runs a test to see if a specific instance of WebTestProperties_Configuration_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Configuration_ARM(subject WebTestProperties_Configuration_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Configuration_ARM + 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 WebTestProperties_Configuration_ARM instances for property testing - lazily instantiated by +// WebTestProperties_Configuration_ARMGenerator() +var webTestProperties_Configuration_ARMGenerator gopter.Gen + +// WebTestProperties_Configuration_ARMGenerator returns a generator of WebTestProperties_Configuration_ARM instances for property testing. +func WebTestProperties_Configuration_ARMGenerator() gopter.Gen { + if webTestProperties_Configuration_ARMGenerator != nil { + return webTestProperties_Configuration_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_ARM(generators) + webTestProperties_Configuration_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Configuration_ARM{}), generators) + + return webTestProperties_Configuration_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_ARM(gens map[string]gopter.Gen) { + gens["WebTest"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_Request_ARM_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 WebTestProperties_Request_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Request_ARM, WebTestProperties_Request_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Request_ARM runs a test to see if a specific instance of WebTestProperties_Request_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Request_ARM(subject WebTestProperties_Request_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Request_ARM + 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 WebTestProperties_Request_ARM instances for property testing - lazily instantiated by +// WebTestProperties_Request_ARMGenerator() +var webTestProperties_Request_ARMGenerator gopter.Gen + +// WebTestProperties_Request_ARMGenerator returns a generator of WebTestProperties_Request_ARM instances for property testing. +// We first initialize webTestProperties_Request_ARMGenerator 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 WebTestProperties_Request_ARMGenerator() gopter.Gen { + if webTestProperties_Request_ARMGenerator != nil { + return webTestProperties_Request_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request_ARM(generators) + webTestProperties_Request_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request_ARM(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_Request_ARM(generators) + webTestProperties_Request_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request_ARM{}), generators) + + return webTestProperties_Request_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Request_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Request_ARM(gens map[string]gopter.Gen) { + gens["FollowRedirects"] = gen.PtrOf(gen.Bool()) + gens["HttpVerb"] = gen.PtrOf(gen.AlphaString()) + gens["ParseDependentRequests"] = gen.PtrOf(gen.Bool()) + gens["RequestBody"] = gen.PtrOf(gen.AlphaString()) + gens["RequestUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_Request_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_Request_ARM(gens map[string]gopter.Gen) { + gens["Headers"] = gen.SliceOf(HeaderField_ARMGenerator()) +} + +func Test_WebTestProperties_ValidationRules_ARM_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 WebTestProperties_ValidationRules_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules_ARM, WebTestProperties_ValidationRules_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules_ARM runs a test to see if a specific instance of WebTestProperties_ValidationRules_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules_ARM(subject WebTestProperties_ValidationRules_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules_ARM + 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 WebTestProperties_ValidationRules_ARM instances for property testing - lazily instantiated by +// WebTestProperties_ValidationRules_ARMGenerator() +var webTestProperties_ValidationRules_ARMGenerator gopter.Gen + +// WebTestProperties_ValidationRules_ARMGenerator returns a generator of WebTestProperties_ValidationRules_ARM instances for property testing. +// We first initialize webTestProperties_ValidationRules_ARMGenerator 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 WebTestProperties_ValidationRules_ARMGenerator() gopter.Gen { + if webTestProperties_ValidationRules_ARMGenerator != nil { + return webTestProperties_ValidationRules_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ARM(generators) + webTestProperties_ValidationRules_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ARM(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_ARM(generators) + webTestProperties_ValidationRules_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_ARM{}), generators) + + return webTestProperties_ValidationRules_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ARM(gens map[string]gopter.Gen) { + gens["ExpectedHttpStatusCode"] = gen.PtrOf(gen.Int()) + gens["IgnoreHttpStatusCode"] = gen.PtrOf(gen.Bool()) + gens["SSLCertRemainingLifetimeCheck"] = gen.PtrOf(gen.Int()) + gens["SSLCheck"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_ARM(gens map[string]gopter.Gen) { + gens["ContentValidation"] = gen.PtrOf(WebTestProperties_ValidationRules_ContentValidation_ARMGenerator()) +} + +func Test_HeaderField_ARM_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 HeaderField_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForHeaderField_ARM, HeaderField_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForHeaderField_ARM runs a test to see if a specific instance of HeaderField_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForHeaderField_ARM(subject HeaderField_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual HeaderField_ARM + 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 HeaderField_ARM instances for property testing - lazily instantiated by HeaderField_ARMGenerator() +var headerField_ARMGenerator gopter.Gen + +// HeaderField_ARMGenerator returns a generator of HeaderField_ARM instances for property testing. +func HeaderField_ARMGenerator() gopter.Gen { + if headerField_ARMGenerator != nil { + return headerField_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForHeaderField_ARM(generators) + headerField_ARMGenerator = gen.Struct(reflect.TypeOf(HeaderField_ARM{}), generators) + + return headerField_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForHeaderField_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForHeaderField_ARM(gens map[string]gopter.Gen) { + gens["Key"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_ValidationRules_ContentValidation_ARM_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 WebTestProperties_ValidationRules_ContentValidation_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_ARM, WebTestProperties_ValidationRules_ContentValidation_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_ARM runs a test to see if a specific instance of WebTestProperties_ValidationRules_ContentValidation_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_ARM(subject WebTestProperties_ValidationRules_ContentValidation_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules_ContentValidation_ARM + 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 WebTestProperties_ValidationRules_ContentValidation_ARM instances for property testing - lazily +// instantiated by WebTestProperties_ValidationRules_ContentValidation_ARMGenerator() +var webTestProperties_ValidationRules_ContentValidation_ARMGenerator gopter.Gen + +// WebTestProperties_ValidationRules_ContentValidation_ARMGenerator returns a generator of WebTestProperties_ValidationRules_ContentValidation_ARM instances for property testing. +func WebTestProperties_ValidationRules_ContentValidation_ARMGenerator() gopter.Gen { + if webTestProperties_ValidationRules_ContentValidation_ARMGenerator != nil { + return webTestProperties_ValidationRules_ContentValidation_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_ARM(generators) + webTestProperties_ValidationRules_ContentValidation_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_ContentValidation_ARM{}), generators) + + return webTestProperties_ValidationRules_ContentValidation_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_ARM(gens map[string]gopter.Gen) { + gens["ContentMatch"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreCase"] = gen.PtrOf(gen.Bool()) + gens["PassIfTextFound"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/insights/v1api20220615/webtest_status_arm_types_gen.go b/v2/api/insights/v1api20220615/webtest_status_arm_types_gen.go new file mode 100644 index 00000000000..793fcc1593d --- /dev/null +++ b/v2/api/insights/v1api20220615/webtest_status_arm_types_gen.go @@ -0,0 +1,139 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220615 + +type Webtest_STATUS_ARM struct { + // Id: Azure resource Id + Id *string `json:"id,omitempty"` + + // Location: Resource location + Location *string `json:"location,omitempty"` + + // Name: Azure resource name + Name *string `json:"name,omitempty"` + + // Properties: Metadata describing a web test for an Azure resource. + Properties *WebTestProperties_STATUS_ARM `json:"properties,omitempty"` + + // Tags: Resource tags + Tags map[string]string `json:"tags,omitempty"` + + // Type: Azure resource type + Type *string `json:"type,omitempty"` +} + +// Metadata describing a web test for an Azure resource. +type WebTestProperties_STATUS_ARM struct { + // Configuration: An XML configuration specification for a WebTest. + Configuration *WebTestProperties_Configuration_STATUS_ARM `json:"Configuration,omitempty"` + + // Description: User defined description for this WebTest. + Description *string `json:"Description,omitempty"` + + // Enabled: Is the test actively being monitored. + Enabled *bool `json:"Enabled,omitempty"` + + // Frequency: Interval in seconds between test runs for this WebTest. Default value is 300. + Frequency *int `json:"Frequency,omitempty"` + + // Kind: The kind of web test this is, valid choices are ping, multistep and standard. + Kind *WebTestProperties_Kind_STATUS `json:"Kind,omitempty"` + + // Locations: A list of where to physically run the tests from to give global coverage for accessibility of your + // application. + Locations []WebTestGeolocation_STATUS_ARM `json:"Locations,omitempty"` + + // Name: User defined name if this WebTest. + Name *string `json:"Name,omitempty"` + + // ProvisioningState: Current state of this component, whether or not is has been provisioned within the resource group it + // is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, + // Canceled, and Failed. + ProvisioningState *string `json:"provisioningState,omitempty"` + + // Request: The collection of request properties + Request *WebTestProperties_Request_STATUS_ARM `json:"Request,omitempty"` + + // RetryEnabled: Allow for retries should this WebTest fail. + RetryEnabled *bool `json:"RetryEnabled,omitempty"` + + // SyntheticMonitorId: Unique ID of this WebTest. This is typically the same value as the Name field. + SyntheticMonitorId *string `json:"SyntheticMonitorId,omitempty"` + + // Timeout: Seconds until this WebTest will timeout and fail. Default value is 30. + Timeout *int `json:"Timeout,omitempty"` + + // ValidationRules: The collection of validation rule properties + ValidationRules *WebTestProperties_ValidationRules_STATUS_ARM `json:"ValidationRules,omitempty"` +} + +// Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. +type WebTestGeolocation_STATUS_ARM struct { + // Id: Location ID for the WebTest to run from. + Id *string `json:"Id,omitempty"` +} + +type WebTestProperties_Configuration_STATUS_ARM struct { + // WebTest: The XML specification of a WebTest to run against an application. + WebTest *string `json:"WebTest,omitempty"` +} + +type WebTestProperties_Request_STATUS_ARM struct { + // FollowRedirects: Follow redirects for this web test. + FollowRedirects *bool `json:"FollowRedirects,omitempty"` + + // Headers: List of headers and their values to add to the WebTest call. + Headers []HeaderField_STATUS_ARM `json:"Headers,omitempty"` + + // HttpVerb: Http verb to use for this web test. + HttpVerb *string `json:"HttpVerb,omitempty"` + + // ParseDependentRequests: Parse Dependent request for this WebTest. + ParseDependentRequests *bool `json:"ParseDependentRequests,omitempty"` + + // RequestBody: Base64 encoded string body to send with this web test. + RequestBody *string `json:"RequestBody,omitempty"` + + // RequestUrl: Url location to test. + RequestUrl *string `json:"RequestUrl,omitempty"` +} + +type WebTestProperties_ValidationRules_STATUS_ARM struct { + // ContentValidation: The collection of content validation properties + ContentValidation *WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM `json:"ContentValidation,omitempty"` + + // ExpectedHttpStatusCode: Validate that the WebTest returns the http status code provided. + ExpectedHttpStatusCode *int `json:"ExpectedHttpStatusCode,omitempty"` + + // IgnoreHttpStatusCode: When set, validation will ignore the status code. + IgnoreHttpStatusCode *bool `json:"IgnoreHttpStatusCode,omitempty"` + + // SSLCertRemainingLifetimeCheck: A number of days to check still remain before the the existing SSL cert expires. Value + // must be positive and the SSLCheck must be set to true. + SSLCertRemainingLifetimeCheck *int `json:"SSLCertRemainingLifetimeCheck,omitempty"` + + // SSLCheck: Checks to see if the SSL cert is still valid. + SSLCheck *bool `json:"SSLCheck,omitempty"` +} + +// A header to add to the WebTest. +type HeaderField_STATUS_ARM struct { + // Key: The name of the header. + Key *string `json:"key,omitempty"` + + // Value: The value of the header. + Value *string `json:"value,omitempty"` +} + +type WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM struct { + // ContentMatch: Content to look for in the return of the WebTest. Must not be null or empty. + ContentMatch *string `json:"ContentMatch,omitempty"` + + // IgnoreCase: When set, this value makes the ContentMatch validation case insensitive. + IgnoreCase *bool `json:"IgnoreCase,omitempty"` + + // PassIfTextFound: When true, validation will pass if there is a match for the ContentMatch string. If false, validation + // will fail if there is a match + PassIfTextFound *bool `json:"PassIfTextFound,omitempty"` +} diff --git a/v2/api/insights/v1api20220615/webtest_status_arm_types_gen_test.go b/v2/api/insights/v1api20220615/webtest_status_arm_types_gen_test.go new file mode 100644 index 00000000000..b93ef4386d8 --- /dev/null +++ b/v2/api/insights/v1api20220615/webtest_status_arm_types_gen_test.go @@ -0,0 +1,588 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220615 + +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_Webtest_STATUS_ARM_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 Webtest_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebtest_STATUS_ARM, Webtest_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebtest_STATUS_ARM runs a test to see if a specific instance of Webtest_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebtest_STATUS_ARM(subject Webtest_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Webtest_STATUS_ARM + 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 Webtest_STATUS_ARM instances for property testing - lazily instantiated by Webtest_STATUS_ARMGenerator() +var webtest_STATUS_ARMGenerator gopter.Gen + +// Webtest_STATUS_ARMGenerator returns a generator of Webtest_STATUS_ARM instances for property testing. +// We first initialize webtest_STATUS_ARMGenerator 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 Webtest_STATUS_ARMGenerator() gopter.Gen { + if webtest_STATUS_ARMGenerator != nil { + return webtest_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_STATUS_ARM(generators) + webtest_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Webtest_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForWebtest_STATUS_ARM(generators) + webtest_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Webtest_STATUS_ARM{}), generators) + + return webtest_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebtest_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebtest_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForWebtest_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebtest_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(WebTestProperties_STATUS_ARMGenerator()) +} + +func Test_WebTestProperties_STATUS_ARM_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 WebTestProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_STATUS_ARM, WebTestProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_STATUS_ARM runs a test to see if a specific instance of WebTestProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_STATUS_ARM(subject WebTestProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_STATUS_ARM + 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 WebTestProperties_STATUS_ARM instances for property testing - lazily instantiated by +// WebTestProperties_STATUS_ARMGenerator() +var webTestProperties_STATUS_ARMGenerator gopter.Gen + +// WebTestProperties_STATUS_ARMGenerator returns a generator of WebTestProperties_STATUS_ARM instances for property testing. +// We first initialize webTestProperties_STATUS_ARMGenerator 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 WebTestProperties_STATUS_ARMGenerator() gopter.Gen { + if webTestProperties_STATUS_ARMGenerator != nil { + return webTestProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_STATUS_ARM(generators) + webTestProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_STATUS_ARM(generators) + webTestProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_STATUS_ARM{}), generators) + + return webTestProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Frequency"] = gen.PtrOf(gen.Int()) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(WebTestProperties_Kind_STATUS_Multistep, WebTestProperties_Kind_STATUS_Ping, WebTestProperties_Kind_STATUS_Standard)) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.AlphaString()) + gens["RetryEnabled"] = gen.PtrOf(gen.Bool()) + gens["SyntheticMonitorId"] = gen.PtrOf(gen.AlphaString()) + gens["Timeout"] = gen.PtrOf(gen.Int()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Configuration"] = gen.PtrOf(WebTestProperties_Configuration_STATUS_ARMGenerator()) + gens["Locations"] = gen.SliceOf(WebTestGeolocation_STATUS_ARMGenerator()) + gens["Request"] = gen.PtrOf(WebTestProperties_Request_STATUS_ARMGenerator()) + gens["ValidationRules"] = gen.PtrOf(WebTestProperties_ValidationRules_STATUS_ARMGenerator()) +} + +func Test_WebTestGeolocation_STATUS_ARM_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 WebTestGeolocation_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestGeolocation_STATUS_ARM, WebTestGeolocation_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestGeolocation_STATUS_ARM runs a test to see if a specific instance of WebTestGeolocation_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestGeolocation_STATUS_ARM(subject WebTestGeolocation_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestGeolocation_STATUS_ARM + 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 WebTestGeolocation_STATUS_ARM instances for property testing - lazily instantiated by +// WebTestGeolocation_STATUS_ARMGenerator() +var webTestGeolocation_STATUS_ARMGenerator gopter.Gen + +// WebTestGeolocation_STATUS_ARMGenerator returns a generator of WebTestGeolocation_STATUS_ARM instances for property testing. +func WebTestGeolocation_STATUS_ARMGenerator() gopter.Gen { + if webTestGeolocation_STATUS_ARMGenerator != nil { + return webTestGeolocation_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestGeolocation_STATUS_ARM(generators) + webTestGeolocation_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestGeolocation_STATUS_ARM{}), generators) + + return webTestGeolocation_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestGeolocation_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestGeolocation_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_Configuration_STATUS_ARM_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 WebTestProperties_Configuration_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Configuration_STATUS_ARM, WebTestProperties_Configuration_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Configuration_STATUS_ARM runs a test to see if a specific instance of WebTestProperties_Configuration_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Configuration_STATUS_ARM(subject WebTestProperties_Configuration_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Configuration_STATUS_ARM + 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 WebTestProperties_Configuration_STATUS_ARM instances for property testing - lazily instantiated by +// WebTestProperties_Configuration_STATUS_ARMGenerator() +var webTestProperties_Configuration_STATUS_ARMGenerator gopter.Gen + +// WebTestProperties_Configuration_STATUS_ARMGenerator returns a generator of WebTestProperties_Configuration_STATUS_ARM instances for property testing. +func WebTestProperties_Configuration_STATUS_ARMGenerator() gopter.Gen { + if webTestProperties_Configuration_STATUS_ARMGenerator != nil { + return webTestProperties_Configuration_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_STATUS_ARM(generators) + webTestProperties_Configuration_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Configuration_STATUS_ARM{}), generators) + + return webTestProperties_Configuration_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_STATUS_ARM(gens map[string]gopter.Gen) { + gens["WebTest"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_Request_STATUS_ARM_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 WebTestProperties_Request_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Request_STATUS_ARM, WebTestProperties_Request_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Request_STATUS_ARM runs a test to see if a specific instance of WebTestProperties_Request_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Request_STATUS_ARM(subject WebTestProperties_Request_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Request_STATUS_ARM + 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 WebTestProperties_Request_STATUS_ARM instances for property testing - lazily instantiated by +// WebTestProperties_Request_STATUS_ARMGenerator() +var webTestProperties_Request_STATUS_ARMGenerator gopter.Gen + +// WebTestProperties_Request_STATUS_ARMGenerator returns a generator of WebTestProperties_Request_STATUS_ARM instances for property testing. +// We first initialize webTestProperties_Request_STATUS_ARMGenerator 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 WebTestProperties_Request_STATUS_ARMGenerator() gopter.Gen { + if webTestProperties_Request_STATUS_ARMGenerator != nil { + return webTestProperties_Request_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS_ARM(generators) + webTestProperties_Request_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_Request_STATUS_ARM(generators) + webTestProperties_Request_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request_STATUS_ARM{}), generators) + + return webTestProperties_Request_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS_ARM(gens map[string]gopter.Gen) { + gens["FollowRedirects"] = gen.PtrOf(gen.Bool()) + gens["HttpVerb"] = gen.PtrOf(gen.AlphaString()) + gens["ParseDependentRequests"] = gen.PtrOf(gen.Bool()) + gens["RequestBody"] = gen.PtrOf(gen.AlphaString()) + gens["RequestUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_Request_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_Request_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Headers"] = gen.SliceOf(HeaderField_STATUS_ARMGenerator()) +} + +func Test_WebTestProperties_ValidationRules_STATUS_ARM_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 WebTestProperties_ValidationRules_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules_STATUS_ARM, WebTestProperties_ValidationRules_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules_STATUS_ARM runs a test to see if a specific instance of WebTestProperties_ValidationRules_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules_STATUS_ARM(subject WebTestProperties_ValidationRules_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules_STATUS_ARM + 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 WebTestProperties_ValidationRules_STATUS_ARM instances for property testing - lazily instantiated by +// WebTestProperties_ValidationRules_STATUS_ARMGenerator() +var webTestProperties_ValidationRules_STATUS_ARMGenerator gopter.Gen + +// WebTestProperties_ValidationRules_STATUS_ARMGenerator returns a generator of WebTestProperties_ValidationRules_STATUS_ARM instances for property testing. +// We first initialize webTestProperties_ValidationRules_STATUS_ARMGenerator 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 WebTestProperties_ValidationRules_STATUS_ARMGenerator() gopter.Gen { + if webTestProperties_ValidationRules_STATUS_ARMGenerator != nil { + return webTestProperties_ValidationRules_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS_ARM(generators) + webTestProperties_ValidationRules_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS_ARM(generators) + webTestProperties_ValidationRules_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_STATUS_ARM{}), generators) + + return webTestProperties_ValidationRules_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ExpectedHttpStatusCode"] = gen.PtrOf(gen.Int()) + gens["IgnoreHttpStatusCode"] = gen.PtrOf(gen.Bool()) + gens["SSLCertRemainingLifetimeCheck"] = gen.PtrOf(gen.Int()) + gens["SSLCheck"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ContentValidation"] = gen.PtrOf(WebTestProperties_ValidationRules_ContentValidation_STATUS_ARMGenerator()) +} + +func Test_HeaderField_STATUS_ARM_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 HeaderField_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForHeaderField_STATUS_ARM, HeaderField_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForHeaderField_STATUS_ARM runs a test to see if a specific instance of HeaderField_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForHeaderField_STATUS_ARM(subject HeaderField_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual HeaderField_STATUS_ARM + 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 HeaderField_STATUS_ARM instances for property testing - lazily instantiated by +// HeaderField_STATUS_ARMGenerator() +var headerField_STATUS_ARMGenerator gopter.Gen + +// HeaderField_STATUS_ARMGenerator returns a generator of HeaderField_STATUS_ARM instances for property testing. +func HeaderField_STATUS_ARMGenerator() gopter.Gen { + if headerField_STATUS_ARMGenerator != nil { + return headerField_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForHeaderField_STATUS_ARM(generators) + headerField_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(HeaderField_STATUS_ARM{}), generators) + + return headerField_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForHeaderField_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForHeaderField_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Key"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM_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 WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_STATUS_ARM, WebTestProperties_ValidationRules_ContentValidation_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_STATUS_ARM runs a test to see if a specific instance of WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_STATUS_ARM(subject WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM + 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 WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM instances for property testing - lazily +// instantiated by WebTestProperties_ValidationRules_ContentValidation_STATUS_ARMGenerator() +var webTestProperties_ValidationRules_ContentValidation_STATUS_ARMGenerator gopter.Gen + +// WebTestProperties_ValidationRules_ContentValidation_STATUS_ARMGenerator returns a generator of WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM instances for property testing. +func WebTestProperties_ValidationRules_ContentValidation_STATUS_ARMGenerator() gopter.Gen { + if webTestProperties_ValidationRules_ContentValidation_STATUS_ARMGenerator != nil { + return webTestProperties_ValidationRules_ContentValidation_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_STATUS_ARM(generators) + webTestProperties_ValidationRules_ContentValidation_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM{}), generators) + + return webTestProperties_ValidationRules_ContentValidation_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ContentMatch"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreCase"] = gen.PtrOf(gen.Bool()) + gens["PassIfTextFound"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/insights/v1api20220615/webtest_types_gen.go b/v2/api/insights/v1api20220615/webtest_types_gen.go new file mode 100644 index 00000000000..fd1c2654226 --- /dev/null +++ b/v2/api/insights/v1api20220615/webtest_types_gen.go @@ -0,0 +1,3273 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220615 + +import ( + "fmt" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/webTests_API.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName} +type Webtest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec Webtest_Spec `json:"spec,omitempty"` + Status Webtest_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &Webtest{} + +// GetConditions returns the conditions of the resource +func (webtest *Webtest) GetConditions() conditions.Conditions { + return webtest.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (webtest *Webtest) SetConditions(conditions conditions.Conditions) { + webtest.Status.Conditions = conditions +} + +var _ conversion.Convertible = &Webtest{} + +// ConvertFrom populates our Webtest from the provided hub Webtest +func (webtest *Webtest) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20220615s.Webtest) + if !ok { + return fmt.Errorf("expected insights/v1api20220615/storage/Webtest but received %T instead", hub) + } + + return webtest.AssignProperties_From_Webtest(source) +} + +// ConvertTo populates the provided hub Webtest from our Webtest +func (webtest *Webtest) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20220615s.Webtest) + if !ok { + return fmt.Errorf("expected insights/v1api20220615/storage/Webtest but received %T instead", hub) + } + + return webtest.AssignProperties_To_Webtest(destination) +} + +// +kubebuilder:webhook:path=/mutate-insights-azure-com-v1api20220615-webtest,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=webtests,verbs=create;update,versions=v1api20220615,name=default.v1api20220615.webtests.insights.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &Webtest{} + +// Default applies defaults to the Webtest resource +func (webtest *Webtest) Default() { + webtest.defaultImpl() + var temp any = webtest + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (webtest *Webtest) defaultAzureName() { + if webtest.Spec.AzureName == "" { + webtest.Spec.AzureName = webtest.Name + } +} + +// defaultImpl applies the code generated defaults to the Webtest resource +func (webtest *Webtest) defaultImpl() { webtest.defaultAzureName() } + +var _ genruntime.ImportableResource = &Webtest{} + +// InitializeSpec initializes the spec for this resource from the given status +func (webtest *Webtest) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*Webtest_STATUS); ok { + return webtest.Spec.Initialize_From_Webtest_STATUS(s) + } + + return fmt.Errorf("expected Status of type Webtest_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &Webtest{} + +// AzureName returns the Azure name of the resource +func (webtest *Webtest) AzureName() string { + return webtest.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2022-06-15" +func (webtest Webtest) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (webtest *Webtest) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (webtest *Webtest) GetSpec() genruntime.ConvertibleSpec { + return &webtest.Spec +} + +// GetStatus returns the status of this resource +func (webtest *Webtest) GetStatus() genruntime.ConvertibleStatus { + return &webtest.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (webtest *Webtest) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Insights/webtests" +func (webtest *Webtest) GetType() string { + return "Microsoft.Insights/webtests" +} + +// NewEmptyStatus returns a new empty (blank) status +func (webtest *Webtest) NewEmptyStatus() genruntime.ConvertibleStatus { + return &Webtest_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (webtest *Webtest) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(webtest.Spec) + return webtest.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (webtest *Webtest) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*Webtest_STATUS); ok { + webtest.Status = *st + return nil + } + + // Convert status to required version + var st Webtest_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + webtest.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-insights-azure-com-v1api20220615-webtest,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=webtests,verbs=create;update,versions=v1api20220615,name=validate.v1api20220615.webtests.insights.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &Webtest{} + +// ValidateCreate validates the creation of the resource +func (webtest *Webtest) ValidateCreate() (admission.Warnings, error) { + validations := webtest.createValidations() + var temp any = webtest + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (webtest *Webtest) ValidateDelete() (admission.Warnings, error) { + validations := webtest.deleteValidations() + var temp any = webtest + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (webtest *Webtest) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := webtest.updateValidations() + var temp any = webtest + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (webtest *Webtest) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){webtest.validateResourceReferences, webtest.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (webtest *Webtest) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (webtest *Webtest) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return webtest.validateResourceReferences() + }, + webtest.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return webtest.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (webtest *Webtest) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(webtest) +} + +// validateResourceReferences validates all resource references +func (webtest *Webtest) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&webtest.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (webtest *Webtest) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*Webtest) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, webtest) +} + +// AssignProperties_From_Webtest populates our Webtest from the provided source Webtest +func (webtest *Webtest) AssignProperties_From_Webtest(source *v20220615s.Webtest) error { + + // ObjectMeta + webtest.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec Webtest_Spec + err := spec.AssignProperties_From_Webtest_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Webtest_Spec() to populate field Spec") + } + webtest.Spec = spec + + // Status + var status Webtest_STATUS + err = status.AssignProperties_From_Webtest_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Webtest_STATUS() to populate field Status") + } + webtest.Status = status + + // No error + return nil +} + +// AssignProperties_To_Webtest populates the provided destination Webtest from our Webtest +func (webtest *Webtest) AssignProperties_To_Webtest(destination *v20220615s.Webtest) error { + + // ObjectMeta + destination.ObjectMeta = *webtest.ObjectMeta.DeepCopy() + + // Spec + var spec v20220615s.Webtest_Spec + err := webtest.Spec.AssignProperties_To_Webtest_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Webtest_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20220615s.Webtest_STATUS + err = webtest.Status.AssignProperties_To_Webtest_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Webtest_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (webtest *Webtest) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: webtest.Spec.OriginalVersion(), + Kind: "Webtest", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/webTests_API.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName} +type WebtestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Webtest `json:"items"` +} + +type Webtest_Spec struct { + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // Configuration: An XML configuration specification for a WebTest. + Configuration *WebTestProperties_Configuration `json:"Configuration,omitempty"` + + // Description: User defined description for this WebTest. + Description *string `json:"Description,omitempty"` + + // Enabled: Is the test actively being monitored. + Enabled *bool `json:"Enabled,omitempty"` + + // Frequency: Interval in seconds between test runs for this WebTest. Default value is 300. + Frequency *int `json:"Frequency,omitempty"` + + // +kubebuilder:validation:Required + // Kind: The kind of web test this is, valid choices are ping, multistep and standard. + Kind *WebTestProperties_Kind `json:"Kind,omitempty"` + + // +kubebuilder:validation:Required + // Location: Resource location + Location *string `json:"location,omitempty"` + + // +kubebuilder:validation:Required + // Locations: A list of where to physically run the tests from to give global coverage for accessibility of your + // application. + Locations []WebTestGeolocation `json:"Locations,omitempty"` + + // +kubebuilder:validation:Required + // Name: User defined name if this WebTest. + Name *string `json:"Name,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // Request: The collection of request properties + Request *WebTestProperties_Request `json:"Request,omitempty"` + + // RetryEnabled: Allow for retries should this WebTest fail. + RetryEnabled *bool `json:"RetryEnabled,omitempty"` + + // +kubebuilder:validation:Required + // SyntheticMonitorId: Unique ID of this WebTest. This is typically the same value as the Name field. + SyntheticMonitorId *string `json:"SyntheticMonitorId,omitempty"` + + // Tags: Resource tags + Tags map[string]string `json:"tags,omitempty"` + + // Timeout: Seconds until this WebTest will timeout and fail. Default value is 30. + Timeout *int `json:"Timeout,omitempty"` + + // ValidationRules: The collection of validation rule properties + ValidationRules *WebTestProperties_ValidationRules `json:"ValidationRules,omitempty"` +} + +var _ genruntime.ARMTransformer = &Webtest_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (webtest *Webtest_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if webtest == nil { + return nil, nil + } + result := &Webtest_Spec_ARM{} + + // Set property "Location": + if webtest.Location != nil { + location := *webtest.Location + result.Location = &location + } + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if webtest.Configuration != nil || + webtest.Description != nil || + webtest.Enabled != nil || + webtest.Frequency != nil || + webtest.Kind != nil || + webtest.Locations != nil || + webtest.Name != nil || + webtest.Request != nil || + webtest.RetryEnabled != nil || + webtest.SyntheticMonitorId != nil || + webtest.Timeout != nil || + webtest.ValidationRules != nil { + result.Properties = &WebTestProperties_ARM{} + } + if webtest.Configuration != nil { + configuration_ARM, err := (*webtest.Configuration).ConvertToARM(resolved) + if err != nil { + return nil, err + } + configuration := *configuration_ARM.(*WebTestProperties_Configuration_ARM) + result.Properties.Configuration = &configuration + } + if webtest.Description != nil { + description := *webtest.Description + result.Properties.Description = &description + } + if webtest.Enabled != nil { + enabled := *webtest.Enabled + result.Properties.Enabled = &enabled + } + if webtest.Frequency != nil { + frequency := *webtest.Frequency + result.Properties.Frequency = &frequency + } + if webtest.Kind != nil { + kind := *webtest.Kind + result.Properties.Kind = &kind + } + for _, item := range webtest.Locations { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.Properties.Locations = append(result.Properties.Locations, *item_ARM.(*WebTestGeolocation_ARM)) + } + if webtest.Name != nil { + name := *webtest.Name + result.Properties.Name = &name + } + if webtest.Request != nil { + request_ARM, err := (*webtest.Request).ConvertToARM(resolved) + if err != nil { + return nil, err + } + request := *request_ARM.(*WebTestProperties_Request_ARM) + result.Properties.Request = &request + } + if webtest.RetryEnabled != nil { + retryEnabled := *webtest.RetryEnabled + result.Properties.RetryEnabled = &retryEnabled + } + if webtest.SyntheticMonitorId != nil { + syntheticMonitorId := *webtest.SyntheticMonitorId + result.Properties.SyntheticMonitorId = &syntheticMonitorId + } + if webtest.Timeout != nil { + timeout := *webtest.Timeout + result.Properties.Timeout = &timeout + } + if webtest.ValidationRules != nil { + validationRules_ARM, err := (*webtest.ValidationRules).ConvertToARM(resolved) + if err != nil { + return nil, err + } + validationRules := *validationRules_ARM.(*WebTestProperties_ValidationRules_ARM) + result.Properties.ValidationRules = &validationRules + } + + // Set property "Tags": + if webtest.Tags != nil { + result.Tags = make(map[string]string, len(webtest.Tags)) + for key, value := range webtest.Tags { + result.Tags[key] = value + } + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (webtest *Webtest_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Webtest_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (webtest *Webtest_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Webtest_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Webtest_Spec_ARM, got %T", armInput) + } + + // Set property "AzureName": + webtest.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Configuration": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Configuration != nil { + var configuration1 WebTestProperties_Configuration + err := configuration1.PopulateFromARM(owner, *typedInput.Properties.Configuration) + if err != nil { + return err + } + configuration := configuration1 + webtest.Configuration = &configuration + } + } + + // Set property "Description": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Description != nil { + description := *typedInput.Properties.Description + webtest.Description = &description + } + } + + // Set property "Enabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Enabled != nil { + enabled := *typedInput.Properties.Enabled + webtest.Enabled = &enabled + } + } + + // Set property "Frequency": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Frequency != nil { + frequency := *typedInput.Properties.Frequency + webtest.Frequency = &frequency + } + } + + // Set property "Kind": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Kind != nil { + kind := *typedInput.Properties.Kind + webtest.Kind = &kind + } + } + + // Set property "Location": + if typedInput.Location != nil { + location := *typedInput.Location + webtest.Location = &location + } + + // Set property "Locations": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.Locations { + var item1 WebTestGeolocation + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + webtest.Locations = append(webtest.Locations, item1) + } + } + + // Set property "Name": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Name != nil { + name := *typedInput.Properties.Name + webtest.Name = &name + } + } + + // Set property "Owner": + webtest.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Request": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Request != nil { + var request1 WebTestProperties_Request + err := request1.PopulateFromARM(owner, *typedInput.Properties.Request) + if err != nil { + return err + } + request := request1 + webtest.Request = &request + } + } + + // Set property "RetryEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RetryEnabled != nil { + retryEnabled := *typedInput.Properties.RetryEnabled + webtest.RetryEnabled = &retryEnabled + } + } + + // Set property "SyntheticMonitorId": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SyntheticMonitorId != nil { + syntheticMonitorId := *typedInput.Properties.SyntheticMonitorId + webtest.SyntheticMonitorId = &syntheticMonitorId + } + } + + // Set property "Tags": + if typedInput.Tags != nil { + webtest.Tags = make(map[string]string, len(typedInput.Tags)) + for key, value := range typedInput.Tags { + webtest.Tags[key] = value + } + } + + // Set property "Timeout": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Timeout != nil { + timeout := *typedInput.Properties.Timeout + webtest.Timeout = &timeout + } + } + + // Set property "ValidationRules": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ValidationRules != nil { + var validationRules1 WebTestProperties_ValidationRules + err := validationRules1.PopulateFromARM(owner, *typedInput.Properties.ValidationRules) + if err != nil { + return err + } + validationRules := validationRules1 + webtest.ValidationRules = &validationRules + } + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &Webtest_Spec{} + +// ConvertSpecFrom populates our Webtest_Spec from the provided source +func (webtest *Webtest_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20220615s.Webtest_Spec) + if ok { + // Populate our instance from source + return webtest.AssignProperties_From_Webtest_Spec(src) + } + + // Convert to an intermediate form + src = &v20220615s.Webtest_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = webtest.AssignProperties_From_Webtest_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our Webtest_Spec +func (webtest *Webtest_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20220615s.Webtest_Spec) + if ok { + // Populate destination from our instance + return webtest.AssignProperties_To_Webtest_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20220615s.Webtest_Spec{} + err := webtest.AssignProperties_To_Webtest_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_Webtest_Spec populates our Webtest_Spec from the provided source Webtest_Spec +func (webtest *Webtest_Spec) AssignProperties_From_Webtest_Spec(source *v20220615s.Webtest_Spec) error { + + // AzureName + webtest.AzureName = source.AzureName + + // Configuration + if source.Configuration != nil { + var configuration WebTestProperties_Configuration + err := configuration.AssignProperties_From_WebTestProperties_Configuration(source.Configuration) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_Configuration() to populate field Configuration") + } + webtest.Configuration = &configuration + } else { + webtest.Configuration = nil + } + + // Description + webtest.Description = genruntime.ClonePointerToString(source.Description) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + webtest.Enabled = &enabled + } else { + webtest.Enabled = nil + } + + // Frequency + webtest.Frequency = genruntime.ClonePointerToInt(source.Frequency) + + // Kind + if source.Kind != nil { + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, webTestProperties_Kind_Values) + webtest.Kind = &kindTemp + } else { + webtest.Kind = nil + } + + // Location + webtest.Location = genruntime.ClonePointerToString(source.Location) + + // Locations + if source.Locations != nil { + locationList := make([]WebTestGeolocation, len(source.Locations)) + for locationIndex, locationItem := range source.Locations { + // Shadow the loop variable to avoid aliasing + locationItem := locationItem + var location WebTestGeolocation + err := location.AssignProperties_From_WebTestGeolocation(&locationItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestGeolocation() to populate field Locations") + } + locationList[locationIndex] = location + } + webtest.Locations = locationList + } else { + webtest.Locations = nil + } + + // Name + webtest.Name = genruntime.ClonePointerToString(source.Name) + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + webtest.Owner = &owner + } else { + webtest.Owner = nil + } + + // Request + if source.Request != nil { + var request WebTestProperties_Request + err := request.AssignProperties_From_WebTestProperties_Request(source.Request) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_Request() to populate field Request") + } + webtest.Request = &request + } else { + webtest.Request = nil + } + + // RetryEnabled + if source.RetryEnabled != nil { + retryEnabled := *source.RetryEnabled + webtest.RetryEnabled = &retryEnabled + } else { + webtest.RetryEnabled = nil + } + + // SyntheticMonitorId + webtest.SyntheticMonitorId = genruntime.ClonePointerToString(source.SyntheticMonitorId) + + // Tags + webtest.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // Timeout + webtest.Timeout = genruntime.ClonePointerToInt(source.Timeout) + + // ValidationRules + if source.ValidationRules != nil { + var validationRule WebTestProperties_ValidationRules + err := validationRule.AssignProperties_From_WebTestProperties_ValidationRules(source.ValidationRules) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_ValidationRules() to populate field ValidationRules") + } + webtest.ValidationRules = &validationRule + } else { + webtest.ValidationRules = nil + } + + // No error + return nil +} + +// AssignProperties_To_Webtest_Spec populates the provided destination Webtest_Spec from our Webtest_Spec +func (webtest *Webtest_Spec) AssignProperties_To_Webtest_Spec(destination *v20220615s.Webtest_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AzureName + destination.AzureName = webtest.AzureName + + // Configuration + if webtest.Configuration != nil { + var configuration v20220615s.WebTestProperties_Configuration + err := webtest.Configuration.AssignProperties_To_WebTestProperties_Configuration(&configuration) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_Configuration() to populate field Configuration") + } + destination.Configuration = &configuration + } else { + destination.Configuration = nil + } + + // Description + destination.Description = genruntime.ClonePointerToString(webtest.Description) + + // Enabled + if webtest.Enabled != nil { + enabled := *webtest.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Frequency + destination.Frequency = genruntime.ClonePointerToInt(webtest.Frequency) + + // Kind + if webtest.Kind != nil { + kind := string(*webtest.Kind) + destination.Kind = &kind + } else { + destination.Kind = nil + } + + // Location + destination.Location = genruntime.ClonePointerToString(webtest.Location) + + // Locations + if webtest.Locations != nil { + locationList := make([]v20220615s.WebTestGeolocation, len(webtest.Locations)) + for locationIndex, locationItem := range webtest.Locations { + // Shadow the loop variable to avoid aliasing + locationItem := locationItem + var location v20220615s.WebTestGeolocation + err := locationItem.AssignProperties_To_WebTestGeolocation(&location) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestGeolocation() to populate field Locations") + } + locationList[locationIndex] = location + } + destination.Locations = locationList + } else { + destination.Locations = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(webtest.Name) + + // OriginalVersion + destination.OriginalVersion = webtest.OriginalVersion() + + // Owner + if webtest.Owner != nil { + owner := webtest.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Request + if webtest.Request != nil { + var request v20220615s.WebTestProperties_Request + err := webtest.Request.AssignProperties_To_WebTestProperties_Request(&request) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_Request() to populate field Request") + } + destination.Request = &request + } else { + destination.Request = nil + } + + // RetryEnabled + if webtest.RetryEnabled != nil { + retryEnabled := *webtest.RetryEnabled + destination.RetryEnabled = &retryEnabled + } else { + destination.RetryEnabled = nil + } + + // SyntheticMonitorId + destination.SyntheticMonitorId = genruntime.ClonePointerToString(webtest.SyntheticMonitorId) + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(webtest.Tags) + + // Timeout + destination.Timeout = genruntime.ClonePointerToInt(webtest.Timeout) + + // ValidationRules + if webtest.ValidationRules != nil { + var validationRule v20220615s.WebTestProperties_ValidationRules + err := webtest.ValidationRules.AssignProperties_To_WebTestProperties_ValidationRules(&validationRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_ValidationRules() to populate field ValidationRules") + } + destination.ValidationRules = &validationRule + } else { + destination.ValidationRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_Webtest_STATUS populates our Webtest_Spec from the provided source Webtest_STATUS +func (webtest *Webtest_Spec) Initialize_From_Webtest_STATUS(source *Webtest_STATUS) error { + + // Configuration + if source.Configuration != nil { + var configuration WebTestProperties_Configuration + err := configuration.Initialize_From_WebTestProperties_Configuration_STATUS(source.Configuration) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_WebTestProperties_Configuration_STATUS() to populate field Configuration") + } + webtest.Configuration = &configuration + } else { + webtest.Configuration = nil + } + + // Description + webtest.Description = genruntime.ClonePointerToString(source.Description) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + webtest.Enabled = &enabled + } else { + webtest.Enabled = nil + } + + // Frequency + webtest.Frequency = genruntime.ClonePointerToInt(source.Frequency) + + // Kind + if source.Kind != nil { + kind := WebTestProperties_Kind(*source.Kind) + webtest.Kind = &kind + } else { + webtest.Kind = nil + } + + // Location + webtest.Location = genruntime.ClonePointerToString(source.Location) + + // Locations + if source.Locations != nil { + locationList := make([]WebTestGeolocation, len(source.Locations)) + for locationIndex, locationItem := range source.Locations { + // Shadow the loop variable to avoid aliasing + locationItem := locationItem + var location WebTestGeolocation + err := location.Initialize_From_WebTestGeolocation_STATUS(&locationItem) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_WebTestGeolocation_STATUS() to populate field Locations") + } + locationList[locationIndex] = location + } + webtest.Locations = locationList + } else { + webtest.Locations = nil + } + + // Name + webtest.Name = genruntime.ClonePointerToString(source.Name) + + // Request + if source.Request != nil { + var request WebTestProperties_Request + err := request.Initialize_From_WebTestProperties_Request_STATUS(source.Request) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_WebTestProperties_Request_STATUS() to populate field Request") + } + webtest.Request = &request + } else { + webtest.Request = nil + } + + // RetryEnabled + if source.RetryEnabled != nil { + retryEnabled := *source.RetryEnabled + webtest.RetryEnabled = &retryEnabled + } else { + webtest.RetryEnabled = nil + } + + // SyntheticMonitorId + webtest.SyntheticMonitorId = genruntime.ClonePointerToString(source.SyntheticMonitorId) + + // Tags + webtest.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // Timeout + webtest.Timeout = genruntime.ClonePointerToInt(source.Timeout) + + // ValidationRules + if source.ValidationRules != nil { + var validationRule WebTestProperties_ValidationRules + err := validationRule.Initialize_From_WebTestProperties_ValidationRules_STATUS(source.ValidationRules) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_WebTestProperties_ValidationRules_STATUS() to populate field ValidationRules") + } + webtest.ValidationRules = &validationRule + } else { + webtest.ValidationRules = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (webtest *Webtest_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (webtest *Webtest_Spec) SetAzureName(azureName string) { webtest.AzureName = azureName } + +type Webtest_STATUS struct { + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // Configuration: An XML configuration specification for a WebTest. + Configuration *WebTestProperties_Configuration_STATUS `json:"Configuration,omitempty"` + + // Description: User defined description for this WebTest. + Description *string `json:"Description,omitempty"` + + // Enabled: Is the test actively being monitored. + Enabled *bool `json:"Enabled,omitempty"` + + // Frequency: Interval in seconds between test runs for this WebTest. Default value is 300. + Frequency *int `json:"Frequency,omitempty"` + + // Id: Azure resource Id + Id *string `json:"id,omitempty"` + + // Kind: The kind of web test this is, valid choices are ping, multistep and standard. + Kind *WebTestProperties_Kind_STATUS `json:"Kind,omitempty"` + + // Location: Resource location + Location *string `json:"location,omitempty"` + + // Locations: A list of where to physically run the tests from to give global coverage for accessibility of your + // application. + Locations []WebTestGeolocation_STATUS `json:"Locations,omitempty"` + + // Name: Azure resource name + Name *string `json:"name,omitempty"` + + // PropertiesName: User defined name if this WebTest. + PropertiesName *string `json:"properties_name,omitempty"` + + // ProvisioningState: Current state of this component, whether or not is has been provisioned within the resource group it + // is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, + // Canceled, and Failed. + ProvisioningState *string `json:"provisioningState,omitempty"` + + // Request: The collection of request properties + Request *WebTestProperties_Request_STATUS `json:"Request,omitempty"` + + // RetryEnabled: Allow for retries should this WebTest fail. + RetryEnabled *bool `json:"RetryEnabled,omitempty"` + + // SyntheticMonitorId: Unique ID of this WebTest. This is typically the same value as the Name field. + SyntheticMonitorId *string `json:"SyntheticMonitorId,omitempty"` + + // Tags: Resource tags + Tags map[string]string `json:"tags,omitempty"` + + // Timeout: Seconds until this WebTest will timeout and fail. Default value is 30. + Timeout *int `json:"Timeout,omitempty"` + + // Type: Azure resource type + Type *string `json:"type,omitempty"` + + // ValidationRules: The collection of validation rule properties + ValidationRules *WebTestProperties_ValidationRules_STATUS `json:"ValidationRules,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &Webtest_STATUS{} + +// ConvertStatusFrom populates our Webtest_STATUS from the provided source +func (webtest *Webtest_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20220615s.Webtest_STATUS) + if ok { + // Populate our instance from source + return webtest.AssignProperties_From_Webtest_STATUS(src) + } + + // Convert to an intermediate form + src = &v20220615s.Webtest_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = webtest.AssignProperties_From_Webtest_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our Webtest_STATUS +func (webtest *Webtest_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20220615s.Webtest_STATUS) + if ok { + // Populate destination from our instance + return webtest.AssignProperties_To_Webtest_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20220615s.Webtest_STATUS{} + err := webtest.AssignProperties_To_Webtest_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &Webtest_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (webtest *Webtest_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &Webtest_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (webtest *Webtest_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Webtest_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Webtest_STATUS_ARM, got %T", armInput) + } + + // no assignment for property "Conditions" + + // Set property "Configuration": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Configuration != nil { + var configuration1 WebTestProperties_Configuration_STATUS + err := configuration1.PopulateFromARM(owner, *typedInput.Properties.Configuration) + if err != nil { + return err + } + configuration := configuration1 + webtest.Configuration = &configuration + } + } + + // Set property "Description": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Description != nil { + description := *typedInput.Properties.Description + webtest.Description = &description + } + } + + // Set property "Enabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Enabled != nil { + enabled := *typedInput.Properties.Enabled + webtest.Enabled = &enabled + } + } + + // Set property "Frequency": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Frequency != nil { + frequency := *typedInput.Properties.Frequency + webtest.Frequency = &frequency + } + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + webtest.Id = &id + } + + // Set property "Kind": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Kind != nil { + kind := *typedInput.Properties.Kind + webtest.Kind = &kind + } + } + + // Set property "Location": + if typedInput.Location != nil { + location := *typedInput.Location + webtest.Location = &location + } + + // Set property "Locations": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.Locations { + var item1 WebTestGeolocation_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + webtest.Locations = append(webtest.Locations, item1) + } + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + webtest.Name = &name + } + + // Set property "PropertiesName": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Name != nil { + propertiesName := *typedInput.Properties.Name + webtest.PropertiesName = &propertiesName + } + } + + // Set property "ProvisioningState": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ProvisioningState != nil { + provisioningState := *typedInput.Properties.ProvisioningState + webtest.ProvisioningState = &provisioningState + } + } + + // Set property "Request": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Request != nil { + var request1 WebTestProperties_Request_STATUS + err := request1.PopulateFromARM(owner, *typedInput.Properties.Request) + if err != nil { + return err + } + request := request1 + webtest.Request = &request + } + } + + // Set property "RetryEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RetryEnabled != nil { + retryEnabled := *typedInput.Properties.RetryEnabled + webtest.RetryEnabled = &retryEnabled + } + } + + // Set property "SyntheticMonitorId": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SyntheticMonitorId != nil { + syntheticMonitorId := *typedInput.Properties.SyntheticMonitorId + webtest.SyntheticMonitorId = &syntheticMonitorId + } + } + + // Set property "Tags": + if typedInput.Tags != nil { + webtest.Tags = make(map[string]string, len(typedInput.Tags)) + for key, value := range typedInput.Tags { + webtest.Tags[key] = value + } + } + + // Set property "Timeout": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Timeout != nil { + timeout := *typedInput.Properties.Timeout + webtest.Timeout = &timeout + } + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + webtest.Type = &typeVar + } + + // Set property "ValidationRules": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ValidationRules != nil { + var validationRules1 WebTestProperties_ValidationRules_STATUS + err := validationRules1.PopulateFromARM(owner, *typedInput.Properties.ValidationRules) + if err != nil { + return err + } + validationRules := validationRules1 + webtest.ValidationRules = &validationRules + } + } + + // No error + return nil +} + +// AssignProperties_From_Webtest_STATUS populates our Webtest_STATUS from the provided source Webtest_STATUS +func (webtest *Webtest_STATUS) AssignProperties_From_Webtest_STATUS(source *v20220615s.Webtest_STATUS) error { + + // Conditions + webtest.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Configuration + if source.Configuration != nil { + var configuration WebTestProperties_Configuration_STATUS + err := configuration.AssignProperties_From_WebTestProperties_Configuration_STATUS(source.Configuration) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_Configuration_STATUS() to populate field Configuration") + } + webtest.Configuration = &configuration + } else { + webtest.Configuration = nil + } + + // Description + webtest.Description = genruntime.ClonePointerToString(source.Description) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + webtest.Enabled = &enabled + } else { + webtest.Enabled = nil + } + + // Frequency + webtest.Frequency = genruntime.ClonePointerToInt(source.Frequency) + + // Id + webtest.Id = genruntime.ClonePointerToString(source.Id) + + // Kind + if source.Kind != nil { + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, webTestProperties_Kind_STATUS_Values) + webtest.Kind = &kindTemp + } else { + webtest.Kind = nil + } + + // Location + webtest.Location = genruntime.ClonePointerToString(source.Location) + + // Locations + if source.Locations != nil { + locationList := make([]WebTestGeolocation_STATUS, len(source.Locations)) + for locationIndex, locationItem := range source.Locations { + // Shadow the loop variable to avoid aliasing + locationItem := locationItem + var location WebTestGeolocation_STATUS + err := location.AssignProperties_From_WebTestGeolocation_STATUS(&locationItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestGeolocation_STATUS() to populate field Locations") + } + locationList[locationIndex] = location + } + webtest.Locations = locationList + } else { + webtest.Locations = nil + } + + // Name + webtest.Name = genruntime.ClonePointerToString(source.Name) + + // PropertiesName + webtest.PropertiesName = genruntime.ClonePointerToString(source.PropertiesName) + + // ProvisioningState + webtest.ProvisioningState = genruntime.ClonePointerToString(source.ProvisioningState) + + // Request + if source.Request != nil { + var request WebTestProperties_Request_STATUS + err := request.AssignProperties_From_WebTestProperties_Request_STATUS(source.Request) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_Request_STATUS() to populate field Request") + } + webtest.Request = &request + } else { + webtest.Request = nil + } + + // RetryEnabled + if source.RetryEnabled != nil { + retryEnabled := *source.RetryEnabled + webtest.RetryEnabled = &retryEnabled + } else { + webtest.RetryEnabled = nil + } + + // SyntheticMonitorId + webtest.SyntheticMonitorId = genruntime.ClonePointerToString(source.SyntheticMonitorId) + + // Tags + webtest.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // Timeout + webtest.Timeout = genruntime.ClonePointerToInt(source.Timeout) + + // Type + webtest.Type = genruntime.ClonePointerToString(source.Type) + + // ValidationRules + if source.ValidationRules != nil { + var validationRule WebTestProperties_ValidationRules_STATUS + err := validationRule.AssignProperties_From_WebTestProperties_ValidationRules_STATUS(source.ValidationRules) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_ValidationRules_STATUS() to populate field ValidationRules") + } + webtest.ValidationRules = &validationRule + } else { + webtest.ValidationRules = nil + } + + // No error + return nil +} + +// AssignProperties_To_Webtest_STATUS populates the provided destination Webtest_STATUS from our Webtest_STATUS +func (webtest *Webtest_STATUS) AssignProperties_To_Webtest_STATUS(destination *v20220615s.Webtest_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(webtest.Conditions) + + // Configuration + if webtest.Configuration != nil { + var configuration v20220615s.WebTestProperties_Configuration_STATUS + err := webtest.Configuration.AssignProperties_To_WebTestProperties_Configuration_STATUS(&configuration) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_Configuration_STATUS() to populate field Configuration") + } + destination.Configuration = &configuration + } else { + destination.Configuration = nil + } + + // Description + destination.Description = genruntime.ClonePointerToString(webtest.Description) + + // Enabled + if webtest.Enabled != nil { + enabled := *webtest.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Frequency + destination.Frequency = genruntime.ClonePointerToInt(webtest.Frequency) + + // Id + destination.Id = genruntime.ClonePointerToString(webtest.Id) + + // Kind + if webtest.Kind != nil { + kind := string(*webtest.Kind) + destination.Kind = &kind + } else { + destination.Kind = nil + } + + // Location + destination.Location = genruntime.ClonePointerToString(webtest.Location) + + // Locations + if webtest.Locations != nil { + locationList := make([]v20220615s.WebTestGeolocation_STATUS, len(webtest.Locations)) + for locationIndex, locationItem := range webtest.Locations { + // Shadow the loop variable to avoid aliasing + locationItem := locationItem + var location v20220615s.WebTestGeolocation_STATUS + err := locationItem.AssignProperties_To_WebTestGeolocation_STATUS(&location) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestGeolocation_STATUS() to populate field Locations") + } + locationList[locationIndex] = location + } + destination.Locations = locationList + } else { + destination.Locations = nil + } + + // Name + destination.Name = genruntime.ClonePointerToString(webtest.Name) + + // PropertiesName + destination.PropertiesName = genruntime.ClonePointerToString(webtest.PropertiesName) + + // ProvisioningState + destination.ProvisioningState = genruntime.ClonePointerToString(webtest.ProvisioningState) + + // Request + if webtest.Request != nil { + var request v20220615s.WebTestProperties_Request_STATUS + err := webtest.Request.AssignProperties_To_WebTestProperties_Request_STATUS(&request) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_Request_STATUS() to populate field Request") + } + destination.Request = &request + } else { + destination.Request = nil + } + + // RetryEnabled + if webtest.RetryEnabled != nil { + retryEnabled := *webtest.RetryEnabled + destination.RetryEnabled = &retryEnabled + } else { + destination.RetryEnabled = nil + } + + // SyntheticMonitorId + destination.SyntheticMonitorId = genruntime.ClonePointerToString(webtest.SyntheticMonitorId) + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(webtest.Tags) + + // Timeout + destination.Timeout = genruntime.ClonePointerToInt(webtest.Timeout) + + // Type + destination.Type = genruntime.ClonePointerToString(webtest.Type) + + // ValidationRules + if webtest.ValidationRules != nil { + var validationRule v20220615s.WebTestProperties_ValidationRules_STATUS + err := webtest.ValidationRules.AssignProperties_To_WebTestProperties_ValidationRules_STATUS(&validationRule) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_ValidationRules_STATUS() to populate field ValidationRules") + } + destination.ValidationRules = &validationRule + } else { + destination.ValidationRules = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. +type WebTestGeolocation struct { + // Id: Location ID for the WebTest to run from. + Id *string `json:"Id,omitempty"` +} + +var _ genruntime.ARMTransformer = &WebTestGeolocation{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (geolocation *WebTestGeolocation) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if geolocation == nil { + return nil, nil + } + result := &WebTestGeolocation_ARM{} + + // Set property "Id": + if geolocation.Id != nil { + id := *geolocation.Id + result.Id = &id + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (geolocation *WebTestGeolocation) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &WebTestGeolocation_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (geolocation *WebTestGeolocation) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(WebTestGeolocation_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected WebTestGeolocation_ARM, got %T", armInput) + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + geolocation.Id = &id + } + + // No error + return nil +} + +// AssignProperties_From_WebTestGeolocation populates our WebTestGeolocation from the provided source WebTestGeolocation +func (geolocation *WebTestGeolocation) AssignProperties_From_WebTestGeolocation(source *v20220615s.WebTestGeolocation) error { + + // Id + geolocation.Id = genruntime.ClonePointerToString(source.Id) + + // No error + return nil +} + +// AssignProperties_To_WebTestGeolocation populates the provided destination WebTestGeolocation from our WebTestGeolocation +func (geolocation *WebTestGeolocation) AssignProperties_To_WebTestGeolocation(destination *v20220615s.WebTestGeolocation) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Id + destination.Id = genruntime.ClonePointerToString(geolocation.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_WebTestGeolocation_STATUS populates our WebTestGeolocation from the provided source WebTestGeolocation_STATUS +func (geolocation *WebTestGeolocation) Initialize_From_WebTestGeolocation_STATUS(source *WebTestGeolocation_STATUS) error { + + // Id + geolocation.Id = genruntime.ClonePointerToString(source.Id) + + // No error + return nil +} + +// Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. +type WebTestGeolocation_STATUS struct { + // Id: Location ID for the WebTest to run from. + Id *string `json:"Id,omitempty"` +} + +var _ genruntime.FromARMConverter = &WebTestGeolocation_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (geolocation *WebTestGeolocation_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &WebTestGeolocation_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (geolocation *WebTestGeolocation_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(WebTestGeolocation_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected WebTestGeolocation_STATUS_ARM, got %T", armInput) + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + geolocation.Id = &id + } + + // No error + return nil +} + +// AssignProperties_From_WebTestGeolocation_STATUS populates our WebTestGeolocation_STATUS from the provided source WebTestGeolocation_STATUS +func (geolocation *WebTestGeolocation_STATUS) AssignProperties_From_WebTestGeolocation_STATUS(source *v20220615s.WebTestGeolocation_STATUS) error { + + // Id + geolocation.Id = genruntime.ClonePointerToString(source.Id) + + // No error + return nil +} + +// AssignProperties_To_WebTestGeolocation_STATUS populates the provided destination WebTestGeolocation_STATUS from our WebTestGeolocation_STATUS +func (geolocation *WebTestGeolocation_STATUS) AssignProperties_To_WebTestGeolocation_STATUS(destination *v20220615s.WebTestGeolocation_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Id + destination.Id = genruntime.ClonePointerToString(geolocation.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type WebTestProperties_Configuration struct { + // WebTest: The XML specification of a WebTest to run against an application. + WebTest *string `json:"WebTest,omitempty"` +} + +var _ genruntime.ARMTransformer = &WebTestProperties_Configuration{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (configuration *WebTestProperties_Configuration) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if configuration == nil { + return nil, nil + } + result := &WebTestProperties_Configuration_ARM{} + + // Set property "WebTest": + if configuration.WebTest != nil { + webTest := *configuration.WebTest + result.WebTest = &webTest + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (configuration *WebTestProperties_Configuration) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &WebTestProperties_Configuration_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (configuration *WebTestProperties_Configuration) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(WebTestProperties_Configuration_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected WebTestProperties_Configuration_ARM, got %T", armInput) + } + + // Set property "WebTest": + if typedInput.WebTest != nil { + webTest := *typedInput.WebTest + configuration.WebTest = &webTest + } + + // No error + return nil +} + +// AssignProperties_From_WebTestProperties_Configuration populates our WebTestProperties_Configuration from the provided source WebTestProperties_Configuration +func (configuration *WebTestProperties_Configuration) AssignProperties_From_WebTestProperties_Configuration(source *v20220615s.WebTestProperties_Configuration) error { + + // WebTest + configuration.WebTest = genruntime.ClonePointerToString(source.WebTest) + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_Configuration populates the provided destination WebTestProperties_Configuration from our WebTestProperties_Configuration +func (configuration *WebTestProperties_Configuration) AssignProperties_To_WebTestProperties_Configuration(destination *v20220615s.WebTestProperties_Configuration) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // WebTest + destination.WebTest = genruntime.ClonePointerToString(configuration.WebTest) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_WebTestProperties_Configuration_STATUS populates our WebTestProperties_Configuration from the provided source WebTestProperties_Configuration_STATUS +func (configuration *WebTestProperties_Configuration) Initialize_From_WebTestProperties_Configuration_STATUS(source *WebTestProperties_Configuration_STATUS) error { + + // WebTest + configuration.WebTest = genruntime.ClonePointerToString(source.WebTest) + + // No error + return nil +} + +type WebTestProperties_Configuration_STATUS struct { + // WebTest: The XML specification of a WebTest to run against an application. + WebTest *string `json:"WebTest,omitempty"` +} + +var _ genruntime.FromARMConverter = &WebTestProperties_Configuration_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (configuration *WebTestProperties_Configuration_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &WebTestProperties_Configuration_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (configuration *WebTestProperties_Configuration_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(WebTestProperties_Configuration_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected WebTestProperties_Configuration_STATUS_ARM, got %T", armInput) + } + + // Set property "WebTest": + if typedInput.WebTest != nil { + webTest := *typedInput.WebTest + configuration.WebTest = &webTest + } + + // No error + return nil +} + +// AssignProperties_From_WebTestProperties_Configuration_STATUS populates our WebTestProperties_Configuration_STATUS from the provided source WebTestProperties_Configuration_STATUS +func (configuration *WebTestProperties_Configuration_STATUS) AssignProperties_From_WebTestProperties_Configuration_STATUS(source *v20220615s.WebTestProperties_Configuration_STATUS) error { + + // WebTest + configuration.WebTest = genruntime.ClonePointerToString(source.WebTest) + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_Configuration_STATUS populates the provided destination WebTestProperties_Configuration_STATUS from our WebTestProperties_Configuration_STATUS +func (configuration *WebTestProperties_Configuration_STATUS) AssignProperties_To_WebTestProperties_Configuration_STATUS(destination *v20220615s.WebTestProperties_Configuration_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // WebTest + destination.WebTest = genruntime.ClonePointerToString(configuration.WebTest) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"multistep","ping","standard"} +type WebTestProperties_Kind string + +const ( + WebTestProperties_Kind_Multistep = WebTestProperties_Kind("multistep") + WebTestProperties_Kind_Ping = WebTestProperties_Kind("ping") + WebTestProperties_Kind_Standard = WebTestProperties_Kind("standard") +) + +// Mapping from string to WebTestProperties_Kind +var webTestProperties_Kind_Values = map[string]WebTestProperties_Kind{ + "multistep": WebTestProperties_Kind_Multistep, + "ping": WebTestProperties_Kind_Ping, + "standard": WebTestProperties_Kind_Standard, +} + +type WebTestProperties_Kind_STATUS string + +const ( + WebTestProperties_Kind_STATUS_Multistep = WebTestProperties_Kind_STATUS("multistep") + WebTestProperties_Kind_STATUS_Ping = WebTestProperties_Kind_STATUS("ping") + WebTestProperties_Kind_STATUS_Standard = WebTestProperties_Kind_STATUS("standard") +) + +// Mapping from string to WebTestProperties_Kind_STATUS +var webTestProperties_Kind_STATUS_Values = map[string]WebTestProperties_Kind_STATUS{ + "multistep": WebTestProperties_Kind_STATUS_Multistep, + "ping": WebTestProperties_Kind_STATUS_Ping, + "standard": WebTestProperties_Kind_STATUS_Standard, +} + +type WebTestProperties_Request struct { + // FollowRedirects: Follow redirects for this web test. + FollowRedirects *bool `json:"FollowRedirects,omitempty"` + + // Headers: List of headers and their values to add to the WebTest call. + Headers []HeaderField `json:"Headers,omitempty"` + + // HttpVerb: Http verb to use for this web test. + HttpVerb *string `json:"HttpVerb,omitempty"` + + // ParseDependentRequests: Parse Dependent request for this WebTest. + ParseDependentRequests *bool `json:"ParseDependentRequests,omitempty"` + + // RequestBody: Base64 encoded string body to send with this web test. + RequestBody *string `json:"RequestBody,omitempty"` + + // RequestUrl: Url location to test. + RequestUrl *string `json:"RequestUrl,omitempty"` +} + +var _ genruntime.ARMTransformer = &WebTestProperties_Request{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (request *WebTestProperties_Request) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if request == nil { + return nil, nil + } + result := &WebTestProperties_Request_ARM{} + + // Set property "FollowRedirects": + if request.FollowRedirects != nil { + followRedirects := *request.FollowRedirects + result.FollowRedirects = &followRedirects + } + + // Set property "Headers": + for _, item := range request.Headers { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.Headers = append(result.Headers, *item_ARM.(*HeaderField_ARM)) + } + + // Set property "HttpVerb": + if request.HttpVerb != nil { + httpVerb := *request.HttpVerb + result.HttpVerb = &httpVerb + } + + // Set property "ParseDependentRequests": + if request.ParseDependentRequests != nil { + parseDependentRequests := *request.ParseDependentRequests + result.ParseDependentRequests = &parseDependentRequests + } + + // Set property "RequestBody": + if request.RequestBody != nil { + requestBody := *request.RequestBody + result.RequestBody = &requestBody + } + + // Set property "RequestUrl": + if request.RequestUrl != nil { + requestUrl := *request.RequestUrl + result.RequestUrl = &requestUrl + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (request *WebTestProperties_Request) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &WebTestProperties_Request_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (request *WebTestProperties_Request) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(WebTestProperties_Request_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected WebTestProperties_Request_ARM, got %T", armInput) + } + + // Set property "FollowRedirects": + if typedInput.FollowRedirects != nil { + followRedirects := *typedInput.FollowRedirects + request.FollowRedirects = &followRedirects + } + + // Set property "Headers": + for _, item := range typedInput.Headers { + var item1 HeaderField + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + request.Headers = append(request.Headers, item1) + } + + // Set property "HttpVerb": + if typedInput.HttpVerb != nil { + httpVerb := *typedInput.HttpVerb + request.HttpVerb = &httpVerb + } + + // Set property "ParseDependentRequests": + if typedInput.ParseDependentRequests != nil { + parseDependentRequests := *typedInput.ParseDependentRequests + request.ParseDependentRequests = &parseDependentRequests + } + + // Set property "RequestBody": + if typedInput.RequestBody != nil { + requestBody := *typedInput.RequestBody + request.RequestBody = &requestBody + } + + // Set property "RequestUrl": + if typedInput.RequestUrl != nil { + requestUrl := *typedInput.RequestUrl + request.RequestUrl = &requestUrl + } + + // No error + return nil +} + +// AssignProperties_From_WebTestProperties_Request populates our WebTestProperties_Request from the provided source WebTestProperties_Request +func (request *WebTestProperties_Request) AssignProperties_From_WebTestProperties_Request(source *v20220615s.WebTestProperties_Request) error { + + // FollowRedirects + if source.FollowRedirects != nil { + followRedirect := *source.FollowRedirects + request.FollowRedirects = &followRedirect + } else { + request.FollowRedirects = nil + } + + // Headers + if source.Headers != nil { + headerList := make([]HeaderField, len(source.Headers)) + for headerIndex, headerItem := range source.Headers { + // Shadow the loop variable to avoid aliasing + headerItem := headerItem + var header HeaderField + err := header.AssignProperties_From_HeaderField(&headerItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_HeaderField() to populate field Headers") + } + headerList[headerIndex] = header + } + request.Headers = headerList + } else { + request.Headers = nil + } + + // HttpVerb + request.HttpVerb = genruntime.ClonePointerToString(source.HttpVerb) + + // ParseDependentRequests + if source.ParseDependentRequests != nil { + parseDependentRequest := *source.ParseDependentRequests + request.ParseDependentRequests = &parseDependentRequest + } else { + request.ParseDependentRequests = nil + } + + // RequestBody + request.RequestBody = genruntime.ClonePointerToString(source.RequestBody) + + // RequestUrl + request.RequestUrl = genruntime.ClonePointerToString(source.RequestUrl) + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_Request populates the provided destination WebTestProperties_Request from our WebTestProperties_Request +func (request *WebTestProperties_Request) AssignProperties_To_WebTestProperties_Request(destination *v20220615s.WebTestProperties_Request) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // FollowRedirects + if request.FollowRedirects != nil { + followRedirect := *request.FollowRedirects + destination.FollowRedirects = &followRedirect + } else { + destination.FollowRedirects = nil + } + + // Headers + if request.Headers != nil { + headerList := make([]v20220615s.HeaderField, len(request.Headers)) + for headerIndex, headerItem := range request.Headers { + // Shadow the loop variable to avoid aliasing + headerItem := headerItem + var header v20220615s.HeaderField + err := headerItem.AssignProperties_To_HeaderField(&header) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_HeaderField() to populate field Headers") + } + headerList[headerIndex] = header + } + destination.Headers = headerList + } else { + destination.Headers = nil + } + + // HttpVerb + destination.HttpVerb = genruntime.ClonePointerToString(request.HttpVerb) + + // ParseDependentRequests + if request.ParseDependentRequests != nil { + parseDependentRequest := *request.ParseDependentRequests + destination.ParseDependentRequests = &parseDependentRequest + } else { + destination.ParseDependentRequests = nil + } + + // RequestBody + destination.RequestBody = genruntime.ClonePointerToString(request.RequestBody) + + // RequestUrl + destination.RequestUrl = genruntime.ClonePointerToString(request.RequestUrl) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_WebTestProperties_Request_STATUS populates our WebTestProperties_Request from the provided source WebTestProperties_Request_STATUS +func (request *WebTestProperties_Request) Initialize_From_WebTestProperties_Request_STATUS(source *WebTestProperties_Request_STATUS) error { + + // FollowRedirects + if source.FollowRedirects != nil { + followRedirect := *source.FollowRedirects + request.FollowRedirects = &followRedirect + } else { + request.FollowRedirects = nil + } + + // Headers + if source.Headers != nil { + headerList := make([]HeaderField, len(source.Headers)) + for headerIndex, headerItem := range source.Headers { + // Shadow the loop variable to avoid aliasing + headerItem := headerItem + var header HeaderField + err := header.Initialize_From_HeaderField_STATUS(&headerItem) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_HeaderField_STATUS() to populate field Headers") + } + headerList[headerIndex] = header + } + request.Headers = headerList + } else { + request.Headers = nil + } + + // HttpVerb + request.HttpVerb = genruntime.ClonePointerToString(source.HttpVerb) + + // ParseDependentRequests + if source.ParseDependentRequests != nil { + parseDependentRequest := *source.ParseDependentRequests + request.ParseDependentRequests = &parseDependentRequest + } else { + request.ParseDependentRequests = nil + } + + // RequestBody + request.RequestBody = genruntime.ClonePointerToString(source.RequestBody) + + // RequestUrl + request.RequestUrl = genruntime.ClonePointerToString(source.RequestUrl) + + // No error + return nil +} + +type WebTestProperties_Request_STATUS struct { + // FollowRedirects: Follow redirects for this web test. + FollowRedirects *bool `json:"FollowRedirects,omitempty"` + + // Headers: List of headers and their values to add to the WebTest call. + Headers []HeaderField_STATUS `json:"Headers,omitempty"` + + // HttpVerb: Http verb to use for this web test. + HttpVerb *string `json:"HttpVerb,omitempty"` + + // ParseDependentRequests: Parse Dependent request for this WebTest. + ParseDependentRequests *bool `json:"ParseDependentRequests,omitempty"` + + // RequestBody: Base64 encoded string body to send with this web test. + RequestBody *string `json:"RequestBody,omitempty"` + + // RequestUrl: Url location to test. + RequestUrl *string `json:"RequestUrl,omitempty"` +} + +var _ genruntime.FromARMConverter = &WebTestProperties_Request_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (request *WebTestProperties_Request_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &WebTestProperties_Request_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (request *WebTestProperties_Request_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(WebTestProperties_Request_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected WebTestProperties_Request_STATUS_ARM, got %T", armInput) + } + + // Set property "FollowRedirects": + if typedInput.FollowRedirects != nil { + followRedirects := *typedInput.FollowRedirects + request.FollowRedirects = &followRedirects + } + + // Set property "Headers": + for _, item := range typedInput.Headers { + var item1 HeaderField_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + request.Headers = append(request.Headers, item1) + } + + // Set property "HttpVerb": + if typedInput.HttpVerb != nil { + httpVerb := *typedInput.HttpVerb + request.HttpVerb = &httpVerb + } + + // Set property "ParseDependentRequests": + if typedInput.ParseDependentRequests != nil { + parseDependentRequests := *typedInput.ParseDependentRequests + request.ParseDependentRequests = &parseDependentRequests + } + + // Set property "RequestBody": + if typedInput.RequestBody != nil { + requestBody := *typedInput.RequestBody + request.RequestBody = &requestBody + } + + // Set property "RequestUrl": + if typedInput.RequestUrl != nil { + requestUrl := *typedInput.RequestUrl + request.RequestUrl = &requestUrl + } + + // No error + return nil +} + +// AssignProperties_From_WebTestProperties_Request_STATUS populates our WebTestProperties_Request_STATUS from the provided source WebTestProperties_Request_STATUS +func (request *WebTestProperties_Request_STATUS) AssignProperties_From_WebTestProperties_Request_STATUS(source *v20220615s.WebTestProperties_Request_STATUS) error { + + // FollowRedirects + if source.FollowRedirects != nil { + followRedirect := *source.FollowRedirects + request.FollowRedirects = &followRedirect + } else { + request.FollowRedirects = nil + } + + // Headers + if source.Headers != nil { + headerList := make([]HeaderField_STATUS, len(source.Headers)) + for headerIndex, headerItem := range source.Headers { + // Shadow the loop variable to avoid aliasing + headerItem := headerItem + var header HeaderField_STATUS + err := header.AssignProperties_From_HeaderField_STATUS(&headerItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_HeaderField_STATUS() to populate field Headers") + } + headerList[headerIndex] = header + } + request.Headers = headerList + } else { + request.Headers = nil + } + + // HttpVerb + request.HttpVerb = genruntime.ClonePointerToString(source.HttpVerb) + + // ParseDependentRequests + if source.ParseDependentRequests != nil { + parseDependentRequest := *source.ParseDependentRequests + request.ParseDependentRequests = &parseDependentRequest + } else { + request.ParseDependentRequests = nil + } + + // RequestBody + request.RequestBody = genruntime.ClonePointerToString(source.RequestBody) + + // RequestUrl + request.RequestUrl = genruntime.ClonePointerToString(source.RequestUrl) + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_Request_STATUS populates the provided destination WebTestProperties_Request_STATUS from our WebTestProperties_Request_STATUS +func (request *WebTestProperties_Request_STATUS) AssignProperties_To_WebTestProperties_Request_STATUS(destination *v20220615s.WebTestProperties_Request_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // FollowRedirects + if request.FollowRedirects != nil { + followRedirect := *request.FollowRedirects + destination.FollowRedirects = &followRedirect + } else { + destination.FollowRedirects = nil + } + + // Headers + if request.Headers != nil { + headerList := make([]v20220615s.HeaderField_STATUS, len(request.Headers)) + for headerIndex, headerItem := range request.Headers { + // Shadow the loop variable to avoid aliasing + headerItem := headerItem + var header v20220615s.HeaderField_STATUS + err := headerItem.AssignProperties_To_HeaderField_STATUS(&header) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_HeaderField_STATUS() to populate field Headers") + } + headerList[headerIndex] = header + } + destination.Headers = headerList + } else { + destination.Headers = nil + } + + // HttpVerb + destination.HttpVerb = genruntime.ClonePointerToString(request.HttpVerb) + + // ParseDependentRequests + if request.ParseDependentRequests != nil { + parseDependentRequest := *request.ParseDependentRequests + destination.ParseDependentRequests = &parseDependentRequest + } else { + destination.ParseDependentRequests = nil + } + + // RequestBody + destination.RequestBody = genruntime.ClonePointerToString(request.RequestBody) + + // RequestUrl + destination.RequestUrl = genruntime.ClonePointerToString(request.RequestUrl) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type WebTestProperties_ValidationRules struct { + // ContentValidation: The collection of content validation properties + ContentValidation *WebTestProperties_ValidationRules_ContentValidation `json:"ContentValidation,omitempty"` + + // ExpectedHttpStatusCode: Validate that the WebTest returns the http status code provided. + ExpectedHttpStatusCode *int `json:"ExpectedHttpStatusCode,omitempty"` + + // IgnoreHttpStatusCode: When set, validation will ignore the status code. + IgnoreHttpStatusCode *bool `json:"IgnoreHttpStatusCode,omitempty"` + + // SSLCertRemainingLifetimeCheck: A number of days to check still remain before the the existing SSL cert expires. Value + // must be positive and the SSLCheck must be set to true. + SSLCertRemainingLifetimeCheck *int `json:"SSLCertRemainingLifetimeCheck,omitempty"` + + // SSLCheck: Checks to see if the SSL cert is still valid. + SSLCheck *bool `json:"SSLCheck,omitempty"` +} + +var _ genruntime.ARMTransformer = &WebTestProperties_ValidationRules{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (rules *WebTestProperties_ValidationRules) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if rules == nil { + return nil, nil + } + result := &WebTestProperties_ValidationRules_ARM{} + + // Set property "ContentValidation": + if rules.ContentValidation != nil { + contentValidation_ARM, err := (*rules.ContentValidation).ConvertToARM(resolved) + if err != nil { + return nil, err + } + contentValidation := *contentValidation_ARM.(*WebTestProperties_ValidationRules_ContentValidation_ARM) + result.ContentValidation = &contentValidation + } + + // Set property "ExpectedHttpStatusCode": + if rules.ExpectedHttpStatusCode != nil { + expectedHttpStatusCode := *rules.ExpectedHttpStatusCode + result.ExpectedHttpStatusCode = &expectedHttpStatusCode + } + + // Set property "IgnoreHttpStatusCode": + if rules.IgnoreHttpStatusCode != nil { + ignoreHttpStatusCode := *rules.IgnoreHttpStatusCode + result.IgnoreHttpStatusCode = &ignoreHttpStatusCode + } + + // Set property "SSLCertRemainingLifetimeCheck": + if rules.SSLCertRemainingLifetimeCheck != nil { + sslCertRemainingLifetimeCheck := *rules.SSLCertRemainingLifetimeCheck + result.SSLCertRemainingLifetimeCheck = &sslCertRemainingLifetimeCheck + } + + // Set property "SSLCheck": + if rules.SSLCheck != nil { + sslCheck := *rules.SSLCheck + result.SSLCheck = &sslCheck + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rules *WebTestProperties_ValidationRules) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &WebTestProperties_ValidationRules_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rules *WebTestProperties_ValidationRules) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(WebTestProperties_ValidationRules_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected WebTestProperties_ValidationRules_ARM, got %T", armInput) + } + + // Set property "ContentValidation": + if typedInput.ContentValidation != nil { + var contentValidation1 WebTestProperties_ValidationRules_ContentValidation + err := contentValidation1.PopulateFromARM(owner, *typedInput.ContentValidation) + if err != nil { + return err + } + contentValidation := contentValidation1 + rules.ContentValidation = &contentValidation + } + + // Set property "ExpectedHttpStatusCode": + if typedInput.ExpectedHttpStatusCode != nil { + expectedHttpStatusCode := *typedInput.ExpectedHttpStatusCode + rules.ExpectedHttpStatusCode = &expectedHttpStatusCode + } + + // Set property "IgnoreHttpStatusCode": + if typedInput.IgnoreHttpStatusCode != nil { + ignoreHttpStatusCode := *typedInput.IgnoreHttpStatusCode + rules.IgnoreHttpStatusCode = &ignoreHttpStatusCode + } + + // Set property "SSLCertRemainingLifetimeCheck": + if typedInput.SSLCertRemainingLifetimeCheck != nil { + sslCertRemainingLifetimeCheck := *typedInput.SSLCertRemainingLifetimeCheck + rules.SSLCertRemainingLifetimeCheck = &sslCertRemainingLifetimeCheck + } + + // Set property "SSLCheck": + if typedInput.SSLCheck != nil { + sslCheck := *typedInput.SSLCheck + rules.SSLCheck = &sslCheck + } + + // No error + return nil +} + +// AssignProperties_From_WebTestProperties_ValidationRules populates our WebTestProperties_ValidationRules from the provided source WebTestProperties_ValidationRules +func (rules *WebTestProperties_ValidationRules) AssignProperties_From_WebTestProperties_ValidationRules(source *v20220615s.WebTestProperties_ValidationRules) error { + + // ContentValidation + if source.ContentValidation != nil { + var contentValidation WebTestProperties_ValidationRules_ContentValidation + err := contentValidation.AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation(source.ContentValidation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation() to populate field ContentValidation") + } + rules.ContentValidation = &contentValidation + } else { + rules.ContentValidation = nil + } + + // ExpectedHttpStatusCode + rules.ExpectedHttpStatusCode = genruntime.ClonePointerToInt(source.ExpectedHttpStatusCode) + + // IgnoreHttpStatusCode + if source.IgnoreHttpStatusCode != nil { + ignoreHttpStatusCode := *source.IgnoreHttpStatusCode + rules.IgnoreHttpStatusCode = &ignoreHttpStatusCode + } else { + rules.IgnoreHttpStatusCode = nil + } + + // SSLCertRemainingLifetimeCheck + rules.SSLCertRemainingLifetimeCheck = genruntime.ClonePointerToInt(source.SSLCertRemainingLifetimeCheck) + + // SSLCheck + if source.SSLCheck != nil { + sslCheck := *source.SSLCheck + rules.SSLCheck = &sslCheck + } else { + rules.SSLCheck = nil + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_ValidationRules populates the provided destination WebTestProperties_ValidationRules from our WebTestProperties_ValidationRules +func (rules *WebTestProperties_ValidationRules) AssignProperties_To_WebTestProperties_ValidationRules(destination *v20220615s.WebTestProperties_ValidationRules) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ContentValidation + if rules.ContentValidation != nil { + var contentValidation v20220615s.WebTestProperties_ValidationRules_ContentValidation + err := rules.ContentValidation.AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation(&contentValidation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation() to populate field ContentValidation") + } + destination.ContentValidation = &contentValidation + } else { + destination.ContentValidation = nil + } + + // ExpectedHttpStatusCode + destination.ExpectedHttpStatusCode = genruntime.ClonePointerToInt(rules.ExpectedHttpStatusCode) + + // IgnoreHttpStatusCode + if rules.IgnoreHttpStatusCode != nil { + ignoreHttpStatusCode := *rules.IgnoreHttpStatusCode + destination.IgnoreHttpStatusCode = &ignoreHttpStatusCode + } else { + destination.IgnoreHttpStatusCode = nil + } + + // SSLCertRemainingLifetimeCheck + destination.SSLCertRemainingLifetimeCheck = genruntime.ClonePointerToInt(rules.SSLCertRemainingLifetimeCheck) + + // SSLCheck + if rules.SSLCheck != nil { + sslCheck := *rules.SSLCheck + destination.SSLCheck = &sslCheck + } else { + destination.SSLCheck = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_WebTestProperties_ValidationRules_STATUS populates our WebTestProperties_ValidationRules from the provided source WebTestProperties_ValidationRules_STATUS +func (rules *WebTestProperties_ValidationRules) Initialize_From_WebTestProperties_ValidationRules_STATUS(source *WebTestProperties_ValidationRules_STATUS) error { + + // ContentValidation + if source.ContentValidation != nil { + var contentValidation WebTestProperties_ValidationRules_ContentValidation + err := contentValidation.Initialize_From_WebTestProperties_ValidationRules_ContentValidation_STATUS(source.ContentValidation) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_WebTestProperties_ValidationRules_ContentValidation_STATUS() to populate field ContentValidation") + } + rules.ContentValidation = &contentValidation + } else { + rules.ContentValidation = nil + } + + // ExpectedHttpStatusCode + rules.ExpectedHttpStatusCode = genruntime.ClonePointerToInt(source.ExpectedHttpStatusCode) + + // IgnoreHttpStatusCode + if source.IgnoreHttpStatusCode != nil { + ignoreHttpStatusCode := *source.IgnoreHttpStatusCode + rules.IgnoreHttpStatusCode = &ignoreHttpStatusCode + } else { + rules.IgnoreHttpStatusCode = nil + } + + // SSLCertRemainingLifetimeCheck + rules.SSLCertRemainingLifetimeCheck = genruntime.ClonePointerToInt(source.SSLCertRemainingLifetimeCheck) + + // SSLCheck + if source.SSLCheck != nil { + sslCheck := *source.SSLCheck + rules.SSLCheck = &sslCheck + } else { + rules.SSLCheck = nil + } + + // No error + return nil +} + +type WebTestProperties_ValidationRules_STATUS struct { + // ContentValidation: The collection of content validation properties + ContentValidation *WebTestProperties_ValidationRules_ContentValidation_STATUS `json:"ContentValidation,omitempty"` + + // ExpectedHttpStatusCode: Validate that the WebTest returns the http status code provided. + ExpectedHttpStatusCode *int `json:"ExpectedHttpStatusCode,omitempty"` + + // IgnoreHttpStatusCode: When set, validation will ignore the status code. + IgnoreHttpStatusCode *bool `json:"IgnoreHttpStatusCode,omitempty"` + + // SSLCertRemainingLifetimeCheck: A number of days to check still remain before the the existing SSL cert expires. Value + // must be positive and the SSLCheck must be set to true. + SSLCertRemainingLifetimeCheck *int `json:"SSLCertRemainingLifetimeCheck,omitempty"` + + // SSLCheck: Checks to see if the SSL cert is still valid. + SSLCheck *bool `json:"SSLCheck,omitempty"` +} + +var _ genruntime.FromARMConverter = &WebTestProperties_ValidationRules_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rules *WebTestProperties_ValidationRules_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &WebTestProperties_ValidationRules_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rules *WebTestProperties_ValidationRules_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(WebTestProperties_ValidationRules_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected WebTestProperties_ValidationRules_STATUS_ARM, got %T", armInput) + } + + // Set property "ContentValidation": + if typedInput.ContentValidation != nil { + var contentValidation1 WebTestProperties_ValidationRules_ContentValidation_STATUS + err := contentValidation1.PopulateFromARM(owner, *typedInput.ContentValidation) + if err != nil { + return err + } + contentValidation := contentValidation1 + rules.ContentValidation = &contentValidation + } + + // Set property "ExpectedHttpStatusCode": + if typedInput.ExpectedHttpStatusCode != nil { + expectedHttpStatusCode := *typedInput.ExpectedHttpStatusCode + rules.ExpectedHttpStatusCode = &expectedHttpStatusCode + } + + // Set property "IgnoreHttpStatusCode": + if typedInput.IgnoreHttpStatusCode != nil { + ignoreHttpStatusCode := *typedInput.IgnoreHttpStatusCode + rules.IgnoreHttpStatusCode = &ignoreHttpStatusCode + } + + // Set property "SSLCertRemainingLifetimeCheck": + if typedInput.SSLCertRemainingLifetimeCheck != nil { + sslCertRemainingLifetimeCheck := *typedInput.SSLCertRemainingLifetimeCheck + rules.SSLCertRemainingLifetimeCheck = &sslCertRemainingLifetimeCheck + } + + // Set property "SSLCheck": + if typedInput.SSLCheck != nil { + sslCheck := *typedInput.SSLCheck + rules.SSLCheck = &sslCheck + } + + // No error + return nil +} + +// AssignProperties_From_WebTestProperties_ValidationRules_STATUS populates our WebTestProperties_ValidationRules_STATUS from the provided source WebTestProperties_ValidationRules_STATUS +func (rules *WebTestProperties_ValidationRules_STATUS) AssignProperties_From_WebTestProperties_ValidationRules_STATUS(source *v20220615s.WebTestProperties_ValidationRules_STATUS) error { + + // ContentValidation + if source.ContentValidation != nil { + var contentValidation WebTestProperties_ValidationRules_ContentValidation_STATUS + err := contentValidation.AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_STATUS(source.ContentValidation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_STATUS() to populate field ContentValidation") + } + rules.ContentValidation = &contentValidation + } else { + rules.ContentValidation = nil + } + + // ExpectedHttpStatusCode + rules.ExpectedHttpStatusCode = genruntime.ClonePointerToInt(source.ExpectedHttpStatusCode) + + // IgnoreHttpStatusCode + if source.IgnoreHttpStatusCode != nil { + ignoreHttpStatusCode := *source.IgnoreHttpStatusCode + rules.IgnoreHttpStatusCode = &ignoreHttpStatusCode + } else { + rules.IgnoreHttpStatusCode = nil + } + + // SSLCertRemainingLifetimeCheck + rules.SSLCertRemainingLifetimeCheck = genruntime.ClonePointerToInt(source.SSLCertRemainingLifetimeCheck) + + // SSLCheck + if source.SSLCheck != nil { + sslCheck := *source.SSLCheck + rules.SSLCheck = &sslCheck + } else { + rules.SSLCheck = nil + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_ValidationRules_STATUS populates the provided destination WebTestProperties_ValidationRules_STATUS from our WebTestProperties_ValidationRules_STATUS +func (rules *WebTestProperties_ValidationRules_STATUS) AssignProperties_To_WebTestProperties_ValidationRules_STATUS(destination *v20220615s.WebTestProperties_ValidationRules_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ContentValidation + if rules.ContentValidation != nil { + var contentValidation v20220615s.WebTestProperties_ValidationRules_ContentValidation_STATUS + err := rules.ContentValidation.AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS(&contentValidation) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS() to populate field ContentValidation") + } + destination.ContentValidation = &contentValidation + } else { + destination.ContentValidation = nil + } + + // ExpectedHttpStatusCode + destination.ExpectedHttpStatusCode = genruntime.ClonePointerToInt(rules.ExpectedHttpStatusCode) + + // IgnoreHttpStatusCode + if rules.IgnoreHttpStatusCode != nil { + ignoreHttpStatusCode := *rules.IgnoreHttpStatusCode + destination.IgnoreHttpStatusCode = &ignoreHttpStatusCode + } else { + destination.IgnoreHttpStatusCode = nil + } + + // SSLCertRemainingLifetimeCheck + destination.SSLCertRemainingLifetimeCheck = genruntime.ClonePointerToInt(rules.SSLCertRemainingLifetimeCheck) + + // SSLCheck + if rules.SSLCheck != nil { + sslCheck := *rules.SSLCheck + destination.SSLCheck = &sslCheck + } else { + destination.SSLCheck = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// A header to add to the WebTest. +type HeaderField struct { + // Key: The name of the header. + Key *string `json:"key,omitempty"` + + // Value: The value of the header. + Value *string `json:"value,omitempty"` +} + +var _ genruntime.ARMTransformer = &HeaderField{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (field *HeaderField) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if field == nil { + return nil, nil + } + result := &HeaderField_ARM{} + + // Set property "Key": + if field.Key != nil { + key := *field.Key + result.Key = &key + } + + // Set property "Value": + if field.Value != nil { + value := *field.Value + result.Value = &value + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (field *HeaderField) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &HeaderField_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (field *HeaderField) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(HeaderField_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected HeaderField_ARM, got %T", armInput) + } + + // Set property "Key": + if typedInput.Key != nil { + key := *typedInput.Key + field.Key = &key + } + + // Set property "Value": + if typedInput.Value != nil { + value := *typedInput.Value + field.Value = &value + } + + // No error + return nil +} + +// AssignProperties_From_HeaderField populates our HeaderField from the provided source HeaderField +func (field *HeaderField) AssignProperties_From_HeaderField(source *v20220615s.HeaderField) error { + + // Key + field.Key = genruntime.ClonePointerToString(source.Key) + + // Value + field.Value = genruntime.ClonePointerToString(source.Value) + + // No error + return nil +} + +// AssignProperties_To_HeaderField populates the provided destination HeaderField from our HeaderField +func (field *HeaderField) AssignProperties_To_HeaderField(destination *v20220615s.HeaderField) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Key + destination.Key = genruntime.ClonePointerToString(field.Key) + + // Value + destination.Value = genruntime.ClonePointerToString(field.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_HeaderField_STATUS populates our HeaderField from the provided source HeaderField_STATUS +func (field *HeaderField) Initialize_From_HeaderField_STATUS(source *HeaderField_STATUS) error { + + // Key + field.Key = genruntime.ClonePointerToString(source.Key) + + // Value + field.Value = genruntime.ClonePointerToString(source.Value) + + // No error + return nil +} + +// A header to add to the WebTest. +type HeaderField_STATUS struct { + // Key: The name of the header. + Key *string `json:"key,omitempty"` + + // Value: The value of the header. + Value *string `json:"value,omitempty"` +} + +var _ genruntime.FromARMConverter = &HeaderField_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (field *HeaderField_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &HeaderField_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (field *HeaderField_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(HeaderField_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected HeaderField_STATUS_ARM, got %T", armInput) + } + + // Set property "Key": + if typedInput.Key != nil { + key := *typedInput.Key + field.Key = &key + } + + // Set property "Value": + if typedInput.Value != nil { + value := *typedInput.Value + field.Value = &value + } + + // No error + return nil +} + +// AssignProperties_From_HeaderField_STATUS populates our HeaderField_STATUS from the provided source HeaderField_STATUS +func (field *HeaderField_STATUS) AssignProperties_From_HeaderField_STATUS(source *v20220615s.HeaderField_STATUS) error { + + // Key + field.Key = genruntime.ClonePointerToString(source.Key) + + // Value + field.Value = genruntime.ClonePointerToString(source.Value) + + // No error + return nil +} + +// AssignProperties_To_HeaderField_STATUS populates the provided destination HeaderField_STATUS from our HeaderField_STATUS +func (field *HeaderField_STATUS) AssignProperties_To_HeaderField_STATUS(destination *v20220615s.HeaderField_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Key + destination.Key = genruntime.ClonePointerToString(field.Key) + + // Value + destination.Value = genruntime.ClonePointerToString(field.Value) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type WebTestProperties_ValidationRules_ContentValidation struct { + // ContentMatch: Content to look for in the return of the WebTest. Must not be null or empty. + ContentMatch *string `json:"ContentMatch,omitempty"` + + // IgnoreCase: When set, this value makes the ContentMatch validation case insensitive. + IgnoreCase *bool `json:"IgnoreCase,omitempty"` + + // PassIfTextFound: When true, validation will pass if there is a match for the ContentMatch string. If false, validation + // will fail if there is a match + PassIfTextFound *bool `json:"PassIfTextFound,omitempty"` +} + +var _ genruntime.ARMTransformer = &WebTestProperties_ValidationRules_ContentValidation{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (validation *WebTestProperties_ValidationRules_ContentValidation) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if validation == nil { + return nil, nil + } + result := &WebTestProperties_ValidationRules_ContentValidation_ARM{} + + // Set property "ContentMatch": + if validation.ContentMatch != nil { + contentMatch := *validation.ContentMatch + result.ContentMatch = &contentMatch + } + + // Set property "IgnoreCase": + if validation.IgnoreCase != nil { + ignoreCase := *validation.IgnoreCase + result.IgnoreCase = &ignoreCase + } + + // Set property "PassIfTextFound": + if validation.PassIfTextFound != nil { + passIfTextFound := *validation.PassIfTextFound + result.PassIfTextFound = &passIfTextFound + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (validation *WebTestProperties_ValidationRules_ContentValidation) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &WebTestProperties_ValidationRules_ContentValidation_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (validation *WebTestProperties_ValidationRules_ContentValidation) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(WebTestProperties_ValidationRules_ContentValidation_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected WebTestProperties_ValidationRules_ContentValidation_ARM, got %T", armInput) + } + + // Set property "ContentMatch": + if typedInput.ContentMatch != nil { + contentMatch := *typedInput.ContentMatch + validation.ContentMatch = &contentMatch + } + + // Set property "IgnoreCase": + if typedInput.IgnoreCase != nil { + ignoreCase := *typedInput.IgnoreCase + validation.IgnoreCase = &ignoreCase + } + + // Set property "PassIfTextFound": + if typedInput.PassIfTextFound != nil { + passIfTextFound := *typedInput.PassIfTextFound + validation.PassIfTextFound = &passIfTextFound + } + + // No error + return nil +} + +// AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation populates our WebTestProperties_ValidationRules_ContentValidation from the provided source WebTestProperties_ValidationRules_ContentValidation +func (validation *WebTestProperties_ValidationRules_ContentValidation) AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation(source *v20220615s.WebTestProperties_ValidationRules_ContentValidation) error { + + // ContentMatch + validation.ContentMatch = genruntime.ClonePointerToString(source.ContentMatch) + + // IgnoreCase + if source.IgnoreCase != nil { + ignoreCase := *source.IgnoreCase + validation.IgnoreCase = &ignoreCase + } else { + validation.IgnoreCase = nil + } + + // PassIfTextFound + if source.PassIfTextFound != nil { + passIfTextFound := *source.PassIfTextFound + validation.PassIfTextFound = &passIfTextFound + } else { + validation.PassIfTextFound = nil + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation populates the provided destination WebTestProperties_ValidationRules_ContentValidation from our WebTestProperties_ValidationRules_ContentValidation +func (validation *WebTestProperties_ValidationRules_ContentValidation) AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation(destination *v20220615s.WebTestProperties_ValidationRules_ContentValidation) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ContentMatch + destination.ContentMatch = genruntime.ClonePointerToString(validation.ContentMatch) + + // IgnoreCase + if validation.IgnoreCase != nil { + ignoreCase := *validation.IgnoreCase + destination.IgnoreCase = &ignoreCase + } else { + destination.IgnoreCase = nil + } + + // PassIfTextFound + if validation.PassIfTextFound != nil { + passIfTextFound := *validation.PassIfTextFound + destination.PassIfTextFound = &passIfTextFound + } else { + destination.PassIfTextFound = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_WebTestProperties_ValidationRules_ContentValidation_STATUS populates our WebTestProperties_ValidationRules_ContentValidation from the provided source WebTestProperties_ValidationRules_ContentValidation_STATUS +func (validation *WebTestProperties_ValidationRules_ContentValidation) Initialize_From_WebTestProperties_ValidationRules_ContentValidation_STATUS(source *WebTestProperties_ValidationRules_ContentValidation_STATUS) error { + + // ContentMatch + validation.ContentMatch = genruntime.ClonePointerToString(source.ContentMatch) + + // IgnoreCase + if source.IgnoreCase != nil { + ignoreCase := *source.IgnoreCase + validation.IgnoreCase = &ignoreCase + } else { + validation.IgnoreCase = nil + } + + // PassIfTextFound + if source.PassIfTextFound != nil { + passIfTextFound := *source.PassIfTextFound + validation.PassIfTextFound = &passIfTextFound + } else { + validation.PassIfTextFound = nil + } + + // No error + return nil +} + +type WebTestProperties_ValidationRules_ContentValidation_STATUS struct { + // ContentMatch: Content to look for in the return of the WebTest. Must not be null or empty. + ContentMatch *string `json:"ContentMatch,omitempty"` + + // IgnoreCase: When set, this value makes the ContentMatch validation case insensitive. + IgnoreCase *bool `json:"IgnoreCase,omitempty"` + + // PassIfTextFound: When true, validation will pass if there is a match for the ContentMatch string. If false, validation + // will fail if there is a match + PassIfTextFound *bool `json:"PassIfTextFound,omitempty"` +} + +var _ genruntime.FromARMConverter = &WebTestProperties_ValidationRules_ContentValidation_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (validation *WebTestProperties_ValidationRules_ContentValidation_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (validation *WebTestProperties_ValidationRules_ContentValidation_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM, got %T", armInput) + } + + // Set property "ContentMatch": + if typedInput.ContentMatch != nil { + contentMatch := *typedInput.ContentMatch + validation.ContentMatch = &contentMatch + } + + // Set property "IgnoreCase": + if typedInput.IgnoreCase != nil { + ignoreCase := *typedInput.IgnoreCase + validation.IgnoreCase = &ignoreCase + } + + // Set property "PassIfTextFound": + if typedInput.PassIfTextFound != nil { + passIfTextFound := *typedInput.PassIfTextFound + validation.PassIfTextFound = &passIfTextFound + } + + // No error + return nil +} + +// AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_STATUS populates our WebTestProperties_ValidationRules_ContentValidation_STATUS from the provided source WebTestProperties_ValidationRules_ContentValidation_STATUS +func (validation *WebTestProperties_ValidationRules_ContentValidation_STATUS) AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_STATUS(source *v20220615s.WebTestProperties_ValidationRules_ContentValidation_STATUS) error { + + // ContentMatch + validation.ContentMatch = genruntime.ClonePointerToString(source.ContentMatch) + + // IgnoreCase + if source.IgnoreCase != nil { + ignoreCase := *source.IgnoreCase + validation.IgnoreCase = &ignoreCase + } else { + validation.IgnoreCase = nil + } + + // PassIfTextFound + if source.PassIfTextFound != nil { + passIfTextFound := *source.PassIfTextFound + validation.PassIfTextFound = &passIfTextFound + } else { + validation.PassIfTextFound = nil + } + + // No error + return nil +} + +// AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS populates the provided destination WebTestProperties_ValidationRules_ContentValidation_STATUS from our WebTestProperties_ValidationRules_ContentValidation_STATUS +func (validation *WebTestProperties_ValidationRules_ContentValidation_STATUS) AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS(destination *v20220615s.WebTestProperties_ValidationRules_ContentValidation_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ContentMatch + destination.ContentMatch = genruntime.ClonePointerToString(validation.ContentMatch) + + // IgnoreCase + if validation.IgnoreCase != nil { + ignoreCase := *validation.IgnoreCase + destination.IgnoreCase = &ignoreCase + } else { + destination.IgnoreCase = nil + } + + // PassIfTextFound + if validation.PassIfTextFound != nil { + passIfTextFound := *validation.PassIfTextFound + destination.PassIfTextFound = &passIfTextFound + } else { + destination.PassIfTextFound = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&Webtest{}, &WebtestList{}) +} diff --git a/v2/api/insights/v1api20220615/webtest_types_gen_test.go b/v2/api/insights/v1api20220615/webtest_types_gen_test.go new file mode 100644 index 00000000000..ff9f30caf35 --- /dev/null +++ b/v2/api/insights/v1api20220615/webtest_types_gen_test.go @@ -0,0 +1,1739 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220615 + +import ( + "encoding/json" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/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_Webtest_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 Webtest to hub returns original", + prop.ForAll(RunResourceConversionTestForWebtest, WebtestGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForWebtest tests if a specific instance of Webtest round trips to the hub storage version and back losslessly +func RunResourceConversionTestForWebtest(subject Webtest) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20220615s.Webtest + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual Webtest + 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_Webtest_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Webtest to Webtest via AssignProperties_To_Webtest & AssignProperties_From_Webtest returns original", + prop.ForAll(RunPropertyAssignmentTestForWebtest, WebtestGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebtest tests if a specific instance of Webtest can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebtest(subject Webtest) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.Webtest + err := copied.AssignProperties_To_Webtest(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Webtest + err = actual.AssignProperties_From_Webtest(&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_Webtest_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 Webtest via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebtest, WebtestGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebtest runs a test to see if a specific instance of Webtest round trips to JSON and back losslessly +func RunJSONSerializationTestForWebtest(subject Webtest) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Webtest + 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 Webtest instances for property testing - lazily instantiated by WebtestGenerator() +var webtestGenerator gopter.Gen + +// WebtestGenerator returns a generator of Webtest instances for property testing. +func WebtestGenerator() gopter.Gen { + if webtestGenerator != nil { + return webtestGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForWebtest(generators) + webtestGenerator = gen.Struct(reflect.TypeOf(Webtest{}), generators) + + return webtestGenerator +} + +// AddRelatedPropertyGeneratorsForWebtest is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebtest(gens map[string]gopter.Gen) { + gens["Spec"] = Webtest_SpecGenerator() + gens["Status"] = Webtest_STATUSGenerator() +} + +func Test_Webtest_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Webtest_Spec to Webtest_Spec via AssignProperties_To_Webtest_Spec & AssignProperties_From_Webtest_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForWebtest_Spec, Webtest_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebtest_Spec tests if a specific instance of Webtest_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebtest_Spec(subject Webtest_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 v20220615s.Webtest_Spec + err := copied.AssignProperties_To_Webtest_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Webtest_Spec + err = actual.AssignProperties_From_Webtest_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_Webtest_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 Webtest_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebtest_Spec, Webtest_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebtest_Spec runs a test to see if a specific instance of Webtest_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForWebtest_Spec(subject Webtest_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Webtest_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 Webtest_Spec instances for property testing - lazily instantiated by Webtest_SpecGenerator() +var webtest_SpecGenerator gopter.Gen + +// Webtest_SpecGenerator returns a generator of Webtest_Spec instances for property testing. +// We first initialize webtest_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 Webtest_SpecGenerator() gopter.Gen { + if webtest_SpecGenerator != nil { + return webtest_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_Spec(generators) + webtest_SpecGenerator = gen.Struct(reflect.TypeOf(Webtest_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_Spec(generators) + AddRelatedPropertyGeneratorsForWebtest_Spec(generators) + webtest_SpecGenerator = gen.Struct(reflect.TypeOf(Webtest_Spec{}), generators) + + return webtest_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForWebtest_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebtest_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Frequency"] = gen.PtrOf(gen.Int()) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(WebTestProperties_Kind_Multistep, WebTestProperties_Kind_Ping, WebTestProperties_Kind_Standard)) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["RetryEnabled"] = gen.PtrOf(gen.Bool()) + gens["SyntheticMonitorId"] = gen.PtrOf(gen.AlphaString()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["Timeout"] = gen.PtrOf(gen.Int()) +} + +// AddRelatedPropertyGeneratorsForWebtest_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebtest_Spec(gens map[string]gopter.Gen) { + gens["Configuration"] = gen.PtrOf(WebTestProperties_ConfigurationGenerator()) + gens["Locations"] = gen.SliceOf(WebTestGeolocationGenerator()) + gens["Request"] = gen.PtrOf(WebTestProperties_RequestGenerator()) + gens["ValidationRules"] = gen.PtrOf(WebTestProperties_ValidationRulesGenerator()) +} + +func Test_Webtest_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Webtest_STATUS to Webtest_STATUS via AssignProperties_To_Webtest_STATUS & AssignProperties_From_Webtest_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebtest_STATUS, Webtest_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebtest_STATUS tests if a specific instance of Webtest_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebtest_STATUS(subject Webtest_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 v20220615s.Webtest_STATUS + err := copied.AssignProperties_To_Webtest_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Webtest_STATUS + err = actual.AssignProperties_From_Webtest_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_Webtest_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 Webtest_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebtest_STATUS, Webtest_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebtest_STATUS runs a test to see if a specific instance of Webtest_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebtest_STATUS(subject Webtest_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Webtest_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 Webtest_STATUS instances for property testing - lazily instantiated by Webtest_STATUSGenerator() +var webtest_STATUSGenerator gopter.Gen + +// Webtest_STATUSGenerator returns a generator of Webtest_STATUS instances for property testing. +// We first initialize webtest_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 Webtest_STATUSGenerator() gopter.Gen { + if webtest_STATUSGenerator != nil { + return webtest_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_STATUS(generators) + webtest_STATUSGenerator = gen.Struct(reflect.TypeOf(Webtest_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebtest_STATUS(generators) + AddRelatedPropertyGeneratorsForWebtest_STATUS(generators) + webtest_STATUSGenerator = gen.Struct(reflect.TypeOf(Webtest_STATUS{}), generators) + + return webtest_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebtest_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebtest_STATUS(gens map[string]gopter.Gen) { + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Frequency"] = gen.PtrOf(gen.Int()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(WebTestProperties_Kind_STATUS_Multistep, WebTestProperties_Kind_STATUS_Ping, WebTestProperties_Kind_STATUS_Standard)) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["PropertiesName"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.AlphaString()) + gens["RetryEnabled"] = gen.PtrOf(gen.Bool()) + gens["SyntheticMonitorId"] = gen.PtrOf(gen.AlphaString()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["Timeout"] = gen.PtrOf(gen.Int()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForWebtest_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebtest_STATUS(gens map[string]gopter.Gen) { + gens["Configuration"] = gen.PtrOf(WebTestProperties_Configuration_STATUSGenerator()) + gens["Locations"] = gen.SliceOf(WebTestGeolocation_STATUSGenerator()) + gens["Request"] = gen.PtrOf(WebTestProperties_Request_STATUSGenerator()) + gens["ValidationRules"] = gen.PtrOf(WebTestProperties_ValidationRules_STATUSGenerator()) +} + +func Test_WebTestGeolocation_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestGeolocation to WebTestGeolocation via AssignProperties_To_WebTestGeolocation & AssignProperties_From_WebTestGeolocation returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestGeolocation, WebTestGeolocationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestGeolocation tests if a specific instance of WebTestGeolocation can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestGeolocation(subject WebTestGeolocation) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.WebTestGeolocation + err := copied.AssignProperties_To_WebTestGeolocation(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestGeolocation + err = actual.AssignProperties_From_WebTestGeolocation(&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_WebTestGeolocation_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 WebTestGeolocation via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestGeolocation, WebTestGeolocationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestGeolocation runs a test to see if a specific instance of WebTestGeolocation round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestGeolocation(subject WebTestGeolocation) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestGeolocation + 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 WebTestGeolocation instances for property testing - lazily instantiated by WebTestGeolocationGenerator() +var webTestGeolocationGenerator gopter.Gen + +// WebTestGeolocationGenerator returns a generator of WebTestGeolocation instances for property testing. +func WebTestGeolocationGenerator() gopter.Gen { + if webTestGeolocationGenerator != nil { + return webTestGeolocationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestGeolocation(generators) + webTestGeolocationGenerator = gen.Struct(reflect.TypeOf(WebTestGeolocation{}), generators) + + return webTestGeolocationGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestGeolocation is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestGeolocation(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestGeolocation_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestGeolocation_STATUS to WebTestGeolocation_STATUS via AssignProperties_To_WebTestGeolocation_STATUS & AssignProperties_From_WebTestGeolocation_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestGeolocation_STATUS, WebTestGeolocation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestGeolocation_STATUS tests if a specific instance of WebTestGeolocation_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestGeolocation_STATUS(subject WebTestGeolocation_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 v20220615s.WebTestGeolocation_STATUS + err := copied.AssignProperties_To_WebTestGeolocation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestGeolocation_STATUS + err = actual.AssignProperties_From_WebTestGeolocation_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_WebTestGeolocation_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 WebTestGeolocation_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestGeolocation_STATUS, WebTestGeolocation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestGeolocation_STATUS runs a test to see if a specific instance of WebTestGeolocation_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestGeolocation_STATUS(subject WebTestGeolocation_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestGeolocation_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 WebTestGeolocation_STATUS instances for property testing - lazily instantiated by +// WebTestGeolocation_STATUSGenerator() +var webTestGeolocation_STATUSGenerator gopter.Gen + +// WebTestGeolocation_STATUSGenerator returns a generator of WebTestGeolocation_STATUS instances for property testing. +func WebTestGeolocation_STATUSGenerator() gopter.Gen { + if webTestGeolocation_STATUSGenerator != nil { + return webTestGeolocation_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestGeolocation_STATUS(generators) + webTestGeolocation_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestGeolocation_STATUS{}), generators) + + return webTestGeolocation_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestGeolocation_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestGeolocation_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_Configuration_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_Configuration to WebTestProperties_Configuration via AssignProperties_To_WebTestProperties_Configuration & AssignProperties_From_WebTestProperties_Configuration returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_Configuration, WebTestProperties_ConfigurationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_Configuration tests if a specific instance of WebTestProperties_Configuration can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_Configuration(subject WebTestProperties_Configuration) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.WebTestProperties_Configuration + err := copied.AssignProperties_To_WebTestProperties_Configuration(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_Configuration + err = actual.AssignProperties_From_WebTestProperties_Configuration(&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_WebTestProperties_Configuration_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 WebTestProperties_Configuration via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Configuration, WebTestProperties_ConfigurationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Configuration runs a test to see if a specific instance of WebTestProperties_Configuration round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Configuration(subject WebTestProperties_Configuration) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Configuration + 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 WebTestProperties_Configuration instances for property testing - lazily instantiated by +// WebTestProperties_ConfigurationGenerator() +var webTestProperties_ConfigurationGenerator gopter.Gen + +// WebTestProperties_ConfigurationGenerator returns a generator of WebTestProperties_Configuration instances for property testing. +func WebTestProperties_ConfigurationGenerator() gopter.Gen { + if webTestProperties_ConfigurationGenerator != nil { + return webTestProperties_ConfigurationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Configuration(generators) + webTestProperties_ConfigurationGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Configuration{}), generators) + + return webTestProperties_ConfigurationGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Configuration is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Configuration(gens map[string]gopter.Gen) { + gens["WebTest"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_Configuration_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_Configuration_STATUS to WebTestProperties_Configuration_STATUS via AssignProperties_To_WebTestProperties_Configuration_STATUS & AssignProperties_From_WebTestProperties_Configuration_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_Configuration_STATUS, WebTestProperties_Configuration_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_Configuration_STATUS tests if a specific instance of WebTestProperties_Configuration_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_Configuration_STATUS(subject WebTestProperties_Configuration_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 v20220615s.WebTestProperties_Configuration_STATUS + err := copied.AssignProperties_To_WebTestProperties_Configuration_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_Configuration_STATUS + err = actual.AssignProperties_From_WebTestProperties_Configuration_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_WebTestProperties_Configuration_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 WebTestProperties_Configuration_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Configuration_STATUS, WebTestProperties_Configuration_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Configuration_STATUS runs a test to see if a specific instance of WebTestProperties_Configuration_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Configuration_STATUS(subject WebTestProperties_Configuration_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Configuration_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 WebTestProperties_Configuration_STATUS instances for property testing - lazily instantiated by +// WebTestProperties_Configuration_STATUSGenerator() +var webTestProperties_Configuration_STATUSGenerator gopter.Gen + +// WebTestProperties_Configuration_STATUSGenerator returns a generator of WebTestProperties_Configuration_STATUS instances for property testing. +func WebTestProperties_Configuration_STATUSGenerator() gopter.Gen { + if webTestProperties_Configuration_STATUSGenerator != nil { + return webTestProperties_Configuration_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_STATUS(generators) + webTestProperties_Configuration_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Configuration_STATUS{}), generators) + + return webTestProperties_Configuration_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Configuration_STATUS(gens map[string]gopter.Gen) { + gens["WebTest"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_Request_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_Request to WebTestProperties_Request via AssignProperties_To_WebTestProperties_Request & AssignProperties_From_WebTestProperties_Request returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_Request, WebTestProperties_RequestGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_Request tests if a specific instance of WebTestProperties_Request can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_Request(subject WebTestProperties_Request) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.WebTestProperties_Request + err := copied.AssignProperties_To_WebTestProperties_Request(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_Request + err = actual.AssignProperties_From_WebTestProperties_Request(&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_WebTestProperties_Request_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 WebTestProperties_Request via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Request, WebTestProperties_RequestGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Request runs a test to see if a specific instance of WebTestProperties_Request round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Request(subject WebTestProperties_Request) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Request + 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 WebTestProperties_Request instances for property testing - lazily instantiated by +// WebTestProperties_RequestGenerator() +var webTestProperties_RequestGenerator gopter.Gen + +// WebTestProperties_RequestGenerator returns a generator of WebTestProperties_Request instances for property testing. +// We first initialize webTestProperties_RequestGenerator 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 WebTestProperties_RequestGenerator() gopter.Gen { + if webTestProperties_RequestGenerator != nil { + return webTestProperties_RequestGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request(generators) + webTestProperties_RequestGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_Request(generators) + webTestProperties_RequestGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request{}), generators) + + return webTestProperties_RequestGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Request is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Request(gens map[string]gopter.Gen) { + gens["FollowRedirects"] = gen.PtrOf(gen.Bool()) + gens["HttpVerb"] = gen.PtrOf(gen.AlphaString()) + gens["ParseDependentRequests"] = gen.PtrOf(gen.Bool()) + gens["RequestBody"] = gen.PtrOf(gen.AlphaString()) + gens["RequestUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_Request is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_Request(gens map[string]gopter.Gen) { + gens["Headers"] = gen.SliceOf(HeaderFieldGenerator()) +} + +func Test_WebTestProperties_Request_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_Request_STATUS to WebTestProperties_Request_STATUS via AssignProperties_To_WebTestProperties_Request_STATUS & AssignProperties_From_WebTestProperties_Request_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_Request_STATUS, WebTestProperties_Request_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_Request_STATUS tests if a specific instance of WebTestProperties_Request_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_Request_STATUS(subject WebTestProperties_Request_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 v20220615s.WebTestProperties_Request_STATUS + err := copied.AssignProperties_To_WebTestProperties_Request_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_Request_STATUS + err = actual.AssignProperties_From_WebTestProperties_Request_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_WebTestProperties_Request_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 WebTestProperties_Request_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_Request_STATUS, WebTestProperties_Request_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_Request_STATUS runs a test to see if a specific instance of WebTestProperties_Request_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_Request_STATUS(subject WebTestProperties_Request_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_Request_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 WebTestProperties_Request_STATUS instances for property testing - lazily instantiated by +// WebTestProperties_Request_STATUSGenerator() +var webTestProperties_Request_STATUSGenerator gopter.Gen + +// WebTestProperties_Request_STATUSGenerator returns a generator of WebTestProperties_Request_STATUS instances for property testing. +// We first initialize webTestProperties_Request_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 WebTestProperties_Request_STATUSGenerator() gopter.Gen { + if webTestProperties_Request_STATUSGenerator != nil { + return webTestProperties_Request_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS(generators) + webTestProperties_Request_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_Request_STATUS(generators) + webTestProperties_Request_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_Request_STATUS{}), generators) + + return webTestProperties_Request_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_Request_STATUS(gens map[string]gopter.Gen) { + gens["FollowRedirects"] = gen.PtrOf(gen.Bool()) + gens["HttpVerb"] = gen.PtrOf(gen.AlphaString()) + gens["ParseDependentRequests"] = gen.PtrOf(gen.Bool()) + gens["RequestBody"] = gen.PtrOf(gen.AlphaString()) + gens["RequestUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_Request_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_Request_STATUS(gens map[string]gopter.Gen) { + gens["Headers"] = gen.SliceOf(HeaderField_STATUSGenerator()) +} + +func Test_WebTestProperties_ValidationRules_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_ValidationRules to WebTestProperties_ValidationRules via AssignProperties_To_WebTestProperties_ValidationRules & AssignProperties_From_WebTestProperties_ValidationRules returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_ValidationRules, WebTestProperties_ValidationRulesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_ValidationRules tests if a specific instance of WebTestProperties_ValidationRules can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_ValidationRules(subject WebTestProperties_ValidationRules) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.WebTestProperties_ValidationRules + err := copied.AssignProperties_To_WebTestProperties_ValidationRules(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_ValidationRules + err = actual.AssignProperties_From_WebTestProperties_ValidationRules(&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_WebTestProperties_ValidationRules_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 WebTestProperties_ValidationRules via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules, WebTestProperties_ValidationRulesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules runs a test to see if a specific instance of WebTestProperties_ValidationRules round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules(subject WebTestProperties_ValidationRules) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules + 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 WebTestProperties_ValidationRules instances for property testing - lazily instantiated by +// WebTestProperties_ValidationRulesGenerator() +var webTestProperties_ValidationRulesGenerator gopter.Gen + +// WebTestProperties_ValidationRulesGenerator returns a generator of WebTestProperties_ValidationRules instances for property testing. +// We first initialize webTestProperties_ValidationRulesGenerator 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 WebTestProperties_ValidationRulesGenerator() gopter.Gen { + if webTestProperties_ValidationRulesGenerator != nil { + return webTestProperties_ValidationRulesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules(generators) + webTestProperties_ValidationRulesGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules(generators) + webTestProperties_ValidationRulesGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules{}), generators) + + return webTestProperties_ValidationRulesGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules(gens map[string]gopter.Gen) { + gens["ExpectedHttpStatusCode"] = gen.PtrOf(gen.Int()) + gens["IgnoreHttpStatusCode"] = gen.PtrOf(gen.Bool()) + gens["SSLCertRemainingLifetimeCheck"] = gen.PtrOf(gen.Int()) + gens["SSLCheck"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules(gens map[string]gopter.Gen) { + gens["ContentValidation"] = gen.PtrOf(WebTestProperties_ValidationRules_ContentValidationGenerator()) +} + +func Test_WebTestProperties_ValidationRules_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_ValidationRules_STATUS to WebTestProperties_ValidationRules_STATUS via AssignProperties_To_WebTestProperties_ValidationRules_STATUS & AssignProperties_From_WebTestProperties_ValidationRules_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_ValidationRules_STATUS, WebTestProperties_ValidationRules_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_ValidationRules_STATUS tests if a specific instance of WebTestProperties_ValidationRules_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_ValidationRules_STATUS(subject WebTestProperties_ValidationRules_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 v20220615s.WebTestProperties_ValidationRules_STATUS + err := copied.AssignProperties_To_WebTestProperties_ValidationRules_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_ValidationRules_STATUS + err = actual.AssignProperties_From_WebTestProperties_ValidationRules_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_WebTestProperties_ValidationRules_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 WebTestProperties_ValidationRules_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules_STATUS, WebTestProperties_ValidationRules_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules_STATUS runs a test to see if a specific instance of WebTestProperties_ValidationRules_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules_STATUS(subject WebTestProperties_ValidationRules_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules_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 WebTestProperties_ValidationRules_STATUS instances for property testing - lazily instantiated by +// WebTestProperties_ValidationRules_STATUSGenerator() +var webTestProperties_ValidationRules_STATUSGenerator gopter.Gen + +// WebTestProperties_ValidationRules_STATUSGenerator returns a generator of WebTestProperties_ValidationRules_STATUS instances for property testing. +// We first initialize webTestProperties_ValidationRules_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 WebTestProperties_ValidationRules_STATUSGenerator() gopter.Gen { + if webTestProperties_ValidationRules_STATUSGenerator != nil { + return webTestProperties_ValidationRules_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(generators) + webTestProperties_ValidationRules_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(generators) + AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(generators) + webTestProperties_ValidationRules_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_STATUS{}), generators) + + return webTestProperties_ValidationRules_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(gens map[string]gopter.Gen) { + gens["ExpectedHttpStatusCode"] = gen.PtrOf(gen.Int()) + gens["IgnoreHttpStatusCode"] = gen.PtrOf(gen.Bool()) + gens["SSLCertRemainingLifetimeCheck"] = gen.PtrOf(gen.Int()) + gens["SSLCheck"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForWebTestProperties_ValidationRules_STATUS(gens map[string]gopter.Gen) { + gens["ContentValidation"] = gen.PtrOf(WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator()) +} + +func Test_HeaderField_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from HeaderField to HeaderField via AssignProperties_To_HeaderField & AssignProperties_From_HeaderField returns original", + prop.ForAll(RunPropertyAssignmentTestForHeaderField, HeaderFieldGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForHeaderField tests if a specific instance of HeaderField can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForHeaderField(subject HeaderField) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.HeaderField + err := copied.AssignProperties_To_HeaderField(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual HeaderField + err = actual.AssignProperties_From_HeaderField(&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_HeaderField_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 HeaderField via JSON returns original", + prop.ForAll(RunJSONSerializationTestForHeaderField, HeaderFieldGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForHeaderField runs a test to see if a specific instance of HeaderField round trips to JSON and back losslessly +func RunJSONSerializationTestForHeaderField(subject HeaderField) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual HeaderField + 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 HeaderField instances for property testing - lazily instantiated by HeaderFieldGenerator() +var headerFieldGenerator gopter.Gen + +// HeaderFieldGenerator returns a generator of HeaderField instances for property testing. +func HeaderFieldGenerator() gopter.Gen { + if headerFieldGenerator != nil { + return headerFieldGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForHeaderField(generators) + headerFieldGenerator = gen.Struct(reflect.TypeOf(HeaderField{}), generators) + + return headerFieldGenerator +} + +// AddIndependentPropertyGeneratorsForHeaderField is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForHeaderField(gens map[string]gopter.Gen) { + gens["Key"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_HeaderField_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from HeaderField_STATUS to HeaderField_STATUS via AssignProperties_To_HeaderField_STATUS & AssignProperties_From_HeaderField_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForHeaderField_STATUS, HeaderField_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForHeaderField_STATUS tests if a specific instance of HeaderField_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForHeaderField_STATUS(subject HeaderField_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 v20220615s.HeaderField_STATUS + err := copied.AssignProperties_To_HeaderField_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual HeaderField_STATUS + err = actual.AssignProperties_From_HeaderField_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_HeaderField_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 HeaderField_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForHeaderField_STATUS, HeaderField_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForHeaderField_STATUS runs a test to see if a specific instance of HeaderField_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForHeaderField_STATUS(subject HeaderField_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual HeaderField_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 HeaderField_STATUS instances for property testing - lazily instantiated by HeaderField_STATUSGenerator() +var headerField_STATUSGenerator gopter.Gen + +// HeaderField_STATUSGenerator returns a generator of HeaderField_STATUS instances for property testing. +func HeaderField_STATUSGenerator() gopter.Gen { + if headerField_STATUSGenerator != nil { + return headerField_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForHeaderField_STATUS(generators) + headerField_STATUSGenerator = gen.Struct(reflect.TypeOf(HeaderField_STATUS{}), generators) + + return headerField_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForHeaderField_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForHeaderField_STATUS(gens map[string]gopter.Gen) { + gens["Key"] = gen.PtrOf(gen.AlphaString()) + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_WebTestProperties_ValidationRules_ContentValidation_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_ValidationRules_ContentValidation to WebTestProperties_ValidationRules_ContentValidation via AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation & AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation, WebTestProperties_ValidationRules_ContentValidationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation tests if a specific instance of WebTestProperties_ValidationRules_ContentValidation can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation(subject WebTestProperties_ValidationRules_ContentValidation) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220615s.WebTestProperties_ValidationRules_ContentValidation + err := copied.AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_ValidationRules_ContentValidation + err = actual.AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation(&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_WebTestProperties_ValidationRules_ContentValidation_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 WebTestProperties_ValidationRules_ContentValidation via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation, WebTestProperties_ValidationRules_ContentValidationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation runs a test to see if a specific instance of WebTestProperties_ValidationRules_ContentValidation round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation(subject WebTestProperties_ValidationRules_ContentValidation) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules_ContentValidation + 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 WebTestProperties_ValidationRules_ContentValidation instances for property testing - lazily instantiated +// by WebTestProperties_ValidationRules_ContentValidationGenerator() +var webTestProperties_ValidationRules_ContentValidationGenerator gopter.Gen + +// WebTestProperties_ValidationRules_ContentValidationGenerator returns a generator of WebTestProperties_ValidationRules_ContentValidation instances for property testing. +func WebTestProperties_ValidationRules_ContentValidationGenerator() gopter.Gen { + if webTestProperties_ValidationRules_ContentValidationGenerator != nil { + return webTestProperties_ValidationRules_ContentValidationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation(generators) + webTestProperties_ValidationRules_ContentValidationGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_ContentValidation{}), generators) + + return webTestProperties_ValidationRules_ContentValidationGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation(gens map[string]gopter.Gen) { + gens["ContentMatch"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreCase"] = gen.PtrOf(gen.Bool()) + gens["PassIfTextFound"] = gen.PtrOf(gen.Bool()) +} + +func Test_WebTestProperties_ValidationRules_ContentValidation_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from WebTestProperties_ValidationRules_ContentValidation_STATUS to WebTestProperties_ValidationRules_ContentValidation_STATUS via AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS & AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation_STATUS, WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation_STATUS tests if a specific instance of WebTestProperties_ValidationRules_ContentValidation_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForWebTestProperties_ValidationRules_ContentValidation_STATUS(subject WebTestProperties_ValidationRules_ContentValidation_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 v20220615s.WebTestProperties_ValidationRules_ContentValidation_STATUS + err := copied.AssignProperties_To_WebTestProperties_ValidationRules_ContentValidation_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual WebTestProperties_ValidationRules_ContentValidation_STATUS + err = actual.AssignProperties_From_WebTestProperties_ValidationRules_ContentValidation_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_WebTestProperties_ValidationRules_ContentValidation_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 WebTestProperties_ValidationRules_ContentValidation_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_STATUS, WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_STATUS runs a test to see if a specific instance of WebTestProperties_ValidationRules_ContentValidation_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForWebTestProperties_ValidationRules_ContentValidation_STATUS(subject WebTestProperties_ValidationRules_ContentValidation_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual WebTestProperties_ValidationRules_ContentValidation_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 WebTestProperties_ValidationRules_ContentValidation_STATUS instances for property testing - lazily +// instantiated by WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator() +var webTestProperties_ValidationRules_ContentValidation_STATUSGenerator gopter.Gen + +// WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator returns a generator of WebTestProperties_ValidationRules_ContentValidation_STATUS instances for property testing. +func WebTestProperties_ValidationRules_ContentValidation_STATUSGenerator() gopter.Gen { + if webTestProperties_ValidationRules_ContentValidation_STATUSGenerator != nil { + return webTestProperties_ValidationRules_ContentValidation_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_STATUS(generators) + webTestProperties_ValidationRules_ContentValidation_STATUSGenerator = gen.Struct(reflect.TypeOf(WebTestProperties_ValidationRules_ContentValidation_STATUS{}), generators) + + return webTestProperties_ValidationRules_ContentValidation_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForWebTestProperties_ValidationRules_ContentValidation_STATUS(gens map[string]gopter.Gen) { + gens["ContentMatch"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreCase"] = gen.PtrOf(gen.Bool()) + gens["PassIfTextFound"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/insights/v1api20220615/zz_generated.deepcopy.go b/v2/api/insights/v1api20220615/zz_generated.deepcopy.go index aa792307bb2..1816f7a938c 100644 --- a/v2/api/insights/v1api20220615/zz_generated.deepcopy.go +++ b/v2/api/insights/v1api20220615/zz_generated.deepcopy.go @@ -591,6 +591,106 @@ func (in *Dimension_STATUS_ARM) DeepCopy() *Dimension_STATUS_ARM { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HeaderField) DeepCopyInto(out *HeaderField) { + *out = *in + if in.Key != nil { + in, out := &in.Key, &out.Key + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderField. +func (in *HeaderField) DeepCopy() *HeaderField { + if in == nil { + return nil + } + out := new(HeaderField) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HeaderField_ARM) DeepCopyInto(out *HeaderField_ARM) { + *out = *in + if in.Key != nil { + in, out := &in.Key, &out.Key + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderField_ARM. +func (in *HeaderField_ARM) DeepCopy() *HeaderField_ARM { + if in == nil { + return nil + } + out := new(HeaderField_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HeaderField_STATUS) DeepCopyInto(out *HeaderField_STATUS) { + *out = *in + if in.Key != nil { + in, out := &in.Key, &out.Key + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderField_STATUS. +func (in *HeaderField_STATUS) DeepCopy() *HeaderField_STATUS { + if in == nil { + return nil + } + out := new(HeaderField_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HeaderField_STATUS_ARM) DeepCopyInto(out *HeaderField_STATUS_ARM) { + *out = *in + if in.Key != nil { + in, out := &in.Key, &out.Key + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderField_STATUS_ARM. +func (in *HeaderField_STATUS_ARM) DeepCopy() *HeaderField_STATUS_ARM { + if in == nil { + return nil + } + out := new(HeaderField_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ScheduledQueryRule) DeepCopyInto(out *ScheduledQueryRule) { *out = *in @@ -1387,3 +1487,1138 @@ func (in *SystemData_STATUS_ARM) DeepCopy() *SystemData_STATUS_ARM { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestGeolocation) DeepCopyInto(out *WebTestGeolocation) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestGeolocation. +func (in *WebTestGeolocation) DeepCopy() *WebTestGeolocation { + if in == nil { + return nil + } + out := new(WebTestGeolocation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestGeolocation_ARM) DeepCopyInto(out *WebTestGeolocation_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestGeolocation_ARM. +func (in *WebTestGeolocation_ARM) DeepCopy() *WebTestGeolocation_ARM { + if in == nil { + return nil + } + out := new(WebTestGeolocation_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestGeolocation_STATUS) DeepCopyInto(out *WebTestGeolocation_STATUS) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestGeolocation_STATUS. +func (in *WebTestGeolocation_STATUS) DeepCopy() *WebTestGeolocation_STATUS { + if in == nil { + return nil + } + out := new(WebTestGeolocation_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestGeolocation_STATUS_ARM) DeepCopyInto(out *WebTestGeolocation_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestGeolocation_STATUS_ARM. +func (in *WebTestGeolocation_STATUS_ARM) DeepCopy() *WebTestGeolocation_STATUS_ARM { + if in == nil { + return nil + } + out := new(WebTestGeolocation_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ARM) DeepCopyInto(out *WebTestProperties_ARM) { + *out = *in + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = new(WebTestProperties_Configuration_ARM) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Frequency != nil { + in, out := &in.Frequency, &out.Frequency + *out = new(int) + **out = **in + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(WebTestProperties_Kind) + **out = **in + } + if in.Locations != nil { + in, out := &in.Locations, &out.Locations + *out = make([]WebTestGeolocation_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Request != nil { + in, out := &in.Request, &out.Request + *out = new(WebTestProperties_Request_ARM) + (*in).DeepCopyInto(*out) + } + if in.RetryEnabled != nil { + in, out := &in.RetryEnabled, &out.RetryEnabled + *out = new(bool) + **out = **in + } + if in.SyntheticMonitorId != nil { + in, out := &in.SyntheticMonitorId, &out.SyntheticMonitorId + *out = new(string) + **out = **in + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(int) + **out = **in + } + if in.ValidationRules != nil { + in, out := &in.ValidationRules, &out.ValidationRules + *out = new(WebTestProperties_ValidationRules_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ARM. +func (in *WebTestProperties_ARM) DeepCopy() *WebTestProperties_ARM { + if in == nil { + return nil + } + out := new(WebTestProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Configuration) DeepCopyInto(out *WebTestProperties_Configuration) { + *out = *in + if in.WebTest != nil { + in, out := &in.WebTest, &out.WebTest + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Configuration. +func (in *WebTestProperties_Configuration) DeepCopy() *WebTestProperties_Configuration { + if in == nil { + return nil + } + out := new(WebTestProperties_Configuration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Configuration_ARM) DeepCopyInto(out *WebTestProperties_Configuration_ARM) { + *out = *in + if in.WebTest != nil { + in, out := &in.WebTest, &out.WebTest + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Configuration_ARM. +func (in *WebTestProperties_Configuration_ARM) DeepCopy() *WebTestProperties_Configuration_ARM { + if in == nil { + return nil + } + out := new(WebTestProperties_Configuration_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Configuration_STATUS) DeepCopyInto(out *WebTestProperties_Configuration_STATUS) { + *out = *in + if in.WebTest != nil { + in, out := &in.WebTest, &out.WebTest + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Configuration_STATUS. +func (in *WebTestProperties_Configuration_STATUS) DeepCopy() *WebTestProperties_Configuration_STATUS { + if in == nil { + return nil + } + out := new(WebTestProperties_Configuration_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Configuration_STATUS_ARM) DeepCopyInto(out *WebTestProperties_Configuration_STATUS_ARM) { + *out = *in + if in.WebTest != nil { + in, out := &in.WebTest, &out.WebTest + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Configuration_STATUS_ARM. +func (in *WebTestProperties_Configuration_STATUS_ARM) DeepCopy() *WebTestProperties_Configuration_STATUS_ARM { + if in == nil { + return nil + } + out := new(WebTestProperties_Configuration_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Request) DeepCopyInto(out *WebTestProperties_Request) { + *out = *in + if in.FollowRedirects != nil { + in, out := &in.FollowRedirects, &out.FollowRedirects + *out = new(bool) + **out = **in + } + if in.Headers != nil { + in, out := &in.Headers, &out.Headers + *out = make([]HeaderField, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.HttpVerb != nil { + in, out := &in.HttpVerb, &out.HttpVerb + *out = new(string) + **out = **in + } + if in.ParseDependentRequests != nil { + in, out := &in.ParseDependentRequests, &out.ParseDependentRequests + *out = new(bool) + **out = **in + } + if in.RequestBody != nil { + in, out := &in.RequestBody, &out.RequestBody + *out = new(string) + **out = **in + } + if in.RequestUrl != nil { + in, out := &in.RequestUrl, &out.RequestUrl + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Request. +func (in *WebTestProperties_Request) DeepCopy() *WebTestProperties_Request { + if in == nil { + return nil + } + out := new(WebTestProperties_Request) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Request_ARM) DeepCopyInto(out *WebTestProperties_Request_ARM) { + *out = *in + if in.FollowRedirects != nil { + in, out := &in.FollowRedirects, &out.FollowRedirects + *out = new(bool) + **out = **in + } + if in.Headers != nil { + in, out := &in.Headers, &out.Headers + *out = make([]HeaderField_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.HttpVerb != nil { + in, out := &in.HttpVerb, &out.HttpVerb + *out = new(string) + **out = **in + } + if in.ParseDependentRequests != nil { + in, out := &in.ParseDependentRequests, &out.ParseDependentRequests + *out = new(bool) + **out = **in + } + if in.RequestBody != nil { + in, out := &in.RequestBody, &out.RequestBody + *out = new(string) + **out = **in + } + if in.RequestUrl != nil { + in, out := &in.RequestUrl, &out.RequestUrl + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Request_ARM. +func (in *WebTestProperties_Request_ARM) DeepCopy() *WebTestProperties_Request_ARM { + if in == nil { + return nil + } + out := new(WebTestProperties_Request_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Request_STATUS) DeepCopyInto(out *WebTestProperties_Request_STATUS) { + *out = *in + if in.FollowRedirects != nil { + in, out := &in.FollowRedirects, &out.FollowRedirects + *out = new(bool) + **out = **in + } + if in.Headers != nil { + in, out := &in.Headers, &out.Headers + *out = make([]HeaderField_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.HttpVerb != nil { + in, out := &in.HttpVerb, &out.HttpVerb + *out = new(string) + **out = **in + } + if in.ParseDependentRequests != nil { + in, out := &in.ParseDependentRequests, &out.ParseDependentRequests + *out = new(bool) + **out = **in + } + if in.RequestBody != nil { + in, out := &in.RequestBody, &out.RequestBody + *out = new(string) + **out = **in + } + if in.RequestUrl != nil { + in, out := &in.RequestUrl, &out.RequestUrl + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Request_STATUS. +func (in *WebTestProperties_Request_STATUS) DeepCopy() *WebTestProperties_Request_STATUS { + if in == nil { + return nil + } + out := new(WebTestProperties_Request_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_Request_STATUS_ARM) DeepCopyInto(out *WebTestProperties_Request_STATUS_ARM) { + *out = *in + if in.FollowRedirects != nil { + in, out := &in.FollowRedirects, &out.FollowRedirects + *out = new(bool) + **out = **in + } + if in.Headers != nil { + in, out := &in.Headers, &out.Headers + *out = make([]HeaderField_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.HttpVerb != nil { + in, out := &in.HttpVerb, &out.HttpVerb + *out = new(string) + **out = **in + } + if in.ParseDependentRequests != nil { + in, out := &in.ParseDependentRequests, &out.ParseDependentRequests + *out = new(bool) + **out = **in + } + if in.RequestBody != nil { + in, out := &in.RequestBody, &out.RequestBody + *out = new(string) + **out = **in + } + if in.RequestUrl != nil { + in, out := &in.RequestUrl, &out.RequestUrl + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_Request_STATUS_ARM. +func (in *WebTestProperties_Request_STATUS_ARM) DeepCopy() *WebTestProperties_Request_STATUS_ARM { + if in == nil { + return nil + } + out := new(WebTestProperties_Request_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_STATUS_ARM) DeepCopyInto(out *WebTestProperties_STATUS_ARM) { + *out = *in + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = new(WebTestProperties_Configuration_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Frequency != nil { + in, out := &in.Frequency, &out.Frequency + *out = new(int) + **out = **in + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(WebTestProperties_Kind_STATUS) + **out = **in + } + if in.Locations != nil { + in, out := &in.Locations, &out.Locations + *out = make([]WebTestGeolocation_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(string) + **out = **in + } + if in.Request != nil { + in, out := &in.Request, &out.Request + *out = new(WebTestProperties_Request_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.RetryEnabled != nil { + in, out := &in.RetryEnabled, &out.RetryEnabled + *out = new(bool) + **out = **in + } + if in.SyntheticMonitorId != nil { + in, out := &in.SyntheticMonitorId, &out.SyntheticMonitorId + *out = new(string) + **out = **in + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(int) + **out = **in + } + if in.ValidationRules != nil { + in, out := &in.ValidationRules, &out.ValidationRules + *out = new(WebTestProperties_ValidationRules_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_STATUS_ARM. +func (in *WebTestProperties_STATUS_ARM) DeepCopy() *WebTestProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(WebTestProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules) DeepCopyInto(out *WebTestProperties_ValidationRules) { + *out = *in + if in.ContentValidation != nil { + in, out := &in.ContentValidation, &out.ContentValidation + *out = new(WebTestProperties_ValidationRules_ContentValidation) + (*in).DeepCopyInto(*out) + } + if in.ExpectedHttpStatusCode != nil { + in, out := &in.ExpectedHttpStatusCode, &out.ExpectedHttpStatusCode + *out = new(int) + **out = **in + } + if in.IgnoreHttpStatusCode != nil { + in, out := &in.IgnoreHttpStatusCode, &out.IgnoreHttpStatusCode + *out = new(bool) + **out = **in + } + if in.SSLCertRemainingLifetimeCheck != nil { + in, out := &in.SSLCertRemainingLifetimeCheck, &out.SSLCertRemainingLifetimeCheck + *out = new(int) + **out = **in + } + if in.SSLCheck != nil { + in, out := &in.SSLCheck, &out.SSLCheck + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules. +func (in *WebTestProperties_ValidationRules) DeepCopy() *WebTestProperties_ValidationRules { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules_ARM) DeepCopyInto(out *WebTestProperties_ValidationRules_ARM) { + *out = *in + if in.ContentValidation != nil { + in, out := &in.ContentValidation, &out.ContentValidation + *out = new(WebTestProperties_ValidationRules_ContentValidation_ARM) + (*in).DeepCopyInto(*out) + } + if in.ExpectedHttpStatusCode != nil { + in, out := &in.ExpectedHttpStatusCode, &out.ExpectedHttpStatusCode + *out = new(int) + **out = **in + } + if in.IgnoreHttpStatusCode != nil { + in, out := &in.IgnoreHttpStatusCode, &out.IgnoreHttpStatusCode + *out = new(bool) + **out = **in + } + if in.SSLCertRemainingLifetimeCheck != nil { + in, out := &in.SSLCertRemainingLifetimeCheck, &out.SSLCertRemainingLifetimeCheck + *out = new(int) + **out = **in + } + if in.SSLCheck != nil { + in, out := &in.SSLCheck, &out.SSLCheck + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules_ARM. +func (in *WebTestProperties_ValidationRules_ARM) DeepCopy() *WebTestProperties_ValidationRules_ARM { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules_ContentValidation) DeepCopyInto(out *WebTestProperties_ValidationRules_ContentValidation) { + *out = *in + if in.ContentMatch != nil { + in, out := &in.ContentMatch, &out.ContentMatch + *out = new(string) + **out = **in + } + if in.IgnoreCase != nil { + in, out := &in.IgnoreCase, &out.IgnoreCase + *out = new(bool) + **out = **in + } + if in.PassIfTextFound != nil { + in, out := &in.PassIfTextFound, &out.PassIfTextFound + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules_ContentValidation. +func (in *WebTestProperties_ValidationRules_ContentValidation) DeepCopy() *WebTestProperties_ValidationRules_ContentValidation { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules_ContentValidation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules_ContentValidation_ARM) DeepCopyInto(out *WebTestProperties_ValidationRules_ContentValidation_ARM) { + *out = *in + if in.ContentMatch != nil { + in, out := &in.ContentMatch, &out.ContentMatch + *out = new(string) + **out = **in + } + if in.IgnoreCase != nil { + in, out := &in.IgnoreCase, &out.IgnoreCase + *out = new(bool) + **out = **in + } + if in.PassIfTextFound != nil { + in, out := &in.PassIfTextFound, &out.PassIfTextFound + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules_ContentValidation_ARM. +func (in *WebTestProperties_ValidationRules_ContentValidation_ARM) DeepCopy() *WebTestProperties_ValidationRules_ContentValidation_ARM { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules_ContentValidation_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules_ContentValidation_STATUS) DeepCopyInto(out *WebTestProperties_ValidationRules_ContentValidation_STATUS) { + *out = *in + if in.ContentMatch != nil { + in, out := &in.ContentMatch, &out.ContentMatch + *out = new(string) + **out = **in + } + if in.IgnoreCase != nil { + in, out := &in.IgnoreCase, &out.IgnoreCase + *out = new(bool) + **out = **in + } + if in.PassIfTextFound != nil { + in, out := &in.PassIfTextFound, &out.PassIfTextFound + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules_ContentValidation_STATUS. +func (in *WebTestProperties_ValidationRules_ContentValidation_STATUS) DeepCopy() *WebTestProperties_ValidationRules_ContentValidation_STATUS { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules_ContentValidation_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM) DeepCopyInto(out *WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM) { + *out = *in + if in.ContentMatch != nil { + in, out := &in.ContentMatch, &out.ContentMatch + *out = new(string) + **out = **in + } + if in.IgnoreCase != nil { + in, out := &in.IgnoreCase, &out.IgnoreCase + *out = new(bool) + **out = **in + } + if in.PassIfTextFound != nil { + in, out := &in.PassIfTextFound, &out.PassIfTextFound + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM. +func (in *WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM) DeepCopy() *WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules_STATUS) DeepCopyInto(out *WebTestProperties_ValidationRules_STATUS) { + *out = *in + if in.ContentValidation != nil { + in, out := &in.ContentValidation, &out.ContentValidation + *out = new(WebTestProperties_ValidationRules_ContentValidation_STATUS) + (*in).DeepCopyInto(*out) + } + if in.ExpectedHttpStatusCode != nil { + in, out := &in.ExpectedHttpStatusCode, &out.ExpectedHttpStatusCode + *out = new(int) + **out = **in + } + if in.IgnoreHttpStatusCode != nil { + in, out := &in.IgnoreHttpStatusCode, &out.IgnoreHttpStatusCode + *out = new(bool) + **out = **in + } + if in.SSLCertRemainingLifetimeCheck != nil { + in, out := &in.SSLCertRemainingLifetimeCheck, &out.SSLCertRemainingLifetimeCheck + *out = new(int) + **out = **in + } + if in.SSLCheck != nil { + in, out := &in.SSLCheck, &out.SSLCheck + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules_STATUS. +func (in *WebTestProperties_ValidationRules_STATUS) DeepCopy() *WebTestProperties_ValidationRules_STATUS { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebTestProperties_ValidationRules_STATUS_ARM) DeepCopyInto(out *WebTestProperties_ValidationRules_STATUS_ARM) { + *out = *in + if in.ContentValidation != nil { + in, out := &in.ContentValidation, &out.ContentValidation + *out = new(WebTestProperties_ValidationRules_ContentValidation_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.ExpectedHttpStatusCode != nil { + in, out := &in.ExpectedHttpStatusCode, &out.ExpectedHttpStatusCode + *out = new(int) + **out = **in + } + if in.IgnoreHttpStatusCode != nil { + in, out := &in.IgnoreHttpStatusCode, &out.IgnoreHttpStatusCode + *out = new(bool) + **out = **in + } + if in.SSLCertRemainingLifetimeCheck != nil { + in, out := &in.SSLCertRemainingLifetimeCheck, &out.SSLCertRemainingLifetimeCheck + *out = new(int) + **out = **in + } + if in.SSLCheck != nil { + in, out := &in.SSLCheck, &out.SSLCheck + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTestProperties_ValidationRules_STATUS_ARM. +func (in *WebTestProperties_ValidationRules_STATUS_ARM) DeepCopy() *WebTestProperties_ValidationRules_STATUS_ARM { + if in == nil { + return nil + } + out := new(WebTestProperties_ValidationRules_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Webtest) DeepCopyInto(out *Webtest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webtest. +func (in *Webtest) DeepCopy() *Webtest { + if in == nil { + return nil + } + out := new(Webtest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Webtest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebtestList) DeepCopyInto(out *WebtestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Webtest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebtestList. +func (in *WebtestList) DeepCopy() *WebtestList { + if in == nil { + return nil + } + out := new(WebtestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *WebtestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Webtest_STATUS) DeepCopyInto(out *Webtest_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = new(WebTestProperties_Configuration_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Frequency != nil { + in, out := &in.Frequency, &out.Frequency + *out = new(int) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(WebTestProperties_Kind_STATUS) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Locations != nil { + in, out := &in.Locations, &out.Locations + *out = make([]WebTestGeolocation_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PropertiesName != nil { + in, out := &in.PropertiesName, &out.PropertiesName + *out = new(string) + **out = **in + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(string) + **out = **in + } + if in.Request != nil { + in, out := &in.Request, &out.Request + *out = new(WebTestProperties_Request_STATUS) + (*in).DeepCopyInto(*out) + } + if in.RetryEnabled != nil { + in, out := &in.RetryEnabled, &out.RetryEnabled + *out = new(bool) + **out = **in + } + if in.SyntheticMonitorId != nil { + in, out := &in.SyntheticMonitorId, &out.SyntheticMonitorId + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(int) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.ValidationRules != nil { + in, out := &in.ValidationRules, &out.ValidationRules + *out = new(WebTestProperties_ValidationRules_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webtest_STATUS. +func (in *Webtest_STATUS) DeepCopy() *Webtest_STATUS { + if in == nil { + return nil + } + out := new(Webtest_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Webtest_STATUS_ARM) DeepCopyInto(out *Webtest_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(WebTestProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webtest_STATUS_ARM. +func (in *Webtest_STATUS_ARM) DeepCopy() *Webtest_STATUS_ARM { + if in == nil { + return nil + } + out := new(Webtest_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Webtest_Spec) DeepCopyInto(out *Webtest_Spec) { + *out = *in + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = new(WebTestProperties_Configuration) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Frequency != nil { + in, out := &in.Frequency, &out.Frequency + *out = new(int) + **out = **in + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(WebTestProperties_Kind) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Locations != nil { + in, out := &in.Locations, &out.Locations + *out = make([]WebTestGeolocation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.Request != nil { + in, out := &in.Request, &out.Request + *out = new(WebTestProperties_Request) + (*in).DeepCopyInto(*out) + } + if in.RetryEnabled != nil { + in, out := &in.RetryEnabled, &out.RetryEnabled + *out = new(bool) + **out = **in + } + if in.SyntheticMonitorId != nil { + in, out := &in.SyntheticMonitorId, &out.SyntheticMonitorId + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(int) + **out = **in + } + if in.ValidationRules != nil { + in, out := &in.ValidationRules, &out.ValidationRules + *out = new(WebTestProperties_ValidationRules) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webtest_Spec. +func (in *Webtest_Spec) DeepCopy() *Webtest_Spec { + if in == nil { + return nil + } + out := new(Webtest_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Webtest_Spec_ARM) DeepCopyInto(out *Webtest_Spec_ARM) { + *out = *in + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(WebTestProperties_ARM) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webtest_Spec_ARM. +func (in *Webtest_Spec_ARM) DeepCopy() *Webtest_Spec_ARM { + if in == nil { + return nil + } + out := new(Webtest_Spec_ARM) + in.DeepCopyInto(out) + return out +} diff --git a/v2/api/insights/versions_matrix.md b/v2/api/insights/versions_matrix.md index d74d70e01f2..a549a5e766a 100644 --- a/v2/api/insights/versions_matrix.md +++ b/v2/api/insights/versions_matrix.md @@ -70,8 +70,8 @@ | EmailReceiver_STATUS | | | | | | v1api20230101 | | EventHubReceiver | | | | | | v1api20230101 | | EventHubReceiver_STATUS | | | | | | v1api20230101 | -| HeaderField | | v1api20180501preview | | | | | -| HeaderField_STATUS | | v1api20180501preview | | | | | +| HeaderField | | v1api20180501preview | | v1api20220615 | | | +| HeaderField_STATUS | | v1api20180501preview | | v1api20220615 | | | | ItsmReceiver | | | | | | v1api20230101 | | ItsmReceiver_STATUS | | | | | | v1api20230101 | | LogicAppReceiver | | | | | | v1api20230101 | @@ -161,28 +161,28 @@ | TimeWindow_STATUS | | | | | v1api20221001 | | | VoiceReceiver | | | | | | v1api20230101 | | VoiceReceiver_STATUS | | | | | | v1api20230101 | -| WebTestGeolocation | | v1api20180501preview | | | | | -| WebTestGeolocation_STATUS | | v1api20180501preview | | | | | -| WebTestProperties | | v1api20180501preview | | | | | -| WebTestProperties_Configuration | | v1api20180501preview | | | | | -| WebTestProperties_Configuration_STATUS | | v1api20180501preview | | | | | -| WebTestProperties_Kind | | v1api20180501preview | | | | | -| WebTestProperties_Kind_STATUS | | v1api20180501preview | | | | | -| WebTestProperties_Request | | v1api20180501preview | | | | | -| WebTestProperties_Request_STATUS | | v1api20180501preview | | | | | -| WebTestProperties_STATUS | | v1api20180501preview | | | | | -| WebTestProperties_ValidationRules | | v1api20180501preview | | | | | -| WebTestProperties_ValidationRules_ContentValidation | | v1api20180501preview | | | | | -| WebTestProperties_ValidationRules_ContentValidation_STATUS | | v1api20180501preview | | | | | -| WebTestProperties_ValidationRules_STATUS | | v1api20180501preview | | | | | +| WebTestGeolocation | | v1api20180501preview | | v1api20220615 | | | +| WebTestGeolocation_STATUS | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_Configuration | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_Configuration_STATUS | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_Kind | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_Kind_STATUS | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_Request | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_Request_STATUS | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_STATUS | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_ValidationRules | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_ValidationRules_ContentValidation | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_ValidationRules_ContentValidation_STATUS | | v1api20180501preview | | v1api20220615 | | | +| WebTestProperties_ValidationRules_STATUS | | v1api20180501preview | | v1api20220615 | | | | WebhookNotification | | | | | v1api20221001 | | | WebhookNotification_STATUS | | | | | v1api20221001 | | | WebhookReceiver | | | | | | v1api20230101 | | WebhookReceiver_STATUS | | | | | | v1api20230101 | -| Webtest | | v1api20180501preview | | | | | +| Webtest | | v1api20180501preview | | v1api20220615 | | | | WebtestLocationAvailabilityCriteria | v1api20180301 | | | | | | | WebtestLocationAvailabilityCriteria_OdataType | v1api20180301 | | | | | | | WebtestLocationAvailabilityCriteria_OdataType_STATUS | v1api20180301 | | | | | | | WebtestLocationAvailabilityCriteria_STATUS | v1api20180301 | | | | | | -| Webtest_STATUS | | v1api20180501preview | | | | | -| Webtest_Spec | | v1api20180501preview | | | | | +| Webtest_STATUS | | v1api20180501preview | | v1api20220615 | | | +| Webtest_Spec | | v1api20180501preview | | v1api20220615 | | | diff --git a/v2/azure-arm.yaml b/v2/azure-arm.yaml index 1f762d7b1ff..8943bed2fbb 100644 --- a/v2/azure-arm.yaml +++ b/v2/azure-arm.yaml @@ -2145,6 +2145,12 @@ objectModelConfiguration: ScheduledQueryRuleProperties: Scopes: $armReference: true + Webtest: + $export: true + $supportedFrom: v2.7.0 + WebTestGeolocation: + Id: + $armReference: false keyvault: 2021-04-01-preview: Vault: diff --git a/v2/internal/controllers/controller_resources_gen.go b/v2/internal/controllers/controller_resources_gen.go index 59ac7fdbbc2..0262e3df967 100644 --- a/v2/internal/controllers/controller_resources_gen.go +++ b/v2/internal/controllers/controller_resources_gen.go @@ -686,9 +686,9 @@ func getKnownStorageTypes() []*registration.StorageType { result = append(result, ®istration.StorageType{Obj: new(eventhub_v20211101s.NamespacesEventhubsAuthorizationRule)}) result = append(result, ®istration.StorageType{Obj: new(eventhub_v20211101s.NamespacesEventhubsConsumerGroup)}) result = append(result, ®istration.StorageType{Obj: new(insights_v20180301s.MetricAlert)}) - result = append(result, ®istration.StorageType{Obj: new(insights_v20180501ps.Webtest)}) result = append(result, ®istration.StorageType{Obj: new(insights_v20200202s.Component)}) result = append(result, ®istration.StorageType{Obj: new(insights_v20220615s.ScheduledQueryRule)}) + result = append(result, ®istration.StorageType{Obj: new(insights_v20220615s.Webtest)}) result = append(result, ®istration.StorageType{Obj: new(insights_v20221001s.AutoscaleSetting)}) result = append(result, ®istration.StorageType{Obj: new(insights_v20230101s.ActionGroup)}) result = append(result, ®istration.StorageType{ @@ -1513,8 +1513,14 @@ func getKnownTypes() []client.Object { result = append(result, new(insights_v20180501ps.Webtest)) result = append(result, new(insights_v20200202.Component)) result = append(result, new(insights_v20200202s.Component)) - result = append(result, new(insights_v20220615.ScheduledQueryRule)) - result = append(result, new(insights_v20220615s.ScheduledQueryRule)) + result = append( + result, + new(insights_v20220615.ScheduledQueryRule), + new(insights_v20220615.Webtest)) + result = append( + result, + new(insights_v20220615s.ScheduledQueryRule), + new(insights_v20220615s.Webtest)) result = append(result, new(insights_v20221001.AutoscaleSetting)) result = append(result, new(insights_v20221001s.AutoscaleSetting)) result = append(result, new(insights_v20230101.ActionGroup)) diff --git a/v2/internal/controllers/crd_insights_component_test.go b/v2/internal/controllers/crd_insights_component_test.go index 1377acbf699..5518dec35e0 100644 --- a/v2/internal/controllers/crd_insights_component_test.go +++ b/v2/internal/controllers/crd_insights_component_test.go @@ -11,8 +11,9 @@ import ( . "github.com/onsi/gomega" - insightswebtest "github.com/Azure/azure-service-operator/v2/api/insights/v1api20180501preview" + insightswebtest20180501preview "github.com/Azure/azure-service-operator/v2/api/insights/v1api20180501preview" insights "github.com/Azure/azure-service-operator/v2/api/insights/v1api20200202" + insightswebtest20220615 "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615" resources "github.com/Azure/azure-service-operator/v2/api/resources/v1api20200601" "github.com/Azure/azure-service-operator/v2/internal/testcommon" "github.com/Azure/azure-service-operator/v2/internal/util/to" @@ -42,11 +43,18 @@ func Test_Insights_Component_CRUD(t *testing.T) { tc.RunParallelSubtests( testcommon.Subtest{ - Name: "Insights WebTest CRUD", + Name: "Insights WebTest 20180501preview CRUD", Test: func(tc *testcommon.KubePerTestContext) { - Insights_WebTest_CRUD(tc, rg, component) + Insights_WebTest_20180501preview_CRUD(tc, rg, component) }, - }) + }, + testcommon.Subtest{ + Name: "Insights WebTest 20220615 CRUD", + Test: func(tc *testcommon.KubePerTestContext) { + Insights_WebTest_20220615_CRUD(tc, rg, component) + }, + }, + ) tc.DeleteResourceAndWait(component) @@ -59,7 +67,71 @@ func Test_Insights_Component_CRUD(t *testing.T) { tc.Expect(exists).To(BeFalse()) } -func Insights_WebTest_CRUD(tc *testcommon.KubePerTestContext, rg *resources.ResourceGroup, component *insights.Component) { +func Insights_WebTest_20220615_CRUD(tc *testcommon.KubePerTestContext, rg *resources.ResourceGroup, component *insights.Component) { + horribleHiddenLink := fmt.Sprintf("hidden-link:%s", to.Value(component.Status.Id)) + + horribleTags := map[string]string{ + horribleHiddenLink: "Resource", + } + + // Create a webtest + om := tc.MakeObjectMeta("webtest") + + kind := insightswebtest20220615.WebTestProperties_Kind_Standard + webtest := &insightswebtest20220615.Webtest{ + ObjectMeta: om, + Spec: insightswebtest20220615.Webtest_Spec{ + Location: tc.AzureRegion, + Owner: testcommon.AsOwner(rg), + SyntheticMonitorId: &om.Name, + Tags: horribleTags, + Name: to.Ptr("mywebtest"), + Enabled: to.Ptr(true), + Frequency: to.Ptr(300), + Kind: &kind, + Locations: []insightswebtest20220615.WebTestGeolocation{ + { + Id: to.Ptr("us-ca-sjc-azr"), // This is US west... + }, + }, + Request: &insightswebtest20220615.WebTestProperties_Request{ + HttpVerb: to.Ptr("GET"), + RequestUrl: to.Ptr("https://github.com/Azure/azure-service-operator"), + }, + ValidationRules: &insightswebtest20220615.WebTestProperties_ValidationRules{ + ExpectedHttpStatusCode: to.Ptr(200), + SSLCheck: to.Ptr(true), + SSLCertRemainingLifetimeCheck: to.Ptr(7), + }, + }, + } + + tc.CreateResourceAndWait(webtest) + + expectedKind := insightswebtest20220615.WebTestProperties_Kind_STATUS_Standard + tc.Expect(webtest.Status.Location).To(Equal(tc.AzureRegion)) + tc.Expect(webtest.Status.Kind).To(Equal(&expectedKind)) + tc.Expect(webtest.Status.Id).ToNot(BeNil()) + armId := *webtest.Status.Id + + // Perform a simple patch. + old := webtest.DeepCopy() + webtest.Spec.Enabled = to.Ptr(false) + tc.PatchResourceAndWait(old, webtest) + tc.Expect(webtest.Status.Enabled).To(Equal(to.Ptr(false))) + + tc.DeleteResourceAndWait(webtest) + + // Ensure that the resource was really deleted in Azure + exists, _, err := tc.AzureClient.CheckExistenceWithGetByID( + tc.Ctx, + armId, + string(insightswebtest20220615.APIVersion_Value)) + tc.Expect(err).ToNot(HaveOccurred()) + tc.Expect(exists).To(BeFalse()) +} + +func Insights_WebTest_20180501preview_CRUD(tc *testcommon.KubePerTestContext, rg *resources.ResourceGroup, component *insights.Component) { horribleHiddenLink := fmt.Sprintf("hidden-link:%s", to.Value(component.Status.Id)) horribleTags := map[string]string{ @@ -69,10 +141,10 @@ func Insights_WebTest_CRUD(tc *testcommon.KubePerTestContext, rg *resources.Reso // Create a webtest om := tc.MakeObjectMeta("webtest") - kind := insightswebtest.WebTestProperties_Kind_Standard - webtest := &insightswebtest.Webtest{ + kind := insightswebtest20180501preview.WebTestProperties_Kind_Standard + webtest := &insightswebtest20180501preview.Webtest{ ObjectMeta: om, - Spec: insightswebtest.Webtest_Spec{ + Spec: insightswebtest20180501preview.Webtest_Spec{ Location: tc.AzureRegion, Owner: testcommon.AsOwner(rg), SyntheticMonitorId: &om.Name, @@ -81,16 +153,16 @@ func Insights_WebTest_CRUD(tc *testcommon.KubePerTestContext, rg *resources.Reso Enabled: to.Ptr(true), Frequency: to.Ptr(300), Kind: &kind, - Locations: []insightswebtest.WebTestGeolocation{ + Locations: []insightswebtest20180501preview.WebTestGeolocation{ { Id: to.Ptr("us-ca-sjc-azr"), // This is US west... }, }, - Request: &insightswebtest.WebTestProperties_Request{ + Request: &insightswebtest20180501preview.WebTestProperties_Request{ HttpVerb: to.Ptr("GET"), RequestUrl: to.Ptr("https://github.com/Azure/azure-service-operator"), }, - ValidationRules: &insightswebtest.WebTestProperties_ValidationRules{ + ValidationRules: &insightswebtest20180501preview.WebTestProperties_ValidationRules{ ExpectedHttpStatusCode: to.Ptr(200), SSLCheck: to.Ptr(true), SSLCertRemainingLifetimeCheck: to.Ptr(7), @@ -100,7 +172,7 @@ func Insights_WebTest_CRUD(tc *testcommon.KubePerTestContext, rg *resources.Reso tc.CreateResourceAndWait(webtest) - expectedKind := insightswebtest.WebTestProperties_Kind_STATUS_Standard + expectedKind := insightswebtest20180501preview.WebTestProperties_Kind_STATUS_Standard tc.Expect(webtest.Status.Location).To(Equal(tc.AzureRegion)) tc.Expect(webtest.Status.Kind).To(Equal(&expectedKind)) tc.Expect(webtest.Status.Id).ToNot(BeNil()) @@ -118,7 +190,7 @@ func Insights_WebTest_CRUD(tc *testcommon.KubePerTestContext, rg *resources.Reso exists, _, err := tc.AzureClient.CheckExistenceWithGetByID( tc.Ctx, armId, - string(insightswebtest.APIVersion_Value)) + string(insightswebtest20180501preview.APIVersion_Value)) tc.Expect(err).ToNot(HaveOccurred()) tc.Expect(exists).To(BeFalse()) } diff --git a/v2/internal/controllers/recordings/Test_Insights_Component_CRUD.yaml b/v2/internal/controllers/recordings/Test_Insights_Component_CRUD.yaml index 469728488b3..73140f9a52a 100644 --- a/v2/internal/controllers/recordings/Test_Insights_Component_CRUD.yaml +++ b/v2/internal/controllers/recordings/Test_Insights_Component_CRUD.yaml @@ -1,817 +1,1255 @@ --- -version: 1 +version: 2 interactions: -- request: - body: '{"location":"westus2","name":"asotest-rg-ekyqyo","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "93" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo?api-version=2020-06-01 - method: PUT - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo","name":"asotest-rg-ekyqyo","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo?api-version=2020-06-01 - method: GET - response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo","name":"asotest-rg-ekyqyo","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"kind":"web","location":"westus2","name":"asotest-component-gnjpja","properties":{"Application_Type":"other"}}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "111" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/components/asotest-component-gnjpja?api-version=2020-02-02 - method: PUT - response: - body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\",\r\n - \ \"name\": \"asotest-component-gnjpja\",\r\n \"type\": \"microsoft.insights/components\",\r\n - \ \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"kind\": \"web\",\r\n - \ \"etag\": \"\\\"0300d1c2-0000-0600-0000-62f6e01b0000\\\"\",\r\n \"properties\": - {\r\n \"ApplicationId\": \"asotest-component-gnjpja\",\r\n \"AppId\": - \"d720022c-4d7e-41fa-a607-61e51da1d8a2\",\r\n \"Application_Type\": \"other\",\r\n - \ \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": - \"4553a2f0-64cd-4f61-a278-3e5398f4df45\",\r\n \"ConnectionString\": \"InstrumentationKey=4553a2f0-64cd-4f61-a278-3e5398f4df45;IngestionEndpoint=https://westus2-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/\",\r\n - \ \"Name\": \"asotest-component-gnjpja\",\r\n \"CreationDate\": \"2022-08-12T19:27:22.3301023+00:00\",\r\n - \ \"TenantId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"provisioningState\": - \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": - 60,\r\n \"Retention\": \"P60D\",\r\n \"IngestionMode\": \"ApplicationInsights\",\r\n - \ \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"Ver\": \"v2\"\r\n }\r\n}" - headers: - Access-Control-Expose-Headers: - - Request-Context - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Request-Context: - - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed - Server: - - Microsoft-IIS/10.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Powered-By: - - ASP.NET - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/components/asotest-component-gnjpja?api-version=2020-02-02 - method: GET - response: - body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\",\r\n - \ \"name\": \"asotest-component-gnjpja\",\r\n \"type\": \"microsoft.insights/components\",\r\n - \ \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"kind\": \"web\",\r\n - \ \"etag\": \"\\\"0300d1c2-0000-0600-0000-62f6e01b0000\\\"\",\r\n \"properties\": - {\r\n \"ApplicationId\": \"asotest-component-gnjpja\",\r\n \"AppId\": - \"d720022c-4d7e-41fa-a607-61e51da1d8a2\",\r\n \"Application_Type\": \"other\",\r\n - \ \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": - \"4553a2f0-64cd-4f61-a278-3e5398f4df45\",\r\n \"ConnectionString\": \"InstrumentationKey=4553a2f0-64cd-4f61-a278-3e5398f4df45;IngestionEndpoint=https://westus2-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/\",\r\n - \ \"Name\": \"asotest-component-gnjpja\",\r\n \"CreationDate\": \"2022-08-12T19:27:22.3301023+00:00\",\r\n - \ \"TenantId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"provisioningState\": - \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": - 60,\r\n \"Retention\": \"P60D\",\r\n \"IngestionMode\": \"ApplicationInsights\",\r\n - \ \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"Ver\": \"v2\"\r\n }\r\n}" - headers: - Access-Control-Expose-Headers: - - Request-Context - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Request-Context: - - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed - Server: - - Microsoft-IIS/10.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Powered-By: - - ASP.NET - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"kind":"web","location":"westus2","name":"asotest-component-gnjpja","properties":{"Application_Type":"other","RetentionInDays":60}}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "132" - Content-Type: - - application/json - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/components/asotest-component-gnjpja?api-version=2020-02-02 - method: PUT - response: - body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\",\r\n - \ \"name\": \"asotest-component-gnjpja\",\r\n \"type\": \"microsoft.insights/components\",\r\n - \ \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"kind\": \"web\",\r\n - \ \"etag\": \"\\\"03000dc3-0000-0600-0000-62f6e0200000\\\"\",\r\n \"properties\": - {\r\n \"ApplicationId\": \"asotest-component-gnjpja\",\r\n \"AppId\": - \"d720022c-4d7e-41fa-a607-61e51da1d8a2\",\r\n \"Application_Type\": \"other\",\r\n - \ \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": - \"4553a2f0-64cd-4f61-a278-3e5398f4df45\",\r\n \"ConnectionString\": \"InstrumentationKey=4553a2f0-64cd-4f61-a278-3e5398f4df45;IngestionEndpoint=https://westus2-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/\",\r\n - \ \"Name\": \"asotest-component-gnjpja\",\r\n \"CreationDate\": \"2022-08-12T19:27:22.3301023+00:00\",\r\n - \ \"TenantId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"provisioningState\": - \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": - 60,\r\n \"Retention\": \"P60D\",\r\n \"IngestionMode\": \"ApplicationInsights\",\r\n - \ \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"Ver\": \"v2\"\r\n }\r\n}" - headers: - Access-Control-Expose-Headers: - - Request-Context - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Request-Context: - - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed - Server: - - Microsoft-IIS/10.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Powered-By: - - ASP.NET - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/components/asotest-component-gnjpja?api-version=2020-02-02 - method: GET - response: - body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\",\r\n - \ \"name\": \"asotest-component-gnjpja\",\r\n \"type\": \"microsoft.insights/components\",\r\n - \ \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"kind\": \"web\",\r\n - \ \"etag\": \"\\\"03000dc3-0000-0600-0000-62f6e0200000\\\"\",\r\n \"properties\": - {\r\n \"ApplicationId\": \"asotest-component-gnjpja\",\r\n \"AppId\": - \"d720022c-4d7e-41fa-a607-61e51da1d8a2\",\r\n \"Application_Type\": \"other\",\r\n - \ \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": - \"4553a2f0-64cd-4f61-a278-3e5398f4df45\",\r\n \"ConnectionString\": \"InstrumentationKey=4553a2f0-64cd-4f61-a278-3e5398f4df45;IngestionEndpoint=https://westus2-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/\",\r\n - \ \"Name\": \"asotest-component-gnjpja\",\r\n \"CreationDate\": \"2022-08-12T19:27:22.3301023+00:00\",\r\n - \ \"TenantId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"provisioningState\": - \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": - 60,\r\n \"Retention\": \"P60D\",\r\n \"IngestionMode\": \"ApplicationInsights\",\r\n - \ \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"Ver\": \"v2\"\r\n }\r\n}" - headers: - Access-Control-Expose-Headers: - - Request-Context - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Request-Context: - - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed - Server: - - Microsoft-IIS/10.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Powered-By: - - ASP.NET - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"location":"westus2","name":"asotest-webtest-wckswv","properties":{"Enabled":true,"Frequency":300,"Kind":"standard","Locations":[{"Id":"us-ca-sjc-azr"}],"Name":"mywebtest","Request":{"HttpVerb":"GET","RequestUrl":"https://github.com/Azure/azure-service-operator"},"SyntheticMonitorId":"asotest-webtest-wckswv","ValidationRules":{"ExpectedHttpStatusCode":200,"SSLCertRemainingLifetimeCheck":7,"SSLCheck":true}},"tags":{"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja":"Resource"}}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "595" - Content-Type: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-wckswv?api-version=2018-05-01-preview - method: PUT - response: - body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-wckswv\",\r\n - \ \"name\": \"asotest-webtest-wckswv\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n - \ \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": - \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0300bbcf-0000-0600-0000-62f6e1420000\\\"\",\r\n - \ \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-wckswv\",\r\n - \ \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": - true,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n - \ \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": - \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": - {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n - \ \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": - null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": - null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": - 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": - null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": - 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" - headers: - Access-Control-Expose-Headers: - - Request-Context - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Request-Context: - - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed - Server: - - Microsoft-IIS/10.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Powered-By: - - ASP.NET - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-wckswv?api-version=2018-05-01-preview - method: GET - response: - body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-wckswv\",\r\n - \ \"name\": \"asotest-webtest-wckswv\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n - \ \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": - \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0300bbcf-0000-0600-0000-62f6e1420000\\\"\",\r\n - \ \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-wckswv\",\r\n - \ \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": - true,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n - \ \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": - \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": - {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n - \ \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": - null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": - null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": - 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": - null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": - 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" - headers: - Access-Control-Expose-Headers: - - Request-Context - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Request-Context: - - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed - Server: - - Microsoft-IIS/10.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Powered-By: - - ASP.NET - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"location":"westus2","name":"asotest-webtest-wckswv","properties":{"Enabled":false,"Frequency":300,"Kind":"standard","Locations":[{"Id":"us-ca-sjc-azr"}],"Name":"mywebtest","Request":{"HttpVerb":"GET","RequestUrl":"https://github.com/Azure/azure-service-operator"},"SyntheticMonitorId":"asotest-webtest-wckswv","ValidationRules":{"ExpectedHttpStatusCode":200,"SSLCertRemainingLifetimeCheck":7,"SSLCheck":true}},"tags":{"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja":"Resource"}}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "596" - Content-Type: - - application/json - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-wckswv?api-version=2018-05-01-preview - method: PUT - response: - body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-wckswv\",\r\n - \ \"name\": \"asotest-webtest-wckswv\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n - \ \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": - \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0300decf-0000-0600-0000-62f6e1460000\\\"\",\r\n - \ \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-wckswv\",\r\n - \ \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": - false,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n - \ \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": - \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": - {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n - \ \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": - null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": - null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": - 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": - null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": - 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" - headers: - Access-Control-Expose-Headers: - - Request-Context - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Request-Context: - - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed - Server: - - Microsoft-IIS/10.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Powered-By: - - ASP.NET - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-wckswv?api-version=2018-05-01-preview - method: GET - response: - body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-wckswv\",\r\n - \ \"name\": \"asotest-webtest-wckswv\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n - \ \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": - \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0300decf-0000-0600-0000-62f6e1460000\\\"\",\r\n - \ \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-wckswv\",\r\n - \ \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": - false,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n - \ \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": - \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": - {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n - \ \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": - null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": - null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": - 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": - null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": - 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" - headers: - Access-Control-Expose-Headers: - - Request-Context - Cache-Control: - - no-cache - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Request-Context: - - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed - Server: - - Microsoft-IIS/10.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Powered-By: - - ASP.NET - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-wckswv?api-version=2018-05-01-preview - method: DELETE - response: - body: "" - headers: - Access-Control-Expose-Headers: - - Request-Context - Cache-Control: - - no-cache - Content-Length: - - "0" - Expires: - - "-1" - Pragma: - - no-cache - Request-Context: - - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed - Server: - - Microsoft-IIS/10.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Powered-By: - - ASP.NET - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-wckswv?api-version=2018-05-01-preview - method: GET - response: - body: '{"error":{"code":"ResourceNotFound","message":"The Resource ''microsoft.insights/webtests/asotest-webtest-wckswv'' - under resource group ''asotest-rg-ekyqyo'' was not found. For more details please - go to https://aka.ms/ARMResourceNotFoundFix"}}' - headers: - Cache-Control: - - no-cache - Content-Length: - - "239" - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Ms-Failure-Cause: - - gateway - status: 404 Not Found - code: 404 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/components/asotest-component-gnjpja?api-version=2020-02-02 - method: DELETE - response: - body: "" - headers: - Access-Control-Expose-Headers: - - Request-Context - Cache-Control: - - no-cache - Content-Length: - - "0" - Expires: - - "-1" - Pragma: - - no-cache - Request-Context: - - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed - Server: - - Microsoft-IIS/10.0 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Powered-By: - - ASP.NET - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja?api-version=2020-02-02 - method: GET - response: - body: '{"error":{"code":"ResourceNotFound","message":"The Resource ''microsoft.insights/components/asotest-component-gnjpja'' - under resource group ''asotest-rg-ekyqyo'' was not found. For more details please - go to https://aka.ms/ARMResourceNotFoundFix"}}' - headers: - Cache-Control: - - no-cache - Content-Length: - - "243" - Content-Type: - - application/json; charset=utf-8 - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Ms-Failure-Cause: - - gateway - status: 404 Not Found - code: 404 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo?api-version=2020-06-01 - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Expires: - - "-1" - Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - Pragma: - - no-cache - Retry-After: - - "15" - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - method: GET - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Expires: - - "-1" - Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - Pragma: - - no-cache - Retry-After: - - "15" - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - method: GET - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Expires: - - "-1" - Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - Pragma: - - no-cache - Retry-After: - - "15" - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - method: GET - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Expires: - - "-1" - Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - Pragma: - - no-cache - Retry-After: - - "15" - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - method: GET - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Expires: - - "-1" - Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - Pragma: - - no-cache - Retry-After: - - "15" - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 - method: GET - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Expires: - - "-1" - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 93 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"westus2","name":"asotest-rg-ekyqyo","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "93" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + Test-Request-Hash: + - eff24c7a0408a16e1552e9df3bfd41963461801130ce0990cb5d6e541de1c0a3 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo?api-version=2020-06-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 276 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo","name":"asotest-rg-ekyqyo","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "276" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: FC3679F88A544A08B0E11A9C5BAC7DB1 Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:04:12Z' + status: 201 Created + code: 201 + duration: 3.779618875s + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo?api-version=2020-06-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 276 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo","name":"asotest-rg-ekyqyo","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "276" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 7FD65D6617494DCDB80A2F871A02A3DA Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:04:20Z' + status: 200 OK + code: 200 + duration: 58.664333ms + - id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 111 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"kind":"web","location":"westus2","name":"asotest-component-gnjpja","properties":{"Application_Type":"other"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "111" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + Test-Request-Hash: + - 14f219ae422ae038fc22737ac84e9f5790c44e06fc9ea34ad21c32035935b223 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/components/asotest-component-gnjpja?api-version=2020-02-02 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1279 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\",\r\n \"name\": \"asotest-component-gnjpja\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"0a05105b-0000-0800-0000-660f78480000\\\"\",\r\n \"properties\": {\r\n \"ApplicationId\": \"asotest-component-gnjpja\",\r\n \"AppId\": \"4b16b5a2-4e57-441a-98d8-631e4a34bde8\",\r\n \"Application_Type\": \"other\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"382c26ef-e6e7-4f36-b11c-9d40813ea8fb\",\r\n \"ConnectionString\": \"InstrumentationKey=382c26ef-e6e7-4f36-b11c-9d40813ea8fb;IngestionEndpoint=https://westus2-1.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/\",\r\n \"Name\": \"asotest-component-gnjpja\",\r\n \"CreationDate\": \"2024-04-05T04:04:24.7051549+00:00\",\r\n \"TenantId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": 90,\r\n \"IngestionMode\": \"ApplicationInsights\",\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": \"v2\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1279" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 15C9A95F0B574308B1BA43AC22305C3C Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:04:22Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 2.9752155s + - id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/components/asotest-component-gnjpja?api-version=2020-02-02 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1279 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\",\r\n \"name\": \"asotest-component-gnjpja\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"0a05105b-0000-0800-0000-660f78480000\\\"\",\r\n \"properties\": {\r\n \"ApplicationId\": \"asotest-component-gnjpja\",\r\n \"AppId\": \"4b16b5a2-4e57-441a-98d8-631e4a34bde8\",\r\n \"Application_Type\": \"other\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"382c26ef-e6e7-4f36-b11c-9d40813ea8fb\",\r\n \"ConnectionString\": \"InstrumentationKey=382c26ef-e6e7-4f36-b11c-9d40813ea8fb;IngestionEndpoint=https://westus2-1.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/\",\r\n \"Name\": \"asotest-component-gnjpja\",\r\n \"CreationDate\": \"2024-04-05T04:04:24.7051549+00:00\",\r\n \"TenantId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": 90,\r\n \"IngestionMode\": \"ApplicationInsights\",\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": \"v2\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1279" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 0A2B3FF376C84B6B80EC94B951EA4B3C Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:04:28Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 1.254741959s + - id: 4 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 132 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"kind":"web","location":"westus2","name":"asotest-component-gnjpja","properties":{"Application_Type":"other","RetentionInDays":60}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "132" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + Test-Request-Hash: + - 93e3b3cef044f2b8f2024ed0932e5bf93318815ad71052d2822e485538f45632 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/components/asotest-component-gnjpja?api-version=2020-02-02 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1305 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\",\r\n \"name\": \"asotest-component-gnjpja\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"0a051a61-0000-0800-0000-660f78500000\\\"\",\r\n \"properties\": {\r\n \"ApplicationId\": \"asotest-component-gnjpja\",\r\n \"AppId\": \"4b16b5a2-4e57-441a-98d8-631e4a34bde8\",\r\n \"Application_Type\": \"other\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"382c26ef-e6e7-4f36-b11c-9d40813ea8fb\",\r\n \"ConnectionString\": \"InstrumentationKey=382c26ef-e6e7-4f36-b11c-9d40813ea8fb;IngestionEndpoint=https://westus2-1.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/\",\r\n \"Name\": \"asotest-component-gnjpja\",\r\n \"CreationDate\": \"2024-04-05T04:04:24.7051549+00:00\",\r\n \"TenantId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": 60,\r\n \"Retention\": \"P60D\",\r\n \"IngestionMode\": \"ApplicationInsights\",\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": \"v2\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1305" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: E2631E4020364548BED181B91C11822C Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:04:31Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 5.538788s + - id: 5 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/components/asotest-component-gnjpja?api-version=2020-02-02 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1305 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\",\r\n \"name\": \"asotest-component-gnjpja\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"0a051a61-0000-0800-0000-660f78500000\\\"\",\r\n \"properties\": {\r\n \"ApplicationId\": \"asotest-component-gnjpja\",\r\n \"AppId\": \"4b16b5a2-4e57-441a-98d8-631e4a34bde8\",\r\n \"Application_Type\": \"other\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"382c26ef-e6e7-4f36-b11c-9d40813ea8fb\",\r\n \"ConnectionString\": \"InstrumentationKey=382c26ef-e6e7-4f36-b11c-9d40813ea8fb;IngestionEndpoint=https://westus2-1.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/\",\r\n \"Name\": \"asotest-component-gnjpja\",\r\n \"CreationDate\": \"2024-04-05T04:04:24.7051549+00:00\",\r\n \"TenantId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": 60,\r\n \"Retention\": \"P60D\",\r\n \"IngestionMode\": \"ApplicationInsights\",\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": \"v2\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1305" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 56846F3C94DD476F81EBCD30BCFF99F6 Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:04:42Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 1.312652958s + - id: 6 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 595 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"westus2","name":"asotest-webtest-nggggw","properties":{"Enabled":true,"Frequency":300,"Kind":"standard","Locations":[{"Id":"us-ca-sjc-azr"}],"Name":"mywebtest","Request":{"HttpVerb":"GET","RequestUrl":"https://github.com/Azure/azure-service-operator"},"SyntheticMonitorId":"asotest-webtest-nggggw","ValidationRules":{"ExpectedHttpStatusCode":200,"SSLCertRemainingLifetimeCheck":7,"SSLCheck":true}},"tags":{"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja":"Resource"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "595" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + Test-Request-Hash: + - c6199a2e7bedf3e9b70ee800dc4c39ca364a750f16eabdde5a828d87f6d766dc + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-nggggw?api-version=2022-06-15 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1384 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-nggggw\",\r\n \"name\": \"asotest-webtest-nggggw\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0a05f369-0000-0800-0000-660f78610000\\\"\",\r\n \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-nggggw\",\r\n \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": true,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1384" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 1D233649BC024DDD99312237E82B2C9C Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:04:47Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 3.281616292s + - id: 7 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 595 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"westus2","name":"asotest-webtest-esanjb","properties":{"Enabled":true,"Frequency":300,"Kind":"standard","Locations":[{"Id":"us-ca-sjc-azr"}],"Name":"mywebtest","Request":{"HttpVerb":"GET","RequestUrl":"https://github.com/Azure/azure-service-operator"},"SyntheticMonitorId":"asotest-webtest-esanjb","ValidationRules":{"ExpectedHttpStatusCode":200,"SSLCertRemainingLifetimeCheck":7,"SSLCheck":true}},"tags":{"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja":"Resource"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "595" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + Test-Request-Hash: + - 8ef24899592a8dcb904bf428c24b56532955bc91c6925337098460b6ab4d26d3 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-esanjb?api-version=2018-05-01-preview + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1384 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-esanjb\",\r\n \"name\": \"asotest-webtest-esanjb\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0a05546a-0000-0800-0000-660f78610000\\\"\",\r\n \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-esanjb\",\r\n \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": true,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1384" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: AC70DEFB2A054D10BF3132FA7070825D Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:04:47Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 3.572136375s + - id: 8 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-nggggw?api-version=2022-06-15 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1384 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-nggggw\",\r\n \"name\": \"asotest-webtest-nggggw\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0a05f369-0000-0800-0000-660f78610000\\\"\",\r\n \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-nggggw\",\r\n \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": true,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1384" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: B386BA409F4C4E82AC1FC163425EB7FB Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:04:53Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 1.221814375s + - id: 9 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-esanjb?api-version=2018-05-01-preview + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1384 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-esanjb\",\r\n \"name\": \"asotest-webtest-esanjb\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0a05546a-0000-0800-0000-660f78610000\\\"\",\r\n \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-esanjb\",\r\n \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": true,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1384" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 2F6EBEC0C18D4A568FE389E40C11599B Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:04:54Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 1.2209805s + - id: 10 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 596 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"westus2","name":"asotest-webtest-nggggw","properties":{"Enabled":false,"Frequency":300,"Kind":"standard","Locations":[{"Id":"us-ca-sjc-azr"}],"Name":"mywebtest","Request":{"HttpVerb":"GET","RequestUrl":"https://github.com/Azure/azure-service-operator"},"SyntheticMonitorId":"asotest-webtest-nggggw","ValidationRules":{"ExpectedHttpStatusCode":200,"SSLCertRemainingLifetimeCheck":7,"SSLCheck":true}},"tags":{"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja":"Resource"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "596" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + Test-Request-Hash: + - 5d65751119fe4d1ab438f6a8d9e1c8ec4dad396b25cc1adc0bff6a0039f14b60 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-nggggw?api-version=2022-06-15 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1385 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-nggggw\",\r\n \"name\": \"asotest-webtest-nggggw\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0a05ae75-0000-0800-0000-660f786e0000\\\"\",\r\n \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-nggggw\",\r\n \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": false,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1385" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 264C2374761841499FF6CE3F28AE769E Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:01Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 1.4815295s + - id: 11 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 596 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"westus2","name":"asotest-webtest-esanjb","properties":{"Enabled":false,"Frequency":300,"Kind":"standard","Locations":[{"Id":"us-ca-sjc-azr"}],"Name":"mywebtest","Request":{"HttpVerb":"GET","RequestUrl":"https://github.com/Azure/azure-service-operator"},"SyntheticMonitorId":"asotest-webtest-esanjb","ValidationRules":{"ExpectedHttpStatusCode":200,"SSLCertRemainingLifetimeCheck":7,"SSLCheck":true}},"tags":{"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja":"Resource"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "596" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + Test-Request-Hash: + - a0a0f5d855b6c65c30fc5713f916bda065063e84abff1d06a4cba150ec1082ad + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-esanjb?api-version=2018-05-01-preview + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1385 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-esanjb\",\r\n \"name\": \"asotest-webtest-esanjb\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0a05b475-0000-0800-0000-660f786f0000\\\"\",\r\n \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-esanjb\",\r\n \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": false,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1385" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 2457E24F0EE34685B7290F24B801A2D6 Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:01Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 1.91096675s + - id: 12 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-nggggw?api-version=2022-06-15 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1385 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-nggggw\",\r\n \"name\": \"asotest-webtest-nggggw\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0a05ae75-0000-0800-0000-660f786e0000\\\"\",\r\n \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-nggggw\",\r\n \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": false,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1385" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 301F4AE1B9BC4568905C8D5C490E8AD9 Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:04Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 1.323004375s + - id: 13 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-esanjb?api-version=2018-05-01-preview + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1385 + uncompressed: false + body: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-esanjb\",\r\n \"name\": \"asotest-webtest-esanjb\",\r\n \"type\": \"microsoft.insights/webtests\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja\": \"Resource\"\r\n },\r\n \"kind\": null,\r\n \"etag\": \"\\\"0a05b475-0000-0800-0000-660f786f0000\\\"\",\r\n \"properties\": {\r\n \"SyntheticMonitorId\": \"asotest-webtest-esanjb\",\r\n \"Name\": \"mywebtest\",\r\n \"Description\": null,\r\n \"Enabled\": false,\r\n \"Frequency\": 300,\r\n \"Timeout\": 30,\r\n \"Kind\": \"standard\",\r\n \"RetryEnabled\": null,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ],\r\n \"Configuration\": null,\r\n \"Request\": {\r\n \"RequestUrl\": \"https://github.com/Azure/azure-service-operator\",\r\n \"Headers\": null,\r\n \"HttpVerb\": \"GET\",\r\n \"RequestBody\": null,\r\n \"ParseDependentRequests\": null,\r\n \"FollowRedirects\": null\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": 200,\r\n \"IgnoreHttpStatusCode\": null,\r\n \"ContentValidation\": null,\r\n \"SSLCheck\": true,\r\n \"SSLCertRemainingLifetimeCheck\": 7\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "1385" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 76B7C756CAF94610988D106E41F34549 Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:05Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 1.263318208s + - id: 14 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-nggggw?api-version=2022-06-15 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 4DD5CCC9B41844DF9F6DFD4AFCB9EFE5 Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:11Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 2.6862995s + - id: 15 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/webtests/asotest-webtest-esanjb?api-version=2018-05-01-preview + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: ECE7EF622C1C492DB52E486E9127229B Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:11Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 3.172528125s + - id: 16 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-nggggw?api-version=2022-06-15 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 239 + uncompressed: false + body: '{"error":{"code":"ResourceNotFound","message":"The Resource ''microsoft.insights/webtests/asotest-webtest-nggggw'' under resource group ''asotest-rg-ekyqyo'' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "239" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: 93B0AA02234741279526D51E7C599CEE Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:21Z' + status: 404 Not Found + code: 404 + duration: 225.373833ms + - id: 17 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/webtests/asotest-webtest-esanjb?api-version=2018-05-01-preview + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 239 + uncompressed: false + body: '{"error":{"code":"ResourceNotFound","message":"The Resource ''microsoft.insights/webtests/asotest-webtest-esanjb'' under resource group ''asotest-rg-ekyqyo'' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "239" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: A635578F48F145D194BA93E9A635F3B9 Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:21Z' + status: 404 Not Found + code: 404 + duration: 256.717458ms + - id: 18 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/Microsoft.Insights/components/asotest-component-gnjpja?api-version=2020-02-02 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Access-Control-Expose-Headers: + - Request-Context + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 61E4FF04575B48759F9B6C8891059334 Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:21Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 6.45558725s + - id: 19 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo/providers/microsoft.insights/components/asotest-component-gnjpja?api-version=2020-02-02 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 243 + uncompressed: false + body: '{"error":{"code":"ResourceNotFound","message":"The Resource ''microsoft.insights/components/asotest-component-gnjpja'' under resource group ''asotest-rg-ekyqyo'' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "243" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + X-Msedge-Ref: + - 'Ref A: A3C7DE8EBA564BEDA03F5B09902CC32F Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:36Z' + status: 404 Not Found + code: 404 + duration: 242.699542ms + - id: 20 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-ekyqyo?api-version=2020-06-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638478867414712148&c=MIIHADCCBeigAwIBAgITHgPrWOVrMb7qufvgEAAAA-tY5TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMjAxMDQxMjQzWhcNMjUwMTI2MDQxMjQzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOil3F8MsZdl8FeicToFLcoRyDn0Zv76EQTwG1IZtUh-z6uwzGIgy23k7GrXNU1gKVyGJp8lO3encPC02rUQkI0lvN-NUJCoJAEnGZPYOLmA9NylSyr1Ik_Qaz1_UueFRAiyVJlo0Lz27ayfzTTSUd82wyh18q-LWdG49N7fSD_fM1rsfxbY7-Eo4Z5CjxDW3OWmAYKpS0tm17o2hEKrmjeNZJQsSqQxUL-1Be4vND7XzGhGI595ogShOZHOzCBueWR2-8fa5VrwlHqtU1AgvjFk3lYmZejl898JrGFMYH-QSC1iWyRweQ_m3289K-aPeRSWqRihXIG9oHEqouTO1xkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBTew4tn2tBCof44yM20soU6sfep6zAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGBANOAsl8fyImo8IXVQ_ybox-BzCeFiAddg9Ojd61exGTea02-HjvZzuL6GZ2k21c7rEjKSBHqk50RLm2yXrMcUGc1UO7MRchaKQm1WR7osgDiXAU0rDc9-H-i8I245Y_PbyKIBewiK7UQiCjda4b__7Amrw7q4oILOsxshnN_D1NBm2nSjm-dFiDeJ9jpG9X1jDJSBtOFUQ7Ala8ShJvWPMpbCR3gFHOGS9f13ebv6qXblaf7sHxE6T0OpuEZPL10Iu5yh42IOLo8wvp1euqb61U3JWoOmBXEB3mJ0owRfBHEjuAARDUzNVgq28F6FYqgACE3nKhqDKYDEQstlJK0&s=f56_tmXrXwydx4wCznFC3J4-ibuZtbVxNP_SG5Dmfm0WkCzZIeLxa90vUCvVdAGOOaC2mr_F3UjnF92suLzU__8tiGSLd8ZDGilUN-cow6Dh3OctxgrXnkZusEsjl2WAOctiwGivjOmyEPsePZ4U3osqi65WUBQOSA5Kp-HJOhk5KobmT3zMYU_C-otTECQGQmjD3iU_WLiRHI0Du4IdPAMPavfnzF10z4k9KahtuJPyYYMGvf0ZlZNd34sNmct4rAIksoML2Z3m1Hg9uAO8AztmmYROMzRl0Q2-GgMMQxWUIjd8hPyH0NUvd2B7zUPRyrMXM-U0oRoWQe3piHp37g&h=x6fBxvWosA5h6QlEgg9lGZw22BtuqJOHMStRvjdOAus + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: EA3741D3521C4C09A9455D78B4610AC0 Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:05:37Z' + status: 202 Accepted + code: 202 + duration: 4.12777975s + - id: 21 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRFS1lRWU8tV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638478867414712148&c=MIIHADCCBeigAwIBAgITHgPrWOVrMb7qufvgEAAAA-tY5TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMjAxMDQxMjQzWhcNMjUwMTI2MDQxMjQzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOil3F8MsZdl8FeicToFLcoRyDn0Zv76EQTwG1IZtUh-z6uwzGIgy23k7GrXNU1gKVyGJp8lO3encPC02rUQkI0lvN-NUJCoJAEnGZPYOLmA9NylSyr1Ik_Qaz1_UueFRAiyVJlo0Lz27ayfzTTSUd82wyh18q-LWdG49N7fSD_fM1rsfxbY7-Eo4Z5CjxDW3OWmAYKpS0tm17o2hEKrmjeNZJQsSqQxUL-1Be4vND7XzGhGI595ogShOZHOzCBueWR2-8fa5VrwlHqtU1AgvjFk3lYmZejl898JrGFMYH-QSC1iWyRweQ_m3289K-aPeRSWqRihXIG9oHEqouTO1xkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBTew4tn2tBCof44yM20soU6sfep6zAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGBANOAsl8fyImo8IXVQ_ybox-BzCeFiAddg9Ojd61exGTea02-HjvZzuL6GZ2k21c7rEjKSBHqk50RLm2yXrMcUGc1UO7MRchaKQm1WR7osgDiXAU0rDc9-H-i8I245Y_PbyKIBewiK7UQiCjda4b__7Amrw7q4oILOsxshnN_D1NBm2nSjm-dFiDeJ9jpG9X1jDJSBtOFUQ7Ala8ShJvWPMpbCR3gFHOGS9f13ebv6qXblaf7sHxE6T0OpuEZPL10Iu5yh42IOLo8wvp1euqb61U3JWoOmBXEB3mJ0owRfBHEjuAARDUzNVgq28F6FYqgACE3nKhqDKYDEQstlJK0&s=f56_tmXrXwydx4wCznFC3J4-ibuZtbVxNP_SG5Dmfm0WkCzZIeLxa90vUCvVdAGOOaC2mr_F3UjnF92suLzU__8tiGSLd8ZDGilUN-cow6Dh3OctxgrXnkZusEsjl2WAOctiwGivjOmyEPsePZ4U3osqi65WUBQOSA5Kp-HJOhk5KobmT3zMYU_C-otTECQGQmjD3iU_WLiRHI0Du4IdPAMPavfnzF10z4k9KahtuJPyYYMGvf0ZlZNd34sNmct4rAIksoML2Z3m1Hg9uAO8AztmmYROMzRl0Q2-GgMMQxWUIjd8hPyH0NUvd2B7zUPRyrMXM-U0oRoWQe3piHp37g&h=x6fBxvWosA5h6QlEgg9lGZw22BtuqJOHMStRvjdOAus + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Msedge-Ref: + - 'Ref A: 927AE054A5E64F6896A49F3A582CAF34 Ref B: SYD03EDGE1320 Ref C: 2024-04-05T04:06:00Z' + status: 200 OK + code: 200 + duration: 776.855875ms diff --git a/v2/samples/insights/v1api/v1api20220615_webtest.yaml b/v2/samples/insights/v1api/v1api20220615_webtest.yaml new file mode 100644 index 00000000000..106fe474452 --- /dev/null +++ b/v2/samples/insights/v1api/v1api20220615_webtest.yaml @@ -0,0 +1,25 @@ +apiVersion: insights.azure.com/v1api20220615 +kind: Webtest +metadata: + name: samplewebtest + namespace: default +spec: + tags: + "hidden-link:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aso-sample-rg/providers/microsoft.insights/components/sampleappinsights": Resource + location: westcentralus + owner: + name: aso-sample-rg + Name: samplewebtest + SyntheticMonitorId: samplewebtest + Enabled: true + Frequency: 300 + Kind: standard + Locations: + - Id: us-ca-sjc-azr # This is west us + Request: + HttpVerb: GET + RequestUrl: https://my.request.url.com + ValidationRules: + ExpectedHttpStatusCode: 200 + SSLCheck: true + SSLCertRemainingLifetimeCheck: 7