From d80da3934f62d70bd9e0f163286b3ea973f6a562 Mon Sep 17 00:00:00 2001 From: AndreiBarbuOz Date: Fri, 20 Dec 2024 08:36:38 -0800 Subject: [PATCH 01/12] Bump monitor API version --- .golangci.yml | 1 + docs/hugo/content/reference/_index.md | 8 + .../hugo/content/reference/insights/_index.md | 8 + go.mod | 2 +- ...cheduled_query_rule_extension_types_gen.go | 8 +- .../scheduled_query_rule_types_gen.go | 286 +- .../scheduled_query_rule_types_gen_test.go | 35 +- .../storage/scheduled_query_rule_types_gen.go | 2350 +++++++- .../scheduled_query_rule_types_gen_test.go | 636 ++- .../v1api20220615/storage/structure.txt | 14 + .../storage/autoscale_setting_types_gen.go | 92 + .../autoscale_setting_types_gen_test.go | 43 + .../v1api20221001/storage/structure.txt | 1 + .../scheduled_query_rule_spec_types_gen.go | 286 + ...cheduled_query_rule_spec_types_gen_test.go | 728 +++ .../scheduled_query_rule_status_types_gen.go | 365 ++ ...eduled_query_rule_status_types_gen_test.go | 817 +++ .../insights/v1api20231201/arm/structure.txt | 162 + v2/api/insights/v1api20231201/doc.go | 10 + .../v1api20231201/groupversion_info_gen.go | 32 + .../scheduled_query_rule_types_gen.go | 4907 +++++++++++++++++ .../scheduled_query_rule_types_gen_test.go | 2417 ++++++++ .../storage/groupversion_info_gen.go | 32 + .../storage/scheduled_query_rule_types_gen.go | 453 ++ .../scheduled_query_rule_types_gen_test.go | 1454 +++++ .../v1api20231201/storage/structure.txt | 139 + .../storage/zz_generated.deepcopy.go | 1090 ++++ v2/api/insights/v1api20231201/structure.txt | 171 + .../v1api20231201/zz_generated.deepcopy.go | 948 ++++ v2/api/insights/versions_matrix.md | 406 +- v2/azure-arm.yaml | 13 + .../controllers/controller_resources_gen.go | 8 +- 32 files changed, 17267 insertions(+), 655 deletions(-) create mode 100644 v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen.go create mode 100644 v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen_test.go create mode 100644 v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen.go create mode 100644 v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen_test.go create mode 100644 v2/api/insights/v1api20231201/arm/structure.txt create mode 100644 v2/api/insights/v1api20231201/doc.go create mode 100644 v2/api/insights/v1api20231201/groupversion_info_gen.go create mode 100644 v2/api/insights/v1api20231201/scheduled_query_rule_types_gen.go create mode 100644 v2/api/insights/v1api20231201/scheduled_query_rule_types_gen_test.go create mode 100644 v2/api/insights/v1api20231201/storage/groupversion_info_gen.go create mode 100644 v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen.go create mode 100644 v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen_test.go create mode 100644 v2/api/insights/v1api20231201/storage/structure.txt create mode 100644 v2/api/insights/v1api20231201/storage/zz_generated.deepcopy.go create mode 100644 v2/api/insights/v1api20231201/structure.txt create mode 100644 v2/api/insights/v1api20231201/zz_generated.deepcopy.go diff --git a/.golangci.yml b/.golangci.yml index fac90694680..abf23165eec 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,6 +20,7 @@ linters: # The below rules are disabled due to bug with go1.18 and generics: https://github.com/golangci/golangci-lint/issues/2859 - stylecheck - musttag # Extremely slow, at least on CI machines + - recvcheck linters-settings: exhaustive: diff --git a/docs/hugo/content/reference/_index.md b/docs/hugo/content/reference/_index.md index 292916b217c..60cd032951d 100644 --- a/docs/hugo/content/reference/_index.md +++ b/docs/hugo/content/reference/_index.md @@ -416,6 +416,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 | +|--------------------|-------------|---------------|----------------|--------| +| ScheduledQueryRule | 2023-12-01 | v1api20231201 | v2.12.0 | - | + ### 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 ce1798d156b..1fa3541abfc 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 | +|--------------------|-------------|---------------|----------------|--------| +| ScheduledQueryRule | 2023-12-01 | v1api20231201 | v2.12.0 | - | + ### 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/go.mod b/go.mod index 427b8b9bf21..35c1f328163 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/Azure/azure-service-operator +module github.com/AndreiBarbuOz/azure-service-operator go 1.20 diff --git a/v2/api/insights/customizations/scheduled_query_rule_extension_types_gen.go b/v2/api/insights/customizations/scheduled_query_rule_extension_types_gen.go index b2c9e8fd7c8..f2e0c160de5 100644 --- a/v2/api/insights/customizations/scheduled_query_rule_extension_types_gen.go +++ b/v2/api/insights/customizations/scheduled_query_rule_extension_types_gen.go @@ -5,7 +5,9 @@ package customizations import ( v20220615 "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615" - storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" + v20231201 "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201" + v20231201s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -16,5 +18,7 @@ type ScheduledQueryRuleExtension struct { func (extension *ScheduledQueryRuleExtension) GetExtendedResources() []genruntime.KubernetesResource { return []genruntime.KubernetesResource{ &v20220615.ScheduledQueryRule{}, - &storage.ScheduledQueryRule{}} + &v20220615s.ScheduledQueryRule{}, + &v20231201.ScheduledQueryRule{}, + &v20231201s.ScheduledQueryRule{}} } diff --git a/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go b/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go index b069cebe921..4c96cfd7949 100644 --- a/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go +++ b/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go @@ -53,22 +53,36 @@ var _ conversion.Convertible = &ScheduledQueryRule{} // ConvertFrom populates our ScheduledQueryRule from the provided hub ScheduledQueryRule func (rule *ScheduledQueryRule) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*storage.ScheduledQueryRule) - if !ok { - return fmt.Errorf("expected insights/v1api20220615/storage/ScheduledQueryRule but received %T instead", hub) + // intermediate variable for conversion + var source storage.ScheduledQueryRule + + err := source.ConvertFrom(hub) + if err != nil { + return eris.Wrap(err, "converting from hub to source") + } + + err = rule.AssignProperties_From_ScheduledQueryRule(&source) + if err != nil { + return eris.Wrap(err, "converting from source to rule") } - return rule.AssignProperties_From_ScheduledQueryRule(source) + return nil } // ConvertTo populates the provided hub ScheduledQueryRule from our ScheduledQueryRule func (rule *ScheduledQueryRule) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*storage.ScheduledQueryRule) - if !ok { - return fmt.Errorf("expected insights/v1api20220615/storage/ScheduledQueryRule but received %T instead", hub) + // intermediate variable for conversion + var destination storage.ScheduledQueryRule + err := rule.AssignProperties_To_ScheduledQueryRule(&destination) + if err != nil { + return eris.Wrap(err, "converting to destination from rule") + } + err = destination.ConvertTo(hub) + if err != nil { + return eris.Wrap(err, "converting from destination to hub") } - return rule.AssignProperties_To_ScheduledQueryRule(destination) + return nil } // +kubebuilder:webhook:path=/mutate-insights-azure-com-v1api20220615-scheduledqueryrule,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=scheduledqueryrules,verbs=create;update,versions=v1api20220615,name=default.v1api20220615.scheduledqueryrules.insights.azure.com,admissionReviewVersions=v1 @@ -114,17 +128,6 @@ func (rule *ScheduledQueryRule) SecretDestinationExpressions() []*core.Destinati return rule.Spec.OperatorSpec.SecretExpressions } -var _ genruntime.ImportableResource = &ScheduledQueryRule{} - -// InitializeSpec initializes the spec for this resource from the given status -func (rule *ScheduledQueryRule) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*ScheduledQueryRule_STATUS); ok { - return rule.Spec.Initialize_From_ScheduledQueryRule_STATUS(s) - } - - return fmt.Errorf("expected Status of type ScheduledQueryRule_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &ScheduledQueryRule{} // AzureName returns the Azure name of the resource @@ -1124,112 +1127,6 @@ func (rule *ScheduledQueryRule_Spec) AssignProperties_To_ScheduledQueryRule_Spec return nil } -// Initialize_From_ScheduledQueryRule_STATUS populates our ScheduledQueryRule_Spec from the provided source ScheduledQueryRule_STATUS -func (rule *ScheduledQueryRule_Spec) Initialize_From_ScheduledQueryRule_STATUS(source *ScheduledQueryRule_STATUS) error { - - // Actions - if source.Actions != nil { - var action Actions - err := action.Initialize_From_Actions_STATUS(source.Actions) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_Actions_STATUS() to populate field Actions") - } - rule.Actions = &action - } else { - rule.Actions = nil - } - - // AutoMitigate - if source.AutoMitigate != nil { - autoMitigate := *source.AutoMitigate - rule.AutoMitigate = &autoMitigate - } else { - rule.AutoMitigate = nil - } - - // CheckWorkspaceAlertsStorageConfigured - if source.CheckWorkspaceAlertsStorageConfigured != nil { - checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured - rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured - } else { - rule.CheckWorkspaceAlertsStorageConfigured = nil - } - - // Criteria - if source.Criteria != nil { - var criterion ScheduledQueryRuleCriteria - err := criterion.Initialize_From_ScheduledQueryRuleCriteria_STATUS(source.Criteria) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") - } - rule.Criteria = &criterion - } else { - rule.Criteria = nil - } - - // Description - rule.Description = genruntime.ClonePointerToString(source.Description) - - // DisplayName - rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - rule.Enabled = &enabled - } else { - rule.Enabled = nil - } - - // EvaluationFrequency - rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) - - // Kind - if source.Kind != nil { - kind := genruntime.ToEnum(string(*source.Kind), scheduledQueryRule_Kind_Spec_Values) - rule.Kind = &kind - } else { - rule.Kind = nil - } - - // Location - rule.Location = genruntime.ClonePointerToString(source.Location) - - // MuteActionsDuration - rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) - - // OverrideQueryTimeRange - rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) - - // Severity - if source.Severity != nil { - severity := ScheduledQueryRuleProperties_Severity(*source.Severity) - rule.Severity = &severity - } else { - rule.Severity = nil - } - - // SkipQueryValidation - if source.SkipQueryValidation != nil { - skipQueryValidation := *source.SkipQueryValidation - rule.SkipQueryValidation = &skipQueryValidation - } else { - rule.SkipQueryValidation = nil - } - - // Tags - rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) - - // TargetResourceTypes - rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) - - // WindowSize - rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (rule *ScheduledQueryRule_Spec) OriginalVersion() string { return GroupVersion.Version @@ -2074,16 +1971,6 @@ func (actions *Actions) AssignProperties_To_Actions(destination *storage.Actions return nil } -// Initialize_From_Actions_STATUS populates our Actions from the provided source Actions_STATUS -func (actions *Actions) Initialize_From_Actions_STATUS(source *Actions_STATUS) error { - - // CustomProperties - actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) - - // No error - return nil -} - // Actions to invoke when the alert fires. type Actions_STATUS struct { // ActionGroups: Action Group resource Ids to invoke when the alert fires. @@ -2297,31 +2184,6 @@ func (criteria *ScheduledQueryRuleCriteria) AssignProperties_To_ScheduledQueryRu return nil } -// Initialize_From_ScheduledQueryRuleCriteria_STATUS populates our ScheduledQueryRuleCriteria from the provided source ScheduledQueryRuleCriteria_STATUS -func (criteria *ScheduledQueryRuleCriteria) Initialize_From_ScheduledQueryRuleCriteria_STATUS(source *ScheduledQueryRuleCriteria_STATUS) error { - - // AllOf - if source.AllOf != nil { - allOfList := make([]Condition, len(source.AllOf)) - for allOfIndex, allOfItem := range source.AllOf { - // Shadow the loop variable to avoid aliasing - allOfItem := allOfItem - var allOf Condition - err := allOf.Initialize_From_Condition_STATUS(&allOfItem) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_Condition_STATUS() to populate field AllOf") - } - allOfList[allOfIndex] = allOf - } - criteria.AllOf = allOfList - } else { - criteria.AllOf = nil - } - - // No error - return nil -} - // The rule criteria that defines the conditions of the scheduled query rule. type ScheduledQueryRuleCriteria_STATUS struct { // AllOf: A list of conditions to evaluate against the specified scopes @@ -3059,76 +2921,6 @@ func (condition *Condition) AssignProperties_To_Condition(destination *storage.C return nil } -// Initialize_From_Condition_STATUS populates our Condition from the provided source Condition_STATUS -func (condition *Condition) Initialize_From_Condition_STATUS(source *Condition_STATUS) error { - - // Dimensions - if source.Dimensions != nil { - dimensionList := make([]Dimension, len(source.Dimensions)) - for dimensionIndex, dimensionItem := range source.Dimensions { - // Shadow the loop variable to avoid aliasing - dimensionItem := dimensionItem - var dimension Dimension - err := dimension.Initialize_From_Dimension_STATUS(&dimensionItem) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_Dimension_STATUS() to populate field Dimensions") - } - dimensionList[dimensionIndex] = dimension - } - condition.Dimensions = dimensionList - } else { - condition.Dimensions = nil - } - - // FailingPeriods - if source.FailingPeriods != nil { - var failingPeriod Condition_FailingPeriods - err := failingPeriod.Initialize_From_Condition_FailingPeriods_STATUS(source.FailingPeriods) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") - } - condition.FailingPeriods = &failingPeriod - } else { - condition.FailingPeriods = nil - } - - // MetricMeasureColumn - condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) - - // MetricName - condition.MetricName = genruntime.ClonePointerToString(source.MetricName) - - // Operator - if source.Operator != nil { - operator := genruntime.ToEnum(string(*source.Operator), condition_Operator_Values) - condition.Operator = &operator - } else { - condition.Operator = nil - } - - // Query - condition.Query = genruntime.ClonePointerToString(source.Query) - - // Threshold - if source.Threshold != nil { - threshold := *source.Threshold - condition.Threshold = &threshold - } else { - condition.Threshold = nil - } - - // TimeAggregation - if source.TimeAggregation != nil { - timeAggregation := genruntime.ToEnum(string(*source.TimeAggregation), condition_TimeAggregation_Values) - condition.TimeAggregation = &timeAggregation - } else { - condition.TimeAggregation = nil - } - - // No error - return nil -} - // A condition of the scheduled query rule. type Condition_STATUS struct { // Dimensions: List of Dimensions conditions @@ -3534,19 +3326,6 @@ func (periods *Condition_FailingPeriods) AssignProperties_To_Condition_FailingPe return nil } -// Initialize_From_Condition_FailingPeriods_STATUS populates our Condition_FailingPeriods from the provided source Condition_FailingPeriods_STATUS -func (periods *Condition_FailingPeriods) Initialize_From_Condition_FailingPeriods_STATUS(source *Condition_FailingPeriods_STATUS) error { - - // MinFailingPeriodsToAlert - periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) - - // NumberOfEvaluationPeriods - periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) - - // No error - return nil -} - type Condition_FailingPeriods_STATUS struct { // MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to // numberOfEvaluationPeriods. Default value is 1 @@ -3832,27 +3611,6 @@ func (dimension *Dimension) AssignProperties_To_Dimension(destination *storage.D return nil } -// Initialize_From_Dimension_STATUS populates our Dimension from the provided source Dimension_STATUS -func (dimension *Dimension) Initialize_From_Dimension_STATUS(source *Dimension_STATUS) error { - - // Name - dimension.Name = genruntime.ClonePointerToString(source.Name) - - // Operator - if source.Operator != nil { - operator := genruntime.ToEnum(string(*source.Operator), dimension_Operator_Values) - dimension.Operator = &operator - } else { - dimension.Operator = nil - } - - // Values - dimension.Values = genruntime.CloneSliceOfString(source.Values) - - // No error - return nil -} - // Dimension splitting and filtering definition type Dimension_STATUS struct { // Name: Name of the dimension diff --git a/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen_test.go b/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen_test.go index d6e8db8dbaf..c57595f5480 100644 --- a/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen_test.go +++ b/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen_test.go @@ -5,7 +5,8 @@ package v1api20220615 import ( "encoding/json" - storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" + v20231201s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -35,7 +36,7 @@ func RunPropertyAssignmentTestForActions(subject Actions) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Actions + var other v20220615s.Actions err := copied.AssignProperties_To_Actions(&other) if err != nil { return err.Error() @@ -139,7 +140,7 @@ func RunPropertyAssignmentTestForActions_STATUS(subject Actions_STATUS) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Actions_STATUS + var other v20220615s.Actions_STATUS err := copied.AssignProperties_To_Actions_STATUS(&other) if err != nil { return err.Error() @@ -244,7 +245,7 @@ func RunPropertyAssignmentTestForCondition(subject Condition) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Condition + var other v20220615s.Condition err := copied.AssignProperties_To_Condition(&other) if err != nil { return err.Error() @@ -376,7 +377,7 @@ func RunPropertyAssignmentTestForCondition_FailingPeriods(subject Condition_Fail copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Condition_FailingPeriods + var other v20220615s.Condition_FailingPeriods err := copied.AssignProperties_To_Condition_FailingPeriods(&other) if err != nil { return err.Error() @@ -480,7 +481,7 @@ func RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS(subject Conditi copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Condition_FailingPeriods_STATUS + var other v20220615s.Condition_FailingPeriods_STATUS err := copied.AssignProperties_To_Condition_FailingPeriods_STATUS(&other) if err != nil { return err.Error() @@ -584,7 +585,7 @@ func RunPropertyAssignmentTestForCondition_STATUS(subject Condition_STATUS) stri copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Condition_STATUS + var other v20220615s.Condition_STATUS err := copied.AssignProperties_To_Condition_STATUS(&other) if err != nil { return err.Error() @@ -717,7 +718,7 @@ func RunPropertyAssignmentTestForDimension(subject Dimension) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Dimension + var other v20220615s.Dimension err := copied.AssignProperties_To_Dimension(&other) if err != nil { return err.Error() @@ -821,7 +822,7 @@ func RunPropertyAssignmentTestForDimension_STATUS(subject Dimension_STATUS) stri copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Dimension_STATUS + var other v20220615s.Dimension_STATUS err := copied.AssignProperties_To_Dimension_STATUS(&other) if err != nil { return err.Error() @@ -926,7 +927,7 @@ func RunResourceConversionTestForScheduledQueryRule(subject ScheduledQueryRule) copied := subject.DeepCopy() // Convert to our hub version - var hub storage.ScheduledQueryRule + var hub v20231201s.ScheduledQueryRule err := copied.ConvertTo(&hub) if err != nil { return err.Error() @@ -968,7 +969,7 @@ func RunPropertyAssignmentTestForScheduledQueryRule(subject ScheduledQueryRule) copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRule + var other v20220615s.ScheduledQueryRule err := copied.AssignProperties_To_ScheduledQueryRule(&other) if err != nil { return err.Error() @@ -1071,7 +1072,7 @@ func RunPropertyAssignmentTestForScheduledQueryRuleCriteria(subject ScheduledQue copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRuleCriteria + var other v20220615s.ScheduledQueryRuleCriteria err := copied.AssignProperties_To_ScheduledQueryRuleCriteria(&other) if err != nil { return err.Error() @@ -1174,7 +1175,7 @@ func RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS(subject Sched copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRuleCriteria_STATUS + var other v20220615s.ScheduledQueryRuleCriteria_STATUS err := copied.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&other) if err != nil { return err.Error() @@ -1277,7 +1278,7 @@ func RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec(subject Schedule copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRuleOperatorSpec + var other v20220615s.ScheduledQueryRuleOperatorSpec err := copied.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&other) if err != nil { return err.Error() @@ -1374,7 +1375,7 @@ func RunPropertyAssignmentTestForScheduledQueryRule_STATUS(subject ScheduledQuer copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRule_STATUS + var other v20220615s.ScheduledQueryRule_STATUS err := copied.AssignProperties_To_ScheduledQueryRule_STATUS(&other) if err != nil { return err.Error() @@ -1522,7 +1523,7 @@ func RunPropertyAssignmentTestForScheduledQueryRule_Spec(subject ScheduledQueryR copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRule_Spec + var other v20220615s.ScheduledQueryRule_Spec err := copied.AssignProperties_To_ScheduledQueryRule_Spec(&other) if err != nil { return err.Error() @@ -1663,7 +1664,7 @@ func RunPropertyAssignmentTestForSystemData_STATUS(subject SystemData_STATUS) st copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.SystemData_STATUS + var other v20220615s.SystemData_STATUS err := copied.AssignProperties_To_SystemData_STATUS(&other) if err != nil { return err.Error() diff --git a/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen.go b/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen.go index 863c324e655..d2cf0735cdf 100644 --- a/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen.go +++ b/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen.go @@ -4,7 +4,9 @@ package storage import ( - storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" + "fmt" + v20221001s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" + v20231201s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" @@ -13,14 +15,11 @@ import ( "github.com/rotisserie/eris" 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=scheduledqueryrules,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=insights.azure.com,resources={scheduledqueryrules/status,scheduledqueryrules/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" @@ -48,6 +47,28 @@ func (rule *ScheduledQueryRule) SetConditions(conditions conditions.Conditions) rule.Status.Conditions = conditions } +var _ conversion.Convertible = &ScheduledQueryRule{} + +// ConvertFrom populates our ScheduledQueryRule from the provided hub ScheduledQueryRule +func (rule *ScheduledQueryRule) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20231201s.ScheduledQueryRule) + if !ok { + return fmt.Errorf("expected insights/v1api20231201/storage/ScheduledQueryRule but received %T instead", hub) + } + + return rule.AssignProperties_From_ScheduledQueryRule(source) +} + +// ConvertTo populates the provided hub ScheduledQueryRule from our ScheduledQueryRule +func (rule *ScheduledQueryRule) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20231201s.ScheduledQueryRule) + if !ok { + return fmt.Errorf("expected insights/v1api20231201/storage/ScheduledQueryRule but received %T instead", hub) + } + + return rule.AssignProperties_To_ScheduledQueryRule(destination) +} + var _ configmaps.Exporter = &ScheduledQueryRule{} // ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property @@ -143,8 +164,75 @@ func (rule *ScheduledQueryRule) SetStatus(status genruntime.ConvertibleStatus) e return nil } -// Hub marks that this ScheduledQueryRule is the hub type for conversion -func (rule *ScheduledQueryRule) Hub() {} +// AssignProperties_From_ScheduledQueryRule populates our ScheduledQueryRule from the provided source ScheduledQueryRule +func (rule *ScheduledQueryRule) AssignProperties_From_ScheduledQueryRule(source *v20231201s.ScheduledQueryRule) error { + + // ObjectMeta + rule.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec ScheduledQueryRule_Spec + err := spec.AssignProperties_From_ScheduledQueryRule_Spec(&source.Spec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRule_Spec() to populate field Spec") + } + rule.Spec = spec + + // Status + var status ScheduledQueryRule_STATUS + err = status.AssignProperties_From_ScheduledQueryRule_STATUS(&source.Status) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRule_STATUS() to populate field Status") + } + rule.Status = status + + // Invoke the augmentConversionForScheduledQueryRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRule populates the provided destination ScheduledQueryRule from our ScheduledQueryRule +func (rule *ScheduledQueryRule) AssignProperties_To_ScheduledQueryRule(destination *v20231201s.ScheduledQueryRule) error { + + // ObjectMeta + destination.ObjectMeta = *rule.ObjectMeta.DeepCopy() + + // Spec + var spec v20231201s.ScheduledQueryRule_Spec + err := rule.Spec.AssignProperties_To_ScheduledQueryRule_Spec(&spec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRule_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20231201s.ScheduledQueryRule_STATUS + err = rule.Status.AssignProperties_To_ScheduledQueryRule_STATUS(&status) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRule_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForScheduledQueryRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return eris.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 (rule *ScheduledQueryRule) OriginalGVK() *schema.GroupVersionKind { @@ -172,6 +260,11 @@ type APIVersion string const APIVersion_Value = APIVersion("2022-06-15") +type augmentConversionForScheduledQueryRule interface { + AssignPropertiesFrom(src *v20231201s.ScheduledQueryRule) error + AssignPropertiesTo(dst *v20231201s.ScheduledQueryRule) error +} + // Storage version of v1api20220615.ScheduledQueryRule_Spec type ScheduledQueryRule_Spec struct { Actions *Actions `json:"actions,omitempty"` @@ -211,158 +304,210 @@ var _ genruntime.ConvertibleSpec = &ScheduledQueryRule_Spec{} // ConvertSpecFrom populates our ScheduledQueryRule_Spec from the provided source func (rule *ScheduledQueryRule_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == rule { - return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + src, ok := source.(*v20231201s.ScheduledQueryRule_Spec) + if ok { + // Populate our instance from source + return rule.AssignProperties_From_ScheduledQueryRule_Spec(src) + } + + // Convert to an intermediate form + src = &v20231201s.ScheduledQueryRule_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertSpecFrom()") } - return source.ConvertSpecTo(rule) + // Update our instance from src + err = rule.AssignProperties_From_ScheduledQueryRule_Spec(src) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil } // ConvertSpecTo populates the provided destination from our ScheduledQueryRule_Spec func (rule *ScheduledQueryRule_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == rule { - return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + dst, ok := destination.(*v20231201s.ScheduledQueryRule_Spec) + if ok { + // Populate destination from our instance + return rule.AssignProperties_To_ScheduledQueryRule_Spec(dst) } - return destination.ConvertSpecFrom(rule) -} + // Convert to an intermediate form + dst = &v20231201s.ScheduledQueryRule_Spec{} + err := rule.AssignProperties_To_ScheduledQueryRule_Spec(dst) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } -// Storage version of v1api20220615.ScheduledQueryRule_STATUS -type ScheduledQueryRule_STATUS struct { - Actions *Actions_STATUS `json:"actions,omitempty"` - AutoMitigate *bool `json:"autoMitigate,omitempty"` - CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` - Conditions []conditions.Condition `json:"conditions,omitempty"` - CreatedWithApiVersion *string `json:"createdWithApiVersion,omitempty"` - Criteria *ScheduledQueryRuleCriteria_STATUS `json:"criteria,omitempty"` - Description *string `json:"description,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - Etag *string `json:"etag,omitempty"` - EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` - Id *string `json:"id,omitempty"` - IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty"` - IsWorkspaceAlertsStorageConfigured *bool `json:"isWorkspaceAlertsStorageConfigured,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` - Name *string `json:"name,omitempty"` - OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Scopes []string `json:"scopes,omitempty"` - Severity *int `json:"severity,omitempty"` - SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` - SystemData *SystemData_STATUS `json:"systemData,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` - Type *string `json:"type,omitempty"` - WindowSize *string `json:"windowSize,omitempty"` + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil } -var _ genruntime.ConvertibleStatus = &ScheduledQueryRule_STATUS{} +// AssignProperties_From_ScheduledQueryRule_Spec populates our ScheduledQueryRule_Spec from the provided source ScheduledQueryRule_Spec +func (rule *ScheduledQueryRule_Spec) AssignProperties_From_ScheduledQueryRule_Spec(source *v20231201s.ScheduledQueryRule_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) -// ConvertStatusFrom populates our ScheduledQueryRule_STATUS from the provided source -func (rule *ScheduledQueryRule_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == rule { - return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + // Actions + if source.Actions != nil { + var action Actions + err := action.AssignProperties_From_Actions(source.Actions) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Actions() to populate field Actions") + } + rule.Actions = &action + } else { + rule.Actions = nil } - return source.ConvertStatusTo(rule) -} + // AutoMitigate + if source.AutoMitigate != nil { + autoMitigate := *source.AutoMitigate + rule.AutoMitigate = &autoMitigate + } else { + rule.AutoMitigate = nil + } -// ConvertStatusTo populates the provided destination from our ScheduledQueryRule_STATUS -func (rule *ScheduledQueryRule_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == rule { - return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + // AzureName + rule.AzureName = source.AzureName + + // CheckWorkspaceAlertsStorageConfigured + if source.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured + rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + rule.CheckWorkspaceAlertsStorageConfigured = nil } - return destination.ConvertStatusFrom(rule) -} + // Criteria + if source.Criteria != nil { + var criterion ScheduledQueryRuleCriteria + err := criterion.AssignProperties_From_ScheduledQueryRuleCriteria(source.Criteria) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleCriteria() to populate field Criteria") + } + rule.Criteria = &criterion + } else { + rule.Criteria = nil + } -// Storage version of v1api20220615.Actions -// Actions to invoke when the alert fires. -type Actions struct { - ActionGroupsReferences []genruntime.ResourceReference `armReference:"ActionGroups" json:"actionGroupsReferences,omitempty"` - CustomProperties map[string]string `json:"customProperties,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} + // Description + rule.Description = genruntime.ClonePointerToString(source.Description) -// Storage version of v1api20220615.Actions_STATUS -// Actions to invoke when the alert fires. -type Actions_STATUS struct { - ActionGroups []string `json:"actionGroups,omitempty"` - CustomProperties map[string]string `json:"customProperties,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} + // DisplayName + rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) -// Storage version of v1api20220615.ScheduledQueryRuleCriteria -// The rule criteria that defines the conditions of the scheduled query rule. -type ScheduledQueryRuleCriteria struct { - AllOf []Condition `json:"allOf,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } -// Storage version of v1api20220615.ScheduledQueryRuleCriteria_STATUS -// The rule criteria that defines the conditions of the scheduled query rule. -type ScheduledQueryRuleCriteria_STATUS struct { - AllOf []Condition_STATUS `json:"allOf,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} + // EvaluationFrequency + rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) -// Storage version of v1api20220615.ScheduledQueryRuleOperatorSpec -// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure -type ScheduledQueryRuleOperatorSpec struct { - ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - SecretExpressions []*core.DestinationExpression `json:"secretExpressions,omitempty"` -} + // Identity + if source.Identity != nil { + propertyBag.Add("Identity", *source.Identity) + } else { + propertyBag.Remove("Identity") + } -// Storage version of v1api20220615.SystemData_STATUS -// Metadata pertaining to creation and last modification of the resource. -type SystemData_STATUS struct { - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - CreatedByType *string `json:"createdByType,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - LastModifiedByType *string `json:"lastModifiedByType,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} + // Kind + rule.Kind = genruntime.ClonePointerToString(source.Kind) -// AssignProperties_From_SystemData_STATUS populates our SystemData_STATUS from the provided source SystemData_STATUS -func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *storage.SystemData_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + // Location + rule.Location = genruntime.ClonePointerToString(source.Location) - // CreatedAt - data.CreatedAt = genruntime.ClonePointerToString(source.CreatedAt) + // MuteActionsDuration + rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) - // CreatedBy - data.CreatedBy = genruntime.ClonePointerToString(source.CreatedBy) + // OperatorSpec + if source.OperatorSpec != nil { + var operatorSpec ScheduledQueryRuleOperatorSpec + err := operatorSpec.AssignProperties_From_ScheduledQueryRuleOperatorSpec(source.OperatorSpec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleOperatorSpec() to populate field OperatorSpec") + } + rule.OperatorSpec = &operatorSpec + } else { + rule.OperatorSpec = nil + } - // CreatedByType - data.CreatedByType = genruntime.ClonePointerToString(source.CreatedByType) + // OriginalVersion + rule.OriginalVersion = source.OriginalVersion - // LastModifiedAt - data.LastModifiedAt = genruntime.ClonePointerToString(source.LastModifiedAt) + // OverrideQueryTimeRange + rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) - // LastModifiedBy - data.LastModifiedBy = genruntime.ClonePointerToString(source.LastModifiedBy) + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + rule.Owner = &owner + } else { + rule.Owner = nil + } - // LastModifiedByType - data.LastModifiedByType = genruntime.ClonePointerToString(source.LastModifiedByType) + // ResolveConfiguration + if source.ResolveConfiguration != nil { + propertyBag.Add("ResolveConfiguration", *source.ResolveConfiguration) + } else { + propertyBag.Remove("ResolveConfiguration") + } + + // ScopesReferences + if source.ScopesReferences != nil { + scopesReferenceList := make([]genruntime.ResourceReference, len(source.ScopesReferences)) + for scopesReferenceIndex, scopesReferenceItem := range source.ScopesReferences { + // Shadow the loop variable to avoid aliasing + scopesReferenceItem := scopesReferenceItem + scopesReferenceList[scopesReferenceIndex] = scopesReferenceItem.Copy() + } + rule.ScopesReferences = scopesReferenceList + } else { + rule.ScopesReferences = nil + } + + // Severity + rule.Severity = genruntime.ClonePointerToInt(source.Severity) + + // SkipQueryValidation + if source.SkipQueryValidation != nil { + skipQueryValidation := *source.SkipQueryValidation + rule.SkipQueryValidation = &skipQueryValidation + } else { + rule.SkipQueryValidation = nil + } + + // Tags + rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // TargetResourceTypes + rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) + + // WindowSize + rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) // Update the property bag if len(propertyBag) > 0 { - data.PropertyBag = propertyBag + rule.PropertyBag = propertyBag } else { - data.PropertyBag = nil + rule.PropertyBag = nil } - // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion - var dataAsAny any = data - if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { - err := augmentedData.AssignPropertiesFrom(source) + // Invoke the augmentConversionForScheduledQueryRule_Spec interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_Spec); ok { + err := augmentedRule.AssignPropertiesFrom(source) if err != nil { return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") } @@ -372,70 +517,1485 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *s return nil } -// AssignProperties_To_SystemData_STATUS populates the provided destination SystemData_STATUS from our SystemData_STATUS -func (data *SystemData_STATUS) AssignProperties_To_SystemData_STATUS(destination *storage.SystemData_STATUS) error { +// AssignProperties_To_ScheduledQueryRule_Spec populates the provided destination ScheduledQueryRule_Spec from our ScheduledQueryRule_Spec +func (rule *ScheduledQueryRule_Spec) AssignProperties_To_ScheduledQueryRule_Spec(destination *v20231201s.ScheduledQueryRule_Spec) error { // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(data.PropertyBag) + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) - // CreatedAt - destination.CreatedAt = genruntime.ClonePointerToString(data.CreatedAt) + // Actions + if rule.Actions != nil { + var action v20231201s.Actions + err := rule.Actions.AssignProperties_To_Actions(&action) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Actions() to populate field Actions") + } + destination.Actions = &action + } else { + destination.Actions = nil + } - // CreatedBy - destination.CreatedBy = genruntime.ClonePointerToString(data.CreatedBy) + // AutoMitigate + if rule.AutoMitigate != nil { + autoMitigate := *rule.AutoMitigate + destination.AutoMitigate = &autoMitigate + } else { + destination.AutoMitigate = nil + } - // CreatedByType - destination.CreatedByType = genruntime.ClonePointerToString(data.CreatedByType) + // AzureName + destination.AzureName = rule.AzureName - // LastModifiedAt - destination.LastModifiedAt = genruntime.ClonePointerToString(data.LastModifiedAt) + // CheckWorkspaceAlertsStorageConfigured + if rule.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *rule.CheckWorkspaceAlertsStorageConfigured + destination.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + destination.CheckWorkspaceAlertsStorageConfigured = nil + } - // LastModifiedBy - destination.LastModifiedBy = genruntime.ClonePointerToString(data.LastModifiedBy) + // Criteria + if rule.Criteria != nil { + var criterion v20231201s.ScheduledQueryRuleCriteria + err := rule.Criteria.AssignProperties_To_ScheduledQueryRuleCriteria(&criterion) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleCriteria() to populate field Criteria") + } + destination.Criteria = &criterion + } else { + destination.Criteria = nil + } - // LastModifiedByType - destination.LastModifiedByType = genruntime.ClonePointerToString(data.LastModifiedByType) + // Description + destination.Description = genruntime.ClonePointerToString(rule.Description) - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag + // DisplayName + destination.DisplayName = genruntime.ClonePointerToString(rule.DisplayName) + + // Enabled + if rule.Enabled != nil { + enabled := *rule.Enabled + destination.Enabled = &enabled } else { - destination.PropertyBag = nil + destination.Enabled = nil } - // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion - var dataAsAny any = data - if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { - err := augmentedData.AssignPropertiesTo(destination) + // EvaluationFrequency + destination.EvaluationFrequency = genruntime.ClonePointerToString(rule.EvaluationFrequency) + + // Identity + if propertyBag.Contains("Identity") { + var identity v20231201s.Identity + err := propertyBag.Pull("Identity", &identity) if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + return eris.Wrap(err, "pulling 'Identity' from propertyBag") } + + destination.Identity = &identity + } else { + destination.Identity = nil } - // No error - return nil -} + // Kind + destination.Kind = genruntime.ClonePointerToString(rule.Kind) -type augmentConversionForSystemData_STATUS interface { - AssignPropertiesFrom(src *storage.SystemData_STATUS) error - AssignPropertiesTo(dst *storage.SystemData_STATUS) error -} + // Location + destination.Location = genruntime.ClonePointerToString(rule.Location) -// Storage version of v1api20220615.Condition -// A condition of the scheduled query rule. -type Condition struct { - Dimensions []Dimension `json:"dimensions,omitempty"` - FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` - MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` - MetricName *string `json:"metricName,omitempty"` - Operator *string `json:"operator,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Query *string `json:"query,omitempty"` + // MuteActionsDuration + destination.MuteActionsDuration = genruntime.ClonePointerToString(rule.MuteActionsDuration) - // ResourceIdColumnReference: The column containing the resource id. The content of the column must be a uri formatted as - // resource id. Relevant only for rules of the kind LogAlert. - ResourceIdColumnReference *genruntime.ResourceReference `armReference:"ResourceIdColumn" json:"resourceIdColumnReference,omitempty"` - Threshold *float64 `json:"threshold,omitempty"` - TimeAggregation *string `json:"timeAggregation,omitempty"` + // OperatorSpec + if rule.OperatorSpec != nil { + var operatorSpec v20231201s.ScheduledQueryRuleOperatorSpec + err := rule.OperatorSpec.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&operatorSpec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleOperatorSpec() to populate field OperatorSpec") + } + destination.OperatorSpec = &operatorSpec + } else { + destination.OperatorSpec = nil + } + + // OriginalVersion + destination.OriginalVersion = rule.OriginalVersion + + // OverrideQueryTimeRange + destination.OverrideQueryTimeRange = genruntime.ClonePointerToString(rule.OverrideQueryTimeRange) + + // Owner + if rule.Owner != nil { + owner := rule.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // ResolveConfiguration + if propertyBag.Contains("ResolveConfiguration") { + var resolveConfiguration v20231201s.RuleResolveConfiguration + err := propertyBag.Pull("ResolveConfiguration", &resolveConfiguration) + if err != nil { + return eris.Wrap(err, "pulling 'ResolveConfiguration' from propertyBag") + } + + destination.ResolveConfiguration = &resolveConfiguration + } else { + destination.ResolveConfiguration = nil + } + + // ScopesReferences + if rule.ScopesReferences != nil { + scopesReferenceList := make([]genruntime.ResourceReference, len(rule.ScopesReferences)) + for scopesReferenceIndex, scopesReferenceItem := range rule.ScopesReferences { + // Shadow the loop variable to avoid aliasing + scopesReferenceItem := scopesReferenceItem + scopesReferenceList[scopesReferenceIndex] = scopesReferenceItem.Copy() + } + destination.ScopesReferences = scopesReferenceList + } else { + destination.ScopesReferences = nil + } + + // Severity + destination.Severity = genruntime.ClonePointerToInt(rule.Severity) + + // SkipQueryValidation + if rule.SkipQueryValidation != nil { + skipQueryValidation := *rule.SkipQueryValidation + destination.SkipQueryValidation = &skipQueryValidation + } else { + destination.SkipQueryValidation = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(rule.Tags) + + // TargetResourceTypes + destination.TargetResourceTypes = genruntime.CloneSliceOfString(rule.TargetResourceTypes) + + // WindowSize + destination.WindowSize = genruntime.ClonePointerToString(rule.WindowSize) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRule_Spec interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_Spec); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220615.ScheduledQueryRule_STATUS +type ScheduledQueryRule_STATUS struct { + Actions *Actions_STATUS `json:"actions,omitempty"` + AutoMitigate *bool `json:"autoMitigate,omitempty"` + CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` + Conditions []conditions.Condition `json:"conditions,omitempty"` + CreatedWithApiVersion *string `json:"createdWithApiVersion,omitempty"` + Criteria *ScheduledQueryRuleCriteria_STATUS `json:"criteria,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Etag *string `json:"etag,omitempty"` + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + Id *string `json:"id,omitempty"` + IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty"` + IsWorkspaceAlertsStorageConfigured *bool `json:"isWorkspaceAlertsStorageConfigured,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` + Name *string `json:"name,omitempty"` + OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Scopes []string `json:"scopes,omitempty"` + Severity *int `json:"severity,omitempty"` + SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` + SystemData *SystemData_STATUS `json:"systemData,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` + Type *string `json:"type,omitempty"` + WindowSize *string `json:"windowSize,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &ScheduledQueryRule_STATUS{} + +// ConvertStatusFrom populates our ScheduledQueryRule_STATUS from the provided source +func (rule *ScheduledQueryRule_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20231201s.ScheduledQueryRule_STATUS) + if ok { + // Populate our instance from source + return rule.AssignProperties_From_ScheduledQueryRule_STATUS(src) + } + + // Convert to an intermediate form + src = &v20231201s.ScheduledQueryRule_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = rule.AssignProperties_From_ScheduledQueryRule_STATUS(src) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20231201s.ScheduledQueryRule_STATUS) + if ok { + // Populate destination from our instance + return rule.AssignProperties_To_ScheduledQueryRule_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20231201s.ScheduledQueryRule_STATUS{} + err := rule.AssignProperties_To_ScheduledQueryRule_STATUS(dst) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +// AssignProperties_From_ScheduledQueryRule_STATUS populates our ScheduledQueryRule_STATUS from the provided source ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) AssignProperties_From_ScheduledQueryRule_STATUS(source *v20231201s.ScheduledQueryRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Actions + if source.Actions != nil { + var action Actions_STATUS + err := action.AssignProperties_From_Actions_STATUS(source.Actions) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Actions_STATUS() to populate field Actions") + } + rule.Actions = &action + } else { + rule.Actions = nil + } + + // AutoMitigate + if source.AutoMitigate != nil { + autoMitigate := *source.AutoMitigate + rule.AutoMitigate = &autoMitigate + } else { + rule.AutoMitigate = nil + } + + // CheckWorkspaceAlertsStorageConfigured + if source.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured + rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + rule.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Conditions + rule.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // CreatedWithApiVersion + rule.CreatedWithApiVersion = genruntime.ClonePointerToString(source.CreatedWithApiVersion) + + // Criteria + if source.Criteria != nil { + var criterion ScheduledQueryRuleCriteria_STATUS + err := criterion.AssignProperties_From_ScheduledQueryRuleCriteria_STATUS(source.Criteria) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") + } + rule.Criteria = &criterion + } else { + rule.Criteria = nil + } + + // Description + rule.Description = genruntime.ClonePointerToString(source.Description) + + // DisplayName + rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // Etag + rule.Etag = genruntime.ClonePointerToString(source.Etag) + + // EvaluationFrequency + rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) + + // Id + rule.Id = genruntime.ClonePointerToString(source.Id) + + // Identity + if source.Identity != nil { + propertyBag.Add("Identity", *source.Identity) + } else { + propertyBag.Remove("Identity") + } + + // IsLegacyLogAnalyticsRule + if source.IsLegacyLogAnalyticsRule != nil { + isLegacyLogAnalyticsRule := *source.IsLegacyLogAnalyticsRule + rule.IsLegacyLogAnalyticsRule = &isLegacyLogAnalyticsRule + } else { + rule.IsLegacyLogAnalyticsRule = nil + } + + // IsWorkspaceAlertsStorageConfigured + if source.IsWorkspaceAlertsStorageConfigured != nil { + isWorkspaceAlertsStorageConfigured := *source.IsWorkspaceAlertsStorageConfigured + rule.IsWorkspaceAlertsStorageConfigured = &isWorkspaceAlertsStorageConfigured + } else { + rule.IsWorkspaceAlertsStorageConfigured = nil + } + + // Kind + rule.Kind = genruntime.ClonePointerToString(source.Kind) + + // Location + rule.Location = genruntime.ClonePointerToString(source.Location) + + // MuteActionsDuration + rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) + + // Name + rule.Name = genruntime.ClonePointerToString(source.Name) + + // OverrideQueryTimeRange + rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) + + // ResolveConfiguration + if source.ResolveConfiguration != nil { + propertyBag.Add("ResolveConfiguration", *source.ResolveConfiguration) + } else { + propertyBag.Remove("ResolveConfiguration") + } + + // Scopes + rule.Scopes = genruntime.CloneSliceOfString(source.Scopes) + + // Severity + rule.Severity = genruntime.ClonePointerToInt(source.Severity) + + // SkipQueryValidation + if source.SkipQueryValidation != nil { + skipQueryValidation := *source.SkipQueryValidation + rule.SkipQueryValidation = &skipQueryValidation + } else { + rule.SkipQueryValidation = nil + } + + // SystemData + if source.SystemData != nil { + var systemDataSTATUSStash v20221001s.SystemData_STATUS + err := systemDataSTATUSStash.AssignProperties_From_SystemData_STATUS(source.SystemData) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_SystemData_STATUS() to populate field SystemData_STATUSStash from SystemData") + } + var systemDatum SystemData_STATUS + err = systemDatum.AssignProperties_From_SystemData_STATUS(&systemDataSTATUSStash) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_SystemData_STATUS() to populate field SystemData from SystemData_STATUSStash") + } + rule.SystemData = &systemDatum + } else { + rule.SystemData = nil + } + + // Tags + rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // TargetResourceTypes + rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) + + // Type + rule.Type = genruntime.ClonePointerToString(source.Type) + + // WindowSize + rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_STATUS); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRule_STATUS populates the provided destination ScheduledQueryRule_STATUS from our ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) AssignProperties_To_ScheduledQueryRule_STATUS(destination *v20231201s.ScheduledQueryRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // Actions + if rule.Actions != nil { + var action v20231201s.Actions_STATUS + err := rule.Actions.AssignProperties_To_Actions_STATUS(&action) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Actions_STATUS() to populate field Actions") + } + destination.Actions = &action + } else { + destination.Actions = nil + } + + // AutoMitigate + if rule.AutoMitigate != nil { + autoMitigate := *rule.AutoMitigate + destination.AutoMitigate = &autoMitigate + } else { + destination.AutoMitigate = nil + } + + // CheckWorkspaceAlertsStorageConfigured + if rule.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *rule.CheckWorkspaceAlertsStorageConfigured + destination.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + destination.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(rule.Conditions) + + // CreatedWithApiVersion + destination.CreatedWithApiVersion = genruntime.ClonePointerToString(rule.CreatedWithApiVersion) + + // Criteria + if rule.Criteria != nil { + var criterion v20231201s.ScheduledQueryRuleCriteria_STATUS + err := rule.Criteria.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&criterion) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") + } + destination.Criteria = &criterion + } else { + destination.Criteria = nil + } + + // Description + destination.Description = genruntime.ClonePointerToString(rule.Description) + + // DisplayName + destination.DisplayName = genruntime.ClonePointerToString(rule.DisplayName) + + // Enabled + if rule.Enabled != nil { + enabled := *rule.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Etag + destination.Etag = genruntime.ClonePointerToString(rule.Etag) + + // EvaluationFrequency + destination.EvaluationFrequency = genruntime.ClonePointerToString(rule.EvaluationFrequency) + + // Id + destination.Id = genruntime.ClonePointerToString(rule.Id) + + // Identity + if propertyBag.Contains("Identity") { + var identity v20231201s.Identity_STATUS + err := propertyBag.Pull("Identity", &identity) + if err != nil { + return eris.Wrap(err, "pulling 'Identity' from propertyBag") + } + + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // IsLegacyLogAnalyticsRule + if rule.IsLegacyLogAnalyticsRule != nil { + isLegacyLogAnalyticsRule := *rule.IsLegacyLogAnalyticsRule + destination.IsLegacyLogAnalyticsRule = &isLegacyLogAnalyticsRule + } else { + destination.IsLegacyLogAnalyticsRule = nil + } + + // IsWorkspaceAlertsStorageConfigured + if rule.IsWorkspaceAlertsStorageConfigured != nil { + isWorkspaceAlertsStorageConfigured := *rule.IsWorkspaceAlertsStorageConfigured + destination.IsWorkspaceAlertsStorageConfigured = &isWorkspaceAlertsStorageConfigured + } else { + destination.IsWorkspaceAlertsStorageConfigured = nil + } + + // Kind + destination.Kind = genruntime.ClonePointerToString(rule.Kind) + + // Location + destination.Location = genruntime.ClonePointerToString(rule.Location) + + // MuteActionsDuration + destination.MuteActionsDuration = genruntime.ClonePointerToString(rule.MuteActionsDuration) + + // Name + destination.Name = genruntime.ClonePointerToString(rule.Name) + + // OverrideQueryTimeRange + destination.OverrideQueryTimeRange = genruntime.ClonePointerToString(rule.OverrideQueryTimeRange) + + // ResolveConfiguration + if propertyBag.Contains("ResolveConfiguration") { + var resolveConfiguration v20231201s.RuleResolveConfiguration_STATUS + err := propertyBag.Pull("ResolveConfiguration", &resolveConfiguration) + if err != nil { + return eris.Wrap(err, "pulling 'ResolveConfiguration' from propertyBag") + } + + destination.ResolveConfiguration = &resolveConfiguration + } else { + destination.ResolveConfiguration = nil + } + + // Scopes + destination.Scopes = genruntime.CloneSliceOfString(rule.Scopes) + + // Severity + destination.Severity = genruntime.ClonePointerToInt(rule.Severity) + + // SkipQueryValidation + if rule.SkipQueryValidation != nil { + skipQueryValidation := *rule.SkipQueryValidation + destination.SkipQueryValidation = &skipQueryValidation + } else { + destination.SkipQueryValidation = nil + } + + // SystemData + if rule.SystemData != nil { + var systemDataSTATUSStash v20221001s.SystemData_STATUS + err := rule.SystemData.AssignProperties_To_SystemData_STATUS(&systemDataSTATUSStash) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_SystemData_STATUS() to populate field SystemData_STATUSStash from SystemData") + } + var systemDatum v20231201s.SystemData_STATUS + err = systemDataSTATUSStash.AssignProperties_To_SystemData_STATUS(&systemDatum) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_SystemData_STATUS() to populate field SystemData from SystemData_STATUSStash") + } + destination.SystemData = &systemDatum + } else { + destination.SystemData = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(rule.Tags) + + // TargetResourceTypes + destination.TargetResourceTypes = genruntime.CloneSliceOfString(rule.TargetResourceTypes) + + // Type + destination.Type = genruntime.ClonePointerToString(rule.Type) + + // WindowSize + destination.WindowSize = genruntime.ClonePointerToString(rule.WindowSize) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_STATUS); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220615.Actions +// Actions to invoke when the alert fires. +type Actions struct { + ActionGroupsReferences []genruntime.ResourceReference `armReference:"ActionGroups" json:"actionGroupsReferences,omitempty"` + CustomProperties map[string]string `json:"customProperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_Actions populates our Actions from the provided source Actions +func (actions *Actions) AssignProperties_From_Actions(source *v20231201s.Actions) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ActionGroupsReferences + if source.ActionGroupsReferences != nil { + actionGroupsReferenceList := make([]genruntime.ResourceReference, len(source.ActionGroupsReferences)) + for actionGroupsReferenceIndex, actionGroupsReferenceItem := range source.ActionGroupsReferences { + // Shadow the loop variable to avoid aliasing + actionGroupsReferenceItem := actionGroupsReferenceItem + actionGroupsReferenceList[actionGroupsReferenceIndex] = actionGroupsReferenceItem.Copy() + } + actions.ActionGroupsReferences = actionGroupsReferenceList + } else { + actions.ActionGroupsReferences = nil + } + + // ActionProperties + if len(source.ActionProperties) > 0 { + propertyBag.Add("ActionProperties", source.ActionProperties) + } else { + propertyBag.Remove("ActionProperties") + } + + // CustomProperties + actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) + + // Update the property bag + if len(propertyBag) > 0 { + actions.PropertyBag = propertyBag + } else { + actions.PropertyBag = nil + } + + // Invoke the augmentConversionForActions interface (if implemented) to customize the conversion + var actionsAsAny any = actions + if augmentedActions, ok := actionsAsAny.(augmentConversionForActions); ok { + err := augmentedActions.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Actions populates the provided destination Actions from our Actions +func (actions *Actions) AssignProperties_To_Actions(destination *v20231201s.Actions) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(actions.PropertyBag) + + // ActionGroupsReferences + if actions.ActionGroupsReferences != nil { + actionGroupsReferenceList := make([]genruntime.ResourceReference, len(actions.ActionGroupsReferences)) + for actionGroupsReferenceIndex, actionGroupsReferenceItem := range actions.ActionGroupsReferences { + // Shadow the loop variable to avoid aliasing + actionGroupsReferenceItem := actionGroupsReferenceItem + actionGroupsReferenceList[actionGroupsReferenceIndex] = actionGroupsReferenceItem.Copy() + } + destination.ActionGroupsReferences = actionGroupsReferenceList + } else { + destination.ActionGroupsReferences = nil + } + + // ActionProperties + if propertyBag.Contains("ActionProperties") { + var actionProperty map[string]string + err := propertyBag.Pull("ActionProperties", &actionProperty) + if err != nil { + return eris.Wrap(err, "pulling 'ActionProperties' from propertyBag") + } + + destination.ActionProperties = actionProperty + } else { + destination.ActionProperties = nil + } + + // CustomProperties + destination.CustomProperties = genruntime.CloneMapOfStringToString(actions.CustomProperties) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForActions interface (if implemented) to customize the conversion + var actionsAsAny any = actions + if augmentedActions, ok := actionsAsAny.(augmentConversionForActions); ok { + err := augmentedActions.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220615.Actions_STATUS +// Actions to invoke when the alert fires. +type Actions_STATUS struct { + ActionGroups []string `json:"actionGroups,omitempty"` + CustomProperties map[string]string `json:"customProperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_Actions_STATUS populates our Actions_STATUS from the provided source Actions_STATUS +func (actions *Actions_STATUS) AssignProperties_From_Actions_STATUS(source *v20231201s.Actions_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ActionGroups + actions.ActionGroups = genruntime.CloneSliceOfString(source.ActionGroups) + + // ActionProperties + if len(source.ActionProperties) > 0 { + propertyBag.Add("ActionProperties", source.ActionProperties) + } else { + propertyBag.Remove("ActionProperties") + } + + // CustomProperties + actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) + + // Update the property bag + if len(propertyBag) > 0 { + actions.PropertyBag = propertyBag + } else { + actions.PropertyBag = nil + } + + // Invoke the augmentConversionForActions_STATUS interface (if implemented) to customize the conversion + var actionsAsAny any = actions + if augmentedActions, ok := actionsAsAny.(augmentConversionForActions_STATUS); ok { + err := augmentedActions.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Actions_STATUS populates the provided destination Actions_STATUS from our Actions_STATUS +func (actions *Actions_STATUS) AssignProperties_To_Actions_STATUS(destination *v20231201s.Actions_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(actions.PropertyBag) + + // ActionGroups + destination.ActionGroups = genruntime.CloneSliceOfString(actions.ActionGroups) + + // ActionProperties + if propertyBag.Contains("ActionProperties") { + var actionProperty map[string]string + err := propertyBag.Pull("ActionProperties", &actionProperty) + if err != nil { + return eris.Wrap(err, "pulling 'ActionProperties' from propertyBag") + } + + destination.ActionProperties = actionProperty + } else { + destination.ActionProperties = nil + } + + // CustomProperties + destination.CustomProperties = genruntime.CloneMapOfStringToString(actions.CustomProperties) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForActions_STATUS interface (if implemented) to customize the conversion + var actionsAsAny any = actions + if augmentedActions, ok := actionsAsAny.(augmentConversionForActions_STATUS); ok { + err := augmentedActions.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForScheduledQueryRule_Spec interface { + AssignPropertiesFrom(src *v20231201s.ScheduledQueryRule_Spec) error + AssignPropertiesTo(dst *v20231201s.ScheduledQueryRule_Spec) error +} + +type augmentConversionForScheduledQueryRule_STATUS interface { + AssignPropertiesFrom(src *v20231201s.ScheduledQueryRule_STATUS) error + AssignPropertiesTo(dst *v20231201s.ScheduledQueryRule_STATUS) error +} + +// Storage version of v1api20220615.ScheduledQueryRuleCriteria +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria struct { + AllOf []Condition `json:"allOf,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_ScheduledQueryRuleCriteria populates our ScheduledQueryRuleCriteria from the provided source ScheduledQueryRuleCriteria +func (criteria *ScheduledQueryRuleCriteria) AssignProperties_From_ScheduledQueryRuleCriteria(source *v20231201s.ScheduledQueryRuleCriteria) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllOf + if source.AllOf != nil { + allOfList := make([]Condition, len(source.AllOf)) + for allOfIndex, allOfItem := range source.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf Condition + err := allOf.AssignProperties_From_Condition(&allOfItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + criteria.AllOf = allOfList + } else { + criteria.AllOf = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + criteria.PropertyBag = propertyBag + } else { + criteria.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleCriteria interface (if implemented) to customize the conversion + var criteriaAsAny any = criteria + if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria); ok { + err := augmentedCriteria.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRuleCriteria populates the provided destination ScheduledQueryRuleCriteria from our ScheduledQueryRuleCriteria +func (criteria *ScheduledQueryRuleCriteria) AssignProperties_To_ScheduledQueryRuleCriteria(destination *v20231201s.ScheduledQueryRuleCriteria) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(criteria.PropertyBag) + + // AllOf + if criteria.AllOf != nil { + allOfList := make([]v20231201s.Condition, len(criteria.AllOf)) + for allOfIndex, allOfItem := range criteria.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf v20231201s.Condition + err := allOfItem.AssignProperties_To_Condition(&allOf) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + destination.AllOf = allOfList + } else { + destination.AllOf = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleCriteria interface (if implemented) to customize the conversion + var criteriaAsAny any = criteria + if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria); ok { + err := augmentedCriteria.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220615.ScheduledQueryRuleCriteria_STATUS +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria_STATUS struct { + AllOf []Condition_STATUS `json:"allOf,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_ScheduledQueryRuleCriteria_STATUS populates our ScheduledQueryRuleCriteria_STATUS from the provided source ScheduledQueryRuleCriteria_STATUS +func (criteria *ScheduledQueryRuleCriteria_STATUS) AssignProperties_From_ScheduledQueryRuleCriteria_STATUS(source *v20231201s.ScheduledQueryRuleCriteria_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllOf + if source.AllOf != nil { + allOfList := make([]Condition_STATUS, len(source.AllOf)) + for allOfIndex, allOfItem := range source.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf Condition_STATUS + err := allOf.AssignProperties_From_Condition_STATUS(&allOfItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition_STATUS() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + criteria.AllOf = allOfList + } else { + criteria.AllOf = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + criteria.PropertyBag = propertyBag + } else { + criteria.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleCriteria_STATUS interface (if implemented) to customize the conversion + var criteriaAsAny any = criteria + if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria_STATUS); ok { + err := augmentedCriteria.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRuleCriteria_STATUS populates the provided destination ScheduledQueryRuleCriteria_STATUS from our ScheduledQueryRuleCriteria_STATUS +func (criteria *ScheduledQueryRuleCriteria_STATUS) AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(destination *v20231201s.ScheduledQueryRuleCriteria_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(criteria.PropertyBag) + + // AllOf + if criteria.AllOf != nil { + allOfList := make([]v20231201s.Condition_STATUS, len(criteria.AllOf)) + for allOfIndex, allOfItem := range criteria.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf v20231201s.Condition_STATUS + err := allOfItem.AssignProperties_To_Condition_STATUS(&allOf) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition_STATUS() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + destination.AllOf = allOfList + } else { + destination.AllOf = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleCriteria_STATUS interface (if implemented) to customize the conversion + var criteriaAsAny any = criteria + if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria_STATUS); ok { + err := augmentedCriteria.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220615.ScheduledQueryRuleOperatorSpec +// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type ScheduledQueryRuleOperatorSpec struct { + ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SecretExpressions []*core.DestinationExpression `json:"secretExpressions,omitempty"` +} + +// AssignProperties_From_ScheduledQueryRuleOperatorSpec populates our ScheduledQueryRuleOperatorSpec from the provided source ScheduledQueryRuleOperatorSpec +func (operator *ScheduledQueryRuleOperatorSpec) AssignProperties_From_ScheduledQueryRuleOperatorSpec(source *v20231201s.ScheduledQueryRuleOperatorSpec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ConfigMapExpressions + if source.ConfigMapExpressions != nil { + configMapExpressionList := make([]*core.DestinationExpression, len(source.ConfigMapExpressions)) + for configMapExpressionIndex, configMapExpressionItem := range source.ConfigMapExpressions { + // Shadow the loop variable to avoid aliasing + configMapExpressionItem := configMapExpressionItem + if configMapExpressionItem != nil { + configMapExpression := *configMapExpressionItem.DeepCopy() + configMapExpressionList[configMapExpressionIndex] = &configMapExpression + } else { + configMapExpressionList[configMapExpressionIndex] = nil + } + } + operator.ConfigMapExpressions = configMapExpressionList + } else { + operator.ConfigMapExpressions = nil + } + + // SecretExpressions + if source.SecretExpressions != nil { + secretExpressionList := make([]*core.DestinationExpression, len(source.SecretExpressions)) + for secretExpressionIndex, secretExpressionItem := range source.SecretExpressions { + // Shadow the loop variable to avoid aliasing + secretExpressionItem := secretExpressionItem + if secretExpressionItem != nil { + secretExpression := *secretExpressionItem.DeepCopy() + secretExpressionList[secretExpressionIndex] = &secretExpression + } else { + secretExpressionList[secretExpressionIndex] = nil + } + } + operator.SecretExpressions = secretExpressionList + } else { + operator.SecretExpressions = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + operator.PropertyBag = propertyBag + } else { + operator.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleOperatorSpec interface (if implemented) to customize the conversion + var operatorAsAny any = operator + if augmentedOperator, ok := operatorAsAny.(augmentConversionForScheduledQueryRuleOperatorSpec); ok { + err := augmentedOperator.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRuleOperatorSpec populates the provided destination ScheduledQueryRuleOperatorSpec from our ScheduledQueryRuleOperatorSpec +func (operator *ScheduledQueryRuleOperatorSpec) AssignProperties_To_ScheduledQueryRuleOperatorSpec(destination *v20231201s.ScheduledQueryRuleOperatorSpec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(operator.PropertyBag) + + // ConfigMapExpressions + if operator.ConfigMapExpressions != nil { + configMapExpressionList := make([]*core.DestinationExpression, len(operator.ConfigMapExpressions)) + for configMapExpressionIndex, configMapExpressionItem := range operator.ConfigMapExpressions { + // Shadow the loop variable to avoid aliasing + configMapExpressionItem := configMapExpressionItem + if configMapExpressionItem != nil { + configMapExpression := *configMapExpressionItem.DeepCopy() + configMapExpressionList[configMapExpressionIndex] = &configMapExpression + } else { + configMapExpressionList[configMapExpressionIndex] = nil + } + } + destination.ConfigMapExpressions = configMapExpressionList + } else { + destination.ConfigMapExpressions = nil + } + + // SecretExpressions + if operator.SecretExpressions != nil { + secretExpressionList := make([]*core.DestinationExpression, len(operator.SecretExpressions)) + for secretExpressionIndex, secretExpressionItem := range operator.SecretExpressions { + // Shadow the loop variable to avoid aliasing + secretExpressionItem := secretExpressionItem + if secretExpressionItem != nil { + secretExpression := *secretExpressionItem.DeepCopy() + secretExpressionList[secretExpressionIndex] = &secretExpression + } else { + secretExpressionList[secretExpressionIndex] = nil + } + } + destination.SecretExpressions = secretExpressionList + } else { + destination.SecretExpressions = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleOperatorSpec interface (if implemented) to customize the conversion + var operatorAsAny any = operator + if augmentedOperator, ok := operatorAsAny.(augmentConversionForScheduledQueryRuleOperatorSpec); ok { + err := augmentedOperator.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20220615.SystemData_STATUS +// Metadata pertaining to creation and last modification of the resource. +type SystemData_STATUS struct { + CreatedAt *string `json:"createdAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + CreatedByType *string `json:"createdByType,omitempty"` + LastModifiedAt *string `json:"lastModifiedAt,omitempty"` + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedByType *string `json:"lastModifiedByType,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_SystemData_STATUS populates our SystemData_STATUS from the provided source SystemData_STATUS +func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v20221001s.SystemData_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // CreatedAt + data.CreatedAt = genruntime.ClonePointerToString(source.CreatedAt) + + // CreatedBy + data.CreatedBy = genruntime.ClonePointerToString(source.CreatedBy) + + // CreatedByType + data.CreatedByType = genruntime.ClonePointerToString(source.CreatedByType) + + // LastModifiedAt + data.LastModifiedAt = genruntime.ClonePointerToString(source.LastModifiedAt) + + // LastModifiedBy + data.LastModifiedBy = genruntime.ClonePointerToString(source.LastModifiedBy) + + // LastModifiedByType + data.LastModifiedByType = genruntime.ClonePointerToString(source.LastModifiedByType) + + // Update the property bag + if len(propertyBag) > 0 { + data.PropertyBag = propertyBag + } else { + data.PropertyBag = nil + } + + // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion + var dataAsAny any = data + if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { + err := augmentedData.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SystemData_STATUS populates the provided destination SystemData_STATUS from our SystemData_STATUS +func (data *SystemData_STATUS) AssignProperties_To_SystemData_STATUS(destination *v20221001s.SystemData_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(data.PropertyBag) + + // CreatedAt + destination.CreatedAt = genruntime.ClonePointerToString(data.CreatedAt) + + // CreatedBy + destination.CreatedBy = genruntime.ClonePointerToString(data.CreatedBy) + + // CreatedByType + destination.CreatedByType = genruntime.ClonePointerToString(data.CreatedByType) + + // LastModifiedAt + destination.LastModifiedAt = genruntime.ClonePointerToString(data.LastModifiedAt) + + // LastModifiedBy + destination.LastModifiedBy = genruntime.ClonePointerToString(data.LastModifiedBy) + + // LastModifiedByType + destination.LastModifiedByType = genruntime.ClonePointerToString(data.LastModifiedByType) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion + var dataAsAny any = data + if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { + err := augmentedData.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForActions interface { + AssignPropertiesFrom(src *v20231201s.Actions) error + AssignPropertiesTo(dst *v20231201s.Actions) error +} + +type augmentConversionForActions_STATUS interface { + AssignPropertiesFrom(src *v20231201s.Actions_STATUS) error + AssignPropertiesTo(dst *v20231201s.Actions_STATUS) error +} + +type augmentConversionForScheduledQueryRuleCriteria interface { + AssignPropertiesFrom(src *v20231201s.ScheduledQueryRuleCriteria) error + AssignPropertiesTo(dst *v20231201s.ScheduledQueryRuleCriteria) error +} + +type augmentConversionForScheduledQueryRuleCriteria_STATUS interface { + AssignPropertiesFrom(src *v20231201s.ScheduledQueryRuleCriteria_STATUS) error + AssignPropertiesTo(dst *v20231201s.ScheduledQueryRuleCriteria_STATUS) error +} + +type augmentConversionForScheduledQueryRuleOperatorSpec interface { + AssignPropertiesFrom(src *v20231201s.ScheduledQueryRuleOperatorSpec) error + AssignPropertiesTo(dst *v20231201s.ScheduledQueryRuleOperatorSpec) error +} + +type augmentConversionForSystemData_STATUS interface { + AssignPropertiesFrom(src *v20221001s.SystemData_STATUS) error + AssignPropertiesTo(dst *v20221001s.SystemData_STATUS) error +} + +// Storage version of v1api20220615.Condition +// A condition of the scheduled query rule. +type Condition struct { + Dimensions []Dimension `json:"dimensions,omitempty"` + FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` + MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` + MetricName *string `json:"metricName,omitempty"` + Operator *string `json:"operator,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Query *string `json:"query,omitempty"` + + // ResourceIdColumnReference: The column containing the resource id. The content of the column must be a uri formatted as + // resource id. Relevant only for rules of the kind LogAlert. + ResourceIdColumnReference *genruntime.ResourceReference `armReference:"ResourceIdColumn" json:"resourceIdColumnReference,omitempty"` + Threshold *float64 `json:"threshold,omitempty"` + TimeAggregation *string `json:"timeAggregation,omitempty"` +} + +// AssignProperties_From_Condition populates our Condition from the provided source Condition +func (condition *Condition) AssignProperties_From_Condition(source *v20231201s.Condition) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Dimensions + if source.Dimensions != nil { + dimensionList := make([]Dimension, len(source.Dimensions)) + for dimensionIndex, dimensionItem := range source.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension Dimension + err := dimension.AssignProperties_From_Dimension(&dimensionItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Dimension() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + condition.Dimensions = dimensionList + } else { + condition.Dimensions = nil + } + + // FailingPeriods + if source.FailingPeriods != nil { + var failingPeriod Condition_FailingPeriods + err := failingPeriod.AssignProperties_From_Condition_FailingPeriods(source.FailingPeriods) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition_FailingPeriods() to populate field FailingPeriods") + } + condition.FailingPeriods = &failingPeriod + } else { + condition.FailingPeriods = nil + } + + // MetricMeasureColumn + condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) + + // MetricName + condition.MetricName = genruntime.ClonePointerToString(source.MetricName) + + // Operator + condition.Operator = genruntime.ClonePointerToString(source.Operator) + + // Query + condition.Query = genruntime.ClonePointerToString(source.Query) + + // ResourceIdColumnReference + if source.ResourceIdColumnReference != nil { + resourceIdColumnReference := source.ResourceIdColumnReference.Copy() + condition.ResourceIdColumnReference = &resourceIdColumnReference + } else { + condition.ResourceIdColumnReference = nil + } + + // Threshold + if source.Threshold != nil { + threshold := *source.Threshold + condition.Threshold = &threshold + } else { + condition.Threshold = nil + } + + // TimeAggregation + condition.TimeAggregation = genruntime.ClonePointerToString(source.TimeAggregation) + + // Update the property bag + if len(propertyBag) > 0 { + condition.PropertyBag = propertyBag + } else { + condition.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition interface (if implemented) to customize the conversion + var conditionAsAny any = condition + if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition); ok { + err := augmentedCondition.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Condition populates the provided destination Condition from our Condition +func (condition *Condition) AssignProperties_To_Condition(destination *v20231201s.Condition) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(condition.PropertyBag) + + // Dimensions + if condition.Dimensions != nil { + dimensionList := make([]v20231201s.Dimension, len(condition.Dimensions)) + for dimensionIndex, dimensionItem := range condition.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension v20231201s.Dimension + err := dimensionItem.AssignProperties_To_Dimension(&dimension) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Dimension() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + destination.Dimensions = dimensionList + } else { + destination.Dimensions = nil + } + + // FailingPeriods + if condition.FailingPeriods != nil { + var failingPeriod v20231201s.Condition_FailingPeriods + err := condition.FailingPeriods.AssignProperties_To_Condition_FailingPeriods(&failingPeriod) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition_FailingPeriods() to populate field FailingPeriods") + } + destination.FailingPeriods = &failingPeriod + } else { + destination.FailingPeriods = nil + } + + // MetricMeasureColumn + destination.MetricMeasureColumn = genruntime.ClonePointerToString(condition.MetricMeasureColumn) + + // MetricName + destination.MetricName = genruntime.ClonePointerToString(condition.MetricName) + + // Operator + destination.Operator = genruntime.ClonePointerToString(condition.Operator) + + // Query + destination.Query = genruntime.ClonePointerToString(condition.Query) + + // ResourceIdColumnReference + if condition.ResourceIdColumnReference != nil { + resourceIdColumnReference := condition.ResourceIdColumnReference.Copy() + destination.ResourceIdColumnReference = &resourceIdColumnReference + } else { + destination.ResourceIdColumnReference = nil + } + + // Threshold + if condition.Threshold != nil { + threshold := *condition.Threshold + destination.Threshold = &threshold + } else { + destination.Threshold = nil + } + + // TimeAggregation + destination.TimeAggregation = genruntime.ClonePointerToString(condition.TimeAggregation) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition interface (if implemented) to customize the conversion + var conditionAsAny any = condition + if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition); ok { + err := augmentedCondition.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil } // Storage version of v1api20220615.Condition_STATUS @@ -453,6 +2013,178 @@ type Condition_STATUS struct { TimeAggregation *string `json:"timeAggregation,omitempty"` } +// AssignProperties_From_Condition_STATUS populates our Condition_STATUS from the provided source Condition_STATUS +func (condition *Condition_STATUS) AssignProperties_From_Condition_STATUS(source *v20231201s.Condition_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Dimensions + if source.Dimensions != nil { + dimensionList := make([]Dimension_STATUS, len(source.Dimensions)) + for dimensionIndex, dimensionItem := range source.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension Dimension_STATUS + err := dimension.AssignProperties_From_Dimension_STATUS(&dimensionItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Dimension_STATUS() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + condition.Dimensions = dimensionList + } else { + condition.Dimensions = nil + } + + // FailingPeriods + if source.FailingPeriods != nil { + var failingPeriod Condition_FailingPeriods_STATUS + err := failingPeriod.AssignProperties_From_Condition_FailingPeriods_STATUS(source.FailingPeriods) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") + } + condition.FailingPeriods = &failingPeriod + } else { + condition.FailingPeriods = nil + } + + // MetricMeasureColumn + condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) + + // MetricName + condition.MetricName = genruntime.ClonePointerToString(source.MetricName) + + // Operator + condition.Operator = genruntime.ClonePointerToString(source.Operator) + + // Query + condition.Query = genruntime.ClonePointerToString(source.Query) + + // ResourceIdColumn + condition.ResourceIdColumn = genruntime.ClonePointerToString(source.ResourceIdColumn) + + // Threshold + if source.Threshold != nil { + threshold := *source.Threshold + condition.Threshold = &threshold + } else { + condition.Threshold = nil + } + + // TimeAggregation + condition.TimeAggregation = genruntime.ClonePointerToString(source.TimeAggregation) + + // Update the property bag + if len(propertyBag) > 0 { + condition.PropertyBag = propertyBag + } else { + condition.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_STATUS interface (if implemented) to customize the conversion + var conditionAsAny any = condition + if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition_STATUS); ok { + err := augmentedCondition.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Condition_STATUS populates the provided destination Condition_STATUS from our Condition_STATUS +func (condition *Condition_STATUS) AssignProperties_To_Condition_STATUS(destination *v20231201s.Condition_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(condition.PropertyBag) + + // Dimensions + if condition.Dimensions != nil { + dimensionList := make([]v20231201s.Dimension_STATUS, len(condition.Dimensions)) + for dimensionIndex, dimensionItem := range condition.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension v20231201s.Dimension_STATUS + err := dimensionItem.AssignProperties_To_Dimension_STATUS(&dimension) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Dimension_STATUS() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + destination.Dimensions = dimensionList + } else { + destination.Dimensions = nil + } + + // FailingPeriods + if condition.FailingPeriods != nil { + var failingPeriod v20231201s.Condition_FailingPeriods_STATUS + err := condition.FailingPeriods.AssignProperties_To_Condition_FailingPeriods_STATUS(&failingPeriod) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") + } + destination.FailingPeriods = &failingPeriod + } else { + destination.FailingPeriods = nil + } + + // MetricMeasureColumn + destination.MetricMeasureColumn = genruntime.ClonePointerToString(condition.MetricMeasureColumn) + + // MetricName + destination.MetricName = genruntime.ClonePointerToString(condition.MetricName) + + // Operator + destination.Operator = genruntime.ClonePointerToString(condition.Operator) + + // Query + destination.Query = genruntime.ClonePointerToString(condition.Query) + + // ResourceIdColumn + destination.ResourceIdColumn = genruntime.ClonePointerToString(condition.ResourceIdColumn) + + // Threshold + if condition.Threshold != nil { + threshold := *condition.Threshold + destination.Threshold = &threshold + } else { + destination.Threshold = nil + } + + // TimeAggregation + destination.TimeAggregation = genruntime.ClonePointerToString(condition.TimeAggregation) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_STATUS interface (if implemented) to customize the conversion + var conditionAsAny any = condition + if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition_STATUS); ok { + err := augmentedCondition.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForCondition interface { + AssignPropertiesFrom(src *v20231201s.Condition) error + AssignPropertiesTo(dst *v20231201s.Condition) error +} + +type augmentConversionForCondition_STATUS interface { + AssignPropertiesFrom(src *v20231201s.Condition_STATUS) error + AssignPropertiesTo(dst *v20231201s.Condition_STATUS) error +} + // Storage version of v1api20220615.Condition_FailingPeriods type Condition_FailingPeriods struct { MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` @@ -460,6 +2192,68 @@ type Condition_FailingPeriods struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_Condition_FailingPeriods populates our Condition_FailingPeriods from the provided source Condition_FailingPeriods +func (periods *Condition_FailingPeriods) AssignProperties_From_Condition_FailingPeriods(source *v20231201s.Condition_FailingPeriods) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // MinFailingPeriodsToAlert + periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) + + // Update the property bag + if len(propertyBag) > 0 { + periods.PropertyBag = propertyBag + } else { + periods.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_FailingPeriods interface (if implemented) to customize the conversion + var periodsAsAny any = periods + if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods); ok { + err := augmentedPeriods.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Condition_FailingPeriods populates the provided destination Condition_FailingPeriods from our Condition_FailingPeriods +func (periods *Condition_FailingPeriods) AssignProperties_To_Condition_FailingPeriods(destination *v20231201s.Condition_FailingPeriods) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(periods.PropertyBag) + + // MinFailingPeriodsToAlert + destination.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(periods.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + destination.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(periods.NumberOfEvaluationPeriods) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_FailingPeriods interface (if implemented) to customize the conversion + var periodsAsAny any = periods + if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods); ok { + err := augmentedPeriods.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220615.Condition_FailingPeriods_STATUS type Condition_FailingPeriods_STATUS struct { MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` @@ -467,6 +2261,68 @@ type Condition_FailingPeriods_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_Condition_FailingPeriods_STATUS populates our Condition_FailingPeriods_STATUS from the provided source Condition_FailingPeriods_STATUS +func (periods *Condition_FailingPeriods_STATUS) AssignProperties_From_Condition_FailingPeriods_STATUS(source *v20231201s.Condition_FailingPeriods_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // MinFailingPeriodsToAlert + periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) + + // Update the property bag + if len(propertyBag) > 0 { + periods.PropertyBag = propertyBag + } else { + periods.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_FailingPeriods_STATUS interface (if implemented) to customize the conversion + var periodsAsAny any = periods + if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods_STATUS); ok { + err := augmentedPeriods.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Condition_FailingPeriods_STATUS populates the provided destination Condition_FailingPeriods_STATUS from our Condition_FailingPeriods_STATUS +func (periods *Condition_FailingPeriods_STATUS) AssignProperties_To_Condition_FailingPeriods_STATUS(destination *v20231201s.Condition_FailingPeriods_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(periods.PropertyBag) + + // MinFailingPeriodsToAlert + destination.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(periods.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + destination.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(periods.NumberOfEvaluationPeriods) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_FailingPeriods_STATUS interface (if implemented) to customize the conversion + var periodsAsAny any = periods + if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods_STATUS); ok { + err := augmentedPeriods.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220615.Dimension // Dimension splitting and filtering definition type Dimension struct { @@ -476,6 +2332,74 @@ type Dimension struct { Values []string `json:"values,omitempty"` } +// AssignProperties_From_Dimension populates our Dimension from the provided source Dimension +func (dimension *Dimension) AssignProperties_From_Dimension(source *v20231201s.Dimension) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + dimension.Name = genruntime.ClonePointerToString(source.Name) + + // Operator + dimension.Operator = genruntime.ClonePointerToString(source.Operator) + + // Values + dimension.Values = genruntime.CloneSliceOfString(source.Values) + + // Update the property bag + if len(propertyBag) > 0 { + dimension.PropertyBag = propertyBag + } else { + dimension.PropertyBag = nil + } + + // Invoke the augmentConversionForDimension interface (if implemented) to customize the conversion + var dimensionAsAny any = dimension + if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension); ok { + err := augmentedDimension.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Dimension populates the provided destination Dimension from our Dimension +func (dimension *Dimension) AssignProperties_To_Dimension(destination *v20231201s.Dimension) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(dimension.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(dimension.Name) + + // Operator + destination.Operator = genruntime.ClonePointerToString(dimension.Operator) + + // Values + destination.Values = genruntime.CloneSliceOfString(dimension.Values) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForDimension interface (if implemented) to customize the conversion + var dimensionAsAny any = dimension + if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension); ok { + err := augmentedDimension.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20220615.Dimension_STATUS // Dimension splitting and filtering definition type Dimension_STATUS struct { @@ -485,6 +2409,94 @@ type Dimension_STATUS struct { Values []string `json:"values,omitempty"` } +// AssignProperties_From_Dimension_STATUS populates our Dimension_STATUS from the provided source Dimension_STATUS +func (dimension *Dimension_STATUS) AssignProperties_From_Dimension_STATUS(source *v20231201s.Dimension_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + dimension.Name = genruntime.ClonePointerToString(source.Name) + + // Operator + dimension.Operator = genruntime.ClonePointerToString(source.Operator) + + // Values + dimension.Values = genruntime.CloneSliceOfString(source.Values) + + // Update the property bag + if len(propertyBag) > 0 { + dimension.PropertyBag = propertyBag + } else { + dimension.PropertyBag = nil + } + + // Invoke the augmentConversionForDimension_STATUS interface (if implemented) to customize the conversion + var dimensionAsAny any = dimension + if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension_STATUS); ok { + err := augmentedDimension.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Dimension_STATUS populates the provided destination Dimension_STATUS from our Dimension_STATUS +func (dimension *Dimension_STATUS) AssignProperties_To_Dimension_STATUS(destination *v20231201s.Dimension_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(dimension.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(dimension.Name) + + // Operator + destination.Operator = genruntime.ClonePointerToString(dimension.Operator) + + // Values + destination.Values = genruntime.CloneSliceOfString(dimension.Values) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForDimension_STATUS interface (if implemented) to customize the conversion + var dimensionAsAny any = dimension + if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension_STATUS); ok { + err := augmentedDimension.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForCondition_FailingPeriods interface { + AssignPropertiesFrom(src *v20231201s.Condition_FailingPeriods) error + AssignPropertiesTo(dst *v20231201s.Condition_FailingPeriods) error +} + +type augmentConversionForCondition_FailingPeriods_STATUS interface { + AssignPropertiesFrom(src *v20231201s.Condition_FailingPeriods_STATUS) error + AssignPropertiesTo(dst *v20231201s.Condition_FailingPeriods_STATUS) error +} + +type augmentConversionForDimension interface { + AssignPropertiesFrom(src *v20231201s.Dimension) error + AssignPropertiesTo(dst *v20231201s.Dimension) error +} + +type augmentConversionForDimension_STATUS interface { + AssignPropertiesFrom(src *v20231201s.Dimension_STATUS) error + AssignPropertiesTo(dst *v20231201s.Dimension_STATUS) error +} + func init() { SchemeBuilder.Register(&ScheduledQueryRule{}, &ScheduledQueryRuleList{}) } diff --git a/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen_test.go b/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen_test.go index 670951eee9d..b082f013133 100644 --- a/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen_test.go +++ b/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen_test.go @@ -5,7 +5,8 @@ package storage import ( "encoding/json" - storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" + v20221001s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" + v20231201s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -18,6 +19,48 @@ import ( "testing" ) +func Test_Actions_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Actions to Actions via AssignProperties_To_Actions & AssignProperties_From_Actions returns original", + prop.ForAll(RunPropertyAssignmentTestForActions, ActionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForActions tests if a specific instance of Actions can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForActions(subject Actions) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20231201s.Actions + err := copied.AssignProperties_To_Actions(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Actions + err = actual.AssignProperties_From_Actions(&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_Actions_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -80,6 +123,48 @@ func AddIndependentPropertyGeneratorsForActions(gens map[string]gopter.Gen) { gen.AlphaString()) } +func Test_Actions_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Actions_STATUS to Actions_STATUS via AssignProperties_To_Actions_STATUS & AssignProperties_From_Actions_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForActions_STATUS, Actions_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForActions_STATUS tests if a specific instance of Actions_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForActions_STATUS(subject Actions_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 v20231201s.Actions_STATUS + err := copied.AssignProperties_To_Actions_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Actions_STATUS + err = actual.AssignProperties_From_Actions_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_Actions_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -143,6 +228,48 @@ func AddIndependentPropertyGeneratorsForActions_STATUS(gens map[string]gopter.Ge gen.AlphaString()) } +func Test_Condition_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition to Condition via AssignProperties_To_Condition & AssignProperties_From_Condition returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition, ConditionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition tests if a specific instance of Condition can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition(subject Condition) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20231201s.Condition + err := copied.AssignProperties_To_Condition(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition + err = actual.AssignProperties_From_Condition(&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_Condition_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -223,6 +350,48 @@ func AddRelatedPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriodsGenerator()) } +func Test_Condition_FailingPeriods_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition_FailingPeriods to Condition_FailingPeriods via AssignProperties_To_Condition_FailingPeriods & AssignProperties_From_Condition_FailingPeriods returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition_FailingPeriods, Condition_FailingPeriodsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition_FailingPeriods tests if a specific instance of Condition_FailingPeriods can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition_FailingPeriods(subject Condition_FailingPeriods) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20231201s.Condition_FailingPeriods + err := copied.AssignProperties_To_Condition_FailingPeriods(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition_FailingPeriods + err = actual.AssignProperties_From_Condition_FailingPeriods(&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_Condition_FailingPeriods_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -285,6 +454,48 @@ func AddIndependentPropertyGeneratorsForCondition_FailingPeriods(gens map[string gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) } +func Test_Condition_FailingPeriods_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition_FailingPeriods_STATUS to Condition_FailingPeriods_STATUS via AssignProperties_To_Condition_FailingPeriods_STATUS & AssignProperties_From_Condition_FailingPeriods_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS, Condition_FailingPeriods_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS tests if a specific instance of Condition_FailingPeriods_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS(subject Condition_FailingPeriods_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 v20231201s.Condition_FailingPeriods_STATUS + err := copied.AssignProperties_To_Condition_FailingPeriods_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition_FailingPeriods_STATUS + err = actual.AssignProperties_From_Condition_FailingPeriods_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_Condition_FailingPeriods_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -347,6 +558,48 @@ func AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS(gens map gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) } +func Test_Condition_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition_STATUS to Condition_STATUS via AssignProperties_To_Condition_STATUS & AssignProperties_From_Condition_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition_STATUS, Condition_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition_STATUS tests if a specific instance of Condition_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition_STATUS(subject Condition_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 v20231201s.Condition_STATUS + err := copied.AssignProperties_To_Condition_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition_STATUS + err = actual.AssignProperties_From_Condition_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_Condition_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -428,6 +681,48 @@ func AddRelatedPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriods_STATUSGenerator()) } +func Test_Dimension_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Dimension to Dimension via AssignProperties_To_Dimension & AssignProperties_From_Dimension returns original", + prop.ForAll(RunPropertyAssignmentTestForDimension, DimensionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDimension tests if a specific instance of Dimension can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDimension(subject Dimension) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20231201s.Dimension + err := copied.AssignProperties_To_Dimension(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Dimension + err = actual.AssignProperties_From_Dimension(&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_Dimension_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -490,6 +785,48 @@ func AddIndependentPropertyGeneratorsForDimension(gens map[string]gopter.Gen) { gens["Values"] = gen.SliceOf(gen.AlphaString()) } +func Test_Dimension_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Dimension_STATUS to Dimension_STATUS via AssignProperties_To_Dimension_STATUS & AssignProperties_From_Dimension_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForDimension_STATUS, Dimension_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDimension_STATUS tests if a specific instance of Dimension_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDimension_STATUS(subject Dimension_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 v20231201s.Dimension_STATUS + err := copied.AssignProperties_To_Dimension_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Dimension_STATUS + err = actual.AssignProperties_From_Dimension_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_Dimension_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -552,6 +889,91 @@ func AddIndependentPropertyGeneratorsForDimension_STATUS(gens map[string]gopter. gens["Values"] = gen.SliceOf(gen.AlphaString()) } +func Test_ScheduledQueryRule_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 ScheduledQueryRule to hub returns original", + prop.ForAll(RunResourceConversionTestForScheduledQueryRule, ScheduledQueryRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForScheduledQueryRule tests if a specific instance of ScheduledQueryRule round trips to the hub storage version and back losslessly +func RunResourceConversionTestForScheduledQueryRule(subject ScheduledQueryRule) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20231201s.ScheduledQueryRule + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual ScheduledQueryRule + 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_ScheduledQueryRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRule to ScheduledQueryRule via AssignProperties_To_ScheduledQueryRule & AssignProperties_From_ScheduledQueryRule returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule, ScheduledQueryRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRule tests if a specific instance of ScheduledQueryRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRule(subject ScheduledQueryRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20231201s.ScheduledQueryRule + err := copied.AssignProperties_To_ScheduledQueryRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRule + err = actual.AssignProperties_From_ScheduledQueryRule(&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_ScheduledQueryRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -613,6 +1035,48 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRule(gens map[string]gopter.Ge gens["Status"] = ScheduledQueryRule_STATUSGenerator() } +func Test_ScheduledQueryRuleCriteria_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRuleCriteria to ScheduledQueryRuleCriteria via AssignProperties_To_ScheduledQueryRuleCriteria & AssignProperties_From_ScheduledQueryRuleCriteria returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleCriteria, ScheduledQueryRuleCriteriaGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRuleCriteria tests if a specific instance of ScheduledQueryRuleCriteria can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRuleCriteria(subject ScheduledQueryRuleCriteria) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20231201s.ScheduledQueryRuleCriteria + err := copied.AssignProperties_To_ScheduledQueryRuleCriteria(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRuleCriteria + err = actual.AssignProperties_From_ScheduledQueryRuleCriteria(&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_ScheduledQueryRuleCriteria_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -674,6 +1138,48 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria(gens map[string]g gens["AllOf"] = gen.SliceOf(ConditionGenerator()) } +func Test_ScheduledQueryRuleCriteria_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRuleCriteria_STATUS to ScheduledQueryRuleCriteria_STATUS via AssignProperties_To_ScheduledQueryRuleCriteria_STATUS & AssignProperties_From_ScheduledQueryRuleCriteria_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS, ScheduledQueryRuleCriteria_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS tests if a specific instance of ScheduledQueryRuleCriteria_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS(subject ScheduledQueryRuleCriteria_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 v20231201s.ScheduledQueryRuleCriteria_STATUS + err := copied.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRuleCriteria_STATUS + err = actual.AssignProperties_From_ScheduledQueryRuleCriteria_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_ScheduledQueryRuleCriteria_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -735,6 +1241,48 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS(gens map[s gens["AllOf"] = gen.SliceOf(Condition_STATUSGenerator()) } +func Test_ScheduledQueryRuleOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRuleOperatorSpec to ScheduledQueryRuleOperatorSpec via AssignProperties_To_ScheduledQueryRuleOperatorSpec & AssignProperties_From_ScheduledQueryRuleOperatorSpec returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec, ScheduledQueryRuleOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec tests if a specific instance of ScheduledQueryRuleOperatorSpec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec(subject ScheduledQueryRuleOperatorSpec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20231201s.ScheduledQueryRuleOperatorSpec + err := copied.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRuleOperatorSpec + err = actual.AssignProperties_From_ScheduledQueryRuleOperatorSpec(&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_ScheduledQueryRuleOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -790,6 +1338,48 @@ func ScheduledQueryRuleOperatorSpecGenerator() gopter.Gen { return scheduledQueryRuleOperatorSpecGenerator } +func Test_ScheduledQueryRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRule_STATUS to ScheduledQueryRule_STATUS via AssignProperties_To_ScheduledQueryRule_STATUS & AssignProperties_From_ScheduledQueryRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule_STATUS, ScheduledQueryRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRule_STATUS tests if a specific instance of ScheduledQueryRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRule_STATUS(subject ScheduledQueryRule_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 v20231201s.ScheduledQueryRule_STATUS + err := copied.AssignProperties_To_ScheduledQueryRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRule_STATUS + err = actual.AssignProperties_From_ScheduledQueryRule_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_ScheduledQueryRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -891,6 +1481,48 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[string]go gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator()) } +func Test_ScheduledQueryRule_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRule_Spec to ScheduledQueryRule_Spec via AssignProperties_To_ScheduledQueryRule_Spec & AssignProperties_From_ScheduledQueryRule_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule_Spec, ScheduledQueryRule_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRule_Spec tests if a specific instance of ScheduledQueryRule_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRule_Spec(subject ScheduledQueryRule_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 v20231201s.ScheduledQueryRule_Spec + err := copied.AssignProperties_To_ScheduledQueryRule_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRule_Spec + err = actual.AssignProperties_From_ScheduledQueryRule_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_ScheduledQueryRule_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1003,7 +1635,7 @@ func RunPropertyAssignmentTestForSystemData_STATUS(subject SystemData_STATUS) st copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.SystemData_STATUS + var other v20221001s.SystemData_STATUS err := copied.AssignProperties_To_SystemData_STATUS(&other) 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 5a0ea549890..9d5d53ce048 100644 --- a/v2/api/insights/v1api20220615/storage/structure.txt +++ b/v2/api/insights/v1api20220615/storage/structure.txt @@ -206,4 +206,18 @@ Webtest: Resource ├── PropertyBag: genruntime.PropertyBag ├── SSLCertRemainingLifetimeCheck: *int └── SSLCheck: *bool +augmentConversionForActions: Interface +augmentConversionForActions_STATUS: Interface +augmentConversionForCondition: Interface +augmentConversionForCondition_FailingPeriods: Interface +augmentConversionForCondition_FailingPeriods_STATUS: Interface +augmentConversionForCondition_STATUS: Interface +augmentConversionForDimension: Interface +augmentConversionForDimension_STATUS: Interface +augmentConversionForScheduledQueryRule: Interface +augmentConversionForScheduledQueryRuleCriteria: Interface +augmentConversionForScheduledQueryRuleCriteria_STATUS: Interface +augmentConversionForScheduledQueryRuleOperatorSpec: Interface +augmentConversionForScheduledQueryRule_STATUS: Interface +augmentConversionForScheduledQueryRule_Spec: Interface augmentConversionForSystemData_STATUS: Interface diff --git a/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen.go b/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen.go index 24b6d25134a..57071c62b5c 100644 --- a/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen.go +++ b/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen.go @@ -4,6 +4,7 @@ package storage import ( + storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" @@ -333,6 +334,97 @@ type SystemData_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_SystemData_STATUS populates our SystemData_STATUS from the provided source SystemData_STATUS +func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *storage.SystemData_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // CreatedAt + data.CreatedAt = genruntime.ClonePointerToString(source.CreatedAt) + + // CreatedBy + data.CreatedBy = genruntime.ClonePointerToString(source.CreatedBy) + + // CreatedByType + data.CreatedByType = genruntime.ClonePointerToString(source.CreatedByType) + + // LastModifiedAt + data.LastModifiedAt = genruntime.ClonePointerToString(source.LastModifiedAt) + + // LastModifiedBy + data.LastModifiedBy = genruntime.ClonePointerToString(source.LastModifiedBy) + + // LastModifiedByType + data.LastModifiedByType = genruntime.ClonePointerToString(source.LastModifiedByType) + + // Update the property bag + if len(propertyBag) > 0 { + data.PropertyBag = propertyBag + } else { + data.PropertyBag = nil + } + + // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion + var dataAsAny any = data + if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { + err := augmentedData.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SystemData_STATUS populates the provided destination SystemData_STATUS from our SystemData_STATUS +func (data *SystemData_STATUS) AssignProperties_To_SystemData_STATUS(destination *storage.SystemData_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(data.PropertyBag) + + // CreatedAt + destination.CreatedAt = genruntime.ClonePointerToString(data.CreatedAt) + + // CreatedBy + destination.CreatedBy = genruntime.ClonePointerToString(data.CreatedBy) + + // CreatedByType + destination.CreatedByType = genruntime.ClonePointerToString(data.CreatedByType) + + // LastModifiedAt + destination.LastModifiedAt = genruntime.ClonePointerToString(data.LastModifiedAt) + + // LastModifiedBy + destination.LastModifiedBy = genruntime.ClonePointerToString(data.LastModifiedBy) + + // LastModifiedByType + destination.LastModifiedByType = genruntime.ClonePointerToString(data.LastModifiedByType) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion + var dataAsAny any = data + if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { + err := augmentedData.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForSystemData_STATUS interface { + AssignPropertiesFrom(src *storage.SystemData_STATUS) error + AssignPropertiesTo(dst *storage.SystemData_STATUS) error +} + // Storage version of v1api20221001.EmailNotification // Email notification of an autoscale event. type EmailNotification struct { diff --git a/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen_test.go b/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen_test.go index 20e3279545b..3236cea61f1 100644 --- a/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen_test.go +++ b/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen_test.go @@ -5,6 +5,7 @@ package storage import ( "encoding/json" + storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -1805,6 +1806,48 @@ func AddRelatedPropertyGeneratorsForScaleRule_STATUS(gens map[string]gopter.Gen) gens["ScaleAction"] = gen.PtrOf(ScaleAction_STATUSGenerator()) } +func Test_SystemData_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SystemData_STATUS to SystemData_STATUS via AssignProperties_To_SystemData_STATUS & AssignProperties_From_SystemData_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSystemData_STATUS, SystemData_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSystemData_STATUS tests if a specific instance of SystemData_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSystemData_STATUS(subject SystemData_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.SystemData_STATUS + err := copied.AssignProperties_To_SystemData_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SystemData_STATUS + err = actual.AssignProperties_From_SystemData_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_SystemData_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/insights/v1api20221001/storage/structure.txt b/v2/api/insights/v1api20221001/storage/structure.txt index 29ce98e61e4..f8dd2eca521 100644 --- a/v2/api/insights/v1api20221001/storage/structure.txt +++ b/v2/api/insights/v1api20221001/storage/structure.txt @@ -168,3 +168,4 @@ AutoscaleSetting: Resource ├── TargetResourceLocation: *string ├── TargetResourceUri: *string └── Type: *string +augmentConversionForSystemData_STATUS: Interface diff --git a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen.go b/v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen.go new file mode 100644 index 00000000000..62637e3ae50 --- /dev/null +++ b/v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen.go @@ -0,0 +1,286 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type ScheduledQueryRule_Spec struct { + // Identity: The identity of the resource. + Identity *Identity `json:"identity,omitempty"` + + // Kind: Indicates the type of scheduled query rule. The default is LogAlert. + Kind *ScheduledQueryRule_Kind_Spec `json:"kind,omitempty"` + + // Location: The geo-location where the resource lives + Location *string `json:"location,omitempty"` + Name string `json:"name,omitempty"` + + // Properties: The rule properties of the resource. + Properties *ScheduledQueryRuleProperties `json:"properties,omitempty"` + + // Tags: Resource tags. + Tags map[string]string `json:"tags,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &ScheduledQueryRule_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-12-01" +func (rule ScheduledQueryRule_Spec) GetAPIVersion() string { + return "2023-12-01" +} + +// GetName returns the Name of the resource +func (rule *ScheduledQueryRule_Spec) GetName() string { + return rule.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Insights/scheduledQueryRules" +func (rule *ScheduledQueryRule_Spec) GetType() string { + return "Microsoft.Insights/scheduledQueryRules" +} + +// Identity for the resource. +type Identity struct { + // Type: Type of managed service identity. + Type *Identity_Type `json:"type,omitempty"` + UserAssignedIdentities map[string]UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` +} + +// +kubebuilder:validation:Enum={"LogAlert","LogToMetric"} +type ScheduledQueryRule_Kind_Spec string + +const ( + ScheduledQueryRule_Kind_Spec_LogAlert = ScheduledQueryRule_Kind_Spec("LogAlert") + ScheduledQueryRule_Kind_Spec_LogToMetric = ScheduledQueryRule_Kind_Spec("LogToMetric") +) + +// Mapping from string to ScheduledQueryRule_Kind_Spec +var scheduledQueryRule_Kind_Spec_Values = map[string]ScheduledQueryRule_Kind_Spec{ + "logalert": ScheduledQueryRule_Kind_Spec_LogAlert, + "logtometric": ScheduledQueryRule_Kind_Spec_LogToMetric, +} + +// scheduled query rule Definition +type ScheduledQueryRuleProperties struct { + // Actions: Actions to invoke when the alert fires. + Actions *Actions `json:"actions,omitempty"` + + // AutoMitigate: The flag that indicates whether the alert should be automatically resolved or not. The default is true. + // Relevant only for rules of the kind LogAlert. + AutoMitigate *bool `json:"autoMitigate,omitempty"` + + // CheckWorkspaceAlertsStorageConfigured: The flag which indicates whether this scheduled query rule should be stored in + // the customer's storage. The default is false. Relevant only for rules of the kind LogAlert. + CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` + + // Criteria: The rule criteria that defines the conditions of the scheduled query rule. + Criteria *ScheduledQueryRuleCriteria `json:"criteria,omitempty"` + + // Description: The description of the scheduled query rule. + Description *string `json:"description,omitempty"` + + // DisplayName: The display name of the alert rule + DisplayName *string `json:"displayName,omitempty"` + + // Enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false + Enabled *bool `json:"enabled,omitempty"` + + // EvaluationFrequency: How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant + // and required only for rules of the kind LogAlert. + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + + // MuteActionsDuration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. + // Relevant only for rules of the kind LogAlert. + MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` + + // OverrideQueryTimeRange: If specified then overrides the query time range (default is + // WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert. + OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"` + + // ResolveConfiguration: Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert. + ResolveConfiguration *RuleResolveConfiguration `json:"resolveConfiguration,omitempty"` + Scopes []string `json:"scopes,omitempty"` + + // Severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only + // for rules of the kind LogAlert. + Severity *ScheduledQueryRuleProperties_Severity `json:"severity,omitempty"` + + // SkipQueryValidation: The flag which indicates whether the provided query should be validated or not. The default is + // false. Relevant only for rules of the kind LogAlert. + SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` + + // TargetResourceTypes: List of resource type of the target resource(s) on which the alert is created/updated. For example + // if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert + // will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of + // the kind LogAlert + TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` + + // WindowSize: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). + // Relevant and required only for rules of the kind LogAlert. + WindowSize *string `json:"windowSize,omitempty"` +} + +// Actions to invoke when the alert fires. +type Actions struct { + ActionGroups []string `json:"actionGroups,omitempty"` + + // ActionProperties: The properties of an action properties. + ActionProperties map[string]string `json:"actionProperties,omitempty"` + + // CustomProperties: The properties of an alert payload. + CustomProperties map[string]string `json:"customProperties,omitempty"` +} + +// +kubebuilder:validation:Enum={"None","SystemAssigned","UserAssigned"} +type Identity_Type string + +const ( + Identity_Type_None = Identity_Type("None") + Identity_Type_SystemAssigned = Identity_Type("SystemAssigned") + Identity_Type_UserAssigned = Identity_Type("UserAssigned") +) + +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, + "userassigned": Identity_Type_UserAssigned, +} + +// TBD. Relevant only for rules of the kind LogAlert. +type RuleResolveConfiguration struct { + // AutoResolved: The flag that indicates whether or not to auto resolve a fired alert. + AutoResolved *bool `json:"autoResolved,omitempty"` + + // TimeToResolve: The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented + // in ISO 8601 duration format. + TimeToResolve *string `json:"timeToResolve,omitempty"` +} + +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria struct { + // AllOf: A list of conditions to evaluate against the specified scopes + AllOf []Condition `json:"allOf,omitempty"` +} + +// +kubebuilder:validation:Enum={0,1,2,3,4} +type ScheduledQueryRuleProperties_Severity int + +const ( + ScheduledQueryRuleProperties_Severity_0 = ScheduledQueryRuleProperties_Severity(0) + ScheduledQueryRuleProperties_Severity_1 = ScheduledQueryRuleProperties_Severity(1) + ScheduledQueryRuleProperties_Severity_2 = ScheduledQueryRuleProperties_Severity(2) + ScheduledQueryRuleProperties_Severity_3 = ScheduledQueryRuleProperties_Severity(3) + ScheduledQueryRuleProperties_Severity_4 = ScheduledQueryRuleProperties_Severity(4) +) + +// Information about the user assigned identity for the resource +type UserAssignedIdentityDetails struct { +} + +// A condition of the scheduled query rule. +type Condition struct { + // Dimensions: List of Dimensions conditions + Dimensions []Dimension `json:"dimensions,omitempty"` + + // FailingPeriods: The minimum number of violations required within the selected lookback time window required to raise an + // alert. Relevant only for rules of the kind LogAlert. + FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` + + // MetricMeasureColumn: The column containing the metric measure number. Relevant only for rules of the kind LogAlert. + MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` + + // MetricName: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric. + MetricName *string `json:"metricName,omitempty"` + + // Operator: The criteria operator. Relevant and required only for rules of the kind LogAlert. + Operator *Condition_Operator `json:"operator,omitempty"` + + // Query: Log query alert + Query *string `json:"query,omitempty"` + ResourceIdColumn *string `json:"resourceIdColumn,omitempty"` + + // Threshold: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind + // LogAlert. + Threshold *float64 `json:"threshold,omitempty"` + + // TimeAggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert. + TimeAggregation *Condition_TimeAggregation `json:"timeAggregation,omitempty"` +} + +type Condition_FailingPeriods struct { + // MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to + // numberOfEvaluationPeriods. Default value is 1 + MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` + + // NumberOfEvaluationPeriods: The number of aggregated lookback points. The lookback time window is calculated based on the + // aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1 + NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` +} + +// +kubebuilder:validation:Enum={"Equals","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual"} +type Condition_Operator string + +const ( + Condition_Operator_Equals = Condition_Operator("Equals") + Condition_Operator_GreaterThan = Condition_Operator("GreaterThan") + Condition_Operator_GreaterThanOrEqual = Condition_Operator("GreaterThanOrEqual") + Condition_Operator_LessThan = Condition_Operator("LessThan") + Condition_Operator_LessThanOrEqual = Condition_Operator("LessThanOrEqual") +) + +// Mapping from string to Condition_Operator +var condition_Operator_Values = map[string]Condition_Operator{ + "equals": Condition_Operator_Equals, + "greaterthan": Condition_Operator_GreaterThan, + "greaterthanorequal": Condition_Operator_GreaterThanOrEqual, + "lessthan": Condition_Operator_LessThan, + "lessthanorequal": Condition_Operator_LessThanOrEqual, +} + +// +kubebuilder:validation:Enum={"Average","Count","Maximum","Minimum","Total"} +type Condition_TimeAggregation string + +const ( + Condition_TimeAggregation_Average = Condition_TimeAggregation("Average") + Condition_TimeAggregation_Count = Condition_TimeAggregation("Count") + Condition_TimeAggregation_Maximum = Condition_TimeAggregation("Maximum") + Condition_TimeAggregation_Minimum = Condition_TimeAggregation("Minimum") + Condition_TimeAggregation_Total = Condition_TimeAggregation("Total") +) + +// Mapping from string to Condition_TimeAggregation +var condition_TimeAggregation_Values = map[string]Condition_TimeAggregation{ + "average": Condition_TimeAggregation_Average, + "count": Condition_TimeAggregation_Count, + "maximum": Condition_TimeAggregation_Maximum, + "minimum": Condition_TimeAggregation_Minimum, + "total": Condition_TimeAggregation_Total, +} + +// Dimension splitting and filtering definition +type Dimension struct { + // Name: Name of the dimension + Name *string `json:"name,omitempty"` + + // Operator: Operator for dimension values + Operator *Dimension_Operator `json:"operator,omitempty"` + + // Values: List of dimension values + Values []string `json:"values,omitempty"` +} + +// +kubebuilder:validation:Enum={"Exclude","Include"} +type Dimension_Operator string + +const ( + Dimension_Operator_Exclude = Dimension_Operator("Exclude") + Dimension_Operator_Include = Dimension_Operator("Include") +) + +// Mapping from string to Dimension_Operator +var dimension_Operator_Values = map[string]Dimension_Operator{ + "exclude": Dimension_Operator_Exclude, + "include": Dimension_Operator_Include, +} diff --git a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen_test.go b/v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen_test.go new file mode 100644 index 00000000000..5596c8ba01a --- /dev/null +++ b/v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen_test.go @@ -0,0 +1,728 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_Actions_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 Actions via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActions, ActionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActions runs a test to see if a specific instance of Actions round trips to JSON and back losslessly +func RunJSONSerializationTestForActions(subject Actions) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Actions + 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 Actions instances for property testing - lazily instantiated by ActionsGenerator() +var actionsGenerator gopter.Gen + +// ActionsGenerator returns a generator of Actions instances for property testing. +func ActionsGenerator() gopter.Gen { + if actionsGenerator != nil { + return actionsGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActions(generators) + actionsGenerator = gen.Struct(reflect.TypeOf(Actions{}), generators) + + return actionsGenerator +} + +// AddIndependentPropertyGeneratorsForActions is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActions(gens map[string]gopter.Gen) { + gens["ActionGroups"] = gen.SliceOf(gen.AlphaString()) + gens["ActionProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["CustomProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) +} + +func Test_Condition_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 Condition via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition, ConditionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition runs a test to see if a specific instance of Condition round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition(subject Condition) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition + 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 Condition instances for property testing - lazily instantiated by ConditionGenerator() +var conditionGenerator gopter.Gen + +// ConditionGenerator returns a generator of Condition instances for property testing. +// We first initialize conditionGenerator 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 ConditionGenerator() gopter.Gen { + if conditionGenerator != nil { + return conditionGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition(generators) + conditionGenerator = gen.Struct(reflect.TypeOf(Condition{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition(generators) + AddRelatedPropertyGeneratorsForCondition(generators) + conditionGenerator = gen.Struct(reflect.TypeOf(Condition{}), generators) + + return conditionGenerator +} + +// AddIndependentPropertyGeneratorsForCondition is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { + gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) + gens["MetricName"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.OneConstOf( + Condition_Operator_Equals, + Condition_Operator_GreaterThan, + Condition_Operator_GreaterThanOrEqual, + Condition_Operator_LessThan, + Condition_Operator_LessThanOrEqual)) + gens["Query"] = gen.PtrOf(gen.AlphaString()) + gens["ResourceIdColumn"] = gen.PtrOf(gen.AlphaString()) + gens["Threshold"] = gen.PtrOf(gen.Float64()) + gens["TimeAggregation"] = gen.PtrOf(gen.OneConstOf( + Condition_TimeAggregation_Average, + Condition_TimeAggregation_Count, + Condition_TimeAggregation_Maximum, + Condition_TimeAggregation_Minimum, + Condition_TimeAggregation_Total)) +} + +// AddRelatedPropertyGeneratorsForCondition is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { + gens["Dimensions"] = gen.SliceOf(DimensionGenerator()) + gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriodsGenerator()) +} + +func Test_Condition_FailingPeriods_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 Condition_FailingPeriods via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition_FailingPeriods, Condition_FailingPeriodsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition_FailingPeriods runs a test to see if a specific instance of Condition_FailingPeriods round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition_FailingPeriods(subject Condition_FailingPeriods) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition_FailingPeriods + 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 Condition_FailingPeriods instances for property testing - lazily instantiated by +// Condition_FailingPeriodsGenerator() +var condition_FailingPeriodsGenerator gopter.Gen + +// Condition_FailingPeriodsGenerator returns a generator of Condition_FailingPeriods instances for property testing. +func Condition_FailingPeriodsGenerator() gopter.Gen { + if condition_FailingPeriodsGenerator != nil { + return condition_FailingPeriodsGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_FailingPeriods(generators) + condition_FailingPeriodsGenerator = gen.Struct(reflect.TypeOf(Condition_FailingPeriods{}), generators) + + return condition_FailingPeriodsGenerator +} + +// AddIndependentPropertyGeneratorsForCondition_FailingPeriods is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition_FailingPeriods(gens map[string]gopter.Gen) { + gens["MinFailingPeriodsToAlert"] = gen.PtrOf(gen.Int()) + gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) +} + +func Test_Dimension_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 Dimension via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDimension, DimensionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDimension runs a test to see if a specific instance of Dimension round trips to JSON and back losslessly +func RunJSONSerializationTestForDimension(subject Dimension) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Dimension + 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 Dimension instances for property testing - lazily instantiated by DimensionGenerator() +var dimensionGenerator gopter.Gen + +// DimensionGenerator returns a generator of Dimension instances for property testing. +func DimensionGenerator() gopter.Gen { + if dimensionGenerator != nil { + return dimensionGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDimension(generators) + dimensionGenerator = gen.Struct(reflect.TypeOf(Dimension{}), generators) + + return dimensionGenerator +} + +// AddIndependentPropertyGeneratorsForDimension is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDimension(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.OneConstOf(Dimension_Operator_Exclude, Dimension_Operator_Include)) + gens["Values"] = gen.SliceOf(gen.AlphaString()) +} + +func Test_Identity_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 Identity via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity, IdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity runs a test to see if a specific instance of Identity round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity(subject Identity) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity + 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 Identity instances for property testing - lazily instantiated by IdentityGenerator() +var identityGenerator gopter.Gen + +// IdentityGenerator returns a generator of Identity instances for property testing. +// We first initialize identityGenerator 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 IdentityGenerator() gopter.Gen { + if identityGenerator != nil { + return identityGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity(generators) + identityGenerator = gen.Struct(reflect.TypeOf(Identity{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity(generators) + AddRelatedPropertyGeneratorsForIdentity(generators) + identityGenerator = gen.Struct(reflect.TypeOf(Identity{}), generators) + + return identityGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { + gens["Type"] = gen.PtrOf(gen.OneConstOf(Identity_Type_None, Identity_Type_SystemAssigned, Identity_Type_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForIdentity is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf( + gen.AlphaString(), + UserAssignedIdentityDetailsGenerator()) +} + +func Test_RuleResolveConfiguration_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 RuleResolveConfiguration via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRuleResolveConfiguration, RuleResolveConfigurationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRuleResolveConfiguration runs a test to see if a specific instance of RuleResolveConfiguration round trips to JSON and back losslessly +func RunJSONSerializationTestForRuleResolveConfiguration(subject RuleResolveConfiguration) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RuleResolveConfiguration + 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 RuleResolveConfiguration instances for property testing - lazily instantiated by +// RuleResolveConfigurationGenerator() +var ruleResolveConfigurationGenerator gopter.Gen + +// RuleResolveConfigurationGenerator returns a generator of RuleResolveConfiguration instances for property testing. +func RuleResolveConfigurationGenerator() gopter.Gen { + if ruleResolveConfigurationGenerator != nil { + return ruleResolveConfigurationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRuleResolveConfiguration(generators) + ruleResolveConfigurationGenerator = gen.Struct(reflect.TypeOf(RuleResolveConfiguration{}), generators) + + return ruleResolveConfigurationGenerator +} + +// AddIndependentPropertyGeneratorsForRuleResolveConfiguration is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRuleResolveConfiguration(gens map[string]gopter.Gen) { + gens["AutoResolved"] = gen.PtrOf(gen.Bool()) + gens["TimeToResolve"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ScheduledQueryRuleCriteria_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 ScheduledQueryRuleCriteria via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRuleCriteria, ScheduledQueryRuleCriteriaGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRuleCriteria runs a test to see if a specific instance of ScheduledQueryRuleCriteria round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRuleCriteria(subject ScheduledQueryRuleCriteria) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRuleCriteria + 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 ScheduledQueryRuleCriteria instances for property testing - lazily instantiated by +// ScheduledQueryRuleCriteriaGenerator() +var scheduledQueryRuleCriteriaGenerator gopter.Gen + +// ScheduledQueryRuleCriteriaGenerator returns a generator of ScheduledQueryRuleCriteria instances for property testing. +func ScheduledQueryRuleCriteriaGenerator() gopter.Gen { + if scheduledQueryRuleCriteriaGenerator != nil { + return scheduledQueryRuleCriteriaGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria(generators) + scheduledQueryRuleCriteriaGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleCriteria{}), generators) + + return scheduledQueryRuleCriteriaGenerator +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria(gens map[string]gopter.Gen) { + gens["AllOf"] = gen.SliceOf(ConditionGenerator()) +} + +func Test_ScheduledQueryRuleProperties_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 ScheduledQueryRuleProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRuleProperties, ScheduledQueryRulePropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRuleProperties runs a test to see if a specific instance of ScheduledQueryRuleProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRuleProperties(subject ScheduledQueryRuleProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRuleProperties + 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 ScheduledQueryRuleProperties instances for property testing - lazily instantiated by +// ScheduledQueryRulePropertiesGenerator() +var scheduledQueryRulePropertiesGenerator gopter.Gen + +// ScheduledQueryRulePropertiesGenerator returns a generator of ScheduledQueryRuleProperties instances for property testing. +// We first initialize scheduledQueryRulePropertiesGenerator 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 ScheduledQueryRulePropertiesGenerator() gopter.Gen { + if scheduledQueryRulePropertiesGenerator != nil { + return scheduledQueryRulePropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRuleProperties(generators) + scheduledQueryRulePropertiesGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleProperties{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRuleProperties(generators) + AddRelatedPropertyGeneratorsForScheduledQueryRuleProperties(generators) + scheduledQueryRulePropertiesGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleProperties{}), generators) + + return scheduledQueryRulePropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForScheduledQueryRuleProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForScheduledQueryRuleProperties(gens map[string]gopter.Gen) { + gens["AutoMitigate"] = gen.PtrOf(gen.Bool()) + gens["CheckWorkspaceAlertsStorageConfigured"] = gen.PtrOf(gen.Bool()) + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["DisplayName"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["EvaluationFrequency"] = gen.PtrOf(gen.AlphaString()) + gens["MuteActionsDuration"] = gen.PtrOf(gen.AlphaString()) + gens["OverrideQueryTimeRange"] = gen.PtrOf(gen.AlphaString()) + gens["Scopes"] = gen.SliceOf(gen.AlphaString()) + gens["Severity"] = gen.PtrOf(gen.OneConstOf( + ScheduledQueryRuleProperties_Severity_0, + ScheduledQueryRuleProperties_Severity_1, + ScheduledQueryRuleProperties_Severity_2, + ScheduledQueryRuleProperties_Severity_3, + ScheduledQueryRuleProperties_Severity_4)) + gens["SkipQueryValidation"] = gen.PtrOf(gen.Bool()) + gens["TargetResourceTypes"] = gen.SliceOf(gen.AlphaString()) + gens["WindowSize"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRuleProperties is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRuleProperties(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(ActionsGenerator()) + gens["Criteria"] = gen.PtrOf(ScheduledQueryRuleCriteriaGenerator()) + gens["ResolveConfiguration"] = gen.PtrOf(RuleResolveConfigurationGenerator()) +} + +func Test_ScheduledQueryRule_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 ScheduledQueryRule_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRule_Spec, ScheduledQueryRule_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRule_Spec runs a test to see if a specific instance of ScheduledQueryRule_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRule_Spec(subject ScheduledQueryRule_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRule_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 ScheduledQueryRule_Spec instances for property testing - lazily instantiated by +// ScheduledQueryRule_SpecGenerator() +var scheduledQueryRule_SpecGenerator gopter.Gen + +// ScheduledQueryRule_SpecGenerator returns a generator of ScheduledQueryRule_Spec instances for property testing. +// We first initialize scheduledQueryRule_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 ScheduledQueryRule_SpecGenerator() gopter.Gen { + if scheduledQueryRule_SpecGenerator != nil { + return scheduledQueryRule_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(generators) + scheduledQueryRule_SpecGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(generators) + AddRelatedPropertyGeneratorsForScheduledQueryRule_Spec(generators) + scheduledQueryRule_SpecGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_Spec{}), generators) + + return scheduledQueryRule_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(gens map[string]gopter.Gen) { + gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_Spec_LogAlert, ScheduledQueryRule_Kind_Spec_LogToMetric)) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.AlphaString() + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRule_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRule_Spec(gens map[string]gopter.Gen) { + gens["Identity"] = gen.PtrOf(IdentityGenerator()) + gens["Properties"] = gen.PtrOf(ScheduledQueryRulePropertiesGenerator()) +} + +func Test_UserAssignedIdentityDetails_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 UserAssignedIdentityDetails via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentityDetails runs a test to see if a specific instance of UserAssignedIdentityDetails round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentityDetails + 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 UserAssignedIdentityDetails instances for property testing - lazily instantiated by +// UserAssignedIdentityDetailsGenerator() +var userAssignedIdentityDetailsGenerator gopter.Gen + +// UserAssignedIdentityDetailsGenerator returns a generator of UserAssignedIdentityDetails instances for property testing. +func UserAssignedIdentityDetailsGenerator() gopter.Gen { + if userAssignedIdentityDetailsGenerator != nil { + return userAssignedIdentityDetailsGenerator + } + + generators := make(map[string]gopter.Gen) + userAssignedIdentityDetailsGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentityDetails{}), generators) + + return userAssignedIdentityDetailsGenerator +} diff --git a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen.go b/v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen.go new file mode 100644 index 00000000000..f3fbbac4b3a --- /dev/null +++ b/v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen.go @@ -0,0 +1,365 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +type ScheduledQueryRule_STATUS struct { + // Etag: The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per + // the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + // HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and + // If-Range (section 14.27) header fields. + Etag *string `json:"etag,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Identity: The identity of the resource. + Identity *Identity_STATUS `json:"identity,omitempty"` + + // Kind: Indicates the type of scheduled query rule. The default is LogAlert. + Kind *ScheduledQueryRule_Kind_STATUS `json:"kind,omitempty"` + + // Location: The geo-location where the resource lives + Location *string `json:"location,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: The rule properties of the resource. + Properties *ScheduledQueryRuleProperties_STATUS `json:"properties,omitempty"` + + // SystemData: SystemData of ScheduledQueryRule. + SystemData *SystemData_STATUS `json:"systemData,omitempty"` + + // Tags: Resource tags. + Tags map[string]string `json:"tags,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// Identity for the resource. +type Identity_STATUS struct { + // PrincipalId: The principal ID of resource identity. + PrincipalId *string `json:"principalId,omitempty"` + + // TenantId: The tenant ID of resource. + TenantId *string `json:"tenantId,omitempty"` + + // Type: Type of managed service identity. + Type *Identity_Type_STATUS `json:"type,omitempty"` + + // UserAssignedIdentities: The list of user identities associated with the resource. The user identity dictionary key + // references will be ARM resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]UserIdentityProperties_STATUS `json:"userAssignedIdentities,omitempty"` +} + +type ScheduledQueryRule_Kind_STATUS string + +const ( + ScheduledQueryRule_Kind_STATUS_LogAlert = ScheduledQueryRule_Kind_STATUS("LogAlert") + ScheduledQueryRule_Kind_STATUS_LogToMetric = ScheduledQueryRule_Kind_STATUS("LogToMetric") +) + +// Mapping from string to ScheduledQueryRule_Kind_STATUS +var scheduledQueryRule_Kind_STATUS_Values = map[string]ScheduledQueryRule_Kind_STATUS{ + "logalert": ScheduledQueryRule_Kind_STATUS_LogAlert, + "logtometric": ScheduledQueryRule_Kind_STATUS_LogToMetric, +} + +// scheduled query rule Definition +type ScheduledQueryRuleProperties_STATUS struct { + // Actions: Actions to invoke when the alert fires. + Actions *Actions_STATUS `json:"actions,omitempty"` + + // AutoMitigate: The flag that indicates whether the alert should be automatically resolved or not. The default is true. + // Relevant only for rules of the kind LogAlert. + AutoMitigate *bool `json:"autoMitigate,omitempty"` + + // CheckWorkspaceAlertsStorageConfigured: The flag which indicates whether this scheduled query rule should be stored in + // the customer's storage. The default is false. Relevant only for rules of the kind LogAlert. + CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` + + // CreatedWithApiVersion: The api-version used when creating this alert rule + CreatedWithApiVersion *string `json:"createdWithApiVersion,omitempty"` + + // Criteria: The rule criteria that defines the conditions of the scheduled query rule. + Criteria *ScheduledQueryRuleCriteria_STATUS `json:"criteria,omitempty"` + + // Description: The description of the scheduled query rule. + Description *string `json:"description,omitempty"` + + // DisplayName: The display name of the alert rule + DisplayName *string `json:"displayName,omitempty"` + + // Enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false + Enabled *bool `json:"enabled,omitempty"` + + // EvaluationFrequency: How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant + // and required only for rules of the kind LogAlert. + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + + // IsLegacyLogAnalyticsRule: True if alert rule is legacy Log Analytic rule + IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty"` + + // IsWorkspaceAlertsStorageConfigured: The flag which indicates whether this scheduled query rule has been configured to be + // stored in the customer's storage. The default is false. + IsWorkspaceAlertsStorageConfigured *bool `json:"isWorkspaceAlertsStorageConfigured,omitempty"` + + // MuteActionsDuration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. + // Relevant only for rules of the kind LogAlert. + MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` + + // OverrideQueryTimeRange: If specified then overrides the query time range (default is + // WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert. + OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"` + + // ResolveConfiguration: Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert. + ResolveConfiguration *RuleResolveConfiguration_STATUS `json:"resolveConfiguration,omitempty"` + + // Scopes: The list of resource id's that this scheduled query rule is scoped to. + Scopes []string `json:"scopes,omitempty"` + + // Severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only + // for rules of the kind LogAlert. + Severity *ScheduledQueryRuleProperties_Severity_STATUS `json:"severity,omitempty"` + + // SkipQueryValidation: The flag which indicates whether the provided query should be validated or not. The default is + // false. Relevant only for rules of the kind LogAlert. + SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` + + // TargetResourceTypes: List of resource type of the target resource(s) on which the alert is created/updated. For example + // if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert + // will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of + // the kind LogAlert + TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` + + // WindowSize: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). + // Relevant and required only for rules of the kind LogAlert. + WindowSize *string `json:"windowSize,omitempty"` +} + +// Metadata pertaining to creation and last modification of the resource. +type SystemData_STATUS struct { + // CreatedAt: The timestamp of resource creation (UTC). + CreatedAt *string `json:"createdAt,omitempty"` + + // CreatedBy: The identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + + // CreatedByType: The type of identity that created the resource. + CreatedByType *SystemData_CreatedByType_STATUS `json:"createdByType,omitempty"` + + // LastModifiedAt: The timestamp of resource last modification (UTC) + LastModifiedAt *string `json:"lastModifiedAt,omitempty"` + + // LastModifiedBy: The identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + + // LastModifiedByType: The type of identity that last modified the resource. + LastModifiedByType *SystemData_LastModifiedByType_STATUS `json:"lastModifiedByType,omitempty"` +} + +// Actions to invoke when the alert fires. +type Actions_STATUS struct { + // ActionGroups: Action Group resource Ids to invoke when the alert fires. + ActionGroups []string `json:"actionGroups,omitempty"` + + // ActionProperties: The properties of an action properties. + ActionProperties map[string]string `json:"actionProperties,omitempty"` + + // CustomProperties: The properties of an alert payload. + CustomProperties map[string]string `json:"customProperties,omitempty"` +} + +type Identity_Type_STATUS string + +const ( + Identity_Type_STATUS_None = Identity_Type_STATUS("None") + Identity_Type_STATUS_SystemAssigned = Identity_Type_STATUS("SystemAssigned") + Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") +) + +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, + "userassigned": Identity_Type_STATUS_UserAssigned, +} + +// TBD. Relevant only for rules of the kind LogAlert. +type RuleResolveConfiguration_STATUS struct { + // AutoResolved: The flag that indicates whether or not to auto resolve a fired alert. + AutoResolved *bool `json:"autoResolved,omitempty"` + + // TimeToResolve: The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented + // in ISO 8601 duration format. + TimeToResolve *string `json:"timeToResolve,omitempty"` +} + +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria_STATUS struct { + // AllOf: A list of conditions to evaluate against the specified scopes + AllOf []Condition_STATUS `json:"allOf,omitempty"` +} + +type ScheduledQueryRuleProperties_Severity_STATUS int + +const ( + ScheduledQueryRuleProperties_Severity_STATUS_0 = ScheduledQueryRuleProperties_Severity_STATUS(0) + ScheduledQueryRuleProperties_Severity_STATUS_1 = ScheduledQueryRuleProperties_Severity_STATUS(1) + ScheduledQueryRuleProperties_Severity_STATUS_2 = ScheduledQueryRuleProperties_Severity_STATUS(2) + ScheduledQueryRuleProperties_Severity_STATUS_3 = ScheduledQueryRuleProperties_Severity_STATUS(3) + ScheduledQueryRuleProperties_Severity_STATUS_4 = ScheduledQueryRuleProperties_Severity_STATUS(4) +) + +type SystemData_CreatedByType_STATUS string + +const ( + SystemData_CreatedByType_STATUS_Application = SystemData_CreatedByType_STATUS("Application") + SystemData_CreatedByType_STATUS_Key = SystemData_CreatedByType_STATUS("Key") + SystemData_CreatedByType_STATUS_ManagedIdentity = SystemData_CreatedByType_STATUS("ManagedIdentity") + SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") +) + +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + +type SystemData_LastModifiedByType_STATUS string + +const ( + SystemData_LastModifiedByType_STATUS_Application = SystemData_LastModifiedByType_STATUS("Application") + SystemData_LastModifiedByType_STATUS_Key = SystemData_LastModifiedByType_STATUS("Key") + SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity") + SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") +) + +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + +// User assigned identity properties. +type UserIdentityProperties_STATUS struct { + // ClientId: The client id of user assigned identity. + ClientId *string `json:"clientId,omitempty"` + + // PrincipalId: The principal id of user assigned identity. + PrincipalId *string `json:"principalId,omitempty"` +} + +// A condition of the scheduled query rule. +type Condition_STATUS struct { + // Dimensions: List of Dimensions conditions + Dimensions []Dimension_STATUS `json:"dimensions,omitempty"` + + // FailingPeriods: The minimum number of violations required within the selected lookback time window required to raise an + // alert. Relevant only for rules of the kind LogAlert. + FailingPeriods *Condition_FailingPeriods_STATUS `json:"failingPeriods,omitempty"` + + // MetricMeasureColumn: The column containing the metric measure number. Relevant only for rules of the kind LogAlert. + MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` + + // MetricName: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric. + MetricName *string `json:"metricName,omitempty"` + + // Operator: The criteria operator. Relevant and required only for rules of the kind LogAlert. + Operator *Condition_Operator_STATUS `json:"operator,omitempty"` + + // Query: Log query alert + Query *string `json:"query,omitempty"` + + // ResourceIdColumn: The column containing the resource id. The content of the column must be a uri formatted as resource + // id. Relevant only for rules of the kind LogAlert. + ResourceIdColumn *string `json:"resourceIdColumn,omitempty"` + + // Threshold: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind + // LogAlert. + Threshold *float64 `json:"threshold,omitempty"` + + // TimeAggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert. + TimeAggregation *Condition_TimeAggregation_STATUS `json:"timeAggregation,omitempty"` +} + +type Condition_FailingPeriods_STATUS struct { + // MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to + // numberOfEvaluationPeriods. Default value is 1 + MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` + + // NumberOfEvaluationPeriods: The number of aggregated lookback points. The lookback time window is calculated based on the + // aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1 + NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` +} + +type Condition_Operator_STATUS string + +const ( + Condition_Operator_STATUS_Equals = Condition_Operator_STATUS("Equals") + Condition_Operator_STATUS_GreaterThan = Condition_Operator_STATUS("GreaterThan") + Condition_Operator_STATUS_GreaterThanOrEqual = Condition_Operator_STATUS("GreaterThanOrEqual") + Condition_Operator_STATUS_LessThan = Condition_Operator_STATUS("LessThan") + Condition_Operator_STATUS_LessThanOrEqual = Condition_Operator_STATUS("LessThanOrEqual") +) + +// Mapping from string to Condition_Operator_STATUS +var condition_Operator_STATUS_Values = map[string]Condition_Operator_STATUS{ + "equals": Condition_Operator_STATUS_Equals, + "greaterthan": Condition_Operator_STATUS_GreaterThan, + "greaterthanorequal": Condition_Operator_STATUS_GreaterThanOrEqual, + "lessthan": Condition_Operator_STATUS_LessThan, + "lessthanorequal": Condition_Operator_STATUS_LessThanOrEqual, +} + +type Condition_TimeAggregation_STATUS string + +const ( + Condition_TimeAggregation_STATUS_Average = Condition_TimeAggregation_STATUS("Average") + Condition_TimeAggregation_STATUS_Count = Condition_TimeAggregation_STATUS("Count") + Condition_TimeAggregation_STATUS_Maximum = Condition_TimeAggregation_STATUS("Maximum") + Condition_TimeAggregation_STATUS_Minimum = Condition_TimeAggregation_STATUS("Minimum") + Condition_TimeAggregation_STATUS_Total = Condition_TimeAggregation_STATUS("Total") +) + +// Mapping from string to Condition_TimeAggregation_STATUS +var condition_TimeAggregation_STATUS_Values = map[string]Condition_TimeAggregation_STATUS{ + "average": Condition_TimeAggregation_STATUS_Average, + "count": Condition_TimeAggregation_STATUS_Count, + "maximum": Condition_TimeAggregation_STATUS_Maximum, + "minimum": Condition_TimeAggregation_STATUS_Minimum, + "total": Condition_TimeAggregation_STATUS_Total, +} + +// Dimension splitting and filtering definition +type Dimension_STATUS struct { + // Name: Name of the dimension + Name *string `json:"name,omitempty"` + + // Operator: Operator for dimension values + Operator *Dimension_Operator_STATUS `json:"operator,omitempty"` + + // Values: List of dimension values + Values []string `json:"values,omitempty"` +} + +type Dimension_Operator_STATUS string + +const ( + Dimension_Operator_STATUS_Exclude = Dimension_Operator_STATUS("Exclude") + Dimension_Operator_STATUS_Include = Dimension_Operator_STATUS("Include") +) + +// Mapping from string to Dimension_Operator_STATUS +var dimension_Operator_STATUS_Values = map[string]Dimension_Operator_STATUS{ + "exclude": Dimension_Operator_STATUS_Exclude, + "include": Dimension_Operator_STATUS_Include, +} diff --git a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen_test.go b/v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen_test.go new file mode 100644 index 00000000000..b591aca4af5 --- /dev/null +++ b/v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen_test.go @@ -0,0 +1,817 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_Actions_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 Actions_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActions_STATUS, Actions_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActions_STATUS runs a test to see if a specific instance of Actions_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForActions_STATUS(subject Actions_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Actions_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 Actions_STATUS instances for property testing - lazily instantiated by Actions_STATUSGenerator() +var actions_STATUSGenerator gopter.Gen + +// Actions_STATUSGenerator returns a generator of Actions_STATUS instances for property testing. +func Actions_STATUSGenerator() gopter.Gen { + if actions_STATUSGenerator != nil { + return actions_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActions_STATUS(generators) + actions_STATUSGenerator = gen.Struct(reflect.TypeOf(Actions_STATUS{}), generators) + + return actions_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForActions_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActions_STATUS(gens map[string]gopter.Gen) { + gens["ActionGroups"] = gen.SliceOf(gen.AlphaString()) + gens["ActionProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["CustomProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) +} + +func Test_Condition_FailingPeriods_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 Condition_FailingPeriods_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition_FailingPeriods_STATUS, Condition_FailingPeriods_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition_FailingPeriods_STATUS runs a test to see if a specific instance of Condition_FailingPeriods_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition_FailingPeriods_STATUS(subject Condition_FailingPeriods_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition_FailingPeriods_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 Condition_FailingPeriods_STATUS instances for property testing - lazily instantiated by +// Condition_FailingPeriods_STATUSGenerator() +var condition_FailingPeriods_STATUSGenerator gopter.Gen + +// Condition_FailingPeriods_STATUSGenerator returns a generator of Condition_FailingPeriods_STATUS instances for property testing. +func Condition_FailingPeriods_STATUSGenerator() gopter.Gen { + if condition_FailingPeriods_STATUSGenerator != nil { + return condition_FailingPeriods_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS(generators) + condition_FailingPeriods_STATUSGenerator = gen.Struct(reflect.TypeOf(Condition_FailingPeriods_STATUS{}), generators) + + return condition_FailingPeriods_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS(gens map[string]gopter.Gen) { + gens["MinFailingPeriodsToAlert"] = gen.PtrOf(gen.Int()) + gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) +} + +func Test_Condition_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 Condition_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition_STATUS, Condition_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition_STATUS runs a test to see if a specific instance of Condition_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition_STATUS(subject Condition_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition_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 Condition_STATUS instances for property testing - lazily instantiated by Condition_STATUSGenerator() +var condition_STATUSGenerator gopter.Gen + +// Condition_STATUSGenerator returns a generator of Condition_STATUS instances for property testing. +// We first initialize condition_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 Condition_STATUSGenerator() gopter.Gen { + if condition_STATUSGenerator != nil { + return condition_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_STATUS(generators) + condition_STATUSGenerator = gen.Struct(reflect.TypeOf(Condition_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_STATUS(generators) + AddRelatedPropertyGeneratorsForCondition_STATUS(generators) + condition_STATUSGenerator = gen.Struct(reflect.TypeOf(Condition_STATUS{}), generators) + + return condition_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForCondition_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) { + gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) + gens["MetricName"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.OneConstOf( + Condition_Operator_STATUS_Equals, + Condition_Operator_STATUS_GreaterThan, + Condition_Operator_STATUS_GreaterThanOrEqual, + Condition_Operator_STATUS_LessThan, + Condition_Operator_STATUS_LessThanOrEqual)) + gens["Query"] = gen.PtrOf(gen.AlphaString()) + gens["ResourceIdColumn"] = gen.PtrOf(gen.AlphaString()) + gens["Threshold"] = gen.PtrOf(gen.Float64()) + gens["TimeAggregation"] = gen.PtrOf(gen.OneConstOf( + Condition_TimeAggregation_STATUS_Average, + Condition_TimeAggregation_STATUS_Count, + Condition_TimeAggregation_STATUS_Maximum, + Condition_TimeAggregation_STATUS_Minimum, + Condition_TimeAggregation_STATUS_Total)) +} + +// AddRelatedPropertyGeneratorsForCondition_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) { + gens["Dimensions"] = gen.SliceOf(Dimension_STATUSGenerator()) + gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriods_STATUSGenerator()) +} + +func Test_Dimension_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 Dimension_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDimension_STATUS, Dimension_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDimension_STATUS runs a test to see if a specific instance of Dimension_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDimension_STATUS(subject Dimension_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Dimension_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 Dimension_STATUS instances for property testing - lazily instantiated by Dimension_STATUSGenerator() +var dimension_STATUSGenerator gopter.Gen + +// Dimension_STATUSGenerator returns a generator of Dimension_STATUS instances for property testing. +func Dimension_STATUSGenerator() gopter.Gen { + if dimension_STATUSGenerator != nil { + return dimension_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDimension_STATUS(generators) + dimension_STATUSGenerator = gen.Struct(reflect.TypeOf(Dimension_STATUS{}), generators) + + return dimension_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDimension_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDimension_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.OneConstOf(Dimension_Operator_STATUS_Exclude, Dimension_Operator_STATUS_Include)) + gens["Values"] = gen.SliceOf(gen.AlphaString()) +} + +func Test_Identity_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 Identity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity_STATUS, Identity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity_STATUS runs a test to see if a specific instance of Identity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity_STATUS(subject Identity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity_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 Identity_STATUS instances for property testing - lazily instantiated by Identity_STATUSGenerator() +var identity_STATUSGenerator gopter.Gen + +// Identity_STATUSGenerator returns a generator of Identity_STATUS instances for property testing. +// We first initialize identity_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 Identity_STATUSGenerator() gopter.Gen { + if identity_STATUSGenerator != nil { + return identity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS(generators) + identity_STATUSGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS(generators) + AddRelatedPropertyGeneratorsForIdentity_STATUS(generators) + identity_STATUSGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS{}), generators) + + return identity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) { + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf(Identity_Type_STATUS_None, Identity_Type_STATUS_SystemAssigned, Identity_Type_STATUS_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForIdentity_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf( + gen.AlphaString(), + UserIdentityProperties_STATUSGenerator()) +} + +func Test_RuleResolveConfiguration_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 RuleResolveConfiguration_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRuleResolveConfiguration_STATUS, RuleResolveConfiguration_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRuleResolveConfiguration_STATUS runs a test to see if a specific instance of RuleResolveConfiguration_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForRuleResolveConfiguration_STATUS(subject RuleResolveConfiguration_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RuleResolveConfiguration_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 RuleResolveConfiguration_STATUS instances for property testing - lazily instantiated by +// RuleResolveConfiguration_STATUSGenerator() +var ruleResolveConfiguration_STATUSGenerator gopter.Gen + +// RuleResolveConfiguration_STATUSGenerator returns a generator of RuleResolveConfiguration_STATUS instances for property testing. +func RuleResolveConfiguration_STATUSGenerator() gopter.Gen { + if ruleResolveConfiguration_STATUSGenerator != nil { + return ruleResolveConfiguration_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRuleResolveConfiguration_STATUS(generators) + ruleResolveConfiguration_STATUSGenerator = gen.Struct(reflect.TypeOf(RuleResolveConfiguration_STATUS{}), generators) + + return ruleResolveConfiguration_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForRuleResolveConfiguration_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRuleResolveConfiguration_STATUS(gens map[string]gopter.Gen) { + gens["AutoResolved"] = gen.PtrOf(gen.Bool()) + gens["TimeToResolve"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ScheduledQueryRuleCriteria_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 ScheduledQueryRuleCriteria_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRuleCriteria_STATUS, ScheduledQueryRuleCriteria_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRuleCriteria_STATUS runs a test to see if a specific instance of ScheduledQueryRuleCriteria_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRuleCriteria_STATUS(subject ScheduledQueryRuleCriteria_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRuleCriteria_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 ScheduledQueryRuleCriteria_STATUS instances for property testing - lazily instantiated by +// ScheduledQueryRuleCriteria_STATUSGenerator() +var scheduledQueryRuleCriteria_STATUSGenerator gopter.Gen + +// ScheduledQueryRuleCriteria_STATUSGenerator returns a generator of ScheduledQueryRuleCriteria_STATUS instances for property testing. +func ScheduledQueryRuleCriteria_STATUSGenerator() gopter.Gen { + if scheduledQueryRuleCriteria_STATUSGenerator != nil { + return scheduledQueryRuleCriteria_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS(generators) + scheduledQueryRuleCriteria_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleCriteria_STATUS{}), generators) + + return scheduledQueryRuleCriteria_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS(gens map[string]gopter.Gen) { + gens["AllOf"] = gen.SliceOf(Condition_STATUSGenerator()) +} + +func Test_ScheduledQueryRuleProperties_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 ScheduledQueryRuleProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRuleProperties_STATUS, ScheduledQueryRuleProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRuleProperties_STATUS runs a test to see if a specific instance of ScheduledQueryRuleProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRuleProperties_STATUS(subject ScheduledQueryRuleProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRuleProperties_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 ScheduledQueryRuleProperties_STATUS instances for property testing - lazily instantiated by +// ScheduledQueryRuleProperties_STATUSGenerator() +var scheduledQueryRuleProperties_STATUSGenerator gopter.Gen + +// ScheduledQueryRuleProperties_STATUSGenerator returns a generator of ScheduledQueryRuleProperties_STATUS instances for property testing. +// We first initialize scheduledQueryRuleProperties_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 ScheduledQueryRuleProperties_STATUSGenerator() gopter.Gen { + if scheduledQueryRuleProperties_STATUSGenerator != nil { + return scheduledQueryRuleProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRuleProperties_STATUS(generators) + scheduledQueryRuleProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleProperties_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRuleProperties_STATUS(generators) + AddRelatedPropertyGeneratorsForScheduledQueryRuleProperties_STATUS(generators) + scheduledQueryRuleProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleProperties_STATUS{}), generators) + + return scheduledQueryRuleProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForScheduledQueryRuleProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForScheduledQueryRuleProperties_STATUS(gens map[string]gopter.Gen) { + gens["AutoMitigate"] = gen.PtrOf(gen.Bool()) + gens["CheckWorkspaceAlertsStorageConfigured"] = gen.PtrOf(gen.Bool()) + gens["CreatedWithApiVersion"] = gen.PtrOf(gen.AlphaString()) + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["DisplayName"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["EvaluationFrequency"] = gen.PtrOf(gen.AlphaString()) + gens["IsLegacyLogAnalyticsRule"] = gen.PtrOf(gen.Bool()) + gens["IsWorkspaceAlertsStorageConfigured"] = gen.PtrOf(gen.Bool()) + gens["MuteActionsDuration"] = gen.PtrOf(gen.AlphaString()) + gens["OverrideQueryTimeRange"] = gen.PtrOf(gen.AlphaString()) + gens["Scopes"] = gen.SliceOf(gen.AlphaString()) + gens["Severity"] = gen.PtrOf(gen.OneConstOf( + ScheduledQueryRuleProperties_Severity_STATUS_0, + ScheduledQueryRuleProperties_Severity_STATUS_1, + ScheduledQueryRuleProperties_Severity_STATUS_2, + ScheduledQueryRuleProperties_Severity_STATUS_3, + ScheduledQueryRuleProperties_Severity_STATUS_4)) + gens["SkipQueryValidation"] = gen.PtrOf(gen.Bool()) + gens["TargetResourceTypes"] = gen.SliceOf(gen.AlphaString()) + gens["WindowSize"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRuleProperties_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRuleProperties_STATUS(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(Actions_STATUSGenerator()) + gens["Criteria"] = gen.PtrOf(ScheduledQueryRuleCriteria_STATUSGenerator()) + gens["ResolveConfiguration"] = gen.PtrOf(RuleResolveConfiguration_STATUSGenerator()) +} + +func Test_ScheduledQueryRule_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 ScheduledQueryRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRule_STATUS, ScheduledQueryRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRule_STATUS runs a test to see if a specific instance of ScheduledQueryRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRule_STATUS(subject ScheduledQueryRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRule_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 ScheduledQueryRule_STATUS instances for property testing - lazily instantiated by +// ScheduledQueryRule_STATUSGenerator() +var scheduledQueryRule_STATUSGenerator gopter.Gen + +// ScheduledQueryRule_STATUSGenerator returns a generator of ScheduledQueryRule_STATUS instances for property testing. +// We first initialize scheduledQueryRule_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 ScheduledQueryRule_STATUSGenerator() gopter.Gen { + if scheduledQueryRule_STATUSGenerator != nil { + return scheduledQueryRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(generators) + scheduledQueryRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(generators) + AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS(generators) + scheduledQueryRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_STATUS{}), generators) + + return scheduledQueryRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[string]gopter.Gen) { + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_STATUS_LogAlert, ScheduledQueryRule_Kind_STATUS_LogToMetric)) + 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()) +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[string]gopter.Gen) { + gens["Identity"] = gen.PtrOf(Identity_STATUSGenerator()) + gens["Properties"] = gen.PtrOf(ScheduledQueryRuleProperties_STATUSGenerator()) + gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator()) +} + +func Test_SystemData_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 SystemData_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSystemData_STATUS, SystemData_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSystemData_STATUS runs a test to see if a specific instance of SystemData_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSystemData_STATUS(subject SystemData_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SystemData_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 SystemData_STATUS instances for property testing - lazily instantiated by SystemData_STATUSGenerator() +var systemData_STATUSGenerator gopter.Gen + +// SystemData_STATUSGenerator returns a generator of SystemData_STATUS instances for property testing. +func SystemData_STATUSGenerator() gopter.Gen { + if systemData_STATUSGenerator != nil { + return systemData_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSystemData_STATUS(generators) + systemData_STATUSGenerator = gen.Struct(reflect.TypeOf(SystemData_STATUS{}), generators) + + return systemData_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSystemData_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSystemData_STATUS(gens map[string]gopter.Gen) { + gens["CreatedAt"] = gen.PtrOf(gen.AlphaString()) + gens["CreatedBy"] = gen.PtrOf(gen.AlphaString()) + gens["CreatedByType"] = gen.PtrOf(gen.OneConstOf( + SystemData_CreatedByType_STATUS_Application, + SystemData_CreatedByType_STATUS_Key, + SystemData_CreatedByType_STATUS_ManagedIdentity, + SystemData_CreatedByType_STATUS_User)) + gens["LastModifiedAt"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedBy"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedByType"] = gen.PtrOf(gen.OneConstOf( + SystemData_LastModifiedByType_STATUS_Application, + SystemData_LastModifiedByType_STATUS_Key, + SystemData_LastModifiedByType_STATUS_ManagedIdentity, + SystemData_LastModifiedByType_STATUS_User)) +} + +func Test_UserIdentityProperties_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 UserIdentityProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserIdentityProperties_STATUS, UserIdentityProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserIdentityProperties_STATUS runs a test to see if a specific instance of UserIdentityProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForUserIdentityProperties_STATUS(subject UserIdentityProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserIdentityProperties_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 UserIdentityProperties_STATUS instances for property testing - lazily instantiated by +// UserIdentityProperties_STATUSGenerator() +var userIdentityProperties_STATUSGenerator gopter.Gen + +// UserIdentityProperties_STATUSGenerator returns a generator of UserIdentityProperties_STATUS instances for property testing. +func UserIdentityProperties_STATUSGenerator() gopter.Gen { + if userIdentityProperties_STATUSGenerator != nil { + return userIdentityProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForUserIdentityProperties_STATUS(generators) + userIdentityProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(UserIdentityProperties_STATUS{}), generators) + + return userIdentityProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForUserIdentityProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForUserIdentityProperties_STATUS(gens map[string]gopter.Gen) { + gens["ClientId"] = gen.PtrOf(gen.AlphaString()) + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/insights/v1api20231201/arm/structure.txt b/v2/api/insights/v1api20231201/arm/structure.txt new file mode 100644 index 00000000000..3652b64a351 --- /dev/null +++ b/v2/api/insights/v1api20231201/arm/structure.txt @@ -0,0 +1,162 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/arm +------------------------------------------------------------------------- +ScheduledQueryRule_STATUS: Object (10 properties) +├── Etag: *string +├── Id: *string +├── Identity: *Object (4 properties) +│ ├── PrincipalId: *string +│ ├── TenantId: *string +│ ├── Type: *Enum (3 values) +│ │ ├── "None" +│ │ ├── "SystemAssigned" +│ │ └── "UserAssigned" +│ └── UserAssignedIdentities: map[string]Object (2 properties) +│ ├── ClientId: *string +│ └── PrincipalId: *string +├── Kind: *Enum (2 values) +│ ├── "LogAlert" +│ └── "LogToMetric" +├── Location: *string +├── Name: *string +├── Properties: *Object (19 properties) +│ ├── Actions: *Object (3 properties) +│ │ ├── ActionGroups: string[] +│ │ ├── ActionProperties: map[string]string +│ │ └── CustomProperties: map[string]string +│ ├── AutoMitigate: *bool +│ ├── CheckWorkspaceAlertsStorageConfigured: *bool +│ ├── CreatedWithApiVersion: *string +│ ├── 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 +│ ├── IsLegacyLogAnalyticsRule: *bool +│ ├── IsWorkspaceAlertsStorageConfigured: *bool +│ ├── MuteActionsDuration: *string +│ ├── OverrideQueryTimeRange: *string +│ ├── ResolveConfiguration: *Object (2 properties) +│ │ ├── AutoResolved: *bool +│ │ └── TimeToResolve: *string +│ ├── Scopes: string[] +│ ├── Severity: *Enum (5 values) +│ │ ├── 0 +│ │ ├── 1 +│ │ ├── 2 +│ │ ├── 3 +│ │ └── 4 +│ ├── SkipQueryValidation: *bool +│ ├── TargetResourceTypes: string[] +│ └── WindowSize: *string +├── SystemData: *Object (6 properties) +│ ├── CreatedAt: *string +│ ├── CreatedBy: *string +│ ├── CreatedByType: *Enum (4 values) +│ │ ├── "Application" +│ │ ├── "Key" +│ │ ├── "ManagedIdentity" +│ │ └── "User" +│ ├── LastModifiedAt: *string +│ ├── LastModifiedBy: *string +│ └── LastModifiedByType: *Enum (4 values) +│ ├── "Application" +│ ├── "Key" +│ ├── "ManagedIdentity" +│ └── "User" +├── Tags: map[string]string +└── Type: *string +ScheduledQueryRule_Spec: Object (6 properties) +├── Identity: *Object (2 properties) +│ ├── Type: *Enum (3 values) +│ │ ├── "None" +│ │ ├── "SystemAssigned" +│ │ └── "UserAssigned" +│ └── UserAssignedIdentities: map[string]Object (0 properties) +├── Kind: *Enum (2 values) +│ ├── "LogAlert" +│ └── "LogToMetric" +├── Location: *string +├── Name: string +├── Properties: *Object (16 properties) +│ ├── Actions: *Object (3 properties) +│ │ ├── ActionGroups: string[] +│ │ ├── ActionProperties: map[string]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 +│ ├── ResolveConfiguration: *Object (2 properties) +│ │ ├── AutoResolved: *bool +│ │ └── TimeToResolve: *string +│ ├── Scopes: string[] +│ ├── Severity: *Enum (5 values) +│ │ ├── 0 +│ │ ├── 1 +│ │ ├── 2 +│ │ ├── 3 +│ │ └── 4 +│ ├── SkipQueryValidation: *bool +│ ├── TargetResourceTypes: string[] +│ └── WindowSize: *string +└── Tags: map[string]string diff --git a/v2/api/insights/v1api20231201/doc.go b/v2/api/insights/v1api20231201/doc.go new file mode 100644 index 00000000000..3b8e2c4ed48 --- /dev/null +++ b/v2/api/insights/v1api20231201/doc.go @@ -0,0 +1,10 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by azure-service-operator-codegen. DO NOT EDIT. + +// Package v1api20231201 contains API Schema definitions for the insights v1api20231201 API group +// +groupName=insights.azure.com +package v1api20231201 diff --git a/v2/api/insights/v1api20231201/groupversion_info_gen.go b/v2/api/insights/v1api20231201/groupversion_info_gen.go new file mode 100644 index 00000000000..52f4288fd05 --- /dev/null +++ b/v2/api/insights/v1api20231201/groupversion_info_gen.go @@ -0,0 +1,32 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by azure-service-operator-codegen. DO NOT EDIT. + +// Package v1api20231201 contains API Schema definitions for the insights v1api20231201 API group +// +kubebuilder:object:generate=true +// All object properties are optional by default, this will be overridden when needed: +// +kubebuilder:validation:Optional +// +groupName=insights.azure.com +// +versionName=v1api20231201 +package v1api20231201 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "insights.azure.com", Version: "v1api20231201"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = SchemeBuilder.SchemeBuilder +) diff --git a/v2/api/insights/v1api20231201/scheduled_query_rule_types_gen.go b/v2/api/insights/v1api20231201/scheduled_query_rule_types_gen.go new file mode 100644 index 00000000000..15991a5722b --- /dev/null +++ b/v2/api/insights/v1api20231201/scheduled_query_rule_types_gen.go @@ -0,0 +1,4907 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20231201 + +import ( + "fmt" + arm "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/arm" + storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/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/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/core" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets" + "github.com/rotisserie/eris" + 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: /monitor/resource-manager/Microsoft.Insights/stable/2023-12-01/scheduledQueryRule_API.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName} +type ScheduledQueryRule struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ScheduledQueryRule_Spec `json:"spec,omitempty"` + Status ScheduledQueryRule_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &ScheduledQueryRule{} + +// GetConditions returns the conditions of the resource +func (rule *ScheduledQueryRule) GetConditions() conditions.Conditions { + return rule.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (rule *ScheduledQueryRule) SetConditions(conditions conditions.Conditions) { + rule.Status.Conditions = conditions +} + +var _ conversion.Convertible = &ScheduledQueryRule{} + +// ConvertFrom populates our ScheduledQueryRule from the provided hub ScheduledQueryRule +func (rule *ScheduledQueryRule) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*storage.ScheduledQueryRule) + if !ok { + return fmt.Errorf("expected insights/v1api20231201/storage/ScheduledQueryRule but received %T instead", hub) + } + + return rule.AssignProperties_From_ScheduledQueryRule(source) +} + +// ConvertTo populates the provided hub ScheduledQueryRule from our ScheduledQueryRule +func (rule *ScheduledQueryRule) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*storage.ScheduledQueryRule) + if !ok { + return fmt.Errorf("expected insights/v1api20231201/storage/ScheduledQueryRule but received %T instead", hub) + } + + return rule.AssignProperties_To_ScheduledQueryRule(destination) +} + +// +kubebuilder:webhook:path=/mutate-insights-azure-com-v1api20231201-scheduledqueryrule,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=scheduledqueryrules,verbs=create;update,versions=v1api20231201,name=default.v1api20231201.scheduledqueryrules.insights.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &ScheduledQueryRule{} + +// Default applies defaults to the ScheduledQueryRule resource +func (rule *ScheduledQueryRule) Default() { + rule.defaultImpl() + var temp any = rule + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (rule *ScheduledQueryRule) defaultAzureName() { + if rule.Spec.AzureName == "" { + rule.Spec.AzureName = rule.Name + } +} + +// defaultImpl applies the code generated defaults to the ScheduledQueryRule resource +func (rule *ScheduledQueryRule) defaultImpl() { rule.defaultAzureName() } + +var _ configmaps.Exporter = &ScheduledQueryRule{} + +// ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property +func (rule *ScheduledQueryRule) ConfigMapDestinationExpressions() []*core.DestinationExpression { + if rule.Spec.OperatorSpec == nil { + return nil + } + return rule.Spec.OperatorSpec.ConfigMapExpressions +} + +var _ secrets.Exporter = &ScheduledQueryRule{} + +// SecretDestinationExpressions returns the Spec.OperatorSpec.SecretExpressions property +func (rule *ScheduledQueryRule) SecretDestinationExpressions() []*core.DestinationExpression { + if rule.Spec.OperatorSpec == nil { + return nil + } + return rule.Spec.OperatorSpec.SecretExpressions +} + +var _ genruntime.ImportableResource = &ScheduledQueryRule{} + +// InitializeSpec initializes the spec for this resource from the given status +func (rule *ScheduledQueryRule) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*ScheduledQueryRule_STATUS); ok { + return rule.Spec.Initialize_From_ScheduledQueryRule_STATUS(s) + } + + return fmt.Errorf("expected Status of type ScheduledQueryRule_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &ScheduledQueryRule{} + +// AzureName returns the Azure name of the resource +func (rule *ScheduledQueryRule) AzureName() string { + return rule.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-12-01" +func (rule ScheduledQueryRule) GetAPIVersion() string { + return "2023-12-01" +} + +// GetResourceScope returns the scope of the resource +func (rule *ScheduledQueryRule) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (rule *ScheduledQueryRule) GetSpec() genruntime.ConvertibleSpec { + return &rule.Spec +} + +// GetStatus returns the status of this resource +func (rule *ScheduledQueryRule) GetStatus() genruntime.ConvertibleStatus { + return &rule.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (rule *ScheduledQueryRule) 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/scheduledQueryRules" +func (rule *ScheduledQueryRule) GetType() string { + return "Microsoft.Insights/scheduledQueryRules" +} + +// NewEmptyStatus returns a new empty (blank) status +func (rule *ScheduledQueryRule) NewEmptyStatus() genruntime.ConvertibleStatus { + return &ScheduledQueryRule_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (rule *ScheduledQueryRule) Owner() *genruntime.ResourceReference { + if rule.Spec.Owner == nil { + return nil + } + + group, kind := genruntime.LookupOwnerGroupKind(rule.Spec) + return rule.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (rule *ScheduledQueryRule) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*ScheduledQueryRule_STATUS); ok { + rule.Status = *st + return nil + } + + // Convert status to required version + var st ScheduledQueryRule_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return eris.Wrap(err, "failed to convert status") + } + + rule.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-insights-azure-com-v1api20231201-scheduledqueryrule,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=scheduledqueryrules,verbs=create;update,versions=v1api20231201,name=validate.v1api20231201.scheduledqueryrules.insights.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &ScheduledQueryRule{} + +// ValidateCreate validates the creation of the resource +func (rule *ScheduledQueryRule) ValidateCreate() (admission.Warnings, error) { + validations := rule.createValidations() + var temp any = rule + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (rule *ScheduledQueryRule) ValidateDelete() (admission.Warnings, error) { + validations := rule.deleteValidations() + var temp any = rule + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (rule *ScheduledQueryRule) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := rule.updateValidations() + var temp any = rule + 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 (rule *ScheduledQueryRule) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){rule.validateResourceReferences, rule.validateOwnerReference, rule.validateSecretDestinations, rule.validateConfigMapDestinations} +} + +// deleteValidations validates the deletion of the resource +func (rule *ScheduledQueryRule) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (rule *ScheduledQueryRule) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return rule.validateResourceReferences() + }, + rule.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return rule.validateOwnerReference() + }, + func(old runtime.Object) (admission.Warnings, error) { + return rule.validateSecretDestinations() + }, + func(old runtime.Object) (admission.Warnings, error) { + return rule.validateConfigMapDestinations() + }, + } +} + +// validateConfigMapDestinations validates there are no colliding genruntime.ConfigMapDestinations +func (rule *ScheduledQueryRule) validateConfigMapDestinations() (admission.Warnings, error) { + if rule.Spec.OperatorSpec == nil { + return nil, nil + } + return configmaps.ValidateDestinations(rule, nil, rule.Spec.OperatorSpec.ConfigMapExpressions) +} + +// validateOwnerReference validates the owner field +func (rule *ScheduledQueryRule) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(rule) +} + +// validateResourceReferences validates all resource references +func (rule *ScheduledQueryRule) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&rule.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateSecretDestinations validates there are no colliding genruntime.SecretDestination's +func (rule *ScheduledQueryRule) validateSecretDestinations() (admission.Warnings, error) { + if rule.Spec.OperatorSpec == nil { + return nil, nil + } + return secrets.ValidateDestinations(rule, nil, rule.Spec.OperatorSpec.SecretExpressions) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (rule *ScheduledQueryRule) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*ScheduledQueryRule) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, rule) +} + +// AssignProperties_From_ScheduledQueryRule populates our ScheduledQueryRule from the provided source ScheduledQueryRule +func (rule *ScheduledQueryRule) AssignProperties_From_ScheduledQueryRule(source *storage.ScheduledQueryRule) error { + + // ObjectMeta + rule.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec ScheduledQueryRule_Spec + err := spec.AssignProperties_From_ScheduledQueryRule_Spec(&source.Spec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRule_Spec() to populate field Spec") + } + rule.Spec = spec + + // Status + var status ScheduledQueryRule_STATUS + err = status.AssignProperties_From_ScheduledQueryRule_STATUS(&source.Status) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRule_STATUS() to populate field Status") + } + rule.Status = status + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRule populates the provided destination ScheduledQueryRule from our ScheduledQueryRule +func (rule *ScheduledQueryRule) AssignProperties_To_ScheduledQueryRule(destination *storage.ScheduledQueryRule) error { + + // ObjectMeta + destination.ObjectMeta = *rule.ObjectMeta.DeepCopy() + + // Spec + var spec storage.ScheduledQueryRule_Spec + err := rule.Spec.AssignProperties_To_ScheduledQueryRule_Spec(&spec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRule_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status storage.ScheduledQueryRule_STATUS + err = rule.Status.AssignProperties_To_ScheduledQueryRule_STATUS(&status) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRule_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 (rule *ScheduledQueryRule) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: rule.Spec.OriginalVersion(), + Kind: "ScheduledQueryRule", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /monitor/resource-manager/Microsoft.Insights/stable/2023-12-01/scheduledQueryRule_API.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName} +type ScheduledQueryRuleList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ScheduledQueryRule `json:"items"` +} + +// +kubebuilder:validation:Enum={"2023-12-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2023-12-01") + +type ScheduledQueryRule_Spec struct { + // Actions: Actions to invoke when the alert fires. + Actions *Actions `json:"actions,omitempty"` + + // AutoMitigate: The flag that indicates whether the alert should be automatically resolved or not. The default is true. + // Relevant only for rules of the kind LogAlert. + AutoMitigate *bool `json:"autoMitigate,omitempty"` + + // +kubebuilder:validation:Pattern="^[^#<>%&:\\?/{}*]{1,260}$" + // 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"` + + // CheckWorkspaceAlertsStorageConfigured: The flag which indicates whether this scheduled query rule should be stored in + // the customer's storage. The default is false. Relevant only for rules of the kind LogAlert. + CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` + + // Criteria: The rule criteria that defines the conditions of the scheduled query rule. + Criteria *ScheduledQueryRuleCriteria `json:"criteria,omitempty"` + + // Description: The description of the scheduled query rule. + Description *string `json:"description,omitempty"` + + // DisplayName: The display name of the alert rule + DisplayName *string `json:"displayName,omitempty"` + + // Enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false + Enabled *bool `json:"enabled,omitempty"` + + // EvaluationFrequency: How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant + // and required only for rules of the kind LogAlert. + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + + // Identity: The identity of the resource. + Identity *Identity `json:"identity,omitempty"` + + // Kind: Indicates the type of scheduled query rule. The default is LogAlert. + Kind *ScheduledQueryRule_Kind_Spec `json:"kind,omitempty"` + + // +kubebuilder:validation:Required + // Location: The geo-location where the resource lives + Location *string `json:"location,omitempty"` + + // MuteActionsDuration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. + // Relevant only for rules of the kind LogAlert. + MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` + + // OperatorSpec: The specification for configuring operator behavior. This field is interpreted by the operator and not + // passed directly to Azure + OperatorSpec *ScheduledQueryRuleOperatorSpec `json:"operatorSpec,omitempty"` + + // OverrideQueryTimeRange: If specified then overrides the query time range (default is + // WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert. + OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,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"` + + // ResolveConfiguration: Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert. + ResolveConfiguration *RuleResolveConfiguration `json:"resolveConfiguration,omitempty"` + + // ScopesReferences: The list of resource id's that this scheduled query rule is scoped to. + ScopesReferences []genruntime.ResourceReference `armReference:"Scopes" json:"scopesReferences,omitempty"` + + // Severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only + // for rules of the kind LogAlert. + Severity *ScheduledQueryRuleProperties_Severity `json:"severity,omitempty"` + + // SkipQueryValidation: The flag which indicates whether the provided query should be validated or not. The default is + // false. Relevant only for rules of the kind LogAlert. + SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` + + // Tags: Resource tags. + Tags map[string]string `json:"tags,omitempty"` + + // TargetResourceTypes: List of resource type of the target resource(s) on which the alert is created/updated. For example + // if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert + // will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of + // the kind LogAlert + TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` + + // WindowSize: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). + // Relevant and required only for rules of the kind LogAlert. + WindowSize *string `json:"windowSize,omitempty"` +} + +var _ genruntime.ARMTransformer = &ScheduledQueryRule_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (rule *ScheduledQueryRule_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if rule == nil { + return nil, nil + } + result := &arm.ScheduledQueryRule_Spec{} + + // Set property "Identity": + if rule.Identity != nil { + identity_ARM, err := (*rule.Identity).ConvertToARM(resolved) + if err != nil { + return nil, err + } + identity := *identity_ARM.(*arm.Identity) + result.Identity = &identity + } + + // Set property "Kind": + if rule.Kind != nil { + var temp string + temp = string(*rule.Kind) + kind := arm.ScheduledQueryRule_Kind_Spec(temp) + result.Kind = &kind + } + + // Set property "Location": + if rule.Location != nil { + location := *rule.Location + result.Location = &location + } + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if rule.Actions != nil || + rule.AutoMitigate != nil || + rule.CheckWorkspaceAlertsStorageConfigured != nil || + rule.Criteria != nil || + rule.Description != nil || + rule.DisplayName != nil || + rule.Enabled != nil || + rule.EvaluationFrequency != nil || + rule.MuteActionsDuration != nil || + rule.OverrideQueryTimeRange != nil || + rule.ResolveConfiguration != nil || + rule.ScopesReferences != nil || + rule.Severity != nil || + rule.SkipQueryValidation != nil || + rule.TargetResourceTypes != nil || + rule.WindowSize != nil { + result.Properties = &arm.ScheduledQueryRuleProperties{} + } + if rule.Actions != nil { + actions_ARM, err := (*rule.Actions).ConvertToARM(resolved) + if err != nil { + return nil, err + } + actions := *actions_ARM.(*arm.Actions) + result.Properties.Actions = &actions + } + if rule.AutoMitigate != nil { + autoMitigate := *rule.AutoMitigate + result.Properties.AutoMitigate = &autoMitigate + } + if rule.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *rule.CheckWorkspaceAlertsStorageConfigured + result.Properties.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } + if rule.Criteria != nil { + criteria_ARM, err := (*rule.Criteria).ConvertToARM(resolved) + if err != nil { + return nil, err + } + criteria := *criteria_ARM.(*arm.ScheduledQueryRuleCriteria) + result.Properties.Criteria = &criteria + } + if rule.Description != nil { + description := *rule.Description + result.Properties.Description = &description + } + if rule.DisplayName != nil { + displayName := *rule.DisplayName + result.Properties.DisplayName = &displayName + } + if rule.Enabled != nil { + enabled := *rule.Enabled + result.Properties.Enabled = &enabled + } + if rule.EvaluationFrequency != nil { + evaluationFrequency := *rule.EvaluationFrequency + result.Properties.EvaluationFrequency = &evaluationFrequency + } + if rule.MuteActionsDuration != nil { + muteActionsDuration := *rule.MuteActionsDuration + result.Properties.MuteActionsDuration = &muteActionsDuration + } + if rule.OverrideQueryTimeRange != nil { + overrideQueryTimeRange := *rule.OverrideQueryTimeRange + result.Properties.OverrideQueryTimeRange = &overrideQueryTimeRange + } + if rule.ResolveConfiguration != nil { + resolveConfiguration_ARM, err := (*rule.ResolveConfiguration).ConvertToARM(resolved) + if err != nil { + return nil, err + } + resolveConfiguration := *resolveConfiguration_ARM.(*arm.RuleResolveConfiguration) + result.Properties.ResolveConfiguration = &resolveConfiguration + } + for _, item := range rule.ScopesReferences { + itemARMID, err := resolved.ResolvedReferences.Lookup(item) + if err != nil { + return nil, err + } + result.Properties.Scopes = append(result.Properties.Scopes, itemARMID) + } + if rule.Severity != nil { + var temp int + temp = int(*rule.Severity) + severity := arm.ScheduledQueryRuleProperties_Severity(temp) + result.Properties.Severity = &severity + } + if rule.SkipQueryValidation != nil { + skipQueryValidation := *rule.SkipQueryValidation + result.Properties.SkipQueryValidation = &skipQueryValidation + } + for _, item := range rule.TargetResourceTypes { + result.Properties.TargetResourceTypes = append(result.Properties.TargetResourceTypes, item) + } + if rule.WindowSize != nil { + windowSize := *rule.WindowSize + result.Properties.WindowSize = &windowSize + } + + // Set property "Tags": + if rule.Tags != nil { + result.Tags = make(map[string]string, len(rule.Tags)) + for key, value := range rule.Tags { + result.Tags[key] = value + } + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *ScheduledQueryRule_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.ScheduledQueryRule_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *ScheduledQueryRule_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.ScheduledQueryRule_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ScheduledQueryRule_Spec, got %T", armInput) + } + + // Set property "Actions": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Actions != nil { + var actions1 Actions + err := actions1.PopulateFromARM(owner, *typedInput.Properties.Actions) + if err != nil { + return err + } + actions := actions1 + rule.Actions = &actions + } + } + + // Set property "AutoMitigate": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AutoMitigate != nil { + autoMitigate := *typedInput.Properties.AutoMitigate + rule.AutoMitigate = &autoMitigate + } + } + + // Set property "AzureName": + rule.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "CheckWorkspaceAlertsStorageConfigured": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *typedInput.Properties.CheckWorkspaceAlertsStorageConfigured + rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } + } + + // Set property "Criteria": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Criteria != nil { + var criteria1 ScheduledQueryRuleCriteria + err := criteria1.PopulateFromARM(owner, *typedInput.Properties.Criteria) + if err != nil { + return err + } + criteria := criteria1 + rule.Criteria = &criteria + } + } + + // Set property "Description": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Description != nil { + description := *typedInput.Properties.Description + rule.Description = &description + } + } + + // Set property "DisplayName": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DisplayName != nil { + displayName := *typedInput.Properties.DisplayName + rule.DisplayName = &displayName + } + } + + // Set property "Enabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Enabled != nil { + enabled := *typedInput.Properties.Enabled + rule.Enabled = &enabled + } + } + + // Set property "EvaluationFrequency": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.EvaluationFrequency != nil { + evaluationFrequency := *typedInput.Properties.EvaluationFrequency + rule.EvaluationFrequency = &evaluationFrequency + } + } + + // Set property "Identity": + if typedInput.Identity != nil { + var identity1 Identity + err := identity1.PopulateFromARM(owner, *typedInput.Identity) + if err != nil { + return err + } + identity := identity1 + rule.Identity = &identity + } + + // Set property "Kind": + if typedInput.Kind != nil { + var temp string + temp = string(*typedInput.Kind) + kind := ScheduledQueryRule_Kind_Spec(temp) + rule.Kind = &kind + } + + // Set property "Location": + if typedInput.Location != nil { + location := *typedInput.Location + rule.Location = &location + } + + // Set property "MuteActionsDuration": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.MuteActionsDuration != nil { + muteActionsDuration := *typedInput.Properties.MuteActionsDuration + rule.MuteActionsDuration = &muteActionsDuration + } + } + + // no assignment for property "OperatorSpec" + + // Set property "OverrideQueryTimeRange": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.OverrideQueryTimeRange != nil { + overrideQueryTimeRange := *typedInput.Properties.OverrideQueryTimeRange + rule.OverrideQueryTimeRange = &overrideQueryTimeRange + } + } + + // Set property "Owner": + rule.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "ResolveConfiguration": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ResolveConfiguration != nil { + var resolveConfiguration1 RuleResolveConfiguration + err := resolveConfiguration1.PopulateFromARM(owner, *typedInput.Properties.ResolveConfiguration) + if err != nil { + return err + } + resolveConfiguration := resolveConfiguration1 + rule.ResolveConfiguration = &resolveConfiguration + } + } + + // no assignment for property "ScopesReferences" + + // Set property "Severity": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Severity != nil { + var temp int + temp = int(*typedInput.Properties.Severity) + severity := ScheduledQueryRuleProperties_Severity(temp) + rule.Severity = &severity + } + } + + // Set property "SkipQueryValidation": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SkipQueryValidation != nil { + skipQueryValidation := *typedInput.Properties.SkipQueryValidation + rule.SkipQueryValidation = &skipQueryValidation + } + } + + // Set property "Tags": + if typedInput.Tags != nil { + rule.Tags = make(map[string]string, len(typedInput.Tags)) + for key, value := range typedInput.Tags { + rule.Tags[key] = value + } + } + + // Set property "TargetResourceTypes": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.TargetResourceTypes { + rule.TargetResourceTypes = append(rule.TargetResourceTypes, item) + } + } + + // Set property "WindowSize": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.WindowSize != nil { + windowSize := *typedInput.Properties.WindowSize + rule.WindowSize = &windowSize + } + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &ScheduledQueryRule_Spec{} + +// ConvertSpecFrom populates our ScheduledQueryRule_Spec from the provided source +func (rule *ScheduledQueryRule_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*storage.ScheduledQueryRule_Spec) + if ok { + // Populate our instance from source + return rule.AssignProperties_From_ScheduledQueryRule_Spec(src) + } + + // Convert to an intermediate form + src = &storage.ScheduledQueryRule_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = rule.AssignProperties_From_ScheduledQueryRule_Spec(src) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our ScheduledQueryRule_Spec +func (rule *ScheduledQueryRule_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*storage.ScheduledQueryRule_Spec) + if ok { + // Populate destination from our instance + return rule.AssignProperties_To_ScheduledQueryRule_Spec(dst) + } + + // Convert to an intermediate form + dst = &storage.ScheduledQueryRule_Spec{} + err := rule.AssignProperties_To_ScheduledQueryRule_Spec(dst) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_ScheduledQueryRule_Spec populates our ScheduledQueryRule_Spec from the provided source ScheduledQueryRule_Spec +func (rule *ScheduledQueryRule_Spec) AssignProperties_From_ScheduledQueryRule_Spec(source *storage.ScheduledQueryRule_Spec) error { + + // Actions + if source.Actions != nil { + var action Actions + err := action.AssignProperties_From_Actions(source.Actions) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Actions() to populate field Actions") + } + rule.Actions = &action + } else { + rule.Actions = nil + } + + // AutoMitigate + if source.AutoMitigate != nil { + autoMitigate := *source.AutoMitigate + rule.AutoMitigate = &autoMitigate + } else { + rule.AutoMitigate = nil + } + + // AzureName + rule.AzureName = source.AzureName + + // CheckWorkspaceAlertsStorageConfigured + if source.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured + rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + rule.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Criteria + if source.Criteria != nil { + var criterion ScheduledQueryRuleCriteria + err := criterion.AssignProperties_From_ScheduledQueryRuleCriteria(source.Criteria) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleCriteria() to populate field Criteria") + } + rule.Criteria = &criterion + } else { + rule.Criteria = nil + } + + // Description + rule.Description = genruntime.ClonePointerToString(source.Description) + + // DisplayName + rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // EvaluationFrequency + rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) + + // Identity + if source.Identity != nil { + var identity Identity + err := identity.AssignProperties_From_Identity(source.Identity) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Identity() to populate field Identity") + } + rule.Identity = &identity + } else { + rule.Identity = nil + } + + // Kind + if source.Kind != nil { + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, scheduledQueryRule_Kind_Spec_Values) + rule.Kind = &kindTemp + } else { + rule.Kind = nil + } + + // Location + rule.Location = genruntime.ClonePointerToString(source.Location) + + // MuteActionsDuration + rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) + + // OperatorSpec + if source.OperatorSpec != nil { + var operatorSpec ScheduledQueryRuleOperatorSpec + err := operatorSpec.AssignProperties_From_ScheduledQueryRuleOperatorSpec(source.OperatorSpec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleOperatorSpec() to populate field OperatorSpec") + } + rule.OperatorSpec = &operatorSpec + } else { + rule.OperatorSpec = nil + } + + // OverrideQueryTimeRange + rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + rule.Owner = &owner + } else { + rule.Owner = nil + } + + // ResolveConfiguration + if source.ResolveConfiguration != nil { + var resolveConfiguration RuleResolveConfiguration + err := resolveConfiguration.AssignProperties_From_RuleResolveConfiguration(source.ResolveConfiguration) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_RuleResolveConfiguration() to populate field ResolveConfiguration") + } + rule.ResolveConfiguration = &resolveConfiguration + } else { + rule.ResolveConfiguration = nil + } + + // ScopesReferences + if source.ScopesReferences != nil { + scopesReferenceList := make([]genruntime.ResourceReference, len(source.ScopesReferences)) + for scopesReferenceIndex, scopesReferenceItem := range source.ScopesReferences { + // Shadow the loop variable to avoid aliasing + scopesReferenceItem := scopesReferenceItem + scopesReferenceList[scopesReferenceIndex] = scopesReferenceItem.Copy() + } + rule.ScopesReferences = scopesReferenceList + } else { + rule.ScopesReferences = nil + } + + // Severity + if source.Severity != nil { + severity := ScheduledQueryRuleProperties_Severity(*source.Severity) + rule.Severity = &severity + } else { + rule.Severity = nil + } + + // SkipQueryValidation + if source.SkipQueryValidation != nil { + skipQueryValidation := *source.SkipQueryValidation + rule.SkipQueryValidation = &skipQueryValidation + } else { + rule.SkipQueryValidation = nil + } + + // Tags + rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // TargetResourceTypes + rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) + + // WindowSize + rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRule_Spec populates the provided destination ScheduledQueryRule_Spec from our ScheduledQueryRule_Spec +func (rule *ScheduledQueryRule_Spec) AssignProperties_To_ScheduledQueryRule_Spec(destination *storage.ScheduledQueryRule_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Actions + if rule.Actions != nil { + var action storage.Actions + err := rule.Actions.AssignProperties_To_Actions(&action) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Actions() to populate field Actions") + } + destination.Actions = &action + } else { + destination.Actions = nil + } + + // AutoMitigate + if rule.AutoMitigate != nil { + autoMitigate := *rule.AutoMitigate + destination.AutoMitigate = &autoMitigate + } else { + destination.AutoMitigate = nil + } + + // AzureName + destination.AzureName = rule.AzureName + + // CheckWorkspaceAlertsStorageConfigured + if rule.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *rule.CheckWorkspaceAlertsStorageConfigured + destination.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + destination.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Criteria + if rule.Criteria != nil { + var criterion storage.ScheduledQueryRuleCriteria + err := rule.Criteria.AssignProperties_To_ScheduledQueryRuleCriteria(&criterion) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleCriteria() to populate field Criteria") + } + destination.Criteria = &criterion + } else { + destination.Criteria = nil + } + + // Description + destination.Description = genruntime.ClonePointerToString(rule.Description) + + // DisplayName + destination.DisplayName = genruntime.ClonePointerToString(rule.DisplayName) + + // Enabled + if rule.Enabled != nil { + enabled := *rule.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // EvaluationFrequency + destination.EvaluationFrequency = genruntime.ClonePointerToString(rule.EvaluationFrequency) + + // Identity + if rule.Identity != nil { + var identity storage.Identity + err := rule.Identity.AssignProperties_To_Identity(&identity) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Identity() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // Kind + if rule.Kind != nil { + kind := string(*rule.Kind) + destination.Kind = &kind + } else { + destination.Kind = nil + } + + // Location + destination.Location = genruntime.ClonePointerToString(rule.Location) + + // MuteActionsDuration + destination.MuteActionsDuration = genruntime.ClonePointerToString(rule.MuteActionsDuration) + + // OperatorSpec + if rule.OperatorSpec != nil { + var operatorSpec storage.ScheduledQueryRuleOperatorSpec + err := rule.OperatorSpec.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&operatorSpec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleOperatorSpec() to populate field OperatorSpec") + } + destination.OperatorSpec = &operatorSpec + } else { + destination.OperatorSpec = nil + } + + // OriginalVersion + destination.OriginalVersion = rule.OriginalVersion() + + // OverrideQueryTimeRange + destination.OverrideQueryTimeRange = genruntime.ClonePointerToString(rule.OverrideQueryTimeRange) + + // Owner + if rule.Owner != nil { + owner := rule.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // ResolveConfiguration + if rule.ResolveConfiguration != nil { + var resolveConfiguration storage.RuleResolveConfiguration + err := rule.ResolveConfiguration.AssignProperties_To_RuleResolveConfiguration(&resolveConfiguration) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_RuleResolveConfiguration() to populate field ResolveConfiguration") + } + destination.ResolveConfiguration = &resolveConfiguration + } else { + destination.ResolveConfiguration = nil + } + + // ScopesReferences + if rule.ScopesReferences != nil { + scopesReferenceList := make([]genruntime.ResourceReference, len(rule.ScopesReferences)) + for scopesReferenceIndex, scopesReferenceItem := range rule.ScopesReferences { + // Shadow the loop variable to avoid aliasing + scopesReferenceItem := scopesReferenceItem + scopesReferenceList[scopesReferenceIndex] = scopesReferenceItem.Copy() + } + destination.ScopesReferences = scopesReferenceList + } else { + destination.ScopesReferences = nil + } + + // Severity + if rule.Severity != nil { + severity := int(*rule.Severity) + destination.Severity = &severity + } else { + destination.Severity = nil + } + + // SkipQueryValidation + if rule.SkipQueryValidation != nil { + skipQueryValidation := *rule.SkipQueryValidation + destination.SkipQueryValidation = &skipQueryValidation + } else { + destination.SkipQueryValidation = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(rule.Tags) + + // TargetResourceTypes + destination.TargetResourceTypes = genruntime.CloneSliceOfString(rule.TargetResourceTypes) + + // WindowSize + destination.WindowSize = genruntime.ClonePointerToString(rule.WindowSize) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ScheduledQueryRule_STATUS populates our ScheduledQueryRule_Spec from the provided source ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_Spec) Initialize_From_ScheduledQueryRule_STATUS(source *ScheduledQueryRule_STATUS) error { + + // Actions + if source.Actions != nil { + var action Actions + err := action.Initialize_From_Actions_STATUS(source.Actions) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_Actions_STATUS() to populate field Actions") + } + rule.Actions = &action + } else { + rule.Actions = nil + } + + // AutoMitigate + if source.AutoMitigate != nil { + autoMitigate := *source.AutoMitigate + rule.AutoMitigate = &autoMitigate + } else { + rule.AutoMitigate = nil + } + + // CheckWorkspaceAlertsStorageConfigured + if source.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured + rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + rule.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Criteria + if source.Criteria != nil { + var criterion ScheduledQueryRuleCriteria + err := criterion.Initialize_From_ScheduledQueryRuleCriteria_STATUS(source.Criteria) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") + } + rule.Criteria = &criterion + } else { + rule.Criteria = nil + } + + // Description + rule.Description = genruntime.ClonePointerToString(source.Description) + + // DisplayName + rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // EvaluationFrequency + rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) + + // Identity + if source.Identity != nil { + var identity Identity + err := identity.Initialize_From_Identity_STATUS(source.Identity) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_Identity_STATUS() to populate field Identity") + } + rule.Identity = &identity + } else { + rule.Identity = nil + } + + // Kind + if source.Kind != nil { + kind := genruntime.ToEnum(string(*source.Kind), scheduledQueryRule_Kind_Spec_Values) + rule.Kind = &kind + } else { + rule.Kind = nil + } + + // Location + rule.Location = genruntime.ClonePointerToString(source.Location) + + // MuteActionsDuration + rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) + + // OverrideQueryTimeRange + rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) + + // ResolveConfiguration + if source.ResolveConfiguration != nil { + var resolveConfiguration RuleResolveConfiguration + err := resolveConfiguration.Initialize_From_RuleResolveConfiguration_STATUS(source.ResolveConfiguration) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_RuleResolveConfiguration_STATUS() to populate field ResolveConfiguration") + } + rule.ResolveConfiguration = &resolveConfiguration + } else { + rule.ResolveConfiguration = nil + } + + // Severity + if source.Severity != nil { + severity := ScheduledQueryRuleProperties_Severity(*source.Severity) + rule.Severity = &severity + } else { + rule.Severity = nil + } + + // SkipQueryValidation + if source.SkipQueryValidation != nil { + skipQueryValidation := *source.SkipQueryValidation + rule.SkipQueryValidation = &skipQueryValidation + } else { + rule.SkipQueryValidation = nil + } + + // Tags + rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // TargetResourceTypes + rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) + + // WindowSize + rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (rule *ScheduledQueryRule_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (rule *ScheduledQueryRule_Spec) SetAzureName(azureName string) { rule.AzureName = azureName } + +type ScheduledQueryRule_STATUS struct { + // Actions: Actions to invoke when the alert fires. + Actions *Actions_STATUS `json:"actions,omitempty"` + + // AutoMitigate: The flag that indicates whether the alert should be automatically resolved or not. The default is true. + // Relevant only for rules of the kind LogAlert. + AutoMitigate *bool `json:"autoMitigate,omitempty"` + + // CheckWorkspaceAlertsStorageConfigured: The flag which indicates whether this scheduled query rule should be stored in + // the customer's storage. The default is false. Relevant only for rules of the kind LogAlert. + CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` + + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // CreatedWithApiVersion: The api-version used when creating this alert rule + CreatedWithApiVersion *string `json:"createdWithApiVersion,omitempty"` + + // Criteria: The rule criteria that defines the conditions of the scheduled query rule. + Criteria *ScheduledQueryRuleCriteria_STATUS `json:"criteria,omitempty"` + + // Description: The description of the scheduled query rule. + Description *string `json:"description,omitempty"` + + // DisplayName: The display name of the alert rule + DisplayName *string `json:"displayName,omitempty"` + + // Enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false + Enabled *bool `json:"enabled,omitempty"` + + // Etag: The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per + // the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + // HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and + // If-Range (section 14.27) header fields. + Etag *string `json:"etag,omitempty"` + + // EvaluationFrequency: How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant + // and required only for rules of the kind LogAlert. + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Identity: The identity of the resource. + Identity *Identity_STATUS `json:"identity,omitempty"` + + // IsLegacyLogAnalyticsRule: True if alert rule is legacy Log Analytic rule + IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty"` + + // IsWorkspaceAlertsStorageConfigured: The flag which indicates whether this scheduled query rule has been configured to be + // stored in the customer's storage. The default is false. + IsWorkspaceAlertsStorageConfigured *bool `json:"isWorkspaceAlertsStorageConfigured,omitempty"` + + // Kind: Indicates the type of scheduled query rule. The default is LogAlert. + Kind *ScheduledQueryRule_Kind_STATUS `json:"kind,omitempty"` + + // Location: The geo-location where the resource lives + Location *string `json:"location,omitempty"` + + // MuteActionsDuration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. + // Relevant only for rules of the kind LogAlert. + MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // OverrideQueryTimeRange: If specified then overrides the query time range (default is + // WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert. + OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"` + + // ResolveConfiguration: Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert. + ResolveConfiguration *RuleResolveConfiguration_STATUS `json:"resolveConfiguration,omitempty"` + + // Scopes: The list of resource id's that this scheduled query rule is scoped to. + Scopes []string `json:"scopes,omitempty"` + + // Severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only + // for rules of the kind LogAlert. + Severity *ScheduledQueryRuleProperties_Severity_STATUS `json:"severity,omitempty"` + + // SkipQueryValidation: The flag which indicates whether the provided query should be validated or not. The default is + // false. Relevant only for rules of the kind LogAlert. + SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` + + // SystemData: SystemData of ScheduledQueryRule. + SystemData *SystemData_STATUS `json:"systemData,omitempty"` + + // Tags: Resource tags. + Tags map[string]string `json:"tags,omitempty"` + + // TargetResourceTypes: List of resource type of the target resource(s) on which the alert is created/updated. For example + // if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert + // will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of + // the kind LogAlert + TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` + + // WindowSize: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). + // Relevant and required only for rules of the kind LogAlert. + WindowSize *string `json:"windowSize,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &ScheduledQueryRule_STATUS{} + +// ConvertStatusFrom populates our ScheduledQueryRule_STATUS from the provided source +func (rule *ScheduledQueryRule_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*storage.ScheduledQueryRule_STATUS) + if ok { + // Populate our instance from source + return rule.AssignProperties_From_ScheduledQueryRule_STATUS(src) + } + + // Convert to an intermediate form + src = &storage.ScheduledQueryRule_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = rule.AssignProperties_From_ScheduledQueryRule_STATUS(src) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*storage.ScheduledQueryRule_STATUS) + if ok { + // Populate destination from our instance + return rule.AssignProperties_To_ScheduledQueryRule_STATUS(dst) + } + + // Convert to an intermediate form + dst = &storage.ScheduledQueryRule_STATUS{} + err := rule.AssignProperties_To_ScheduledQueryRule_STATUS(dst) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &ScheduledQueryRule_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (rule *ScheduledQueryRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.ScheduledQueryRule_STATUS{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (rule *ScheduledQueryRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.ScheduledQueryRule_STATUS) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ScheduledQueryRule_STATUS, got %T", armInput) + } + + // Set property "Actions": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Actions != nil { + var actions1 Actions_STATUS + err := actions1.PopulateFromARM(owner, *typedInput.Properties.Actions) + if err != nil { + return err + } + actions := actions1 + rule.Actions = &actions + } + } + + // Set property "AutoMitigate": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AutoMitigate != nil { + autoMitigate := *typedInput.Properties.AutoMitigate + rule.AutoMitigate = &autoMitigate + } + } + + // Set property "CheckWorkspaceAlertsStorageConfigured": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *typedInput.Properties.CheckWorkspaceAlertsStorageConfigured + rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } + } + + // no assignment for property "Conditions" + + // Set property "CreatedWithApiVersion": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.CreatedWithApiVersion != nil { + createdWithApiVersion := *typedInput.Properties.CreatedWithApiVersion + rule.CreatedWithApiVersion = &createdWithApiVersion + } + } + + // Set property "Criteria": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Criteria != nil { + var criteria1 ScheduledQueryRuleCriteria_STATUS + err := criteria1.PopulateFromARM(owner, *typedInput.Properties.Criteria) + if err != nil { + return err + } + criteria := criteria1 + rule.Criteria = &criteria + } + } + + // Set property "Description": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Description != nil { + description := *typedInput.Properties.Description + rule.Description = &description + } + } + + // Set property "DisplayName": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.DisplayName != nil { + displayName := *typedInput.Properties.DisplayName + rule.DisplayName = &displayName + } + } + + // Set property "Enabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Enabled != nil { + enabled := *typedInput.Properties.Enabled + rule.Enabled = &enabled + } + } + + // Set property "Etag": + if typedInput.Etag != nil { + etag := *typedInput.Etag + rule.Etag = &etag + } + + // Set property "EvaluationFrequency": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.EvaluationFrequency != nil { + evaluationFrequency := *typedInput.Properties.EvaluationFrequency + rule.EvaluationFrequency = &evaluationFrequency + } + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + rule.Id = &id + } + + // Set property "Identity": + if typedInput.Identity != nil { + var identity1 Identity_STATUS + err := identity1.PopulateFromARM(owner, *typedInput.Identity) + if err != nil { + return err + } + identity := identity1 + rule.Identity = &identity + } + + // Set property "IsLegacyLogAnalyticsRule": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsLegacyLogAnalyticsRule != nil { + isLegacyLogAnalyticsRule := *typedInput.Properties.IsLegacyLogAnalyticsRule + rule.IsLegacyLogAnalyticsRule = &isLegacyLogAnalyticsRule + } + } + + // Set property "IsWorkspaceAlertsStorageConfigured": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.IsWorkspaceAlertsStorageConfigured != nil { + isWorkspaceAlertsStorageConfigured := *typedInput.Properties.IsWorkspaceAlertsStorageConfigured + rule.IsWorkspaceAlertsStorageConfigured = &isWorkspaceAlertsStorageConfigured + } + } + + // Set property "Kind": + if typedInput.Kind != nil { + var temp string + temp = string(*typedInput.Kind) + kind := ScheduledQueryRule_Kind_STATUS(temp) + rule.Kind = &kind + } + + // Set property "Location": + if typedInput.Location != nil { + location := *typedInput.Location + rule.Location = &location + } + + // Set property "MuteActionsDuration": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.MuteActionsDuration != nil { + muteActionsDuration := *typedInput.Properties.MuteActionsDuration + rule.MuteActionsDuration = &muteActionsDuration + } + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + rule.Name = &name + } + + // Set property "OverrideQueryTimeRange": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.OverrideQueryTimeRange != nil { + overrideQueryTimeRange := *typedInput.Properties.OverrideQueryTimeRange + rule.OverrideQueryTimeRange = &overrideQueryTimeRange + } + } + + // Set property "ResolveConfiguration": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ResolveConfiguration != nil { + var resolveConfiguration1 RuleResolveConfiguration_STATUS + err := resolveConfiguration1.PopulateFromARM(owner, *typedInput.Properties.ResolveConfiguration) + if err != nil { + return err + } + resolveConfiguration := resolveConfiguration1 + rule.ResolveConfiguration = &resolveConfiguration + } + } + + // Set property "Scopes": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.Scopes { + rule.Scopes = append(rule.Scopes, item) + } + } + + // Set property "Severity": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.Severity != nil { + var temp int + temp = int(*typedInput.Properties.Severity) + severity := ScheduledQueryRuleProperties_Severity_STATUS(temp) + rule.Severity = &severity + } + } + + // Set property "SkipQueryValidation": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SkipQueryValidation != nil { + skipQueryValidation := *typedInput.Properties.SkipQueryValidation + rule.SkipQueryValidation = &skipQueryValidation + } + } + + // Set property "SystemData": + if typedInput.SystemData != nil { + var systemData1 SystemData_STATUS + err := systemData1.PopulateFromARM(owner, *typedInput.SystemData) + if err != nil { + return err + } + systemData := systemData1 + rule.SystemData = &systemData + } + + // Set property "Tags": + if typedInput.Tags != nil { + rule.Tags = make(map[string]string, len(typedInput.Tags)) + for key, value := range typedInput.Tags { + rule.Tags[key] = value + } + } + + // Set property "TargetResourceTypes": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.TargetResourceTypes { + rule.TargetResourceTypes = append(rule.TargetResourceTypes, item) + } + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + rule.Type = &typeVar + } + + // Set property "WindowSize": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.WindowSize != nil { + windowSize := *typedInput.Properties.WindowSize + rule.WindowSize = &windowSize + } + } + + // No error + return nil +} + +// AssignProperties_From_ScheduledQueryRule_STATUS populates our ScheduledQueryRule_STATUS from the provided source ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) AssignProperties_From_ScheduledQueryRule_STATUS(source *storage.ScheduledQueryRule_STATUS) error { + + // Actions + if source.Actions != nil { + var action Actions_STATUS + err := action.AssignProperties_From_Actions_STATUS(source.Actions) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Actions_STATUS() to populate field Actions") + } + rule.Actions = &action + } else { + rule.Actions = nil + } + + // AutoMitigate + if source.AutoMitigate != nil { + autoMitigate := *source.AutoMitigate + rule.AutoMitigate = &autoMitigate + } else { + rule.AutoMitigate = nil + } + + // CheckWorkspaceAlertsStorageConfigured + if source.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured + rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + rule.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Conditions + rule.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // CreatedWithApiVersion + rule.CreatedWithApiVersion = genruntime.ClonePointerToString(source.CreatedWithApiVersion) + + // Criteria + if source.Criteria != nil { + var criterion ScheduledQueryRuleCriteria_STATUS + err := criterion.AssignProperties_From_ScheduledQueryRuleCriteria_STATUS(source.Criteria) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") + } + rule.Criteria = &criterion + } else { + rule.Criteria = nil + } + + // Description + rule.Description = genruntime.ClonePointerToString(source.Description) + + // DisplayName + rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // Etag + rule.Etag = genruntime.ClonePointerToString(source.Etag) + + // EvaluationFrequency + rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) + + // Id + rule.Id = genruntime.ClonePointerToString(source.Id) + + // Identity + if source.Identity != nil { + var identity Identity_STATUS + err := identity.AssignProperties_From_Identity_STATUS(source.Identity) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Identity_STATUS() to populate field Identity") + } + rule.Identity = &identity + } else { + rule.Identity = nil + } + + // IsLegacyLogAnalyticsRule + if source.IsLegacyLogAnalyticsRule != nil { + isLegacyLogAnalyticsRule := *source.IsLegacyLogAnalyticsRule + rule.IsLegacyLogAnalyticsRule = &isLegacyLogAnalyticsRule + } else { + rule.IsLegacyLogAnalyticsRule = nil + } + + // IsWorkspaceAlertsStorageConfigured + if source.IsWorkspaceAlertsStorageConfigured != nil { + isWorkspaceAlertsStorageConfigured := *source.IsWorkspaceAlertsStorageConfigured + rule.IsWorkspaceAlertsStorageConfigured = &isWorkspaceAlertsStorageConfigured + } else { + rule.IsWorkspaceAlertsStorageConfigured = nil + } + + // Kind + if source.Kind != nil { + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, scheduledQueryRule_Kind_STATUS_Values) + rule.Kind = &kindTemp + } else { + rule.Kind = nil + } + + // Location + rule.Location = genruntime.ClonePointerToString(source.Location) + + // MuteActionsDuration + rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) + + // Name + rule.Name = genruntime.ClonePointerToString(source.Name) + + // OverrideQueryTimeRange + rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) + + // ResolveConfiguration + if source.ResolveConfiguration != nil { + var resolveConfiguration RuleResolveConfiguration_STATUS + err := resolveConfiguration.AssignProperties_From_RuleResolveConfiguration_STATUS(source.ResolveConfiguration) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_RuleResolveConfiguration_STATUS() to populate field ResolveConfiguration") + } + rule.ResolveConfiguration = &resolveConfiguration + } else { + rule.ResolveConfiguration = nil + } + + // Scopes + rule.Scopes = genruntime.CloneSliceOfString(source.Scopes) + + // Severity + if source.Severity != nil { + severity := ScheduledQueryRuleProperties_Severity_STATUS(*source.Severity) + rule.Severity = &severity + } else { + rule.Severity = nil + } + + // SkipQueryValidation + if source.SkipQueryValidation != nil { + skipQueryValidation := *source.SkipQueryValidation + rule.SkipQueryValidation = &skipQueryValidation + } else { + rule.SkipQueryValidation = nil + } + + // SystemData + if source.SystemData != nil { + var systemDatum SystemData_STATUS + err := systemDatum.AssignProperties_From_SystemData_STATUS(source.SystemData) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_SystemData_STATUS() to populate field SystemData") + } + rule.SystemData = &systemDatum + } else { + rule.SystemData = nil + } + + // Tags + rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // TargetResourceTypes + rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) + + // Type + rule.Type = genruntime.ClonePointerToString(source.Type) + + // WindowSize + rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRule_STATUS populates the provided destination ScheduledQueryRule_STATUS from our ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) AssignProperties_To_ScheduledQueryRule_STATUS(destination *storage.ScheduledQueryRule_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Actions + if rule.Actions != nil { + var action storage.Actions_STATUS + err := rule.Actions.AssignProperties_To_Actions_STATUS(&action) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Actions_STATUS() to populate field Actions") + } + destination.Actions = &action + } else { + destination.Actions = nil + } + + // AutoMitigate + if rule.AutoMitigate != nil { + autoMitigate := *rule.AutoMitigate + destination.AutoMitigate = &autoMitigate + } else { + destination.AutoMitigate = nil + } + + // CheckWorkspaceAlertsStorageConfigured + if rule.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *rule.CheckWorkspaceAlertsStorageConfigured + destination.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + destination.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(rule.Conditions) + + // CreatedWithApiVersion + destination.CreatedWithApiVersion = genruntime.ClonePointerToString(rule.CreatedWithApiVersion) + + // Criteria + if rule.Criteria != nil { + var criterion storage.ScheduledQueryRuleCriteria_STATUS + err := rule.Criteria.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&criterion) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") + } + destination.Criteria = &criterion + } else { + destination.Criteria = nil + } + + // Description + destination.Description = genruntime.ClonePointerToString(rule.Description) + + // DisplayName + destination.DisplayName = genruntime.ClonePointerToString(rule.DisplayName) + + // Enabled + if rule.Enabled != nil { + enabled := *rule.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Etag + destination.Etag = genruntime.ClonePointerToString(rule.Etag) + + // EvaluationFrequency + destination.EvaluationFrequency = genruntime.ClonePointerToString(rule.EvaluationFrequency) + + // Id + destination.Id = genruntime.ClonePointerToString(rule.Id) + + // Identity + if rule.Identity != nil { + var identity storage.Identity_STATUS + err := rule.Identity.AssignProperties_To_Identity_STATUS(&identity) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Identity_STATUS() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // IsLegacyLogAnalyticsRule + if rule.IsLegacyLogAnalyticsRule != nil { + isLegacyLogAnalyticsRule := *rule.IsLegacyLogAnalyticsRule + destination.IsLegacyLogAnalyticsRule = &isLegacyLogAnalyticsRule + } else { + destination.IsLegacyLogAnalyticsRule = nil + } + + // IsWorkspaceAlertsStorageConfigured + if rule.IsWorkspaceAlertsStorageConfigured != nil { + isWorkspaceAlertsStorageConfigured := *rule.IsWorkspaceAlertsStorageConfigured + destination.IsWorkspaceAlertsStorageConfigured = &isWorkspaceAlertsStorageConfigured + } else { + destination.IsWorkspaceAlertsStorageConfigured = nil + } + + // Kind + if rule.Kind != nil { + kind := string(*rule.Kind) + destination.Kind = &kind + } else { + destination.Kind = nil + } + + // Location + destination.Location = genruntime.ClonePointerToString(rule.Location) + + // MuteActionsDuration + destination.MuteActionsDuration = genruntime.ClonePointerToString(rule.MuteActionsDuration) + + // Name + destination.Name = genruntime.ClonePointerToString(rule.Name) + + // OverrideQueryTimeRange + destination.OverrideQueryTimeRange = genruntime.ClonePointerToString(rule.OverrideQueryTimeRange) + + // ResolveConfiguration + if rule.ResolveConfiguration != nil { + var resolveConfiguration storage.RuleResolveConfiguration_STATUS + err := rule.ResolveConfiguration.AssignProperties_To_RuleResolveConfiguration_STATUS(&resolveConfiguration) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_RuleResolveConfiguration_STATUS() to populate field ResolveConfiguration") + } + destination.ResolveConfiguration = &resolveConfiguration + } else { + destination.ResolveConfiguration = nil + } + + // Scopes + destination.Scopes = genruntime.CloneSliceOfString(rule.Scopes) + + // Severity + if rule.Severity != nil { + severity := int(*rule.Severity) + destination.Severity = &severity + } else { + destination.Severity = nil + } + + // SkipQueryValidation + if rule.SkipQueryValidation != nil { + skipQueryValidation := *rule.SkipQueryValidation + destination.SkipQueryValidation = &skipQueryValidation + } else { + destination.SkipQueryValidation = nil + } + + // SystemData + if rule.SystemData != nil { + var systemDatum storage.SystemData_STATUS + err := rule.SystemData.AssignProperties_To_SystemData_STATUS(&systemDatum) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_SystemData_STATUS() to populate field SystemData") + } + destination.SystemData = &systemDatum + } else { + destination.SystemData = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(rule.Tags) + + // TargetResourceTypes + destination.TargetResourceTypes = genruntime.CloneSliceOfString(rule.TargetResourceTypes) + + // Type + destination.Type = genruntime.ClonePointerToString(rule.Type) + + // WindowSize + destination.WindowSize = genruntime.ClonePointerToString(rule.WindowSize) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Actions to invoke when the alert fires. +type Actions struct { + // ActionGroupsReferences: Action Group resource Ids to invoke when the alert fires. + ActionGroupsReferences []genruntime.ResourceReference `armReference:"ActionGroups" json:"actionGroupsReferences,omitempty"` + + // ActionProperties: The properties of an action properties. + ActionProperties map[string]string `json:"actionProperties,omitempty"` + + // CustomProperties: The properties of an alert payload. + CustomProperties map[string]string `json:"customProperties,omitempty"` +} + +var _ genruntime.ARMTransformer = &Actions{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (actions *Actions) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if actions == nil { + return nil, nil + } + result := &arm.Actions{} + + // Set property "ActionGroups": + for _, item := range actions.ActionGroupsReferences { + itemARMID, err := resolved.ResolvedReferences.Lookup(item) + if err != nil { + return nil, err + } + result.ActionGroups = append(result.ActionGroups, itemARMID) + } + + // Set property "ActionProperties": + if actions.ActionProperties != nil { + result.ActionProperties = make(map[string]string, len(actions.ActionProperties)) + for key, value := range actions.ActionProperties { + result.ActionProperties[key] = value + } + } + + // Set property "CustomProperties": + if actions.CustomProperties != nil { + result.CustomProperties = make(map[string]string, len(actions.CustomProperties)) + for key, value := range actions.CustomProperties { + result.CustomProperties[key] = value + } + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (actions *Actions) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.Actions{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (actions *Actions) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.Actions) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Actions, got %T", armInput) + } + + // no assignment for property "ActionGroupsReferences" + + // Set property "ActionProperties": + if typedInput.ActionProperties != nil { + actions.ActionProperties = make(map[string]string, len(typedInput.ActionProperties)) + for key, value := range typedInput.ActionProperties { + actions.ActionProperties[key] = value + } + } + + // Set property "CustomProperties": + if typedInput.CustomProperties != nil { + actions.CustomProperties = make(map[string]string, len(typedInput.CustomProperties)) + for key, value := range typedInput.CustomProperties { + actions.CustomProperties[key] = value + } + } + + // No error + return nil +} + +// AssignProperties_From_Actions populates our Actions from the provided source Actions +func (actions *Actions) AssignProperties_From_Actions(source *storage.Actions) error { + + // ActionGroupsReferences + if source.ActionGroupsReferences != nil { + actionGroupsReferenceList := make([]genruntime.ResourceReference, len(source.ActionGroupsReferences)) + for actionGroupsReferenceIndex, actionGroupsReferenceItem := range source.ActionGroupsReferences { + // Shadow the loop variable to avoid aliasing + actionGroupsReferenceItem := actionGroupsReferenceItem + actionGroupsReferenceList[actionGroupsReferenceIndex] = actionGroupsReferenceItem.Copy() + } + actions.ActionGroupsReferences = actionGroupsReferenceList + } else { + actions.ActionGroupsReferences = nil + } + + // ActionProperties + actions.ActionProperties = genruntime.CloneMapOfStringToString(source.ActionProperties) + + // CustomProperties + actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) + + // No error + return nil +} + +// AssignProperties_To_Actions populates the provided destination Actions from our Actions +func (actions *Actions) AssignProperties_To_Actions(destination *storage.Actions) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ActionGroupsReferences + if actions.ActionGroupsReferences != nil { + actionGroupsReferenceList := make([]genruntime.ResourceReference, len(actions.ActionGroupsReferences)) + for actionGroupsReferenceIndex, actionGroupsReferenceItem := range actions.ActionGroupsReferences { + // Shadow the loop variable to avoid aliasing + actionGroupsReferenceItem := actionGroupsReferenceItem + actionGroupsReferenceList[actionGroupsReferenceIndex] = actionGroupsReferenceItem.Copy() + } + destination.ActionGroupsReferences = actionGroupsReferenceList + } else { + destination.ActionGroupsReferences = nil + } + + // ActionProperties + destination.ActionProperties = genruntime.CloneMapOfStringToString(actions.ActionProperties) + + // CustomProperties + destination.CustomProperties = genruntime.CloneMapOfStringToString(actions.CustomProperties) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_Actions_STATUS populates our Actions from the provided source Actions_STATUS +func (actions *Actions) Initialize_From_Actions_STATUS(source *Actions_STATUS) error { + + // ActionProperties + actions.ActionProperties = genruntime.CloneMapOfStringToString(source.ActionProperties) + + // CustomProperties + actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) + + // No error + return nil +} + +// Actions to invoke when the alert fires. +type Actions_STATUS struct { + // ActionGroups: Action Group resource Ids to invoke when the alert fires. + ActionGroups []string `json:"actionGroups,omitempty"` + + // ActionProperties: The properties of an action properties. + ActionProperties map[string]string `json:"actionProperties,omitempty"` + + // CustomProperties: The properties of an alert payload. + CustomProperties map[string]string `json:"customProperties,omitempty"` +} + +var _ genruntime.FromARMConverter = &Actions_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (actions *Actions_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.Actions_STATUS{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (actions *Actions_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.Actions_STATUS) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Actions_STATUS, got %T", armInput) + } + + // Set property "ActionGroups": + for _, item := range typedInput.ActionGroups { + actions.ActionGroups = append(actions.ActionGroups, item) + } + + // Set property "ActionProperties": + if typedInput.ActionProperties != nil { + actions.ActionProperties = make(map[string]string, len(typedInput.ActionProperties)) + for key, value := range typedInput.ActionProperties { + actions.ActionProperties[key] = value + } + } + + // Set property "CustomProperties": + if typedInput.CustomProperties != nil { + actions.CustomProperties = make(map[string]string, len(typedInput.CustomProperties)) + for key, value := range typedInput.CustomProperties { + actions.CustomProperties[key] = value + } + } + + // No error + return nil +} + +// AssignProperties_From_Actions_STATUS populates our Actions_STATUS from the provided source Actions_STATUS +func (actions *Actions_STATUS) AssignProperties_From_Actions_STATUS(source *storage.Actions_STATUS) error { + + // ActionGroups + actions.ActionGroups = genruntime.CloneSliceOfString(source.ActionGroups) + + // ActionProperties + actions.ActionProperties = genruntime.CloneMapOfStringToString(source.ActionProperties) + + // CustomProperties + actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) + + // No error + return nil +} + +// AssignProperties_To_Actions_STATUS populates the provided destination Actions_STATUS from our Actions_STATUS +func (actions *Actions_STATUS) AssignProperties_To_Actions_STATUS(destination *storage.Actions_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ActionGroups + destination.ActionGroups = genruntime.CloneSliceOfString(actions.ActionGroups) + + // ActionProperties + destination.ActionProperties = genruntime.CloneMapOfStringToString(actions.ActionProperties) + + // CustomProperties + destination.CustomProperties = genruntime.CloneMapOfStringToString(actions.CustomProperties) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Identity for the resource. +type Identity struct { + // +kubebuilder:validation:Required + // Type: Type of managed service identity. + Type *Identity_Type `json:"type,omitempty"` + + // UserAssignedIdentities: The list of user identities associated with the resource. The user identity dictionary key + // references will be ARM resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` +} + +var _ genruntime.ARMTransformer = &Identity{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (identity *Identity) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if identity == nil { + return nil, nil + } + result := &arm.Identity{} + + // Set property "Type": + if identity.Type != nil { + var temp string + temp = string(*identity.Type) + typeVar := arm.Identity_Type(temp) + result.Type = &typeVar + } + + // Set property "UserAssignedIdentities": + result.UserAssignedIdentities = make(map[string]arm.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities)) + for _, ident := range identity.UserAssignedIdentities { + identARMID, err := resolved.ResolvedReferences.Lookup(ident.Reference) + if err != nil { + return nil, err + } + key := identARMID + result.UserAssignedIdentities[key] = arm.UserAssignedIdentityDetails{} + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identity *Identity) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.Identity{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identity *Identity) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.Identity) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Identity, got %T", armInput) + } + + // Set property "Type": + if typedInput.Type != nil { + var temp string + temp = string(*typedInput.Type) + typeVar := Identity_Type(temp) + identity.Type = &typeVar + } + + // no assignment for property "UserAssignedIdentities" + + // No error + return nil +} + +// AssignProperties_From_Identity populates our Identity from the provided source Identity +func (identity *Identity) AssignProperties_From_Identity(source *storage.Identity) error { + + // Type + if source.Type != nil { + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp + } else { + identity.Type = nil + } + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]UserAssignedIdentityDetails, len(source.UserAssignedIdentities)) + for userAssignedIdentityIndex, userAssignedIdentityItem := range source.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityItem := userAssignedIdentityItem + var userAssignedIdentity UserAssignedIdentityDetails + err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentityDetails(&userAssignedIdentityItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentityDetails() to populate field UserAssignedIdentities") + } + userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity + } + identity.UserAssignedIdentities = userAssignedIdentityList + } else { + identity.UserAssignedIdentities = nil + } + + // No error + return nil +} + +// AssignProperties_To_Identity populates the provided destination Identity from our Identity +func (identity *Identity) AssignProperties_To_Identity(destination *storage.Identity) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Type + if identity.Type != nil { + typeVar := string(*identity.Type) + destination.Type = &typeVar + } else { + destination.Type = nil + } + + // UserAssignedIdentities + if identity.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]storage.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities)) + for userAssignedIdentityIndex, userAssignedIdentityItem := range identity.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityItem := userAssignedIdentityItem + var userAssignedIdentity storage.UserAssignedIdentityDetails + err := userAssignedIdentityItem.AssignProperties_To_UserAssignedIdentityDetails(&userAssignedIdentity) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentityDetails() to populate field UserAssignedIdentities") + } + userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity + } + destination.UserAssignedIdentities = userAssignedIdentityList + } else { + destination.UserAssignedIdentities = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_Identity_STATUS populates our Identity from the provided source Identity_STATUS +func (identity *Identity) Initialize_From_Identity_STATUS(source *Identity_STATUS) error { + + // Type + if source.Type != nil { + typeVar := genruntime.ToEnum(string(*source.Type), identity_Type_Values) + identity.Type = &typeVar + } else { + identity.Type = nil + } + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]UserAssignedIdentityDetails, 0, len(source.UserAssignedIdentities)) + for userAssignedIdentitiesKey := range source.UserAssignedIdentities { + userAssignedIdentitiesRef := genruntime.CreateResourceReferenceFromARMID(userAssignedIdentitiesKey) + userAssignedIdentityList = append(userAssignedIdentityList, UserAssignedIdentityDetails{Reference: userAssignedIdentitiesRef}) + } + identity.UserAssignedIdentities = userAssignedIdentityList + } else { + identity.UserAssignedIdentities = nil + } + + // No error + return nil +} + +// Identity for the resource. +type Identity_STATUS struct { + // PrincipalId: The principal ID of resource identity. + PrincipalId *string `json:"principalId,omitempty"` + + // TenantId: The tenant ID of resource. + TenantId *string `json:"tenantId,omitempty"` + + // Type: Type of managed service identity. + Type *Identity_Type_STATUS `json:"type,omitempty"` + + // UserAssignedIdentities: The list of user identities associated with the resource. The user identity dictionary key + // references will be ARM resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]UserIdentityProperties_STATUS `json:"userAssignedIdentities,omitempty"` +} + +var _ genruntime.FromARMConverter = &Identity_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identity *Identity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.Identity_STATUS{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identity *Identity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.Identity_STATUS) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Identity_STATUS, got %T", armInput) + } + + // Set property "PrincipalId": + if typedInput.PrincipalId != nil { + principalId := *typedInput.PrincipalId + identity.PrincipalId = &principalId + } + + // Set property "TenantId": + if typedInput.TenantId != nil { + tenantId := *typedInput.TenantId + identity.TenantId = &tenantId + } + + // Set property "Type": + if typedInput.Type != nil { + var temp string + temp = string(*typedInput.Type) + typeVar := Identity_Type_STATUS(temp) + identity.Type = &typeVar + } + + // Set property "UserAssignedIdentities": + if typedInput.UserAssignedIdentities != nil { + identity.UserAssignedIdentities = make(map[string]UserIdentityProperties_STATUS, len(typedInput.UserAssignedIdentities)) + for key, value := range typedInput.UserAssignedIdentities { + var value1 UserIdentityProperties_STATUS + err := value1.PopulateFromARM(owner, value) + if err != nil { + return err + } + identity.UserAssignedIdentities[key] = value1 + } + } + + // No error + return nil +} + +// AssignProperties_From_Identity_STATUS populates our Identity_STATUS from the provided source Identity_STATUS +func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *storage.Identity_STATUS) error { + + // PrincipalId + identity.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId) + + // TenantId + identity.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // Type + if source.Type != nil { + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp + } else { + identity.Type = nil + } + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityMap := make(map[string]UserIdentityProperties_STATUS, len(source.UserAssignedIdentities)) + for userAssignedIdentityKey, userAssignedIdentityValue := range source.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityValue := userAssignedIdentityValue + var userAssignedIdentity UserIdentityProperties_STATUS + err := userAssignedIdentity.AssignProperties_From_UserIdentityProperties_STATUS(&userAssignedIdentityValue) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_UserIdentityProperties_STATUS() to populate field UserAssignedIdentities") + } + userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity + } + identity.UserAssignedIdentities = userAssignedIdentityMap + } else { + identity.UserAssignedIdentities = nil + } + + // No error + return nil +} + +// AssignProperties_To_Identity_STATUS populates the provided destination Identity_STATUS from our Identity_STATUS +func (identity *Identity_STATUS) AssignProperties_To_Identity_STATUS(destination *storage.Identity_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // PrincipalId + destination.PrincipalId = genruntime.ClonePointerToString(identity.PrincipalId) + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(identity.TenantId) + + // Type + if identity.Type != nil { + typeVar := string(*identity.Type) + destination.Type = &typeVar + } else { + destination.Type = nil + } + + // UserAssignedIdentities + if identity.UserAssignedIdentities != nil { + userAssignedIdentityMap := make(map[string]storage.UserIdentityProperties_STATUS, len(identity.UserAssignedIdentities)) + for userAssignedIdentityKey, userAssignedIdentityValue := range identity.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityValue := userAssignedIdentityValue + var userAssignedIdentity storage.UserIdentityProperties_STATUS + err := userAssignedIdentityValue.AssignProperties_To_UserIdentityProperties_STATUS(&userAssignedIdentity) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_UserIdentityProperties_STATUS() to populate field UserAssignedIdentities") + } + userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity + } + destination.UserAssignedIdentities = userAssignedIdentityMap + } else { + destination.UserAssignedIdentities = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// TBD. Relevant only for rules of the kind LogAlert. +type RuleResolveConfiguration struct { + // AutoResolved: The flag that indicates whether or not to auto resolve a fired alert. + AutoResolved *bool `json:"autoResolved,omitempty"` + + // TimeToResolve: The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented + // in ISO 8601 duration format. + TimeToResolve *string `json:"timeToResolve,omitempty"` +} + +var _ genruntime.ARMTransformer = &RuleResolveConfiguration{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (configuration *RuleResolveConfiguration) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if configuration == nil { + return nil, nil + } + result := &arm.RuleResolveConfiguration{} + + // Set property "AutoResolved": + if configuration.AutoResolved != nil { + autoResolved := *configuration.AutoResolved + result.AutoResolved = &autoResolved + } + + // Set property "TimeToResolve": + if configuration.TimeToResolve != nil { + timeToResolve := *configuration.TimeToResolve + result.TimeToResolve = &timeToResolve + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (configuration *RuleResolveConfiguration) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.RuleResolveConfiguration{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (configuration *RuleResolveConfiguration) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.RuleResolveConfiguration) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.RuleResolveConfiguration, got %T", armInput) + } + + // Set property "AutoResolved": + if typedInput.AutoResolved != nil { + autoResolved := *typedInput.AutoResolved + configuration.AutoResolved = &autoResolved + } + + // Set property "TimeToResolve": + if typedInput.TimeToResolve != nil { + timeToResolve := *typedInput.TimeToResolve + configuration.TimeToResolve = &timeToResolve + } + + // No error + return nil +} + +// AssignProperties_From_RuleResolveConfiguration populates our RuleResolveConfiguration from the provided source RuleResolveConfiguration +func (configuration *RuleResolveConfiguration) AssignProperties_From_RuleResolveConfiguration(source *storage.RuleResolveConfiguration) error { + + // AutoResolved + if source.AutoResolved != nil { + autoResolved := *source.AutoResolved + configuration.AutoResolved = &autoResolved + } else { + configuration.AutoResolved = nil + } + + // TimeToResolve + configuration.TimeToResolve = genruntime.ClonePointerToString(source.TimeToResolve) + + // No error + return nil +} + +// AssignProperties_To_RuleResolveConfiguration populates the provided destination RuleResolveConfiguration from our RuleResolveConfiguration +func (configuration *RuleResolveConfiguration) AssignProperties_To_RuleResolveConfiguration(destination *storage.RuleResolveConfiguration) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AutoResolved + if configuration.AutoResolved != nil { + autoResolved := *configuration.AutoResolved + destination.AutoResolved = &autoResolved + } else { + destination.AutoResolved = nil + } + + // TimeToResolve + destination.TimeToResolve = genruntime.ClonePointerToString(configuration.TimeToResolve) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_RuleResolveConfiguration_STATUS populates our RuleResolveConfiguration from the provided source RuleResolveConfiguration_STATUS +func (configuration *RuleResolveConfiguration) Initialize_From_RuleResolveConfiguration_STATUS(source *RuleResolveConfiguration_STATUS) error { + + // AutoResolved + if source.AutoResolved != nil { + autoResolved := *source.AutoResolved + configuration.AutoResolved = &autoResolved + } else { + configuration.AutoResolved = nil + } + + // TimeToResolve + configuration.TimeToResolve = genruntime.ClonePointerToString(source.TimeToResolve) + + // No error + return nil +} + +// TBD. Relevant only for rules of the kind LogAlert. +type RuleResolveConfiguration_STATUS struct { + // AutoResolved: The flag that indicates whether or not to auto resolve a fired alert. + AutoResolved *bool `json:"autoResolved,omitempty"` + + // TimeToResolve: The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented + // in ISO 8601 duration format. + TimeToResolve *string `json:"timeToResolve,omitempty"` +} + +var _ genruntime.FromARMConverter = &RuleResolveConfiguration_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (configuration *RuleResolveConfiguration_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.RuleResolveConfiguration_STATUS{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (configuration *RuleResolveConfiguration_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.RuleResolveConfiguration_STATUS) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.RuleResolveConfiguration_STATUS, got %T", armInput) + } + + // Set property "AutoResolved": + if typedInput.AutoResolved != nil { + autoResolved := *typedInput.AutoResolved + configuration.AutoResolved = &autoResolved + } + + // Set property "TimeToResolve": + if typedInput.TimeToResolve != nil { + timeToResolve := *typedInput.TimeToResolve + configuration.TimeToResolve = &timeToResolve + } + + // No error + return nil +} + +// AssignProperties_From_RuleResolveConfiguration_STATUS populates our RuleResolveConfiguration_STATUS from the provided source RuleResolveConfiguration_STATUS +func (configuration *RuleResolveConfiguration_STATUS) AssignProperties_From_RuleResolveConfiguration_STATUS(source *storage.RuleResolveConfiguration_STATUS) error { + + // AutoResolved + if source.AutoResolved != nil { + autoResolved := *source.AutoResolved + configuration.AutoResolved = &autoResolved + } else { + configuration.AutoResolved = nil + } + + // TimeToResolve + configuration.TimeToResolve = genruntime.ClonePointerToString(source.TimeToResolve) + + // No error + return nil +} + +// AssignProperties_To_RuleResolveConfiguration_STATUS populates the provided destination RuleResolveConfiguration_STATUS from our RuleResolveConfiguration_STATUS +func (configuration *RuleResolveConfiguration_STATUS) AssignProperties_To_RuleResolveConfiguration_STATUS(destination *storage.RuleResolveConfiguration_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AutoResolved + if configuration.AutoResolved != nil { + autoResolved := *configuration.AutoResolved + destination.AutoResolved = &autoResolved + } else { + destination.AutoResolved = nil + } + + // TimeToResolve + destination.TimeToResolve = genruntime.ClonePointerToString(configuration.TimeToResolve) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"LogAlert","LogToMetric"} +type ScheduledQueryRule_Kind_Spec string + +const ( + ScheduledQueryRule_Kind_Spec_LogAlert = ScheduledQueryRule_Kind_Spec("LogAlert") + ScheduledQueryRule_Kind_Spec_LogToMetric = ScheduledQueryRule_Kind_Spec("LogToMetric") +) + +// Mapping from string to ScheduledQueryRule_Kind_Spec +var scheduledQueryRule_Kind_Spec_Values = map[string]ScheduledQueryRule_Kind_Spec{ + "logalert": ScheduledQueryRule_Kind_Spec_LogAlert, + "logtometric": ScheduledQueryRule_Kind_Spec_LogToMetric, +} + +type ScheduledQueryRule_Kind_STATUS string + +const ( + ScheduledQueryRule_Kind_STATUS_LogAlert = ScheduledQueryRule_Kind_STATUS("LogAlert") + ScheduledQueryRule_Kind_STATUS_LogToMetric = ScheduledQueryRule_Kind_STATUS("LogToMetric") +) + +// Mapping from string to ScheduledQueryRule_Kind_STATUS +var scheduledQueryRule_Kind_STATUS_Values = map[string]ScheduledQueryRule_Kind_STATUS{ + "logalert": ScheduledQueryRule_Kind_STATUS_LogAlert, + "logtometric": ScheduledQueryRule_Kind_STATUS_LogToMetric, +} + +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria struct { + // AllOf: A list of conditions to evaluate against the specified scopes + AllOf []Condition `json:"allOf,omitempty"` +} + +var _ genruntime.ARMTransformer = &ScheduledQueryRuleCriteria{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (criteria *ScheduledQueryRuleCriteria) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if criteria == nil { + return nil, nil + } + result := &arm.ScheduledQueryRuleCriteria{} + + // Set property "AllOf": + for _, item := range criteria.AllOf { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.AllOf = append(result.AllOf, *item_ARM.(*arm.Condition)) + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (criteria *ScheduledQueryRuleCriteria) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.ScheduledQueryRuleCriteria{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (criteria *ScheduledQueryRuleCriteria) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.ScheduledQueryRuleCriteria) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ScheduledQueryRuleCriteria, got %T", armInput) + } + + // Set property "AllOf": + for _, item := range typedInput.AllOf { + var item1 Condition + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + criteria.AllOf = append(criteria.AllOf, item1) + } + + // No error + return nil +} + +// AssignProperties_From_ScheduledQueryRuleCriteria populates our ScheduledQueryRuleCriteria from the provided source ScheduledQueryRuleCriteria +func (criteria *ScheduledQueryRuleCriteria) AssignProperties_From_ScheduledQueryRuleCriteria(source *storage.ScheduledQueryRuleCriteria) error { + + // AllOf + if source.AllOf != nil { + allOfList := make([]Condition, len(source.AllOf)) + for allOfIndex, allOfItem := range source.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf Condition + err := allOf.AssignProperties_From_Condition(&allOfItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + criteria.AllOf = allOfList + } else { + criteria.AllOf = nil + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRuleCriteria populates the provided destination ScheduledQueryRuleCriteria from our ScheduledQueryRuleCriteria +func (criteria *ScheduledQueryRuleCriteria) AssignProperties_To_ScheduledQueryRuleCriteria(destination *storage.ScheduledQueryRuleCriteria) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllOf + if criteria.AllOf != nil { + allOfList := make([]storage.Condition, len(criteria.AllOf)) + for allOfIndex, allOfItem := range criteria.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf storage.Condition + err := allOfItem.AssignProperties_To_Condition(&allOf) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + destination.AllOf = allOfList + } else { + destination.AllOf = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ScheduledQueryRuleCriteria_STATUS populates our ScheduledQueryRuleCriteria from the provided source ScheduledQueryRuleCriteria_STATUS +func (criteria *ScheduledQueryRuleCriteria) Initialize_From_ScheduledQueryRuleCriteria_STATUS(source *ScheduledQueryRuleCriteria_STATUS) error { + + // AllOf + if source.AllOf != nil { + allOfList := make([]Condition, len(source.AllOf)) + for allOfIndex, allOfItem := range source.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf Condition + err := allOf.Initialize_From_Condition_STATUS(&allOfItem) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_Condition_STATUS() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + criteria.AllOf = allOfList + } else { + criteria.AllOf = nil + } + + // No error + return nil +} + +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria_STATUS struct { + // AllOf: A list of conditions to evaluate against the specified scopes + AllOf []Condition_STATUS `json:"allOf,omitempty"` +} + +var _ genruntime.FromARMConverter = &ScheduledQueryRuleCriteria_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (criteria *ScheduledQueryRuleCriteria_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.ScheduledQueryRuleCriteria_STATUS{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (criteria *ScheduledQueryRuleCriteria_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.ScheduledQueryRuleCriteria_STATUS) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ScheduledQueryRuleCriteria_STATUS, got %T", armInput) + } + + // Set property "AllOf": + for _, item := range typedInput.AllOf { + var item1 Condition_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + criteria.AllOf = append(criteria.AllOf, item1) + } + + // No error + return nil +} + +// AssignProperties_From_ScheduledQueryRuleCriteria_STATUS populates our ScheduledQueryRuleCriteria_STATUS from the provided source ScheduledQueryRuleCriteria_STATUS +func (criteria *ScheduledQueryRuleCriteria_STATUS) AssignProperties_From_ScheduledQueryRuleCriteria_STATUS(source *storage.ScheduledQueryRuleCriteria_STATUS) error { + + // AllOf + if source.AllOf != nil { + allOfList := make([]Condition_STATUS, len(source.AllOf)) + for allOfIndex, allOfItem := range source.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf Condition_STATUS + err := allOf.AssignProperties_From_Condition_STATUS(&allOfItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition_STATUS() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + criteria.AllOf = allOfList + } else { + criteria.AllOf = nil + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRuleCriteria_STATUS populates the provided destination ScheduledQueryRuleCriteria_STATUS from our ScheduledQueryRuleCriteria_STATUS +func (criteria *ScheduledQueryRuleCriteria_STATUS) AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(destination *storage.ScheduledQueryRuleCriteria_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AllOf + if criteria.AllOf != nil { + allOfList := make([]storage.Condition_STATUS, len(criteria.AllOf)) + for allOfIndex, allOfItem := range criteria.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf storage.Condition_STATUS + err := allOfItem.AssignProperties_To_Condition_STATUS(&allOf) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition_STATUS() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + destination.AllOf = allOfList + } else { + destination.AllOf = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type ScheduledQueryRuleOperatorSpec struct { + // ConfigMapExpressions: configures where to place operator written dynamic ConfigMaps (created with CEL expressions). + ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"` + + // SecretExpressions: configures where to place operator written dynamic secrets (created with CEL expressions). + SecretExpressions []*core.DestinationExpression `json:"secretExpressions,omitempty"` +} + +// AssignProperties_From_ScheduledQueryRuleOperatorSpec populates our ScheduledQueryRuleOperatorSpec from the provided source ScheduledQueryRuleOperatorSpec +func (operator *ScheduledQueryRuleOperatorSpec) AssignProperties_From_ScheduledQueryRuleOperatorSpec(source *storage.ScheduledQueryRuleOperatorSpec) error { + + // ConfigMapExpressions + if source.ConfigMapExpressions != nil { + configMapExpressionList := make([]*core.DestinationExpression, len(source.ConfigMapExpressions)) + for configMapExpressionIndex, configMapExpressionItem := range source.ConfigMapExpressions { + // Shadow the loop variable to avoid aliasing + configMapExpressionItem := configMapExpressionItem + if configMapExpressionItem != nil { + configMapExpression := *configMapExpressionItem.DeepCopy() + configMapExpressionList[configMapExpressionIndex] = &configMapExpression + } else { + configMapExpressionList[configMapExpressionIndex] = nil + } + } + operator.ConfigMapExpressions = configMapExpressionList + } else { + operator.ConfigMapExpressions = nil + } + + // SecretExpressions + if source.SecretExpressions != nil { + secretExpressionList := make([]*core.DestinationExpression, len(source.SecretExpressions)) + for secretExpressionIndex, secretExpressionItem := range source.SecretExpressions { + // Shadow the loop variable to avoid aliasing + secretExpressionItem := secretExpressionItem + if secretExpressionItem != nil { + secretExpression := *secretExpressionItem.DeepCopy() + secretExpressionList[secretExpressionIndex] = &secretExpression + } else { + secretExpressionList[secretExpressionIndex] = nil + } + } + operator.SecretExpressions = secretExpressionList + } else { + operator.SecretExpressions = nil + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRuleOperatorSpec populates the provided destination ScheduledQueryRuleOperatorSpec from our ScheduledQueryRuleOperatorSpec +func (operator *ScheduledQueryRuleOperatorSpec) AssignProperties_To_ScheduledQueryRuleOperatorSpec(destination *storage.ScheduledQueryRuleOperatorSpec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ConfigMapExpressions + if operator.ConfigMapExpressions != nil { + configMapExpressionList := make([]*core.DestinationExpression, len(operator.ConfigMapExpressions)) + for configMapExpressionIndex, configMapExpressionItem := range operator.ConfigMapExpressions { + // Shadow the loop variable to avoid aliasing + configMapExpressionItem := configMapExpressionItem + if configMapExpressionItem != nil { + configMapExpression := *configMapExpressionItem.DeepCopy() + configMapExpressionList[configMapExpressionIndex] = &configMapExpression + } else { + configMapExpressionList[configMapExpressionIndex] = nil + } + } + destination.ConfigMapExpressions = configMapExpressionList + } else { + destination.ConfigMapExpressions = nil + } + + // SecretExpressions + if operator.SecretExpressions != nil { + secretExpressionList := make([]*core.DestinationExpression, len(operator.SecretExpressions)) + for secretExpressionIndex, secretExpressionItem := range operator.SecretExpressions { + // Shadow the loop variable to avoid aliasing + secretExpressionItem := secretExpressionItem + if secretExpressionItem != nil { + secretExpression := *secretExpressionItem.DeepCopy() + secretExpressionList[secretExpressionIndex] = &secretExpression + } else { + secretExpressionList[secretExpressionIndex] = nil + } + } + destination.SecretExpressions = secretExpressionList + } else { + destination.SecretExpressions = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={0,1,2,3,4} +type ScheduledQueryRuleProperties_Severity int + +const ( + ScheduledQueryRuleProperties_Severity_0 = ScheduledQueryRuleProperties_Severity(0) + ScheduledQueryRuleProperties_Severity_1 = ScheduledQueryRuleProperties_Severity(1) + ScheduledQueryRuleProperties_Severity_2 = ScheduledQueryRuleProperties_Severity(2) + ScheduledQueryRuleProperties_Severity_3 = ScheduledQueryRuleProperties_Severity(3) + ScheduledQueryRuleProperties_Severity_4 = ScheduledQueryRuleProperties_Severity(4) +) + +type ScheduledQueryRuleProperties_Severity_STATUS int + +const ( + ScheduledQueryRuleProperties_Severity_STATUS_0 = ScheduledQueryRuleProperties_Severity_STATUS(0) + ScheduledQueryRuleProperties_Severity_STATUS_1 = ScheduledQueryRuleProperties_Severity_STATUS(1) + ScheduledQueryRuleProperties_Severity_STATUS_2 = ScheduledQueryRuleProperties_Severity_STATUS(2) + ScheduledQueryRuleProperties_Severity_STATUS_3 = ScheduledQueryRuleProperties_Severity_STATUS(3) + ScheduledQueryRuleProperties_Severity_STATUS_4 = ScheduledQueryRuleProperties_Severity_STATUS(4) +) + +// Metadata pertaining to creation and last modification of the resource. +type SystemData_STATUS struct { + // CreatedAt: The timestamp of resource creation (UTC). + CreatedAt *string `json:"createdAt,omitempty"` + + // CreatedBy: The identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + + // CreatedByType: The type of identity that created the resource. + CreatedByType *SystemData_CreatedByType_STATUS `json:"createdByType,omitempty"` + + // LastModifiedAt: The timestamp of resource last modification (UTC) + LastModifiedAt *string `json:"lastModifiedAt,omitempty"` + + // LastModifiedBy: The identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + + // LastModifiedByType: The type of identity that last modified the resource. + LastModifiedByType *SystemData_LastModifiedByType_STATUS `json:"lastModifiedByType,omitempty"` +} + +var _ genruntime.FromARMConverter = &SystemData_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (data *SystemData_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.SystemData_STATUS{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (data *SystemData_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.SystemData_STATUS) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.SystemData_STATUS, got %T", armInput) + } + + // Set property "CreatedAt": + if typedInput.CreatedAt != nil { + createdAt := *typedInput.CreatedAt + data.CreatedAt = &createdAt + } + + // Set property "CreatedBy": + if typedInput.CreatedBy != nil { + createdBy := *typedInput.CreatedBy + data.CreatedBy = &createdBy + } + + // Set property "CreatedByType": + if typedInput.CreatedByType != nil { + var temp string + temp = string(*typedInput.CreatedByType) + createdByType := SystemData_CreatedByType_STATUS(temp) + data.CreatedByType = &createdByType + } + + // Set property "LastModifiedAt": + if typedInput.LastModifiedAt != nil { + lastModifiedAt := *typedInput.LastModifiedAt + data.LastModifiedAt = &lastModifiedAt + } + + // Set property "LastModifiedBy": + if typedInput.LastModifiedBy != nil { + lastModifiedBy := *typedInput.LastModifiedBy + data.LastModifiedBy = &lastModifiedBy + } + + // Set property "LastModifiedByType": + if typedInput.LastModifiedByType != nil { + var temp string + temp = string(*typedInput.LastModifiedByType) + lastModifiedByType := SystemData_LastModifiedByType_STATUS(temp) + data.LastModifiedByType = &lastModifiedByType + } + + // No error + return nil +} + +// AssignProperties_From_SystemData_STATUS populates our SystemData_STATUS from the provided source SystemData_STATUS +func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *storage.SystemData_STATUS) error { + + // CreatedAt + data.CreatedAt = genruntime.ClonePointerToString(source.CreatedAt) + + // CreatedBy + data.CreatedBy = genruntime.ClonePointerToString(source.CreatedBy) + + // CreatedByType + if source.CreatedByType != nil { + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp + } else { + data.CreatedByType = nil + } + + // LastModifiedAt + data.LastModifiedAt = genruntime.ClonePointerToString(source.LastModifiedAt) + + // LastModifiedBy + data.LastModifiedBy = genruntime.ClonePointerToString(source.LastModifiedBy) + + // LastModifiedByType + if source.LastModifiedByType != nil { + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp + } else { + data.LastModifiedByType = nil + } + + // No error + return nil +} + +// AssignProperties_To_SystemData_STATUS populates the provided destination SystemData_STATUS from our SystemData_STATUS +func (data *SystemData_STATUS) AssignProperties_To_SystemData_STATUS(destination *storage.SystemData_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // CreatedAt + destination.CreatedAt = genruntime.ClonePointerToString(data.CreatedAt) + + // CreatedBy + destination.CreatedBy = genruntime.ClonePointerToString(data.CreatedBy) + + // CreatedByType + if data.CreatedByType != nil { + createdByType := string(*data.CreatedByType) + destination.CreatedByType = &createdByType + } else { + destination.CreatedByType = nil + } + + // LastModifiedAt + destination.LastModifiedAt = genruntime.ClonePointerToString(data.LastModifiedAt) + + // LastModifiedBy + destination.LastModifiedBy = genruntime.ClonePointerToString(data.LastModifiedBy) + + // LastModifiedByType + if data.LastModifiedByType != nil { + lastModifiedByType := string(*data.LastModifiedByType) + destination.LastModifiedByType = &lastModifiedByType + } else { + destination.LastModifiedByType = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// A condition of the scheduled query rule. +type Condition struct { + // Dimensions: List of Dimensions conditions + Dimensions []Dimension `json:"dimensions,omitempty"` + + // FailingPeriods: The minimum number of violations required within the selected lookback time window required to raise an + // alert. Relevant only for rules of the kind LogAlert. + FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` + + // MetricMeasureColumn: The column containing the metric measure number. Relevant only for rules of the kind LogAlert. + MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` + + // MetricName: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric. + MetricName *string `json:"metricName,omitempty"` + + // Operator: The criteria operator. Relevant and required only for rules of the kind LogAlert. + Operator *Condition_Operator `json:"operator,omitempty"` + + // Query: Log query alert + Query *string `json:"query,omitempty"` + + // ResourceIdColumnReference: The column containing the resource id. The content of the column must be a uri formatted as + // resource id. Relevant only for rules of the kind LogAlert. + ResourceIdColumnReference *genruntime.ResourceReference `armReference:"ResourceIdColumn" json:"resourceIdColumnReference,omitempty"` + + // Threshold: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind + // LogAlert. + Threshold *float64 `json:"threshold,omitempty"` + + // TimeAggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert. + TimeAggregation *Condition_TimeAggregation `json:"timeAggregation,omitempty"` +} + +var _ genruntime.ARMTransformer = &Condition{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (condition *Condition) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if condition == nil { + return nil, nil + } + result := &arm.Condition{} + + // Set property "Dimensions": + for _, item := range condition.Dimensions { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.Dimensions = append(result.Dimensions, *item_ARM.(*arm.Dimension)) + } + + // Set property "FailingPeriods": + if condition.FailingPeriods != nil { + failingPeriods_ARM, err := (*condition.FailingPeriods).ConvertToARM(resolved) + if err != nil { + return nil, err + } + failingPeriods := *failingPeriods_ARM.(*arm.Condition_FailingPeriods) + result.FailingPeriods = &failingPeriods + } + + // Set property "MetricMeasureColumn": + if condition.MetricMeasureColumn != nil { + metricMeasureColumn := *condition.MetricMeasureColumn + result.MetricMeasureColumn = &metricMeasureColumn + } + + // Set property "MetricName": + if condition.MetricName != nil { + metricName := *condition.MetricName + result.MetricName = &metricName + } + + // Set property "Operator": + if condition.Operator != nil { + var temp string + temp = string(*condition.Operator) + operator := arm.Condition_Operator(temp) + result.Operator = &operator + } + + // Set property "Query": + if condition.Query != nil { + query := *condition.Query + result.Query = &query + } + + // Set property "ResourceIdColumn": + if condition.ResourceIdColumnReference != nil { + resourceIdColumnReferenceARMID, err := resolved.ResolvedReferences.Lookup(*condition.ResourceIdColumnReference) + if err != nil { + return nil, err + } + resourceIdColumnReference := resourceIdColumnReferenceARMID + result.ResourceIdColumn = &resourceIdColumnReference + } + + // Set property "Threshold": + if condition.Threshold != nil { + threshold := *condition.Threshold + result.Threshold = &threshold + } + + // Set property "TimeAggregation": + if condition.TimeAggregation != nil { + var temp string + temp = string(*condition.TimeAggregation) + timeAggregation := arm.Condition_TimeAggregation(temp) + result.TimeAggregation = &timeAggregation + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (condition *Condition) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.Condition{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (condition *Condition) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.Condition) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Condition, got %T", armInput) + } + + // Set property "Dimensions": + for _, item := range typedInput.Dimensions { + var item1 Dimension + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + condition.Dimensions = append(condition.Dimensions, item1) + } + + // Set property "FailingPeriods": + if typedInput.FailingPeriods != nil { + var failingPeriods1 Condition_FailingPeriods + err := failingPeriods1.PopulateFromARM(owner, *typedInput.FailingPeriods) + if err != nil { + return err + } + failingPeriods := failingPeriods1 + condition.FailingPeriods = &failingPeriods + } + + // Set property "MetricMeasureColumn": + if typedInput.MetricMeasureColumn != nil { + metricMeasureColumn := *typedInput.MetricMeasureColumn + condition.MetricMeasureColumn = &metricMeasureColumn + } + + // Set property "MetricName": + if typedInput.MetricName != nil { + metricName := *typedInput.MetricName + condition.MetricName = &metricName + } + + // Set property "Operator": + if typedInput.Operator != nil { + var temp string + temp = string(*typedInput.Operator) + operator := Condition_Operator(temp) + condition.Operator = &operator + } + + // Set property "Query": + if typedInput.Query != nil { + query := *typedInput.Query + condition.Query = &query + } + + // no assignment for property "ResourceIdColumnReference" + + // Set property "Threshold": + if typedInput.Threshold != nil { + threshold := *typedInput.Threshold + condition.Threshold = &threshold + } + + // Set property "TimeAggregation": + if typedInput.TimeAggregation != nil { + var temp string + temp = string(*typedInput.TimeAggregation) + timeAggregation := Condition_TimeAggregation(temp) + condition.TimeAggregation = &timeAggregation + } + + // No error + return nil +} + +// AssignProperties_From_Condition populates our Condition from the provided source Condition +func (condition *Condition) AssignProperties_From_Condition(source *storage.Condition) error { + + // Dimensions + if source.Dimensions != nil { + dimensionList := make([]Dimension, len(source.Dimensions)) + for dimensionIndex, dimensionItem := range source.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension Dimension + err := dimension.AssignProperties_From_Dimension(&dimensionItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Dimension() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + condition.Dimensions = dimensionList + } else { + condition.Dimensions = nil + } + + // FailingPeriods + if source.FailingPeriods != nil { + var failingPeriod Condition_FailingPeriods + err := failingPeriod.AssignProperties_From_Condition_FailingPeriods(source.FailingPeriods) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition_FailingPeriods() to populate field FailingPeriods") + } + condition.FailingPeriods = &failingPeriod + } else { + condition.FailingPeriods = nil + } + + // MetricMeasureColumn + condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) + + // MetricName + condition.MetricName = genruntime.ClonePointerToString(source.MetricName) + + // Operator + if source.Operator != nil { + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, condition_Operator_Values) + condition.Operator = &operatorTemp + } else { + condition.Operator = nil + } + + // Query + condition.Query = genruntime.ClonePointerToString(source.Query) + + // ResourceIdColumnReference + if source.ResourceIdColumnReference != nil { + resourceIdColumnReference := source.ResourceIdColumnReference.Copy() + condition.ResourceIdColumnReference = &resourceIdColumnReference + } else { + condition.ResourceIdColumnReference = nil + } + + // Threshold + if source.Threshold != nil { + threshold := *source.Threshold + condition.Threshold = &threshold + } else { + condition.Threshold = nil + } + + // TimeAggregation + if source.TimeAggregation != nil { + timeAggregation := *source.TimeAggregation + timeAggregationTemp := genruntime.ToEnum(timeAggregation, condition_TimeAggregation_Values) + condition.TimeAggregation = &timeAggregationTemp + } else { + condition.TimeAggregation = nil + } + + // No error + return nil +} + +// AssignProperties_To_Condition populates the provided destination Condition from our Condition +func (condition *Condition) AssignProperties_To_Condition(destination *storage.Condition) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Dimensions + if condition.Dimensions != nil { + dimensionList := make([]storage.Dimension, len(condition.Dimensions)) + for dimensionIndex, dimensionItem := range condition.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension storage.Dimension + err := dimensionItem.AssignProperties_To_Dimension(&dimension) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Dimension() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + destination.Dimensions = dimensionList + } else { + destination.Dimensions = nil + } + + // FailingPeriods + if condition.FailingPeriods != nil { + var failingPeriod storage.Condition_FailingPeriods + err := condition.FailingPeriods.AssignProperties_To_Condition_FailingPeriods(&failingPeriod) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition_FailingPeriods() to populate field FailingPeriods") + } + destination.FailingPeriods = &failingPeriod + } else { + destination.FailingPeriods = nil + } + + // MetricMeasureColumn + destination.MetricMeasureColumn = genruntime.ClonePointerToString(condition.MetricMeasureColumn) + + // MetricName + destination.MetricName = genruntime.ClonePointerToString(condition.MetricName) + + // Operator + if condition.Operator != nil { + operator := string(*condition.Operator) + destination.Operator = &operator + } else { + destination.Operator = nil + } + + // Query + destination.Query = genruntime.ClonePointerToString(condition.Query) + + // ResourceIdColumnReference + if condition.ResourceIdColumnReference != nil { + resourceIdColumnReference := condition.ResourceIdColumnReference.Copy() + destination.ResourceIdColumnReference = &resourceIdColumnReference + } else { + destination.ResourceIdColumnReference = nil + } + + // Threshold + if condition.Threshold != nil { + threshold := *condition.Threshold + destination.Threshold = &threshold + } else { + destination.Threshold = nil + } + + // TimeAggregation + if condition.TimeAggregation != nil { + timeAggregation := string(*condition.TimeAggregation) + destination.TimeAggregation = &timeAggregation + } else { + destination.TimeAggregation = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_Condition_STATUS populates our Condition from the provided source Condition_STATUS +func (condition *Condition) Initialize_From_Condition_STATUS(source *Condition_STATUS) error { + + // Dimensions + if source.Dimensions != nil { + dimensionList := make([]Dimension, len(source.Dimensions)) + for dimensionIndex, dimensionItem := range source.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension Dimension + err := dimension.Initialize_From_Dimension_STATUS(&dimensionItem) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_Dimension_STATUS() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + condition.Dimensions = dimensionList + } else { + condition.Dimensions = nil + } + + // FailingPeriods + if source.FailingPeriods != nil { + var failingPeriod Condition_FailingPeriods + err := failingPeriod.Initialize_From_Condition_FailingPeriods_STATUS(source.FailingPeriods) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") + } + condition.FailingPeriods = &failingPeriod + } else { + condition.FailingPeriods = nil + } + + // MetricMeasureColumn + condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) + + // MetricName + condition.MetricName = genruntime.ClonePointerToString(source.MetricName) + + // Operator + if source.Operator != nil { + operator := genruntime.ToEnum(string(*source.Operator), condition_Operator_Values) + condition.Operator = &operator + } else { + condition.Operator = nil + } + + // Query + condition.Query = genruntime.ClonePointerToString(source.Query) + + // Threshold + if source.Threshold != nil { + threshold := *source.Threshold + condition.Threshold = &threshold + } else { + condition.Threshold = nil + } + + // TimeAggregation + if source.TimeAggregation != nil { + timeAggregation := genruntime.ToEnum(string(*source.TimeAggregation), condition_TimeAggregation_Values) + condition.TimeAggregation = &timeAggregation + } else { + condition.TimeAggregation = nil + } + + // No error + return nil +} + +// A condition of the scheduled query rule. +type Condition_STATUS struct { + // Dimensions: List of Dimensions conditions + Dimensions []Dimension_STATUS `json:"dimensions,omitempty"` + + // FailingPeriods: The minimum number of violations required within the selected lookback time window required to raise an + // alert. Relevant only for rules of the kind LogAlert. + FailingPeriods *Condition_FailingPeriods_STATUS `json:"failingPeriods,omitempty"` + + // MetricMeasureColumn: The column containing the metric measure number. Relevant only for rules of the kind LogAlert. + MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` + + // MetricName: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric. + MetricName *string `json:"metricName,omitempty"` + + // Operator: The criteria operator. Relevant and required only for rules of the kind LogAlert. + Operator *Condition_Operator_STATUS `json:"operator,omitempty"` + + // Query: Log query alert + Query *string `json:"query,omitempty"` + + // ResourceIdColumn: The column containing the resource id. The content of the column must be a uri formatted as resource + // id. Relevant only for rules of the kind LogAlert. + ResourceIdColumn *string `json:"resourceIdColumn,omitempty"` + + // Threshold: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind + // LogAlert. + Threshold *float64 `json:"threshold,omitempty"` + + // TimeAggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert. + TimeAggregation *Condition_TimeAggregation_STATUS `json:"timeAggregation,omitempty"` +} + +var _ genruntime.FromARMConverter = &Condition_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (condition *Condition_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.Condition_STATUS{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (condition *Condition_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.Condition_STATUS) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Condition_STATUS, got %T", armInput) + } + + // Set property "Dimensions": + for _, item := range typedInput.Dimensions { + var item1 Dimension_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + condition.Dimensions = append(condition.Dimensions, item1) + } + + // Set property "FailingPeriods": + if typedInput.FailingPeriods != nil { + var failingPeriods1 Condition_FailingPeriods_STATUS + err := failingPeriods1.PopulateFromARM(owner, *typedInput.FailingPeriods) + if err != nil { + return err + } + failingPeriods := failingPeriods1 + condition.FailingPeriods = &failingPeriods + } + + // Set property "MetricMeasureColumn": + if typedInput.MetricMeasureColumn != nil { + metricMeasureColumn := *typedInput.MetricMeasureColumn + condition.MetricMeasureColumn = &metricMeasureColumn + } + + // Set property "MetricName": + if typedInput.MetricName != nil { + metricName := *typedInput.MetricName + condition.MetricName = &metricName + } + + // Set property "Operator": + if typedInput.Operator != nil { + var temp string + temp = string(*typedInput.Operator) + operator := Condition_Operator_STATUS(temp) + condition.Operator = &operator + } + + // Set property "Query": + if typedInput.Query != nil { + query := *typedInput.Query + condition.Query = &query + } + + // Set property "ResourceIdColumn": + if typedInput.ResourceIdColumn != nil { + resourceIdColumn := *typedInput.ResourceIdColumn + condition.ResourceIdColumn = &resourceIdColumn + } + + // Set property "Threshold": + if typedInput.Threshold != nil { + threshold := *typedInput.Threshold + condition.Threshold = &threshold + } + + // Set property "TimeAggregation": + if typedInput.TimeAggregation != nil { + var temp string + temp = string(*typedInput.TimeAggregation) + timeAggregation := Condition_TimeAggregation_STATUS(temp) + condition.TimeAggregation = &timeAggregation + } + + // No error + return nil +} + +// AssignProperties_From_Condition_STATUS populates our Condition_STATUS from the provided source Condition_STATUS +func (condition *Condition_STATUS) AssignProperties_From_Condition_STATUS(source *storage.Condition_STATUS) error { + + // Dimensions + if source.Dimensions != nil { + dimensionList := make([]Dimension_STATUS, len(source.Dimensions)) + for dimensionIndex, dimensionItem := range source.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension Dimension_STATUS + err := dimension.AssignProperties_From_Dimension_STATUS(&dimensionItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Dimension_STATUS() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + condition.Dimensions = dimensionList + } else { + condition.Dimensions = nil + } + + // FailingPeriods + if source.FailingPeriods != nil { + var failingPeriod Condition_FailingPeriods_STATUS + err := failingPeriod.AssignProperties_From_Condition_FailingPeriods_STATUS(source.FailingPeriods) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") + } + condition.FailingPeriods = &failingPeriod + } else { + condition.FailingPeriods = nil + } + + // MetricMeasureColumn + condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) + + // MetricName + condition.MetricName = genruntime.ClonePointerToString(source.MetricName) + + // Operator + if source.Operator != nil { + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, condition_Operator_STATUS_Values) + condition.Operator = &operatorTemp + } else { + condition.Operator = nil + } + + // Query + condition.Query = genruntime.ClonePointerToString(source.Query) + + // ResourceIdColumn + condition.ResourceIdColumn = genruntime.ClonePointerToString(source.ResourceIdColumn) + + // Threshold + if source.Threshold != nil { + threshold := *source.Threshold + condition.Threshold = &threshold + } else { + condition.Threshold = nil + } + + // TimeAggregation + if source.TimeAggregation != nil { + timeAggregation := *source.TimeAggregation + timeAggregationTemp := genruntime.ToEnum(timeAggregation, condition_TimeAggregation_STATUS_Values) + condition.TimeAggregation = &timeAggregationTemp + } else { + condition.TimeAggregation = nil + } + + // No error + return nil +} + +// AssignProperties_To_Condition_STATUS populates the provided destination Condition_STATUS from our Condition_STATUS +func (condition *Condition_STATUS) AssignProperties_To_Condition_STATUS(destination *storage.Condition_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Dimensions + if condition.Dimensions != nil { + dimensionList := make([]storage.Dimension_STATUS, len(condition.Dimensions)) + for dimensionIndex, dimensionItem := range condition.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension storage.Dimension_STATUS + err := dimensionItem.AssignProperties_To_Dimension_STATUS(&dimension) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Dimension_STATUS() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + destination.Dimensions = dimensionList + } else { + destination.Dimensions = nil + } + + // FailingPeriods + if condition.FailingPeriods != nil { + var failingPeriod storage.Condition_FailingPeriods_STATUS + err := condition.FailingPeriods.AssignProperties_To_Condition_FailingPeriods_STATUS(&failingPeriod) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") + } + destination.FailingPeriods = &failingPeriod + } else { + destination.FailingPeriods = nil + } + + // MetricMeasureColumn + destination.MetricMeasureColumn = genruntime.ClonePointerToString(condition.MetricMeasureColumn) + + // MetricName + destination.MetricName = genruntime.ClonePointerToString(condition.MetricName) + + // Operator + if condition.Operator != nil { + operator := string(*condition.Operator) + destination.Operator = &operator + } else { + destination.Operator = nil + } + + // Query + destination.Query = genruntime.ClonePointerToString(condition.Query) + + // ResourceIdColumn + destination.ResourceIdColumn = genruntime.ClonePointerToString(condition.ResourceIdColumn) + + // Threshold + if condition.Threshold != nil { + threshold := *condition.Threshold + destination.Threshold = &threshold + } else { + destination.Threshold = nil + } + + // TimeAggregation + if condition.TimeAggregation != nil { + timeAggregation := string(*condition.TimeAggregation) + destination.TimeAggregation = &timeAggregation + } else { + destination.TimeAggregation = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"None","SystemAssigned","UserAssigned"} +type Identity_Type string + +const ( + Identity_Type_None = Identity_Type("None") + Identity_Type_SystemAssigned = Identity_Type("SystemAssigned") + Identity_Type_UserAssigned = Identity_Type("UserAssigned") +) + +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, + "userassigned": Identity_Type_UserAssigned, +} + +type Identity_Type_STATUS string + +const ( + Identity_Type_STATUS_None = Identity_Type_STATUS("None") + Identity_Type_STATUS_SystemAssigned = Identity_Type_STATUS("SystemAssigned") + Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") +) + +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, + "userassigned": Identity_Type_STATUS_UserAssigned, +} + +type SystemData_CreatedByType_STATUS string + +const ( + SystemData_CreatedByType_STATUS_Application = SystemData_CreatedByType_STATUS("Application") + SystemData_CreatedByType_STATUS_Key = SystemData_CreatedByType_STATUS("Key") + SystemData_CreatedByType_STATUS_ManagedIdentity = SystemData_CreatedByType_STATUS("ManagedIdentity") + SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") +) + +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + +type SystemData_LastModifiedByType_STATUS string + +const ( + SystemData_LastModifiedByType_STATUS_Application = SystemData_LastModifiedByType_STATUS("Application") + SystemData_LastModifiedByType_STATUS_Key = SystemData_LastModifiedByType_STATUS("Key") + SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity") + SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") +) + +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + +// Information about the user assigned identity for the resource +type UserAssignedIdentityDetails struct { + Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` +} + +// AssignProperties_From_UserAssignedIdentityDetails populates our UserAssignedIdentityDetails from the provided source UserAssignedIdentityDetails +func (details *UserAssignedIdentityDetails) AssignProperties_From_UserAssignedIdentityDetails(source *storage.UserAssignedIdentityDetails) error { + + // Reference + details.Reference = source.Reference.Copy() + + // No error + return nil +} + +// AssignProperties_To_UserAssignedIdentityDetails populates the provided destination UserAssignedIdentityDetails from our UserAssignedIdentityDetails +func (details *UserAssignedIdentityDetails) AssignProperties_To_UserAssignedIdentityDetails(destination *storage.UserAssignedIdentityDetails) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Reference + destination.Reference = details.Reference.Copy() + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// User assigned identity properties. +type UserIdentityProperties_STATUS struct { + // ClientId: The client id of user assigned identity. + ClientId *string `json:"clientId,omitempty"` + + // PrincipalId: The principal id of user assigned identity. + PrincipalId *string `json:"principalId,omitempty"` +} + +var _ genruntime.FromARMConverter = &UserIdentityProperties_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *UserIdentityProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.UserIdentityProperties_STATUS{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *UserIdentityProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.UserIdentityProperties_STATUS) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.UserIdentityProperties_STATUS, got %T", armInput) + } + + // Set property "ClientId": + if typedInput.ClientId != nil { + clientId := *typedInput.ClientId + properties.ClientId = &clientId + } + + // Set property "PrincipalId": + if typedInput.PrincipalId != nil { + principalId := *typedInput.PrincipalId + properties.PrincipalId = &principalId + } + + // No error + return nil +} + +// AssignProperties_From_UserIdentityProperties_STATUS populates our UserIdentityProperties_STATUS from the provided source UserIdentityProperties_STATUS +func (properties *UserIdentityProperties_STATUS) AssignProperties_From_UserIdentityProperties_STATUS(source *storage.UserIdentityProperties_STATUS) error { + + // ClientId + properties.ClientId = genruntime.ClonePointerToString(source.ClientId) + + // PrincipalId + properties.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId) + + // No error + return nil +} + +// AssignProperties_To_UserIdentityProperties_STATUS populates the provided destination UserIdentityProperties_STATUS from our UserIdentityProperties_STATUS +func (properties *UserIdentityProperties_STATUS) AssignProperties_To_UserIdentityProperties_STATUS(destination *storage.UserIdentityProperties_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ClientId + destination.ClientId = genruntime.ClonePointerToString(properties.ClientId) + + // PrincipalId + destination.PrincipalId = genruntime.ClonePointerToString(properties.PrincipalId) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +type Condition_FailingPeriods struct { + // MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to + // numberOfEvaluationPeriods. Default value is 1 + MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` + + // NumberOfEvaluationPeriods: The number of aggregated lookback points. The lookback time window is calculated based on the + // aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1 + NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` +} + +var _ genruntime.ARMTransformer = &Condition_FailingPeriods{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (periods *Condition_FailingPeriods) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if periods == nil { + return nil, nil + } + result := &arm.Condition_FailingPeriods{} + + // Set property "MinFailingPeriodsToAlert": + if periods.MinFailingPeriodsToAlert != nil { + minFailingPeriodsToAlert := *periods.MinFailingPeriodsToAlert + result.MinFailingPeriodsToAlert = &minFailingPeriodsToAlert + } + + // Set property "NumberOfEvaluationPeriods": + if periods.NumberOfEvaluationPeriods != nil { + numberOfEvaluationPeriods := *periods.NumberOfEvaluationPeriods + result.NumberOfEvaluationPeriods = &numberOfEvaluationPeriods + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (periods *Condition_FailingPeriods) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.Condition_FailingPeriods{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (periods *Condition_FailingPeriods) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.Condition_FailingPeriods) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Condition_FailingPeriods, got %T", armInput) + } + + // Set property "MinFailingPeriodsToAlert": + if typedInput.MinFailingPeriodsToAlert != nil { + minFailingPeriodsToAlert := *typedInput.MinFailingPeriodsToAlert + periods.MinFailingPeriodsToAlert = &minFailingPeriodsToAlert + } + + // Set property "NumberOfEvaluationPeriods": + if typedInput.NumberOfEvaluationPeriods != nil { + numberOfEvaluationPeriods := *typedInput.NumberOfEvaluationPeriods + periods.NumberOfEvaluationPeriods = &numberOfEvaluationPeriods + } + + // No error + return nil +} + +// AssignProperties_From_Condition_FailingPeriods populates our Condition_FailingPeriods from the provided source Condition_FailingPeriods +func (periods *Condition_FailingPeriods) AssignProperties_From_Condition_FailingPeriods(source *storage.Condition_FailingPeriods) error { + + // MinFailingPeriodsToAlert + periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) + + // No error + return nil +} + +// AssignProperties_To_Condition_FailingPeriods populates the provided destination Condition_FailingPeriods from our Condition_FailingPeriods +func (periods *Condition_FailingPeriods) AssignProperties_To_Condition_FailingPeriods(destination *storage.Condition_FailingPeriods) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // MinFailingPeriodsToAlert + destination.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(periods.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + destination.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(periods.NumberOfEvaluationPeriods) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_Condition_FailingPeriods_STATUS populates our Condition_FailingPeriods from the provided source Condition_FailingPeriods_STATUS +func (periods *Condition_FailingPeriods) Initialize_From_Condition_FailingPeriods_STATUS(source *Condition_FailingPeriods_STATUS) error { + + // MinFailingPeriodsToAlert + periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) + + // No error + return nil +} + +type Condition_FailingPeriods_STATUS struct { + // MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to + // numberOfEvaluationPeriods. Default value is 1 + MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` + + // NumberOfEvaluationPeriods: The number of aggregated lookback points. The lookback time window is calculated based on the + // aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1 + NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` +} + +var _ genruntime.FromARMConverter = &Condition_FailingPeriods_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (periods *Condition_FailingPeriods_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.Condition_FailingPeriods_STATUS{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (periods *Condition_FailingPeriods_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.Condition_FailingPeriods_STATUS) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Condition_FailingPeriods_STATUS, got %T", armInput) + } + + // Set property "MinFailingPeriodsToAlert": + if typedInput.MinFailingPeriodsToAlert != nil { + minFailingPeriodsToAlert := *typedInput.MinFailingPeriodsToAlert + periods.MinFailingPeriodsToAlert = &minFailingPeriodsToAlert + } + + // Set property "NumberOfEvaluationPeriods": + if typedInput.NumberOfEvaluationPeriods != nil { + numberOfEvaluationPeriods := *typedInput.NumberOfEvaluationPeriods + periods.NumberOfEvaluationPeriods = &numberOfEvaluationPeriods + } + + // No error + return nil +} + +// AssignProperties_From_Condition_FailingPeriods_STATUS populates our Condition_FailingPeriods_STATUS from the provided source Condition_FailingPeriods_STATUS +func (periods *Condition_FailingPeriods_STATUS) AssignProperties_From_Condition_FailingPeriods_STATUS(source *storage.Condition_FailingPeriods_STATUS) error { + + // MinFailingPeriodsToAlert + periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) + + // No error + return nil +} + +// AssignProperties_To_Condition_FailingPeriods_STATUS populates the provided destination Condition_FailingPeriods_STATUS from our Condition_FailingPeriods_STATUS +func (periods *Condition_FailingPeriods_STATUS) AssignProperties_To_Condition_FailingPeriods_STATUS(destination *storage.Condition_FailingPeriods_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // MinFailingPeriodsToAlert + destination.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(periods.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + destination.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(periods.NumberOfEvaluationPeriods) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"Equals","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual"} +type Condition_Operator string + +const ( + Condition_Operator_Equals = Condition_Operator("Equals") + Condition_Operator_GreaterThan = Condition_Operator("GreaterThan") + Condition_Operator_GreaterThanOrEqual = Condition_Operator("GreaterThanOrEqual") + Condition_Operator_LessThan = Condition_Operator("LessThan") + Condition_Operator_LessThanOrEqual = Condition_Operator("LessThanOrEqual") +) + +// Mapping from string to Condition_Operator +var condition_Operator_Values = map[string]Condition_Operator{ + "equals": Condition_Operator_Equals, + "greaterthan": Condition_Operator_GreaterThan, + "greaterthanorequal": Condition_Operator_GreaterThanOrEqual, + "lessthan": Condition_Operator_LessThan, + "lessthanorequal": Condition_Operator_LessThanOrEqual, +} + +type Condition_Operator_STATUS string + +const ( + Condition_Operator_STATUS_Equals = Condition_Operator_STATUS("Equals") + Condition_Operator_STATUS_GreaterThan = Condition_Operator_STATUS("GreaterThan") + Condition_Operator_STATUS_GreaterThanOrEqual = Condition_Operator_STATUS("GreaterThanOrEqual") + Condition_Operator_STATUS_LessThan = Condition_Operator_STATUS("LessThan") + Condition_Operator_STATUS_LessThanOrEqual = Condition_Operator_STATUS("LessThanOrEqual") +) + +// Mapping from string to Condition_Operator_STATUS +var condition_Operator_STATUS_Values = map[string]Condition_Operator_STATUS{ + "equals": Condition_Operator_STATUS_Equals, + "greaterthan": Condition_Operator_STATUS_GreaterThan, + "greaterthanorequal": Condition_Operator_STATUS_GreaterThanOrEqual, + "lessthan": Condition_Operator_STATUS_LessThan, + "lessthanorequal": Condition_Operator_STATUS_LessThanOrEqual, +} + +// +kubebuilder:validation:Enum={"Average","Count","Maximum","Minimum","Total"} +type Condition_TimeAggregation string + +const ( + Condition_TimeAggregation_Average = Condition_TimeAggregation("Average") + Condition_TimeAggregation_Count = Condition_TimeAggregation("Count") + Condition_TimeAggregation_Maximum = Condition_TimeAggregation("Maximum") + Condition_TimeAggregation_Minimum = Condition_TimeAggregation("Minimum") + Condition_TimeAggregation_Total = Condition_TimeAggregation("Total") +) + +// Mapping from string to Condition_TimeAggregation +var condition_TimeAggregation_Values = map[string]Condition_TimeAggregation{ + "average": Condition_TimeAggregation_Average, + "count": Condition_TimeAggregation_Count, + "maximum": Condition_TimeAggregation_Maximum, + "minimum": Condition_TimeAggregation_Minimum, + "total": Condition_TimeAggregation_Total, +} + +type Condition_TimeAggregation_STATUS string + +const ( + Condition_TimeAggregation_STATUS_Average = Condition_TimeAggregation_STATUS("Average") + Condition_TimeAggregation_STATUS_Count = Condition_TimeAggregation_STATUS("Count") + Condition_TimeAggregation_STATUS_Maximum = Condition_TimeAggregation_STATUS("Maximum") + Condition_TimeAggregation_STATUS_Minimum = Condition_TimeAggregation_STATUS("Minimum") + Condition_TimeAggregation_STATUS_Total = Condition_TimeAggregation_STATUS("Total") +) + +// Mapping from string to Condition_TimeAggregation_STATUS +var condition_TimeAggregation_STATUS_Values = map[string]Condition_TimeAggregation_STATUS{ + "average": Condition_TimeAggregation_STATUS_Average, + "count": Condition_TimeAggregation_STATUS_Count, + "maximum": Condition_TimeAggregation_STATUS_Maximum, + "minimum": Condition_TimeAggregation_STATUS_Minimum, + "total": Condition_TimeAggregation_STATUS_Total, +} + +// Dimension splitting and filtering definition +type Dimension struct { + // +kubebuilder:validation:Required + // Name: Name of the dimension + Name *string `json:"name,omitempty"` + + // +kubebuilder:validation:Required + // Operator: Operator for dimension values + Operator *Dimension_Operator `json:"operator,omitempty"` + + // +kubebuilder:validation:Required + // Values: List of dimension values + Values []string `json:"values,omitempty"` +} + +var _ genruntime.ARMTransformer = &Dimension{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (dimension *Dimension) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if dimension == nil { + return nil, nil + } + result := &arm.Dimension{} + + // Set property "Name": + if dimension.Name != nil { + name := *dimension.Name + result.Name = &name + } + + // Set property "Operator": + if dimension.Operator != nil { + var temp string + temp = string(*dimension.Operator) + operator := arm.Dimension_Operator(temp) + result.Operator = &operator + } + + // Set property "Values": + for _, item := range dimension.Values { + result.Values = append(result.Values, item) + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (dimension *Dimension) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.Dimension{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (dimension *Dimension) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.Dimension) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Dimension, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + dimension.Name = &name + } + + // Set property "Operator": + if typedInput.Operator != nil { + var temp string + temp = string(*typedInput.Operator) + operator := Dimension_Operator(temp) + dimension.Operator = &operator + } + + // Set property "Values": + for _, item := range typedInput.Values { + dimension.Values = append(dimension.Values, item) + } + + // No error + return nil +} + +// AssignProperties_From_Dimension populates our Dimension from the provided source Dimension +func (dimension *Dimension) AssignProperties_From_Dimension(source *storage.Dimension) error { + + // Name + dimension.Name = genruntime.ClonePointerToString(source.Name) + + // Operator + if source.Operator != nil { + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, dimension_Operator_Values) + dimension.Operator = &operatorTemp + } else { + dimension.Operator = nil + } + + // Values + dimension.Values = genruntime.CloneSliceOfString(source.Values) + + // No error + return nil +} + +// AssignProperties_To_Dimension populates the provided destination Dimension from our Dimension +func (dimension *Dimension) AssignProperties_To_Dimension(destination *storage.Dimension) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + destination.Name = genruntime.ClonePointerToString(dimension.Name) + + // Operator + if dimension.Operator != nil { + operator := string(*dimension.Operator) + destination.Operator = &operator + } else { + destination.Operator = nil + } + + // Values + destination.Values = genruntime.CloneSliceOfString(dimension.Values) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_Dimension_STATUS populates our Dimension from the provided source Dimension_STATUS +func (dimension *Dimension) Initialize_From_Dimension_STATUS(source *Dimension_STATUS) error { + + // Name + dimension.Name = genruntime.ClonePointerToString(source.Name) + + // Operator + if source.Operator != nil { + operator := genruntime.ToEnum(string(*source.Operator), dimension_Operator_Values) + dimension.Operator = &operator + } else { + dimension.Operator = nil + } + + // Values + dimension.Values = genruntime.CloneSliceOfString(source.Values) + + // No error + return nil +} + +// Dimension splitting and filtering definition +type Dimension_STATUS struct { + // Name: Name of the dimension + Name *string `json:"name,omitempty"` + + // Operator: Operator for dimension values + Operator *Dimension_Operator_STATUS `json:"operator,omitempty"` + + // Values: List of dimension values + Values []string `json:"values,omitempty"` +} + +var _ genruntime.FromARMConverter = &Dimension_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (dimension *Dimension_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &arm.Dimension_STATUS{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (dimension *Dimension_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(arm.Dimension_STATUS) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Dimension_STATUS, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + dimension.Name = &name + } + + // Set property "Operator": + if typedInput.Operator != nil { + var temp string + temp = string(*typedInput.Operator) + operator := Dimension_Operator_STATUS(temp) + dimension.Operator = &operator + } + + // Set property "Values": + for _, item := range typedInput.Values { + dimension.Values = append(dimension.Values, item) + } + + // No error + return nil +} + +// AssignProperties_From_Dimension_STATUS populates our Dimension_STATUS from the provided source Dimension_STATUS +func (dimension *Dimension_STATUS) AssignProperties_From_Dimension_STATUS(source *storage.Dimension_STATUS) error { + + // Name + dimension.Name = genruntime.ClonePointerToString(source.Name) + + // Operator + if source.Operator != nil { + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, dimension_Operator_STATUS_Values) + dimension.Operator = &operatorTemp + } else { + dimension.Operator = nil + } + + // Values + dimension.Values = genruntime.CloneSliceOfString(source.Values) + + // No error + return nil +} + +// AssignProperties_To_Dimension_STATUS populates the provided destination Dimension_STATUS from our Dimension_STATUS +func (dimension *Dimension_STATUS) AssignProperties_To_Dimension_STATUS(destination *storage.Dimension_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + destination.Name = genruntime.ClonePointerToString(dimension.Name) + + // Operator + if dimension.Operator != nil { + operator := string(*dimension.Operator) + destination.Operator = &operator + } else { + destination.Operator = nil + } + + // Values + destination.Values = genruntime.CloneSliceOfString(dimension.Values) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"Exclude","Include"} +type Dimension_Operator string + +const ( + Dimension_Operator_Exclude = Dimension_Operator("Exclude") + Dimension_Operator_Include = Dimension_Operator("Include") +) + +// Mapping from string to Dimension_Operator +var dimension_Operator_Values = map[string]Dimension_Operator{ + "exclude": Dimension_Operator_Exclude, + "include": Dimension_Operator_Include, +} + +type Dimension_Operator_STATUS string + +const ( + Dimension_Operator_STATUS_Exclude = Dimension_Operator_STATUS("Exclude") + Dimension_Operator_STATUS_Include = Dimension_Operator_STATUS("Include") +) + +// Mapping from string to Dimension_Operator_STATUS +var dimension_Operator_STATUS_Values = map[string]Dimension_Operator_STATUS{ + "exclude": Dimension_Operator_STATUS_Exclude, + "include": Dimension_Operator_STATUS_Include, +} + +func init() { + SchemeBuilder.Register(&ScheduledQueryRule{}, &ScheduledQueryRuleList{}) +} diff --git a/v2/api/insights/v1api20231201/scheduled_query_rule_types_gen_test.go b/v2/api/insights/v1api20231201/scheduled_query_rule_types_gen_test.go new file mode 100644 index 00000000000..b2aa7a04927 --- /dev/null +++ b/v2/api/insights/v1api20231201/scheduled_query_rule_types_gen_test.go @@ -0,0 +1,2417 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20231201 + +import ( + "encoding/json" + storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/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_Actions_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Actions to Actions via AssignProperties_To_Actions & AssignProperties_From_Actions returns original", + prop.ForAll(RunPropertyAssignmentTestForActions, ActionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForActions tests if a specific instance of Actions can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForActions(subject Actions) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.Actions + err := copied.AssignProperties_To_Actions(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Actions + err = actual.AssignProperties_From_Actions(&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_Actions_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 Actions via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActions, ActionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActions runs a test to see if a specific instance of Actions round trips to JSON and back losslessly +func RunJSONSerializationTestForActions(subject Actions) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Actions + 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 Actions instances for property testing - lazily instantiated by ActionsGenerator() +var actionsGenerator gopter.Gen + +// ActionsGenerator returns a generator of Actions instances for property testing. +func ActionsGenerator() gopter.Gen { + if actionsGenerator != nil { + return actionsGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActions(generators) + actionsGenerator = gen.Struct(reflect.TypeOf(Actions{}), generators) + + return actionsGenerator +} + +// AddIndependentPropertyGeneratorsForActions is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActions(gens map[string]gopter.Gen) { + gens["ActionProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["CustomProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) +} + +func Test_Actions_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Actions_STATUS to Actions_STATUS via AssignProperties_To_Actions_STATUS & AssignProperties_From_Actions_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForActions_STATUS, Actions_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForActions_STATUS tests if a specific instance of Actions_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForActions_STATUS(subject Actions_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.Actions_STATUS + err := copied.AssignProperties_To_Actions_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Actions_STATUS + err = actual.AssignProperties_From_Actions_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_Actions_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 Actions_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActions_STATUS, Actions_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActions_STATUS runs a test to see if a specific instance of Actions_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForActions_STATUS(subject Actions_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Actions_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 Actions_STATUS instances for property testing - lazily instantiated by Actions_STATUSGenerator() +var actions_STATUSGenerator gopter.Gen + +// Actions_STATUSGenerator returns a generator of Actions_STATUS instances for property testing. +func Actions_STATUSGenerator() gopter.Gen { + if actions_STATUSGenerator != nil { + return actions_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActions_STATUS(generators) + actions_STATUSGenerator = gen.Struct(reflect.TypeOf(Actions_STATUS{}), generators) + + return actions_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForActions_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActions_STATUS(gens map[string]gopter.Gen) { + gens["ActionGroups"] = gen.SliceOf(gen.AlphaString()) + gens["ActionProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["CustomProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) +} + +func Test_Condition_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition to Condition via AssignProperties_To_Condition & AssignProperties_From_Condition returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition, ConditionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition tests if a specific instance of Condition can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition(subject Condition) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.Condition + err := copied.AssignProperties_To_Condition(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition + err = actual.AssignProperties_From_Condition(&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_Condition_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 Condition via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition, ConditionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition runs a test to see if a specific instance of Condition round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition(subject Condition) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition + 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 Condition instances for property testing - lazily instantiated by ConditionGenerator() +var conditionGenerator gopter.Gen + +// ConditionGenerator returns a generator of Condition instances for property testing. +// We first initialize conditionGenerator 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 ConditionGenerator() gopter.Gen { + if conditionGenerator != nil { + return conditionGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition(generators) + conditionGenerator = gen.Struct(reflect.TypeOf(Condition{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition(generators) + AddRelatedPropertyGeneratorsForCondition(generators) + conditionGenerator = gen.Struct(reflect.TypeOf(Condition{}), generators) + + return conditionGenerator +} + +// AddIndependentPropertyGeneratorsForCondition is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { + gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) + gens["MetricName"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.OneConstOf( + Condition_Operator_Equals, + Condition_Operator_GreaterThan, + Condition_Operator_GreaterThanOrEqual, + Condition_Operator_LessThan, + Condition_Operator_LessThanOrEqual)) + gens["Query"] = gen.PtrOf(gen.AlphaString()) + gens["Threshold"] = gen.PtrOf(gen.Float64()) + gens["TimeAggregation"] = gen.PtrOf(gen.OneConstOf( + Condition_TimeAggregation_Average, + Condition_TimeAggregation_Count, + Condition_TimeAggregation_Maximum, + Condition_TimeAggregation_Minimum, + Condition_TimeAggregation_Total)) +} + +// AddRelatedPropertyGeneratorsForCondition is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { + gens["Dimensions"] = gen.SliceOf(DimensionGenerator()) + gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriodsGenerator()) +} + +func Test_Condition_FailingPeriods_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition_FailingPeriods to Condition_FailingPeriods via AssignProperties_To_Condition_FailingPeriods & AssignProperties_From_Condition_FailingPeriods returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition_FailingPeriods, Condition_FailingPeriodsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition_FailingPeriods tests if a specific instance of Condition_FailingPeriods can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition_FailingPeriods(subject Condition_FailingPeriods) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.Condition_FailingPeriods + err := copied.AssignProperties_To_Condition_FailingPeriods(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition_FailingPeriods + err = actual.AssignProperties_From_Condition_FailingPeriods(&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_Condition_FailingPeriods_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 Condition_FailingPeriods via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition_FailingPeriods, Condition_FailingPeriodsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition_FailingPeriods runs a test to see if a specific instance of Condition_FailingPeriods round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition_FailingPeriods(subject Condition_FailingPeriods) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition_FailingPeriods + 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 Condition_FailingPeriods instances for property testing - lazily instantiated by +// Condition_FailingPeriodsGenerator() +var condition_FailingPeriodsGenerator gopter.Gen + +// Condition_FailingPeriodsGenerator returns a generator of Condition_FailingPeriods instances for property testing. +func Condition_FailingPeriodsGenerator() gopter.Gen { + if condition_FailingPeriodsGenerator != nil { + return condition_FailingPeriodsGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_FailingPeriods(generators) + condition_FailingPeriodsGenerator = gen.Struct(reflect.TypeOf(Condition_FailingPeriods{}), generators) + + return condition_FailingPeriodsGenerator +} + +// AddIndependentPropertyGeneratorsForCondition_FailingPeriods is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition_FailingPeriods(gens map[string]gopter.Gen) { + gens["MinFailingPeriodsToAlert"] = gen.PtrOf(gen.Int()) + gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) +} + +func Test_Condition_FailingPeriods_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition_FailingPeriods_STATUS to Condition_FailingPeriods_STATUS via AssignProperties_To_Condition_FailingPeriods_STATUS & AssignProperties_From_Condition_FailingPeriods_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS, Condition_FailingPeriods_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS tests if a specific instance of Condition_FailingPeriods_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS(subject Condition_FailingPeriods_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.Condition_FailingPeriods_STATUS + err := copied.AssignProperties_To_Condition_FailingPeriods_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition_FailingPeriods_STATUS + err = actual.AssignProperties_From_Condition_FailingPeriods_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_Condition_FailingPeriods_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 Condition_FailingPeriods_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition_FailingPeriods_STATUS, Condition_FailingPeriods_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition_FailingPeriods_STATUS runs a test to see if a specific instance of Condition_FailingPeriods_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition_FailingPeriods_STATUS(subject Condition_FailingPeriods_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition_FailingPeriods_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 Condition_FailingPeriods_STATUS instances for property testing - lazily instantiated by +// Condition_FailingPeriods_STATUSGenerator() +var condition_FailingPeriods_STATUSGenerator gopter.Gen + +// Condition_FailingPeriods_STATUSGenerator returns a generator of Condition_FailingPeriods_STATUS instances for property testing. +func Condition_FailingPeriods_STATUSGenerator() gopter.Gen { + if condition_FailingPeriods_STATUSGenerator != nil { + return condition_FailingPeriods_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS(generators) + condition_FailingPeriods_STATUSGenerator = gen.Struct(reflect.TypeOf(Condition_FailingPeriods_STATUS{}), generators) + + return condition_FailingPeriods_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS(gens map[string]gopter.Gen) { + gens["MinFailingPeriodsToAlert"] = gen.PtrOf(gen.Int()) + gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) +} + +func Test_Condition_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition_STATUS to Condition_STATUS via AssignProperties_To_Condition_STATUS & AssignProperties_From_Condition_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition_STATUS, Condition_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition_STATUS tests if a specific instance of Condition_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition_STATUS(subject Condition_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.Condition_STATUS + err := copied.AssignProperties_To_Condition_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition_STATUS + err = actual.AssignProperties_From_Condition_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_Condition_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 Condition_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition_STATUS, Condition_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition_STATUS runs a test to see if a specific instance of Condition_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition_STATUS(subject Condition_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition_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 Condition_STATUS instances for property testing - lazily instantiated by Condition_STATUSGenerator() +var condition_STATUSGenerator gopter.Gen + +// Condition_STATUSGenerator returns a generator of Condition_STATUS instances for property testing. +// We first initialize condition_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 Condition_STATUSGenerator() gopter.Gen { + if condition_STATUSGenerator != nil { + return condition_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_STATUS(generators) + condition_STATUSGenerator = gen.Struct(reflect.TypeOf(Condition_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_STATUS(generators) + AddRelatedPropertyGeneratorsForCondition_STATUS(generators) + condition_STATUSGenerator = gen.Struct(reflect.TypeOf(Condition_STATUS{}), generators) + + return condition_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForCondition_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) { + gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) + gens["MetricName"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.OneConstOf( + Condition_Operator_STATUS_Equals, + Condition_Operator_STATUS_GreaterThan, + Condition_Operator_STATUS_GreaterThanOrEqual, + Condition_Operator_STATUS_LessThan, + Condition_Operator_STATUS_LessThanOrEqual)) + gens["Query"] = gen.PtrOf(gen.AlphaString()) + gens["ResourceIdColumn"] = gen.PtrOf(gen.AlphaString()) + gens["Threshold"] = gen.PtrOf(gen.Float64()) + gens["TimeAggregation"] = gen.PtrOf(gen.OneConstOf( + Condition_TimeAggregation_STATUS_Average, + Condition_TimeAggregation_STATUS_Count, + Condition_TimeAggregation_STATUS_Maximum, + Condition_TimeAggregation_STATUS_Minimum, + Condition_TimeAggregation_STATUS_Total)) +} + +// AddRelatedPropertyGeneratorsForCondition_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) { + gens["Dimensions"] = gen.SliceOf(Dimension_STATUSGenerator()) + gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriods_STATUSGenerator()) +} + +func Test_Dimension_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Dimension to Dimension via AssignProperties_To_Dimension & AssignProperties_From_Dimension returns original", + prop.ForAll(RunPropertyAssignmentTestForDimension, DimensionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDimension tests if a specific instance of Dimension can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDimension(subject Dimension) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.Dimension + err := copied.AssignProperties_To_Dimension(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Dimension + err = actual.AssignProperties_From_Dimension(&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_Dimension_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 Dimension via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDimension, DimensionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDimension runs a test to see if a specific instance of Dimension round trips to JSON and back losslessly +func RunJSONSerializationTestForDimension(subject Dimension) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Dimension + 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 Dimension instances for property testing - lazily instantiated by DimensionGenerator() +var dimensionGenerator gopter.Gen + +// DimensionGenerator returns a generator of Dimension instances for property testing. +func DimensionGenerator() gopter.Gen { + if dimensionGenerator != nil { + return dimensionGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDimension(generators) + dimensionGenerator = gen.Struct(reflect.TypeOf(Dimension{}), generators) + + return dimensionGenerator +} + +// AddIndependentPropertyGeneratorsForDimension is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDimension(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.OneConstOf(Dimension_Operator_Exclude, Dimension_Operator_Include)) + gens["Values"] = gen.SliceOf(gen.AlphaString()) +} + +func Test_Dimension_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Dimension_STATUS to Dimension_STATUS via AssignProperties_To_Dimension_STATUS & AssignProperties_From_Dimension_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForDimension_STATUS, Dimension_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDimension_STATUS tests if a specific instance of Dimension_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDimension_STATUS(subject Dimension_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.Dimension_STATUS + err := copied.AssignProperties_To_Dimension_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Dimension_STATUS + err = actual.AssignProperties_From_Dimension_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_Dimension_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 Dimension_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDimension_STATUS, Dimension_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDimension_STATUS runs a test to see if a specific instance of Dimension_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDimension_STATUS(subject Dimension_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Dimension_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 Dimension_STATUS instances for property testing - lazily instantiated by Dimension_STATUSGenerator() +var dimension_STATUSGenerator gopter.Gen + +// Dimension_STATUSGenerator returns a generator of Dimension_STATUS instances for property testing. +func Dimension_STATUSGenerator() gopter.Gen { + if dimension_STATUSGenerator != nil { + return dimension_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDimension_STATUS(generators) + dimension_STATUSGenerator = gen.Struct(reflect.TypeOf(Dimension_STATUS{}), generators) + + return dimension_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDimension_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDimension_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.OneConstOf(Dimension_Operator_STATUS_Exclude, Dimension_Operator_STATUS_Include)) + gens["Values"] = gen.SliceOf(gen.AlphaString()) +} + +func Test_Identity_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Identity to Identity via AssignProperties_To_Identity & AssignProperties_From_Identity returns original", + prop.ForAll(RunPropertyAssignmentTestForIdentity, IdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForIdentity tests if a specific instance of Identity can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForIdentity(subject Identity) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.Identity + err := copied.AssignProperties_To_Identity(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Identity + err = actual.AssignProperties_From_Identity(&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_Identity_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 Identity via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity, IdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity runs a test to see if a specific instance of Identity round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity(subject Identity) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity + 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 Identity instances for property testing - lazily instantiated by IdentityGenerator() +var identityGenerator gopter.Gen + +// IdentityGenerator returns a generator of Identity instances for property testing. +// We first initialize identityGenerator 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 IdentityGenerator() gopter.Gen { + if identityGenerator != nil { + return identityGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity(generators) + identityGenerator = gen.Struct(reflect.TypeOf(Identity{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity(generators) + AddRelatedPropertyGeneratorsForIdentity(generators) + identityGenerator = gen.Struct(reflect.TypeOf(Identity{}), generators) + + return identityGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { + gens["Type"] = gen.PtrOf(gen.OneConstOf(Identity_Type_None, Identity_Type_SystemAssigned, Identity_Type_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForIdentity is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.SliceOf(UserAssignedIdentityDetailsGenerator()) +} + +func Test_Identity_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Identity_STATUS to Identity_STATUS via AssignProperties_To_Identity_STATUS & AssignProperties_From_Identity_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForIdentity_STATUS, Identity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForIdentity_STATUS tests if a specific instance of Identity_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForIdentity_STATUS(subject Identity_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.Identity_STATUS + err := copied.AssignProperties_To_Identity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Identity_STATUS + err = actual.AssignProperties_From_Identity_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_Identity_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 Identity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity_STATUS, Identity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity_STATUS runs a test to see if a specific instance of Identity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity_STATUS(subject Identity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity_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 Identity_STATUS instances for property testing - lazily instantiated by Identity_STATUSGenerator() +var identity_STATUSGenerator gopter.Gen + +// Identity_STATUSGenerator returns a generator of Identity_STATUS instances for property testing. +// We first initialize identity_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 Identity_STATUSGenerator() gopter.Gen { + if identity_STATUSGenerator != nil { + return identity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS(generators) + identity_STATUSGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS(generators) + AddRelatedPropertyGeneratorsForIdentity_STATUS(generators) + identity_STATUSGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS{}), generators) + + return identity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) { + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf(Identity_Type_STATUS_None, Identity_Type_STATUS_SystemAssigned, Identity_Type_STATUS_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForIdentity_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf( + gen.AlphaString(), + UserIdentityProperties_STATUSGenerator()) +} + +func Test_RuleResolveConfiguration_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RuleResolveConfiguration to RuleResolveConfiguration via AssignProperties_To_RuleResolveConfiguration & AssignProperties_From_RuleResolveConfiguration returns original", + prop.ForAll(RunPropertyAssignmentTestForRuleResolveConfiguration, RuleResolveConfigurationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRuleResolveConfiguration tests if a specific instance of RuleResolveConfiguration can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForRuleResolveConfiguration(subject RuleResolveConfiguration) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.RuleResolveConfiguration + err := copied.AssignProperties_To_RuleResolveConfiguration(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RuleResolveConfiguration + err = actual.AssignProperties_From_RuleResolveConfiguration(&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_RuleResolveConfiguration_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 RuleResolveConfiguration via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRuleResolveConfiguration, RuleResolveConfigurationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRuleResolveConfiguration runs a test to see if a specific instance of RuleResolveConfiguration round trips to JSON and back losslessly +func RunJSONSerializationTestForRuleResolveConfiguration(subject RuleResolveConfiguration) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RuleResolveConfiguration + 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 RuleResolveConfiguration instances for property testing - lazily instantiated by +// RuleResolveConfigurationGenerator() +var ruleResolveConfigurationGenerator gopter.Gen + +// RuleResolveConfigurationGenerator returns a generator of RuleResolveConfiguration instances for property testing. +func RuleResolveConfigurationGenerator() gopter.Gen { + if ruleResolveConfigurationGenerator != nil { + return ruleResolveConfigurationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRuleResolveConfiguration(generators) + ruleResolveConfigurationGenerator = gen.Struct(reflect.TypeOf(RuleResolveConfiguration{}), generators) + + return ruleResolveConfigurationGenerator +} + +// AddIndependentPropertyGeneratorsForRuleResolveConfiguration is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRuleResolveConfiguration(gens map[string]gopter.Gen) { + gens["AutoResolved"] = gen.PtrOf(gen.Bool()) + gens["TimeToResolve"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_RuleResolveConfiguration_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RuleResolveConfiguration_STATUS to RuleResolveConfiguration_STATUS via AssignProperties_To_RuleResolveConfiguration_STATUS & AssignProperties_From_RuleResolveConfiguration_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForRuleResolveConfiguration_STATUS, RuleResolveConfiguration_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRuleResolveConfiguration_STATUS tests if a specific instance of RuleResolveConfiguration_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForRuleResolveConfiguration_STATUS(subject RuleResolveConfiguration_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.RuleResolveConfiguration_STATUS + err := copied.AssignProperties_To_RuleResolveConfiguration_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RuleResolveConfiguration_STATUS + err = actual.AssignProperties_From_RuleResolveConfiguration_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_RuleResolveConfiguration_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 RuleResolveConfiguration_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRuleResolveConfiguration_STATUS, RuleResolveConfiguration_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRuleResolveConfiguration_STATUS runs a test to see if a specific instance of RuleResolveConfiguration_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForRuleResolveConfiguration_STATUS(subject RuleResolveConfiguration_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RuleResolveConfiguration_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 RuleResolveConfiguration_STATUS instances for property testing - lazily instantiated by +// RuleResolveConfiguration_STATUSGenerator() +var ruleResolveConfiguration_STATUSGenerator gopter.Gen + +// RuleResolveConfiguration_STATUSGenerator returns a generator of RuleResolveConfiguration_STATUS instances for property testing. +func RuleResolveConfiguration_STATUSGenerator() gopter.Gen { + if ruleResolveConfiguration_STATUSGenerator != nil { + return ruleResolveConfiguration_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRuleResolveConfiguration_STATUS(generators) + ruleResolveConfiguration_STATUSGenerator = gen.Struct(reflect.TypeOf(RuleResolveConfiguration_STATUS{}), generators) + + return ruleResolveConfiguration_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForRuleResolveConfiguration_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRuleResolveConfiguration_STATUS(gens map[string]gopter.Gen) { + gens["AutoResolved"] = gen.PtrOf(gen.Bool()) + gens["TimeToResolve"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ScheduledQueryRule_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 ScheduledQueryRule to hub returns original", + prop.ForAll(RunResourceConversionTestForScheduledQueryRule, ScheduledQueryRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForScheduledQueryRule tests if a specific instance of ScheduledQueryRule round trips to the hub storage version and back losslessly +func RunResourceConversionTestForScheduledQueryRule(subject ScheduledQueryRule) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub storage.ScheduledQueryRule + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual ScheduledQueryRule + 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_ScheduledQueryRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRule to ScheduledQueryRule via AssignProperties_To_ScheduledQueryRule & AssignProperties_From_ScheduledQueryRule returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule, ScheduledQueryRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRule tests if a specific instance of ScheduledQueryRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRule(subject ScheduledQueryRule) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.ScheduledQueryRule + err := copied.AssignProperties_To_ScheduledQueryRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRule + err = actual.AssignProperties_From_ScheduledQueryRule(&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_ScheduledQueryRule_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 ScheduledQueryRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRule, ScheduledQueryRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRule runs a test to see if a specific instance of ScheduledQueryRule round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRule(subject ScheduledQueryRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRule + 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 ScheduledQueryRule instances for property testing - lazily instantiated by ScheduledQueryRuleGenerator() +var scheduledQueryRuleGenerator gopter.Gen + +// ScheduledQueryRuleGenerator returns a generator of ScheduledQueryRule instances for property testing. +func ScheduledQueryRuleGenerator() gopter.Gen { + if scheduledQueryRuleGenerator != nil { + return scheduledQueryRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForScheduledQueryRule(generators) + scheduledQueryRuleGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule{}), generators) + + return scheduledQueryRuleGenerator +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRule is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRule(gens map[string]gopter.Gen) { + gens["Spec"] = ScheduledQueryRule_SpecGenerator() + gens["Status"] = ScheduledQueryRule_STATUSGenerator() +} + +func Test_ScheduledQueryRuleCriteria_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRuleCriteria to ScheduledQueryRuleCriteria via AssignProperties_To_ScheduledQueryRuleCriteria & AssignProperties_From_ScheduledQueryRuleCriteria returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleCriteria, ScheduledQueryRuleCriteriaGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRuleCriteria tests if a specific instance of ScheduledQueryRuleCriteria can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRuleCriteria(subject ScheduledQueryRuleCriteria) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.ScheduledQueryRuleCriteria + err := copied.AssignProperties_To_ScheduledQueryRuleCriteria(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRuleCriteria + err = actual.AssignProperties_From_ScheduledQueryRuleCriteria(&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_ScheduledQueryRuleCriteria_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 ScheduledQueryRuleCriteria via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRuleCriteria, ScheduledQueryRuleCriteriaGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRuleCriteria runs a test to see if a specific instance of ScheduledQueryRuleCriteria round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRuleCriteria(subject ScheduledQueryRuleCriteria) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRuleCriteria + 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 ScheduledQueryRuleCriteria instances for property testing - lazily instantiated by +// ScheduledQueryRuleCriteriaGenerator() +var scheduledQueryRuleCriteriaGenerator gopter.Gen + +// ScheduledQueryRuleCriteriaGenerator returns a generator of ScheduledQueryRuleCriteria instances for property testing. +func ScheduledQueryRuleCriteriaGenerator() gopter.Gen { + if scheduledQueryRuleCriteriaGenerator != nil { + return scheduledQueryRuleCriteriaGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria(generators) + scheduledQueryRuleCriteriaGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleCriteria{}), generators) + + return scheduledQueryRuleCriteriaGenerator +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria(gens map[string]gopter.Gen) { + gens["AllOf"] = gen.SliceOf(ConditionGenerator()) +} + +func Test_ScheduledQueryRuleCriteria_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRuleCriteria_STATUS to ScheduledQueryRuleCriteria_STATUS via AssignProperties_To_ScheduledQueryRuleCriteria_STATUS & AssignProperties_From_ScheduledQueryRuleCriteria_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS, ScheduledQueryRuleCriteria_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS tests if a specific instance of ScheduledQueryRuleCriteria_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS(subject ScheduledQueryRuleCriteria_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.ScheduledQueryRuleCriteria_STATUS + err := copied.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRuleCriteria_STATUS + err = actual.AssignProperties_From_ScheduledQueryRuleCriteria_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_ScheduledQueryRuleCriteria_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 ScheduledQueryRuleCriteria_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRuleCriteria_STATUS, ScheduledQueryRuleCriteria_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRuleCriteria_STATUS runs a test to see if a specific instance of ScheduledQueryRuleCriteria_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRuleCriteria_STATUS(subject ScheduledQueryRuleCriteria_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRuleCriteria_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 ScheduledQueryRuleCriteria_STATUS instances for property testing - lazily instantiated by +// ScheduledQueryRuleCriteria_STATUSGenerator() +var scheduledQueryRuleCriteria_STATUSGenerator gopter.Gen + +// ScheduledQueryRuleCriteria_STATUSGenerator returns a generator of ScheduledQueryRuleCriteria_STATUS instances for property testing. +func ScheduledQueryRuleCriteria_STATUSGenerator() gopter.Gen { + if scheduledQueryRuleCriteria_STATUSGenerator != nil { + return scheduledQueryRuleCriteria_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS(generators) + scheduledQueryRuleCriteria_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleCriteria_STATUS{}), generators) + + return scheduledQueryRuleCriteria_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS(gens map[string]gopter.Gen) { + gens["AllOf"] = gen.SliceOf(Condition_STATUSGenerator()) +} + +func Test_ScheduledQueryRuleOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRuleOperatorSpec to ScheduledQueryRuleOperatorSpec via AssignProperties_To_ScheduledQueryRuleOperatorSpec & AssignProperties_From_ScheduledQueryRuleOperatorSpec returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec, ScheduledQueryRuleOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec tests if a specific instance of ScheduledQueryRuleOperatorSpec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec(subject ScheduledQueryRuleOperatorSpec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.ScheduledQueryRuleOperatorSpec + err := copied.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRuleOperatorSpec + err = actual.AssignProperties_From_ScheduledQueryRuleOperatorSpec(&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_ScheduledQueryRuleOperatorSpec_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 ScheduledQueryRuleOperatorSpec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRuleOperatorSpec, ScheduledQueryRuleOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRuleOperatorSpec runs a test to see if a specific instance of ScheduledQueryRuleOperatorSpec round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRuleOperatorSpec(subject ScheduledQueryRuleOperatorSpec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRuleOperatorSpec + 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 ScheduledQueryRuleOperatorSpec instances for property testing - lazily instantiated by +// ScheduledQueryRuleOperatorSpecGenerator() +var scheduledQueryRuleOperatorSpecGenerator gopter.Gen + +// ScheduledQueryRuleOperatorSpecGenerator returns a generator of ScheduledQueryRuleOperatorSpec instances for property testing. +func ScheduledQueryRuleOperatorSpecGenerator() gopter.Gen { + if scheduledQueryRuleOperatorSpecGenerator != nil { + return scheduledQueryRuleOperatorSpecGenerator + } + + generators := make(map[string]gopter.Gen) + scheduledQueryRuleOperatorSpecGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleOperatorSpec{}), generators) + + return scheduledQueryRuleOperatorSpecGenerator +} + +func Test_ScheduledQueryRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRule_STATUS to ScheduledQueryRule_STATUS via AssignProperties_To_ScheduledQueryRule_STATUS & AssignProperties_From_ScheduledQueryRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule_STATUS, ScheduledQueryRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRule_STATUS tests if a specific instance of ScheduledQueryRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRule_STATUS(subject ScheduledQueryRule_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.ScheduledQueryRule_STATUS + err := copied.AssignProperties_To_ScheduledQueryRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRule_STATUS + err = actual.AssignProperties_From_ScheduledQueryRule_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_ScheduledQueryRule_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 ScheduledQueryRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRule_STATUS, ScheduledQueryRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRule_STATUS runs a test to see if a specific instance of ScheduledQueryRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRule_STATUS(subject ScheduledQueryRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRule_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 ScheduledQueryRule_STATUS instances for property testing - lazily instantiated by +// ScheduledQueryRule_STATUSGenerator() +var scheduledQueryRule_STATUSGenerator gopter.Gen + +// ScheduledQueryRule_STATUSGenerator returns a generator of ScheduledQueryRule_STATUS instances for property testing. +// We first initialize scheduledQueryRule_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 ScheduledQueryRule_STATUSGenerator() gopter.Gen { + if scheduledQueryRule_STATUSGenerator != nil { + return scheduledQueryRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(generators) + scheduledQueryRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(generators) + AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS(generators) + scheduledQueryRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_STATUS{}), generators) + + return scheduledQueryRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[string]gopter.Gen) { + gens["AutoMitigate"] = gen.PtrOf(gen.Bool()) + gens["CheckWorkspaceAlertsStorageConfigured"] = gen.PtrOf(gen.Bool()) + gens["CreatedWithApiVersion"] = gen.PtrOf(gen.AlphaString()) + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["DisplayName"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["EvaluationFrequency"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["IsLegacyLogAnalyticsRule"] = gen.PtrOf(gen.Bool()) + gens["IsWorkspaceAlertsStorageConfigured"] = gen.PtrOf(gen.Bool()) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_STATUS_LogAlert, ScheduledQueryRule_Kind_STATUS_LogToMetric)) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["MuteActionsDuration"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["OverrideQueryTimeRange"] = gen.PtrOf(gen.AlphaString()) + gens["Scopes"] = gen.SliceOf(gen.AlphaString()) + gens["Severity"] = gen.PtrOf(gen.OneConstOf( + ScheduledQueryRuleProperties_Severity_STATUS_0, + ScheduledQueryRuleProperties_Severity_STATUS_1, + ScheduledQueryRuleProperties_Severity_STATUS_2, + ScheduledQueryRuleProperties_Severity_STATUS_3, + ScheduledQueryRuleProperties_Severity_STATUS_4)) + gens["SkipQueryValidation"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["TargetResourceTypes"] = gen.SliceOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) + gens["WindowSize"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(Actions_STATUSGenerator()) + gens["Criteria"] = gen.PtrOf(ScheduledQueryRuleCriteria_STATUSGenerator()) + gens["Identity"] = gen.PtrOf(Identity_STATUSGenerator()) + gens["ResolveConfiguration"] = gen.PtrOf(RuleResolveConfiguration_STATUSGenerator()) + gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator()) +} + +func Test_ScheduledQueryRule_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRule_Spec to ScheduledQueryRule_Spec via AssignProperties_To_ScheduledQueryRule_Spec & AssignProperties_From_ScheduledQueryRule_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule_Spec, ScheduledQueryRule_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRule_Spec tests if a specific instance of ScheduledQueryRule_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRule_Spec(subject ScheduledQueryRule_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.ScheduledQueryRule_Spec + err := copied.AssignProperties_To_ScheduledQueryRule_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRule_Spec + err = actual.AssignProperties_From_ScheduledQueryRule_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_ScheduledQueryRule_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 ScheduledQueryRule_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRule_Spec, ScheduledQueryRule_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRule_Spec runs a test to see if a specific instance of ScheduledQueryRule_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRule_Spec(subject ScheduledQueryRule_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRule_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 ScheduledQueryRule_Spec instances for property testing - lazily instantiated by +// ScheduledQueryRule_SpecGenerator() +var scheduledQueryRule_SpecGenerator gopter.Gen + +// ScheduledQueryRule_SpecGenerator returns a generator of ScheduledQueryRule_Spec instances for property testing. +// We first initialize scheduledQueryRule_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 ScheduledQueryRule_SpecGenerator() gopter.Gen { + if scheduledQueryRule_SpecGenerator != nil { + return scheduledQueryRule_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(generators) + scheduledQueryRule_SpecGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(generators) + AddRelatedPropertyGeneratorsForScheduledQueryRule_Spec(generators) + scheduledQueryRule_SpecGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_Spec{}), generators) + + return scheduledQueryRule_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(gens map[string]gopter.Gen) { + gens["AutoMitigate"] = gen.PtrOf(gen.Bool()) + gens["AzureName"] = gen.AlphaString() + gens["CheckWorkspaceAlertsStorageConfigured"] = gen.PtrOf(gen.Bool()) + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["DisplayName"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["EvaluationFrequency"] = gen.PtrOf(gen.AlphaString()) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_Spec_LogAlert, ScheduledQueryRule_Kind_Spec_LogToMetric)) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["MuteActionsDuration"] = gen.PtrOf(gen.AlphaString()) + gens["OverrideQueryTimeRange"] = gen.PtrOf(gen.AlphaString()) + gens["Severity"] = gen.PtrOf(gen.OneConstOf( + ScheduledQueryRuleProperties_Severity_0, + ScheduledQueryRuleProperties_Severity_1, + ScheduledQueryRuleProperties_Severity_2, + ScheduledQueryRuleProperties_Severity_3, + ScheduledQueryRuleProperties_Severity_4)) + gens["SkipQueryValidation"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["TargetResourceTypes"] = gen.SliceOf(gen.AlphaString()) + gens["WindowSize"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRule_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRule_Spec(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(ActionsGenerator()) + gens["Criteria"] = gen.PtrOf(ScheduledQueryRuleCriteriaGenerator()) + gens["Identity"] = gen.PtrOf(IdentityGenerator()) + gens["OperatorSpec"] = gen.PtrOf(ScheduledQueryRuleOperatorSpecGenerator()) + gens["ResolveConfiguration"] = gen.PtrOf(RuleResolveConfigurationGenerator()) +} + +func Test_SystemData_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SystemData_STATUS to SystemData_STATUS via AssignProperties_To_SystemData_STATUS & AssignProperties_From_SystemData_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSystemData_STATUS, SystemData_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSystemData_STATUS tests if a specific instance of SystemData_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSystemData_STATUS(subject SystemData_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.SystemData_STATUS + err := copied.AssignProperties_To_SystemData_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SystemData_STATUS + err = actual.AssignProperties_From_SystemData_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_SystemData_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 SystemData_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSystemData_STATUS, SystemData_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSystemData_STATUS runs a test to see if a specific instance of SystemData_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSystemData_STATUS(subject SystemData_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SystemData_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 SystemData_STATUS instances for property testing - lazily instantiated by SystemData_STATUSGenerator() +var systemData_STATUSGenerator gopter.Gen + +// SystemData_STATUSGenerator returns a generator of SystemData_STATUS instances for property testing. +func SystemData_STATUSGenerator() gopter.Gen { + if systemData_STATUSGenerator != nil { + return systemData_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSystemData_STATUS(generators) + systemData_STATUSGenerator = gen.Struct(reflect.TypeOf(SystemData_STATUS{}), generators) + + return systemData_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSystemData_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSystemData_STATUS(gens map[string]gopter.Gen) { + gens["CreatedAt"] = gen.PtrOf(gen.AlphaString()) + gens["CreatedBy"] = gen.PtrOf(gen.AlphaString()) + gens["CreatedByType"] = gen.PtrOf(gen.OneConstOf( + SystemData_CreatedByType_STATUS_Application, + SystemData_CreatedByType_STATUS_Key, + SystemData_CreatedByType_STATUS_ManagedIdentity, + SystemData_CreatedByType_STATUS_User)) + gens["LastModifiedAt"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedBy"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedByType"] = gen.PtrOf(gen.OneConstOf( + SystemData_LastModifiedByType_STATUS_Application, + SystemData_LastModifiedByType_STATUS_Key, + SystemData_LastModifiedByType_STATUS_ManagedIdentity, + SystemData_LastModifiedByType_STATUS_User)) +} + +func Test_UserAssignedIdentityDetails_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from UserAssignedIdentityDetails to UserAssignedIdentityDetails via AssignProperties_To_UserAssignedIdentityDetails & AssignProperties_From_UserAssignedIdentityDetails returns original", + prop.ForAll(RunPropertyAssignmentTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForUserAssignedIdentityDetails tests if a specific instance of UserAssignedIdentityDetails can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.UserAssignedIdentityDetails + err := copied.AssignProperties_To_UserAssignedIdentityDetails(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual UserAssignedIdentityDetails + err = actual.AssignProperties_From_UserAssignedIdentityDetails(&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_UserAssignedIdentityDetails_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 UserAssignedIdentityDetails via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentityDetails runs a test to see if a specific instance of UserAssignedIdentityDetails round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentityDetails + 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 UserAssignedIdentityDetails instances for property testing - lazily instantiated by +// UserAssignedIdentityDetailsGenerator() +var userAssignedIdentityDetailsGenerator gopter.Gen + +// UserAssignedIdentityDetailsGenerator returns a generator of UserAssignedIdentityDetails instances for property testing. +func UserAssignedIdentityDetailsGenerator() gopter.Gen { + if userAssignedIdentityDetailsGenerator != nil { + return userAssignedIdentityDetailsGenerator + } + + generators := make(map[string]gopter.Gen) + userAssignedIdentityDetailsGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentityDetails{}), generators) + + return userAssignedIdentityDetailsGenerator +} + +func Test_UserIdentityProperties_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from UserIdentityProperties_STATUS to UserIdentityProperties_STATUS via AssignProperties_To_UserIdentityProperties_STATUS & AssignProperties_From_UserIdentityProperties_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForUserIdentityProperties_STATUS, UserIdentityProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForUserIdentityProperties_STATUS tests if a specific instance of UserIdentityProperties_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForUserIdentityProperties_STATUS(subject UserIdentityProperties_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other storage.UserIdentityProperties_STATUS + err := copied.AssignProperties_To_UserIdentityProperties_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual UserIdentityProperties_STATUS + err = actual.AssignProperties_From_UserIdentityProperties_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_UserIdentityProperties_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 UserIdentityProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserIdentityProperties_STATUS, UserIdentityProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserIdentityProperties_STATUS runs a test to see if a specific instance of UserIdentityProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForUserIdentityProperties_STATUS(subject UserIdentityProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserIdentityProperties_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 UserIdentityProperties_STATUS instances for property testing - lazily instantiated by +// UserIdentityProperties_STATUSGenerator() +var userIdentityProperties_STATUSGenerator gopter.Gen + +// UserIdentityProperties_STATUSGenerator returns a generator of UserIdentityProperties_STATUS instances for property testing. +func UserIdentityProperties_STATUSGenerator() gopter.Gen { + if userIdentityProperties_STATUSGenerator != nil { + return userIdentityProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForUserIdentityProperties_STATUS(generators) + userIdentityProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(UserIdentityProperties_STATUS{}), generators) + + return userIdentityProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForUserIdentityProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForUserIdentityProperties_STATUS(gens map[string]gopter.Gen) { + gens["ClientId"] = gen.PtrOf(gen.AlphaString()) + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/insights/v1api20231201/storage/groupversion_info_gen.go b/v2/api/insights/v1api20231201/storage/groupversion_info_gen.go new file mode 100644 index 00000000000..305c92a1045 --- /dev/null +++ b/v2/api/insights/v1api20231201/storage/groupversion_info_gen.go @@ -0,0 +1,32 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by azure-service-operator-codegen. DO NOT EDIT. + +// Package storage contains API Schema definitions for the insights storage API group +// +kubebuilder:object:generate=true +// All object properties are optional by default, this will be overridden when needed: +// +kubebuilder:validation:Optional +// +groupName=insights.azure.com +// +versionName=v1api20231201storage +package storage + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "insights.azure.com", Version: "v1api20231201storage"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = SchemeBuilder.SchemeBuilder +) diff --git a/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen.go b/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen.go new file mode 100644 index 00000000000..e132655954a --- /dev/null +++ b/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen.go @@ -0,0 +1,453 @@ +// 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/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/core" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets" + "github.com/rotisserie/eris" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=insights.azure.com,resources=scheduledqueryrules,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=insights.azure.com,resources={scheduledqueryrules/status,scheduledqueryrules/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 v1api20231201.ScheduledQueryRule +// Generator information: +// - Generated from: /monitor/resource-manager/Microsoft.Insights/stable/2023-12-01/scheduledQueryRule_API.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName} +type ScheduledQueryRule struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ScheduledQueryRule_Spec `json:"spec,omitempty"` + Status ScheduledQueryRule_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &ScheduledQueryRule{} + +// GetConditions returns the conditions of the resource +func (rule *ScheduledQueryRule) GetConditions() conditions.Conditions { + return rule.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (rule *ScheduledQueryRule) SetConditions(conditions conditions.Conditions) { + rule.Status.Conditions = conditions +} + +var _ configmaps.Exporter = &ScheduledQueryRule{} + +// ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property +func (rule *ScheduledQueryRule) ConfigMapDestinationExpressions() []*core.DestinationExpression { + if rule.Spec.OperatorSpec == nil { + return nil + } + return rule.Spec.OperatorSpec.ConfigMapExpressions +} + +var _ secrets.Exporter = &ScheduledQueryRule{} + +// SecretDestinationExpressions returns the Spec.OperatorSpec.SecretExpressions property +func (rule *ScheduledQueryRule) SecretDestinationExpressions() []*core.DestinationExpression { + if rule.Spec.OperatorSpec == nil { + return nil + } + return rule.Spec.OperatorSpec.SecretExpressions +} + +var _ genruntime.KubernetesResource = &ScheduledQueryRule{} + +// AzureName returns the Azure name of the resource +func (rule *ScheduledQueryRule) AzureName() string { + return rule.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-12-01" +func (rule ScheduledQueryRule) GetAPIVersion() string { + return "2023-12-01" +} + +// GetResourceScope returns the scope of the resource +func (rule *ScheduledQueryRule) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (rule *ScheduledQueryRule) GetSpec() genruntime.ConvertibleSpec { + return &rule.Spec +} + +// GetStatus returns the status of this resource +func (rule *ScheduledQueryRule) GetStatus() genruntime.ConvertibleStatus { + return &rule.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (rule *ScheduledQueryRule) 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/scheduledQueryRules" +func (rule *ScheduledQueryRule) GetType() string { + return "Microsoft.Insights/scheduledQueryRules" +} + +// NewEmptyStatus returns a new empty (blank) status +func (rule *ScheduledQueryRule) NewEmptyStatus() genruntime.ConvertibleStatus { + return &ScheduledQueryRule_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (rule *ScheduledQueryRule) Owner() *genruntime.ResourceReference { + if rule.Spec.Owner == nil { + return nil + } + + group, kind := genruntime.LookupOwnerGroupKind(rule.Spec) + return rule.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (rule *ScheduledQueryRule) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*ScheduledQueryRule_STATUS); ok { + rule.Status = *st + return nil + } + + // Convert status to required version + var st ScheduledQueryRule_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return eris.Wrap(err, "failed to convert status") + } + + rule.Status = st + return nil +} + +// Hub marks that this ScheduledQueryRule is the hub type for conversion +func (rule *ScheduledQueryRule) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (rule *ScheduledQueryRule) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: rule.Spec.OriginalVersion, + Kind: "ScheduledQueryRule", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20231201.ScheduledQueryRule +// Generator information: +// - Generated from: /monitor/resource-manager/Microsoft.Insights/stable/2023-12-01/scheduledQueryRule_API.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName} +type ScheduledQueryRuleList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ScheduledQueryRule `json:"items"` +} + +// Storage version of v1api20231201.APIVersion +// +kubebuilder:validation:Enum={"2023-12-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2023-12-01") + +// Storage version of v1api20231201.ScheduledQueryRule_Spec +type ScheduledQueryRule_Spec struct { + Actions *Actions `json:"actions,omitempty"` + AutoMitigate *bool `json:"autoMitigate,omitempty"` + + // 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"` + CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` + Criteria *ScheduledQueryRuleCriteria `json:"criteria,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + Identity *Identity `json:"identity,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` + OperatorSpec *ScheduledQueryRuleOperatorSpec `json:"operatorSpec,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,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"` + ResolveConfiguration *RuleResolveConfiguration `json:"resolveConfiguration,omitempty"` + ScopesReferences []genruntime.ResourceReference `armReference:"Scopes" json:"scopesReferences,omitempty"` + Severity *int `json:"severity,omitempty"` + SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` + WindowSize *string `json:"windowSize,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &ScheduledQueryRule_Spec{} + +// ConvertSpecFrom populates our ScheduledQueryRule_Spec from the provided source +func (rule *ScheduledQueryRule_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == rule { + return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(rule) +} + +// ConvertSpecTo populates the provided destination from our ScheduledQueryRule_Spec +func (rule *ScheduledQueryRule_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == rule { + return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(rule) +} + +// Storage version of v1api20231201.ScheduledQueryRule_STATUS +type ScheduledQueryRule_STATUS struct { + Actions *Actions_STATUS `json:"actions,omitempty"` + AutoMitigate *bool `json:"autoMitigate,omitempty"` + CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` + Conditions []conditions.Condition `json:"conditions,omitempty"` + CreatedWithApiVersion *string `json:"createdWithApiVersion,omitempty"` + Criteria *ScheduledQueryRuleCriteria_STATUS `json:"criteria,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Etag *string `json:"etag,omitempty"` + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + Id *string `json:"id,omitempty"` + Identity *Identity_STATUS `json:"identity,omitempty"` + IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty"` + IsWorkspaceAlertsStorageConfigured *bool `json:"isWorkspaceAlertsStorageConfigured,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` + Name *string `json:"name,omitempty"` + OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ResolveConfiguration *RuleResolveConfiguration_STATUS `json:"resolveConfiguration,omitempty"` + Scopes []string `json:"scopes,omitempty"` + Severity *int `json:"severity,omitempty"` + SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` + SystemData *SystemData_STATUS `json:"systemData,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` + Type *string `json:"type,omitempty"` + WindowSize *string `json:"windowSize,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &ScheduledQueryRule_STATUS{} + +// ConvertStatusFrom populates our ScheduledQueryRule_STATUS from the provided source +func (rule *ScheduledQueryRule_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == rule { + return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(rule) +} + +// ConvertStatusTo populates the provided destination from our ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == rule { + return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(rule) +} + +// Storage version of v1api20231201.Actions +// Actions to invoke when the alert fires. +type Actions struct { + ActionGroupsReferences []genruntime.ResourceReference `armReference:"ActionGroups" json:"actionGroupsReferences,omitempty"` + ActionProperties map[string]string `json:"actionProperties,omitempty"` + CustomProperties map[string]string `json:"customProperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20231201.Actions_STATUS +// Actions to invoke when the alert fires. +type Actions_STATUS struct { + ActionGroups []string `json:"actionGroups,omitempty"` + ActionProperties map[string]string `json:"actionProperties,omitempty"` + CustomProperties map[string]string `json:"customProperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20231201.Identity +// Identity for the resource. +type Identity struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` + UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` +} + +// Storage version of v1api20231201.Identity_STATUS +// Identity for the resource. +type Identity_STATUS struct { + PrincipalId *string `json:"principalId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + Type *string `json:"type,omitempty"` + UserAssignedIdentities map[string]UserIdentityProperties_STATUS `json:"userAssignedIdentities,omitempty"` +} + +// Storage version of v1api20231201.RuleResolveConfiguration +// TBD. Relevant only for rules of the kind LogAlert. +type RuleResolveConfiguration struct { + AutoResolved *bool `json:"autoResolved,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TimeToResolve *string `json:"timeToResolve,omitempty"` +} + +// Storage version of v1api20231201.RuleResolveConfiguration_STATUS +// TBD. Relevant only for rules of the kind LogAlert. +type RuleResolveConfiguration_STATUS struct { + AutoResolved *bool `json:"autoResolved,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TimeToResolve *string `json:"timeToResolve,omitempty"` +} + +// Storage version of v1api20231201.ScheduledQueryRuleCriteria +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria struct { + AllOf []Condition `json:"allOf,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20231201.ScheduledQueryRuleCriteria_STATUS +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria_STATUS struct { + AllOf []Condition_STATUS `json:"allOf,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20231201.ScheduledQueryRuleOperatorSpec +// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type ScheduledQueryRuleOperatorSpec struct { + ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SecretExpressions []*core.DestinationExpression `json:"secretExpressions,omitempty"` +} + +// Storage version of v1api20231201.SystemData_STATUS +// Metadata pertaining to creation and last modification of the resource. +type SystemData_STATUS struct { + CreatedAt *string `json:"createdAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + CreatedByType *string `json:"createdByType,omitempty"` + LastModifiedAt *string `json:"lastModifiedAt,omitempty"` + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedByType *string `json:"lastModifiedByType,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20231201.Condition +// A condition of the scheduled query rule. +type Condition struct { + Dimensions []Dimension `json:"dimensions,omitempty"` + FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` + MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` + MetricName *string `json:"metricName,omitempty"` + Operator *string `json:"operator,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Query *string `json:"query,omitempty"` + + // ResourceIdColumnReference: The column containing the resource id. The content of the column must be a uri formatted as + // resource id. Relevant only for rules of the kind LogAlert. + ResourceIdColumnReference *genruntime.ResourceReference `armReference:"ResourceIdColumn" json:"resourceIdColumnReference,omitempty"` + Threshold *float64 `json:"threshold,omitempty"` + TimeAggregation *string `json:"timeAggregation,omitempty"` +} + +// Storage version of v1api20231201.Condition_STATUS +// A condition of the scheduled query rule. +type Condition_STATUS struct { + Dimensions []Dimension_STATUS `json:"dimensions,omitempty"` + FailingPeriods *Condition_FailingPeriods_STATUS `json:"failingPeriods,omitempty"` + MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` + MetricName *string `json:"metricName,omitempty"` + Operator *string `json:"operator,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Query *string `json:"query,omitempty"` + ResourceIdColumn *string `json:"resourceIdColumn,omitempty"` + Threshold *float64 `json:"threshold,omitempty"` + TimeAggregation *string `json:"timeAggregation,omitempty"` +} + +// Storage version of v1api20231201.UserAssignedIdentityDetails +// Information about the user assigned identity for the resource +type UserAssignedIdentityDetails struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` +} + +// Storage version of v1api20231201.UserIdentityProperties_STATUS +// User assigned identity properties. +type UserIdentityProperties_STATUS struct { + ClientId *string `json:"clientId,omitempty"` + PrincipalId *string `json:"principalId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20231201.Condition_FailingPeriods +type Condition_FailingPeriods struct { + MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` + NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20231201.Condition_FailingPeriods_STATUS +type Condition_FailingPeriods_STATUS struct { + MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` + NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20231201.Dimension +// Dimension splitting and filtering definition +type Dimension struct { + Name *string `json:"name,omitempty"` + Operator *string `json:"operator,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Values []string `json:"values,omitempty"` +} + +// Storage version of v1api20231201.Dimension_STATUS +// Dimension splitting and filtering definition +type Dimension_STATUS struct { + Name *string `json:"name,omitempty"` + Operator *string `json:"operator,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Values []string `json:"values,omitempty"` +} + +func init() { + SchemeBuilder.Register(&ScheduledQueryRule{}, &ScheduledQueryRuleList{}) +} diff --git a/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen_test.go b/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen_test.go new file mode 100644 index 00000000000..866a3c917ae --- /dev/null +++ b/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen_test.go @@ -0,0 +1,1454 @@ +// 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_Actions_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 Actions via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActions, ActionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActions runs a test to see if a specific instance of Actions round trips to JSON and back losslessly +func RunJSONSerializationTestForActions(subject Actions) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Actions + 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 Actions instances for property testing - lazily instantiated by ActionsGenerator() +var actionsGenerator gopter.Gen + +// ActionsGenerator returns a generator of Actions instances for property testing. +func ActionsGenerator() gopter.Gen { + if actionsGenerator != nil { + return actionsGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActions(generators) + actionsGenerator = gen.Struct(reflect.TypeOf(Actions{}), generators) + + return actionsGenerator +} + +// AddIndependentPropertyGeneratorsForActions is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActions(gens map[string]gopter.Gen) { + gens["ActionProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["CustomProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) +} + +func Test_Actions_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 Actions_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForActions_STATUS, Actions_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForActions_STATUS runs a test to see if a specific instance of Actions_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForActions_STATUS(subject Actions_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Actions_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 Actions_STATUS instances for property testing - lazily instantiated by Actions_STATUSGenerator() +var actions_STATUSGenerator gopter.Gen + +// Actions_STATUSGenerator returns a generator of Actions_STATUS instances for property testing. +func Actions_STATUSGenerator() gopter.Gen { + if actions_STATUSGenerator != nil { + return actions_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForActions_STATUS(generators) + actions_STATUSGenerator = gen.Struct(reflect.TypeOf(Actions_STATUS{}), generators) + + return actions_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForActions_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForActions_STATUS(gens map[string]gopter.Gen) { + gens["ActionGroups"] = gen.SliceOf(gen.AlphaString()) + gens["ActionProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["CustomProperties"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) +} + +func Test_Condition_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 Condition via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition, ConditionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition runs a test to see if a specific instance of Condition round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition(subject Condition) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition + 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 Condition instances for property testing - lazily instantiated by ConditionGenerator() +var conditionGenerator gopter.Gen + +// ConditionGenerator returns a generator of Condition instances for property testing. +// We first initialize conditionGenerator 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 ConditionGenerator() gopter.Gen { + if conditionGenerator != nil { + return conditionGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition(generators) + conditionGenerator = gen.Struct(reflect.TypeOf(Condition{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition(generators) + AddRelatedPropertyGeneratorsForCondition(generators) + conditionGenerator = gen.Struct(reflect.TypeOf(Condition{}), generators) + + return conditionGenerator +} + +// AddIndependentPropertyGeneratorsForCondition is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { + gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) + gens["MetricName"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.AlphaString()) + gens["Query"] = gen.PtrOf(gen.AlphaString()) + gens["Threshold"] = gen.PtrOf(gen.Float64()) + gens["TimeAggregation"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForCondition is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { + gens["Dimensions"] = gen.SliceOf(DimensionGenerator()) + gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriodsGenerator()) +} + +func Test_Condition_FailingPeriods_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 Condition_FailingPeriods via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition_FailingPeriods, Condition_FailingPeriodsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition_FailingPeriods runs a test to see if a specific instance of Condition_FailingPeriods round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition_FailingPeriods(subject Condition_FailingPeriods) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition_FailingPeriods + 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 Condition_FailingPeriods instances for property testing - lazily instantiated by +// Condition_FailingPeriodsGenerator() +var condition_FailingPeriodsGenerator gopter.Gen + +// Condition_FailingPeriodsGenerator returns a generator of Condition_FailingPeriods instances for property testing. +func Condition_FailingPeriodsGenerator() gopter.Gen { + if condition_FailingPeriodsGenerator != nil { + return condition_FailingPeriodsGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_FailingPeriods(generators) + condition_FailingPeriodsGenerator = gen.Struct(reflect.TypeOf(Condition_FailingPeriods{}), generators) + + return condition_FailingPeriodsGenerator +} + +// AddIndependentPropertyGeneratorsForCondition_FailingPeriods is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition_FailingPeriods(gens map[string]gopter.Gen) { + gens["MinFailingPeriodsToAlert"] = gen.PtrOf(gen.Int()) + gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) +} + +func Test_Condition_FailingPeriods_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 Condition_FailingPeriods_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition_FailingPeriods_STATUS, Condition_FailingPeriods_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition_FailingPeriods_STATUS runs a test to see if a specific instance of Condition_FailingPeriods_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition_FailingPeriods_STATUS(subject Condition_FailingPeriods_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition_FailingPeriods_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 Condition_FailingPeriods_STATUS instances for property testing - lazily instantiated by +// Condition_FailingPeriods_STATUSGenerator() +var condition_FailingPeriods_STATUSGenerator gopter.Gen + +// Condition_FailingPeriods_STATUSGenerator returns a generator of Condition_FailingPeriods_STATUS instances for property testing. +func Condition_FailingPeriods_STATUSGenerator() gopter.Gen { + if condition_FailingPeriods_STATUSGenerator != nil { + return condition_FailingPeriods_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS(generators) + condition_FailingPeriods_STATUSGenerator = gen.Struct(reflect.TypeOf(Condition_FailingPeriods_STATUS{}), generators) + + return condition_FailingPeriods_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS(gens map[string]gopter.Gen) { + gens["MinFailingPeriodsToAlert"] = gen.PtrOf(gen.Int()) + gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) +} + +func Test_Condition_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 Condition_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForCondition_STATUS, Condition_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForCondition_STATUS runs a test to see if a specific instance of Condition_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForCondition_STATUS(subject Condition_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Condition_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 Condition_STATUS instances for property testing - lazily instantiated by Condition_STATUSGenerator() +var condition_STATUSGenerator gopter.Gen + +// Condition_STATUSGenerator returns a generator of Condition_STATUS instances for property testing. +// We first initialize condition_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 Condition_STATUSGenerator() gopter.Gen { + if condition_STATUSGenerator != nil { + return condition_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_STATUS(generators) + condition_STATUSGenerator = gen.Struct(reflect.TypeOf(Condition_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForCondition_STATUS(generators) + AddRelatedPropertyGeneratorsForCondition_STATUS(generators) + condition_STATUSGenerator = gen.Struct(reflect.TypeOf(Condition_STATUS{}), generators) + + return condition_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForCondition_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) { + gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) + gens["MetricName"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.AlphaString()) + gens["Query"] = gen.PtrOf(gen.AlphaString()) + gens["ResourceIdColumn"] = gen.PtrOf(gen.AlphaString()) + gens["Threshold"] = gen.PtrOf(gen.Float64()) + gens["TimeAggregation"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForCondition_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) { + gens["Dimensions"] = gen.SliceOf(Dimension_STATUSGenerator()) + gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriods_STATUSGenerator()) +} + +func Test_Dimension_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 Dimension via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDimension, DimensionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDimension runs a test to see if a specific instance of Dimension round trips to JSON and back losslessly +func RunJSONSerializationTestForDimension(subject Dimension) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Dimension + 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 Dimension instances for property testing - lazily instantiated by DimensionGenerator() +var dimensionGenerator gopter.Gen + +// DimensionGenerator returns a generator of Dimension instances for property testing. +func DimensionGenerator() gopter.Gen { + if dimensionGenerator != nil { + return dimensionGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDimension(generators) + dimensionGenerator = gen.Struct(reflect.TypeOf(Dimension{}), generators) + + return dimensionGenerator +} + +// AddIndependentPropertyGeneratorsForDimension is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDimension(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.AlphaString()) + gens["Values"] = gen.SliceOf(gen.AlphaString()) +} + +func Test_Dimension_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 Dimension_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDimension_STATUS, Dimension_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDimension_STATUS runs a test to see if a specific instance of Dimension_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDimension_STATUS(subject Dimension_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Dimension_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 Dimension_STATUS instances for property testing - lazily instantiated by Dimension_STATUSGenerator() +var dimension_STATUSGenerator gopter.Gen + +// Dimension_STATUSGenerator returns a generator of Dimension_STATUS instances for property testing. +func Dimension_STATUSGenerator() gopter.Gen { + if dimension_STATUSGenerator != nil { + return dimension_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDimension_STATUS(generators) + dimension_STATUSGenerator = gen.Struct(reflect.TypeOf(Dimension_STATUS{}), generators) + + return dimension_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDimension_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDimension_STATUS(gens map[string]gopter.Gen) { + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Operator"] = gen.PtrOf(gen.AlphaString()) + gens["Values"] = gen.SliceOf(gen.AlphaString()) +} + +func Test_Identity_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 Identity via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity, IdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity runs a test to see if a specific instance of Identity round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity(subject Identity) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity + 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 Identity instances for property testing - lazily instantiated by IdentityGenerator() +var identityGenerator gopter.Gen + +// IdentityGenerator returns a generator of Identity instances for property testing. +// We first initialize identityGenerator 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 IdentityGenerator() gopter.Gen { + if identityGenerator != nil { + return identityGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity(generators) + identityGenerator = gen.Struct(reflect.TypeOf(Identity{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity(generators) + AddRelatedPropertyGeneratorsForIdentity(generators) + identityGenerator = gen.Struct(reflect.TypeOf(Identity{}), generators) + + return identityGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForIdentity is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.SliceOf(UserAssignedIdentityDetailsGenerator()) +} + +func Test_Identity_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 Identity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIdentity_STATUS, Identity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIdentity_STATUS runs a test to see if a specific instance of Identity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForIdentity_STATUS(subject Identity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Identity_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 Identity_STATUS instances for property testing - lazily instantiated by Identity_STATUSGenerator() +var identity_STATUSGenerator gopter.Gen + +// Identity_STATUSGenerator returns a generator of Identity_STATUS instances for property testing. +// We first initialize identity_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 Identity_STATUSGenerator() gopter.Gen { + if identity_STATUSGenerator != nil { + return identity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS(generators) + identity_STATUSGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIdentity_STATUS(generators) + AddRelatedPropertyGeneratorsForIdentity_STATUS(generators) + identity_STATUSGenerator = gen.Struct(reflect.TypeOf(Identity_STATUS{}), generators) + + return identity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) { + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForIdentity_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForIdentity_STATUS(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf( + gen.AlphaString(), + UserIdentityProperties_STATUSGenerator()) +} + +func Test_RuleResolveConfiguration_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 RuleResolveConfiguration via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRuleResolveConfiguration, RuleResolveConfigurationGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRuleResolveConfiguration runs a test to see if a specific instance of RuleResolveConfiguration round trips to JSON and back losslessly +func RunJSONSerializationTestForRuleResolveConfiguration(subject RuleResolveConfiguration) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RuleResolveConfiguration + 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 RuleResolveConfiguration instances for property testing - lazily instantiated by +// RuleResolveConfigurationGenerator() +var ruleResolveConfigurationGenerator gopter.Gen + +// RuleResolveConfigurationGenerator returns a generator of RuleResolveConfiguration instances for property testing. +func RuleResolveConfigurationGenerator() gopter.Gen { + if ruleResolveConfigurationGenerator != nil { + return ruleResolveConfigurationGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRuleResolveConfiguration(generators) + ruleResolveConfigurationGenerator = gen.Struct(reflect.TypeOf(RuleResolveConfiguration{}), generators) + + return ruleResolveConfigurationGenerator +} + +// AddIndependentPropertyGeneratorsForRuleResolveConfiguration is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRuleResolveConfiguration(gens map[string]gopter.Gen) { + gens["AutoResolved"] = gen.PtrOf(gen.Bool()) + gens["TimeToResolve"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_RuleResolveConfiguration_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 RuleResolveConfiguration_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRuleResolveConfiguration_STATUS, RuleResolveConfiguration_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRuleResolveConfiguration_STATUS runs a test to see if a specific instance of RuleResolveConfiguration_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForRuleResolveConfiguration_STATUS(subject RuleResolveConfiguration_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RuleResolveConfiguration_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 RuleResolveConfiguration_STATUS instances for property testing - lazily instantiated by +// RuleResolveConfiguration_STATUSGenerator() +var ruleResolveConfiguration_STATUSGenerator gopter.Gen + +// RuleResolveConfiguration_STATUSGenerator returns a generator of RuleResolveConfiguration_STATUS instances for property testing. +func RuleResolveConfiguration_STATUSGenerator() gopter.Gen { + if ruleResolveConfiguration_STATUSGenerator != nil { + return ruleResolveConfiguration_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForRuleResolveConfiguration_STATUS(generators) + ruleResolveConfiguration_STATUSGenerator = gen.Struct(reflect.TypeOf(RuleResolveConfiguration_STATUS{}), generators) + + return ruleResolveConfiguration_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForRuleResolveConfiguration_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRuleResolveConfiguration_STATUS(gens map[string]gopter.Gen) { + gens["AutoResolved"] = gen.PtrOf(gen.Bool()) + gens["TimeToResolve"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_ScheduledQueryRule_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 ScheduledQueryRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRule, ScheduledQueryRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRule runs a test to see if a specific instance of ScheduledQueryRule round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRule(subject ScheduledQueryRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRule + 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 ScheduledQueryRule instances for property testing - lazily instantiated by ScheduledQueryRuleGenerator() +var scheduledQueryRuleGenerator gopter.Gen + +// ScheduledQueryRuleGenerator returns a generator of ScheduledQueryRule instances for property testing. +func ScheduledQueryRuleGenerator() gopter.Gen { + if scheduledQueryRuleGenerator != nil { + return scheduledQueryRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForScheduledQueryRule(generators) + scheduledQueryRuleGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule{}), generators) + + return scheduledQueryRuleGenerator +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRule is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRule(gens map[string]gopter.Gen) { + gens["Spec"] = ScheduledQueryRule_SpecGenerator() + gens["Status"] = ScheduledQueryRule_STATUSGenerator() +} + +func Test_ScheduledQueryRuleCriteria_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 ScheduledQueryRuleCriteria via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRuleCriteria, ScheduledQueryRuleCriteriaGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRuleCriteria runs a test to see if a specific instance of ScheduledQueryRuleCriteria round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRuleCriteria(subject ScheduledQueryRuleCriteria) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRuleCriteria + 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 ScheduledQueryRuleCriteria instances for property testing - lazily instantiated by +// ScheduledQueryRuleCriteriaGenerator() +var scheduledQueryRuleCriteriaGenerator gopter.Gen + +// ScheduledQueryRuleCriteriaGenerator returns a generator of ScheduledQueryRuleCriteria instances for property testing. +func ScheduledQueryRuleCriteriaGenerator() gopter.Gen { + if scheduledQueryRuleCriteriaGenerator != nil { + return scheduledQueryRuleCriteriaGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria(generators) + scheduledQueryRuleCriteriaGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleCriteria{}), generators) + + return scheduledQueryRuleCriteriaGenerator +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria(gens map[string]gopter.Gen) { + gens["AllOf"] = gen.SliceOf(ConditionGenerator()) +} + +func Test_ScheduledQueryRuleCriteria_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 ScheduledQueryRuleCriteria_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRuleCriteria_STATUS, ScheduledQueryRuleCriteria_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRuleCriteria_STATUS runs a test to see if a specific instance of ScheduledQueryRuleCriteria_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRuleCriteria_STATUS(subject ScheduledQueryRuleCriteria_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRuleCriteria_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 ScheduledQueryRuleCriteria_STATUS instances for property testing - lazily instantiated by +// ScheduledQueryRuleCriteria_STATUSGenerator() +var scheduledQueryRuleCriteria_STATUSGenerator gopter.Gen + +// ScheduledQueryRuleCriteria_STATUSGenerator returns a generator of ScheduledQueryRuleCriteria_STATUS instances for property testing. +func ScheduledQueryRuleCriteria_STATUSGenerator() gopter.Gen { + if scheduledQueryRuleCriteria_STATUSGenerator != nil { + return scheduledQueryRuleCriteria_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS(generators) + scheduledQueryRuleCriteria_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleCriteria_STATUS{}), generators) + + return scheduledQueryRuleCriteria_STATUSGenerator +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS(gens map[string]gopter.Gen) { + gens["AllOf"] = gen.SliceOf(Condition_STATUSGenerator()) +} + +func Test_ScheduledQueryRuleOperatorSpec_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 ScheduledQueryRuleOperatorSpec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRuleOperatorSpec, ScheduledQueryRuleOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRuleOperatorSpec runs a test to see if a specific instance of ScheduledQueryRuleOperatorSpec round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRuleOperatorSpec(subject ScheduledQueryRuleOperatorSpec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRuleOperatorSpec + 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 ScheduledQueryRuleOperatorSpec instances for property testing - lazily instantiated by +// ScheduledQueryRuleOperatorSpecGenerator() +var scheduledQueryRuleOperatorSpecGenerator gopter.Gen + +// ScheduledQueryRuleOperatorSpecGenerator returns a generator of ScheduledQueryRuleOperatorSpec instances for property testing. +func ScheduledQueryRuleOperatorSpecGenerator() gopter.Gen { + if scheduledQueryRuleOperatorSpecGenerator != nil { + return scheduledQueryRuleOperatorSpecGenerator + } + + generators := make(map[string]gopter.Gen) + scheduledQueryRuleOperatorSpecGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRuleOperatorSpec{}), generators) + + return scheduledQueryRuleOperatorSpecGenerator +} + +func Test_ScheduledQueryRule_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 ScheduledQueryRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRule_STATUS, ScheduledQueryRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRule_STATUS runs a test to see if a specific instance of ScheduledQueryRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRule_STATUS(subject ScheduledQueryRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRule_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 ScheduledQueryRule_STATUS instances for property testing - lazily instantiated by +// ScheduledQueryRule_STATUSGenerator() +var scheduledQueryRule_STATUSGenerator gopter.Gen + +// ScheduledQueryRule_STATUSGenerator returns a generator of ScheduledQueryRule_STATUS instances for property testing. +// We first initialize scheduledQueryRule_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 ScheduledQueryRule_STATUSGenerator() gopter.Gen { + if scheduledQueryRule_STATUSGenerator != nil { + return scheduledQueryRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(generators) + scheduledQueryRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(generators) + AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS(generators) + scheduledQueryRule_STATUSGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_STATUS{}), generators) + + return scheduledQueryRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[string]gopter.Gen) { + gens["AutoMitigate"] = gen.PtrOf(gen.Bool()) + gens["CheckWorkspaceAlertsStorageConfigured"] = gen.PtrOf(gen.Bool()) + gens["CreatedWithApiVersion"] = gen.PtrOf(gen.AlphaString()) + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["DisplayName"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["EvaluationFrequency"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["IsLegacyLogAnalyticsRule"] = gen.PtrOf(gen.Bool()) + gens["IsWorkspaceAlertsStorageConfigured"] = gen.PtrOf(gen.Bool()) + gens["Kind"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["MuteActionsDuration"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["OverrideQueryTimeRange"] = gen.PtrOf(gen.AlphaString()) + gens["Scopes"] = gen.SliceOf(gen.AlphaString()) + gens["Severity"] = gen.PtrOf(gen.Int()) + gens["SkipQueryValidation"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["TargetResourceTypes"] = gen.SliceOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) + gens["WindowSize"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(Actions_STATUSGenerator()) + gens["Criteria"] = gen.PtrOf(ScheduledQueryRuleCriteria_STATUSGenerator()) + gens["Identity"] = gen.PtrOf(Identity_STATUSGenerator()) + gens["ResolveConfiguration"] = gen.PtrOf(RuleResolveConfiguration_STATUSGenerator()) + gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator()) +} + +func Test_ScheduledQueryRule_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 ScheduledQueryRule_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForScheduledQueryRule_Spec, ScheduledQueryRule_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForScheduledQueryRule_Spec runs a test to see if a specific instance of ScheduledQueryRule_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForScheduledQueryRule_Spec(subject ScheduledQueryRule_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ScheduledQueryRule_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 ScheduledQueryRule_Spec instances for property testing - lazily instantiated by +// ScheduledQueryRule_SpecGenerator() +var scheduledQueryRule_SpecGenerator gopter.Gen + +// ScheduledQueryRule_SpecGenerator returns a generator of ScheduledQueryRule_Spec instances for property testing. +// We first initialize scheduledQueryRule_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 ScheduledQueryRule_SpecGenerator() gopter.Gen { + if scheduledQueryRule_SpecGenerator != nil { + return scheduledQueryRule_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(generators) + scheduledQueryRule_SpecGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(generators) + AddRelatedPropertyGeneratorsForScheduledQueryRule_Spec(generators) + scheduledQueryRule_SpecGenerator = gen.Struct(reflect.TypeOf(ScheduledQueryRule_Spec{}), generators) + + return scheduledQueryRule_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(gens map[string]gopter.Gen) { + gens["AutoMitigate"] = gen.PtrOf(gen.Bool()) + gens["AzureName"] = gen.AlphaString() + gens["CheckWorkspaceAlertsStorageConfigured"] = gen.PtrOf(gen.Bool()) + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["DisplayName"] = gen.PtrOf(gen.AlphaString()) + gens["Enabled"] = gen.PtrOf(gen.Bool()) + gens["EvaluationFrequency"] = gen.PtrOf(gen.AlphaString()) + gens["Kind"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["MuteActionsDuration"] = gen.PtrOf(gen.AlphaString()) + gens["OriginalVersion"] = gen.AlphaString() + gens["OverrideQueryTimeRange"] = gen.PtrOf(gen.AlphaString()) + gens["Severity"] = gen.PtrOf(gen.Int()) + gens["SkipQueryValidation"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["TargetResourceTypes"] = gen.SliceOf(gen.AlphaString()) + gens["WindowSize"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForScheduledQueryRule_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForScheduledQueryRule_Spec(gens map[string]gopter.Gen) { + gens["Actions"] = gen.PtrOf(ActionsGenerator()) + gens["Criteria"] = gen.PtrOf(ScheduledQueryRuleCriteriaGenerator()) + gens["Identity"] = gen.PtrOf(IdentityGenerator()) + gens["OperatorSpec"] = gen.PtrOf(ScheduledQueryRuleOperatorSpecGenerator()) + gens["ResolveConfiguration"] = gen.PtrOf(RuleResolveConfigurationGenerator()) +} + +func Test_SystemData_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 SystemData_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSystemData_STATUS, SystemData_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSystemData_STATUS runs a test to see if a specific instance of SystemData_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSystemData_STATUS(subject SystemData_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SystemData_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 SystemData_STATUS instances for property testing - lazily instantiated by SystemData_STATUSGenerator() +var systemData_STATUSGenerator gopter.Gen + +// SystemData_STATUSGenerator returns a generator of SystemData_STATUS instances for property testing. +func SystemData_STATUSGenerator() gopter.Gen { + if systemData_STATUSGenerator != nil { + return systemData_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSystemData_STATUS(generators) + systemData_STATUSGenerator = gen.Struct(reflect.TypeOf(SystemData_STATUS{}), generators) + + return systemData_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSystemData_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSystemData_STATUS(gens map[string]gopter.Gen) { + gens["CreatedAt"] = gen.PtrOf(gen.AlphaString()) + gens["CreatedBy"] = gen.PtrOf(gen.AlphaString()) + gens["CreatedByType"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedAt"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedBy"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedByType"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_UserAssignedIdentityDetails_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 UserAssignedIdentityDetails via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentityDetails runs a test to see if a specific instance of UserAssignedIdentityDetails round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentityDetails + 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 UserAssignedIdentityDetails instances for property testing - lazily instantiated by +// UserAssignedIdentityDetailsGenerator() +var userAssignedIdentityDetailsGenerator gopter.Gen + +// UserAssignedIdentityDetailsGenerator returns a generator of UserAssignedIdentityDetails instances for property testing. +func UserAssignedIdentityDetailsGenerator() gopter.Gen { + if userAssignedIdentityDetailsGenerator != nil { + return userAssignedIdentityDetailsGenerator + } + + generators := make(map[string]gopter.Gen) + userAssignedIdentityDetailsGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentityDetails{}), generators) + + return userAssignedIdentityDetailsGenerator +} + +func Test_UserIdentityProperties_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 UserIdentityProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserIdentityProperties_STATUS, UserIdentityProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserIdentityProperties_STATUS runs a test to see if a specific instance of UserIdentityProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForUserIdentityProperties_STATUS(subject UserIdentityProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserIdentityProperties_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 UserIdentityProperties_STATUS instances for property testing - lazily instantiated by +// UserIdentityProperties_STATUSGenerator() +var userIdentityProperties_STATUSGenerator gopter.Gen + +// UserIdentityProperties_STATUSGenerator returns a generator of UserIdentityProperties_STATUS instances for property testing. +func UserIdentityProperties_STATUSGenerator() gopter.Gen { + if userIdentityProperties_STATUSGenerator != nil { + return userIdentityProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForUserIdentityProperties_STATUS(generators) + userIdentityProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(UserIdentityProperties_STATUS{}), generators) + + return userIdentityProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForUserIdentityProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForUserIdentityProperties_STATUS(gens map[string]gopter.Gen) { + gens["ClientId"] = gen.PtrOf(gen.AlphaString()) + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/insights/v1api20231201/storage/structure.txt b/v2/api/insights/v1api20231201/storage/structure.txt new file mode 100644 index 00000000000..7123980b61b --- /dev/null +++ b/v2/api/insights/v1api20231201/storage/structure.txt @@ -0,0 +1,139 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage +----------------------------------------------------------------------------- +APIVersion: Enum (1 value) +└── "2023-12-01" +ScheduledQueryRule: Resource +├── Owner: resources/v1apiv20191001.ResourceGroup +├── Spec: Object (25 properties) +│ ├── Actions: *Object (4 properties) +│ │ ├── ActionGroupsReferences: genruntime.ResourceReference[] +│ │ ├── ActionProperties: map[string]string +│ │ ├── CustomProperties: map[string]string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── AutoMitigate: *bool +│ ├── AzureName: string +│ ├── CheckWorkspaceAlertsStorageConfigured: *bool +│ ├── Criteria: *Object (2 properties) +│ │ ├── AllOf: Object (10 properties)[] +│ │ │ ├── Dimensions: Object (4 properties)[] +│ │ │ │ ├── Name: *string +│ │ │ │ ├── Operator: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── Values: string[] +│ │ │ ├── FailingPeriods: *Object (3 properties) +│ │ │ │ ├── MinFailingPeriodsToAlert: *int +│ │ │ │ ├── NumberOfEvaluationPeriods: *int +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── MetricMeasureColumn: *string +│ │ │ ├── MetricName: *string +│ │ │ ├── Operator: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Query: *string +│ │ │ ├── ResourceIdColumnReference: *genruntime.ResourceReference +│ │ │ ├── Threshold: *float64 +│ │ │ └── TimeAggregation: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Description: *string +│ ├── DisplayName: *string +│ ├── Enabled: *bool +│ ├── EvaluationFrequency: *string +│ ├── Identity: *Object (3 properties) +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── Type: *string +│ │ └── UserAssignedIdentities: Object (2 properties)[] +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Reference: genruntime.ResourceReference +│ ├── Kind: *string +│ ├── Location: *string +│ ├── MuteActionsDuration: *string +│ ├── OperatorSpec: *Object (3 properties) +│ │ ├── ConfigMapExpressions: *core.DestinationExpression[] +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── SecretExpressions: *core.DestinationExpression[] +│ ├── OriginalVersion: string +│ ├── OverrideQueryTimeRange: *string +│ ├── Owner: *genruntime.KnownResourceReference +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── ResolveConfiguration: *Object (3 properties) +│ │ ├── AutoResolved: *bool +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── TimeToResolve: *string +│ ├── ScopesReferences: genruntime.ResourceReference[] +│ ├── Severity: *int +│ ├── SkipQueryValidation: *bool +│ ├── Tags: map[string]string +│ ├── TargetResourceTypes: string[] +│ └── WindowSize: *string +└── Status: Object (30 properties) + ├── Actions: *Object (4 properties) + │ ├── ActionGroups: string[] + │ ├── ActionProperties: map[string]string + │ ├── CustomProperties: map[string]string + │ └── PropertyBag: genruntime.PropertyBag + ├── AutoMitigate: *bool + ├── CheckWorkspaceAlertsStorageConfigured: *bool + ├── Conditions: conditions.Condition[] + ├── CreatedWithApiVersion: *string + ├── Criteria: *Object (2 properties) + │ ├── AllOf: Object (10 properties)[] + │ │ ├── Dimensions: Object (4 properties)[] + │ │ │ ├── Name: *string + │ │ │ ├── Operator: *string + │ │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ │ └── Values: string[] + │ │ ├── FailingPeriods: *Object (3 properties) + │ │ │ ├── MinFailingPeriodsToAlert: *int + │ │ │ ├── NumberOfEvaluationPeriods: *int + │ │ │ └── PropertyBag: genruntime.PropertyBag + │ │ ├── MetricMeasureColumn: *string + │ │ ├── MetricName: *string + │ │ ├── Operator: *string + │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ ├── Query: *string + │ │ ├── ResourceIdColumn: *string + │ │ ├── Threshold: *float64 + │ │ └── TimeAggregation: *string + │ └── PropertyBag: genruntime.PropertyBag + ├── Description: *string + ├── DisplayName: *string + ├── Enabled: *bool + ├── Etag: *string + ├── EvaluationFrequency: *string + ├── Id: *string + ├── Identity: *Object (5 properties) + │ ├── PrincipalId: *string + │ ├── PropertyBag: genruntime.PropertyBag + │ ├── TenantId: *string + │ ├── Type: *string + │ └── UserAssignedIdentities: map[string]Object (3 properties) + │ ├── ClientId: *string + │ ├── PrincipalId: *string + │ └── PropertyBag: genruntime.PropertyBag + ├── IsLegacyLogAnalyticsRule: *bool + ├── IsWorkspaceAlertsStorageConfigured: *bool + ├── Kind: *string + ├── Location: *string + ├── MuteActionsDuration: *string + ├── Name: *string + ├── OverrideQueryTimeRange: *string + ├── PropertyBag: genruntime.PropertyBag + ├── ResolveConfiguration: *Object (3 properties) + │ ├── AutoResolved: *bool + │ ├── PropertyBag: genruntime.PropertyBag + │ └── TimeToResolve: *string + ├── Scopes: string[] + ├── Severity: *int + ├── SkipQueryValidation: *bool + ├── SystemData: *Object (7 properties) + │ ├── CreatedAt: *string + │ ├── CreatedBy: *string + │ ├── CreatedByType: *string + │ ├── LastModifiedAt: *string + │ ├── LastModifiedBy: *string + │ ├── LastModifiedByType: *string + │ └── PropertyBag: genruntime.PropertyBag + ├── Tags: map[string]string + ├── TargetResourceTypes: string[] + ├── Type: *string + └── WindowSize: *string diff --git a/v2/api/insights/v1api20231201/storage/zz_generated.deepcopy.go b/v2/api/insights/v1api20231201/storage/zz_generated.deepcopy.go new file mode 100644 index 00000000000..195b538e18d --- /dev/null +++ b/v2/api/insights/v1api20231201/storage/zz_generated.deepcopy.go @@ -0,0 +1,1090 @@ +//go:build !ignore_autogenerated + +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/core" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Actions) DeepCopyInto(out *Actions) { + *out = *in + if in.ActionGroupsReferences != nil { + in, out := &in.ActionGroupsReferences, &out.ActionGroupsReferences + *out = make([]genruntime.ResourceReference, len(*in)) + copy(*out, *in) + } + if in.ActionProperties != nil { + in, out := &in.ActionProperties, &out.ActionProperties + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.CustomProperties != nil { + in, out := &in.CustomProperties, &out.CustomProperties + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + 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 Actions. +func (in *Actions) DeepCopy() *Actions { + if in == nil { + return nil + } + out := new(Actions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Actions_STATUS) DeepCopyInto(out *Actions_STATUS) { + *out = *in + if in.ActionGroups != nil { + in, out := &in.ActionGroups, &out.ActionGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ActionProperties != nil { + in, out := &in.ActionProperties, &out.ActionProperties + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.CustomProperties != nil { + in, out := &in.CustomProperties, &out.CustomProperties + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + 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 Actions_STATUS. +func (in *Actions_STATUS) DeepCopy() *Actions_STATUS { + if in == nil { + return nil + } + out := new(Actions_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 *Condition) DeepCopyInto(out *Condition) { + *out = *in + if in.Dimensions != nil { + in, out := &in.Dimensions, &out.Dimensions + *out = make([]Dimension, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.FailingPeriods != nil { + in, out := &in.FailingPeriods, &out.FailingPeriods + *out = new(Condition_FailingPeriods) + (*in).DeepCopyInto(*out) + } + if in.MetricMeasureColumn != nil { + in, out := &in.MetricMeasureColumn, &out.MetricMeasureColumn + *out = new(string) + **out = **in + } + if in.MetricName != nil { + in, out := &in.MetricName, &out.MetricName + *out = new(string) + **out = **in + } + if in.Operator != nil { + in, out := &in.Operator, &out.Operator + *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.Query != nil { + in, out := &in.Query, &out.Query + *out = new(string) + **out = **in + } + if in.ResourceIdColumnReference != nil { + in, out := &in.ResourceIdColumnReference, &out.ResourceIdColumnReference + *out = new(genruntime.ResourceReference) + **out = **in + } + if in.Threshold != nil { + in, out := &in.Threshold, &out.Threshold + *out = new(float64) + **out = **in + } + if in.TimeAggregation != nil { + in, out := &in.TimeAggregation, &out.TimeAggregation + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition_FailingPeriods) DeepCopyInto(out *Condition_FailingPeriods) { + *out = *in + if in.MinFailingPeriodsToAlert != nil { + in, out := &in.MinFailingPeriodsToAlert, &out.MinFailingPeriodsToAlert + *out = new(int) + **out = **in + } + if in.NumberOfEvaluationPeriods != nil { + in, out := &in.NumberOfEvaluationPeriods, &out.NumberOfEvaluationPeriods + *out = new(int) + **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 Condition_FailingPeriods. +func (in *Condition_FailingPeriods) DeepCopy() *Condition_FailingPeriods { + if in == nil { + return nil + } + out := new(Condition_FailingPeriods) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition_FailingPeriods_STATUS) DeepCopyInto(out *Condition_FailingPeriods_STATUS) { + *out = *in + if in.MinFailingPeriodsToAlert != nil { + in, out := &in.MinFailingPeriodsToAlert, &out.MinFailingPeriodsToAlert + *out = new(int) + **out = **in + } + if in.NumberOfEvaluationPeriods != nil { + in, out := &in.NumberOfEvaluationPeriods, &out.NumberOfEvaluationPeriods + *out = new(int) + **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 Condition_FailingPeriods_STATUS. +func (in *Condition_FailingPeriods_STATUS) DeepCopy() *Condition_FailingPeriods_STATUS { + if in == nil { + return nil + } + out := new(Condition_FailingPeriods_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 *Condition_STATUS) DeepCopyInto(out *Condition_STATUS) { + *out = *in + if in.Dimensions != nil { + in, out := &in.Dimensions, &out.Dimensions + *out = make([]Dimension_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.FailingPeriods != nil { + in, out := &in.FailingPeriods, &out.FailingPeriods + *out = new(Condition_FailingPeriods_STATUS) + (*in).DeepCopyInto(*out) + } + if in.MetricMeasureColumn != nil { + in, out := &in.MetricMeasureColumn, &out.MetricMeasureColumn + *out = new(string) + **out = **in + } + if in.MetricName != nil { + in, out := &in.MetricName, &out.MetricName + *out = new(string) + **out = **in + } + if in.Operator != nil { + in, out := &in.Operator, &out.Operator + *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.Query != nil { + in, out := &in.Query, &out.Query + *out = new(string) + **out = **in + } + if in.ResourceIdColumn != nil { + in, out := &in.ResourceIdColumn, &out.ResourceIdColumn + *out = new(string) + **out = **in + } + if in.Threshold != nil { + in, out := &in.Threshold, &out.Threshold + *out = new(float64) + **out = **in + } + if in.TimeAggregation != nil { + in, out := &in.TimeAggregation, &out.TimeAggregation + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition_STATUS. +func (in *Condition_STATUS) DeepCopy() *Condition_STATUS { + if in == nil { + return nil + } + out := new(Condition_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 *Dimension) DeepCopyInto(out *Dimension) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Operator != nil { + in, out := &in.Operator, &out.Operator + *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.Values != nil { + in, out := &in.Values, &out.Values + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dimension. +func (in *Dimension) DeepCopy() *Dimension { + if in == nil { + return nil + } + out := new(Dimension) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Dimension_STATUS) DeepCopyInto(out *Dimension_STATUS) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Operator != nil { + in, out := &in.Operator, &out.Operator + *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.Values != nil { + in, out := &in.Values, &out.Values + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dimension_STATUS. +func (in *Dimension_STATUS) DeepCopy() *Dimension_STATUS { + if in == nil { + return nil + } + out := new(Dimension_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 *Identity) DeepCopyInto(out *Identity) { + *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.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make([]UserAssignedIdentityDetails, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity. +func (in *Identity) DeepCopy() *Identity { + if in == nil { + return nil + } + out := new(Identity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Identity_STATUS) DeepCopyInto(out *Identity_STATUS) { + *out = *in + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *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.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make(map[string]UserIdentityProperties_STATUS, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity_STATUS. +func (in *Identity_STATUS) DeepCopy() *Identity_STATUS { + if in == nil { + return nil + } + out := new(Identity_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 *RuleResolveConfiguration) DeepCopyInto(out *RuleResolveConfiguration) { + *out = *in + if in.AutoResolved != nil { + in, out := &in.AutoResolved, &out.AutoResolved + *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.TimeToResolve != nil { + in, out := &in.TimeToResolve, &out.TimeToResolve + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleResolveConfiguration. +func (in *RuleResolveConfiguration) DeepCopy() *RuleResolveConfiguration { + if in == nil { + return nil + } + out := new(RuleResolveConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RuleResolveConfiguration_STATUS) DeepCopyInto(out *RuleResolveConfiguration_STATUS) { + *out = *in + if in.AutoResolved != nil { + in, out := &in.AutoResolved, &out.AutoResolved + *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.TimeToResolve != nil { + in, out := &in.TimeToResolve, &out.TimeToResolve + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleResolveConfiguration_STATUS. +func (in *RuleResolveConfiguration_STATUS) DeepCopy() *RuleResolveConfiguration_STATUS { + if in == nil { + return nil + } + out := new(RuleResolveConfiguration_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 + 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 ScheduledQueryRule. +func (in *ScheduledQueryRule) DeepCopy() *ScheduledQueryRule { + if in == nil { + return nil + } + out := new(ScheduledQueryRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ScheduledQueryRule) 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 *ScheduledQueryRuleCriteria) DeepCopyInto(out *ScheduledQueryRuleCriteria) { + *out = *in + if in.AllOf != nil { + in, out := &in.AllOf, &out.AllOf + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + 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 ScheduledQueryRuleCriteria. +func (in *ScheduledQueryRuleCriteria) DeepCopy() *ScheduledQueryRuleCriteria { + if in == nil { + return nil + } + out := new(ScheduledQueryRuleCriteria) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ScheduledQueryRuleCriteria_STATUS) DeepCopyInto(out *ScheduledQueryRuleCriteria_STATUS) { + *out = *in + if in.AllOf != nil { + in, out := &in.AllOf, &out.AllOf + *out = make([]Condition_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + 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 ScheduledQueryRuleCriteria_STATUS. +func (in *ScheduledQueryRuleCriteria_STATUS) DeepCopy() *ScheduledQueryRuleCriteria_STATUS { + if in == nil { + return nil + } + out := new(ScheduledQueryRuleCriteria_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 *ScheduledQueryRuleList) DeepCopyInto(out *ScheduledQueryRuleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ScheduledQueryRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledQueryRuleList. +func (in *ScheduledQueryRuleList) DeepCopy() *ScheduledQueryRuleList { + if in == nil { + return nil + } + out := new(ScheduledQueryRuleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ScheduledQueryRuleList) 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 *ScheduledQueryRuleOperatorSpec) DeepCopyInto(out *ScheduledQueryRuleOperatorSpec) { + *out = *in + if in.ConfigMapExpressions != nil { + in, out := &in.ConfigMapExpressions, &out.ConfigMapExpressions + *out = make([]*core.DestinationExpression, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(core.DestinationExpression) + **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.SecretExpressions != nil { + in, out := &in.SecretExpressions, &out.SecretExpressions + *out = make([]*core.DestinationExpression, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(core.DestinationExpression) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledQueryRuleOperatorSpec. +func (in *ScheduledQueryRuleOperatorSpec) DeepCopy() *ScheduledQueryRuleOperatorSpec { + if in == nil { + return nil + } + out := new(ScheduledQueryRuleOperatorSpec) + 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_STATUS) DeepCopyInto(out *ScheduledQueryRule_STATUS) { + *out = *in + if in.Actions != nil { + in, out := &in.Actions, &out.Actions + *out = new(Actions_STATUS) + (*in).DeepCopyInto(*out) + } + if in.AutoMitigate != nil { + in, out := &in.AutoMitigate, &out.AutoMitigate + *out = new(bool) + **out = **in + } + if in.CheckWorkspaceAlertsStorageConfigured != nil { + in, out := &in.CheckWorkspaceAlertsStorageConfigured, &out.CheckWorkspaceAlertsStorageConfigured + *out = new(bool) + **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.CreatedWithApiVersion != nil { + in, out := &in.CreatedWithApiVersion, &out.CreatedWithApiVersion + *out = new(string) + **out = **in + } + if in.Criteria != nil { + in, out := &in.Criteria, &out.Criteria + *out = new(ScheduledQueryRuleCriteria_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.EvaluationFrequency != nil { + in, out := &in.EvaluationFrequency, &out.EvaluationFrequency + *out = new(string) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(Identity_STATUS) + (*in).DeepCopyInto(*out) + } + if in.IsLegacyLogAnalyticsRule != nil { + in, out := &in.IsLegacyLogAnalyticsRule, &out.IsLegacyLogAnalyticsRule + *out = new(bool) + **out = **in + } + if in.IsWorkspaceAlertsStorageConfigured != nil { + in, out := &in.IsWorkspaceAlertsStorageConfigured, &out.IsWorkspaceAlertsStorageConfigured + *out = new(bool) + **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.MuteActionsDuration != nil { + in, out := &in.MuteActionsDuration, &out.MuteActionsDuration + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.OverrideQueryTimeRange != nil { + in, out := &in.OverrideQueryTimeRange, &out.OverrideQueryTimeRange + *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.ResolveConfiguration != nil { + in, out := &in.ResolveConfiguration, &out.ResolveConfiguration + *out = new(RuleResolveConfiguration_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Scopes != nil { + in, out := &in.Scopes, &out.Scopes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Severity != nil { + in, out := &in.Severity, &out.Severity + *out = new(int) + **out = **in + } + if in.SkipQueryValidation != nil { + in, out := &in.SkipQueryValidation, &out.SkipQueryValidation + *out = new(bool) + **out = **in + } + if in.SystemData != nil { + in, out := &in.SystemData, &out.SystemData + *out = new(SystemData_STATUS) + (*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.TargetResourceTypes != nil { + in, out := &in.TargetResourceTypes, &out.TargetResourceTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.WindowSize != nil { + in, out := &in.WindowSize, &out.WindowSize + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledQueryRule_STATUS. +func (in *ScheduledQueryRule_STATUS) DeepCopy() *ScheduledQueryRule_STATUS { + if in == nil { + return nil + } + out := new(ScheduledQueryRule_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_Spec) DeepCopyInto(out *ScheduledQueryRule_Spec) { + *out = *in + if in.Actions != nil { + in, out := &in.Actions, &out.Actions + *out = new(Actions) + (*in).DeepCopyInto(*out) + } + if in.AutoMitigate != nil { + in, out := &in.AutoMitigate, &out.AutoMitigate + *out = new(bool) + **out = **in + } + if in.CheckWorkspaceAlertsStorageConfigured != nil { + in, out := &in.CheckWorkspaceAlertsStorageConfigured, &out.CheckWorkspaceAlertsStorageConfigured + *out = new(bool) + **out = **in + } + if in.Criteria != nil { + in, out := &in.Criteria, &out.Criteria + *out = new(ScheduledQueryRuleCriteria) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.EvaluationFrequency != nil { + in, out := &in.EvaluationFrequency, &out.EvaluationFrequency + *out = new(string) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(Identity) + (*in).DeepCopyInto(*out) + } + 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.MuteActionsDuration != nil { + in, out := &in.MuteActionsDuration, &out.MuteActionsDuration + *out = new(string) + **out = **in + } + if in.OperatorSpec != nil { + in, out := &in.OperatorSpec, &out.OperatorSpec + *out = new(ScheduledQueryRuleOperatorSpec) + (*in).DeepCopyInto(*out) + } + if in.OverrideQueryTimeRange != nil { + in, out := &in.OverrideQueryTimeRange, &out.OverrideQueryTimeRange + *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.ResolveConfiguration != nil { + in, out := &in.ResolveConfiguration, &out.ResolveConfiguration + *out = new(RuleResolveConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ScopesReferences != nil { + in, out := &in.ScopesReferences, &out.ScopesReferences + *out = make([]genruntime.ResourceReference, len(*in)) + copy(*out, *in) + } + if in.Severity != nil { + in, out := &in.Severity, &out.Severity + *out = new(int) + **out = **in + } + if in.SkipQueryValidation != nil { + in, out := &in.SkipQueryValidation, &out.SkipQueryValidation + *out = new(bool) + **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.TargetResourceTypes != nil { + in, out := &in.TargetResourceTypes, &out.TargetResourceTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.WindowSize != nil { + in, out := &in.WindowSize, &out.WindowSize + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledQueryRule_Spec. +func (in *ScheduledQueryRule_Spec) DeepCopy() *ScheduledQueryRule_Spec { + if in == nil { + return nil + } + out := new(ScheduledQueryRule_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 *SystemData_STATUS) DeepCopyInto(out *SystemData_STATUS) { + *out = *in + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.CreatedBy != nil { + in, out := &in.CreatedBy, &out.CreatedBy + *out = new(string) + **out = **in + } + if in.CreatedByType != nil { + in, out := &in.CreatedByType, &out.CreatedByType + *out = new(string) + **out = **in + } + if in.LastModifiedAt != nil { + in, out := &in.LastModifiedAt, &out.LastModifiedAt + *out = new(string) + **out = **in + } + if in.LastModifiedBy != nil { + in, out := &in.LastModifiedBy, &out.LastModifiedBy + *out = new(string) + **out = **in + } + if in.LastModifiedByType != nil { + in, out := &in.LastModifiedByType, &out.LastModifiedByType + *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 SystemData_STATUS. +func (in *SystemData_STATUS) DeepCopy() *SystemData_STATUS { + if in == nil { + return nil + } + out := new(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 *UserAssignedIdentityDetails) DeepCopyInto(out *UserAssignedIdentityDetails) { + *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 + } + } + out.Reference = in.Reference +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentityDetails. +func (in *UserAssignedIdentityDetails) DeepCopy() *UserAssignedIdentityDetails { + if in == nil { + return nil + } + out := new(UserAssignedIdentityDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserIdentityProperties_STATUS) DeepCopyInto(out *UserIdentityProperties_STATUS) { + *out = *in + if in.ClientId != nil { + in, out := &in.ClientId, &out.ClientId + *out = new(string) + **out = **in + } + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *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 UserIdentityProperties_STATUS. +func (in *UserIdentityProperties_STATUS) DeepCopy() *UserIdentityProperties_STATUS { + if in == nil { + return nil + } + out := new(UserIdentityProperties_STATUS) + in.DeepCopyInto(out) + return out +} diff --git a/v2/api/insights/v1api20231201/structure.txt b/v2/api/insights/v1api20231201/structure.txt new file mode 100644 index 00000000000..aabf23af074 --- /dev/null +++ b/v2/api/insights/v1api20231201/structure.txt @@ -0,0 +1,171 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201 +--------------------------------------------------------------------- +APIVersion: Enum (1 value) +└── "2023-12-01" +ScheduledQueryRule: Resource +├── Owner: resources/v1apiv20191001.ResourceGroup +├── Spec: Object (23 properties) +│ ├── Actions: *Object (3 properties) +│ │ ├── ActionGroupsReferences: genruntime.ResourceReference[] +│ │ ├── ActionProperties: map[string]string +│ │ └── CustomProperties: map[string]string +│ ├── AutoMitigate: *bool +│ ├── AzureName: Validated (1 rule) +│ │ └── Rule 0: Pattern: "^[^#<>%&:\\?/{}*]{1,260}$" +│ ├── 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 +│ │ ├── ResourceIdColumnReference: *genruntime.ResourceReference +│ │ ├── Threshold: *float64 +│ │ └── TimeAggregation: *Enum (5 values) +│ │ ├── "Average" +│ │ ├── "Count" +│ │ ├── "Maximum" +│ │ ├── "Minimum" +│ │ └── "Total" +│ ├── Description: *string +│ ├── DisplayName: *string +│ ├── Enabled: *bool +│ ├── EvaluationFrequency: *string +│ ├── Identity: *Object (2 properties) +│ │ ├── Type: *Enum (3 values) +│ │ │ ├── "None" +│ │ │ ├── "SystemAssigned" +│ │ │ └── "UserAssigned" +│ │ └── UserAssignedIdentities: Object (1 property)[] +│ │ └── Reference: genruntime.ResourceReference +│ ├── Kind: *Enum (2 values) +│ │ ├── "LogAlert" +│ │ └── "LogToMetric" +│ ├── Location: *string +│ ├── MuteActionsDuration: *string +│ ├── OperatorSpec: *Object (2 properties) +│ │ ├── ConfigMapExpressions: *core.DestinationExpression[] +│ │ └── SecretExpressions: *core.DestinationExpression[] +│ ├── OverrideQueryTimeRange: *string +│ ├── Owner: *genruntime.KnownResourceReference +│ ├── ResolveConfiguration: *Object (2 properties) +│ │ ├── AutoResolved: *bool +│ │ └── TimeToResolve: *string +│ ├── ScopesReferences: genruntime.ResourceReference[] +│ ├── Severity: *Enum (5 values) +│ │ ├── 0 +│ │ ├── 1 +│ │ ├── 2 +│ │ ├── 3 +│ │ └── 4 +│ ├── SkipQueryValidation: *bool +│ ├── Tags: map[string]string +│ ├── TargetResourceTypes: string[] +│ └── WindowSize: *string +└── Status: Object (29 properties) + ├── Actions: *Object (3 properties) + │ ├── ActionGroups: string[] + │ ├── ActionProperties: map[string]string + │ └── CustomProperties: map[string]string + ├── AutoMitigate: *bool + ├── CheckWorkspaceAlertsStorageConfigured: *bool + ├── Conditions: conditions.Condition[] + ├── CreatedWithApiVersion: *string + ├── 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 + ├── Etag: *string + ├── EvaluationFrequency: *string + ├── Id: *string + ├── Identity: *Object (4 properties) + │ ├── PrincipalId: *string + │ ├── TenantId: *string + │ ├── Type: *Enum (3 values) + │ │ ├── "None" + │ │ ├── "SystemAssigned" + │ │ └── "UserAssigned" + │ └── UserAssignedIdentities: map[string]Object (2 properties) + │ ├── ClientId: *string + │ └── PrincipalId: *string + ├── IsLegacyLogAnalyticsRule: *bool + ├── IsWorkspaceAlertsStorageConfigured: *bool + ├── Kind: *Enum (2 values) + │ ├── "LogAlert" + │ └── "LogToMetric" + ├── Location: *string + ├── MuteActionsDuration: *string + ├── Name: *string + ├── OverrideQueryTimeRange: *string + ├── ResolveConfiguration: *Object (2 properties) + │ ├── AutoResolved: *bool + │ └── TimeToResolve: *string + ├── Scopes: string[] + ├── Severity: *Enum (5 values) + │ ├── 0 + │ ├── 1 + │ ├── 2 + │ ├── 3 + │ └── 4 + ├── SkipQueryValidation: *bool + ├── SystemData: *Object (6 properties) + │ ├── CreatedAt: *string + │ ├── CreatedBy: *string + │ ├── CreatedByType: *Enum (4 values) + │ │ ├── "Application" + │ │ ├── "Key" + │ │ ├── "ManagedIdentity" + │ │ └── "User" + │ ├── LastModifiedAt: *string + │ ├── LastModifiedBy: *string + │ └── LastModifiedByType: *Enum (4 values) + │ ├── "Application" + │ ├── "Key" + │ ├── "ManagedIdentity" + │ └── "User" + ├── Tags: map[string]string + ├── TargetResourceTypes: string[] + ├── Type: *string + └── WindowSize: *string diff --git a/v2/api/insights/v1api20231201/zz_generated.deepcopy.go b/v2/api/insights/v1api20231201/zz_generated.deepcopy.go new file mode 100644 index 00000000000..98448976125 --- /dev/null +++ b/v2/api/insights/v1api20231201/zz_generated.deepcopy.go @@ -0,0 +1,948 @@ +//go:build !ignore_autogenerated + +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1api20231201 + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/core" + "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Actions) DeepCopyInto(out *Actions) { + *out = *in + if in.ActionGroupsReferences != nil { + in, out := &in.ActionGroupsReferences, &out.ActionGroupsReferences + *out = make([]genruntime.ResourceReference, len(*in)) + copy(*out, *in) + } + if in.ActionProperties != nil { + in, out := &in.ActionProperties, &out.ActionProperties + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.CustomProperties != nil { + in, out := &in.CustomProperties, &out.CustomProperties + *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 Actions. +func (in *Actions) DeepCopy() *Actions { + if in == nil { + return nil + } + out := new(Actions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Actions_STATUS) DeepCopyInto(out *Actions_STATUS) { + *out = *in + if in.ActionGroups != nil { + in, out := &in.ActionGroups, &out.ActionGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ActionProperties != nil { + in, out := &in.ActionProperties, &out.ActionProperties + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.CustomProperties != nil { + in, out := &in.CustomProperties, &out.CustomProperties + *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 Actions_STATUS. +func (in *Actions_STATUS) DeepCopy() *Actions_STATUS { + if in == nil { + return nil + } + out := new(Actions_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 *Condition) DeepCopyInto(out *Condition) { + *out = *in + if in.Dimensions != nil { + in, out := &in.Dimensions, &out.Dimensions + *out = make([]Dimension, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.FailingPeriods != nil { + in, out := &in.FailingPeriods, &out.FailingPeriods + *out = new(Condition_FailingPeriods) + (*in).DeepCopyInto(*out) + } + if in.MetricMeasureColumn != nil { + in, out := &in.MetricMeasureColumn, &out.MetricMeasureColumn + *out = new(string) + **out = **in + } + if in.MetricName != nil { + in, out := &in.MetricName, &out.MetricName + *out = new(string) + **out = **in + } + if in.Operator != nil { + in, out := &in.Operator, &out.Operator + *out = new(Condition_Operator) + **out = **in + } + if in.Query != nil { + in, out := &in.Query, &out.Query + *out = new(string) + **out = **in + } + if in.ResourceIdColumnReference != nil { + in, out := &in.ResourceIdColumnReference, &out.ResourceIdColumnReference + *out = new(genruntime.ResourceReference) + **out = **in + } + if in.Threshold != nil { + in, out := &in.Threshold, &out.Threshold + *out = new(float64) + **out = **in + } + if in.TimeAggregation != nil { + in, out := &in.TimeAggregation, &out.TimeAggregation + *out = new(Condition_TimeAggregation) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition_FailingPeriods) DeepCopyInto(out *Condition_FailingPeriods) { + *out = *in + if in.MinFailingPeriodsToAlert != nil { + in, out := &in.MinFailingPeriodsToAlert, &out.MinFailingPeriodsToAlert + *out = new(int) + **out = **in + } + if in.NumberOfEvaluationPeriods != nil { + in, out := &in.NumberOfEvaluationPeriods, &out.NumberOfEvaluationPeriods + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition_FailingPeriods. +func (in *Condition_FailingPeriods) DeepCopy() *Condition_FailingPeriods { + if in == nil { + return nil + } + out := new(Condition_FailingPeriods) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition_FailingPeriods_STATUS) DeepCopyInto(out *Condition_FailingPeriods_STATUS) { + *out = *in + if in.MinFailingPeriodsToAlert != nil { + in, out := &in.MinFailingPeriodsToAlert, &out.MinFailingPeriodsToAlert + *out = new(int) + **out = **in + } + if in.NumberOfEvaluationPeriods != nil { + in, out := &in.NumberOfEvaluationPeriods, &out.NumberOfEvaluationPeriods + *out = new(int) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition_FailingPeriods_STATUS. +func (in *Condition_FailingPeriods_STATUS) DeepCopy() *Condition_FailingPeriods_STATUS { + if in == nil { + return nil + } + out := new(Condition_FailingPeriods_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 *Condition_STATUS) DeepCopyInto(out *Condition_STATUS) { + *out = *in + if in.Dimensions != nil { + in, out := &in.Dimensions, &out.Dimensions + *out = make([]Dimension_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.FailingPeriods != nil { + in, out := &in.FailingPeriods, &out.FailingPeriods + *out = new(Condition_FailingPeriods_STATUS) + (*in).DeepCopyInto(*out) + } + if in.MetricMeasureColumn != nil { + in, out := &in.MetricMeasureColumn, &out.MetricMeasureColumn + *out = new(string) + **out = **in + } + if in.MetricName != nil { + in, out := &in.MetricName, &out.MetricName + *out = new(string) + **out = **in + } + if in.Operator != nil { + in, out := &in.Operator, &out.Operator + *out = new(Condition_Operator_STATUS) + **out = **in + } + if in.Query != nil { + in, out := &in.Query, &out.Query + *out = new(string) + **out = **in + } + if in.ResourceIdColumn != nil { + in, out := &in.ResourceIdColumn, &out.ResourceIdColumn + *out = new(string) + **out = **in + } + if in.Threshold != nil { + in, out := &in.Threshold, &out.Threshold + *out = new(float64) + **out = **in + } + if in.TimeAggregation != nil { + in, out := &in.TimeAggregation, &out.TimeAggregation + *out = new(Condition_TimeAggregation_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition_STATUS. +func (in *Condition_STATUS) DeepCopy() *Condition_STATUS { + if in == nil { + return nil + } + out := new(Condition_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 *Dimension) DeepCopyInto(out *Dimension) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Operator != nil { + in, out := &in.Operator, &out.Operator + *out = new(Dimension_Operator) + **out = **in + } + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dimension. +func (in *Dimension) DeepCopy() *Dimension { + if in == nil { + return nil + } + out := new(Dimension) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Dimension_STATUS) DeepCopyInto(out *Dimension_STATUS) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Operator != nil { + in, out := &in.Operator, &out.Operator + *out = new(Dimension_Operator_STATUS) + **out = **in + } + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dimension_STATUS. +func (in *Dimension_STATUS) DeepCopy() *Dimension_STATUS { + if in == nil { + return nil + } + out := new(Dimension_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 *Identity) DeepCopyInto(out *Identity) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(Identity_Type) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make([]UserAssignedIdentityDetails, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity. +func (in *Identity) DeepCopy() *Identity { + if in == nil { + return nil + } + out := new(Identity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Identity_STATUS) DeepCopyInto(out *Identity_STATUS) { + *out = *in + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(Identity_Type_STATUS) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make(map[string]UserIdentityProperties_STATUS, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity_STATUS. +func (in *Identity_STATUS) DeepCopy() *Identity_STATUS { + if in == nil { + return nil + } + out := new(Identity_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 *RuleResolveConfiguration) DeepCopyInto(out *RuleResolveConfiguration) { + *out = *in + if in.AutoResolved != nil { + in, out := &in.AutoResolved, &out.AutoResolved + *out = new(bool) + **out = **in + } + if in.TimeToResolve != nil { + in, out := &in.TimeToResolve, &out.TimeToResolve + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleResolveConfiguration. +func (in *RuleResolveConfiguration) DeepCopy() *RuleResolveConfiguration { + if in == nil { + return nil + } + out := new(RuleResolveConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RuleResolveConfiguration_STATUS) DeepCopyInto(out *RuleResolveConfiguration_STATUS) { + *out = *in + if in.AutoResolved != nil { + in, out := &in.AutoResolved, &out.AutoResolved + *out = new(bool) + **out = **in + } + if in.TimeToResolve != nil { + in, out := &in.TimeToResolve, &out.TimeToResolve + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleResolveConfiguration_STATUS. +func (in *RuleResolveConfiguration_STATUS) DeepCopy() *RuleResolveConfiguration_STATUS { + if in == nil { + return nil + } + out := new(RuleResolveConfiguration_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 + 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 ScheduledQueryRule. +func (in *ScheduledQueryRule) DeepCopy() *ScheduledQueryRule { + if in == nil { + return nil + } + out := new(ScheduledQueryRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ScheduledQueryRule) 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 *ScheduledQueryRuleCriteria) DeepCopyInto(out *ScheduledQueryRuleCriteria) { + *out = *in + if in.AllOf != nil { + in, out := &in.AllOf, &out.AllOf + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledQueryRuleCriteria. +func (in *ScheduledQueryRuleCriteria) DeepCopy() *ScheduledQueryRuleCriteria { + if in == nil { + return nil + } + out := new(ScheduledQueryRuleCriteria) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ScheduledQueryRuleCriteria_STATUS) DeepCopyInto(out *ScheduledQueryRuleCriteria_STATUS) { + *out = *in + if in.AllOf != nil { + in, out := &in.AllOf, &out.AllOf + *out = make([]Condition_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledQueryRuleCriteria_STATUS. +func (in *ScheduledQueryRuleCriteria_STATUS) DeepCopy() *ScheduledQueryRuleCriteria_STATUS { + if in == nil { + return nil + } + out := new(ScheduledQueryRuleCriteria_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 *ScheduledQueryRuleList) DeepCopyInto(out *ScheduledQueryRuleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ScheduledQueryRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledQueryRuleList. +func (in *ScheduledQueryRuleList) DeepCopy() *ScheduledQueryRuleList { + if in == nil { + return nil + } + out := new(ScheduledQueryRuleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ScheduledQueryRuleList) 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 *ScheduledQueryRuleOperatorSpec) DeepCopyInto(out *ScheduledQueryRuleOperatorSpec) { + *out = *in + if in.ConfigMapExpressions != nil { + in, out := &in.ConfigMapExpressions, &out.ConfigMapExpressions + *out = make([]*core.DestinationExpression, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(core.DestinationExpression) + **out = **in + } + } + } + if in.SecretExpressions != nil { + in, out := &in.SecretExpressions, &out.SecretExpressions + *out = make([]*core.DestinationExpression, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(core.DestinationExpression) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledQueryRuleOperatorSpec. +func (in *ScheduledQueryRuleOperatorSpec) DeepCopy() *ScheduledQueryRuleOperatorSpec { + if in == nil { + return nil + } + out := new(ScheduledQueryRuleOperatorSpec) + 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_STATUS) DeepCopyInto(out *ScheduledQueryRule_STATUS) { + *out = *in + if in.Actions != nil { + in, out := &in.Actions, &out.Actions + *out = new(Actions_STATUS) + (*in).DeepCopyInto(*out) + } + if in.AutoMitigate != nil { + in, out := &in.AutoMitigate, &out.AutoMitigate + *out = new(bool) + **out = **in + } + if in.CheckWorkspaceAlertsStorageConfigured != nil { + in, out := &in.CheckWorkspaceAlertsStorageConfigured, &out.CheckWorkspaceAlertsStorageConfigured + *out = new(bool) + **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.CreatedWithApiVersion != nil { + in, out := &in.CreatedWithApiVersion, &out.CreatedWithApiVersion + *out = new(string) + **out = **in + } + if in.Criteria != nil { + in, out := &in.Criteria, &out.Criteria + *out = new(ScheduledQueryRuleCriteria_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.EvaluationFrequency != nil { + in, out := &in.EvaluationFrequency, &out.EvaluationFrequency + *out = new(string) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(Identity_STATUS) + (*in).DeepCopyInto(*out) + } + if in.IsLegacyLogAnalyticsRule != nil { + in, out := &in.IsLegacyLogAnalyticsRule, &out.IsLegacyLogAnalyticsRule + *out = new(bool) + **out = **in + } + if in.IsWorkspaceAlertsStorageConfigured != nil { + in, out := &in.IsWorkspaceAlertsStorageConfigured, &out.IsWorkspaceAlertsStorageConfigured + *out = new(bool) + **out = **in + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(ScheduledQueryRule_Kind_STATUS) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.MuteActionsDuration != nil { + in, out := &in.MuteActionsDuration, &out.MuteActionsDuration + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.OverrideQueryTimeRange != nil { + in, out := &in.OverrideQueryTimeRange, &out.OverrideQueryTimeRange + *out = new(string) + **out = **in + } + if in.ResolveConfiguration != nil { + in, out := &in.ResolveConfiguration, &out.ResolveConfiguration + *out = new(RuleResolveConfiguration_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Scopes != nil { + in, out := &in.Scopes, &out.Scopes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Severity != nil { + in, out := &in.Severity, &out.Severity + *out = new(ScheduledQueryRuleProperties_Severity_STATUS) + **out = **in + } + if in.SkipQueryValidation != nil { + in, out := &in.SkipQueryValidation, &out.SkipQueryValidation + *out = new(bool) + **out = **in + } + if in.SystemData != nil { + in, out := &in.SystemData, &out.SystemData + *out = new(SystemData_STATUS) + (*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.TargetResourceTypes != nil { + in, out := &in.TargetResourceTypes, &out.TargetResourceTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.WindowSize != nil { + in, out := &in.WindowSize, &out.WindowSize + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledQueryRule_STATUS. +func (in *ScheduledQueryRule_STATUS) DeepCopy() *ScheduledQueryRule_STATUS { + if in == nil { + return nil + } + out := new(ScheduledQueryRule_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_Spec) DeepCopyInto(out *ScheduledQueryRule_Spec) { + *out = *in + if in.Actions != nil { + in, out := &in.Actions, &out.Actions + *out = new(Actions) + (*in).DeepCopyInto(*out) + } + if in.AutoMitigate != nil { + in, out := &in.AutoMitigate, &out.AutoMitigate + *out = new(bool) + **out = **in + } + if in.CheckWorkspaceAlertsStorageConfigured != nil { + in, out := &in.CheckWorkspaceAlertsStorageConfigured, &out.CheckWorkspaceAlertsStorageConfigured + *out = new(bool) + **out = **in + } + if in.Criteria != nil { + in, out := &in.Criteria, &out.Criteria + *out = new(ScheduledQueryRuleCriteria) + (*in).DeepCopyInto(*out) + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.EvaluationFrequency != nil { + in, out := &in.EvaluationFrequency, &out.EvaluationFrequency + *out = new(string) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(Identity) + (*in).DeepCopyInto(*out) + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(ScheduledQueryRule_Kind_Spec) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.MuteActionsDuration != nil { + in, out := &in.MuteActionsDuration, &out.MuteActionsDuration + *out = new(string) + **out = **in + } + if in.OperatorSpec != nil { + in, out := &in.OperatorSpec, &out.OperatorSpec + *out = new(ScheduledQueryRuleOperatorSpec) + (*in).DeepCopyInto(*out) + } + if in.OverrideQueryTimeRange != nil { + in, out := &in.OverrideQueryTimeRange, &out.OverrideQueryTimeRange + *out = new(string) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.ResolveConfiguration != nil { + in, out := &in.ResolveConfiguration, &out.ResolveConfiguration + *out = new(RuleResolveConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ScopesReferences != nil { + in, out := &in.ScopesReferences, &out.ScopesReferences + *out = make([]genruntime.ResourceReference, len(*in)) + copy(*out, *in) + } + if in.Severity != nil { + in, out := &in.Severity, &out.Severity + *out = new(ScheduledQueryRuleProperties_Severity) + **out = **in + } + if in.SkipQueryValidation != nil { + in, out := &in.SkipQueryValidation, &out.SkipQueryValidation + *out = new(bool) + **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.TargetResourceTypes != nil { + in, out := &in.TargetResourceTypes, &out.TargetResourceTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.WindowSize != nil { + in, out := &in.WindowSize, &out.WindowSize + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledQueryRule_Spec. +func (in *ScheduledQueryRule_Spec) DeepCopy() *ScheduledQueryRule_Spec { + if in == nil { + return nil + } + out := new(ScheduledQueryRule_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 *SystemData_STATUS) DeepCopyInto(out *SystemData_STATUS) { + *out = *in + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.CreatedBy != nil { + in, out := &in.CreatedBy, &out.CreatedBy + *out = new(string) + **out = **in + } + if in.CreatedByType != nil { + in, out := &in.CreatedByType, &out.CreatedByType + *out = new(SystemData_CreatedByType_STATUS) + **out = **in + } + if in.LastModifiedAt != nil { + in, out := &in.LastModifiedAt, &out.LastModifiedAt + *out = new(string) + **out = **in + } + if in.LastModifiedBy != nil { + in, out := &in.LastModifiedBy, &out.LastModifiedBy + *out = new(string) + **out = **in + } + if in.LastModifiedByType != nil { + in, out := &in.LastModifiedByType, &out.LastModifiedByType + *out = new(SystemData_LastModifiedByType_STATUS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemData_STATUS. +func (in *SystemData_STATUS) DeepCopy() *SystemData_STATUS { + if in == nil { + return nil + } + out := new(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 *UserAssignedIdentityDetails) DeepCopyInto(out *UserAssignedIdentityDetails) { + *out = *in + out.Reference = in.Reference +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentityDetails. +func (in *UserAssignedIdentityDetails) DeepCopy() *UserAssignedIdentityDetails { + if in == nil { + return nil + } + out := new(UserAssignedIdentityDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserIdentityProperties_STATUS) DeepCopyInto(out *UserIdentityProperties_STATUS) { + *out = *in + if in.ClientId != nil { + in, out := &in.ClientId, &out.ClientId + *out = new(string) + **out = **in + } + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserIdentityProperties_STATUS. +func (in *UserIdentityProperties_STATUS) DeepCopy() *UserIdentityProperties_STATUS { + if in == nil { + return nil + } + out := new(UserIdentityProperties_STATUS) + in.DeepCopyInto(out) + return out +} diff --git a/v2/api/insights/versions_matrix.md b/v2/api/insights/versions_matrix.md index 98021820033..7ff01756a00 100644 --- a/v2/api/insights/versions_matrix.md +++ b/v2/api/insights/versions_matrix.md @@ -1,199 +1,207 @@ -| Type Definitions in package "insights" | v1api20180301 | v1api20180501preview | v1api20200202 | v1api20210501preview | v1api20220615 | v1api20221001 | v1api20230101 | -|--------------------------------------------------------------------|---------------|----------------------|---------------|----------------------|---------------|---------------|---------------| -| APIVersion | v1api20180301 | v1api20180501preview | v1api20200202 | v1api20210501preview | v1api20220615 | v1api20221001 | v1api20230101 | -| ActionGroup | | | | | | | v1api20230101 | -| ActionGroupResource_STATUS | | | | | | | v1api20230101 | -| ActionGroupSpec | | | | | | | v1api20230101 | -| ActionGroup_STATUS | | | | | | | v1api20230101 | -| ActionGroup_Spec | | | | | | | v1api20230101 | -| Actions | | | | | v1api20220615 | | | -| Actions_STATUS | | | | | v1api20220615 | | | -| ApplicationInsightsComponentProperties | | | v1api20200202 | | | | | -| ApplicationInsightsComponentProperties_Application_Type | | | v1api20200202 | | | | | -| ApplicationInsightsComponentProperties_Application_Type_STATUS | | | v1api20200202 | | | | | -| ApplicationInsightsComponentProperties_Flow_Type | | | v1api20200202 | | | | | -| ApplicationInsightsComponentProperties_Flow_Type_STATUS | | | v1api20200202 | | | | | -| ApplicationInsightsComponentProperties_IngestionMode | | | v1api20200202 | | | | | -| ApplicationInsightsComponentProperties_IngestionMode_STATUS | | | v1api20200202 | | | | | -| ApplicationInsightsComponentProperties_Request_Source | | | v1api20200202 | | | | | -| ApplicationInsightsComponentProperties_Request_Source_STATUS | | | v1api20200202 | | | | | -| ApplicationInsightsComponentProperties_STATUS | | | v1api20200202 | | | | | -| ArmRoleReceiver | | | | | | | v1api20230101 | -| ArmRoleReceiver_STATUS | | | | | | | v1api20230101 | -| AutomationRunbookReceiver | | | | | | | v1api20230101 | -| AutomationRunbookReceiver_STATUS | | | | | | | v1api20230101 | -| AutoscaleNotification | | | | | | v1api20221001 | | -| AutoscaleNotification_Operation | | | | | | v1api20221001 | | -| AutoscaleNotification_Operation_STATUS | | | | | | v1api20221001 | | -| AutoscaleNotification_STATUS | | | | | | v1api20221001 | | -| AutoscaleProfile | | | | | | v1api20221001 | | -| AutoscaleProfile_STATUS | | | | | | v1api20221001 | | -| AutoscaleSetting | | | | | | v1api20221001 | | -| AutoscaleSettingProperties | | | | | | v1api20221001 | | -| AutoscaleSetting_STATUS | | | | | | v1api20221001 | | -| AutoscaleSetting_Spec | | | | | | v1api20221001 | | -| Autoscalesetting_STATUS | | | | | | v1api20221001 | | -| AzureAppPushReceiver | | | | | | | v1api20230101 | -| AzureAppPushReceiver_STATUS | | | | | | | v1api20230101 | -| AzureFunctionReceiver | | | | | | | v1api20230101 | -| AzureFunctionReceiver_STATUS | | | | | | | v1api20230101 | -| Component | | | v1api20200202 | | | | | -| Component_STATUS | | | v1api20200202 | | | | | -| Component_Spec | | | v1api20200202 | | | | | -| Condition | | | | | v1api20220615 | | | -| Condition_FailingPeriods | | | | | v1api20220615 | | | -| Condition_FailingPeriods_STATUS | | | | | v1api20220615 | | | -| Condition_Operator | | | | | v1api20220615 | | | -| Condition_Operator_STATUS | | | | | v1api20220615 | | | -| Condition_STATUS | | | | | v1api20220615 | | | -| Condition_TimeAggregation | | | | | v1api20220615 | | | -| Condition_TimeAggregation_STATUS | | | | | v1api20220615 | | | -| DiagnosticSetting | | | | v1api20210501preview | | | | -| DiagnosticSetting_STATUS | | | | v1api20210501preview | | | | -| DiagnosticSetting_Spec | | | | v1api20210501preview | | | | -| DiagnosticSettings | | | | v1api20210501preview | | | | -| DiagnosticSettings_STATUS | | | | v1api20210501preview | | | | -| Dimension | | | | | v1api20220615 | | | -| Dimension_Operator | | | | | v1api20220615 | | | -| Dimension_Operator_STATUS | | | | | v1api20220615 | | | -| Dimension_STATUS | | | | | v1api20220615 | | | -| DynamicMetricCriteria | v1api20180301 | | | | | | | -| DynamicMetricCriteria_AlertSensitivity | v1api20180301 | | | | | | | -| DynamicMetricCriteria_AlertSensitivity_STATUS | v1api20180301 | | | | | | | -| DynamicMetricCriteria_CriterionType | v1api20180301 | | | | | | | -| DynamicMetricCriteria_CriterionType_STATUS | v1api20180301 | | | | | | | -| DynamicMetricCriteria_Operator | v1api20180301 | | | | | | | -| DynamicMetricCriteria_Operator_STATUS | v1api20180301 | | | | | | | -| DynamicMetricCriteria_STATUS | v1api20180301 | | | | | | | -| DynamicMetricCriteria_TimeAggregation | v1api20180301 | | | | | | | -| DynamicMetricCriteria_TimeAggregation_STATUS | v1api20180301 | | | | | | | -| DynamicThresholdFailingPeriods | v1api20180301 | | | | | | | -| DynamicThresholdFailingPeriods_STATUS | v1api20180301 | | | | | | | -| EmailNotification | | | | | | v1api20221001 | | -| EmailNotification_STATUS | | | | | | v1api20221001 | | -| EmailReceiver | | | | | | | v1api20230101 | -| EmailReceiver_STATUS | | | | | | | v1api20230101 | -| EventHubReceiver | | | | | | | v1api20230101 | -| EventHubReceiver_STATUS | | | | | | | v1api20230101 | -| HeaderField | | v1api20180501preview | | | v1api20220615 | | | -| HeaderField_STATUS | | v1api20180501preview | | | v1api20220615 | | | -| ItsmReceiver | | | | | | | v1api20230101 | -| ItsmReceiver_STATUS | | | | | | | v1api20230101 | -| LogSettings | | | | v1api20210501preview | | | | -| LogSettings_STATUS | | | | v1api20210501preview | | | | -| LogicAppReceiver | | | | | | | v1api20230101 | -| LogicAppReceiver_STATUS | | | | | | | v1api20230101 | -| MetricAlert | v1api20180301 | | | | | | | -| MetricAlertAction | v1api20180301 | | | | | | | -| MetricAlertAction_STATUS | v1api20180301 | | | | | | | -| MetricAlertCriteria | v1api20180301 | | | | | | | -| MetricAlertCriteria_STATUS | v1api20180301 | | | | | | | -| MetricAlertMultipleResourceMultipleMetricCriteria | v1api20180301 | | | | | | | -| MetricAlertMultipleResourceMultipleMetricCriteria_OdataType | v1api20180301 | | | | | | | -| MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS | v1api20180301 | | | | | | | -| MetricAlertMultipleResourceMultipleMetricCriteria_STATUS | v1api20180301 | | | | | | | -| MetricAlertProperties | v1api20180301 | | | | | | | -| MetricAlertProperties_STATUS | v1api20180301 | | | | | | | -| MetricAlertSingleResourceMultipleMetricCriteria | v1api20180301 | | | | | | | -| MetricAlertSingleResourceMultipleMetricCriteria_OdataType | v1api20180301 | | | | | | | -| MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS | v1api20180301 | | | | | | | -| MetricAlertSingleResourceMultipleMetricCriteria_STATUS | v1api20180301 | | | | | | | -| MetricAlert_STATUS | v1api20180301 | | | | | | | -| MetricAlert_Spec | v1api20180301 | | | | | | | -| MetricCriteria | v1api20180301 | | | | | | | -| MetricCriteria_CriterionType | v1api20180301 | | | | | | | -| MetricCriteria_CriterionType_STATUS | v1api20180301 | | | | | | | -| MetricCriteria_Operator | v1api20180301 | | | | | | | -| MetricCriteria_Operator_STATUS | v1api20180301 | | | | | | | -| MetricCriteria_STATUS | v1api20180301 | | | | | | | -| MetricCriteria_TimeAggregation | v1api20180301 | | | | | | | -| MetricCriteria_TimeAggregation_STATUS | v1api20180301 | | | | | | | -| MetricDimension | v1api20180301 | | | | | | | -| MetricDimension_STATUS | v1api20180301 | | | | | | | -| MetricSettings | | | | v1api20210501preview | | | | -| MetricSettings_STATUS | | | | v1api20210501preview | | | | -| MetricTrigger | | | | | | v1api20221001 | | -| MetricTrigger_Operator | | | | | | v1api20221001 | | -| MetricTrigger_Operator_STATUS | | | | | | v1api20221001 | | -| MetricTrigger_STATUS | | | | | | v1api20221001 | | -| MetricTrigger_Statistic | | | | | | v1api20221001 | | -| MetricTrigger_Statistic_STATUS | | | | | | v1api20221001 | | -| MetricTrigger_TimeAggregation | | | | | | v1api20221001 | | -| MetricTrigger_TimeAggregation_STATUS | | | | | | v1api20221001 | | -| MultiMetricCriteria | v1api20180301 | | | | | | | -| MultiMetricCriteria_STATUS | v1api20180301 | | | | | | | -| PredictiveAutoscalePolicy | | | | | | v1api20221001 | | -| PredictiveAutoscalePolicy_STATUS | | | | | | v1api20221001 | | -| PredictiveAutoscalePolicy_ScaleMode | | | | | | v1api20221001 | | -| PredictiveAutoscalePolicy_ScaleMode_STATUS | | | | | | v1api20221001 | | -| PrivateLinkScopedResource_STATUS | | | v1api20200202 | | | | | -| PublicNetworkAccessType | | | v1api20200202 | | | | | -| PublicNetworkAccessType_STATUS | | | v1api20200202 | | | | | -| ReceiverStatus_STATUS | | | | | | | v1api20230101 | -| Recurrence | | | | | | v1api20221001 | | -| Recurrence_Frequency | | | | | | v1api20221001 | | -| Recurrence_Frequency_STATUS | | | | | | v1api20221001 | | -| Recurrence_STATUS | | | | | | v1api20221001 | | -| RecurrentSchedule | | | | | | v1api20221001 | | -| RecurrentSchedule_STATUS | | | | | | v1api20221001 | | -| RetentionPolicy | | | | v1api20210501preview | | | | -| RetentionPolicy_STATUS | | | | v1api20210501preview | | | | -| ScaleAction | | | | | | v1api20221001 | | -| ScaleAction_Direction | | | | | | v1api20221001 | | -| ScaleAction_Direction_STATUS | | | | | | v1api20221001 | | -| ScaleAction_STATUS | | | | | | v1api20221001 | | -| ScaleAction_Type | | | | | | v1api20221001 | | -| ScaleAction_Type_STATUS | | | | | | v1api20221001 | | -| ScaleCapacity | | | | | | v1api20221001 | | -| ScaleCapacity_STATUS | | | | | | v1api20221001 | | -| ScaleRule | | | | | | v1api20221001 | | -| ScaleRuleMetricDimension | | | | | | v1api20221001 | | -| ScaleRuleMetricDimension_Operator | | | | | | v1api20221001 | | -| ScaleRuleMetricDimension_Operator_STATUS | | | | | | v1api20221001 | | -| ScaleRuleMetricDimension_STATUS | | | | | | v1api20221001 | | -| ScaleRule_STATUS | | | | | | v1api20221001 | | -| ScheduledQueryRule | | | | | v1api20220615 | | | -| ScheduledQueryRuleCriteria | | | | | v1api20220615 | | | -| ScheduledQueryRuleCriteria_STATUS | | | | | v1api20220615 | | | -| ScheduledQueryRuleProperties | | | | | v1api20220615 | | | -| ScheduledQueryRuleProperties_STATUS | | | | | v1api20220615 | | | -| ScheduledQueryRuleProperties_Severity | | | | | v1api20220615 | | | -| ScheduledQueryRuleProperties_Severity_STATUS | | | | | v1api20220615 | | | -| ScheduledQueryRule_Kind_STATUS | | | | | v1api20220615 | | | -| ScheduledQueryRule_Kind_Spec | | | | | v1api20220615 | | | -| ScheduledQueryRule_STATUS | | | | | v1api20220615 | | | -| ScheduledQueryRule_Spec | | | | | v1api20220615 | | | -| SmsReceiver | | | | | | | v1api20230101 | -| SmsReceiver_STATUS | | | | | | | v1api20230101 | -| SystemData_CreatedByType_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | -| SystemData_LastModifiedByType_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | -| SystemData_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | -| TimeWindow | | | | | | v1api20221001 | | -| TimeWindow_STATUS | | | | | | v1api20221001 | | -| VoiceReceiver | | | | | | | v1api20230101 | -| VoiceReceiver_STATUS | | | | | | | v1api20230101 | -| 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 | | | v1api20220615 | | | -| WebtestLocationAvailabilityCriteria | v1api20180301 | | | | | | | -| WebtestLocationAvailabilityCriteria_OdataType | v1api20180301 | | | | | | | -| WebtestLocationAvailabilityCriteria_OdataType_STATUS | v1api20180301 | | | | | | | -| WebtestLocationAvailabilityCriteria_STATUS | v1api20180301 | | | | | | | -| Webtest_STATUS | | v1api20180501preview | | | v1api20220615 | | | -| Webtest_Spec | | v1api20180501preview | | | v1api20220615 | | | +| Type Definitions in package "insights" | v1api20180301 | v1api20180501preview | v1api20200202 | v1api20210501preview | v1api20220615 | v1api20221001 | v1api20230101 | v1api20231201 | +|--------------------------------------------------------------------|---------------|----------------------|---------------|----------------------|---------------|---------------|---------------|---------------| +| APIVersion | v1api20180301 | v1api20180501preview | v1api20200202 | v1api20210501preview | v1api20220615 | v1api20221001 | v1api20230101 | v1api20231201 | +| ActionGroup | | | | | | | v1api20230101 | | +| ActionGroupResource_STATUS | | | | | | | v1api20230101 | | +| ActionGroupSpec | | | | | | | v1api20230101 | | +| ActionGroup_STATUS | | | | | | | v1api20230101 | | +| ActionGroup_Spec | | | | | | | v1api20230101 | | +| Actions | | | | | v1api20220615 | | | v1api20231201 | +| Actions_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| ApplicationInsightsComponentProperties | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Application_Type | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Application_Type_STATUS | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Flow_Type | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Flow_Type_STATUS | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_IngestionMode | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_IngestionMode_STATUS | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Request_Source | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Request_Source_STATUS | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_STATUS | | | v1api20200202 | | | | | | +| ArmRoleReceiver | | | | | | | v1api20230101 | | +| ArmRoleReceiver_STATUS | | | | | | | v1api20230101 | | +| AutomationRunbookReceiver | | | | | | | v1api20230101 | | +| AutomationRunbookReceiver_STATUS | | | | | | | v1api20230101 | | +| AutoscaleNotification | | | | | | v1api20221001 | | | +| AutoscaleNotification_Operation | | | | | | v1api20221001 | | | +| AutoscaleNotification_Operation_STATUS | | | | | | v1api20221001 | | | +| AutoscaleNotification_STATUS | | | | | | v1api20221001 | | | +| AutoscaleProfile | | | | | | v1api20221001 | | | +| AutoscaleProfile_STATUS | | | | | | v1api20221001 | | | +| AutoscaleSetting | | | | | | v1api20221001 | | | +| AutoscaleSettingProperties | | | | | | v1api20221001 | | | +| AutoscaleSetting_STATUS | | | | | | v1api20221001 | | | +| AutoscaleSetting_Spec | | | | | | v1api20221001 | | | +| Autoscalesetting_STATUS | | | | | | v1api20221001 | | | +| AzureAppPushReceiver | | | | | | | v1api20230101 | | +| AzureAppPushReceiver_STATUS | | | | | | | v1api20230101 | | +| AzureFunctionReceiver | | | | | | | v1api20230101 | | +| AzureFunctionReceiver_STATUS | | | | | | | v1api20230101 | | +| Component | | | v1api20200202 | | | | | | +| Component_STATUS | | | v1api20200202 | | | | | | +| Component_Spec | | | v1api20200202 | | | | | | +| Condition | | | | | v1api20220615 | | | v1api20231201 | +| Condition_FailingPeriods | | | | | v1api20220615 | | | v1api20231201 | +| Condition_FailingPeriods_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| Condition_Operator | | | | | v1api20220615 | | | v1api20231201 | +| Condition_Operator_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| Condition_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| Condition_TimeAggregation | | | | | v1api20220615 | | | v1api20231201 | +| Condition_TimeAggregation_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| DiagnosticSetting | | | | v1api20210501preview | | | | | +| DiagnosticSetting_STATUS | | | | v1api20210501preview | | | | | +| DiagnosticSetting_Spec | | | | v1api20210501preview | | | | | +| DiagnosticSettings | | | | v1api20210501preview | | | | | +| DiagnosticSettings_STATUS | | | | v1api20210501preview | | | | | +| Dimension | | | | | v1api20220615 | | | v1api20231201 | +| Dimension_Operator | | | | | v1api20220615 | | | v1api20231201 | +| Dimension_Operator_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| Dimension_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| DynamicMetricCriteria | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_AlertSensitivity | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_AlertSensitivity_STATUS | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_CriterionType | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_CriterionType_STATUS | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_Operator | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_Operator_STATUS | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_STATUS | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_TimeAggregation | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_TimeAggregation_STATUS | v1api20180301 | | | | | | | | +| DynamicThresholdFailingPeriods | v1api20180301 | | | | | | | | +| DynamicThresholdFailingPeriods_STATUS | v1api20180301 | | | | | | | | +| EmailNotification | | | | | | v1api20221001 | | | +| EmailNotification_STATUS | | | | | | v1api20221001 | | | +| EmailReceiver | | | | | | | v1api20230101 | | +| EmailReceiver_STATUS | | | | | | | v1api20230101 | | +| EventHubReceiver | | | | | | | v1api20230101 | | +| EventHubReceiver_STATUS | | | | | | | v1api20230101 | | +| HeaderField | | v1api20180501preview | | | v1api20220615 | | | | +| HeaderField_STATUS | | v1api20180501preview | | | v1api20220615 | | | | +| Identity | | | | | | | | v1api20231201 | +| Identity_STATUS | | | | | | | | v1api20231201 | +| Identity_Type | | | | | | | | v1api20231201 | +| Identity_Type_STATUS | | | | | | | | v1api20231201 | +| ItsmReceiver | | | | | | | v1api20230101 | | +| ItsmReceiver_STATUS | | | | | | | v1api20230101 | | +| LogSettings | | | | v1api20210501preview | | | | | +| LogSettings_STATUS | | | | v1api20210501preview | | | | | +| LogicAppReceiver | | | | | | | v1api20230101 | | +| LogicAppReceiver_STATUS | | | | | | | v1api20230101 | | +| MetricAlert | v1api20180301 | | | | | | | | +| MetricAlertAction | v1api20180301 | | | | | | | | +| MetricAlertAction_STATUS | v1api20180301 | | | | | | | | +| MetricAlertCriteria | v1api20180301 | | | | | | | | +| MetricAlertCriteria_STATUS | v1api20180301 | | | | | | | | +| MetricAlertMultipleResourceMultipleMetricCriteria | v1api20180301 | | | | | | | | +| MetricAlertMultipleResourceMultipleMetricCriteria_OdataType | v1api20180301 | | | | | | | | +| MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS | v1api20180301 | | | | | | | | +| MetricAlertMultipleResourceMultipleMetricCriteria_STATUS | v1api20180301 | | | | | | | | +| MetricAlertProperties | v1api20180301 | | | | | | | | +| MetricAlertProperties_STATUS | v1api20180301 | | | | | | | | +| MetricAlertSingleResourceMultipleMetricCriteria | v1api20180301 | | | | | | | | +| MetricAlertSingleResourceMultipleMetricCriteria_OdataType | v1api20180301 | | | | | | | | +| MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS | v1api20180301 | | | | | | | | +| MetricAlertSingleResourceMultipleMetricCriteria_STATUS | v1api20180301 | | | | | | | | +| MetricAlert_STATUS | v1api20180301 | | | | | | | | +| MetricAlert_Spec | v1api20180301 | | | | | | | | +| MetricCriteria | v1api20180301 | | | | | | | | +| MetricCriteria_CriterionType | v1api20180301 | | | | | | | | +| MetricCriteria_CriterionType_STATUS | v1api20180301 | | | | | | | | +| MetricCriteria_Operator | v1api20180301 | | | | | | | | +| MetricCriteria_Operator_STATUS | v1api20180301 | | | | | | | | +| MetricCriteria_STATUS | v1api20180301 | | | | | | | | +| MetricCriteria_TimeAggregation | v1api20180301 | | | | | | | | +| MetricCriteria_TimeAggregation_STATUS | v1api20180301 | | | | | | | | +| MetricDimension | v1api20180301 | | | | | | | | +| MetricDimension_STATUS | v1api20180301 | | | | | | | | +| MetricSettings | | | | v1api20210501preview | | | | | +| MetricSettings_STATUS | | | | v1api20210501preview | | | | | +| MetricTrigger | | | | | | v1api20221001 | | | +| MetricTrigger_Operator | | | | | | v1api20221001 | | | +| MetricTrigger_Operator_STATUS | | | | | | v1api20221001 | | | +| MetricTrigger_STATUS | | | | | | v1api20221001 | | | +| MetricTrigger_Statistic | | | | | | v1api20221001 | | | +| MetricTrigger_Statistic_STATUS | | | | | | v1api20221001 | | | +| MetricTrigger_TimeAggregation | | | | | | v1api20221001 | | | +| MetricTrigger_TimeAggregation_STATUS | | | | | | v1api20221001 | | | +| MultiMetricCriteria | v1api20180301 | | | | | | | | +| MultiMetricCriteria_STATUS | v1api20180301 | | | | | | | | +| PredictiveAutoscalePolicy | | | | | | v1api20221001 | | | +| PredictiveAutoscalePolicy_STATUS | | | | | | v1api20221001 | | | +| PredictiveAutoscalePolicy_ScaleMode | | | | | | v1api20221001 | | | +| PredictiveAutoscalePolicy_ScaleMode_STATUS | | | | | | v1api20221001 | | | +| PrivateLinkScopedResource_STATUS | | | v1api20200202 | | | | | | +| PublicNetworkAccessType | | | v1api20200202 | | | | | | +| PublicNetworkAccessType_STATUS | | | v1api20200202 | | | | | | +| ReceiverStatus_STATUS | | | | | | | v1api20230101 | | +| Recurrence | | | | | | v1api20221001 | | | +| Recurrence_Frequency | | | | | | v1api20221001 | | | +| Recurrence_Frequency_STATUS | | | | | | v1api20221001 | | | +| Recurrence_STATUS | | | | | | v1api20221001 | | | +| RecurrentSchedule | | | | | | v1api20221001 | | | +| RecurrentSchedule_STATUS | | | | | | v1api20221001 | | | +| RetentionPolicy | | | | v1api20210501preview | | | | | +| RetentionPolicy_STATUS | | | | v1api20210501preview | | | | | +| RuleResolveConfiguration | | | | | | | | v1api20231201 | +| RuleResolveConfiguration_STATUS | | | | | | | | v1api20231201 | +| ScaleAction | | | | | | v1api20221001 | | | +| ScaleAction_Direction | | | | | | v1api20221001 | | | +| ScaleAction_Direction_STATUS | | | | | | v1api20221001 | | | +| ScaleAction_STATUS | | | | | | v1api20221001 | | | +| ScaleAction_Type | | | | | | v1api20221001 | | | +| ScaleAction_Type_STATUS | | | | | | v1api20221001 | | | +| ScaleCapacity | | | | | | v1api20221001 | | | +| ScaleCapacity_STATUS | | | | | | v1api20221001 | | | +| ScaleRule | | | | | | v1api20221001 | | | +| ScaleRuleMetricDimension | | | | | | v1api20221001 | | | +| ScaleRuleMetricDimension_Operator | | | | | | v1api20221001 | | | +| ScaleRuleMetricDimension_Operator_STATUS | | | | | | v1api20221001 | | | +| ScaleRuleMetricDimension_STATUS | | | | | | v1api20221001 | | | +| ScaleRule_STATUS | | | | | | v1api20221001 | | | +| ScheduledQueryRule | | | | | v1api20220615 | | | v1api20231201 | +| ScheduledQueryRuleCriteria | | | | | v1api20220615 | | | v1api20231201 | +| ScheduledQueryRuleCriteria_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| ScheduledQueryRuleProperties | | | | | v1api20220615 | | | v1api20231201 | +| ScheduledQueryRuleProperties_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| ScheduledQueryRuleProperties_Severity | | | | | v1api20220615 | | | v1api20231201 | +| ScheduledQueryRuleProperties_Severity_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| ScheduledQueryRule_Kind_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| ScheduledQueryRule_Kind_Spec | | | | | v1api20220615 | | | v1api20231201 | +| ScheduledQueryRule_STATUS | | | | | v1api20220615 | | | v1api20231201 | +| ScheduledQueryRule_Spec | | | | | v1api20220615 | | | v1api20231201 | +| SmsReceiver | | | | | | | v1api20230101 | | +| SmsReceiver_STATUS | | | | | | | v1api20230101 | | +| SystemData_CreatedByType_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | v1api20231201 | +| SystemData_LastModifiedByType_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | v1api20231201 | +| SystemData_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | v1api20231201 | +| TimeWindow | | | | | | v1api20221001 | | | +| TimeWindow_STATUS | | | | | | v1api20221001 | | | +| UserAssignedIdentityDetails | | | | | | | | v1api20231201 | +| UserIdentityProperties_STATUS | | | | | | | | v1api20231201 | +| VoiceReceiver | | | | | | | v1api20230101 | | +| VoiceReceiver_STATUS | | | | | | | v1api20230101 | | +| 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 | | | v1api20220615 | | | | +| WebtestLocationAvailabilityCriteria | v1api20180301 | | | | | | | | +| WebtestLocationAvailabilityCriteria_OdataType | v1api20180301 | | | | | | | | +| WebtestLocationAvailabilityCriteria_OdataType_STATUS | v1api20180301 | | | | | | | | +| WebtestLocationAvailabilityCriteria_STATUS | v1api20180301 | | | | | | | | +| Webtest_STATUS | | v1api20180501preview | | | v1api20220615 | | | | +| Webtest_Spec | | v1api20180501preview | | | v1api20220615 | | | | diff --git a/v2/azure-arm.yaml b/v2/azure-arm.yaml index 4f5e6baeb02..353237da232 100644 --- a/v2/azure-arm.yaml +++ b/v2/azure-arm.yaml @@ -2570,6 +2570,19 @@ objectModelConfiguration: $armReference: true StorageAccountId: $armReference: true + 2023-12-01: + ScheduledQueryRule: + $export: true + $supportedFrom: v2.12.0 + Actions: + ActionGroups: + $armReference: true + Condition: + ResourceIdColumn: + $armReference: true + ScheduledQueryRuleProperties: + Scopes: + $armReference: true keyvault: 2021-04-01-preview: diff --git a/v2/internal/controllers/controller_resources_gen.go b/v2/internal/controllers/controller_resources_gen.go index 2bbfcc794a7..a3d51d63800 100644 --- a/v2/internal/controllers/controller_resources_gen.go +++ b/v2/internal/controllers/controller_resources_gen.go @@ -131,6 +131,8 @@ import ( insights_v20221001s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" insights_v20230101 "github.com/Azure/azure-service-operator/v2/api/insights/v1api20230101" insights_v20230101s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20230101/storage" + insights_v20231201 "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201" + insights_v20231201s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" keyvault_customizations "github.com/Azure/azure-service-operator/v2/api/keyvault/customizations" keyvault_v20210401p "github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20210401preview" keyvault_v20210401ps "github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20210401preview/storage" @@ -737,10 +739,10 @@ func getKnownStorageTypes() []*registration.StorageType { result = append(result, ®istration.StorageType{Obj: new(insights_v20180301s.MetricAlert)}) result = append(result, ®istration.StorageType{Obj: new(insights_v20200202s.Component)}) result = append(result, ®istration.StorageType{Obj: new(insights_v20210501ps.DiagnosticSetting)}) - 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{Obj: new(insights_v20231201s.ScheduledQueryRule)}) result = append(result, ®istration.StorageType{ Obj: new(keyvault_v20230701s.Vault), Indexes: []registration.Index{ @@ -1896,6 +1898,8 @@ func getKnownTypes() []client.Object { result = append(result, new(insights_v20221001s.AutoscaleSetting)) result = append(result, new(insights_v20230101.ActionGroup)) result = append(result, new(insights_v20230101s.ActionGroup)) + result = append(result, new(insights_v20231201.ScheduledQueryRule)) + result = append(result, new(insights_v20231201s.ScheduledQueryRule)) result = append(result, new(keyvault_v20210401p.Vault)) result = append(result, new(keyvault_v20210401ps.Vault)) result = append(result, new(keyvault_v20230701.Vault)) @@ -2433,6 +2437,8 @@ func createScheme() *runtime.Scheme { _ = insights_v20221001s.AddToScheme(scheme) _ = insights_v20230101.AddToScheme(scheme) _ = insights_v20230101s.AddToScheme(scheme) + _ = insights_v20231201.AddToScheme(scheme) + _ = insights_v20231201s.AddToScheme(scheme) _ = keyvault_v20210401p.AddToScheme(scheme) _ = keyvault_v20210401ps.AddToScheme(scheme) _ = keyvault_v20230701.AddToScheme(scheme) From 02f3c003025b02f1fb1475f47052750acdfddace Mon Sep 17 00:00:00 2001 From: AndreiBarbuOz Date: Sat, 4 Jan 2025 11:37:10 -0800 Subject: [PATCH 02/12] Add sample --- docs/hugo/content/reference/_index.md | 8 +++--- .../hugo/content/reference/insights/_index.md | 8 +++--- .../v1api20231201_scheduledqueryrule.yaml | 27 +++++++++++++++++++ .../v1api20220615_scheduledqueryrule.yaml | 0 4 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml rename v2/samples/insights/{v1api => v1api20220615}/v1api20220615_scheduledqueryrule.yaml (100%) diff --git a/docs/hugo/content/reference/_index.md b/docs/hugo/content/reference/_index.md index 60cd032951d..ed6141d06f9 100644 --- a/docs/hugo/content/reference/_index.md +++ b/docs/hugo/content/reference/_index.md @@ -420,9 +420,9 @@ To install the CRDs for these resources, your ASO configuration must include `in 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 | -|--------------------|-------------|---------------|----------------|--------| -| ScheduledQueryRule | 2023-12-01 | v1api20231201 | v2.12.0 | - | +| Resource | ARM Version | CRD Version | Supported From | Sample | +|--------------------|-------------|---------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------| +| ScheduledQueryRule | 2023-12-01 | v1api20231201 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml) | ### Released @@ -435,7 +435,7 @@ These resource(s) are available for use in the current release of ASO. Different | [Component](https://azure.github.io/azure-service-operator/reference/insights/v1api20200202/#insights.azure.com/v1api20200202.Component) | 2020-02-02 | v1api20200202 | v2.0.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20200202_component.yaml) | | [DiagnosticSetting](https://azure.github.io/azure-service-operator/reference/insights/v1api20210501preview/#insights.azure.com/v1api20210501preview.DiagnosticSetting) | 2021-05-01-preview | v1api20210501preview | v2.11.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api20210501preview/v1api20210501preview_diagnosticsetting.yaml) | | [MetricAlert](https://azure.github.io/azure-service-operator/reference/insights/v1api20180301/#insights.azure.com/v1api20180301.MetricAlert) | 2018-03-01 | v1api20180301 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20180301_metricalert.yaml) | -| [ScheduledQueryRule](https://azure.github.io/azure-service-operator/reference/insights/v1api20220615/#insights.azure.com/v1api20220615.ScheduledQueryRule) | 2022-06-15 | v1api20220615 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20220615_scheduledqueryrule.yaml) | +| [ScheduledQueryRule](https://azure.github.io/azure-service-operator/reference/insights/v1api20220615/#insights.azure.com/v1api20220615.ScheduledQueryRule) | 2022-06-15 | v1api20220615 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api20220615/v1api20220615_scheduledqueryrule.yaml) | | [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) | | [Webtest](https://azure.github.io/azure-service-operator/reference/insights/v1api20180501preview/#insights.azure.com/v1api20180501preview.Webtest) | 2018-05-01-preview | v1api20180501preview | v2.0.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20180501preview_webtest.yaml) | diff --git a/docs/hugo/content/reference/insights/_index.md b/docs/hugo/content/reference/insights/_index.md index 1fa3541abfc..00ccbd63560 100644 --- a/docs/hugo/content/reference/insights/_index.md +++ b/docs/hugo/content/reference/insights/_index.md @@ -9,9 +9,9 @@ To install the CRDs for these resources, your ASO configuration must include `in 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 | -|--------------------|-------------|---------------|----------------|--------| -| ScheduledQueryRule | 2023-12-01 | v1api20231201 | v2.12.0 | - | +| Resource | ARM Version | CRD Version | Supported From | Sample | +|--------------------|-------------|---------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------| +| ScheduledQueryRule | 2023-12-01 | v1api20231201 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml) | ### Released @@ -24,7 +24,7 @@ These resource(s) are available for use in the current release of ASO. Different | [Component](https://azure.github.io/azure-service-operator/reference/insights/v1api20200202/#insights.azure.com/v1api20200202.Component) | 2020-02-02 | v1api20200202 | v2.0.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20200202_component.yaml) | | [DiagnosticSetting](https://azure.github.io/azure-service-operator/reference/insights/v1api20210501preview/#insights.azure.com/v1api20210501preview.DiagnosticSetting) | 2021-05-01-preview | v1api20210501preview | v2.11.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api20210501preview/v1api20210501preview_diagnosticsetting.yaml) | | [MetricAlert](https://azure.github.io/azure-service-operator/reference/insights/v1api20180301/#insights.azure.com/v1api20180301.MetricAlert) | 2018-03-01 | v1api20180301 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20180301_metricalert.yaml) | -| [ScheduledQueryRule](https://azure.github.io/azure-service-operator/reference/insights/v1api20220615/#insights.azure.com/v1api20220615.ScheduledQueryRule) | 2022-06-15 | v1api20220615 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20220615_scheduledqueryrule.yaml) | +| [ScheduledQueryRule](https://azure.github.io/azure-service-operator/reference/insights/v1api20220615/#insights.azure.com/v1api20220615.ScheduledQueryRule) | 2022-06-15 | v1api20220615 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api20220615/v1api20220615_scheduledqueryrule.yaml) | | [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) | | [Webtest](https://azure.github.io/azure-service-operator/reference/insights/v1api20180501preview/#insights.azure.com/v1api20180501preview.Webtest) | 2018-05-01-preview | v1api20180501preview | v2.0.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20180501preview_webtest.yaml) | diff --git a/v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml b/v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml new file mode 100644 index 00000000000..e051e1618e1 --- /dev/null +++ b/v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml @@ -0,0 +1,27 @@ +apiVersion: insights.azure.com/v1api20231201 +kind: ScheduledQueryRule +metadata: + name: aso-sample-rule + namespace: default +spec: + criteria: + allOf: + - failingPeriods: + minFailingPeriodsToAlert: 1 + numberOfEvaluationPeriods: 1 + operator: LessThan + query: "requests | summarize CountByCountry=count() by client_CountryOrRegion" + threshold: 10 + timeAggregation: Count + evaluationFrequency: PT10M + identity: + type: UserAssigned + location: westus2 + owner: + name: aso-sample-rg + scopesReferences: + - group: insights.azure.com + kind: Component + name: sampleappinsights + severity: 0 + windowSize: PT10M diff --git a/v2/samples/insights/v1api/v1api20220615_scheduledqueryrule.yaml b/v2/samples/insights/v1api20220615/v1api20220615_scheduledqueryrule.yaml similarity index 100% rename from v2/samples/insights/v1api/v1api20220615_scheduledqueryrule.yaml rename to v2/samples/insights/v1api20220615/v1api20220615_scheduledqueryrule.yaml From 6b1ef30e3e49108fcdabf07422301fad0d4a48be Mon Sep 17 00:00:00 2001 From: AndreiBarbuOz Date: Sat, 4 Jan 2025 13:20:45 -0800 Subject: [PATCH 03/12] Redo it all, use preview version --- docs/hugo/content/reference/_index.md | 6 +- .../hugo/content/reference/insights/_index.md | 6 +- ...cheduled_query_rule_extension_types_gen.go | 8 +- .../scheduled_query_rule_types_gen.go | 286 +- .../scheduled_query_rule_types_gen_test.go | 35 +- .../storage/scheduled_query_rule_types_gen.go | 2350 ++------------- .../scheduled_query_rule_types_gen_test.go | 636 +--- .../v1api20220615/storage/structure.txt | 14 - .../storage/autoscale_setting_types_gen.go | 92 - .../autoscale_setting_types_gen_test.go | 43 - .../v1api20221001/storage/structure.txt | 1 - .../storage/scheduled_query_rule_types_gen.go | 453 --- .../scheduled_query_rule_spec_types_gen.go | 50 +- ...cheduled_query_rule_spec_types_gen_test.go | 6 +- .../scheduled_query_rule_status_types_gen.go | 41 +- ...eduled_query_rule_status_types_gen_test.go | 6 +- .../arm/structure.txt | 30 +- .../doc.go | 4 +- .../groupversion_info_gen.go | 8 +- .../scheduled_query_rule_types_gen.go | 585 ++-- .../scheduled_query_rule_types_gen_test.go | 61 +- .../storage/groupversion_info_gen.go | 4 +- .../storage/scheduled_query_rule_types_gen.go | 2683 +++++++++++++++++ .../scheduled_query_rule_types_gen_test.go | 681 +++++ .../storage/structure.txt | 31 +- .../storage/zz_generated.deepcopy.go | 30 + .../structure.txt | 32 +- .../zz_generated.deepcopy.go | 32 +- v2/api/insights/versions_matrix.md | 416 +-- v2/azure-arm.yaml | 8 +- .../controllers/controller_resources_gen.go | 14 +- ...ights_scheduledqueryrule_20220615_test.go} | 0 ...scheduledqueryrule_20240101preview_test.go | 132 + ...heduledQueryRule_20240101preview_CRUD.yaml | 1424 +++++++++ ...pi20240101preview_scheduledqueryrule.yaml} | 2 +- 35 files changed, 6090 insertions(+), 4120 deletions(-) delete mode 100644 v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen.go rename v2/api/insights/{v1api20231201 => v1api20240101preview}/arm/scheduled_query_rule_spec_types_gen.go (83%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/arm/scheduled_query_rule_spec_types_gen_test.go (98%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/arm/scheduled_query_rule_status_types_gen.go (88%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/arm/scheduled_query_rule_status_types_gen_test.go (98%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/arm/structure.txt (86%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/doc.go (55%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/groupversion_info_gen.go (80%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/scheduled_query_rule_types_gen.go (92%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/scheduled_query_rule_types_gen_test.go (97%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/storage/groupversion_info_gen.go (91%) create mode 100644 v2/api/insights/v1api20240101preview/storage/scheduled_query_rule_types_gen.go rename v2/api/insights/{v1api20231201 => v1api20240101preview}/storage/scheduled_query_rule_types_gen_test.go (68%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/storage/structure.txt (84%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/storage/zz_generated.deepcopy.go (97%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/structure.txt (87%) rename v2/api/insights/{v1api20231201 => v1api20240101preview}/zz_generated.deepcopy.go (97%) rename v2/internal/controllers/{crd_insights_scheduledqueryrule_test.go => crd_insights_scheduledqueryrule_20220615_test.go} (100%) create mode 100644 v2/internal/controllers/crd_insights_scheduledqueryrule_20240101preview_test.go create mode 100644 v2/internal/controllers/recordings/Test_Insights_ScheduledQueryRule_20240101preview_CRUD.yaml rename v2/samples/insights/v1api/{v1api20231201_scheduledqueryrule.yaml => v1api20240101preview_scheduledqueryrule.yaml} (92%) diff --git a/docs/hugo/content/reference/_index.md b/docs/hugo/content/reference/_index.md index ed6141d06f9..7e681054ca5 100644 --- a/docs/hugo/content/reference/_index.md +++ b/docs/hugo/content/reference/_index.md @@ -420,9 +420,9 @@ To install the CRDs for these resources, your ASO configuration must include `in 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 | -|--------------------|-------------|---------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------| -| ScheduledQueryRule | 2023-12-01 | v1api20231201 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml) | +| Resource | ARM Version | CRD Version | Supported From | Sample | +|--------------------|--------------------|----------------------|----------------|--------| +| ScheduledQueryRule | 2024-01-01-preview | v1api20240101preview | v2.12.0 | - | ### Released diff --git a/docs/hugo/content/reference/insights/_index.md b/docs/hugo/content/reference/insights/_index.md index 00ccbd63560..d3059777ba9 100644 --- a/docs/hugo/content/reference/insights/_index.md +++ b/docs/hugo/content/reference/insights/_index.md @@ -9,9 +9,9 @@ To install the CRDs for these resources, your ASO configuration must include `in 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 | -|--------------------|-------------|---------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------| -| ScheduledQueryRule | 2023-12-01 | v1api20231201 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml) | +| Resource | ARM Version | CRD Version | Supported From | Sample | +|--------------------|--------------------|----------------------|----------------|--------| +| ScheduledQueryRule | 2024-01-01-preview | v1api20240101preview | v2.12.0 | - | ### Released diff --git a/v2/api/insights/customizations/scheduled_query_rule_extension_types_gen.go b/v2/api/insights/customizations/scheduled_query_rule_extension_types_gen.go index f2e0c160de5..93a6488c9eb 100644 --- a/v2/api/insights/customizations/scheduled_query_rule_extension_types_gen.go +++ b/v2/api/insights/customizations/scheduled_query_rule_extension_types_gen.go @@ -6,8 +6,8 @@ package customizations import ( v20220615 "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615" v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" - v20231201 "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201" - v20231201s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" + v20240101p "github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview" + v20240101ps "github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) @@ -19,6 +19,6 @@ func (extension *ScheduledQueryRuleExtension) GetExtendedResources() []genruntim return []genruntime.KubernetesResource{ &v20220615.ScheduledQueryRule{}, &v20220615s.ScheduledQueryRule{}, - &v20231201.ScheduledQueryRule{}, - &v20231201s.ScheduledQueryRule{}} + &v20240101p.ScheduledQueryRule{}, + &v20240101ps.ScheduledQueryRule{}} } diff --git a/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go b/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go index 4c96cfd7949..b069cebe921 100644 --- a/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go +++ b/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go @@ -53,36 +53,22 @@ var _ conversion.Convertible = &ScheduledQueryRule{} // ConvertFrom populates our ScheduledQueryRule from the provided hub ScheduledQueryRule func (rule *ScheduledQueryRule) ConvertFrom(hub conversion.Hub) error { - // intermediate variable for conversion - var source storage.ScheduledQueryRule - - err := source.ConvertFrom(hub) - if err != nil { - return eris.Wrap(err, "converting from hub to source") - } - - err = rule.AssignProperties_From_ScheduledQueryRule(&source) - if err != nil { - return eris.Wrap(err, "converting from source to rule") + source, ok := hub.(*storage.ScheduledQueryRule) + if !ok { + return fmt.Errorf("expected insights/v1api20220615/storage/ScheduledQueryRule but received %T instead", hub) } - return nil + return rule.AssignProperties_From_ScheduledQueryRule(source) } // ConvertTo populates the provided hub ScheduledQueryRule from our ScheduledQueryRule func (rule *ScheduledQueryRule) ConvertTo(hub conversion.Hub) error { - // intermediate variable for conversion - var destination storage.ScheduledQueryRule - err := rule.AssignProperties_To_ScheduledQueryRule(&destination) - if err != nil { - return eris.Wrap(err, "converting to destination from rule") - } - err = destination.ConvertTo(hub) - if err != nil { - return eris.Wrap(err, "converting from destination to hub") + destination, ok := hub.(*storage.ScheduledQueryRule) + if !ok { + return fmt.Errorf("expected insights/v1api20220615/storage/ScheduledQueryRule but received %T instead", hub) } - return nil + return rule.AssignProperties_To_ScheduledQueryRule(destination) } // +kubebuilder:webhook:path=/mutate-insights-azure-com-v1api20220615-scheduledqueryrule,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=scheduledqueryrules,verbs=create;update,versions=v1api20220615,name=default.v1api20220615.scheduledqueryrules.insights.azure.com,admissionReviewVersions=v1 @@ -128,6 +114,17 @@ func (rule *ScheduledQueryRule) SecretDestinationExpressions() []*core.Destinati return rule.Spec.OperatorSpec.SecretExpressions } +var _ genruntime.ImportableResource = &ScheduledQueryRule{} + +// InitializeSpec initializes the spec for this resource from the given status +func (rule *ScheduledQueryRule) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*ScheduledQueryRule_STATUS); ok { + return rule.Spec.Initialize_From_ScheduledQueryRule_STATUS(s) + } + + return fmt.Errorf("expected Status of type ScheduledQueryRule_STATUS but received %T instead", status) +} + var _ genruntime.KubernetesResource = &ScheduledQueryRule{} // AzureName returns the Azure name of the resource @@ -1127,6 +1124,112 @@ func (rule *ScheduledQueryRule_Spec) AssignProperties_To_ScheduledQueryRule_Spec return nil } +// Initialize_From_ScheduledQueryRule_STATUS populates our ScheduledQueryRule_Spec from the provided source ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_Spec) Initialize_From_ScheduledQueryRule_STATUS(source *ScheduledQueryRule_STATUS) error { + + // Actions + if source.Actions != nil { + var action Actions + err := action.Initialize_From_Actions_STATUS(source.Actions) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_Actions_STATUS() to populate field Actions") + } + rule.Actions = &action + } else { + rule.Actions = nil + } + + // AutoMitigate + if source.AutoMitigate != nil { + autoMitigate := *source.AutoMitigate + rule.AutoMitigate = &autoMitigate + } else { + rule.AutoMitigate = nil + } + + // CheckWorkspaceAlertsStorageConfigured + if source.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured + rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + rule.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Criteria + if source.Criteria != nil { + var criterion ScheduledQueryRuleCriteria + err := criterion.Initialize_From_ScheduledQueryRuleCriteria_STATUS(source.Criteria) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") + } + rule.Criteria = &criterion + } else { + rule.Criteria = nil + } + + // Description + rule.Description = genruntime.ClonePointerToString(source.Description) + + // DisplayName + rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // EvaluationFrequency + rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) + + // Kind + if source.Kind != nil { + kind := genruntime.ToEnum(string(*source.Kind), scheduledQueryRule_Kind_Spec_Values) + rule.Kind = &kind + } else { + rule.Kind = nil + } + + // Location + rule.Location = genruntime.ClonePointerToString(source.Location) + + // MuteActionsDuration + rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) + + // OverrideQueryTimeRange + rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) + + // Severity + if source.Severity != nil { + severity := ScheduledQueryRuleProperties_Severity(*source.Severity) + rule.Severity = &severity + } else { + rule.Severity = nil + } + + // SkipQueryValidation + if source.SkipQueryValidation != nil { + skipQueryValidation := *source.SkipQueryValidation + rule.SkipQueryValidation = &skipQueryValidation + } else { + rule.SkipQueryValidation = nil + } + + // Tags + rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // TargetResourceTypes + rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) + + // WindowSize + rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) + + // No error + return nil +} + // OriginalVersion returns the original API version used to create the resource. func (rule *ScheduledQueryRule_Spec) OriginalVersion() string { return GroupVersion.Version @@ -1971,6 +2074,16 @@ func (actions *Actions) AssignProperties_To_Actions(destination *storage.Actions return nil } +// Initialize_From_Actions_STATUS populates our Actions from the provided source Actions_STATUS +func (actions *Actions) Initialize_From_Actions_STATUS(source *Actions_STATUS) error { + + // CustomProperties + actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) + + // No error + return nil +} + // Actions to invoke when the alert fires. type Actions_STATUS struct { // ActionGroups: Action Group resource Ids to invoke when the alert fires. @@ -2184,6 +2297,31 @@ func (criteria *ScheduledQueryRuleCriteria) AssignProperties_To_ScheduledQueryRu return nil } +// Initialize_From_ScheduledQueryRuleCriteria_STATUS populates our ScheduledQueryRuleCriteria from the provided source ScheduledQueryRuleCriteria_STATUS +func (criteria *ScheduledQueryRuleCriteria) Initialize_From_ScheduledQueryRuleCriteria_STATUS(source *ScheduledQueryRuleCriteria_STATUS) error { + + // AllOf + if source.AllOf != nil { + allOfList := make([]Condition, len(source.AllOf)) + for allOfIndex, allOfItem := range source.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf Condition + err := allOf.Initialize_From_Condition_STATUS(&allOfItem) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_Condition_STATUS() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + criteria.AllOf = allOfList + } else { + criteria.AllOf = nil + } + + // No error + return nil +} + // The rule criteria that defines the conditions of the scheduled query rule. type ScheduledQueryRuleCriteria_STATUS struct { // AllOf: A list of conditions to evaluate against the specified scopes @@ -2921,6 +3059,76 @@ func (condition *Condition) AssignProperties_To_Condition(destination *storage.C return nil } +// Initialize_From_Condition_STATUS populates our Condition from the provided source Condition_STATUS +func (condition *Condition) Initialize_From_Condition_STATUS(source *Condition_STATUS) error { + + // Dimensions + if source.Dimensions != nil { + dimensionList := make([]Dimension, len(source.Dimensions)) + for dimensionIndex, dimensionItem := range source.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension Dimension + err := dimension.Initialize_From_Dimension_STATUS(&dimensionItem) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_Dimension_STATUS() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + condition.Dimensions = dimensionList + } else { + condition.Dimensions = nil + } + + // FailingPeriods + if source.FailingPeriods != nil { + var failingPeriod Condition_FailingPeriods + err := failingPeriod.Initialize_From_Condition_FailingPeriods_STATUS(source.FailingPeriods) + if err != nil { + return eris.Wrap(err, "calling Initialize_From_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") + } + condition.FailingPeriods = &failingPeriod + } else { + condition.FailingPeriods = nil + } + + // MetricMeasureColumn + condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) + + // MetricName + condition.MetricName = genruntime.ClonePointerToString(source.MetricName) + + // Operator + if source.Operator != nil { + operator := genruntime.ToEnum(string(*source.Operator), condition_Operator_Values) + condition.Operator = &operator + } else { + condition.Operator = nil + } + + // Query + condition.Query = genruntime.ClonePointerToString(source.Query) + + // Threshold + if source.Threshold != nil { + threshold := *source.Threshold + condition.Threshold = &threshold + } else { + condition.Threshold = nil + } + + // TimeAggregation + if source.TimeAggregation != nil { + timeAggregation := genruntime.ToEnum(string(*source.TimeAggregation), condition_TimeAggregation_Values) + condition.TimeAggregation = &timeAggregation + } else { + condition.TimeAggregation = nil + } + + // No error + return nil +} + // A condition of the scheduled query rule. type Condition_STATUS struct { // Dimensions: List of Dimensions conditions @@ -3326,6 +3534,19 @@ func (periods *Condition_FailingPeriods) AssignProperties_To_Condition_FailingPe return nil } +// Initialize_From_Condition_FailingPeriods_STATUS populates our Condition_FailingPeriods from the provided source Condition_FailingPeriods_STATUS +func (periods *Condition_FailingPeriods) Initialize_From_Condition_FailingPeriods_STATUS(source *Condition_FailingPeriods_STATUS) error { + + // MinFailingPeriodsToAlert + periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) + + // No error + return nil +} + type Condition_FailingPeriods_STATUS struct { // MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to // numberOfEvaluationPeriods. Default value is 1 @@ -3611,6 +3832,27 @@ func (dimension *Dimension) AssignProperties_To_Dimension(destination *storage.D return nil } +// Initialize_From_Dimension_STATUS populates our Dimension from the provided source Dimension_STATUS +func (dimension *Dimension) Initialize_From_Dimension_STATUS(source *Dimension_STATUS) error { + + // Name + dimension.Name = genruntime.ClonePointerToString(source.Name) + + // Operator + if source.Operator != nil { + operator := genruntime.ToEnum(string(*source.Operator), dimension_Operator_Values) + dimension.Operator = &operator + } else { + dimension.Operator = nil + } + + // Values + dimension.Values = genruntime.CloneSliceOfString(source.Values) + + // No error + return nil +} + // Dimension splitting and filtering definition type Dimension_STATUS struct { // Name: Name of the dimension diff --git a/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen_test.go b/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen_test.go index c57595f5480..d6e8db8dbaf 100644 --- a/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen_test.go +++ b/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen_test.go @@ -5,8 +5,7 @@ package v1api20220615 import ( "encoding/json" - v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" - v20231201s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" + storage "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 +35,7 @@ func RunPropertyAssignmentTestForActions(subject Actions) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.Actions + var other storage.Actions err := copied.AssignProperties_To_Actions(&other) if err != nil { return err.Error() @@ -140,7 +139,7 @@ func RunPropertyAssignmentTestForActions_STATUS(subject Actions_STATUS) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.Actions_STATUS + var other storage.Actions_STATUS err := copied.AssignProperties_To_Actions_STATUS(&other) if err != nil { return err.Error() @@ -245,7 +244,7 @@ func RunPropertyAssignmentTestForCondition(subject Condition) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.Condition + var other storage.Condition err := copied.AssignProperties_To_Condition(&other) if err != nil { return err.Error() @@ -377,7 +376,7 @@ func RunPropertyAssignmentTestForCondition_FailingPeriods(subject Condition_Fail copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.Condition_FailingPeriods + var other storage.Condition_FailingPeriods err := copied.AssignProperties_To_Condition_FailingPeriods(&other) if err != nil { return err.Error() @@ -481,7 +480,7 @@ func RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS(subject Conditi copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.Condition_FailingPeriods_STATUS + var other storage.Condition_FailingPeriods_STATUS err := copied.AssignProperties_To_Condition_FailingPeriods_STATUS(&other) if err != nil { return err.Error() @@ -585,7 +584,7 @@ func RunPropertyAssignmentTestForCondition_STATUS(subject Condition_STATUS) stri copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.Condition_STATUS + var other storage.Condition_STATUS err := copied.AssignProperties_To_Condition_STATUS(&other) if err != nil { return err.Error() @@ -718,7 +717,7 @@ func RunPropertyAssignmentTestForDimension(subject Dimension) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.Dimension + var other storage.Dimension err := copied.AssignProperties_To_Dimension(&other) if err != nil { return err.Error() @@ -822,7 +821,7 @@ func RunPropertyAssignmentTestForDimension_STATUS(subject Dimension_STATUS) stri copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.Dimension_STATUS + var other storage.Dimension_STATUS err := copied.AssignProperties_To_Dimension_STATUS(&other) if err != nil { return err.Error() @@ -927,7 +926,7 @@ func RunResourceConversionTestForScheduledQueryRule(subject ScheduledQueryRule) copied := subject.DeepCopy() // Convert to our hub version - var hub v20231201s.ScheduledQueryRule + var hub storage.ScheduledQueryRule err := copied.ConvertTo(&hub) if err != nil { return err.Error() @@ -969,7 +968,7 @@ func RunPropertyAssignmentTestForScheduledQueryRule(subject ScheduledQueryRule) copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.ScheduledQueryRule + var other storage.ScheduledQueryRule err := copied.AssignProperties_To_ScheduledQueryRule(&other) if err != nil { return err.Error() @@ -1072,7 +1071,7 @@ func RunPropertyAssignmentTestForScheduledQueryRuleCriteria(subject ScheduledQue copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.ScheduledQueryRuleCriteria + var other storage.ScheduledQueryRuleCriteria err := copied.AssignProperties_To_ScheduledQueryRuleCriteria(&other) if err != nil { return err.Error() @@ -1175,7 +1174,7 @@ func RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS(subject Sched copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.ScheduledQueryRuleCriteria_STATUS + var other storage.ScheduledQueryRuleCriteria_STATUS err := copied.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&other) if err != nil { return err.Error() @@ -1278,7 +1277,7 @@ func RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec(subject Schedule copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.ScheduledQueryRuleOperatorSpec + var other storage.ScheduledQueryRuleOperatorSpec err := copied.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&other) if err != nil { return err.Error() @@ -1375,7 +1374,7 @@ func RunPropertyAssignmentTestForScheduledQueryRule_STATUS(subject ScheduledQuer copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.ScheduledQueryRule_STATUS + var other storage.ScheduledQueryRule_STATUS err := copied.AssignProperties_To_ScheduledQueryRule_STATUS(&other) if err != nil { return err.Error() @@ -1523,7 +1522,7 @@ func RunPropertyAssignmentTestForScheduledQueryRule_Spec(subject ScheduledQueryR copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.ScheduledQueryRule_Spec + var other storage.ScheduledQueryRule_Spec err := copied.AssignProperties_To_ScheduledQueryRule_Spec(&other) if err != nil { return err.Error() @@ -1664,7 +1663,7 @@ func RunPropertyAssignmentTestForSystemData_STATUS(subject SystemData_STATUS) st copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20220615s.SystemData_STATUS + var other storage.SystemData_STATUS err := copied.AssignProperties_To_SystemData_STATUS(&other) if err != nil { return err.Error() diff --git a/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen.go b/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen.go index d2cf0735cdf..863c324e655 100644 --- a/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen.go +++ b/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen.go @@ -4,9 +4,7 @@ package storage import ( - "fmt" - v20221001s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" - v20231201s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" + storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" @@ -15,11 +13,14 @@ import ( "github.com/rotisserie/eris" 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=scheduledqueryrules,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=insights.azure.com,resources={scheduledqueryrules/status,scheduledqueryrules/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" @@ -47,28 +48,6 @@ func (rule *ScheduledQueryRule) SetConditions(conditions conditions.Conditions) rule.Status.Conditions = conditions } -var _ conversion.Convertible = &ScheduledQueryRule{} - -// ConvertFrom populates our ScheduledQueryRule from the provided hub ScheduledQueryRule -func (rule *ScheduledQueryRule) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*v20231201s.ScheduledQueryRule) - if !ok { - return fmt.Errorf("expected insights/v1api20231201/storage/ScheduledQueryRule but received %T instead", hub) - } - - return rule.AssignProperties_From_ScheduledQueryRule(source) -} - -// ConvertTo populates the provided hub ScheduledQueryRule from our ScheduledQueryRule -func (rule *ScheduledQueryRule) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*v20231201s.ScheduledQueryRule) - if !ok { - return fmt.Errorf("expected insights/v1api20231201/storage/ScheduledQueryRule but received %T instead", hub) - } - - return rule.AssignProperties_To_ScheduledQueryRule(destination) -} - var _ configmaps.Exporter = &ScheduledQueryRule{} // ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property @@ -164,75 +143,8 @@ func (rule *ScheduledQueryRule) SetStatus(status genruntime.ConvertibleStatus) e return nil } -// AssignProperties_From_ScheduledQueryRule populates our ScheduledQueryRule from the provided source ScheduledQueryRule -func (rule *ScheduledQueryRule) AssignProperties_From_ScheduledQueryRule(source *v20231201s.ScheduledQueryRule) error { - - // ObjectMeta - rule.ObjectMeta = *source.ObjectMeta.DeepCopy() - - // Spec - var spec ScheduledQueryRule_Spec - err := spec.AssignProperties_From_ScheduledQueryRule_Spec(&source.Spec) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRule_Spec() to populate field Spec") - } - rule.Spec = spec - - // Status - var status ScheduledQueryRule_STATUS - err = status.AssignProperties_From_ScheduledQueryRule_STATUS(&source.Status) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRule_STATUS() to populate field Status") - } - rule.Status = status - - // Invoke the augmentConversionForScheduledQueryRule interface (if implemented) to customize the conversion - var ruleAsAny any = rule - if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule); ok { - err := augmentedRule.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_ScheduledQueryRule populates the provided destination ScheduledQueryRule from our ScheduledQueryRule -func (rule *ScheduledQueryRule) AssignProperties_To_ScheduledQueryRule(destination *v20231201s.ScheduledQueryRule) error { - - // ObjectMeta - destination.ObjectMeta = *rule.ObjectMeta.DeepCopy() - - // Spec - var spec v20231201s.ScheduledQueryRule_Spec - err := rule.Spec.AssignProperties_To_ScheduledQueryRule_Spec(&spec) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRule_Spec() to populate field Spec") - } - destination.Spec = spec - - // Status - var status v20231201s.ScheduledQueryRule_STATUS - err = rule.Status.AssignProperties_To_ScheduledQueryRule_STATUS(&status) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRule_STATUS() to populate field Status") - } - destination.Status = status - - // Invoke the augmentConversionForScheduledQueryRule interface (if implemented) to customize the conversion - var ruleAsAny any = rule - if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule); ok { - err := augmentedRule.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} +// Hub marks that this ScheduledQueryRule is the hub type for conversion +func (rule *ScheduledQueryRule) Hub() {} // OriginalGVK returns a GroupValueKind for the original API version used to create the resource func (rule *ScheduledQueryRule) OriginalGVK() *schema.GroupVersionKind { @@ -260,11 +172,6 @@ type APIVersion string const APIVersion_Value = APIVersion("2022-06-15") -type augmentConversionForScheduledQueryRule interface { - AssignPropertiesFrom(src *v20231201s.ScheduledQueryRule) error - AssignPropertiesTo(dst *v20231201s.ScheduledQueryRule) error -} - // Storage version of v1api20220615.ScheduledQueryRule_Spec type ScheduledQueryRule_Spec struct { Actions *Actions `json:"actions,omitempty"` @@ -304,210 +211,158 @@ var _ genruntime.ConvertibleSpec = &ScheduledQueryRule_Spec{} // ConvertSpecFrom populates our ScheduledQueryRule_Spec from the provided source func (rule *ScheduledQueryRule_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - src, ok := source.(*v20231201s.ScheduledQueryRule_Spec) - if ok { - // Populate our instance from source - return rule.AssignProperties_From_ScheduledQueryRule_Spec(src) - } - - // Convert to an intermediate form - src = &v20231201s.ScheduledQueryRule_Spec{} - err := src.ConvertSpecFrom(source) - if err != nil { - return eris.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + if source == rule { + return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") } - // Update our instance from src - err = rule.AssignProperties_From_ScheduledQueryRule_Spec(src) - if err != nil { - return eris.Wrap(err, "final step of conversion in ConvertSpecFrom()") - } - - return nil + return source.ConvertSpecTo(rule) } // ConvertSpecTo populates the provided destination from our ScheduledQueryRule_Spec func (rule *ScheduledQueryRule_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - dst, ok := destination.(*v20231201s.ScheduledQueryRule_Spec) - if ok { - // Populate destination from our instance - return rule.AssignProperties_To_ScheduledQueryRule_Spec(dst) - } - - // Convert to an intermediate form - dst = &v20231201s.ScheduledQueryRule_Spec{} - err := rule.AssignProperties_To_ScheduledQueryRule_Spec(dst) - if err != nil { - return eris.Wrap(err, "initial step of conversion in ConvertSpecTo()") - } - - // Update dst from our instance - err = dst.ConvertSpecTo(destination) - if err != nil { - return eris.Wrap(err, "final step of conversion in ConvertSpecTo()") + if destination == rule { + return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") } - return nil + return destination.ConvertSpecFrom(rule) } -// AssignProperties_From_ScheduledQueryRule_Spec populates our ScheduledQueryRule_Spec from the provided source ScheduledQueryRule_Spec -func (rule *ScheduledQueryRule_Spec) AssignProperties_From_ScheduledQueryRule_Spec(source *v20231201s.ScheduledQueryRule_Spec) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // Actions - if source.Actions != nil { - var action Actions - err := action.AssignProperties_From_Actions(source.Actions) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_Actions() to populate field Actions") - } - rule.Actions = &action - } else { - rule.Actions = nil - } - - // AutoMitigate - if source.AutoMitigate != nil { - autoMitigate := *source.AutoMitigate - rule.AutoMitigate = &autoMitigate - } else { - rule.AutoMitigate = nil - } - - // AzureName - rule.AzureName = source.AzureName - - // CheckWorkspaceAlertsStorageConfigured - if source.CheckWorkspaceAlertsStorageConfigured != nil { - checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured - rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured - } else { - rule.CheckWorkspaceAlertsStorageConfigured = nil - } - - // Criteria - if source.Criteria != nil { - var criterion ScheduledQueryRuleCriteria - err := criterion.AssignProperties_From_ScheduledQueryRuleCriteria(source.Criteria) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleCriteria() to populate field Criteria") - } - rule.Criteria = &criterion - } else { - rule.Criteria = nil - } - - // Description - rule.Description = genruntime.ClonePointerToString(source.Description) +// Storage version of v1api20220615.ScheduledQueryRule_STATUS +type ScheduledQueryRule_STATUS struct { + Actions *Actions_STATUS `json:"actions,omitempty"` + AutoMitigate *bool `json:"autoMitigate,omitempty"` + CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` + Conditions []conditions.Condition `json:"conditions,omitempty"` + CreatedWithApiVersion *string `json:"createdWithApiVersion,omitempty"` + Criteria *ScheduledQueryRuleCriteria_STATUS `json:"criteria,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Etag *string `json:"etag,omitempty"` + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + Id *string `json:"id,omitempty"` + IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty"` + IsWorkspaceAlertsStorageConfigured *bool `json:"isWorkspaceAlertsStorageConfigured,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` + Name *string `json:"name,omitempty"` + OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Scopes []string `json:"scopes,omitempty"` + Severity *int `json:"severity,omitempty"` + SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` + SystemData *SystemData_STATUS `json:"systemData,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` + Type *string `json:"type,omitempty"` + WindowSize *string `json:"windowSize,omitempty"` +} - // DisplayName - rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) +var _ genruntime.ConvertibleStatus = &ScheduledQueryRule_STATUS{} - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - rule.Enabled = &enabled - } else { - rule.Enabled = nil +// ConvertStatusFrom populates our ScheduledQueryRule_STATUS from the provided source +func (rule *ScheduledQueryRule_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == rule { + return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") } - // EvaluationFrequency - rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) + return source.ConvertStatusTo(rule) +} - // Identity - if source.Identity != nil { - propertyBag.Add("Identity", *source.Identity) - } else { - propertyBag.Remove("Identity") +// ConvertStatusTo populates the provided destination from our ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == rule { + return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") } - // Kind - rule.Kind = genruntime.ClonePointerToString(source.Kind) + return destination.ConvertStatusFrom(rule) +} - // Location - rule.Location = genruntime.ClonePointerToString(source.Location) +// Storage version of v1api20220615.Actions +// Actions to invoke when the alert fires. +type Actions struct { + ActionGroupsReferences []genruntime.ResourceReference `armReference:"ActionGroups" json:"actionGroupsReferences,omitempty"` + CustomProperties map[string]string `json:"customProperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} - // MuteActionsDuration - rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) +// Storage version of v1api20220615.Actions_STATUS +// Actions to invoke when the alert fires. +type Actions_STATUS struct { + ActionGroups []string `json:"actionGroups,omitempty"` + CustomProperties map[string]string `json:"customProperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} - // OperatorSpec - if source.OperatorSpec != nil { - var operatorSpec ScheduledQueryRuleOperatorSpec - err := operatorSpec.AssignProperties_From_ScheduledQueryRuleOperatorSpec(source.OperatorSpec) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleOperatorSpec() to populate field OperatorSpec") - } - rule.OperatorSpec = &operatorSpec - } else { - rule.OperatorSpec = nil - } +// Storage version of v1api20220615.ScheduledQueryRuleCriteria +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria struct { + AllOf []Condition `json:"allOf,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} - // OriginalVersion - rule.OriginalVersion = source.OriginalVersion +// Storage version of v1api20220615.ScheduledQueryRuleCriteria_STATUS +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria_STATUS struct { + AllOf []Condition_STATUS `json:"allOf,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} - // OverrideQueryTimeRange - rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) +// Storage version of v1api20220615.ScheduledQueryRuleOperatorSpec +// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type ScheduledQueryRuleOperatorSpec struct { + ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SecretExpressions []*core.DestinationExpression `json:"secretExpressions,omitempty"` +} - // Owner - if source.Owner != nil { - owner := source.Owner.Copy() - rule.Owner = &owner - } else { - rule.Owner = nil - } +// Storage version of v1api20220615.SystemData_STATUS +// Metadata pertaining to creation and last modification of the resource. +type SystemData_STATUS struct { + CreatedAt *string `json:"createdAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + CreatedByType *string `json:"createdByType,omitempty"` + LastModifiedAt *string `json:"lastModifiedAt,omitempty"` + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedByType *string `json:"lastModifiedByType,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} - // ResolveConfiguration - if source.ResolveConfiguration != nil { - propertyBag.Add("ResolveConfiguration", *source.ResolveConfiguration) - } else { - propertyBag.Remove("ResolveConfiguration") - } +// AssignProperties_From_SystemData_STATUS populates our SystemData_STATUS from the provided source SystemData_STATUS +func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *storage.SystemData_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - // ScopesReferences - if source.ScopesReferences != nil { - scopesReferenceList := make([]genruntime.ResourceReference, len(source.ScopesReferences)) - for scopesReferenceIndex, scopesReferenceItem := range source.ScopesReferences { - // Shadow the loop variable to avoid aliasing - scopesReferenceItem := scopesReferenceItem - scopesReferenceList[scopesReferenceIndex] = scopesReferenceItem.Copy() - } - rule.ScopesReferences = scopesReferenceList - } else { - rule.ScopesReferences = nil - } + // CreatedAt + data.CreatedAt = genruntime.ClonePointerToString(source.CreatedAt) - // Severity - rule.Severity = genruntime.ClonePointerToInt(source.Severity) + // CreatedBy + data.CreatedBy = genruntime.ClonePointerToString(source.CreatedBy) - // SkipQueryValidation - if source.SkipQueryValidation != nil { - skipQueryValidation := *source.SkipQueryValidation - rule.SkipQueryValidation = &skipQueryValidation - } else { - rule.SkipQueryValidation = nil - } + // CreatedByType + data.CreatedByType = genruntime.ClonePointerToString(source.CreatedByType) - // Tags - rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) + // LastModifiedAt + data.LastModifiedAt = genruntime.ClonePointerToString(source.LastModifiedAt) - // TargetResourceTypes - rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) + // LastModifiedBy + data.LastModifiedBy = genruntime.ClonePointerToString(source.LastModifiedBy) - // WindowSize - rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) + // LastModifiedByType + data.LastModifiedByType = genruntime.ClonePointerToString(source.LastModifiedByType) // Update the property bag if len(propertyBag) > 0 { - rule.PropertyBag = propertyBag + data.PropertyBag = propertyBag } else { - rule.PropertyBag = nil + data.PropertyBag = nil } - // Invoke the augmentConversionForScheduledQueryRule_Spec interface (if implemented) to customize the conversion - var ruleAsAny any = rule - if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_Spec); ok { - err := augmentedRule.AssignPropertiesFrom(source) + // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion + var dataAsAny any = data + if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { + err := augmentedData.AssignPropertiesFrom(source) if err != nil { return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") } @@ -517,1485 +372,70 @@ func (rule *ScheduledQueryRule_Spec) AssignProperties_From_ScheduledQueryRule_Sp return nil } -// AssignProperties_To_ScheduledQueryRule_Spec populates the provided destination ScheduledQueryRule_Spec from our ScheduledQueryRule_Spec -func (rule *ScheduledQueryRule_Spec) AssignProperties_To_ScheduledQueryRule_Spec(destination *v20231201s.ScheduledQueryRule_Spec) error { +// AssignProperties_To_SystemData_STATUS populates the provided destination SystemData_STATUS from our SystemData_STATUS +func (data *SystemData_STATUS) AssignProperties_To_SystemData_STATUS(destination *storage.SystemData_STATUS) error { // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) - - // Actions - if rule.Actions != nil { - var action v20231201s.Actions - err := rule.Actions.AssignProperties_To_Actions(&action) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_Actions() to populate field Actions") - } - destination.Actions = &action - } else { - destination.Actions = nil - } + propertyBag := genruntime.NewPropertyBag(data.PropertyBag) - // AutoMitigate - if rule.AutoMitigate != nil { - autoMitigate := *rule.AutoMitigate - destination.AutoMitigate = &autoMitigate - } else { - destination.AutoMitigate = nil - } + // CreatedAt + destination.CreatedAt = genruntime.ClonePointerToString(data.CreatedAt) - // AzureName - destination.AzureName = rule.AzureName + // CreatedBy + destination.CreatedBy = genruntime.ClonePointerToString(data.CreatedBy) - // CheckWorkspaceAlertsStorageConfigured - if rule.CheckWorkspaceAlertsStorageConfigured != nil { - checkWorkspaceAlertsStorageConfigured := *rule.CheckWorkspaceAlertsStorageConfigured - destination.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured - } else { - destination.CheckWorkspaceAlertsStorageConfigured = nil - } + // CreatedByType + destination.CreatedByType = genruntime.ClonePointerToString(data.CreatedByType) - // Criteria - if rule.Criteria != nil { - var criterion v20231201s.ScheduledQueryRuleCriteria - err := rule.Criteria.AssignProperties_To_ScheduledQueryRuleCriteria(&criterion) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleCriteria() to populate field Criteria") - } - destination.Criteria = &criterion - } else { - destination.Criteria = nil - } + // LastModifiedAt + destination.LastModifiedAt = genruntime.ClonePointerToString(data.LastModifiedAt) - // Description - destination.Description = genruntime.ClonePointerToString(rule.Description) + // LastModifiedBy + destination.LastModifiedBy = genruntime.ClonePointerToString(data.LastModifiedBy) - // DisplayName - destination.DisplayName = genruntime.ClonePointerToString(rule.DisplayName) + // LastModifiedByType + destination.LastModifiedByType = genruntime.ClonePointerToString(data.LastModifiedByType) - // Enabled - if rule.Enabled != nil { - enabled := *rule.Enabled - destination.Enabled = &enabled + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag } else { - destination.Enabled = nil + destination.PropertyBag = nil } - // EvaluationFrequency - destination.EvaluationFrequency = genruntime.ClonePointerToString(rule.EvaluationFrequency) - - // Identity - if propertyBag.Contains("Identity") { - var identity v20231201s.Identity - err := propertyBag.Pull("Identity", &identity) + // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion + var dataAsAny any = data + if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { + err := augmentedData.AssignPropertiesTo(destination) if err != nil { - return eris.Wrap(err, "pulling 'Identity' from propertyBag") + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") } - - destination.Identity = &identity - } else { - destination.Identity = nil } - // Kind - destination.Kind = genruntime.ClonePointerToString(rule.Kind) - - // Location - destination.Location = genruntime.ClonePointerToString(rule.Location) + // No error + return nil +} - // MuteActionsDuration - destination.MuteActionsDuration = genruntime.ClonePointerToString(rule.MuteActionsDuration) +type augmentConversionForSystemData_STATUS interface { + AssignPropertiesFrom(src *storage.SystemData_STATUS) error + AssignPropertiesTo(dst *storage.SystemData_STATUS) error +} - // OperatorSpec - if rule.OperatorSpec != nil { - var operatorSpec v20231201s.ScheduledQueryRuleOperatorSpec - err := rule.OperatorSpec.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&operatorSpec) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleOperatorSpec() to populate field OperatorSpec") - } - destination.OperatorSpec = &operatorSpec - } else { - destination.OperatorSpec = nil - } +// Storage version of v1api20220615.Condition +// A condition of the scheduled query rule. +type Condition struct { + Dimensions []Dimension `json:"dimensions,omitempty"` + FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` + MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` + MetricName *string `json:"metricName,omitempty"` + Operator *string `json:"operator,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Query *string `json:"query,omitempty"` - // OriginalVersion - destination.OriginalVersion = rule.OriginalVersion - - // OverrideQueryTimeRange - destination.OverrideQueryTimeRange = genruntime.ClonePointerToString(rule.OverrideQueryTimeRange) - - // Owner - if rule.Owner != nil { - owner := rule.Owner.Copy() - destination.Owner = &owner - } else { - destination.Owner = nil - } - - // ResolveConfiguration - if propertyBag.Contains("ResolveConfiguration") { - var resolveConfiguration v20231201s.RuleResolveConfiguration - err := propertyBag.Pull("ResolveConfiguration", &resolveConfiguration) - if err != nil { - return eris.Wrap(err, "pulling 'ResolveConfiguration' from propertyBag") - } - - destination.ResolveConfiguration = &resolveConfiguration - } else { - destination.ResolveConfiguration = nil - } - - // ScopesReferences - if rule.ScopesReferences != nil { - scopesReferenceList := make([]genruntime.ResourceReference, len(rule.ScopesReferences)) - for scopesReferenceIndex, scopesReferenceItem := range rule.ScopesReferences { - // Shadow the loop variable to avoid aliasing - scopesReferenceItem := scopesReferenceItem - scopesReferenceList[scopesReferenceIndex] = scopesReferenceItem.Copy() - } - destination.ScopesReferences = scopesReferenceList - } else { - destination.ScopesReferences = nil - } - - // Severity - destination.Severity = genruntime.ClonePointerToInt(rule.Severity) - - // SkipQueryValidation - if rule.SkipQueryValidation != nil { - skipQueryValidation := *rule.SkipQueryValidation - destination.SkipQueryValidation = &skipQueryValidation - } else { - destination.SkipQueryValidation = nil - } - - // Tags - destination.Tags = genruntime.CloneMapOfStringToString(rule.Tags) - - // TargetResourceTypes - destination.TargetResourceTypes = genruntime.CloneSliceOfString(rule.TargetResourceTypes) - - // WindowSize - destination.WindowSize = genruntime.ClonePointerToString(rule.WindowSize) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForScheduledQueryRule_Spec interface (if implemented) to customize the conversion - var ruleAsAny any = rule - if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_Spec); ok { - err := augmentedRule.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -// Storage version of v1api20220615.ScheduledQueryRule_STATUS -type ScheduledQueryRule_STATUS struct { - Actions *Actions_STATUS `json:"actions,omitempty"` - AutoMitigate *bool `json:"autoMitigate,omitempty"` - CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` - Conditions []conditions.Condition `json:"conditions,omitempty"` - CreatedWithApiVersion *string `json:"createdWithApiVersion,omitempty"` - Criteria *ScheduledQueryRuleCriteria_STATUS `json:"criteria,omitempty"` - Description *string `json:"description,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - Etag *string `json:"etag,omitempty"` - EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` - Id *string `json:"id,omitempty"` - IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty"` - IsWorkspaceAlertsStorageConfigured *bool `json:"isWorkspaceAlertsStorageConfigured,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` - Name *string `json:"name,omitempty"` - OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Scopes []string `json:"scopes,omitempty"` - Severity *int `json:"severity,omitempty"` - SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` - SystemData *SystemData_STATUS `json:"systemData,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` - Type *string `json:"type,omitempty"` - WindowSize *string `json:"windowSize,omitempty"` -} - -var _ genruntime.ConvertibleStatus = &ScheduledQueryRule_STATUS{} - -// ConvertStatusFrom populates our ScheduledQueryRule_STATUS from the provided source -func (rule *ScheduledQueryRule_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - src, ok := source.(*v20231201s.ScheduledQueryRule_STATUS) - if ok { - // Populate our instance from source - return rule.AssignProperties_From_ScheduledQueryRule_STATUS(src) - } - - // Convert to an intermediate form - src = &v20231201s.ScheduledQueryRule_STATUS{} - err := src.ConvertStatusFrom(source) - if err != nil { - return eris.Wrap(err, "initial step of conversion in ConvertStatusFrom()") - } - - // Update our instance from src - err = rule.AssignProperties_From_ScheduledQueryRule_STATUS(src) - if err != nil { - return eris.Wrap(err, "final step of conversion in ConvertStatusFrom()") - } - - return nil -} - -// ConvertStatusTo populates the provided destination from our ScheduledQueryRule_STATUS -func (rule *ScheduledQueryRule_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - dst, ok := destination.(*v20231201s.ScheduledQueryRule_STATUS) - if ok { - // Populate destination from our instance - return rule.AssignProperties_To_ScheduledQueryRule_STATUS(dst) - } - - // Convert to an intermediate form - dst = &v20231201s.ScheduledQueryRule_STATUS{} - err := rule.AssignProperties_To_ScheduledQueryRule_STATUS(dst) - if err != nil { - return eris.Wrap(err, "initial step of conversion in ConvertStatusTo()") - } - - // Update dst from our instance - err = dst.ConvertStatusTo(destination) - if err != nil { - return eris.Wrap(err, "final step of conversion in ConvertStatusTo()") - } - - return nil -} - -// AssignProperties_From_ScheduledQueryRule_STATUS populates our ScheduledQueryRule_STATUS from the provided source ScheduledQueryRule_STATUS -func (rule *ScheduledQueryRule_STATUS) AssignProperties_From_ScheduledQueryRule_STATUS(source *v20231201s.ScheduledQueryRule_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // Actions - if source.Actions != nil { - var action Actions_STATUS - err := action.AssignProperties_From_Actions_STATUS(source.Actions) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_Actions_STATUS() to populate field Actions") - } - rule.Actions = &action - } else { - rule.Actions = nil - } - - // AutoMitigate - if source.AutoMitigate != nil { - autoMitigate := *source.AutoMitigate - rule.AutoMitigate = &autoMitigate - } else { - rule.AutoMitigate = nil - } - - // CheckWorkspaceAlertsStorageConfigured - if source.CheckWorkspaceAlertsStorageConfigured != nil { - checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured - rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured - } else { - rule.CheckWorkspaceAlertsStorageConfigured = nil - } - - // Conditions - rule.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) - - // CreatedWithApiVersion - rule.CreatedWithApiVersion = genruntime.ClonePointerToString(source.CreatedWithApiVersion) - - // Criteria - if source.Criteria != nil { - var criterion ScheduledQueryRuleCriteria_STATUS - err := criterion.AssignProperties_From_ScheduledQueryRuleCriteria_STATUS(source.Criteria) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") - } - rule.Criteria = &criterion - } else { - rule.Criteria = nil - } - - // Description - rule.Description = genruntime.ClonePointerToString(source.Description) - - // DisplayName - rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - rule.Enabled = &enabled - } else { - rule.Enabled = nil - } - - // Etag - rule.Etag = genruntime.ClonePointerToString(source.Etag) - - // EvaluationFrequency - rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) - - // Id - rule.Id = genruntime.ClonePointerToString(source.Id) - - // Identity - if source.Identity != nil { - propertyBag.Add("Identity", *source.Identity) - } else { - propertyBag.Remove("Identity") - } - - // IsLegacyLogAnalyticsRule - if source.IsLegacyLogAnalyticsRule != nil { - isLegacyLogAnalyticsRule := *source.IsLegacyLogAnalyticsRule - rule.IsLegacyLogAnalyticsRule = &isLegacyLogAnalyticsRule - } else { - rule.IsLegacyLogAnalyticsRule = nil - } - - // IsWorkspaceAlertsStorageConfigured - if source.IsWorkspaceAlertsStorageConfigured != nil { - isWorkspaceAlertsStorageConfigured := *source.IsWorkspaceAlertsStorageConfigured - rule.IsWorkspaceAlertsStorageConfigured = &isWorkspaceAlertsStorageConfigured - } else { - rule.IsWorkspaceAlertsStorageConfigured = nil - } - - // Kind - rule.Kind = genruntime.ClonePointerToString(source.Kind) - - // Location - rule.Location = genruntime.ClonePointerToString(source.Location) - - // MuteActionsDuration - rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) - - // Name - rule.Name = genruntime.ClonePointerToString(source.Name) - - // OverrideQueryTimeRange - rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) - - // ResolveConfiguration - if source.ResolveConfiguration != nil { - propertyBag.Add("ResolveConfiguration", *source.ResolveConfiguration) - } else { - propertyBag.Remove("ResolveConfiguration") - } - - // Scopes - rule.Scopes = genruntime.CloneSliceOfString(source.Scopes) - - // Severity - rule.Severity = genruntime.ClonePointerToInt(source.Severity) - - // SkipQueryValidation - if source.SkipQueryValidation != nil { - skipQueryValidation := *source.SkipQueryValidation - rule.SkipQueryValidation = &skipQueryValidation - } else { - rule.SkipQueryValidation = nil - } - - // SystemData - if source.SystemData != nil { - var systemDataSTATUSStash v20221001s.SystemData_STATUS - err := systemDataSTATUSStash.AssignProperties_From_SystemData_STATUS(source.SystemData) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_SystemData_STATUS() to populate field SystemData_STATUSStash from SystemData") - } - var systemDatum SystemData_STATUS - err = systemDatum.AssignProperties_From_SystemData_STATUS(&systemDataSTATUSStash) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_SystemData_STATUS() to populate field SystemData from SystemData_STATUSStash") - } - rule.SystemData = &systemDatum - } else { - rule.SystemData = nil - } - - // Tags - rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) - - // TargetResourceTypes - rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) - - // Type - rule.Type = genruntime.ClonePointerToString(source.Type) - - // WindowSize - rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) - - // Update the property bag - if len(propertyBag) > 0 { - rule.PropertyBag = propertyBag - } else { - rule.PropertyBag = nil - } - - // Invoke the augmentConversionForScheduledQueryRule_STATUS interface (if implemented) to customize the conversion - var ruleAsAny any = rule - if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_STATUS); ok { - err := augmentedRule.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_ScheduledQueryRule_STATUS populates the provided destination ScheduledQueryRule_STATUS from our ScheduledQueryRule_STATUS -func (rule *ScheduledQueryRule_STATUS) AssignProperties_To_ScheduledQueryRule_STATUS(destination *v20231201s.ScheduledQueryRule_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) - - // Actions - if rule.Actions != nil { - var action v20231201s.Actions_STATUS - err := rule.Actions.AssignProperties_To_Actions_STATUS(&action) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_Actions_STATUS() to populate field Actions") - } - destination.Actions = &action - } else { - destination.Actions = nil - } - - // AutoMitigate - if rule.AutoMitigate != nil { - autoMitigate := *rule.AutoMitigate - destination.AutoMitigate = &autoMitigate - } else { - destination.AutoMitigate = nil - } - - // CheckWorkspaceAlertsStorageConfigured - if rule.CheckWorkspaceAlertsStorageConfigured != nil { - checkWorkspaceAlertsStorageConfigured := *rule.CheckWorkspaceAlertsStorageConfigured - destination.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured - } else { - destination.CheckWorkspaceAlertsStorageConfigured = nil - } - - // Conditions - destination.Conditions = genruntime.CloneSliceOfCondition(rule.Conditions) - - // CreatedWithApiVersion - destination.CreatedWithApiVersion = genruntime.ClonePointerToString(rule.CreatedWithApiVersion) - - // Criteria - if rule.Criteria != nil { - var criterion v20231201s.ScheduledQueryRuleCriteria_STATUS - err := rule.Criteria.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&criterion) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") - } - destination.Criteria = &criterion - } else { - destination.Criteria = nil - } - - // Description - destination.Description = genruntime.ClonePointerToString(rule.Description) - - // DisplayName - destination.DisplayName = genruntime.ClonePointerToString(rule.DisplayName) - - // Enabled - if rule.Enabled != nil { - enabled := *rule.Enabled - destination.Enabled = &enabled - } else { - destination.Enabled = nil - } - - // Etag - destination.Etag = genruntime.ClonePointerToString(rule.Etag) - - // EvaluationFrequency - destination.EvaluationFrequency = genruntime.ClonePointerToString(rule.EvaluationFrequency) - - // Id - destination.Id = genruntime.ClonePointerToString(rule.Id) - - // Identity - if propertyBag.Contains("Identity") { - var identity v20231201s.Identity_STATUS - err := propertyBag.Pull("Identity", &identity) - if err != nil { - return eris.Wrap(err, "pulling 'Identity' from propertyBag") - } - - destination.Identity = &identity - } else { - destination.Identity = nil - } - - // IsLegacyLogAnalyticsRule - if rule.IsLegacyLogAnalyticsRule != nil { - isLegacyLogAnalyticsRule := *rule.IsLegacyLogAnalyticsRule - destination.IsLegacyLogAnalyticsRule = &isLegacyLogAnalyticsRule - } else { - destination.IsLegacyLogAnalyticsRule = nil - } - - // IsWorkspaceAlertsStorageConfigured - if rule.IsWorkspaceAlertsStorageConfigured != nil { - isWorkspaceAlertsStorageConfigured := *rule.IsWorkspaceAlertsStorageConfigured - destination.IsWorkspaceAlertsStorageConfigured = &isWorkspaceAlertsStorageConfigured - } else { - destination.IsWorkspaceAlertsStorageConfigured = nil - } - - // Kind - destination.Kind = genruntime.ClonePointerToString(rule.Kind) - - // Location - destination.Location = genruntime.ClonePointerToString(rule.Location) - - // MuteActionsDuration - destination.MuteActionsDuration = genruntime.ClonePointerToString(rule.MuteActionsDuration) - - // Name - destination.Name = genruntime.ClonePointerToString(rule.Name) - - // OverrideQueryTimeRange - destination.OverrideQueryTimeRange = genruntime.ClonePointerToString(rule.OverrideQueryTimeRange) - - // ResolveConfiguration - if propertyBag.Contains("ResolveConfiguration") { - var resolveConfiguration v20231201s.RuleResolveConfiguration_STATUS - err := propertyBag.Pull("ResolveConfiguration", &resolveConfiguration) - if err != nil { - return eris.Wrap(err, "pulling 'ResolveConfiguration' from propertyBag") - } - - destination.ResolveConfiguration = &resolveConfiguration - } else { - destination.ResolveConfiguration = nil - } - - // Scopes - destination.Scopes = genruntime.CloneSliceOfString(rule.Scopes) - - // Severity - destination.Severity = genruntime.ClonePointerToInt(rule.Severity) - - // SkipQueryValidation - if rule.SkipQueryValidation != nil { - skipQueryValidation := *rule.SkipQueryValidation - destination.SkipQueryValidation = &skipQueryValidation - } else { - destination.SkipQueryValidation = nil - } - - // SystemData - if rule.SystemData != nil { - var systemDataSTATUSStash v20221001s.SystemData_STATUS - err := rule.SystemData.AssignProperties_To_SystemData_STATUS(&systemDataSTATUSStash) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_SystemData_STATUS() to populate field SystemData_STATUSStash from SystemData") - } - var systemDatum v20231201s.SystemData_STATUS - err = systemDataSTATUSStash.AssignProperties_To_SystemData_STATUS(&systemDatum) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_SystemData_STATUS() to populate field SystemData from SystemData_STATUSStash") - } - destination.SystemData = &systemDatum - } else { - destination.SystemData = nil - } - - // Tags - destination.Tags = genruntime.CloneMapOfStringToString(rule.Tags) - - // TargetResourceTypes - destination.TargetResourceTypes = genruntime.CloneSliceOfString(rule.TargetResourceTypes) - - // Type - destination.Type = genruntime.ClonePointerToString(rule.Type) - - // WindowSize - destination.WindowSize = genruntime.ClonePointerToString(rule.WindowSize) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForScheduledQueryRule_STATUS interface (if implemented) to customize the conversion - var ruleAsAny any = rule - if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_STATUS); ok { - err := augmentedRule.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -// Storage version of v1api20220615.Actions -// Actions to invoke when the alert fires. -type Actions struct { - ActionGroupsReferences []genruntime.ResourceReference `armReference:"ActionGroups" json:"actionGroupsReferences,omitempty"` - CustomProperties map[string]string `json:"customProperties,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// AssignProperties_From_Actions populates our Actions from the provided source Actions -func (actions *Actions) AssignProperties_From_Actions(source *v20231201s.Actions) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // ActionGroupsReferences - if source.ActionGroupsReferences != nil { - actionGroupsReferenceList := make([]genruntime.ResourceReference, len(source.ActionGroupsReferences)) - for actionGroupsReferenceIndex, actionGroupsReferenceItem := range source.ActionGroupsReferences { - // Shadow the loop variable to avoid aliasing - actionGroupsReferenceItem := actionGroupsReferenceItem - actionGroupsReferenceList[actionGroupsReferenceIndex] = actionGroupsReferenceItem.Copy() - } - actions.ActionGroupsReferences = actionGroupsReferenceList - } else { - actions.ActionGroupsReferences = nil - } - - // ActionProperties - if len(source.ActionProperties) > 0 { - propertyBag.Add("ActionProperties", source.ActionProperties) - } else { - propertyBag.Remove("ActionProperties") - } - - // CustomProperties - actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) - - // Update the property bag - if len(propertyBag) > 0 { - actions.PropertyBag = propertyBag - } else { - actions.PropertyBag = nil - } - - // Invoke the augmentConversionForActions interface (if implemented) to customize the conversion - var actionsAsAny any = actions - if augmentedActions, ok := actionsAsAny.(augmentConversionForActions); ok { - err := augmentedActions.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_Actions populates the provided destination Actions from our Actions -func (actions *Actions) AssignProperties_To_Actions(destination *v20231201s.Actions) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(actions.PropertyBag) - - // ActionGroupsReferences - if actions.ActionGroupsReferences != nil { - actionGroupsReferenceList := make([]genruntime.ResourceReference, len(actions.ActionGroupsReferences)) - for actionGroupsReferenceIndex, actionGroupsReferenceItem := range actions.ActionGroupsReferences { - // Shadow the loop variable to avoid aliasing - actionGroupsReferenceItem := actionGroupsReferenceItem - actionGroupsReferenceList[actionGroupsReferenceIndex] = actionGroupsReferenceItem.Copy() - } - destination.ActionGroupsReferences = actionGroupsReferenceList - } else { - destination.ActionGroupsReferences = nil - } - - // ActionProperties - if propertyBag.Contains("ActionProperties") { - var actionProperty map[string]string - err := propertyBag.Pull("ActionProperties", &actionProperty) - if err != nil { - return eris.Wrap(err, "pulling 'ActionProperties' from propertyBag") - } - - destination.ActionProperties = actionProperty - } else { - destination.ActionProperties = nil - } - - // CustomProperties - destination.CustomProperties = genruntime.CloneMapOfStringToString(actions.CustomProperties) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForActions interface (if implemented) to customize the conversion - var actionsAsAny any = actions - if augmentedActions, ok := actionsAsAny.(augmentConversionForActions); ok { - err := augmentedActions.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -// Storage version of v1api20220615.Actions_STATUS -// Actions to invoke when the alert fires. -type Actions_STATUS struct { - ActionGroups []string `json:"actionGroups,omitempty"` - CustomProperties map[string]string `json:"customProperties,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// AssignProperties_From_Actions_STATUS populates our Actions_STATUS from the provided source Actions_STATUS -func (actions *Actions_STATUS) AssignProperties_From_Actions_STATUS(source *v20231201s.Actions_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // ActionGroups - actions.ActionGroups = genruntime.CloneSliceOfString(source.ActionGroups) - - // ActionProperties - if len(source.ActionProperties) > 0 { - propertyBag.Add("ActionProperties", source.ActionProperties) - } else { - propertyBag.Remove("ActionProperties") - } - - // CustomProperties - actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) - - // Update the property bag - if len(propertyBag) > 0 { - actions.PropertyBag = propertyBag - } else { - actions.PropertyBag = nil - } - - // Invoke the augmentConversionForActions_STATUS interface (if implemented) to customize the conversion - var actionsAsAny any = actions - if augmentedActions, ok := actionsAsAny.(augmentConversionForActions_STATUS); ok { - err := augmentedActions.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_Actions_STATUS populates the provided destination Actions_STATUS from our Actions_STATUS -func (actions *Actions_STATUS) AssignProperties_To_Actions_STATUS(destination *v20231201s.Actions_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(actions.PropertyBag) - - // ActionGroups - destination.ActionGroups = genruntime.CloneSliceOfString(actions.ActionGroups) - - // ActionProperties - if propertyBag.Contains("ActionProperties") { - var actionProperty map[string]string - err := propertyBag.Pull("ActionProperties", &actionProperty) - if err != nil { - return eris.Wrap(err, "pulling 'ActionProperties' from propertyBag") - } - - destination.ActionProperties = actionProperty - } else { - destination.ActionProperties = nil - } - - // CustomProperties - destination.CustomProperties = genruntime.CloneMapOfStringToString(actions.CustomProperties) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForActions_STATUS interface (if implemented) to customize the conversion - var actionsAsAny any = actions - if augmentedActions, ok := actionsAsAny.(augmentConversionForActions_STATUS); ok { - err := augmentedActions.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -type augmentConversionForScheduledQueryRule_Spec interface { - AssignPropertiesFrom(src *v20231201s.ScheduledQueryRule_Spec) error - AssignPropertiesTo(dst *v20231201s.ScheduledQueryRule_Spec) error -} - -type augmentConversionForScheduledQueryRule_STATUS interface { - AssignPropertiesFrom(src *v20231201s.ScheduledQueryRule_STATUS) error - AssignPropertiesTo(dst *v20231201s.ScheduledQueryRule_STATUS) error -} - -// Storage version of v1api20220615.ScheduledQueryRuleCriteria -// The rule criteria that defines the conditions of the scheduled query rule. -type ScheduledQueryRuleCriteria struct { - AllOf []Condition `json:"allOf,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// AssignProperties_From_ScheduledQueryRuleCriteria populates our ScheduledQueryRuleCriteria from the provided source ScheduledQueryRuleCriteria -func (criteria *ScheduledQueryRuleCriteria) AssignProperties_From_ScheduledQueryRuleCriteria(source *v20231201s.ScheduledQueryRuleCriteria) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // AllOf - if source.AllOf != nil { - allOfList := make([]Condition, len(source.AllOf)) - for allOfIndex, allOfItem := range source.AllOf { - // Shadow the loop variable to avoid aliasing - allOfItem := allOfItem - var allOf Condition - err := allOf.AssignProperties_From_Condition(&allOfItem) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_Condition() to populate field AllOf") - } - allOfList[allOfIndex] = allOf - } - criteria.AllOf = allOfList - } else { - criteria.AllOf = nil - } - - // Update the property bag - if len(propertyBag) > 0 { - criteria.PropertyBag = propertyBag - } else { - criteria.PropertyBag = nil - } - - // Invoke the augmentConversionForScheduledQueryRuleCriteria interface (if implemented) to customize the conversion - var criteriaAsAny any = criteria - if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria); ok { - err := augmentedCriteria.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_ScheduledQueryRuleCriteria populates the provided destination ScheduledQueryRuleCriteria from our ScheduledQueryRuleCriteria -func (criteria *ScheduledQueryRuleCriteria) AssignProperties_To_ScheduledQueryRuleCriteria(destination *v20231201s.ScheduledQueryRuleCriteria) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(criteria.PropertyBag) - - // AllOf - if criteria.AllOf != nil { - allOfList := make([]v20231201s.Condition, len(criteria.AllOf)) - for allOfIndex, allOfItem := range criteria.AllOf { - // Shadow the loop variable to avoid aliasing - allOfItem := allOfItem - var allOf v20231201s.Condition - err := allOfItem.AssignProperties_To_Condition(&allOf) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_Condition() to populate field AllOf") - } - allOfList[allOfIndex] = allOf - } - destination.AllOf = allOfList - } else { - destination.AllOf = nil - } - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForScheduledQueryRuleCriteria interface (if implemented) to customize the conversion - var criteriaAsAny any = criteria - if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria); ok { - err := augmentedCriteria.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -// Storage version of v1api20220615.ScheduledQueryRuleCriteria_STATUS -// The rule criteria that defines the conditions of the scheduled query rule. -type ScheduledQueryRuleCriteria_STATUS struct { - AllOf []Condition_STATUS `json:"allOf,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// AssignProperties_From_ScheduledQueryRuleCriteria_STATUS populates our ScheduledQueryRuleCriteria_STATUS from the provided source ScheduledQueryRuleCriteria_STATUS -func (criteria *ScheduledQueryRuleCriteria_STATUS) AssignProperties_From_ScheduledQueryRuleCriteria_STATUS(source *v20231201s.ScheduledQueryRuleCriteria_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // AllOf - if source.AllOf != nil { - allOfList := make([]Condition_STATUS, len(source.AllOf)) - for allOfIndex, allOfItem := range source.AllOf { - // Shadow the loop variable to avoid aliasing - allOfItem := allOfItem - var allOf Condition_STATUS - err := allOf.AssignProperties_From_Condition_STATUS(&allOfItem) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_Condition_STATUS() to populate field AllOf") - } - allOfList[allOfIndex] = allOf - } - criteria.AllOf = allOfList - } else { - criteria.AllOf = nil - } - - // Update the property bag - if len(propertyBag) > 0 { - criteria.PropertyBag = propertyBag - } else { - criteria.PropertyBag = nil - } - - // Invoke the augmentConversionForScheduledQueryRuleCriteria_STATUS interface (if implemented) to customize the conversion - var criteriaAsAny any = criteria - if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria_STATUS); ok { - err := augmentedCriteria.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_ScheduledQueryRuleCriteria_STATUS populates the provided destination ScheduledQueryRuleCriteria_STATUS from our ScheduledQueryRuleCriteria_STATUS -func (criteria *ScheduledQueryRuleCriteria_STATUS) AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(destination *v20231201s.ScheduledQueryRuleCriteria_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(criteria.PropertyBag) - - // AllOf - if criteria.AllOf != nil { - allOfList := make([]v20231201s.Condition_STATUS, len(criteria.AllOf)) - for allOfIndex, allOfItem := range criteria.AllOf { - // Shadow the loop variable to avoid aliasing - allOfItem := allOfItem - var allOf v20231201s.Condition_STATUS - err := allOfItem.AssignProperties_To_Condition_STATUS(&allOf) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_Condition_STATUS() to populate field AllOf") - } - allOfList[allOfIndex] = allOf - } - destination.AllOf = allOfList - } else { - destination.AllOf = nil - } - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForScheduledQueryRuleCriteria_STATUS interface (if implemented) to customize the conversion - var criteriaAsAny any = criteria - if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria_STATUS); ok { - err := augmentedCriteria.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -// Storage version of v1api20220615.ScheduledQueryRuleOperatorSpec -// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure -type ScheduledQueryRuleOperatorSpec struct { - ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - SecretExpressions []*core.DestinationExpression `json:"secretExpressions,omitempty"` -} - -// AssignProperties_From_ScheduledQueryRuleOperatorSpec populates our ScheduledQueryRuleOperatorSpec from the provided source ScheduledQueryRuleOperatorSpec -func (operator *ScheduledQueryRuleOperatorSpec) AssignProperties_From_ScheduledQueryRuleOperatorSpec(source *v20231201s.ScheduledQueryRuleOperatorSpec) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // ConfigMapExpressions - if source.ConfigMapExpressions != nil { - configMapExpressionList := make([]*core.DestinationExpression, len(source.ConfigMapExpressions)) - for configMapExpressionIndex, configMapExpressionItem := range source.ConfigMapExpressions { - // Shadow the loop variable to avoid aliasing - configMapExpressionItem := configMapExpressionItem - if configMapExpressionItem != nil { - configMapExpression := *configMapExpressionItem.DeepCopy() - configMapExpressionList[configMapExpressionIndex] = &configMapExpression - } else { - configMapExpressionList[configMapExpressionIndex] = nil - } - } - operator.ConfigMapExpressions = configMapExpressionList - } else { - operator.ConfigMapExpressions = nil - } - - // SecretExpressions - if source.SecretExpressions != nil { - secretExpressionList := make([]*core.DestinationExpression, len(source.SecretExpressions)) - for secretExpressionIndex, secretExpressionItem := range source.SecretExpressions { - // Shadow the loop variable to avoid aliasing - secretExpressionItem := secretExpressionItem - if secretExpressionItem != nil { - secretExpression := *secretExpressionItem.DeepCopy() - secretExpressionList[secretExpressionIndex] = &secretExpression - } else { - secretExpressionList[secretExpressionIndex] = nil - } - } - operator.SecretExpressions = secretExpressionList - } else { - operator.SecretExpressions = nil - } - - // Update the property bag - if len(propertyBag) > 0 { - operator.PropertyBag = propertyBag - } else { - operator.PropertyBag = nil - } - - // Invoke the augmentConversionForScheduledQueryRuleOperatorSpec interface (if implemented) to customize the conversion - var operatorAsAny any = operator - if augmentedOperator, ok := operatorAsAny.(augmentConversionForScheduledQueryRuleOperatorSpec); ok { - err := augmentedOperator.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_ScheduledQueryRuleOperatorSpec populates the provided destination ScheduledQueryRuleOperatorSpec from our ScheduledQueryRuleOperatorSpec -func (operator *ScheduledQueryRuleOperatorSpec) AssignProperties_To_ScheduledQueryRuleOperatorSpec(destination *v20231201s.ScheduledQueryRuleOperatorSpec) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(operator.PropertyBag) - - // ConfigMapExpressions - if operator.ConfigMapExpressions != nil { - configMapExpressionList := make([]*core.DestinationExpression, len(operator.ConfigMapExpressions)) - for configMapExpressionIndex, configMapExpressionItem := range operator.ConfigMapExpressions { - // Shadow the loop variable to avoid aliasing - configMapExpressionItem := configMapExpressionItem - if configMapExpressionItem != nil { - configMapExpression := *configMapExpressionItem.DeepCopy() - configMapExpressionList[configMapExpressionIndex] = &configMapExpression - } else { - configMapExpressionList[configMapExpressionIndex] = nil - } - } - destination.ConfigMapExpressions = configMapExpressionList - } else { - destination.ConfigMapExpressions = nil - } - - // SecretExpressions - if operator.SecretExpressions != nil { - secretExpressionList := make([]*core.DestinationExpression, len(operator.SecretExpressions)) - for secretExpressionIndex, secretExpressionItem := range operator.SecretExpressions { - // Shadow the loop variable to avoid aliasing - secretExpressionItem := secretExpressionItem - if secretExpressionItem != nil { - secretExpression := *secretExpressionItem.DeepCopy() - secretExpressionList[secretExpressionIndex] = &secretExpression - } else { - secretExpressionList[secretExpressionIndex] = nil - } - } - destination.SecretExpressions = secretExpressionList - } else { - destination.SecretExpressions = nil - } - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForScheduledQueryRuleOperatorSpec interface (if implemented) to customize the conversion - var operatorAsAny any = operator - if augmentedOperator, ok := operatorAsAny.(augmentConversionForScheduledQueryRuleOperatorSpec); ok { - err := augmentedOperator.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -// Storage version of v1api20220615.SystemData_STATUS -// Metadata pertaining to creation and last modification of the resource. -type SystemData_STATUS struct { - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - CreatedByType *string `json:"createdByType,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - LastModifiedByType *string `json:"lastModifiedByType,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// AssignProperties_From_SystemData_STATUS populates our SystemData_STATUS from the provided source SystemData_STATUS -func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v20221001s.SystemData_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // CreatedAt - data.CreatedAt = genruntime.ClonePointerToString(source.CreatedAt) - - // CreatedBy - data.CreatedBy = genruntime.ClonePointerToString(source.CreatedBy) - - // CreatedByType - data.CreatedByType = genruntime.ClonePointerToString(source.CreatedByType) - - // LastModifiedAt - data.LastModifiedAt = genruntime.ClonePointerToString(source.LastModifiedAt) - - // LastModifiedBy - data.LastModifiedBy = genruntime.ClonePointerToString(source.LastModifiedBy) - - // LastModifiedByType - data.LastModifiedByType = genruntime.ClonePointerToString(source.LastModifiedByType) - - // Update the property bag - if len(propertyBag) > 0 { - data.PropertyBag = propertyBag - } else { - data.PropertyBag = nil - } - - // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion - var dataAsAny any = data - if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { - err := augmentedData.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_SystemData_STATUS populates the provided destination SystemData_STATUS from our SystemData_STATUS -func (data *SystemData_STATUS) AssignProperties_To_SystemData_STATUS(destination *v20221001s.SystemData_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(data.PropertyBag) - - // CreatedAt - destination.CreatedAt = genruntime.ClonePointerToString(data.CreatedAt) - - // CreatedBy - destination.CreatedBy = genruntime.ClonePointerToString(data.CreatedBy) - - // CreatedByType - destination.CreatedByType = genruntime.ClonePointerToString(data.CreatedByType) - - // LastModifiedAt - destination.LastModifiedAt = genruntime.ClonePointerToString(data.LastModifiedAt) - - // LastModifiedBy - destination.LastModifiedBy = genruntime.ClonePointerToString(data.LastModifiedBy) - - // LastModifiedByType - destination.LastModifiedByType = genruntime.ClonePointerToString(data.LastModifiedByType) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion - var dataAsAny any = data - if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { - err := augmentedData.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -type augmentConversionForActions interface { - AssignPropertiesFrom(src *v20231201s.Actions) error - AssignPropertiesTo(dst *v20231201s.Actions) error -} - -type augmentConversionForActions_STATUS interface { - AssignPropertiesFrom(src *v20231201s.Actions_STATUS) error - AssignPropertiesTo(dst *v20231201s.Actions_STATUS) error -} - -type augmentConversionForScheduledQueryRuleCriteria interface { - AssignPropertiesFrom(src *v20231201s.ScheduledQueryRuleCriteria) error - AssignPropertiesTo(dst *v20231201s.ScheduledQueryRuleCriteria) error -} - -type augmentConversionForScheduledQueryRuleCriteria_STATUS interface { - AssignPropertiesFrom(src *v20231201s.ScheduledQueryRuleCriteria_STATUS) error - AssignPropertiesTo(dst *v20231201s.ScheduledQueryRuleCriteria_STATUS) error -} - -type augmentConversionForScheduledQueryRuleOperatorSpec interface { - AssignPropertiesFrom(src *v20231201s.ScheduledQueryRuleOperatorSpec) error - AssignPropertiesTo(dst *v20231201s.ScheduledQueryRuleOperatorSpec) error -} - -type augmentConversionForSystemData_STATUS interface { - AssignPropertiesFrom(src *v20221001s.SystemData_STATUS) error - AssignPropertiesTo(dst *v20221001s.SystemData_STATUS) error -} - -// Storage version of v1api20220615.Condition -// A condition of the scheduled query rule. -type Condition struct { - Dimensions []Dimension `json:"dimensions,omitempty"` - FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` - MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` - MetricName *string `json:"metricName,omitempty"` - Operator *string `json:"operator,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Query *string `json:"query,omitempty"` - - // ResourceIdColumnReference: The column containing the resource id. The content of the column must be a uri formatted as - // resource id. Relevant only for rules of the kind LogAlert. - ResourceIdColumnReference *genruntime.ResourceReference `armReference:"ResourceIdColumn" json:"resourceIdColumnReference,omitempty"` - Threshold *float64 `json:"threshold,omitempty"` - TimeAggregation *string `json:"timeAggregation,omitempty"` -} - -// AssignProperties_From_Condition populates our Condition from the provided source Condition -func (condition *Condition) AssignProperties_From_Condition(source *v20231201s.Condition) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // Dimensions - if source.Dimensions != nil { - dimensionList := make([]Dimension, len(source.Dimensions)) - for dimensionIndex, dimensionItem := range source.Dimensions { - // Shadow the loop variable to avoid aliasing - dimensionItem := dimensionItem - var dimension Dimension - err := dimension.AssignProperties_From_Dimension(&dimensionItem) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_Dimension() to populate field Dimensions") - } - dimensionList[dimensionIndex] = dimension - } - condition.Dimensions = dimensionList - } else { - condition.Dimensions = nil - } - - // FailingPeriods - if source.FailingPeriods != nil { - var failingPeriod Condition_FailingPeriods - err := failingPeriod.AssignProperties_From_Condition_FailingPeriods(source.FailingPeriods) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_Condition_FailingPeriods() to populate field FailingPeriods") - } - condition.FailingPeriods = &failingPeriod - } else { - condition.FailingPeriods = nil - } - - // MetricMeasureColumn - condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) - - // MetricName - condition.MetricName = genruntime.ClonePointerToString(source.MetricName) - - // Operator - condition.Operator = genruntime.ClonePointerToString(source.Operator) - - // Query - condition.Query = genruntime.ClonePointerToString(source.Query) - - // ResourceIdColumnReference - if source.ResourceIdColumnReference != nil { - resourceIdColumnReference := source.ResourceIdColumnReference.Copy() - condition.ResourceIdColumnReference = &resourceIdColumnReference - } else { - condition.ResourceIdColumnReference = nil - } - - // Threshold - if source.Threshold != nil { - threshold := *source.Threshold - condition.Threshold = &threshold - } else { - condition.Threshold = nil - } - - // TimeAggregation - condition.TimeAggregation = genruntime.ClonePointerToString(source.TimeAggregation) - - // Update the property bag - if len(propertyBag) > 0 { - condition.PropertyBag = propertyBag - } else { - condition.PropertyBag = nil - } - - // Invoke the augmentConversionForCondition interface (if implemented) to customize the conversion - var conditionAsAny any = condition - if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition); ok { - err := augmentedCondition.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_Condition populates the provided destination Condition from our Condition -func (condition *Condition) AssignProperties_To_Condition(destination *v20231201s.Condition) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(condition.PropertyBag) - - // Dimensions - if condition.Dimensions != nil { - dimensionList := make([]v20231201s.Dimension, len(condition.Dimensions)) - for dimensionIndex, dimensionItem := range condition.Dimensions { - // Shadow the loop variable to avoid aliasing - dimensionItem := dimensionItem - var dimension v20231201s.Dimension - err := dimensionItem.AssignProperties_To_Dimension(&dimension) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_Dimension() to populate field Dimensions") - } - dimensionList[dimensionIndex] = dimension - } - destination.Dimensions = dimensionList - } else { - destination.Dimensions = nil - } - - // FailingPeriods - if condition.FailingPeriods != nil { - var failingPeriod v20231201s.Condition_FailingPeriods - err := condition.FailingPeriods.AssignProperties_To_Condition_FailingPeriods(&failingPeriod) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_Condition_FailingPeriods() to populate field FailingPeriods") - } - destination.FailingPeriods = &failingPeriod - } else { - destination.FailingPeriods = nil - } - - // MetricMeasureColumn - destination.MetricMeasureColumn = genruntime.ClonePointerToString(condition.MetricMeasureColumn) - - // MetricName - destination.MetricName = genruntime.ClonePointerToString(condition.MetricName) - - // Operator - destination.Operator = genruntime.ClonePointerToString(condition.Operator) - - // Query - destination.Query = genruntime.ClonePointerToString(condition.Query) - - // ResourceIdColumnReference - if condition.ResourceIdColumnReference != nil { - resourceIdColumnReference := condition.ResourceIdColumnReference.Copy() - destination.ResourceIdColumnReference = &resourceIdColumnReference - } else { - destination.ResourceIdColumnReference = nil - } - - // Threshold - if condition.Threshold != nil { - threshold := *condition.Threshold - destination.Threshold = &threshold - } else { - destination.Threshold = nil - } - - // TimeAggregation - destination.TimeAggregation = genruntime.ClonePointerToString(condition.TimeAggregation) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForCondition interface (if implemented) to customize the conversion - var conditionAsAny any = condition - if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition); ok { - err := augmentedCondition.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil + // ResourceIdColumnReference: The column containing the resource id. The content of the column must be a uri formatted as + // resource id. Relevant only for rules of the kind LogAlert. + ResourceIdColumnReference *genruntime.ResourceReference `armReference:"ResourceIdColumn" json:"resourceIdColumnReference,omitempty"` + Threshold *float64 `json:"threshold,omitempty"` + TimeAggregation *string `json:"timeAggregation,omitempty"` } // Storage version of v1api20220615.Condition_STATUS @@ -2013,178 +453,6 @@ type Condition_STATUS struct { TimeAggregation *string `json:"timeAggregation,omitempty"` } -// AssignProperties_From_Condition_STATUS populates our Condition_STATUS from the provided source Condition_STATUS -func (condition *Condition_STATUS) AssignProperties_From_Condition_STATUS(source *v20231201s.Condition_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // Dimensions - if source.Dimensions != nil { - dimensionList := make([]Dimension_STATUS, len(source.Dimensions)) - for dimensionIndex, dimensionItem := range source.Dimensions { - // Shadow the loop variable to avoid aliasing - dimensionItem := dimensionItem - var dimension Dimension_STATUS - err := dimension.AssignProperties_From_Dimension_STATUS(&dimensionItem) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_Dimension_STATUS() to populate field Dimensions") - } - dimensionList[dimensionIndex] = dimension - } - condition.Dimensions = dimensionList - } else { - condition.Dimensions = nil - } - - // FailingPeriods - if source.FailingPeriods != nil { - var failingPeriod Condition_FailingPeriods_STATUS - err := failingPeriod.AssignProperties_From_Condition_FailingPeriods_STATUS(source.FailingPeriods) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_From_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") - } - condition.FailingPeriods = &failingPeriod - } else { - condition.FailingPeriods = nil - } - - // MetricMeasureColumn - condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) - - // MetricName - condition.MetricName = genruntime.ClonePointerToString(source.MetricName) - - // Operator - condition.Operator = genruntime.ClonePointerToString(source.Operator) - - // Query - condition.Query = genruntime.ClonePointerToString(source.Query) - - // ResourceIdColumn - condition.ResourceIdColumn = genruntime.ClonePointerToString(source.ResourceIdColumn) - - // Threshold - if source.Threshold != nil { - threshold := *source.Threshold - condition.Threshold = &threshold - } else { - condition.Threshold = nil - } - - // TimeAggregation - condition.TimeAggregation = genruntime.ClonePointerToString(source.TimeAggregation) - - // Update the property bag - if len(propertyBag) > 0 { - condition.PropertyBag = propertyBag - } else { - condition.PropertyBag = nil - } - - // Invoke the augmentConversionForCondition_STATUS interface (if implemented) to customize the conversion - var conditionAsAny any = condition - if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition_STATUS); ok { - err := augmentedCondition.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_Condition_STATUS populates the provided destination Condition_STATUS from our Condition_STATUS -func (condition *Condition_STATUS) AssignProperties_To_Condition_STATUS(destination *v20231201s.Condition_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(condition.PropertyBag) - - // Dimensions - if condition.Dimensions != nil { - dimensionList := make([]v20231201s.Dimension_STATUS, len(condition.Dimensions)) - for dimensionIndex, dimensionItem := range condition.Dimensions { - // Shadow the loop variable to avoid aliasing - dimensionItem := dimensionItem - var dimension v20231201s.Dimension_STATUS - err := dimensionItem.AssignProperties_To_Dimension_STATUS(&dimension) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_Dimension_STATUS() to populate field Dimensions") - } - dimensionList[dimensionIndex] = dimension - } - destination.Dimensions = dimensionList - } else { - destination.Dimensions = nil - } - - // FailingPeriods - if condition.FailingPeriods != nil { - var failingPeriod v20231201s.Condition_FailingPeriods_STATUS - err := condition.FailingPeriods.AssignProperties_To_Condition_FailingPeriods_STATUS(&failingPeriod) - if err != nil { - return eris.Wrap(err, "calling AssignProperties_To_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") - } - destination.FailingPeriods = &failingPeriod - } else { - destination.FailingPeriods = nil - } - - // MetricMeasureColumn - destination.MetricMeasureColumn = genruntime.ClonePointerToString(condition.MetricMeasureColumn) - - // MetricName - destination.MetricName = genruntime.ClonePointerToString(condition.MetricName) - - // Operator - destination.Operator = genruntime.ClonePointerToString(condition.Operator) - - // Query - destination.Query = genruntime.ClonePointerToString(condition.Query) - - // ResourceIdColumn - destination.ResourceIdColumn = genruntime.ClonePointerToString(condition.ResourceIdColumn) - - // Threshold - if condition.Threshold != nil { - threshold := *condition.Threshold - destination.Threshold = &threshold - } else { - destination.Threshold = nil - } - - // TimeAggregation - destination.TimeAggregation = genruntime.ClonePointerToString(condition.TimeAggregation) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForCondition_STATUS interface (if implemented) to customize the conversion - var conditionAsAny any = condition - if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition_STATUS); ok { - err := augmentedCondition.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -type augmentConversionForCondition interface { - AssignPropertiesFrom(src *v20231201s.Condition) error - AssignPropertiesTo(dst *v20231201s.Condition) error -} - -type augmentConversionForCondition_STATUS interface { - AssignPropertiesFrom(src *v20231201s.Condition_STATUS) error - AssignPropertiesTo(dst *v20231201s.Condition_STATUS) error -} - // Storage version of v1api20220615.Condition_FailingPeriods type Condition_FailingPeriods struct { MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` @@ -2192,68 +460,6 @@ type Condition_FailingPeriods struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } -// AssignProperties_From_Condition_FailingPeriods populates our Condition_FailingPeriods from the provided source Condition_FailingPeriods -func (periods *Condition_FailingPeriods) AssignProperties_From_Condition_FailingPeriods(source *v20231201s.Condition_FailingPeriods) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // MinFailingPeriodsToAlert - periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) - - // NumberOfEvaluationPeriods - periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) - - // Update the property bag - if len(propertyBag) > 0 { - periods.PropertyBag = propertyBag - } else { - periods.PropertyBag = nil - } - - // Invoke the augmentConversionForCondition_FailingPeriods interface (if implemented) to customize the conversion - var periodsAsAny any = periods - if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods); ok { - err := augmentedPeriods.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_Condition_FailingPeriods populates the provided destination Condition_FailingPeriods from our Condition_FailingPeriods -func (periods *Condition_FailingPeriods) AssignProperties_To_Condition_FailingPeriods(destination *v20231201s.Condition_FailingPeriods) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(periods.PropertyBag) - - // MinFailingPeriodsToAlert - destination.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(periods.MinFailingPeriodsToAlert) - - // NumberOfEvaluationPeriods - destination.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(periods.NumberOfEvaluationPeriods) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForCondition_FailingPeriods interface (if implemented) to customize the conversion - var periodsAsAny any = periods - if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods); ok { - err := augmentedPeriods.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - // Storage version of v1api20220615.Condition_FailingPeriods_STATUS type Condition_FailingPeriods_STATUS struct { MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` @@ -2261,68 +467,6 @@ type Condition_FailingPeriods_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } -// AssignProperties_From_Condition_FailingPeriods_STATUS populates our Condition_FailingPeriods_STATUS from the provided source Condition_FailingPeriods_STATUS -func (periods *Condition_FailingPeriods_STATUS) AssignProperties_From_Condition_FailingPeriods_STATUS(source *v20231201s.Condition_FailingPeriods_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // MinFailingPeriodsToAlert - periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) - - // NumberOfEvaluationPeriods - periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) - - // Update the property bag - if len(propertyBag) > 0 { - periods.PropertyBag = propertyBag - } else { - periods.PropertyBag = nil - } - - // Invoke the augmentConversionForCondition_FailingPeriods_STATUS interface (if implemented) to customize the conversion - var periodsAsAny any = periods - if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods_STATUS); ok { - err := augmentedPeriods.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_Condition_FailingPeriods_STATUS populates the provided destination Condition_FailingPeriods_STATUS from our Condition_FailingPeriods_STATUS -func (periods *Condition_FailingPeriods_STATUS) AssignProperties_To_Condition_FailingPeriods_STATUS(destination *v20231201s.Condition_FailingPeriods_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(periods.PropertyBag) - - // MinFailingPeriodsToAlert - destination.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(periods.MinFailingPeriodsToAlert) - - // NumberOfEvaluationPeriods - destination.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(periods.NumberOfEvaluationPeriods) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForCondition_FailingPeriods_STATUS interface (if implemented) to customize the conversion - var periodsAsAny any = periods - if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods_STATUS); ok { - err := augmentedPeriods.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - // Storage version of v1api20220615.Dimension // Dimension splitting and filtering definition type Dimension struct { @@ -2332,74 +476,6 @@ type Dimension struct { Values []string `json:"values,omitempty"` } -// AssignProperties_From_Dimension populates our Dimension from the provided source Dimension -func (dimension *Dimension) AssignProperties_From_Dimension(source *v20231201s.Dimension) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // Name - dimension.Name = genruntime.ClonePointerToString(source.Name) - - // Operator - dimension.Operator = genruntime.ClonePointerToString(source.Operator) - - // Values - dimension.Values = genruntime.CloneSliceOfString(source.Values) - - // Update the property bag - if len(propertyBag) > 0 { - dimension.PropertyBag = propertyBag - } else { - dimension.PropertyBag = nil - } - - // Invoke the augmentConversionForDimension interface (if implemented) to customize the conversion - var dimensionAsAny any = dimension - if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension); ok { - err := augmentedDimension.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_Dimension populates the provided destination Dimension from our Dimension -func (dimension *Dimension) AssignProperties_To_Dimension(destination *v20231201s.Dimension) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(dimension.PropertyBag) - - // Name - destination.Name = genruntime.ClonePointerToString(dimension.Name) - - // Operator - destination.Operator = genruntime.ClonePointerToString(dimension.Operator) - - // Values - destination.Values = genruntime.CloneSliceOfString(dimension.Values) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForDimension interface (if implemented) to customize the conversion - var dimensionAsAny any = dimension - if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension); ok { - err := augmentedDimension.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - // Storage version of v1api20220615.Dimension_STATUS // Dimension splitting and filtering definition type Dimension_STATUS struct { @@ -2409,94 +485,6 @@ type Dimension_STATUS struct { Values []string `json:"values,omitempty"` } -// AssignProperties_From_Dimension_STATUS populates our Dimension_STATUS from the provided source Dimension_STATUS -func (dimension *Dimension_STATUS) AssignProperties_From_Dimension_STATUS(source *v20231201s.Dimension_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // Name - dimension.Name = genruntime.ClonePointerToString(source.Name) - - // Operator - dimension.Operator = genruntime.ClonePointerToString(source.Operator) - - // Values - dimension.Values = genruntime.CloneSliceOfString(source.Values) - - // Update the property bag - if len(propertyBag) > 0 { - dimension.PropertyBag = propertyBag - } else { - dimension.PropertyBag = nil - } - - // Invoke the augmentConversionForDimension_STATUS interface (if implemented) to customize the conversion - var dimensionAsAny any = dimension - if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension_STATUS); ok { - err := augmentedDimension.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_Dimension_STATUS populates the provided destination Dimension_STATUS from our Dimension_STATUS -func (dimension *Dimension_STATUS) AssignProperties_To_Dimension_STATUS(destination *v20231201s.Dimension_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(dimension.PropertyBag) - - // Name - destination.Name = genruntime.ClonePointerToString(dimension.Name) - - // Operator - destination.Operator = genruntime.ClonePointerToString(dimension.Operator) - - // Values - destination.Values = genruntime.CloneSliceOfString(dimension.Values) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForDimension_STATUS interface (if implemented) to customize the conversion - var dimensionAsAny any = dimension - if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension_STATUS); ok { - err := augmentedDimension.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -type augmentConversionForCondition_FailingPeriods interface { - AssignPropertiesFrom(src *v20231201s.Condition_FailingPeriods) error - AssignPropertiesTo(dst *v20231201s.Condition_FailingPeriods) error -} - -type augmentConversionForCondition_FailingPeriods_STATUS interface { - AssignPropertiesFrom(src *v20231201s.Condition_FailingPeriods_STATUS) error - AssignPropertiesTo(dst *v20231201s.Condition_FailingPeriods_STATUS) error -} - -type augmentConversionForDimension interface { - AssignPropertiesFrom(src *v20231201s.Dimension) error - AssignPropertiesTo(dst *v20231201s.Dimension) error -} - -type augmentConversionForDimension_STATUS interface { - AssignPropertiesFrom(src *v20231201s.Dimension_STATUS) error - AssignPropertiesTo(dst *v20231201s.Dimension_STATUS) error -} - func init() { SchemeBuilder.Register(&ScheduledQueryRule{}, &ScheduledQueryRuleList{}) } diff --git a/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen_test.go b/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen_test.go index b082f013133..670951eee9d 100644 --- a/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen_test.go +++ b/v2/api/insights/v1api20220615/storage/scheduled_query_rule_types_gen_test.go @@ -5,8 +5,7 @@ package storage import ( "encoding/json" - v20221001s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" - v20231201s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" + storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -19,48 +18,6 @@ import ( "testing" ) -func Test_Actions_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from Actions to Actions via AssignProperties_To_Actions & AssignProperties_From_Actions returns original", - prop.ForAll(RunPropertyAssignmentTestForActions, ActionsGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForActions tests if a specific instance of Actions can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForActions(subject Actions) string { - // Copy subject to make sure assignment doesn't modify it - copied := subject.DeepCopy() - - // Use AssignPropertiesTo() for the first stage of conversion - var other v20231201s.Actions - err := copied.AssignProperties_To_Actions(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual Actions - err = actual.AssignProperties_From_Actions(&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_Actions_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -123,48 +80,6 @@ func AddIndependentPropertyGeneratorsForActions(gens map[string]gopter.Gen) { gen.AlphaString()) } -func Test_Actions_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from Actions_STATUS to Actions_STATUS via AssignProperties_To_Actions_STATUS & AssignProperties_From_Actions_STATUS returns original", - prop.ForAll(RunPropertyAssignmentTestForActions_STATUS, Actions_STATUSGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForActions_STATUS tests if a specific instance of Actions_STATUS can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForActions_STATUS(subject Actions_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 v20231201s.Actions_STATUS - err := copied.AssignProperties_To_Actions_STATUS(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual Actions_STATUS - err = actual.AssignProperties_From_Actions_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_Actions_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -228,48 +143,6 @@ func AddIndependentPropertyGeneratorsForActions_STATUS(gens map[string]gopter.Ge gen.AlphaString()) } -func Test_Condition_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from Condition to Condition via AssignProperties_To_Condition & AssignProperties_From_Condition returns original", - prop.ForAll(RunPropertyAssignmentTestForCondition, ConditionGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForCondition tests if a specific instance of Condition can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForCondition(subject Condition) string { - // Copy subject to make sure assignment doesn't modify it - copied := subject.DeepCopy() - - // Use AssignPropertiesTo() for the first stage of conversion - var other v20231201s.Condition - err := copied.AssignProperties_To_Condition(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual Condition - err = actual.AssignProperties_From_Condition(&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_Condition_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -350,48 +223,6 @@ func AddRelatedPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriodsGenerator()) } -func Test_Condition_FailingPeriods_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from Condition_FailingPeriods to Condition_FailingPeriods via AssignProperties_To_Condition_FailingPeriods & AssignProperties_From_Condition_FailingPeriods returns original", - prop.ForAll(RunPropertyAssignmentTestForCondition_FailingPeriods, Condition_FailingPeriodsGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForCondition_FailingPeriods tests if a specific instance of Condition_FailingPeriods can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForCondition_FailingPeriods(subject Condition_FailingPeriods) string { - // Copy subject to make sure assignment doesn't modify it - copied := subject.DeepCopy() - - // Use AssignPropertiesTo() for the first stage of conversion - var other v20231201s.Condition_FailingPeriods - err := copied.AssignProperties_To_Condition_FailingPeriods(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual Condition_FailingPeriods - err = actual.AssignProperties_From_Condition_FailingPeriods(&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_Condition_FailingPeriods_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -454,48 +285,6 @@ func AddIndependentPropertyGeneratorsForCondition_FailingPeriods(gens map[string gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) } -func Test_Condition_FailingPeriods_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from Condition_FailingPeriods_STATUS to Condition_FailingPeriods_STATUS via AssignProperties_To_Condition_FailingPeriods_STATUS & AssignProperties_From_Condition_FailingPeriods_STATUS returns original", - prop.ForAll(RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS, Condition_FailingPeriods_STATUSGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS tests if a specific instance of Condition_FailingPeriods_STATUS can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS(subject Condition_FailingPeriods_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 v20231201s.Condition_FailingPeriods_STATUS - err := copied.AssignProperties_To_Condition_FailingPeriods_STATUS(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual Condition_FailingPeriods_STATUS - err = actual.AssignProperties_From_Condition_FailingPeriods_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_Condition_FailingPeriods_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -558,48 +347,6 @@ func AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS(gens map gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) } -func Test_Condition_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from Condition_STATUS to Condition_STATUS via AssignProperties_To_Condition_STATUS & AssignProperties_From_Condition_STATUS returns original", - prop.ForAll(RunPropertyAssignmentTestForCondition_STATUS, Condition_STATUSGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForCondition_STATUS tests if a specific instance of Condition_STATUS can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForCondition_STATUS(subject Condition_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 v20231201s.Condition_STATUS - err := copied.AssignProperties_To_Condition_STATUS(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual Condition_STATUS - err = actual.AssignProperties_From_Condition_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_Condition_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -681,48 +428,6 @@ func AddRelatedPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriods_STATUSGenerator()) } -func Test_Dimension_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from Dimension to Dimension via AssignProperties_To_Dimension & AssignProperties_From_Dimension returns original", - prop.ForAll(RunPropertyAssignmentTestForDimension, DimensionGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForDimension tests if a specific instance of Dimension can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForDimension(subject Dimension) string { - // Copy subject to make sure assignment doesn't modify it - copied := subject.DeepCopy() - - // Use AssignPropertiesTo() for the first stage of conversion - var other v20231201s.Dimension - err := copied.AssignProperties_To_Dimension(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual Dimension - err = actual.AssignProperties_From_Dimension(&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_Dimension_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -785,48 +490,6 @@ func AddIndependentPropertyGeneratorsForDimension(gens map[string]gopter.Gen) { gens["Values"] = gen.SliceOf(gen.AlphaString()) } -func Test_Dimension_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from Dimension_STATUS to Dimension_STATUS via AssignProperties_To_Dimension_STATUS & AssignProperties_From_Dimension_STATUS returns original", - prop.ForAll(RunPropertyAssignmentTestForDimension_STATUS, Dimension_STATUSGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForDimension_STATUS tests if a specific instance of Dimension_STATUS can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForDimension_STATUS(subject Dimension_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 v20231201s.Dimension_STATUS - err := copied.AssignProperties_To_Dimension_STATUS(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual Dimension_STATUS - err = actual.AssignProperties_From_Dimension_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_Dimension_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -889,91 +552,6 @@ func AddIndependentPropertyGeneratorsForDimension_STATUS(gens map[string]gopter. gens["Values"] = gen.SliceOf(gen.AlphaString()) } -func Test_ScheduledQueryRule_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 ScheduledQueryRule to hub returns original", - prop.ForAll(RunResourceConversionTestForScheduledQueryRule, ScheduledQueryRuleGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunResourceConversionTestForScheduledQueryRule tests if a specific instance of ScheduledQueryRule round trips to the hub storage version and back losslessly -func RunResourceConversionTestForScheduledQueryRule(subject ScheduledQueryRule) string { - // Copy subject to make sure conversion doesn't modify it - copied := subject.DeepCopy() - - // Convert to our hub version - var hub v20231201s.ScheduledQueryRule - err := copied.ConvertTo(&hub) - if err != nil { - return err.Error() - } - - // Convert from our hub version - var actual ScheduledQueryRule - 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_ScheduledQueryRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from ScheduledQueryRule to ScheduledQueryRule via AssignProperties_To_ScheduledQueryRule & AssignProperties_From_ScheduledQueryRule returns original", - prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule, ScheduledQueryRuleGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForScheduledQueryRule tests if a specific instance of ScheduledQueryRule can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForScheduledQueryRule(subject ScheduledQueryRule) string { - // Copy subject to make sure assignment doesn't modify it - copied := subject.DeepCopy() - - // Use AssignPropertiesTo() for the first stage of conversion - var other v20231201s.ScheduledQueryRule - err := copied.AssignProperties_To_ScheduledQueryRule(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual ScheduledQueryRule - err = actual.AssignProperties_From_ScheduledQueryRule(&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_ScheduledQueryRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1035,48 +613,6 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRule(gens map[string]gopter.Ge gens["Status"] = ScheduledQueryRule_STATUSGenerator() } -func Test_ScheduledQueryRuleCriteria_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from ScheduledQueryRuleCriteria to ScheduledQueryRuleCriteria via AssignProperties_To_ScheduledQueryRuleCriteria & AssignProperties_From_ScheduledQueryRuleCriteria returns original", - prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleCriteria, ScheduledQueryRuleCriteriaGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForScheduledQueryRuleCriteria tests if a specific instance of ScheduledQueryRuleCriteria can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForScheduledQueryRuleCriteria(subject ScheduledQueryRuleCriteria) string { - // Copy subject to make sure assignment doesn't modify it - copied := subject.DeepCopy() - - // Use AssignPropertiesTo() for the first stage of conversion - var other v20231201s.ScheduledQueryRuleCriteria - err := copied.AssignProperties_To_ScheduledQueryRuleCriteria(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual ScheduledQueryRuleCriteria - err = actual.AssignProperties_From_ScheduledQueryRuleCriteria(&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_ScheduledQueryRuleCriteria_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1138,48 +674,6 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria(gens map[string]g gens["AllOf"] = gen.SliceOf(ConditionGenerator()) } -func Test_ScheduledQueryRuleCriteria_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from ScheduledQueryRuleCriteria_STATUS to ScheduledQueryRuleCriteria_STATUS via AssignProperties_To_ScheduledQueryRuleCriteria_STATUS & AssignProperties_From_ScheduledQueryRuleCriteria_STATUS returns original", - prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS, ScheduledQueryRuleCriteria_STATUSGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS tests if a specific instance of ScheduledQueryRuleCriteria_STATUS can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS(subject ScheduledQueryRuleCriteria_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 v20231201s.ScheduledQueryRuleCriteria_STATUS - err := copied.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual ScheduledQueryRuleCriteria_STATUS - err = actual.AssignProperties_From_ScheduledQueryRuleCriteria_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_ScheduledQueryRuleCriteria_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1241,48 +735,6 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS(gens map[s gens["AllOf"] = gen.SliceOf(Condition_STATUSGenerator()) } -func Test_ScheduledQueryRuleOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from ScheduledQueryRuleOperatorSpec to ScheduledQueryRuleOperatorSpec via AssignProperties_To_ScheduledQueryRuleOperatorSpec & AssignProperties_From_ScheduledQueryRuleOperatorSpec returns original", - prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec, ScheduledQueryRuleOperatorSpecGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec tests if a specific instance of ScheduledQueryRuleOperatorSpec can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec(subject ScheduledQueryRuleOperatorSpec) string { - // Copy subject to make sure assignment doesn't modify it - copied := subject.DeepCopy() - - // Use AssignPropertiesTo() for the first stage of conversion - var other v20231201s.ScheduledQueryRuleOperatorSpec - err := copied.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual ScheduledQueryRuleOperatorSpec - err = actual.AssignProperties_From_ScheduledQueryRuleOperatorSpec(&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_ScheduledQueryRuleOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1338,48 +790,6 @@ func ScheduledQueryRuleOperatorSpecGenerator() gopter.Gen { return scheduledQueryRuleOperatorSpecGenerator } -func Test_ScheduledQueryRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from ScheduledQueryRule_STATUS to ScheduledQueryRule_STATUS via AssignProperties_To_ScheduledQueryRule_STATUS & AssignProperties_From_ScheduledQueryRule_STATUS returns original", - prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule_STATUS, ScheduledQueryRule_STATUSGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForScheduledQueryRule_STATUS tests if a specific instance of ScheduledQueryRule_STATUS can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForScheduledQueryRule_STATUS(subject ScheduledQueryRule_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 v20231201s.ScheduledQueryRule_STATUS - err := copied.AssignProperties_To_ScheduledQueryRule_STATUS(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual ScheduledQueryRule_STATUS - err = actual.AssignProperties_From_ScheduledQueryRule_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_ScheduledQueryRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1481,48 +891,6 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[string]go gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator()) } -func Test_ScheduledQueryRule_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from ScheduledQueryRule_Spec to ScheduledQueryRule_Spec via AssignProperties_To_ScheduledQueryRule_Spec & AssignProperties_From_ScheduledQueryRule_Spec returns original", - prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule_Spec, ScheduledQueryRule_SpecGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForScheduledQueryRule_Spec tests if a specific instance of ScheduledQueryRule_Spec can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForScheduledQueryRule_Spec(subject ScheduledQueryRule_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 v20231201s.ScheduledQueryRule_Spec - err := copied.AssignProperties_To_ScheduledQueryRule_Spec(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual ScheduledQueryRule_Spec - err = actual.AssignProperties_From_ScheduledQueryRule_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_ScheduledQueryRule_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1635,7 +1003,7 @@ func RunPropertyAssignmentTestForSystemData_STATUS(subject SystemData_STATUS) st copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v20221001s.SystemData_STATUS + var other storage.SystemData_STATUS err := copied.AssignProperties_To_SystemData_STATUS(&other) 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 9d5d53ce048..5a0ea549890 100644 --- a/v2/api/insights/v1api20220615/storage/structure.txt +++ b/v2/api/insights/v1api20220615/storage/structure.txt @@ -206,18 +206,4 @@ Webtest: Resource ├── PropertyBag: genruntime.PropertyBag ├── SSLCertRemainingLifetimeCheck: *int └── SSLCheck: *bool -augmentConversionForActions: Interface -augmentConversionForActions_STATUS: Interface -augmentConversionForCondition: Interface -augmentConversionForCondition_FailingPeriods: Interface -augmentConversionForCondition_FailingPeriods_STATUS: Interface -augmentConversionForCondition_STATUS: Interface -augmentConversionForDimension: Interface -augmentConversionForDimension_STATUS: Interface -augmentConversionForScheduledQueryRule: Interface -augmentConversionForScheduledQueryRuleCriteria: Interface -augmentConversionForScheduledQueryRuleCriteria_STATUS: Interface -augmentConversionForScheduledQueryRuleOperatorSpec: Interface -augmentConversionForScheduledQueryRule_STATUS: Interface -augmentConversionForScheduledQueryRule_Spec: Interface augmentConversionForSystemData_STATUS: Interface diff --git a/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen.go b/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen.go index 57071c62b5c..24b6d25134a 100644 --- a/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen.go +++ b/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen.go @@ -4,7 +4,6 @@ package storage import ( - storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" @@ -334,97 +333,6 @@ type SystemData_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } -// AssignProperties_From_SystemData_STATUS populates our SystemData_STATUS from the provided source SystemData_STATUS -func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *storage.SystemData_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(source.PropertyBag) - - // CreatedAt - data.CreatedAt = genruntime.ClonePointerToString(source.CreatedAt) - - // CreatedBy - data.CreatedBy = genruntime.ClonePointerToString(source.CreatedBy) - - // CreatedByType - data.CreatedByType = genruntime.ClonePointerToString(source.CreatedByType) - - // LastModifiedAt - data.LastModifiedAt = genruntime.ClonePointerToString(source.LastModifiedAt) - - // LastModifiedBy - data.LastModifiedBy = genruntime.ClonePointerToString(source.LastModifiedBy) - - // LastModifiedByType - data.LastModifiedByType = genruntime.ClonePointerToString(source.LastModifiedByType) - - // Update the property bag - if len(propertyBag) > 0 { - data.PropertyBag = propertyBag - } else { - data.PropertyBag = nil - } - - // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion - var dataAsAny any = data - if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { - err := augmentedData.AssignPropertiesFrom(source) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") - } - } - - // No error - return nil -} - -// AssignProperties_To_SystemData_STATUS populates the provided destination SystemData_STATUS from our SystemData_STATUS -func (data *SystemData_STATUS) AssignProperties_To_SystemData_STATUS(destination *storage.SystemData_STATUS) error { - // Clone the existing property bag - propertyBag := genruntime.NewPropertyBag(data.PropertyBag) - - // CreatedAt - destination.CreatedAt = genruntime.ClonePointerToString(data.CreatedAt) - - // CreatedBy - destination.CreatedBy = genruntime.ClonePointerToString(data.CreatedBy) - - // CreatedByType - destination.CreatedByType = genruntime.ClonePointerToString(data.CreatedByType) - - // LastModifiedAt - destination.LastModifiedAt = genruntime.ClonePointerToString(data.LastModifiedAt) - - // LastModifiedBy - destination.LastModifiedBy = genruntime.ClonePointerToString(data.LastModifiedBy) - - // LastModifiedByType - destination.LastModifiedByType = genruntime.ClonePointerToString(data.LastModifiedByType) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion - var dataAsAny any = data - if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { - err := augmentedData.AssignPropertiesTo(destination) - if err != nil { - return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") - } - } - - // No error - return nil -} - -type augmentConversionForSystemData_STATUS interface { - AssignPropertiesFrom(src *storage.SystemData_STATUS) error - AssignPropertiesTo(dst *storage.SystemData_STATUS) error -} - // Storage version of v1api20221001.EmailNotification // Email notification of an autoscale event. type EmailNotification struct { diff --git a/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen_test.go b/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen_test.go index 3236cea61f1..20e3279545b 100644 --- a/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen_test.go +++ b/v2/api/insights/v1api20221001/storage/autoscale_setting_types_gen_test.go @@ -5,7 +5,6 @@ package storage import ( "encoding/json" - storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -1806,48 +1805,6 @@ func AddRelatedPropertyGeneratorsForScaleRule_STATUS(gens map[string]gopter.Gen) gens["ScaleAction"] = gen.PtrOf(ScaleAction_STATUSGenerator()) } -func Test_SystemData_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip from SystemData_STATUS to SystemData_STATUS via AssignProperties_To_SystemData_STATUS & AssignProperties_From_SystemData_STATUS returns original", - prop.ForAll(RunPropertyAssignmentTestForSystemData_STATUS, SystemData_STATUSGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) -} - -// RunPropertyAssignmentTestForSystemData_STATUS tests if a specific instance of SystemData_STATUS can be assigned to storage and back losslessly -func RunPropertyAssignmentTestForSystemData_STATUS(subject SystemData_STATUS) string { - // Copy subject to make sure assignment doesn't modify it - copied := subject.DeepCopy() - - // Use AssignPropertiesTo() for the first stage of conversion - var other storage.SystemData_STATUS - err := copied.AssignProperties_To_SystemData_STATUS(&other) - if err != nil { - return err.Error() - } - - // Use AssignPropertiesFrom() to convert back to our original type - var actual SystemData_STATUS - err = actual.AssignProperties_From_SystemData_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_SystemData_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/insights/v1api20221001/storage/structure.txt b/v2/api/insights/v1api20221001/storage/structure.txt index f8dd2eca521..29ce98e61e4 100644 --- a/v2/api/insights/v1api20221001/storage/structure.txt +++ b/v2/api/insights/v1api20221001/storage/structure.txt @@ -168,4 +168,3 @@ AutoscaleSetting: Resource ├── TargetResourceLocation: *string ├── TargetResourceUri: *string └── Type: *string -augmentConversionForSystemData_STATUS: Interface diff --git a/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen.go b/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen.go deleted file mode 100644 index e132655954a..00000000000 --- a/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen.go +++ /dev/null @@ -1,453 +0,0 @@ -// 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/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" - "github.com/Azure/azure-service-operator/v2/pkg/genruntime/core" - "github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets" - "github.com/rotisserie/eris" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// +kubebuilder:rbac:groups=insights.azure.com,resources=scheduledqueryrules,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=insights.azure.com,resources={scheduledqueryrules/status,scheduledqueryrules/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 v1api20231201.ScheduledQueryRule -// Generator information: -// - Generated from: /monitor/resource-manager/Microsoft.Insights/stable/2023-12-01/scheduledQueryRule_API.json -// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName} -type ScheduledQueryRule struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec ScheduledQueryRule_Spec `json:"spec,omitempty"` - Status ScheduledQueryRule_STATUS `json:"status,omitempty"` -} - -var _ conditions.Conditioner = &ScheduledQueryRule{} - -// GetConditions returns the conditions of the resource -func (rule *ScheduledQueryRule) GetConditions() conditions.Conditions { - return rule.Status.Conditions -} - -// SetConditions sets the conditions on the resource status -func (rule *ScheduledQueryRule) SetConditions(conditions conditions.Conditions) { - rule.Status.Conditions = conditions -} - -var _ configmaps.Exporter = &ScheduledQueryRule{} - -// ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property -func (rule *ScheduledQueryRule) ConfigMapDestinationExpressions() []*core.DestinationExpression { - if rule.Spec.OperatorSpec == nil { - return nil - } - return rule.Spec.OperatorSpec.ConfigMapExpressions -} - -var _ secrets.Exporter = &ScheduledQueryRule{} - -// SecretDestinationExpressions returns the Spec.OperatorSpec.SecretExpressions property -func (rule *ScheduledQueryRule) SecretDestinationExpressions() []*core.DestinationExpression { - if rule.Spec.OperatorSpec == nil { - return nil - } - return rule.Spec.OperatorSpec.SecretExpressions -} - -var _ genruntime.KubernetesResource = &ScheduledQueryRule{} - -// AzureName returns the Azure name of the resource -func (rule *ScheduledQueryRule) AzureName() string { - return rule.Spec.AzureName -} - -// GetAPIVersion returns the ARM API version of the resource. This is always "2023-12-01" -func (rule ScheduledQueryRule) GetAPIVersion() string { - return "2023-12-01" -} - -// GetResourceScope returns the scope of the resource -func (rule *ScheduledQueryRule) GetResourceScope() genruntime.ResourceScope { - return genruntime.ResourceScopeResourceGroup -} - -// GetSpec returns the specification of this resource -func (rule *ScheduledQueryRule) GetSpec() genruntime.ConvertibleSpec { - return &rule.Spec -} - -// GetStatus returns the status of this resource -func (rule *ScheduledQueryRule) GetStatus() genruntime.ConvertibleStatus { - return &rule.Status -} - -// GetSupportedOperations returns the operations supported by the resource -func (rule *ScheduledQueryRule) 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/scheduledQueryRules" -func (rule *ScheduledQueryRule) GetType() string { - return "Microsoft.Insights/scheduledQueryRules" -} - -// NewEmptyStatus returns a new empty (blank) status -func (rule *ScheduledQueryRule) NewEmptyStatus() genruntime.ConvertibleStatus { - return &ScheduledQueryRule_STATUS{} -} - -// Owner returns the ResourceReference of the owner -func (rule *ScheduledQueryRule) Owner() *genruntime.ResourceReference { - if rule.Spec.Owner == nil { - return nil - } - - group, kind := genruntime.LookupOwnerGroupKind(rule.Spec) - return rule.Spec.Owner.AsResourceReference(group, kind) -} - -// SetStatus sets the status of this resource -func (rule *ScheduledQueryRule) SetStatus(status genruntime.ConvertibleStatus) error { - // If we have exactly the right type of status, assign it - if st, ok := status.(*ScheduledQueryRule_STATUS); ok { - rule.Status = *st - return nil - } - - // Convert status to required version - var st ScheduledQueryRule_STATUS - err := status.ConvertStatusTo(&st) - if err != nil { - return eris.Wrap(err, "failed to convert status") - } - - rule.Status = st - return nil -} - -// Hub marks that this ScheduledQueryRule is the hub type for conversion -func (rule *ScheduledQueryRule) Hub() {} - -// OriginalGVK returns a GroupValueKind for the original API version used to create the resource -func (rule *ScheduledQueryRule) OriginalGVK() *schema.GroupVersionKind { - return &schema.GroupVersionKind{ - Group: GroupVersion.Group, - Version: rule.Spec.OriginalVersion, - Kind: "ScheduledQueryRule", - } -} - -// +kubebuilder:object:root=true -// Storage version of v1api20231201.ScheduledQueryRule -// Generator information: -// - Generated from: /monitor/resource-manager/Microsoft.Insights/stable/2023-12-01/scheduledQueryRule_API.json -// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName} -type ScheduledQueryRuleList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []ScheduledQueryRule `json:"items"` -} - -// Storage version of v1api20231201.APIVersion -// +kubebuilder:validation:Enum={"2023-12-01"} -type APIVersion string - -const APIVersion_Value = APIVersion("2023-12-01") - -// Storage version of v1api20231201.ScheduledQueryRule_Spec -type ScheduledQueryRule_Spec struct { - Actions *Actions `json:"actions,omitempty"` - AutoMitigate *bool `json:"autoMitigate,omitempty"` - - // 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"` - CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` - Criteria *ScheduledQueryRuleCriteria `json:"criteria,omitempty"` - Description *string `json:"description,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` - Identity *Identity `json:"identity,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` - OperatorSpec *ScheduledQueryRuleOperatorSpec `json:"operatorSpec,omitempty"` - OriginalVersion string `json:"originalVersion,omitempty"` - OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,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"` - ResolveConfiguration *RuleResolveConfiguration `json:"resolveConfiguration,omitempty"` - ScopesReferences []genruntime.ResourceReference `armReference:"Scopes" json:"scopesReferences,omitempty"` - Severity *int `json:"severity,omitempty"` - SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` - WindowSize *string `json:"windowSize,omitempty"` -} - -var _ genruntime.ConvertibleSpec = &ScheduledQueryRule_Spec{} - -// ConvertSpecFrom populates our ScheduledQueryRule_Spec from the provided source -func (rule *ScheduledQueryRule_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { - if source == rule { - return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") - } - - return source.ConvertSpecTo(rule) -} - -// ConvertSpecTo populates the provided destination from our ScheduledQueryRule_Spec -func (rule *ScheduledQueryRule_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { - if destination == rule { - return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") - } - - return destination.ConvertSpecFrom(rule) -} - -// Storage version of v1api20231201.ScheduledQueryRule_STATUS -type ScheduledQueryRule_STATUS struct { - Actions *Actions_STATUS `json:"actions,omitempty"` - AutoMitigate *bool `json:"autoMitigate,omitempty"` - CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` - Conditions []conditions.Condition `json:"conditions,omitempty"` - CreatedWithApiVersion *string `json:"createdWithApiVersion,omitempty"` - Criteria *ScheduledQueryRuleCriteria_STATUS `json:"criteria,omitempty"` - Description *string `json:"description,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - Etag *string `json:"etag,omitempty"` - EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` - Id *string `json:"id,omitempty"` - Identity *Identity_STATUS `json:"identity,omitempty"` - IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty"` - IsWorkspaceAlertsStorageConfigured *bool `json:"isWorkspaceAlertsStorageConfigured,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` - Name *string `json:"name,omitempty"` - OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - ResolveConfiguration *RuleResolveConfiguration_STATUS `json:"resolveConfiguration,omitempty"` - Scopes []string `json:"scopes,omitempty"` - Severity *int `json:"severity,omitempty"` - SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` - SystemData *SystemData_STATUS `json:"systemData,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` - Type *string `json:"type,omitempty"` - WindowSize *string `json:"windowSize,omitempty"` -} - -var _ genruntime.ConvertibleStatus = &ScheduledQueryRule_STATUS{} - -// ConvertStatusFrom populates our ScheduledQueryRule_STATUS from the provided source -func (rule *ScheduledQueryRule_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { - if source == rule { - return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") - } - - return source.ConvertStatusTo(rule) -} - -// ConvertStatusTo populates the provided destination from our ScheduledQueryRule_STATUS -func (rule *ScheduledQueryRule_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { - if destination == rule { - return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") - } - - return destination.ConvertStatusFrom(rule) -} - -// Storage version of v1api20231201.Actions -// Actions to invoke when the alert fires. -type Actions struct { - ActionGroupsReferences []genruntime.ResourceReference `armReference:"ActionGroups" json:"actionGroupsReferences,omitempty"` - ActionProperties map[string]string `json:"actionProperties,omitempty"` - CustomProperties map[string]string `json:"customProperties,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// Storage version of v1api20231201.Actions_STATUS -// Actions to invoke when the alert fires. -type Actions_STATUS struct { - ActionGroups []string `json:"actionGroups,omitempty"` - ActionProperties map[string]string `json:"actionProperties,omitempty"` - CustomProperties map[string]string `json:"customProperties,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// Storage version of v1api20231201.Identity -// Identity for the resource. -type Identity struct { - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Type *string `json:"type,omitempty"` - UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` -} - -// Storage version of v1api20231201.Identity_STATUS -// Identity for the resource. -type Identity_STATUS struct { - PrincipalId *string `json:"principalId,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - TenantId *string `json:"tenantId,omitempty"` - Type *string `json:"type,omitempty"` - UserAssignedIdentities map[string]UserIdentityProperties_STATUS `json:"userAssignedIdentities,omitempty"` -} - -// Storage version of v1api20231201.RuleResolveConfiguration -// TBD. Relevant only for rules of the kind LogAlert. -type RuleResolveConfiguration struct { - AutoResolved *bool `json:"autoResolved,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - TimeToResolve *string `json:"timeToResolve,omitempty"` -} - -// Storage version of v1api20231201.RuleResolveConfiguration_STATUS -// TBD. Relevant only for rules of the kind LogAlert. -type RuleResolveConfiguration_STATUS struct { - AutoResolved *bool `json:"autoResolved,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - TimeToResolve *string `json:"timeToResolve,omitempty"` -} - -// Storage version of v1api20231201.ScheduledQueryRuleCriteria -// The rule criteria that defines the conditions of the scheduled query rule. -type ScheduledQueryRuleCriteria struct { - AllOf []Condition `json:"allOf,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// Storage version of v1api20231201.ScheduledQueryRuleCriteria_STATUS -// The rule criteria that defines the conditions of the scheduled query rule. -type ScheduledQueryRuleCriteria_STATUS struct { - AllOf []Condition_STATUS `json:"allOf,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// Storage version of v1api20231201.ScheduledQueryRuleOperatorSpec -// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure -type ScheduledQueryRuleOperatorSpec struct { - ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - SecretExpressions []*core.DestinationExpression `json:"secretExpressions,omitempty"` -} - -// Storage version of v1api20231201.SystemData_STATUS -// Metadata pertaining to creation and last modification of the resource. -type SystemData_STATUS struct { - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - CreatedByType *string `json:"createdByType,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - LastModifiedByType *string `json:"lastModifiedByType,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// Storage version of v1api20231201.Condition -// A condition of the scheduled query rule. -type Condition struct { - Dimensions []Dimension `json:"dimensions,omitempty"` - FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` - MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` - MetricName *string `json:"metricName,omitempty"` - Operator *string `json:"operator,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Query *string `json:"query,omitempty"` - - // ResourceIdColumnReference: The column containing the resource id. The content of the column must be a uri formatted as - // resource id. Relevant only for rules of the kind LogAlert. - ResourceIdColumnReference *genruntime.ResourceReference `armReference:"ResourceIdColumn" json:"resourceIdColumnReference,omitempty"` - Threshold *float64 `json:"threshold,omitempty"` - TimeAggregation *string `json:"timeAggregation,omitempty"` -} - -// Storage version of v1api20231201.Condition_STATUS -// A condition of the scheduled query rule. -type Condition_STATUS struct { - Dimensions []Dimension_STATUS `json:"dimensions,omitempty"` - FailingPeriods *Condition_FailingPeriods_STATUS `json:"failingPeriods,omitempty"` - MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` - MetricName *string `json:"metricName,omitempty"` - Operator *string `json:"operator,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Query *string `json:"query,omitempty"` - ResourceIdColumn *string `json:"resourceIdColumn,omitempty"` - Threshold *float64 `json:"threshold,omitempty"` - TimeAggregation *string `json:"timeAggregation,omitempty"` -} - -// Storage version of v1api20231201.UserAssignedIdentityDetails -// Information about the user assigned identity for the resource -type UserAssignedIdentityDetails struct { - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` -} - -// Storage version of v1api20231201.UserIdentityProperties_STATUS -// User assigned identity properties. -type UserIdentityProperties_STATUS struct { - ClientId *string `json:"clientId,omitempty"` - PrincipalId *string `json:"principalId,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// Storage version of v1api20231201.Condition_FailingPeriods -type Condition_FailingPeriods struct { - MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` - NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// Storage version of v1api20231201.Condition_FailingPeriods_STATUS -type Condition_FailingPeriods_STATUS struct { - MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` - NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` -} - -// Storage version of v1api20231201.Dimension -// Dimension splitting and filtering definition -type Dimension struct { - Name *string `json:"name,omitempty"` - Operator *string `json:"operator,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Values []string `json:"values,omitempty"` -} - -// Storage version of v1api20231201.Dimension_STATUS -// Dimension splitting and filtering definition -type Dimension_STATUS struct { - Name *string `json:"name,omitempty"` - Operator *string `json:"operator,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Values []string `json:"values,omitempty"` -} - -func init() { - SchemeBuilder.Register(&ScheduledQueryRule{}, &ScheduledQueryRuleList{}) -} diff --git a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen.go b/v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_spec_types_gen.go similarity index 83% rename from v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen.go rename to v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_spec_types_gen.go index 62637e3ae50..4aeb60bd7ca 100644 --- a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen.go +++ b/v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_spec_types_gen.go @@ -25,9 +25,9 @@ type ScheduledQueryRule_Spec struct { var _ genruntime.ARMResourceSpec = &ScheduledQueryRule_Spec{} -// GetAPIVersion returns the ARM API version of the resource. This is always "2023-12-01" +// GetAPIVersion returns the ARM API version of the resource. This is always "2024-01-01-preview" func (rule ScheduledQueryRule_Spec) GetAPIVersion() string { - return "2023-12-01" + return "2024-01-01-preview" } // GetName returns the Name of the resource @@ -47,18 +47,20 @@ type Identity struct { UserAssignedIdentities map[string]UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` } -// +kubebuilder:validation:Enum={"LogAlert","LogToMetric"} +// +kubebuilder:validation:Enum={"EventLogAlert","LogAlert","LogToMetric"} type ScheduledQueryRule_Kind_Spec string const ( - ScheduledQueryRule_Kind_Spec_LogAlert = ScheduledQueryRule_Kind_Spec("LogAlert") - ScheduledQueryRule_Kind_Spec_LogToMetric = ScheduledQueryRule_Kind_Spec("LogToMetric") + ScheduledQueryRule_Kind_Spec_EventLogAlert = ScheduledQueryRule_Kind_Spec("EventLogAlert") + ScheduledQueryRule_Kind_Spec_LogAlert = ScheduledQueryRule_Kind_Spec("LogAlert") + ScheduledQueryRule_Kind_Spec_LogToMetric = ScheduledQueryRule_Kind_Spec("LogToMetric") ) // Mapping from string to ScheduledQueryRule_Kind_Spec var scheduledQueryRule_Kind_Spec_Values = map[string]ScheduledQueryRule_Kind_Spec{ - "logalert": ScheduledQueryRule_Kind_Spec_LogAlert, - "logtometric": ScheduledQueryRule_Kind_Spec_LogToMetric, + "eventlogalert": ScheduledQueryRule_Kind_Spec_EventLogAlert, + "logalert": ScheduledQueryRule_Kind_Spec_LogAlert, + "logtometric": ScheduledQueryRule_Kind_Spec_LogToMetric, } // scheduled query rule Definition @@ -181,6 +183,14 @@ type UserAssignedIdentityDetails struct { // A condition of the scheduled query rule. type Condition struct { + // AlertSensitivity: The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. + // This will affect how tight the threshold is to the metric series pattern. Relevant and required only for dynamic + // threshold rules of the kind LogAlert. + AlertSensitivity *string `json:"alertSensitivity,omitempty"` + + // CriterionType: Specifies the type of threshold criteria + CriterionType *Condition_CriterionType `json:"criterionType,omitempty"` + // Dimensions: List of Dimensions conditions Dimensions []Dimension `json:"dimensions,omitempty"` @@ -188,6 +198,10 @@ type Condition struct { // alert. Relevant only for rules of the kind LogAlert. FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` + // IgnoreDataBefore: Use this option to set the date from which to start learning the metric historical data and calculate + // the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert. + IgnoreDataBefore *string `json:"ignoreDataBefore,omitempty"` + // MetricMeasureColumn: The column containing the metric measure number. Relevant only for rules of the kind LogAlert. MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` @@ -201,14 +215,28 @@ type Condition struct { Query *string `json:"query,omitempty"` ResourceIdColumn *string `json:"resourceIdColumn,omitempty"` - // Threshold: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind - // LogAlert. + // Threshold: the criteria threshold value that activates the alert. Relevant and required only for static threshold rules + // of the kind LogAlert. Threshold *float64 `json:"threshold,omitempty"` // TimeAggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert. TimeAggregation *Condition_TimeAggregation `json:"timeAggregation,omitempty"` } +// +kubebuilder:validation:Enum={"DynamicThresholdCriterion","StaticThresholdCriterion"} +type Condition_CriterionType string + +const ( + Condition_CriterionType_DynamicThresholdCriterion = Condition_CriterionType("DynamicThresholdCriterion") + Condition_CriterionType_StaticThresholdCriterion = Condition_CriterionType("StaticThresholdCriterion") +) + +// Mapping from string to Condition_CriterionType +var condition_CriterionType_Values = map[string]Condition_CriterionType{ + "dynamicthresholdcriterion": Condition_CriterionType_DynamicThresholdCriterion, + "staticthresholdcriterion": Condition_CriterionType_StaticThresholdCriterion, +} + type Condition_FailingPeriods struct { // MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to // numberOfEvaluationPeriods. Default value is 1 @@ -219,11 +247,12 @@ type Condition_FailingPeriods struct { NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` } -// +kubebuilder:validation:Enum={"Equals","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual"} +// +kubebuilder:validation:Enum={"Equals","GreaterOrLessThan","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual"} type Condition_Operator string const ( Condition_Operator_Equals = Condition_Operator("Equals") + Condition_Operator_GreaterOrLessThan = Condition_Operator("GreaterOrLessThan") Condition_Operator_GreaterThan = Condition_Operator("GreaterThan") Condition_Operator_GreaterThanOrEqual = Condition_Operator("GreaterThanOrEqual") Condition_Operator_LessThan = Condition_Operator("LessThan") @@ -233,6 +262,7 @@ const ( // Mapping from string to Condition_Operator var condition_Operator_Values = map[string]Condition_Operator{ "equals": Condition_Operator_Equals, + "greaterorlessthan": Condition_Operator_GreaterOrLessThan, "greaterthan": Condition_Operator_GreaterThan, "greaterthanorequal": Condition_Operator_GreaterThanOrEqual, "lessthan": Condition_Operator_LessThan, diff --git a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen_test.go b/v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_spec_types_gen_test.go similarity index 98% rename from v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen_test.go rename to v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_spec_types_gen_test.go index 5596c8ba01a..7afda83452a 100644 --- a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_spec_types_gen_test.go +++ b/v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_spec_types_gen_test.go @@ -149,10 +149,14 @@ func ConditionGenerator() gopter.Gen { // AddIndependentPropertyGeneratorsForCondition is a factory method for creating gopter generators func AddIndependentPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { + gens["AlertSensitivity"] = gen.PtrOf(gen.AlphaString()) + gens["CriterionType"] = gen.PtrOf(gen.OneConstOf(Condition_CriterionType_DynamicThresholdCriterion, Condition_CriterionType_StaticThresholdCriterion)) + gens["IgnoreDataBefore"] = gen.PtrOf(gen.AlphaString()) gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) gens["MetricName"] = gen.PtrOf(gen.AlphaString()) gens["Operator"] = gen.PtrOf(gen.OneConstOf( Condition_Operator_Equals, + Condition_Operator_GreaterOrLessThan, Condition_Operator_GreaterThan, Condition_Operator_GreaterThanOrEqual, Condition_Operator_LessThan, @@ -658,7 +662,7 @@ func ScheduledQueryRule_SpecGenerator() gopter.Gen { // AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec is a factory method for creating gopter generators func AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(gens map[string]gopter.Gen) { - gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_Spec_LogAlert, ScheduledQueryRule_Kind_Spec_LogToMetric)) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_Spec_EventLogAlert, ScheduledQueryRule_Kind_Spec_LogAlert, ScheduledQueryRule_Kind_Spec_LogToMetric)) gens["Location"] = gen.PtrOf(gen.AlphaString()) gens["Name"] = gen.AlphaString() gens["Tags"] = gen.MapOf( diff --git a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen.go b/v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_status_types_gen.go similarity index 88% rename from v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen.go rename to v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_status_types_gen.go index f3fbbac4b3a..f12831cd55a 100644 --- a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen.go +++ b/v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_status_types_gen.go @@ -59,14 +59,16 @@ type Identity_STATUS struct { type ScheduledQueryRule_Kind_STATUS string const ( - ScheduledQueryRule_Kind_STATUS_LogAlert = ScheduledQueryRule_Kind_STATUS("LogAlert") - ScheduledQueryRule_Kind_STATUS_LogToMetric = ScheduledQueryRule_Kind_STATUS("LogToMetric") + ScheduledQueryRule_Kind_STATUS_EventLogAlert = ScheduledQueryRule_Kind_STATUS("EventLogAlert") + ScheduledQueryRule_Kind_STATUS_LogAlert = ScheduledQueryRule_Kind_STATUS("LogAlert") + ScheduledQueryRule_Kind_STATUS_LogToMetric = ScheduledQueryRule_Kind_STATUS("LogToMetric") ) // Mapping from string to ScheduledQueryRule_Kind_STATUS var scheduledQueryRule_Kind_STATUS_Values = map[string]ScheduledQueryRule_Kind_STATUS{ - "logalert": ScheduledQueryRule_Kind_STATUS_LogAlert, - "logtometric": ScheduledQueryRule_Kind_STATUS_LogToMetric, + "eventlogalert": ScheduledQueryRule_Kind_STATUS_EventLogAlert, + "logalert": ScheduledQueryRule_Kind_STATUS_LogAlert, + "logtometric": ScheduledQueryRule_Kind_STATUS_LogToMetric, } // scheduled query rule Definition @@ -260,6 +262,14 @@ type UserIdentityProperties_STATUS struct { // A condition of the scheduled query rule. type Condition_STATUS struct { + // AlertSensitivity: The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. + // This will affect how tight the threshold is to the metric series pattern. Relevant and required only for dynamic + // threshold rules of the kind LogAlert. + AlertSensitivity *string `json:"alertSensitivity,omitempty"` + + // CriterionType: Specifies the type of threshold criteria + CriterionType *Condition_CriterionType_STATUS `json:"criterionType,omitempty"` + // Dimensions: List of Dimensions conditions Dimensions []Dimension_STATUS `json:"dimensions,omitempty"` @@ -267,6 +277,10 @@ type Condition_STATUS struct { // alert. Relevant only for rules of the kind LogAlert. FailingPeriods *Condition_FailingPeriods_STATUS `json:"failingPeriods,omitempty"` + // IgnoreDataBefore: Use this option to set the date from which to start learning the metric historical data and calculate + // the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert. + IgnoreDataBefore *string `json:"ignoreDataBefore,omitempty"` + // MetricMeasureColumn: The column containing the metric measure number. Relevant only for rules of the kind LogAlert. MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` @@ -283,14 +297,27 @@ type Condition_STATUS struct { // id. Relevant only for rules of the kind LogAlert. ResourceIdColumn *string `json:"resourceIdColumn,omitempty"` - // Threshold: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind - // LogAlert. + // Threshold: the criteria threshold value that activates the alert. Relevant and required only for static threshold rules + // of the kind LogAlert. Threshold *float64 `json:"threshold,omitempty"` // TimeAggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert. TimeAggregation *Condition_TimeAggregation_STATUS `json:"timeAggregation,omitempty"` } +type Condition_CriterionType_STATUS string + +const ( + Condition_CriterionType_STATUS_DynamicThresholdCriterion = Condition_CriterionType_STATUS("DynamicThresholdCriterion") + Condition_CriterionType_STATUS_StaticThresholdCriterion = Condition_CriterionType_STATUS("StaticThresholdCriterion") +) + +// Mapping from string to Condition_CriterionType_STATUS +var condition_CriterionType_STATUS_Values = map[string]Condition_CriterionType_STATUS{ + "dynamicthresholdcriterion": Condition_CriterionType_STATUS_DynamicThresholdCriterion, + "staticthresholdcriterion": Condition_CriterionType_STATUS_StaticThresholdCriterion, +} + type Condition_FailingPeriods_STATUS struct { // MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to // numberOfEvaluationPeriods. Default value is 1 @@ -305,6 +332,7 @@ type Condition_Operator_STATUS string const ( Condition_Operator_STATUS_Equals = Condition_Operator_STATUS("Equals") + Condition_Operator_STATUS_GreaterOrLessThan = Condition_Operator_STATUS("GreaterOrLessThan") Condition_Operator_STATUS_GreaterThan = Condition_Operator_STATUS("GreaterThan") Condition_Operator_STATUS_GreaterThanOrEqual = Condition_Operator_STATUS("GreaterThanOrEqual") Condition_Operator_STATUS_LessThan = Condition_Operator_STATUS("LessThan") @@ -314,6 +342,7 @@ const ( // Mapping from string to Condition_Operator_STATUS var condition_Operator_STATUS_Values = map[string]Condition_Operator_STATUS{ "equals": Condition_Operator_STATUS_Equals, + "greaterorlessthan": Condition_Operator_STATUS_GreaterOrLessThan, "greaterthan": Condition_Operator_STATUS_GreaterThan, "greaterthanorequal": Condition_Operator_STATUS_GreaterThanOrEqual, "lessthan": Condition_Operator_STATUS_LessThan, diff --git a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen_test.go b/v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_status_types_gen_test.go similarity index 98% rename from v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen_test.go rename to v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_status_types_gen_test.go index b591aca4af5..75ad7ab8b74 100644 --- a/v2/api/insights/v1api20231201/arm/scheduled_query_rule_status_types_gen_test.go +++ b/v2/api/insights/v1api20240101preview/arm/scheduled_query_rule_status_types_gen_test.go @@ -211,10 +211,14 @@ func Condition_STATUSGenerator() gopter.Gen { // AddIndependentPropertyGeneratorsForCondition_STATUS is a factory method for creating gopter generators func AddIndependentPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) { + gens["AlertSensitivity"] = gen.PtrOf(gen.AlphaString()) + gens["CriterionType"] = gen.PtrOf(gen.OneConstOf(Condition_CriterionType_STATUS_DynamicThresholdCriterion, Condition_CriterionType_STATUS_StaticThresholdCriterion)) + gens["IgnoreDataBefore"] = gen.PtrOf(gen.AlphaString()) gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) gens["MetricName"] = gen.PtrOf(gen.AlphaString()) gens["Operator"] = gen.PtrOf(gen.OneConstOf( Condition_Operator_STATUS_Equals, + Condition_Operator_STATUS_GreaterOrLessThan, Condition_Operator_STATUS_GreaterThan, Condition_Operator_STATUS_GreaterThanOrEqual, Condition_Operator_STATUS_LessThan, @@ -665,7 +669,7 @@ func ScheduledQueryRule_STATUSGenerator() gopter.Gen { func AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[string]gopter.Gen) { gens["Etag"] = gen.PtrOf(gen.AlphaString()) gens["Id"] = gen.PtrOf(gen.AlphaString()) - gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_STATUS_LogAlert, ScheduledQueryRule_Kind_STATUS_LogToMetric)) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_STATUS_EventLogAlert, ScheduledQueryRule_Kind_STATUS_LogAlert, ScheduledQueryRule_Kind_STATUS_LogToMetric)) gens["Location"] = gen.PtrOf(gen.AlphaString()) gens["Name"] = gen.PtrOf(gen.AlphaString()) gens["Tags"] = gen.MapOf( diff --git a/v2/api/insights/v1api20231201/arm/structure.txt b/v2/api/insights/v1api20240101preview/arm/structure.txt similarity index 86% rename from v2/api/insights/v1api20231201/arm/structure.txt rename to v2/api/insights/v1api20240101preview/arm/structure.txt index 3652b64a351..8615fe1aa0e 100644 --- a/v2/api/insights/v1api20231201/arm/structure.txt +++ b/v2/api/insights/v1api20240101preview/arm/structure.txt @@ -1,6 +1,6 @@ // Code generated by azure-service-operator-codegen. DO NOT EDIT. -github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/arm -------------------------------------------------------------------------- +github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview/arm +-------------------------------------------------------------------------------- ScheduledQueryRule_STATUS: Object (10 properties) ├── Etag: *string ├── Id: *string @@ -14,7 +14,8 @@ ScheduledQueryRule_STATUS: Object (10 properties) │ └── UserAssignedIdentities: map[string]Object (2 properties) │ ├── ClientId: *string │ └── PrincipalId: *string -├── Kind: *Enum (2 values) +├── Kind: *Enum (3 values) +│ ├── "EventLogAlert" │ ├── "LogAlert" │ └── "LogToMetric" ├── Location: *string @@ -28,7 +29,11 @@ ScheduledQueryRule_STATUS: Object (10 properties) │ ├── CheckWorkspaceAlertsStorageConfigured: *bool │ ├── CreatedWithApiVersion: *string │ ├── Criteria: *Object (1 property) -│ │ └── AllOf: Object (9 properties)[] +│ │ └── AllOf: Object (12 properties)[] +│ │ ├── AlertSensitivity: *string +│ │ ├── CriterionType: *Enum (2 values) +│ │ │ ├── "DynamicThresholdCriterion" +│ │ │ └── "StaticThresholdCriterion" │ │ ├── Dimensions: Object (3 properties)[] │ │ │ ├── Name: *string │ │ │ ├── Operator: *Enum (2 values) @@ -38,10 +43,12 @@ ScheduledQueryRule_STATUS: Object (10 properties) │ │ ├── FailingPeriods: *Object (2 properties) │ │ │ ├── MinFailingPeriodsToAlert: *int │ │ │ └── NumberOfEvaluationPeriods: *int +│ │ ├── IgnoreDataBefore: *string │ │ ├── MetricMeasureColumn: *string │ │ ├── MetricName: *string -│ │ ├── Operator: *Enum (5 values) +│ │ ├── Operator: *Enum (6 values) │ │ │ ├── "Equals" +│ │ │ ├── "GreaterOrLessThan" │ │ │ ├── "GreaterThan" │ │ │ ├── "GreaterThanOrEqual" │ │ │ ├── "LessThan" @@ -100,7 +107,8 @@ ScheduledQueryRule_Spec: Object (6 properties) │ │ ├── "SystemAssigned" │ │ └── "UserAssigned" │ └── UserAssignedIdentities: map[string]Object (0 properties) -├── Kind: *Enum (2 values) +├── Kind: *Enum (3 values) +│ ├── "EventLogAlert" │ ├── "LogAlert" │ └── "LogToMetric" ├── Location: *string @@ -113,7 +121,11 @@ ScheduledQueryRule_Spec: Object (6 properties) │ ├── AutoMitigate: *bool │ ├── CheckWorkspaceAlertsStorageConfigured: *bool │ ├── Criteria: *Object (1 property) -│ │ └── AllOf: Object (9 properties)[] +│ │ └── AllOf: Object (12 properties)[] +│ │ ├── AlertSensitivity: *string +│ │ ├── CriterionType: *Enum (2 values) +│ │ │ ├── "DynamicThresholdCriterion" +│ │ │ └── "StaticThresholdCriterion" │ │ ├── Dimensions: Object (3 properties)[] │ │ │ ├── Name: *string │ │ │ ├── Operator: *Enum (2 values) @@ -123,10 +135,12 @@ ScheduledQueryRule_Spec: Object (6 properties) │ │ ├── FailingPeriods: *Object (2 properties) │ │ │ ├── MinFailingPeriodsToAlert: *int │ │ │ └── NumberOfEvaluationPeriods: *int +│ │ ├── IgnoreDataBefore: *string │ │ ├── MetricMeasureColumn: *string │ │ ├── MetricName: *string -│ │ ├── Operator: *Enum (5 values) +│ │ ├── Operator: *Enum (6 values) │ │ │ ├── "Equals" +│ │ │ ├── "GreaterOrLessThan" │ │ │ ├── "GreaterThan" │ │ │ ├── "GreaterThanOrEqual" │ │ │ ├── "LessThan" diff --git a/v2/api/insights/v1api20231201/doc.go b/v2/api/insights/v1api20240101preview/doc.go similarity index 55% rename from v2/api/insights/v1api20231201/doc.go rename to v2/api/insights/v1api20240101preview/doc.go index 3b8e2c4ed48..304fd1452d8 100644 --- a/v2/api/insights/v1api20231201/doc.go +++ b/v2/api/insights/v1api20240101preview/doc.go @@ -5,6 +5,6 @@ Licensed under the MIT license. // Code generated by azure-service-operator-codegen. DO NOT EDIT. -// Package v1api20231201 contains API Schema definitions for the insights v1api20231201 API group +// Package v1api20240101preview contains API Schema definitions for the insights v1api20240101preview API group // +groupName=insights.azure.com -package v1api20231201 +package v1api20240101preview diff --git a/v2/api/insights/v1api20231201/groupversion_info_gen.go b/v2/api/insights/v1api20240101preview/groupversion_info_gen.go similarity index 80% rename from v2/api/insights/v1api20231201/groupversion_info_gen.go rename to v2/api/insights/v1api20240101preview/groupversion_info_gen.go index 52f4288fd05..9d1c4f23e40 100644 --- a/v2/api/insights/v1api20231201/groupversion_info_gen.go +++ b/v2/api/insights/v1api20240101preview/groupversion_info_gen.go @@ -5,13 +5,13 @@ Licensed under the MIT license. // Code generated by azure-service-operator-codegen. DO NOT EDIT. -// Package v1api20231201 contains API Schema definitions for the insights v1api20231201 API group +// Package v1api20240101preview contains API Schema definitions for the insights v1api20240101preview API group // +kubebuilder:object:generate=true // All object properties are optional by default, this will be overridden when needed: // +kubebuilder:validation:Optional // +groupName=insights.azure.com -// +versionName=v1api20231201 -package v1api20231201 +// +versionName=v1api20240101preview +package v1api20240101preview import ( "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,7 +20,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "insights.azure.com", Version: "v1api20231201"} + GroupVersion = schema.GroupVersion{Group: "insights.azure.com", Version: "v1api20240101preview"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/v2/api/insights/v1api20231201/scheduled_query_rule_types_gen.go b/v2/api/insights/v1api20240101preview/scheduled_query_rule_types_gen.go similarity index 92% rename from v2/api/insights/v1api20231201/scheduled_query_rule_types_gen.go rename to v2/api/insights/v1api20240101preview/scheduled_query_rule_types_gen.go index 15991a5722b..e1923f7805b 100644 --- a/v2/api/insights/v1api20231201/scheduled_query_rule_types_gen.go +++ b/v2/api/insights/v1api20240101preview/scheduled_query_rule_types_gen.go @@ -1,12 +1,12 @@ // Code generated by azure-service-operator-codegen. DO NOT EDIT. // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -package v1api20231201 +package v1api20240101preview import ( "fmt" - arm "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/arm" - storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" + arm "github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview/arm" + storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview/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" @@ -28,7 +28,7 @@ import ( // +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: /monitor/resource-manager/Microsoft.Insights/stable/2023-12-01/scheduledQueryRule_API.json +// - Generated from: /monitor/resource-manager/Microsoft.Insights/preview/2024-01-01-preview/scheduledQueryRule_API.json // - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName} type ScheduledQueryRule struct { metav1.TypeMeta `json:",inline"` @@ -53,25 +53,39 @@ var _ conversion.Convertible = &ScheduledQueryRule{} // ConvertFrom populates our ScheduledQueryRule from the provided hub ScheduledQueryRule func (rule *ScheduledQueryRule) ConvertFrom(hub conversion.Hub) error { - source, ok := hub.(*storage.ScheduledQueryRule) - if !ok { - return fmt.Errorf("expected insights/v1api20231201/storage/ScheduledQueryRule but received %T instead", hub) + // intermediate variable for conversion + var source storage.ScheduledQueryRule + + err := source.ConvertFrom(hub) + if err != nil { + return eris.Wrap(err, "converting from hub to source") + } + + err = rule.AssignProperties_From_ScheduledQueryRule(&source) + if err != nil { + return eris.Wrap(err, "converting from source to rule") } - return rule.AssignProperties_From_ScheduledQueryRule(source) + return nil } // ConvertTo populates the provided hub ScheduledQueryRule from our ScheduledQueryRule func (rule *ScheduledQueryRule) ConvertTo(hub conversion.Hub) error { - destination, ok := hub.(*storage.ScheduledQueryRule) - if !ok { - return fmt.Errorf("expected insights/v1api20231201/storage/ScheduledQueryRule but received %T instead", hub) + // intermediate variable for conversion + var destination storage.ScheduledQueryRule + err := rule.AssignProperties_To_ScheduledQueryRule(&destination) + if err != nil { + return eris.Wrap(err, "converting to destination from rule") + } + err = destination.ConvertTo(hub) + if err != nil { + return eris.Wrap(err, "converting from destination to hub") } - return rule.AssignProperties_To_ScheduledQueryRule(destination) + return nil } -// +kubebuilder:webhook:path=/mutate-insights-azure-com-v1api20231201-scheduledqueryrule,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=scheduledqueryrules,verbs=create;update,versions=v1api20231201,name=default.v1api20231201.scheduledqueryrules.insights.azure.com,admissionReviewVersions=v1 +// +kubebuilder:webhook:path=/mutate-insights-azure-com-v1api20240101preview-scheduledqueryrule,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=scheduledqueryrules,verbs=create;update,versions=v1api20240101preview,name=default.v1api20240101preview.scheduledqueryrules.insights.azure.com,admissionReviewVersions=v1 var _ admission.Defaulter = &ScheduledQueryRule{} @@ -114,17 +128,6 @@ func (rule *ScheduledQueryRule) SecretDestinationExpressions() []*core.Destinati return rule.Spec.OperatorSpec.SecretExpressions } -var _ genruntime.ImportableResource = &ScheduledQueryRule{} - -// InitializeSpec initializes the spec for this resource from the given status -func (rule *ScheduledQueryRule) InitializeSpec(status genruntime.ConvertibleStatus) error { - if s, ok := status.(*ScheduledQueryRule_STATUS); ok { - return rule.Spec.Initialize_From_ScheduledQueryRule_STATUS(s) - } - - return fmt.Errorf("expected Status of type ScheduledQueryRule_STATUS but received %T instead", status) -} - var _ genruntime.KubernetesResource = &ScheduledQueryRule{} // AzureName returns the Azure name of the resource @@ -132,9 +135,9 @@ func (rule *ScheduledQueryRule) AzureName() string { return rule.Spec.AzureName } -// GetAPIVersion returns the ARM API version of the resource. This is always "2023-12-01" +// GetAPIVersion returns the ARM API version of the resource. This is always "2024-01-01-preview" func (rule ScheduledQueryRule) GetAPIVersion() string { - return "2023-12-01" + return "2024-01-01-preview" } // GetResourceScope returns the scope of the resource @@ -200,7 +203,7 @@ func (rule *ScheduledQueryRule) SetStatus(status genruntime.ConvertibleStatus) e return nil } -// +kubebuilder:webhook:path=/validate-insights-azure-com-v1api20231201-scheduledqueryrule,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=scheduledqueryrules,verbs=create;update,versions=v1api20231201,name=validate.v1api20231201.scheduledqueryrules.insights.azure.com,admissionReviewVersions=v1 +// +kubebuilder:webhook:path=/validate-insights-azure-com-v1api20240101preview-scheduledqueryrule,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=insights.azure.com,resources=scheduledqueryrules,verbs=create;update,versions=v1api20240101preview,name=validate.v1api20240101preview.scheduledqueryrules.insights.azure.com,admissionReviewVersions=v1 var _ admission.Validator = &ScheduledQueryRule{} @@ -366,7 +369,7 @@ func (rule *ScheduledQueryRule) OriginalGVK() *schema.GroupVersionKind { // +kubebuilder:object:root=true // Generator information: -// - Generated from: /monitor/resource-manager/Microsoft.Insights/stable/2023-12-01/scheduledQueryRule_API.json +// - Generated from: /monitor/resource-manager/Microsoft.Insights/preview/2024-01-01-preview/scheduledQueryRule_API.json // - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName} type ScheduledQueryRuleList struct { metav1.TypeMeta `json:",inline"` @@ -374,10 +377,10 @@ type ScheduledQueryRuleList struct { Items []ScheduledQueryRule `json:"items"` } -// +kubebuilder:validation:Enum={"2023-12-01"} +// +kubebuilder:validation:Enum={"2024-01-01-preview"} type APIVersion string -const APIVersion_Value = APIVersion("2023-12-01") +const APIVersion_Value = APIVersion("2024-01-01-preview") type ScheduledQueryRule_Spec struct { // Actions: Actions to invoke when the alert fires. @@ -1222,136 +1225,6 @@ func (rule *ScheduledQueryRule_Spec) AssignProperties_To_ScheduledQueryRule_Spec return nil } -// Initialize_From_ScheduledQueryRule_STATUS populates our ScheduledQueryRule_Spec from the provided source ScheduledQueryRule_STATUS -func (rule *ScheduledQueryRule_Spec) Initialize_From_ScheduledQueryRule_STATUS(source *ScheduledQueryRule_STATUS) error { - - // Actions - if source.Actions != nil { - var action Actions - err := action.Initialize_From_Actions_STATUS(source.Actions) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_Actions_STATUS() to populate field Actions") - } - rule.Actions = &action - } else { - rule.Actions = nil - } - - // AutoMitigate - if source.AutoMitigate != nil { - autoMitigate := *source.AutoMitigate - rule.AutoMitigate = &autoMitigate - } else { - rule.AutoMitigate = nil - } - - // CheckWorkspaceAlertsStorageConfigured - if source.CheckWorkspaceAlertsStorageConfigured != nil { - checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured - rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured - } else { - rule.CheckWorkspaceAlertsStorageConfigured = nil - } - - // Criteria - if source.Criteria != nil { - var criterion ScheduledQueryRuleCriteria - err := criterion.Initialize_From_ScheduledQueryRuleCriteria_STATUS(source.Criteria) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") - } - rule.Criteria = &criterion - } else { - rule.Criteria = nil - } - - // Description - rule.Description = genruntime.ClonePointerToString(source.Description) - - // DisplayName - rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) - - // Enabled - if source.Enabled != nil { - enabled := *source.Enabled - rule.Enabled = &enabled - } else { - rule.Enabled = nil - } - - // EvaluationFrequency - rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) - - // Identity - if source.Identity != nil { - var identity Identity - err := identity.Initialize_From_Identity_STATUS(source.Identity) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_Identity_STATUS() to populate field Identity") - } - rule.Identity = &identity - } else { - rule.Identity = nil - } - - // Kind - if source.Kind != nil { - kind := genruntime.ToEnum(string(*source.Kind), scheduledQueryRule_Kind_Spec_Values) - rule.Kind = &kind - } else { - rule.Kind = nil - } - - // Location - rule.Location = genruntime.ClonePointerToString(source.Location) - - // MuteActionsDuration - rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) - - // OverrideQueryTimeRange - rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) - - // ResolveConfiguration - if source.ResolveConfiguration != nil { - var resolveConfiguration RuleResolveConfiguration - err := resolveConfiguration.Initialize_From_RuleResolveConfiguration_STATUS(source.ResolveConfiguration) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_RuleResolveConfiguration_STATUS() to populate field ResolveConfiguration") - } - rule.ResolveConfiguration = &resolveConfiguration - } else { - rule.ResolveConfiguration = nil - } - - // Severity - if source.Severity != nil { - severity := ScheduledQueryRuleProperties_Severity(*source.Severity) - rule.Severity = &severity - } else { - rule.Severity = nil - } - - // SkipQueryValidation - if source.SkipQueryValidation != nil { - skipQueryValidation := *source.SkipQueryValidation - rule.SkipQueryValidation = &skipQueryValidation - } else { - rule.SkipQueryValidation = nil - } - - // Tags - rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) - - // TargetResourceTypes - rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) - - // WindowSize - rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) - - // No error - return nil -} - // OriginalVersion returns the original API version used to create the resource. func (rule *ScheduledQueryRule_Spec) OriginalVersion() string { return GroupVersion.Version @@ -2300,19 +2173,6 @@ func (actions *Actions) AssignProperties_To_Actions(destination *storage.Actions return nil } -// Initialize_From_Actions_STATUS populates our Actions from the provided source Actions_STATUS -func (actions *Actions) Initialize_From_Actions_STATUS(source *Actions_STATUS) error { - - // ActionProperties - actions.ActionProperties = genruntime.CloneMapOfStringToString(source.ActionProperties) - - // CustomProperties - actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) - - // No error - return nil -} - // Actions to invoke when the alert fires. type Actions_STATUS struct { // ActionGroups: Action Group resource Ids to invoke when the alert fires. @@ -2549,33 +2409,6 @@ func (identity *Identity) AssignProperties_To_Identity(destination *storage.Iden return nil } -// Initialize_From_Identity_STATUS populates our Identity from the provided source Identity_STATUS -func (identity *Identity) Initialize_From_Identity_STATUS(source *Identity_STATUS) error { - - // Type - if source.Type != nil { - typeVar := genruntime.ToEnum(string(*source.Type), identity_Type_Values) - identity.Type = &typeVar - } else { - identity.Type = nil - } - - // UserAssignedIdentities - if source.UserAssignedIdentities != nil { - userAssignedIdentityList := make([]UserAssignedIdentityDetails, 0, len(source.UserAssignedIdentities)) - for userAssignedIdentitiesKey := range source.UserAssignedIdentities { - userAssignedIdentitiesRef := genruntime.CreateResourceReferenceFromARMID(userAssignedIdentitiesKey) - userAssignedIdentityList = append(userAssignedIdentityList, UserAssignedIdentityDetails{Reference: userAssignedIdentitiesRef}) - } - identity.UserAssignedIdentities = userAssignedIdentityList - } else { - identity.UserAssignedIdentities = nil - } - - // No error - return nil -} - // Identity for the resource. type Identity_STATUS struct { // PrincipalId: The principal ID of resource identity. @@ -2838,24 +2671,6 @@ func (configuration *RuleResolveConfiguration) AssignProperties_To_RuleResolveCo return nil } -// Initialize_From_RuleResolveConfiguration_STATUS populates our RuleResolveConfiguration from the provided source RuleResolveConfiguration_STATUS -func (configuration *RuleResolveConfiguration) Initialize_From_RuleResolveConfiguration_STATUS(source *RuleResolveConfiguration_STATUS) error { - - // AutoResolved - if source.AutoResolved != nil { - autoResolved := *source.AutoResolved - configuration.AutoResolved = &autoResolved - } else { - configuration.AutoResolved = nil - } - - // TimeToResolve - configuration.TimeToResolve = genruntime.ClonePointerToString(source.TimeToResolve) - - // No error - return nil -} - // TBD. Relevant only for rules of the kind LogAlert. type RuleResolveConfiguration_STATUS struct { // AutoResolved: The flag that indicates whether or not to auto resolve a fired alert. @@ -2941,31 +2756,35 @@ func (configuration *RuleResolveConfiguration_STATUS) AssignProperties_To_RuleRe return nil } -// +kubebuilder:validation:Enum={"LogAlert","LogToMetric"} +// +kubebuilder:validation:Enum={"EventLogAlert","LogAlert","LogToMetric"} type ScheduledQueryRule_Kind_Spec string const ( - ScheduledQueryRule_Kind_Spec_LogAlert = ScheduledQueryRule_Kind_Spec("LogAlert") - ScheduledQueryRule_Kind_Spec_LogToMetric = ScheduledQueryRule_Kind_Spec("LogToMetric") + ScheduledQueryRule_Kind_Spec_EventLogAlert = ScheduledQueryRule_Kind_Spec("EventLogAlert") + ScheduledQueryRule_Kind_Spec_LogAlert = ScheduledQueryRule_Kind_Spec("LogAlert") + ScheduledQueryRule_Kind_Spec_LogToMetric = ScheduledQueryRule_Kind_Spec("LogToMetric") ) // Mapping from string to ScheduledQueryRule_Kind_Spec var scheduledQueryRule_Kind_Spec_Values = map[string]ScheduledQueryRule_Kind_Spec{ - "logalert": ScheduledQueryRule_Kind_Spec_LogAlert, - "logtometric": ScheduledQueryRule_Kind_Spec_LogToMetric, + "eventlogalert": ScheduledQueryRule_Kind_Spec_EventLogAlert, + "logalert": ScheduledQueryRule_Kind_Spec_LogAlert, + "logtometric": ScheduledQueryRule_Kind_Spec_LogToMetric, } type ScheduledQueryRule_Kind_STATUS string const ( - ScheduledQueryRule_Kind_STATUS_LogAlert = ScheduledQueryRule_Kind_STATUS("LogAlert") - ScheduledQueryRule_Kind_STATUS_LogToMetric = ScheduledQueryRule_Kind_STATUS("LogToMetric") + ScheduledQueryRule_Kind_STATUS_EventLogAlert = ScheduledQueryRule_Kind_STATUS("EventLogAlert") + ScheduledQueryRule_Kind_STATUS_LogAlert = ScheduledQueryRule_Kind_STATUS("LogAlert") + ScheduledQueryRule_Kind_STATUS_LogToMetric = ScheduledQueryRule_Kind_STATUS("LogToMetric") ) // Mapping from string to ScheduledQueryRule_Kind_STATUS var scheduledQueryRule_Kind_STATUS_Values = map[string]ScheduledQueryRule_Kind_STATUS{ - "logalert": ScheduledQueryRule_Kind_STATUS_LogAlert, - "logtometric": ScheduledQueryRule_Kind_STATUS_LogToMetric, + "eventlogalert": ScheduledQueryRule_Kind_STATUS_EventLogAlert, + "logalert": ScheduledQueryRule_Kind_STATUS_LogAlert, + "logtometric": ScheduledQueryRule_Kind_STATUS_LogToMetric, } // The rule criteria that defines the conditions of the scheduled query rule. @@ -3079,31 +2898,6 @@ func (criteria *ScheduledQueryRuleCriteria) AssignProperties_To_ScheduledQueryRu return nil } -// Initialize_From_ScheduledQueryRuleCriteria_STATUS populates our ScheduledQueryRuleCriteria from the provided source ScheduledQueryRuleCriteria_STATUS -func (criteria *ScheduledQueryRuleCriteria) Initialize_From_ScheduledQueryRuleCriteria_STATUS(source *ScheduledQueryRuleCriteria_STATUS) error { - - // AllOf - if source.AllOf != nil { - allOfList := make([]Condition, len(source.AllOf)) - for allOfIndex, allOfItem := range source.AllOf { - // Shadow the loop variable to avoid aliasing - allOfItem := allOfItem - var allOf Condition - err := allOf.Initialize_From_Condition_STATUS(&allOfItem) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_Condition_STATUS() to populate field AllOf") - } - allOfList[allOfIndex] = allOf - } - criteria.AllOf = allOfList - } else { - criteria.AllOf = nil - } - - // No error - return nil -} - // The rule criteria that defines the conditions of the scheduled query rule. type ScheduledQueryRuleCriteria_STATUS struct { // AllOf: A list of conditions to evaluate against the specified scopes @@ -3484,6 +3278,14 @@ func (data *SystemData_STATUS) AssignProperties_To_SystemData_STATUS(destination // A condition of the scheduled query rule. type Condition struct { + // AlertSensitivity: The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. + // This will affect how tight the threshold is to the metric series pattern. Relevant and required only for dynamic + // threshold rules of the kind LogAlert. + AlertSensitivity *string `json:"alertSensitivity,omitempty"` + + // CriterionType: Specifies the type of threshold criteria + CriterionType *Condition_CriterionType `json:"criterionType,omitempty"` + // Dimensions: List of Dimensions conditions Dimensions []Dimension `json:"dimensions,omitempty"` @@ -3491,6 +3293,10 @@ type Condition struct { // alert. Relevant only for rules of the kind LogAlert. FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` + // IgnoreDataBefore: Use this option to set the date from which to start learning the metric historical data and calculate + // the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert. + IgnoreDataBefore *string `json:"ignoreDataBefore,omitempty"` + // MetricMeasureColumn: The column containing the metric measure number. Relevant only for rules of the kind LogAlert. MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` @@ -3507,8 +3313,8 @@ type Condition struct { // resource id. Relevant only for rules of the kind LogAlert. ResourceIdColumnReference *genruntime.ResourceReference `armReference:"ResourceIdColumn" json:"resourceIdColumnReference,omitempty"` - // Threshold: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind - // LogAlert. + // Threshold: the criteria threshold value that activates the alert. Relevant and required only for static threshold rules + // of the kind LogAlert. Threshold *float64 `json:"threshold,omitempty"` // TimeAggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert. @@ -3524,6 +3330,20 @@ func (condition *Condition) ConvertToARM(resolved genruntime.ConvertToARMResolve } result := &arm.Condition{} + // Set property "AlertSensitivity": + if condition.AlertSensitivity != nil { + alertSensitivity := *condition.AlertSensitivity + result.AlertSensitivity = &alertSensitivity + } + + // Set property "CriterionType": + if condition.CriterionType != nil { + var temp string + temp = string(*condition.CriterionType) + criterionType := arm.Condition_CriterionType(temp) + result.CriterionType = &criterionType + } + // Set property "Dimensions": for _, item := range condition.Dimensions { item_ARM, err := item.ConvertToARM(resolved) @@ -3543,6 +3363,12 @@ func (condition *Condition) ConvertToARM(resolved genruntime.ConvertToARMResolve result.FailingPeriods = &failingPeriods } + // Set property "IgnoreDataBefore": + if condition.IgnoreDataBefore != nil { + ignoreDataBefore := *condition.IgnoreDataBefore + result.IgnoreDataBefore = &ignoreDataBefore + } + // Set property "MetricMeasureColumn": if condition.MetricMeasureColumn != nil { metricMeasureColumn := *condition.MetricMeasureColumn @@ -3607,6 +3433,20 @@ func (condition *Condition) PopulateFromARM(owner genruntime.ArbitraryOwnerRefer return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Condition, got %T", armInput) } + // Set property "AlertSensitivity": + if typedInput.AlertSensitivity != nil { + alertSensitivity := *typedInput.AlertSensitivity + condition.AlertSensitivity = &alertSensitivity + } + + // Set property "CriterionType": + if typedInput.CriterionType != nil { + var temp string + temp = string(*typedInput.CriterionType) + criterionType := Condition_CriterionType(temp) + condition.CriterionType = &criterionType + } + // Set property "Dimensions": for _, item := range typedInput.Dimensions { var item1 Dimension @@ -3628,6 +3468,12 @@ func (condition *Condition) PopulateFromARM(owner genruntime.ArbitraryOwnerRefer condition.FailingPeriods = &failingPeriods } + // Set property "IgnoreDataBefore": + if typedInput.IgnoreDataBefore != nil { + ignoreDataBefore := *typedInput.IgnoreDataBefore + condition.IgnoreDataBefore = &ignoreDataBefore + } + // Set property "MetricMeasureColumn": if typedInput.MetricMeasureColumn != nil { metricMeasureColumn := *typedInput.MetricMeasureColumn @@ -3677,6 +3523,18 @@ func (condition *Condition) PopulateFromARM(owner genruntime.ArbitraryOwnerRefer // AssignProperties_From_Condition populates our Condition from the provided source Condition func (condition *Condition) AssignProperties_From_Condition(source *storage.Condition) error { + // AlertSensitivity + condition.AlertSensitivity = genruntime.ClonePointerToString(source.AlertSensitivity) + + // CriterionType + if source.CriterionType != nil { + criterionType := *source.CriterionType + criterionTypeTemp := genruntime.ToEnum(criterionType, condition_CriterionType_Values) + condition.CriterionType = &criterionTypeTemp + } else { + condition.CriterionType = nil + } + // Dimensions if source.Dimensions != nil { dimensionList := make([]Dimension, len(source.Dimensions)) @@ -3707,6 +3565,9 @@ func (condition *Condition) AssignProperties_From_Condition(source *storage.Cond condition.FailingPeriods = nil } + // IgnoreDataBefore + condition.IgnoreDataBefore = genruntime.ClonePointerToString(source.IgnoreDataBefore) + // MetricMeasureColumn condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) @@ -3759,6 +3620,17 @@ func (condition *Condition) AssignProperties_To_Condition(destination *storage.C // Create a new property bag propertyBag := genruntime.NewPropertyBag() + // AlertSensitivity + destination.AlertSensitivity = genruntime.ClonePointerToString(condition.AlertSensitivity) + + // CriterionType + if condition.CriterionType != nil { + criterionType := string(*condition.CriterionType) + destination.CriterionType = &criterionType + } else { + destination.CriterionType = nil + } + // Dimensions if condition.Dimensions != nil { dimensionList := make([]storage.Dimension, len(condition.Dimensions)) @@ -3789,6 +3661,9 @@ func (condition *Condition) AssignProperties_To_Condition(destination *storage.C destination.FailingPeriods = nil } + // IgnoreDataBefore + destination.IgnoreDataBefore = genruntime.ClonePointerToString(condition.IgnoreDataBefore) + // MetricMeasureColumn destination.MetricMeasureColumn = genruntime.ClonePointerToString(condition.MetricMeasureColumn) @@ -3841,78 +3716,16 @@ func (condition *Condition) AssignProperties_To_Condition(destination *storage.C return nil } -// Initialize_From_Condition_STATUS populates our Condition from the provided source Condition_STATUS -func (condition *Condition) Initialize_From_Condition_STATUS(source *Condition_STATUS) error { - - // Dimensions - if source.Dimensions != nil { - dimensionList := make([]Dimension, len(source.Dimensions)) - for dimensionIndex, dimensionItem := range source.Dimensions { - // Shadow the loop variable to avoid aliasing - dimensionItem := dimensionItem - var dimension Dimension - err := dimension.Initialize_From_Dimension_STATUS(&dimensionItem) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_Dimension_STATUS() to populate field Dimensions") - } - dimensionList[dimensionIndex] = dimension - } - condition.Dimensions = dimensionList - } else { - condition.Dimensions = nil - } - - // FailingPeriods - if source.FailingPeriods != nil { - var failingPeriod Condition_FailingPeriods - err := failingPeriod.Initialize_From_Condition_FailingPeriods_STATUS(source.FailingPeriods) - if err != nil { - return eris.Wrap(err, "calling Initialize_From_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") - } - condition.FailingPeriods = &failingPeriod - } else { - condition.FailingPeriods = nil - } - - // MetricMeasureColumn - condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) - - // MetricName - condition.MetricName = genruntime.ClonePointerToString(source.MetricName) - - // Operator - if source.Operator != nil { - operator := genruntime.ToEnum(string(*source.Operator), condition_Operator_Values) - condition.Operator = &operator - } else { - condition.Operator = nil - } - - // Query - condition.Query = genruntime.ClonePointerToString(source.Query) - - // Threshold - if source.Threshold != nil { - threshold := *source.Threshold - condition.Threshold = &threshold - } else { - condition.Threshold = nil - } - - // TimeAggregation - if source.TimeAggregation != nil { - timeAggregation := genruntime.ToEnum(string(*source.TimeAggregation), condition_TimeAggregation_Values) - condition.TimeAggregation = &timeAggregation - } else { - condition.TimeAggregation = nil - } - - // No error - return nil -} - // A condition of the scheduled query rule. type Condition_STATUS struct { + // AlertSensitivity: The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. + // This will affect how tight the threshold is to the metric series pattern. Relevant and required only for dynamic + // threshold rules of the kind LogAlert. + AlertSensitivity *string `json:"alertSensitivity,omitempty"` + + // CriterionType: Specifies the type of threshold criteria + CriterionType *Condition_CriterionType_STATUS `json:"criterionType,omitempty"` + // Dimensions: List of Dimensions conditions Dimensions []Dimension_STATUS `json:"dimensions,omitempty"` @@ -3920,6 +3733,10 @@ type Condition_STATUS struct { // alert. Relevant only for rules of the kind LogAlert. FailingPeriods *Condition_FailingPeriods_STATUS `json:"failingPeriods,omitempty"` + // IgnoreDataBefore: Use this option to set the date from which to start learning the metric historical data and calculate + // the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert. + IgnoreDataBefore *string `json:"ignoreDataBefore,omitempty"` + // MetricMeasureColumn: The column containing the metric measure number. Relevant only for rules of the kind LogAlert. MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` @@ -3936,8 +3753,8 @@ type Condition_STATUS struct { // id. Relevant only for rules of the kind LogAlert. ResourceIdColumn *string `json:"resourceIdColumn,omitempty"` - // Threshold: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind - // LogAlert. + // Threshold: the criteria threshold value that activates the alert. Relevant and required only for static threshold rules + // of the kind LogAlert. Threshold *float64 `json:"threshold,omitempty"` // TimeAggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert. @@ -3958,6 +3775,20 @@ func (condition *Condition_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwn return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Condition_STATUS, got %T", armInput) } + // Set property "AlertSensitivity": + if typedInput.AlertSensitivity != nil { + alertSensitivity := *typedInput.AlertSensitivity + condition.AlertSensitivity = &alertSensitivity + } + + // Set property "CriterionType": + if typedInput.CriterionType != nil { + var temp string + temp = string(*typedInput.CriterionType) + criterionType := Condition_CriterionType_STATUS(temp) + condition.CriterionType = &criterionType + } + // Set property "Dimensions": for _, item := range typedInput.Dimensions { var item1 Dimension_STATUS @@ -3979,6 +3810,12 @@ func (condition *Condition_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwn condition.FailingPeriods = &failingPeriods } + // Set property "IgnoreDataBefore": + if typedInput.IgnoreDataBefore != nil { + ignoreDataBefore := *typedInput.IgnoreDataBefore + condition.IgnoreDataBefore = &ignoreDataBefore + } + // Set property "MetricMeasureColumn": if typedInput.MetricMeasureColumn != nil { metricMeasureColumn := *typedInput.MetricMeasureColumn @@ -4032,6 +3869,18 @@ func (condition *Condition_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwn // AssignProperties_From_Condition_STATUS populates our Condition_STATUS from the provided source Condition_STATUS func (condition *Condition_STATUS) AssignProperties_From_Condition_STATUS(source *storage.Condition_STATUS) error { + // AlertSensitivity + condition.AlertSensitivity = genruntime.ClonePointerToString(source.AlertSensitivity) + + // CriterionType + if source.CriterionType != nil { + criterionType := *source.CriterionType + criterionTypeTemp := genruntime.ToEnum(criterionType, condition_CriterionType_STATUS_Values) + condition.CriterionType = &criterionTypeTemp + } else { + condition.CriterionType = nil + } + // Dimensions if source.Dimensions != nil { dimensionList := make([]Dimension_STATUS, len(source.Dimensions)) @@ -4062,6 +3911,9 @@ func (condition *Condition_STATUS) AssignProperties_From_Condition_STATUS(source condition.FailingPeriods = nil } + // IgnoreDataBefore + condition.IgnoreDataBefore = genruntime.ClonePointerToString(source.IgnoreDataBefore) + // MetricMeasureColumn condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) @@ -4109,6 +3961,17 @@ func (condition *Condition_STATUS) AssignProperties_To_Condition_STATUS(destinat // Create a new property bag propertyBag := genruntime.NewPropertyBag() + // AlertSensitivity + destination.AlertSensitivity = genruntime.ClonePointerToString(condition.AlertSensitivity) + + // CriterionType + if condition.CriterionType != nil { + criterionType := string(*condition.CriterionType) + destination.CriterionType = &criterionType + } else { + destination.CriterionType = nil + } + // Dimensions if condition.Dimensions != nil { dimensionList := make([]storage.Dimension_STATUS, len(condition.Dimensions)) @@ -4139,6 +4002,9 @@ func (condition *Condition_STATUS) AssignProperties_To_Condition_STATUS(destinat destination.FailingPeriods = nil } + // IgnoreDataBefore + destination.IgnoreDataBefore = genruntime.ClonePointerToString(condition.IgnoreDataBefore) + // MetricMeasureColumn destination.MetricMeasureColumn = genruntime.ClonePointerToString(condition.MetricMeasureColumn) @@ -4359,6 +4225,33 @@ func (properties *UserIdentityProperties_STATUS) AssignProperties_To_UserIdentit return nil } +// +kubebuilder:validation:Enum={"DynamicThresholdCriterion","StaticThresholdCriterion"} +type Condition_CriterionType string + +const ( + Condition_CriterionType_DynamicThresholdCriterion = Condition_CriterionType("DynamicThresholdCriterion") + Condition_CriterionType_StaticThresholdCriterion = Condition_CriterionType("StaticThresholdCriterion") +) + +// Mapping from string to Condition_CriterionType +var condition_CriterionType_Values = map[string]Condition_CriterionType{ + "dynamicthresholdcriterion": Condition_CriterionType_DynamicThresholdCriterion, + "staticthresholdcriterion": Condition_CriterionType_StaticThresholdCriterion, +} + +type Condition_CriterionType_STATUS string + +const ( + Condition_CriterionType_STATUS_DynamicThresholdCriterion = Condition_CriterionType_STATUS("DynamicThresholdCriterion") + Condition_CriterionType_STATUS_StaticThresholdCriterion = Condition_CriterionType_STATUS("StaticThresholdCriterion") +) + +// Mapping from string to Condition_CriterionType_STATUS +var condition_CriterionType_STATUS_Values = map[string]Condition_CriterionType_STATUS{ + "dynamicthresholdcriterion": Condition_CriterionType_STATUS_DynamicThresholdCriterion, + "staticthresholdcriterion": Condition_CriterionType_STATUS_StaticThresholdCriterion, +} + type Condition_FailingPeriods struct { // MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to // numberOfEvaluationPeriods. Default value is 1 @@ -4455,19 +4348,6 @@ func (periods *Condition_FailingPeriods) AssignProperties_To_Condition_FailingPe return nil } -// Initialize_From_Condition_FailingPeriods_STATUS populates our Condition_FailingPeriods from the provided source Condition_FailingPeriods_STATUS -func (periods *Condition_FailingPeriods) Initialize_From_Condition_FailingPeriods_STATUS(source *Condition_FailingPeriods_STATUS) error { - - // MinFailingPeriodsToAlert - periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) - - // NumberOfEvaluationPeriods - periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) - - // No error - return nil -} - type Condition_FailingPeriods_STATUS struct { // MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to // numberOfEvaluationPeriods. Default value is 1 @@ -4543,11 +4423,12 @@ func (periods *Condition_FailingPeriods_STATUS) AssignProperties_To_Condition_Fa return nil } -// +kubebuilder:validation:Enum={"Equals","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual"} +// +kubebuilder:validation:Enum={"Equals","GreaterOrLessThan","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual"} type Condition_Operator string const ( Condition_Operator_Equals = Condition_Operator("Equals") + Condition_Operator_GreaterOrLessThan = Condition_Operator("GreaterOrLessThan") Condition_Operator_GreaterThan = Condition_Operator("GreaterThan") Condition_Operator_GreaterThanOrEqual = Condition_Operator("GreaterThanOrEqual") Condition_Operator_LessThan = Condition_Operator("LessThan") @@ -4557,6 +4438,7 @@ const ( // Mapping from string to Condition_Operator var condition_Operator_Values = map[string]Condition_Operator{ "equals": Condition_Operator_Equals, + "greaterorlessthan": Condition_Operator_GreaterOrLessThan, "greaterthan": Condition_Operator_GreaterThan, "greaterthanorequal": Condition_Operator_GreaterThanOrEqual, "lessthan": Condition_Operator_LessThan, @@ -4567,6 +4449,7 @@ type Condition_Operator_STATUS string const ( Condition_Operator_STATUS_Equals = Condition_Operator_STATUS("Equals") + Condition_Operator_STATUS_GreaterOrLessThan = Condition_Operator_STATUS("GreaterOrLessThan") Condition_Operator_STATUS_GreaterThan = Condition_Operator_STATUS("GreaterThan") Condition_Operator_STATUS_GreaterThanOrEqual = Condition_Operator_STATUS("GreaterThanOrEqual") Condition_Operator_STATUS_LessThan = Condition_Operator_STATUS("LessThan") @@ -4576,6 +4459,7 @@ const ( // Mapping from string to Condition_Operator_STATUS var condition_Operator_STATUS_Values = map[string]Condition_Operator_STATUS{ "equals": Condition_Operator_STATUS_Equals, + "greaterorlessthan": Condition_Operator_STATUS_GreaterOrLessThan, "greaterthan": Condition_Operator_STATUS_GreaterThan, "greaterthanorequal": Condition_Operator_STATUS_GreaterThanOrEqual, "lessthan": Condition_Operator_STATUS_LessThan, @@ -4753,27 +4637,6 @@ func (dimension *Dimension) AssignProperties_To_Dimension(destination *storage.D return nil } -// Initialize_From_Dimension_STATUS populates our Dimension from the provided source Dimension_STATUS -func (dimension *Dimension) Initialize_From_Dimension_STATUS(source *Dimension_STATUS) error { - - // Name - dimension.Name = genruntime.ClonePointerToString(source.Name) - - // Operator - if source.Operator != nil { - operator := genruntime.ToEnum(string(*source.Operator), dimension_Operator_Values) - dimension.Operator = &operator - } else { - dimension.Operator = nil - } - - // Values - dimension.Values = genruntime.CloneSliceOfString(source.Values) - - // No error - return nil -} - // Dimension splitting and filtering definition type Dimension_STATUS struct { // Name: Name of the dimension diff --git a/v2/api/insights/v1api20231201/scheduled_query_rule_types_gen_test.go b/v2/api/insights/v1api20240101preview/scheduled_query_rule_types_gen_test.go similarity index 97% rename from v2/api/insights/v1api20231201/scheduled_query_rule_types_gen_test.go rename to v2/api/insights/v1api20240101preview/scheduled_query_rule_types_gen_test.go index b2aa7a04927..62cf1655b8c 100644 --- a/v2/api/insights/v1api20231201/scheduled_query_rule_types_gen_test.go +++ b/v2/api/insights/v1api20240101preview/scheduled_query_rule_types_gen_test.go @@ -1,11 +1,12 @@ // Code generated by azure-service-operator-codegen. DO NOT EDIT. // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -package v1api20231201 +package v1api20240101preview import ( "encoding/json" - storage "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" + v20240101ps "github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -35,7 +36,7 @@ func RunPropertyAssignmentTestForActions(subject Actions) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Actions + var other v20240101ps.Actions err := copied.AssignProperties_To_Actions(&other) if err != nil { return err.Error() @@ -142,7 +143,7 @@ func RunPropertyAssignmentTestForActions_STATUS(subject Actions_STATUS) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Actions_STATUS + var other v20240101ps.Actions_STATUS err := copied.AssignProperties_To_Actions_STATUS(&other) if err != nil { return err.Error() @@ -250,7 +251,7 @@ func RunPropertyAssignmentTestForCondition(subject Condition) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Condition + var other v20240101ps.Condition err := copied.AssignProperties_To_Condition(&other) if err != nil { return err.Error() @@ -341,10 +342,14 @@ func ConditionGenerator() gopter.Gen { // AddIndependentPropertyGeneratorsForCondition is a factory method for creating gopter generators func AddIndependentPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { + gens["AlertSensitivity"] = gen.PtrOf(gen.AlphaString()) + gens["CriterionType"] = gen.PtrOf(gen.OneConstOf(Condition_CriterionType_DynamicThresholdCriterion, Condition_CriterionType_StaticThresholdCriterion)) + gens["IgnoreDataBefore"] = gen.PtrOf(gen.AlphaString()) gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) gens["MetricName"] = gen.PtrOf(gen.AlphaString()) gens["Operator"] = gen.PtrOf(gen.OneConstOf( Condition_Operator_Equals, + Condition_Operator_GreaterOrLessThan, Condition_Operator_GreaterThan, Condition_Operator_GreaterThanOrEqual, Condition_Operator_LessThan, @@ -382,7 +387,7 @@ func RunPropertyAssignmentTestForCondition_FailingPeriods(subject Condition_Fail copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Condition_FailingPeriods + var other v20240101ps.Condition_FailingPeriods err := copied.AssignProperties_To_Condition_FailingPeriods(&other) if err != nil { return err.Error() @@ -486,7 +491,7 @@ func RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS(subject Conditi copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Condition_FailingPeriods_STATUS + var other v20240101ps.Condition_FailingPeriods_STATUS err := copied.AssignProperties_To_Condition_FailingPeriods_STATUS(&other) if err != nil { return err.Error() @@ -590,7 +595,7 @@ func RunPropertyAssignmentTestForCondition_STATUS(subject Condition_STATUS) stri copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Condition_STATUS + var other v20240101ps.Condition_STATUS err := copied.AssignProperties_To_Condition_STATUS(&other) if err != nil { return err.Error() @@ -681,10 +686,14 @@ func Condition_STATUSGenerator() gopter.Gen { // AddIndependentPropertyGeneratorsForCondition_STATUS is a factory method for creating gopter generators func AddIndependentPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) { + gens["AlertSensitivity"] = gen.PtrOf(gen.AlphaString()) + gens["CriterionType"] = gen.PtrOf(gen.OneConstOf(Condition_CriterionType_STATUS_DynamicThresholdCriterion, Condition_CriterionType_STATUS_StaticThresholdCriterion)) + gens["IgnoreDataBefore"] = gen.PtrOf(gen.AlphaString()) gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) gens["MetricName"] = gen.PtrOf(gen.AlphaString()) gens["Operator"] = gen.PtrOf(gen.OneConstOf( Condition_Operator_STATUS_Equals, + Condition_Operator_STATUS_GreaterOrLessThan, Condition_Operator_STATUS_GreaterThan, Condition_Operator_STATUS_GreaterThanOrEqual, Condition_Operator_STATUS_LessThan, @@ -723,7 +732,7 @@ func RunPropertyAssignmentTestForDimension(subject Dimension) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Dimension + var other v20240101ps.Dimension err := copied.AssignProperties_To_Dimension(&other) if err != nil { return err.Error() @@ -827,7 +836,7 @@ func RunPropertyAssignmentTestForDimension_STATUS(subject Dimension_STATUS) stri copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Dimension_STATUS + var other v20240101ps.Dimension_STATUS err := copied.AssignProperties_To_Dimension_STATUS(&other) if err != nil { return err.Error() @@ -931,7 +940,7 @@ func RunPropertyAssignmentTestForIdentity(subject Identity) string { copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Identity + var other v20240101ps.Identity err := copied.AssignProperties_To_Identity(&other) if err != nil { return err.Error() @@ -1047,7 +1056,7 @@ func RunPropertyAssignmentTestForIdentity_STATUS(subject Identity_STATUS) string copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.Identity_STATUS + var other v20240101ps.Identity_STATUS err := copied.AssignProperties_To_Identity_STATUS(&other) if err != nil { return err.Error() @@ -1167,7 +1176,7 @@ func RunPropertyAssignmentTestForRuleResolveConfiguration(subject RuleResolveCon copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.RuleResolveConfiguration + var other v20240101ps.RuleResolveConfiguration err := copied.AssignProperties_To_RuleResolveConfiguration(&other) if err != nil { return err.Error() @@ -1271,7 +1280,7 @@ func RunPropertyAssignmentTestForRuleResolveConfiguration_STATUS(subject RuleRes copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.RuleResolveConfiguration_STATUS + var other v20240101ps.RuleResolveConfiguration_STATUS err := copied.AssignProperties_To_RuleResolveConfiguration_STATUS(&other) if err != nil { return err.Error() @@ -1376,7 +1385,7 @@ func RunResourceConversionTestForScheduledQueryRule(subject ScheduledQueryRule) copied := subject.DeepCopy() // Convert to our hub version - var hub storage.ScheduledQueryRule + var hub v20220615s.ScheduledQueryRule err := copied.ConvertTo(&hub) if err != nil { return err.Error() @@ -1418,7 +1427,7 @@ func RunPropertyAssignmentTestForScheduledQueryRule(subject ScheduledQueryRule) copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRule + var other v20240101ps.ScheduledQueryRule err := copied.AssignProperties_To_ScheduledQueryRule(&other) if err != nil { return err.Error() @@ -1521,7 +1530,7 @@ func RunPropertyAssignmentTestForScheduledQueryRuleCriteria(subject ScheduledQue copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRuleCriteria + var other v20240101ps.ScheduledQueryRuleCriteria err := copied.AssignProperties_To_ScheduledQueryRuleCriteria(&other) if err != nil { return err.Error() @@ -1624,7 +1633,7 @@ func RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS(subject Sched copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRuleCriteria_STATUS + var other v20240101ps.ScheduledQueryRuleCriteria_STATUS err := copied.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&other) if err != nil { return err.Error() @@ -1727,7 +1736,7 @@ func RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec(subject Schedule copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRuleOperatorSpec + var other v20240101ps.ScheduledQueryRuleOperatorSpec err := copied.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&other) if err != nil { return err.Error() @@ -1824,7 +1833,7 @@ func RunPropertyAssignmentTestForScheduledQueryRule_STATUS(subject ScheduledQuer copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRule_STATUS + var other v20240101ps.ScheduledQueryRule_STATUS err := copied.AssignProperties_To_ScheduledQueryRule_STATUS(&other) if err != nil { return err.Error() @@ -1927,7 +1936,7 @@ func AddIndependentPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[strin gens["Id"] = gen.PtrOf(gen.AlphaString()) gens["IsLegacyLogAnalyticsRule"] = gen.PtrOf(gen.Bool()) gens["IsWorkspaceAlertsStorageConfigured"] = gen.PtrOf(gen.Bool()) - gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_STATUS_LogAlert, ScheduledQueryRule_Kind_STATUS_LogToMetric)) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_STATUS_EventLogAlert, ScheduledQueryRule_Kind_STATUS_LogAlert, ScheduledQueryRule_Kind_STATUS_LogToMetric)) gens["Location"] = gen.PtrOf(gen.AlphaString()) gens["MuteActionsDuration"] = gen.PtrOf(gen.AlphaString()) gens["Name"] = gen.PtrOf(gen.AlphaString()) @@ -1974,7 +1983,7 @@ func RunPropertyAssignmentTestForScheduledQueryRule_Spec(subject ScheduledQueryR copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.ScheduledQueryRule_Spec + var other v20240101ps.ScheduledQueryRule_Spec err := copied.AssignProperties_To_ScheduledQueryRule_Spec(&other) if err != nil { return err.Error() @@ -2073,7 +2082,7 @@ func AddIndependentPropertyGeneratorsForScheduledQueryRule_Spec(gens map[string] gens["DisplayName"] = gen.PtrOf(gen.AlphaString()) gens["Enabled"] = gen.PtrOf(gen.Bool()) gens["EvaluationFrequency"] = gen.PtrOf(gen.AlphaString()) - gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_Spec_LogAlert, ScheduledQueryRule_Kind_Spec_LogToMetric)) + gens["Kind"] = gen.PtrOf(gen.OneConstOf(ScheduledQueryRule_Kind_Spec_EventLogAlert, ScheduledQueryRule_Kind_Spec_LogAlert, ScheduledQueryRule_Kind_Spec_LogToMetric)) gens["Location"] = gen.PtrOf(gen.AlphaString()) gens["MuteActionsDuration"] = gen.PtrOf(gen.AlphaString()) gens["OverrideQueryTimeRange"] = gen.PtrOf(gen.AlphaString()) @@ -2117,7 +2126,7 @@ func RunPropertyAssignmentTestForSystemData_STATUS(subject SystemData_STATUS) st copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.SystemData_STATUS + var other v20240101ps.SystemData_STATUS err := copied.AssignProperties_To_SystemData_STATUS(&other) if err != nil { return err.Error() @@ -2232,7 +2241,7 @@ func RunPropertyAssignmentTestForUserAssignedIdentityDetails(subject UserAssigne copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.UserAssignedIdentityDetails + var other v20240101ps.UserAssignedIdentityDetails err := copied.AssignProperties_To_UserAssignedIdentityDetails(&other) if err != nil { return err.Error() @@ -2329,7 +2338,7 @@ func RunPropertyAssignmentTestForUserIdentityProperties_STATUS(subject UserIdent copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other storage.UserIdentityProperties_STATUS + var other v20240101ps.UserIdentityProperties_STATUS err := copied.AssignProperties_To_UserIdentityProperties_STATUS(&other) if err != nil { return err.Error() diff --git a/v2/api/insights/v1api20231201/storage/groupversion_info_gen.go b/v2/api/insights/v1api20240101preview/storage/groupversion_info_gen.go similarity index 91% rename from v2/api/insights/v1api20231201/storage/groupversion_info_gen.go rename to v2/api/insights/v1api20240101preview/storage/groupversion_info_gen.go index 305c92a1045..cd24e1d39db 100644 --- a/v2/api/insights/v1api20231201/storage/groupversion_info_gen.go +++ b/v2/api/insights/v1api20240101preview/storage/groupversion_info_gen.go @@ -10,7 +10,7 @@ Licensed under the MIT license. // All object properties are optional by default, this will be overridden when needed: // +kubebuilder:validation:Optional // +groupName=insights.azure.com -// +versionName=v1api20231201storage +// +versionName=v1api20240101previewstorage package storage import ( @@ -20,7 +20,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "insights.azure.com", Version: "v1api20231201storage"} + GroupVersion = schema.GroupVersion{Group: "insights.azure.com", Version: "v1api20240101previewstorage"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/v2/api/insights/v1api20240101preview/storage/scheduled_query_rule_types_gen.go b/v2/api/insights/v1api20240101preview/storage/scheduled_query_rule_types_gen.go new file mode 100644 index 00000000000..76f2d7f8c22 --- /dev/null +++ b/v2/api/insights/v1api20240101preview/storage/scheduled_query_rule_types_gen.go @@ -0,0 +1,2683 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package storage + +import ( + "fmt" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" + v20221001s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/core" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets" + "github.com/rotisserie/eris" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" +) + +// +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" +// Storage version of v1api20240101preview.ScheduledQueryRule +// Generator information: +// - Generated from: /monitor/resource-manager/Microsoft.Insights/preview/2024-01-01-preview/scheduledQueryRule_API.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName} +type ScheduledQueryRule struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ScheduledQueryRule_Spec `json:"spec,omitempty"` + Status ScheduledQueryRule_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &ScheduledQueryRule{} + +// GetConditions returns the conditions of the resource +func (rule *ScheduledQueryRule) GetConditions() conditions.Conditions { + return rule.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (rule *ScheduledQueryRule) SetConditions(conditions conditions.Conditions) { + rule.Status.Conditions = conditions +} + +var _ conversion.Convertible = &ScheduledQueryRule{} + +// ConvertFrom populates our ScheduledQueryRule from the provided hub ScheduledQueryRule +func (rule *ScheduledQueryRule) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20220615s.ScheduledQueryRule) + if !ok { + return fmt.Errorf("expected insights/v1api20220615/storage/ScheduledQueryRule but received %T instead", hub) + } + + return rule.AssignProperties_From_ScheduledQueryRule(source) +} + +// ConvertTo populates the provided hub ScheduledQueryRule from our ScheduledQueryRule +func (rule *ScheduledQueryRule) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20220615s.ScheduledQueryRule) + if !ok { + return fmt.Errorf("expected insights/v1api20220615/storage/ScheduledQueryRule but received %T instead", hub) + } + + return rule.AssignProperties_To_ScheduledQueryRule(destination) +} + +var _ configmaps.Exporter = &ScheduledQueryRule{} + +// ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property +func (rule *ScheduledQueryRule) ConfigMapDestinationExpressions() []*core.DestinationExpression { + if rule.Spec.OperatorSpec == nil { + return nil + } + return rule.Spec.OperatorSpec.ConfigMapExpressions +} + +var _ secrets.Exporter = &ScheduledQueryRule{} + +// SecretDestinationExpressions returns the Spec.OperatorSpec.SecretExpressions property +func (rule *ScheduledQueryRule) SecretDestinationExpressions() []*core.DestinationExpression { + if rule.Spec.OperatorSpec == nil { + return nil + } + return rule.Spec.OperatorSpec.SecretExpressions +} + +var _ genruntime.KubernetesResource = &ScheduledQueryRule{} + +// AzureName returns the Azure name of the resource +func (rule *ScheduledQueryRule) AzureName() string { + return rule.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2024-01-01-preview" +func (rule ScheduledQueryRule) GetAPIVersion() string { + return "2024-01-01-preview" +} + +// GetResourceScope returns the scope of the resource +func (rule *ScheduledQueryRule) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (rule *ScheduledQueryRule) GetSpec() genruntime.ConvertibleSpec { + return &rule.Spec +} + +// GetStatus returns the status of this resource +func (rule *ScheduledQueryRule) GetStatus() genruntime.ConvertibleStatus { + return &rule.Status +} + +// GetSupportedOperations returns the operations supported by the resource +func (rule *ScheduledQueryRule) 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/scheduledQueryRules" +func (rule *ScheduledQueryRule) GetType() string { + return "Microsoft.Insights/scheduledQueryRules" +} + +// NewEmptyStatus returns a new empty (blank) status +func (rule *ScheduledQueryRule) NewEmptyStatus() genruntime.ConvertibleStatus { + return &ScheduledQueryRule_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (rule *ScheduledQueryRule) Owner() *genruntime.ResourceReference { + if rule.Spec.Owner == nil { + return nil + } + + group, kind := genruntime.LookupOwnerGroupKind(rule.Spec) + return rule.Spec.Owner.AsResourceReference(group, kind) +} + +// SetStatus sets the status of this resource +func (rule *ScheduledQueryRule) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*ScheduledQueryRule_STATUS); ok { + rule.Status = *st + return nil + } + + // Convert status to required version + var st ScheduledQueryRule_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return eris.Wrap(err, "failed to convert status") + } + + rule.Status = st + return nil +} + +// AssignProperties_From_ScheduledQueryRule populates our ScheduledQueryRule from the provided source ScheduledQueryRule +func (rule *ScheduledQueryRule) AssignProperties_From_ScheduledQueryRule(source *v20220615s.ScheduledQueryRule) error { + + // ObjectMeta + rule.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec ScheduledQueryRule_Spec + err := spec.AssignProperties_From_ScheduledQueryRule_Spec(&source.Spec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRule_Spec() to populate field Spec") + } + rule.Spec = spec + + // Status + var status ScheduledQueryRule_STATUS + err = status.AssignProperties_From_ScheduledQueryRule_STATUS(&source.Status) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRule_STATUS() to populate field Status") + } + rule.Status = status + + // Invoke the augmentConversionForScheduledQueryRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRule populates the provided destination ScheduledQueryRule from our ScheduledQueryRule +func (rule *ScheduledQueryRule) AssignProperties_To_ScheduledQueryRule(destination *v20220615s.ScheduledQueryRule) error { + + // ObjectMeta + destination.ObjectMeta = *rule.ObjectMeta.DeepCopy() + + // Spec + var spec v20220615s.ScheduledQueryRule_Spec + err := rule.Spec.AssignProperties_To_ScheduledQueryRule_Spec(&spec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRule_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20220615s.ScheduledQueryRule_STATUS + err = rule.Status.AssignProperties_To_ScheduledQueryRule_STATUS(&status) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRule_STATUS() to populate field Status") + } + destination.Status = status + + // Invoke the augmentConversionForScheduledQueryRule interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return eris.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 (rule *ScheduledQueryRule) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: rule.Spec.OriginalVersion, + Kind: "ScheduledQueryRule", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20240101preview.ScheduledQueryRule +// Generator information: +// - Generated from: /monitor/resource-manager/Microsoft.Insights/preview/2024-01-01-preview/scheduledQueryRule_API.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName} +type ScheduledQueryRuleList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ScheduledQueryRule `json:"items"` +} + +// Storage version of v1api20240101preview.APIVersion +// +kubebuilder:validation:Enum={"2024-01-01-preview"} +type APIVersion string + +const APIVersion_Value = APIVersion("2024-01-01-preview") + +type augmentConversionForScheduledQueryRule interface { + AssignPropertiesFrom(src *v20220615s.ScheduledQueryRule) error + AssignPropertiesTo(dst *v20220615s.ScheduledQueryRule) error +} + +// Storage version of v1api20240101preview.ScheduledQueryRule_Spec +type ScheduledQueryRule_Spec struct { + Actions *Actions `json:"actions,omitempty"` + AutoMitigate *bool `json:"autoMitigate,omitempty"` + + // 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"` + CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` + Criteria *ScheduledQueryRuleCriteria `json:"criteria,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + Identity *Identity `json:"identity,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` + OperatorSpec *ScheduledQueryRuleOperatorSpec `json:"operatorSpec,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,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"` + ResolveConfiguration *RuleResolveConfiguration `json:"resolveConfiguration,omitempty"` + ScopesReferences []genruntime.ResourceReference `armReference:"Scopes" json:"scopesReferences,omitempty"` + Severity *int `json:"severity,omitempty"` + SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` + WindowSize *string `json:"windowSize,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &ScheduledQueryRule_Spec{} + +// ConvertSpecFrom populates our ScheduledQueryRule_Spec from the provided source +func (rule *ScheduledQueryRule_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20220615s.ScheduledQueryRule_Spec) + if ok { + // Populate our instance from source + return rule.AssignProperties_From_ScheduledQueryRule_Spec(src) + } + + // Convert to an intermediate form + src = &v20220615s.ScheduledQueryRule_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = rule.AssignProperties_From_ScheduledQueryRule_Spec(src) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our ScheduledQueryRule_Spec +func (rule *ScheduledQueryRule_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20220615s.ScheduledQueryRule_Spec) + if ok { + // Populate destination from our instance + return rule.AssignProperties_To_ScheduledQueryRule_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20220615s.ScheduledQueryRule_Spec{} + err := rule.AssignProperties_To_ScheduledQueryRule_Spec(dst) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_ScheduledQueryRule_Spec populates our ScheduledQueryRule_Spec from the provided source ScheduledQueryRule_Spec +func (rule *ScheduledQueryRule_Spec) AssignProperties_From_ScheduledQueryRule_Spec(source *v20220615s.ScheduledQueryRule_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Actions + if source.Actions != nil { + var action Actions + err := action.AssignProperties_From_Actions(source.Actions) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Actions() to populate field Actions") + } + rule.Actions = &action + } else { + rule.Actions = nil + } + + // AutoMitigate + if source.AutoMitigate != nil { + autoMitigate := *source.AutoMitigate + rule.AutoMitigate = &autoMitigate + } else { + rule.AutoMitigate = nil + } + + // AzureName + rule.AzureName = source.AzureName + + // CheckWorkspaceAlertsStorageConfigured + if source.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured + rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + rule.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Criteria + if source.Criteria != nil { + var criterion ScheduledQueryRuleCriteria + err := criterion.AssignProperties_From_ScheduledQueryRuleCriteria(source.Criteria) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleCriteria() to populate field Criteria") + } + rule.Criteria = &criterion + } else { + rule.Criteria = nil + } + + // Description + rule.Description = genruntime.ClonePointerToString(source.Description) + + // DisplayName + rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // EvaluationFrequency + rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) + + // Identity + if propertyBag.Contains("Identity") { + var identity Identity + err := propertyBag.Pull("Identity", &identity) + if err != nil { + return eris.Wrap(err, "pulling 'Identity' from propertyBag") + } + + rule.Identity = &identity + } else { + rule.Identity = nil + } + + // Kind + rule.Kind = genruntime.ClonePointerToString(source.Kind) + + // Location + rule.Location = genruntime.ClonePointerToString(source.Location) + + // MuteActionsDuration + rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) + + // OperatorSpec + if source.OperatorSpec != nil { + var operatorSpec ScheduledQueryRuleOperatorSpec + err := operatorSpec.AssignProperties_From_ScheduledQueryRuleOperatorSpec(source.OperatorSpec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleOperatorSpec() to populate field OperatorSpec") + } + rule.OperatorSpec = &operatorSpec + } else { + rule.OperatorSpec = nil + } + + // OriginalVersion + rule.OriginalVersion = source.OriginalVersion + + // OverrideQueryTimeRange + rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + rule.Owner = &owner + } else { + rule.Owner = nil + } + + // ResolveConfiguration + if propertyBag.Contains("ResolveConfiguration") { + var resolveConfiguration RuleResolveConfiguration + err := propertyBag.Pull("ResolveConfiguration", &resolveConfiguration) + if err != nil { + return eris.Wrap(err, "pulling 'ResolveConfiguration' from propertyBag") + } + + rule.ResolveConfiguration = &resolveConfiguration + } else { + rule.ResolveConfiguration = nil + } + + // ScopesReferences + if source.ScopesReferences != nil { + scopesReferenceList := make([]genruntime.ResourceReference, len(source.ScopesReferences)) + for scopesReferenceIndex, scopesReferenceItem := range source.ScopesReferences { + // Shadow the loop variable to avoid aliasing + scopesReferenceItem := scopesReferenceItem + scopesReferenceList[scopesReferenceIndex] = scopesReferenceItem.Copy() + } + rule.ScopesReferences = scopesReferenceList + } else { + rule.ScopesReferences = nil + } + + // Severity + rule.Severity = genruntime.ClonePointerToInt(source.Severity) + + // SkipQueryValidation + if source.SkipQueryValidation != nil { + skipQueryValidation := *source.SkipQueryValidation + rule.SkipQueryValidation = &skipQueryValidation + } else { + rule.SkipQueryValidation = nil + } + + // Tags + rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // TargetResourceTypes + rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) + + // WindowSize + rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRule_Spec interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_Spec); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRule_Spec populates the provided destination ScheduledQueryRule_Spec from our ScheduledQueryRule_Spec +func (rule *ScheduledQueryRule_Spec) AssignProperties_To_ScheduledQueryRule_Spec(destination *v20220615s.ScheduledQueryRule_Spec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // Actions + if rule.Actions != nil { + var action v20220615s.Actions + err := rule.Actions.AssignProperties_To_Actions(&action) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Actions() to populate field Actions") + } + destination.Actions = &action + } else { + destination.Actions = nil + } + + // AutoMitigate + if rule.AutoMitigate != nil { + autoMitigate := *rule.AutoMitigate + destination.AutoMitigate = &autoMitigate + } else { + destination.AutoMitigate = nil + } + + // AzureName + destination.AzureName = rule.AzureName + + // CheckWorkspaceAlertsStorageConfigured + if rule.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *rule.CheckWorkspaceAlertsStorageConfigured + destination.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + destination.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Criteria + if rule.Criteria != nil { + var criterion v20220615s.ScheduledQueryRuleCriteria + err := rule.Criteria.AssignProperties_To_ScheduledQueryRuleCriteria(&criterion) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleCriteria() to populate field Criteria") + } + destination.Criteria = &criterion + } else { + destination.Criteria = nil + } + + // Description + destination.Description = genruntime.ClonePointerToString(rule.Description) + + // DisplayName + destination.DisplayName = genruntime.ClonePointerToString(rule.DisplayName) + + // Enabled + if rule.Enabled != nil { + enabled := *rule.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // EvaluationFrequency + destination.EvaluationFrequency = genruntime.ClonePointerToString(rule.EvaluationFrequency) + + // Identity + if rule.Identity != nil { + propertyBag.Add("Identity", *rule.Identity) + } else { + propertyBag.Remove("Identity") + } + + // Kind + destination.Kind = genruntime.ClonePointerToString(rule.Kind) + + // Location + destination.Location = genruntime.ClonePointerToString(rule.Location) + + // MuteActionsDuration + destination.MuteActionsDuration = genruntime.ClonePointerToString(rule.MuteActionsDuration) + + // OperatorSpec + if rule.OperatorSpec != nil { + var operatorSpec v20220615s.ScheduledQueryRuleOperatorSpec + err := rule.OperatorSpec.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&operatorSpec) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleOperatorSpec() to populate field OperatorSpec") + } + destination.OperatorSpec = &operatorSpec + } else { + destination.OperatorSpec = nil + } + + // OriginalVersion + destination.OriginalVersion = rule.OriginalVersion + + // OverrideQueryTimeRange + destination.OverrideQueryTimeRange = genruntime.ClonePointerToString(rule.OverrideQueryTimeRange) + + // Owner + if rule.Owner != nil { + owner := rule.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // ResolveConfiguration + if rule.ResolveConfiguration != nil { + propertyBag.Add("ResolveConfiguration", *rule.ResolveConfiguration) + } else { + propertyBag.Remove("ResolveConfiguration") + } + + // ScopesReferences + if rule.ScopesReferences != nil { + scopesReferenceList := make([]genruntime.ResourceReference, len(rule.ScopesReferences)) + for scopesReferenceIndex, scopesReferenceItem := range rule.ScopesReferences { + // Shadow the loop variable to avoid aliasing + scopesReferenceItem := scopesReferenceItem + scopesReferenceList[scopesReferenceIndex] = scopesReferenceItem.Copy() + } + destination.ScopesReferences = scopesReferenceList + } else { + destination.ScopesReferences = nil + } + + // Severity + destination.Severity = genruntime.ClonePointerToInt(rule.Severity) + + // SkipQueryValidation + if rule.SkipQueryValidation != nil { + skipQueryValidation := *rule.SkipQueryValidation + destination.SkipQueryValidation = &skipQueryValidation + } else { + destination.SkipQueryValidation = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(rule.Tags) + + // TargetResourceTypes + destination.TargetResourceTypes = genruntime.CloneSliceOfString(rule.TargetResourceTypes) + + // WindowSize + destination.WindowSize = genruntime.ClonePointerToString(rule.WindowSize) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRule_Spec interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_Spec); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.ScheduledQueryRule_STATUS +type ScheduledQueryRule_STATUS struct { + Actions *Actions_STATUS `json:"actions,omitempty"` + AutoMitigate *bool `json:"autoMitigate,omitempty"` + CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"` + Conditions []conditions.Condition `json:"conditions,omitempty"` + CreatedWithApiVersion *string `json:"createdWithApiVersion,omitempty"` + Criteria *ScheduledQueryRuleCriteria_STATUS `json:"criteria,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Etag *string `json:"etag,omitempty"` + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + Id *string `json:"id,omitempty"` + Identity *Identity_STATUS `json:"identity,omitempty"` + IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty"` + IsWorkspaceAlertsStorageConfigured *bool `json:"isWorkspaceAlertsStorageConfigured,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + MuteActionsDuration *string `json:"muteActionsDuration,omitempty"` + Name *string `json:"name,omitempty"` + OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ResolveConfiguration *RuleResolveConfiguration_STATUS `json:"resolveConfiguration,omitempty"` + Scopes []string `json:"scopes,omitempty"` + Severity *int `json:"severity,omitempty"` + SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"` + SystemData *SystemData_STATUS `json:"systemData,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + TargetResourceTypes []string `json:"targetResourceTypes,omitempty"` + Type *string `json:"type,omitempty"` + WindowSize *string `json:"windowSize,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &ScheduledQueryRule_STATUS{} + +// ConvertStatusFrom populates our ScheduledQueryRule_STATUS from the provided source +func (rule *ScheduledQueryRule_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20220615s.ScheduledQueryRule_STATUS) + if ok { + // Populate our instance from source + return rule.AssignProperties_From_ScheduledQueryRule_STATUS(src) + } + + // Convert to an intermediate form + src = &v20220615s.ScheduledQueryRule_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = rule.AssignProperties_From_ScheduledQueryRule_STATUS(src) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20220615s.ScheduledQueryRule_STATUS) + if ok { + // Populate destination from our instance + return rule.AssignProperties_To_ScheduledQueryRule_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20220615s.ScheduledQueryRule_STATUS{} + err := rule.AssignProperties_To_ScheduledQueryRule_STATUS(dst) + if err != nil { + return eris.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return eris.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +// AssignProperties_From_ScheduledQueryRule_STATUS populates our ScheduledQueryRule_STATUS from the provided source ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) AssignProperties_From_ScheduledQueryRule_STATUS(source *v20220615s.ScheduledQueryRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Actions + if source.Actions != nil { + var action Actions_STATUS + err := action.AssignProperties_From_Actions_STATUS(source.Actions) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Actions_STATUS() to populate field Actions") + } + rule.Actions = &action + } else { + rule.Actions = nil + } + + // AutoMitigate + if source.AutoMitigate != nil { + autoMitigate := *source.AutoMitigate + rule.AutoMitigate = &autoMitigate + } else { + rule.AutoMitigate = nil + } + + // CheckWorkspaceAlertsStorageConfigured + if source.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *source.CheckWorkspaceAlertsStorageConfigured + rule.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + rule.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Conditions + rule.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // CreatedWithApiVersion + rule.CreatedWithApiVersion = genruntime.ClonePointerToString(source.CreatedWithApiVersion) + + // Criteria + if source.Criteria != nil { + var criterion ScheduledQueryRuleCriteria_STATUS + err := criterion.AssignProperties_From_ScheduledQueryRuleCriteria_STATUS(source.Criteria) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") + } + rule.Criteria = &criterion + } else { + rule.Criteria = nil + } + + // Description + rule.Description = genruntime.ClonePointerToString(source.Description) + + // DisplayName + rule.DisplayName = genruntime.ClonePointerToString(source.DisplayName) + + // Enabled + if source.Enabled != nil { + enabled := *source.Enabled + rule.Enabled = &enabled + } else { + rule.Enabled = nil + } + + // Etag + rule.Etag = genruntime.ClonePointerToString(source.Etag) + + // EvaluationFrequency + rule.EvaluationFrequency = genruntime.ClonePointerToString(source.EvaluationFrequency) + + // Id + rule.Id = genruntime.ClonePointerToString(source.Id) + + // Identity + if propertyBag.Contains("Identity") { + var identity Identity_STATUS + err := propertyBag.Pull("Identity", &identity) + if err != nil { + return eris.Wrap(err, "pulling 'Identity' from propertyBag") + } + + rule.Identity = &identity + } else { + rule.Identity = nil + } + + // IsLegacyLogAnalyticsRule + if source.IsLegacyLogAnalyticsRule != nil { + isLegacyLogAnalyticsRule := *source.IsLegacyLogAnalyticsRule + rule.IsLegacyLogAnalyticsRule = &isLegacyLogAnalyticsRule + } else { + rule.IsLegacyLogAnalyticsRule = nil + } + + // IsWorkspaceAlertsStorageConfigured + if source.IsWorkspaceAlertsStorageConfigured != nil { + isWorkspaceAlertsStorageConfigured := *source.IsWorkspaceAlertsStorageConfigured + rule.IsWorkspaceAlertsStorageConfigured = &isWorkspaceAlertsStorageConfigured + } else { + rule.IsWorkspaceAlertsStorageConfigured = nil + } + + // Kind + rule.Kind = genruntime.ClonePointerToString(source.Kind) + + // Location + rule.Location = genruntime.ClonePointerToString(source.Location) + + // MuteActionsDuration + rule.MuteActionsDuration = genruntime.ClonePointerToString(source.MuteActionsDuration) + + // Name + rule.Name = genruntime.ClonePointerToString(source.Name) + + // OverrideQueryTimeRange + rule.OverrideQueryTimeRange = genruntime.ClonePointerToString(source.OverrideQueryTimeRange) + + // ResolveConfiguration + if propertyBag.Contains("ResolveConfiguration") { + var resolveConfiguration RuleResolveConfiguration_STATUS + err := propertyBag.Pull("ResolveConfiguration", &resolveConfiguration) + if err != nil { + return eris.Wrap(err, "pulling 'ResolveConfiguration' from propertyBag") + } + + rule.ResolveConfiguration = &resolveConfiguration + } else { + rule.ResolveConfiguration = nil + } + + // Scopes + rule.Scopes = genruntime.CloneSliceOfString(source.Scopes) + + // Severity + rule.Severity = genruntime.ClonePointerToInt(source.Severity) + + // SkipQueryValidation + if source.SkipQueryValidation != nil { + skipQueryValidation := *source.SkipQueryValidation + rule.SkipQueryValidation = &skipQueryValidation + } else { + rule.SkipQueryValidation = nil + } + + // SystemData + if source.SystemData != nil { + var systemDataSTATUSPivot v20221001s.SystemData_STATUS + err := source.SystemData.AssignProperties_To_SystemData_STATUS(&systemDataSTATUSPivot) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_SystemData_STATUS() to populate field SystemData_STATUSPivot from SystemData") + } + var systemDatum SystemData_STATUS + err = systemDatum.AssignProperties_From_SystemData_STATUS(&systemDataSTATUSPivot) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_SystemData_STATUS() to populate field SystemData from SystemData_STATUSPivot") + } + rule.SystemData = &systemDatum + } else { + rule.SystemData = nil + } + + // Tags + rule.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // TargetResourceTypes + rule.TargetResourceTypes = genruntime.CloneSliceOfString(source.TargetResourceTypes) + + // Type + rule.Type = genruntime.ClonePointerToString(source.Type) + + // WindowSize + rule.WindowSize = genruntime.ClonePointerToString(source.WindowSize) + + // Update the property bag + if len(propertyBag) > 0 { + rule.PropertyBag = propertyBag + } else { + rule.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_STATUS); ok { + err := augmentedRule.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRule_STATUS populates the provided destination ScheduledQueryRule_STATUS from our ScheduledQueryRule_STATUS +func (rule *ScheduledQueryRule_STATUS) AssignProperties_To_ScheduledQueryRule_STATUS(destination *v20220615s.ScheduledQueryRule_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(rule.PropertyBag) + + // Actions + if rule.Actions != nil { + var action v20220615s.Actions_STATUS + err := rule.Actions.AssignProperties_To_Actions_STATUS(&action) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Actions_STATUS() to populate field Actions") + } + destination.Actions = &action + } else { + destination.Actions = nil + } + + // AutoMitigate + if rule.AutoMitigate != nil { + autoMitigate := *rule.AutoMitigate + destination.AutoMitigate = &autoMitigate + } else { + destination.AutoMitigate = nil + } + + // CheckWorkspaceAlertsStorageConfigured + if rule.CheckWorkspaceAlertsStorageConfigured != nil { + checkWorkspaceAlertsStorageConfigured := *rule.CheckWorkspaceAlertsStorageConfigured + destination.CheckWorkspaceAlertsStorageConfigured = &checkWorkspaceAlertsStorageConfigured + } else { + destination.CheckWorkspaceAlertsStorageConfigured = nil + } + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(rule.Conditions) + + // CreatedWithApiVersion + destination.CreatedWithApiVersion = genruntime.ClonePointerToString(rule.CreatedWithApiVersion) + + // Criteria + if rule.Criteria != nil { + var criterion v20220615s.ScheduledQueryRuleCriteria_STATUS + err := rule.Criteria.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&criterion) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_ScheduledQueryRuleCriteria_STATUS() to populate field Criteria") + } + destination.Criteria = &criterion + } else { + destination.Criteria = nil + } + + // Description + destination.Description = genruntime.ClonePointerToString(rule.Description) + + // DisplayName + destination.DisplayName = genruntime.ClonePointerToString(rule.DisplayName) + + // Enabled + if rule.Enabled != nil { + enabled := *rule.Enabled + destination.Enabled = &enabled + } else { + destination.Enabled = nil + } + + // Etag + destination.Etag = genruntime.ClonePointerToString(rule.Etag) + + // EvaluationFrequency + destination.EvaluationFrequency = genruntime.ClonePointerToString(rule.EvaluationFrequency) + + // Id + destination.Id = genruntime.ClonePointerToString(rule.Id) + + // Identity + if rule.Identity != nil { + propertyBag.Add("Identity", *rule.Identity) + } else { + propertyBag.Remove("Identity") + } + + // IsLegacyLogAnalyticsRule + if rule.IsLegacyLogAnalyticsRule != nil { + isLegacyLogAnalyticsRule := *rule.IsLegacyLogAnalyticsRule + destination.IsLegacyLogAnalyticsRule = &isLegacyLogAnalyticsRule + } else { + destination.IsLegacyLogAnalyticsRule = nil + } + + // IsWorkspaceAlertsStorageConfigured + if rule.IsWorkspaceAlertsStorageConfigured != nil { + isWorkspaceAlertsStorageConfigured := *rule.IsWorkspaceAlertsStorageConfigured + destination.IsWorkspaceAlertsStorageConfigured = &isWorkspaceAlertsStorageConfigured + } else { + destination.IsWorkspaceAlertsStorageConfigured = nil + } + + // Kind + destination.Kind = genruntime.ClonePointerToString(rule.Kind) + + // Location + destination.Location = genruntime.ClonePointerToString(rule.Location) + + // MuteActionsDuration + destination.MuteActionsDuration = genruntime.ClonePointerToString(rule.MuteActionsDuration) + + // Name + destination.Name = genruntime.ClonePointerToString(rule.Name) + + // OverrideQueryTimeRange + destination.OverrideQueryTimeRange = genruntime.ClonePointerToString(rule.OverrideQueryTimeRange) + + // ResolveConfiguration + if rule.ResolveConfiguration != nil { + propertyBag.Add("ResolveConfiguration", *rule.ResolveConfiguration) + } else { + propertyBag.Remove("ResolveConfiguration") + } + + // Scopes + destination.Scopes = genruntime.CloneSliceOfString(rule.Scopes) + + // Severity + destination.Severity = genruntime.ClonePointerToInt(rule.Severity) + + // SkipQueryValidation + if rule.SkipQueryValidation != nil { + skipQueryValidation := *rule.SkipQueryValidation + destination.SkipQueryValidation = &skipQueryValidation + } else { + destination.SkipQueryValidation = nil + } + + // SystemData + if rule.SystemData != nil { + var systemDataSTATUSPivot v20221001s.SystemData_STATUS + err := rule.SystemData.AssignProperties_To_SystemData_STATUS(&systemDataSTATUSPivot) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_SystemData_STATUS() to populate field SystemData_STATUSPivot from SystemData") + } + var systemDatum v20220615s.SystemData_STATUS + err = systemDatum.AssignProperties_From_SystemData_STATUS(&systemDataSTATUSPivot) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_SystemData_STATUS() to populate field SystemData from SystemData_STATUSPivot") + } + destination.SystemData = &systemDatum + } else { + destination.SystemData = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(rule.Tags) + + // TargetResourceTypes + destination.TargetResourceTypes = genruntime.CloneSliceOfString(rule.TargetResourceTypes) + + // Type + destination.Type = genruntime.ClonePointerToString(rule.Type) + + // WindowSize + destination.WindowSize = genruntime.ClonePointerToString(rule.WindowSize) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRule_STATUS interface (if implemented) to customize the conversion + var ruleAsAny any = rule + if augmentedRule, ok := ruleAsAny.(augmentConversionForScheduledQueryRule_STATUS); ok { + err := augmentedRule.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.Actions +// Actions to invoke when the alert fires. +type Actions struct { + ActionGroupsReferences []genruntime.ResourceReference `armReference:"ActionGroups" json:"actionGroupsReferences,omitempty"` + ActionProperties map[string]string `json:"actionProperties,omitempty"` + CustomProperties map[string]string `json:"customProperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_Actions populates our Actions from the provided source Actions +func (actions *Actions) AssignProperties_From_Actions(source *v20220615s.Actions) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ActionGroupsReferences + if source.ActionGroupsReferences != nil { + actionGroupsReferenceList := make([]genruntime.ResourceReference, len(source.ActionGroupsReferences)) + for actionGroupsReferenceIndex, actionGroupsReferenceItem := range source.ActionGroupsReferences { + // Shadow the loop variable to avoid aliasing + actionGroupsReferenceItem := actionGroupsReferenceItem + actionGroupsReferenceList[actionGroupsReferenceIndex] = actionGroupsReferenceItem.Copy() + } + actions.ActionGroupsReferences = actionGroupsReferenceList + } else { + actions.ActionGroupsReferences = nil + } + + // ActionProperties + if propertyBag.Contains("ActionProperties") { + var actionProperty map[string]string + err := propertyBag.Pull("ActionProperties", &actionProperty) + if err != nil { + return eris.Wrap(err, "pulling 'ActionProperties' from propertyBag") + } + + actions.ActionProperties = actionProperty + } else { + actions.ActionProperties = nil + } + + // CustomProperties + actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) + + // Update the property bag + if len(propertyBag) > 0 { + actions.PropertyBag = propertyBag + } else { + actions.PropertyBag = nil + } + + // Invoke the augmentConversionForActions interface (if implemented) to customize the conversion + var actionsAsAny any = actions + if augmentedActions, ok := actionsAsAny.(augmentConversionForActions); ok { + err := augmentedActions.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Actions populates the provided destination Actions from our Actions +func (actions *Actions) AssignProperties_To_Actions(destination *v20220615s.Actions) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(actions.PropertyBag) + + // ActionGroupsReferences + if actions.ActionGroupsReferences != nil { + actionGroupsReferenceList := make([]genruntime.ResourceReference, len(actions.ActionGroupsReferences)) + for actionGroupsReferenceIndex, actionGroupsReferenceItem := range actions.ActionGroupsReferences { + // Shadow the loop variable to avoid aliasing + actionGroupsReferenceItem := actionGroupsReferenceItem + actionGroupsReferenceList[actionGroupsReferenceIndex] = actionGroupsReferenceItem.Copy() + } + destination.ActionGroupsReferences = actionGroupsReferenceList + } else { + destination.ActionGroupsReferences = nil + } + + // ActionProperties + if len(actions.ActionProperties) > 0 { + propertyBag.Add("ActionProperties", actions.ActionProperties) + } else { + propertyBag.Remove("ActionProperties") + } + + // CustomProperties + destination.CustomProperties = genruntime.CloneMapOfStringToString(actions.CustomProperties) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForActions interface (if implemented) to customize the conversion + var actionsAsAny any = actions + if augmentedActions, ok := actionsAsAny.(augmentConversionForActions); ok { + err := augmentedActions.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.Actions_STATUS +// Actions to invoke when the alert fires. +type Actions_STATUS struct { + ActionGroups []string `json:"actionGroups,omitempty"` + ActionProperties map[string]string `json:"actionProperties,omitempty"` + CustomProperties map[string]string `json:"customProperties,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_Actions_STATUS populates our Actions_STATUS from the provided source Actions_STATUS +func (actions *Actions_STATUS) AssignProperties_From_Actions_STATUS(source *v20220615s.Actions_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ActionGroups + actions.ActionGroups = genruntime.CloneSliceOfString(source.ActionGroups) + + // ActionProperties + if propertyBag.Contains("ActionProperties") { + var actionProperty map[string]string + err := propertyBag.Pull("ActionProperties", &actionProperty) + if err != nil { + return eris.Wrap(err, "pulling 'ActionProperties' from propertyBag") + } + + actions.ActionProperties = actionProperty + } else { + actions.ActionProperties = nil + } + + // CustomProperties + actions.CustomProperties = genruntime.CloneMapOfStringToString(source.CustomProperties) + + // Update the property bag + if len(propertyBag) > 0 { + actions.PropertyBag = propertyBag + } else { + actions.PropertyBag = nil + } + + // Invoke the augmentConversionForActions_STATUS interface (if implemented) to customize the conversion + var actionsAsAny any = actions + if augmentedActions, ok := actionsAsAny.(augmentConversionForActions_STATUS); ok { + err := augmentedActions.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Actions_STATUS populates the provided destination Actions_STATUS from our Actions_STATUS +func (actions *Actions_STATUS) AssignProperties_To_Actions_STATUS(destination *v20220615s.Actions_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(actions.PropertyBag) + + // ActionGroups + destination.ActionGroups = genruntime.CloneSliceOfString(actions.ActionGroups) + + // ActionProperties + if len(actions.ActionProperties) > 0 { + propertyBag.Add("ActionProperties", actions.ActionProperties) + } else { + propertyBag.Remove("ActionProperties") + } + + // CustomProperties + destination.CustomProperties = genruntime.CloneMapOfStringToString(actions.CustomProperties) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForActions_STATUS interface (if implemented) to customize the conversion + var actionsAsAny any = actions + if augmentedActions, ok := actionsAsAny.(augmentConversionForActions_STATUS); ok { + err := augmentedActions.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForScheduledQueryRule_Spec interface { + AssignPropertiesFrom(src *v20220615s.ScheduledQueryRule_Spec) error + AssignPropertiesTo(dst *v20220615s.ScheduledQueryRule_Spec) error +} + +type augmentConversionForScheduledQueryRule_STATUS interface { + AssignPropertiesFrom(src *v20220615s.ScheduledQueryRule_STATUS) error + AssignPropertiesTo(dst *v20220615s.ScheduledQueryRule_STATUS) error +} + +// Storage version of v1api20240101preview.Identity +// Identity for the resource. +type Identity struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` + UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` +} + +// Storage version of v1api20240101preview.Identity_STATUS +// Identity for the resource. +type Identity_STATUS struct { + PrincipalId *string `json:"principalId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + Type *string `json:"type,omitempty"` + UserAssignedIdentities map[string]UserIdentityProperties_STATUS `json:"userAssignedIdentities,omitempty"` +} + +// Storage version of v1api20240101preview.RuleResolveConfiguration +// TBD. Relevant only for rules of the kind LogAlert. +type RuleResolveConfiguration struct { + AutoResolved *bool `json:"autoResolved,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TimeToResolve *string `json:"timeToResolve,omitempty"` +} + +// Storage version of v1api20240101preview.RuleResolveConfiguration_STATUS +// TBD. Relevant only for rules of the kind LogAlert. +type RuleResolveConfiguration_STATUS struct { + AutoResolved *bool `json:"autoResolved,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + TimeToResolve *string `json:"timeToResolve,omitempty"` +} + +// Storage version of v1api20240101preview.ScheduledQueryRuleCriteria +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria struct { + AllOf []Condition `json:"allOf,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_ScheduledQueryRuleCriteria populates our ScheduledQueryRuleCriteria from the provided source ScheduledQueryRuleCriteria +func (criteria *ScheduledQueryRuleCriteria) AssignProperties_From_ScheduledQueryRuleCriteria(source *v20220615s.ScheduledQueryRuleCriteria) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllOf + if source.AllOf != nil { + allOfList := make([]Condition, len(source.AllOf)) + for allOfIndex, allOfItem := range source.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf Condition + err := allOf.AssignProperties_From_Condition(&allOfItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + criteria.AllOf = allOfList + } else { + criteria.AllOf = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + criteria.PropertyBag = propertyBag + } else { + criteria.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleCriteria interface (if implemented) to customize the conversion + var criteriaAsAny any = criteria + if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria); ok { + err := augmentedCriteria.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRuleCriteria populates the provided destination ScheduledQueryRuleCriteria from our ScheduledQueryRuleCriteria +func (criteria *ScheduledQueryRuleCriteria) AssignProperties_To_ScheduledQueryRuleCriteria(destination *v20220615s.ScheduledQueryRuleCriteria) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(criteria.PropertyBag) + + // AllOf + if criteria.AllOf != nil { + allOfList := make([]v20220615s.Condition, len(criteria.AllOf)) + for allOfIndex, allOfItem := range criteria.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf v20220615s.Condition + err := allOfItem.AssignProperties_To_Condition(&allOf) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + destination.AllOf = allOfList + } else { + destination.AllOf = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleCriteria interface (if implemented) to customize the conversion + var criteriaAsAny any = criteria + if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria); ok { + err := augmentedCriteria.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.ScheduledQueryRuleCriteria_STATUS +// The rule criteria that defines the conditions of the scheduled query rule. +type ScheduledQueryRuleCriteria_STATUS struct { + AllOf []Condition_STATUS `json:"allOf,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_ScheduledQueryRuleCriteria_STATUS populates our ScheduledQueryRuleCriteria_STATUS from the provided source ScheduledQueryRuleCriteria_STATUS +func (criteria *ScheduledQueryRuleCriteria_STATUS) AssignProperties_From_ScheduledQueryRuleCriteria_STATUS(source *v20220615s.ScheduledQueryRuleCriteria_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AllOf + if source.AllOf != nil { + allOfList := make([]Condition_STATUS, len(source.AllOf)) + for allOfIndex, allOfItem := range source.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf Condition_STATUS + err := allOf.AssignProperties_From_Condition_STATUS(&allOfItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition_STATUS() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + criteria.AllOf = allOfList + } else { + criteria.AllOf = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + criteria.PropertyBag = propertyBag + } else { + criteria.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleCriteria_STATUS interface (if implemented) to customize the conversion + var criteriaAsAny any = criteria + if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria_STATUS); ok { + err := augmentedCriteria.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRuleCriteria_STATUS populates the provided destination ScheduledQueryRuleCriteria_STATUS from our ScheduledQueryRuleCriteria_STATUS +func (criteria *ScheduledQueryRuleCriteria_STATUS) AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(destination *v20220615s.ScheduledQueryRuleCriteria_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(criteria.PropertyBag) + + // AllOf + if criteria.AllOf != nil { + allOfList := make([]v20220615s.Condition_STATUS, len(criteria.AllOf)) + for allOfIndex, allOfItem := range criteria.AllOf { + // Shadow the loop variable to avoid aliasing + allOfItem := allOfItem + var allOf v20220615s.Condition_STATUS + err := allOfItem.AssignProperties_To_Condition_STATUS(&allOf) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition_STATUS() to populate field AllOf") + } + allOfList[allOfIndex] = allOf + } + destination.AllOf = allOfList + } else { + destination.AllOf = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleCriteria_STATUS interface (if implemented) to customize the conversion + var criteriaAsAny any = criteria + if augmentedCriteria, ok := criteriaAsAny.(augmentConversionForScheduledQueryRuleCriteria_STATUS); ok { + err := augmentedCriteria.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.ScheduledQueryRuleOperatorSpec +// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type ScheduledQueryRuleOperatorSpec struct { + ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SecretExpressions []*core.DestinationExpression `json:"secretExpressions,omitempty"` +} + +// AssignProperties_From_ScheduledQueryRuleOperatorSpec populates our ScheduledQueryRuleOperatorSpec from the provided source ScheduledQueryRuleOperatorSpec +func (operator *ScheduledQueryRuleOperatorSpec) AssignProperties_From_ScheduledQueryRuleOperatorSpec(source *v20220615s.ScheduledQueryRuleOperatorSpec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // ConfigMapExpressions + if source.ConfigMapExpressions != nil { + configMapExpressionList := make([]*core.DestinationExpression, len(source.ConfigMapExpressions)) + for configMapExpressionIndex, configMapExpressionItem := range source.ConfigMapExpressions { + // Shadow the loop variable to avoid aliasing + configMapExpressionItem := configMapExpressionItem + if configMapExpressionItem != nil { + configMapExpression := *configMapExpressionItem.DeepCopy() + configMapExpressionList[configMapExpressionIndex] = &configMapExpression + } else { + configMapExpressionList[configMapExpressionIndex] = nil + } + } + operator.ConfigMapExpressions = configMapExpressionList + } else { + operator.ConfigMapExpressions = nil + } + + // SecretExpressions + if source.SecretExpressions != nil { + secretExpressionList := make([]*core.DestinationExpression, len(source.SecretExpressions)) + for secretExpressionIndex, secretExpressionItem := range source.SecretExpressions { + // Shadow the loop variable to avoid aliasing + secretExpressionItem := secretExpressionItem + if secretExpressionItem != nil { + secretExpression := *secretExpressionItem.DeepCopy() + secretExpressionList[secretExpressionIndex] = &secretExpression + } else { + secretExpressionList[secretExpressionIndex] = nil + } + } + operator.SecretExpressions = secretExpressionList + } else { + operator.SecretExpressions = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + operator.PropertyBag = propertyBag + } else { + operator.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleOperatorSpec interface (if implemented) to customize the conversion + var operatorAsAny any = operator + if augmentedOperator, ok := operatorAsAny.(augmentConversionForScheduledQueryRuleOperatorSpec); ok { + err := augmentedOperator.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ScheduledQueryRuleOperatorSpec populates the provided destination ScheduledQueryRuleOperatorSpec from our ScheduledQueryRuleOperatorSpec +func (operator *ScheduledQueryRuleOperatorSpec) AssignProperties_To_ScheduledQueryRuleOperatorSpec(destination *v20220615s.ScheduledQueryRuleOperatorSpec) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(operator.PropertyBag) + + // ConfigMapExpressions + if operator.ConfigMapExpressions != nil { + configMapExpressionList := make([]*core.DestinationExpression, len(operator.ConfigMapExpressions)) + for configMapExpressionIndex, configMapExpressionItem := range operator.ConfigMapExpressions { + // Shadow the loop variable to avoid aliasing + configMapExpressionItem := configMapExpressionItem + if configMapExpressionItem != nil { + configMapExpression := *configMapExpressionItem.DeepCopy() + configMapExpressionList[configMapExpressionIndex] = &configMapExpression + } else { + configMapExpressionList[configMapExpressionIndex] = nil + } + } + destination.ConfigMapExpressions = configMapExpressionList + } else { + destination.ConfigMapExpressions = nil + } + + // SecretExpressions + if operator.SecretExpressions != nil { + secretExpressionList := make([]*core.DestinationExpression, len(operator.SecretExpressions)) + for secretExpressionIndex, secretExpressionItem := range operator.SecretExpressions { + // Shadow the loop variable to avoid aliasing + secretExpressionItem := secretExpressionItem + if secretExpressionItem != nil { + secretExpression := *secretExpressionItem.DeepCopy() + secretExpressionList[secretExpressionIndex] = &secretExpression + } else { + secretExpressionList[secretExpressionIndex] = nil + } + } + destination.SecretExpressions = secretExpressionList + } else { + destination.SecretExpressions = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForScheduledQueryRuleOperatorSpec interface (if implemented) to customize the conversion + var operatorAsAny any = operator + if augmentedOperator, ok := operatorAsAny.(augmentConversionForScheduledQueryRuleOperatorSpec); ok { + err := augmentedOperator.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.SystemData_STATUS +// Metadata pertaining to creation and last modification of the resource. +type SystemData_STATUS struct { + CreatedAt *string `json:"createdAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + CreatedByType *string `json:"createdByType,omitempty"` + LastModifiedAt *string `json:"lastModifiedAt,omitempty"` + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedByType *string `json:"lastModifiedByType,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_SystemData_STATUS populates our SystemData_STATUS from the provided source SystemData_STATUS +func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v20221001s.SystemData_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // CreatedAt + data.CreatedAt = genruntime.ClonePointerToString(source.CreatedAt) + + // CreatedBy + data.CreatedBy = genruntime.ClonePointerToString(source.CreatedBy) + + // CreatedByType + data.CreatedByType = genruntime.ClonePointerToString(source.CreatedByType) + + // LastModifiedAt + data.LastModifiedAt = genruntime.ClonePointerToString(source.LastModifiedAt) + + // LastModifiedBy + data.LastModifiedBy = genruntime.ClonePointerToString(source.LastModifiedBy) + + // LastModifiedByType + data.LastModifiedByType = genruntime.ClonePointerToString(source.LastModifiedByType) + + // Update the property bag + if len(propertyBag) > 0 { + data.PropertyBag = propertyBag + } else { + data.PropertyBag = nil + } + + // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion + var dataAsAny any = data + if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { + err := augmentedData.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SystemData_STATUS populates the provided destination SystemData_STATUS from our SystemData_STATUS +func (data *SystemData_STATUS) AssignProperties_To_SystemData_STATUS(destination *v20221001s.SystemData_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(data.PropertyBag) + + // CreatedAt + destination.CreatedAt = genruntime.ClonePointerToString(data.CreatedAt) + + // CreatedBy + destination.CreatedBy = genruntime.ClonePointerToString(data.CreatedBy) + + // CreatedByType + destination.CreatedByType = genruntime.ClonePointerToString(data.CreatedByType) + + // LastModifiedAt + destination.LastModifiedAt = genruntime.ClonePointerToString(data.LastModifiedAt) + + // LastModifiedBy + destination.LastModifiedBy = genruntime.ClonePointerToString(data.LastModifiedBy) + + // LastModifiedByType + destination.LastModifiedByType = genruntime.ClonePointerToString(data.LastModifiedByType) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion + var dataAsAny any = data + if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok { + err := augmentedData.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForActions interface { + AssignPropertiesFrom(src *v20220615s.Actions) error + AssignPropertiesTo(dst *v20220615s.Actions) error +} + +type augmentConversionForActions_STATUS interface { + AssignPropertiesFrom(src *v20220615s.Actions_STATUS) error + AssignPropertiesTo(dst *v20220615s.Actions_STATUS) error +} + +type augmentConversionForScheduledQueryRuleCriteria interface { + AssignPropertiesFrom(src *v20220615s.ScheduledQueryRuleCriteria) error + AssignPropertiesTo(dst *v20220615s.ScheduledQueryRuleCriteria) error +} + +type augmentConversionForScheduledQueryRuleCriteria_STATUS interface { + AssignPropertiesFrom(src *v20220615s.ScheduledQueryRuleCriteria_STATUS) error + AssignPropertiesTo(dst *v20220615s.ScheduledQueryRuleCriteria_STATUS) error +} + +type augmentConversionForScheduledQueryRuleOperatorSpec interface { + AssignPropertiesFrom(src *v20220615s.ScheduledQueryRuleOperatorSpec) error + AssignPropertiesTo(dst *v20220615s.ScheduledQueryRuleOperatorSpec) error +} + +type augmentConversionForSystemData_STATUS interface { + AssignPropertiesFrom(src *v20221001s.SystemData_STATUS) error + AssignPropertiesTo(dst *v20221001s.SystemData_STATUS) error +} + +// Storage version of v1api20240101preview.Condition +// A condition of the scheduled query rule. +type Condition struct { + AlertSensitivity *string `json:"alertSensitivity,omitempty"` + CriterionType *string `json:"criterionType,omitempty"` + Dimensions []Dimension `json:"dimensions,omitempty"` + FailingPeriods *Condition_FailingPeriods `json:"failingPeriods,omitempty"` + IgnoreDataBefore *string `json:"ignoreDataBefore,omitempty"` + MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` + MetricName *string `json:"metricName,omitempty"` + Operator *string `json:"operator,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Query *string `json:"query,omitempty"` + + // ResourceIdColumnReference: The column containing the resource id. The content of the column must be a uri formatted as + // resource id. Relevant only for rules of the kind LogAlert. + ResourceIdColumnReference *genruntime.ResourceReference `armReference:"ResourceIdColumn" json:"resourceIdColumnReference,omitempty"` + Threshold *float64 `json:"threshold,omitempty"` + TimeAggregation *string `json:"timeAggregation,omitempty"` +} + +// AssignProperties_From_Condition populates our Condition from the provided source Condition +func (condition *Condition) AssignProperties_From_Condition(source *v20220615s.Condition) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AlertSensitivity + if propertyBag.Contains("AlertSensitivity") { + var alertSensitivity string + err := propertyBag.Pull("AlertSensitivity", &alertSensitivity) + if err != nil { + return eris.Wrap(err, "pulling 'AlertSensitivity' from propertyBag") + } + + condition.AlertSensitivity = &alertSensitivity + } else { + condition.AlertSensitivity = nil + } + + // CriterionType + if propertyBag.Contains("CriterionType") { + var criterionType string + err := propertyBag.Pull("CriterionType", &criterionType) + if err != nil { + return eris.Wrap(err, "pulling 'CriterionType' from propertyBag") + } + + condition.CriterionType = &criterionType + } else { + condition.CriterionType = nil + } + + // Dimensions + if source.Dimensions != nil { + dimensionList := make([]Dimension, len(source.Dimensions)) + for dimensionIndex, dimensionItem := range source.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension Dimension + err := dimension.AssignProperties_From_Dimension(&dimensionItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Dimension() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + condition.Dimensions = dimensionList + } else { + condition.Dimensions = nil + } + + // FailingPeriods + if source.FailingPeriods != nil { + var failingPeriod Condition_FailingPeriods + err := failingPeriod.AssignProperties_From_Condition_FailingPeriods(source.FailingPeriods) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition_FailingPeriods() to populate field FailingPeriods") + } + condition.FailingPeriods = &failingPeriod + } else { + condition.FailingPeriods = nil + } + + // IgnoreDataBefore + if propertyBag.Contains("IgnoreDataBefore") { + var ignoreDataBefore string + err := propertyBag.Pull("IgnoreDataBefore", &ignoreDataBefore) + if err != nil { + return eris.Wrap(err, "pulling 'IgnoreDataBefore' from propertyBag") + } + + condition.IgnoreDataBefore = &ignoreDataBefore + } else { + condition.IgnoreDataBefore = nil + } + + // MetricMeasureColumn + condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) + + // MetricName + condition.MetricName = genruntime.ClonePointerToString(source.MetricName) + + // Operator + condition.Operator = genruntime.ClonePointerToString(source.Operator) + + // Query + condition.Query = genruntime.ClonePointerToString(source.Query) + + // ResourceIdColumnReference + if source.ResourceIdColumnReference != nil { + resourceIdColumnReference := source.ResourceIdColumnReference.Copy() + condition.ResourceIdColumnReference = &resourceIdColumnReference + } else { + condition.ResourceIdColumnReference = nil + } + + // Threshold + if source.Threshold != nil { + threshold := *source.Threshold + condition.Threshold = &threshold + } else { + condition.Threshold = nil + } + + // TimeAggregation + condition.TimeAggregation = genruntime.ClonePointerToString(source.TimeAggregation) + + // Update the property bag + if len(propertyBag) > 0 { + condition.PropertyBag = propertyBag + } else { + condition.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition interface (if implemented) to customize the conversion + var conditionAsAny any = condition + if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition); ok { + err := augmentedCondition.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Condition populates the provided destination Condition from our Condition +func (condition *Condition) AssignProperties_To_Condition(destination *v20220615s.Condition) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(condition.PropertyBag) + + // AlertSensitivity + if condition.AlertSensitivity != nil { + propertyBag.Add("AlertSensitivity", *condition.AlertSensitivity) + } else { + propertyBag.Remove("AlertSensitivity") + } + + // CriterionType + if condition.CriterionType != nil { + propertyBag.Add("CriterionType", *condition.CriterionType) + } else { + propertyBag.Remove("CriterionType") + } + + // Dimensions + if condition.Dimensions != nil { + dimensionList := make([]v20220615s.Dimension, len(condition.Dimensions)) + for dimensionIndex, dimensionItem := range condition.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension v20220615s.Dimension + err := dimensionItem.AssignProperties_To_Dimension(&dimension) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Dimension() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + destination.Dimensions = dimensionList + } else { + destination.Dimensions = nil + } + + // FailingPeriods + if condition.FailingPeriods != nil { + var failingPeriod v20220615s.Condition_FailingPeriods + err := condition.FailingPeriods.AssignProperties_To_Condition_FailingPeriods(&failingPeriod) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition_FailingPeriods() to populate field FailingPeriods") + } + destination.FailingPeriods = &failingPeriod + } else { + destination.FailingPeriods = nil + } + + // IgnoreDataBefore + if condition.IgnoreDataBefore != nil { + propertyBag.Add("IgnoreDataBefore", *condition.IgnoreDataBefore) + } else { + propertyBag.Remove("IgnoreDataBefore") + } + + // MetricMeasureColumn + destination.MetricMeasureColumn = genruntime.ClonePointerToString(condition.MetricMeasureColumn) + + // MetricName + destination.MetricName = genruntime.ClonePointerToString(condition.MetricName) + + // Operator + destination.Operator = genruntime.ClonePointerToString(condition.Operator) + + // Query + destination.Query = genruntime.ClonePointerToString(condition.Query) + + // ResourceIdColumnReference + if condition.ResourceIdColumnReference != nil { + resourceIdColumnReference := condition.ResourceIdColumnReference.Copy() + destination.ResourceIdColumnReference = &resourceIdColumnReference + } else { + destination.ResourceIdColumnReference = nil + } + + // Threshold + if condition.Threshold != nil { + threshold := *condition.Threshold + destination.Threshold = &threshold + } else { + destination.Threshold = nil + } + + // TimeAggregation + destination.TimeAggregation = genruntime.ClonePointerToString(condition.TimeAggregation) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition interface (if implemented) to customize the conversion + var conditionAsAny any = condition + if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition); ok { + err := augmentedCondition.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.Condition_STATUS +// A condition of the scheduled query rule. +type Condition_STATUS struct { + AlertSensitivity *string `json:"alertSensitivity,omitempty"` + CriterionType *string `json:"criterionType,omitempty"` + Dimensions []Dimension_STATUS `json:"dimensions,omitempty"` + FailingPeriods *Condition_FailingPeriods_STATUS `json:"failingPeriods,omitempty"` + IgnoreDataBefore *string `json:"ignoreDataBefore,omitempty"` + MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"` + MetricName *string `json:"metricName,omitempty"` + Operator *string `json:"operator,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Query *string `json:"query,omitempty"` + ResourceIdColumn *string `json:"resourceIdColumn,omitempty"` + Threshold *float64 `json:"threshold,omitempty"` + TimeAggregation *string `json:"timeAggregation,omitempty"` +} + +// AssignProperties_From_Condition_STATUS populates our Condition_STATUS from the provided source Condition_STATUS +func (condition *Condition_STATUS) AssignProperties_From_Condition_STATUS(source *v20220615s.Condition_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // AlertSensitivity + if propertyBag.Contains("AlertSensitivity") { + var alertSensitivity string + err := propertyBag.Pull("AlertSensitivity", &alertSensitivity) + if err != nil { + return eris.Wrap(err, "pulling 'AlertSensitivity' from propertyBag") + } + + condition.AlertSensitivity = &alertSensitivity + } else { + condition.AlertSensitivity = nil + } + + // CriterionType + if propertyBag.Contains("CriterionType") { + var criterionType string + err := propertyBag.Pull("CriterionType", &criterionType) + if err != nil { + return eris.Wrap(err, "pulling 'CriterionType' from propertyBag") + } + + condition.CriterionType = &criterionType + } else { + condition.CriterionType = nil + } + + // Dimensions + if source.Dimensions != nil { + dimensionList := make([]Dimension_STATUS, len(source.Dimensions)) + for dimensionIndex, dimensionItem := range source.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension Dimension_STATUS + err := dimension.AssignProperties_From_Dimension_STATUS(&dimensionItem) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Dimension_STATUS() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + condition.Dimensions = dimensionList + } else { + condition.Dimensions = nil + } + + // FailingPeriods + if source.FailingPeriods != nil { + var failingPeriod Condition_FailingPeriods_STATUS + err := failingPeriod.AssignProperties_From_Condition_FailingPeriods_STATUS(source.FailingPeriods) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_From_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") + } + condition.FailingPeriods = &failingPeriod + } else { + condition.FailingPeriods = nil + } + + // IgnoreDataBefore + if propertyBag.Contains("IgnoreDataBefore") { + var ignoreDataBefore string + err := propertyBag.Pull("IgnoreDataBefore", &ignoreDataBefore) + if err != nil { + return eris.Wrap(err, "pulling 'IgnoreDataBefore' from propertyBag") + } + + condition.IgnoreDataBefore = &ignoreDataBefore + } else { + condition.IgnoreDataBefore = nil + } + + // MetricMeasureColumn + condition.MetricMeasureColumn = genruntime.ClonePointerToString(source.MetricMeasureColumn) + + // MetricName + condition.MetricName = genruntime.ClonePointerToString(source.MetricName) + + // Operator + condition.Operator = genruntime.ClonePointerToString(source.Operator) + + // Query + condition.Query = genruntime.ClonePointerToString(source.Query) + + // ResourceIdColumn + condition.ResourceIdColumn = genruntime.ClonePointerToString(source.ResourceIdColumn) + + // Threshold + if source.Threshold != nil { + threshold := *source.Threshold + condition.Threshold = &threshold + } else { + condition.Threshold = nil + } + + // TimeAggregation + condition.TimeAggregation = genruntime.ClonePointerToString(source.TimeAggregation) + + // Update the property bag + if len(propertyBag) > 0 { + condition.PropertyBag = propertyBag + } else { + condition.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_STATUS interface (if implemented) to customize the conversion + var conditionAsAny any = condition + if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition_STATUS); ok { + err := augmentedCondition.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Condition_STATUS populates the provided destination Condition_STATUS from our Condition_STATUS +func (condition *Condition_STATUS) AssignProperties_To_Condition_STATUS(destination *v20220615s.Condition_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(condition.PropertyBag) + + // AlertSensitivity + if condition.AlertSensitivity != nil { + propertyBag.Add("AlertSensitivity", *condition.AlertSensitivity) + } else { + propertyBag.Remove("AlertSensitivity") + } + + // CriterionType + if condition.CriterionType != nil { + propertyBag.Add("CriterionType", *condition.CriterionType) + } else { + propertyBag.Remove("CriterionType") + } + + // Dimensions + if condition.Dimensions != nil { + dimensionList := make([]v20220615s.Dimension_STATUS, len(condition.Dimensions)) + for dimensionIndex, dimensionItem := range condition.Dimensions { + // Shadow the loop variable to avoid aliasing + dimensionItem := dimensionItem + var dimension v20220615s.Dimension_STATUS + err := dimensionItem.AssignProperties_To_Dimension_STATUS(&dimension) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Dimension_STATUS() to populate field Dimensions") + } + dimensionList[dimensionIndex] = dimension + } + destination.Dimensions = dimensionList + } else { + destination.Dimensions = nil + } + + // FailingPeriods + if condition.FailingPeriods != nil { + var failingPeriod v20220615s.Condition_FailingPeriods_STATUS + err := condition.FailingPeriods.AssignProperties_To_Condition_FailingPeriods_STATUS(&failingPeriod) + if err != nil { + return eris.Wrap(err, "calling AssignProperties_To_Condition_FailingPeriods_STATUS() to populate field FailingPeriods") + } + destination.FailingPeriods = &failingPeriod + } else { + destination.FailingPeriods = nil + } + + // IgnoreDataBefore + if condition.IgnoreDataBefore != nil { + propertyBag.Add("IgnoreDataBefore", *condition.IgnoreDataBefore) + } else { + propertyBag.Remove("IgnoreDataBefore") + } + + // MetricMeasureColumn + destination.MetricMeasureColumn = genruntime.ClonePointerToString(condition.MetricMeasureColumn) + + // MetricName + destination.MetricName = genruntime.ClonePointerToString(condition.MetricName) + + // Operator + destination.Operator = genruntime.ClonePointerToString(condition.Operator) + + // Query + destination.Query = genruntime.ClonePointerToString(condition.Query) + + // ResourceIdColumn + destination.ResourceIdColumn = genruntime.ClonePointerToString(condition.ResourceIdColumn) + + // Threshold + if condition.Threshold != nil { + threshold := *condition.Threshold + destination.Threshold = &threshold + } else { + destination.Threshold = nil + } + + // TimeAggregation + destination.TimeAggregation = genruntime.ClonePointerToString(condition.TimeAggregation) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_STATUS interface (if implemented) to customize the conversion + var conditionAsAny any = condition + if augmentedCondition, ok := conditionAsAny.(augmentConversionForCondition_STATUS); ok { + err := augmentedCondition.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.UserAssignedIdentityDetails +// Information about the user assigned identity for the resource +type UserAssignedIdentityDetails struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` +} + +// Storage version of v1api20240101preview.UserIdentityProperties_STATUS +// User assigned identity properties. +type UserIdentityProperties_STATUS struct { + ClientId *string `json:"clientId,omitempty"` + PrincipalId *string `json:"principalId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +type augmentConversionForCondition interface { + AssignPropertiesFrom(src *v20220615s.Condition) error + AssignPropertiesTo(dst *v20220615s.Condition) error +} + +type augmentConversionForCondition_STATUS interface { + AssignPropertiesFrom(src *v20220615s.Condition_STATUS) error + AssignPropertiesTo(dst *v20220615s.Condition_STATUS) error +} + +// Storage version of v1api20240101preview.Condition_FailingPeriods +type Condition_FailingPeriods struct { + MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` + NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_Condition_FailingPeriods populates our Condition_FailingPeriods from the provided source Condition_FailingPeriods +func (periods *Condition_FailingPeriods) AssignProperties_From_Condition_FailingPeriods(source *v20220615s.Condition_FailingPeriods) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // MinFailingPeriodsToAlert + periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) + + // Update the property bag + if len(propertyBag) > 0 { + periods.PropertyBag = propertyBag + } else { + periods.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_FailingPeriods interface (if implemented) to customize the conversion + var periodsAsAny any = periods + if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods); ok { + err := augmentedPeriods.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Condition_FailingPeriods populates the provided destination Condition_FailingPeriods from our Condition_FailingPeriods +func (periods *Condition_FailingPeriods) AssignProperties_To_Condition_FailingPeriods(destination *v20220615s.Condition_FailingPeriods) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(periods.PropertyBag) + + // MinFailingPeriodsToAlert + destination.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(periods.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + destination.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(periods.NumberOfEvaluationPeriods) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_FailingPeriods interface (if implemented) to customize the conversion + var periodsAsAny any = periods + if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods); ok { + err := augmentedPeriods.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.Condition_FailingPeriods_STATUS +type Condition_FailingPeriods_STATUS struct { + MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"` + NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_Condition_FailingPeriods_STATUS populates our Condition_FailingPeriods_STATUS from the provided source Condition_FailingPeriods_STATUS +func (periods *Condition_FailingPeriods_STATUS) AssignProperties_From_Condition_FailingPeriods_STATUS(source *v20220615s.Condition_FailingPeriods_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // MinFailingPeriodsToAlert + periods.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(source.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + periods.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(source.NumberOfEvaluationPeriods) + + // Update the property bag + if len(propertyBag) > 0 { + periods.PropertyBag = propertyBag + } else { + periods.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_FailingPeriods_STATUS interface (if implemented) to customize the conversion + var periodsAsAny any = periods + if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods_STATUS); ok { + err := augmentedPeriods.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Condition_FailingPeriods_STATUS populates the provided destination Condition_FailingPeriods_STATUS from our Condition_FailingPeriods_STATUS +func (periods *Condition_FailingPeriods_STATUS) AssignProperties_To_Condition_FailingPeriods_STATUS(destination *v20220615s.Condition_FailingPeriods_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(periods.PropertyBag) + + // MinFailingPeriodsToAlert + destination.MinFailingPeriodsToAlert = genruntime.ClonePointerToInt(periods.MinFailingPeriodsToAlert) + + // NumberOfEvaluationPeriods + destination.NumberOfEvaluationPeriods = genruntime.ClonePointerToInt(periods.NumberOfEvaluationPeriods) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForCondition_FailingPeriods_STATUS interface (if implemented) to customize the conversion + var periodsAsAny any = periods + if augmentedPeriods, ok := periodsAsAny.(augmentConversionForCondition_FailingPeriods_STATUS); ok { + err := augmentedPeriods.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.Dimension +// Dimension splitting and filtering definition +type Dimension struct { + Name *string `json:"name,omitempty"` + Operator *string `json:"operator,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Values []string `json:"values,omitempty"` +} + +// AssignProperties_From_Dimension populates our Dimension from the provided source Dimension +func (dimension *Dimension) AssignProperties_From_Dimension(source *v20220615s.Dimension) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + dimension.Name = genruntime.ClonePointerToString(source.Name) + + // Operator + dimension.Operator = genruntime.ClonePointerToString(source.Operator) + + // Values + dimension.Values = genruntime.CloneSliceOfString(source.Values) + + // Update the property bag + if len(propertyBag) > 0 { + dimension.PropertyBag = propertyBag + } else { + dimension.PropertyBag = nil + } + + // Invoke the augmentConversionForDimension interface (if implemented) to customize the conversion + var dimensionAsAny any = dimension + if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension); ok { + err := augmentedDimension.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Dimension populates the provided destination Dimension from our Dimension +func (dimension *Dimension) AssignProperties_To_Dimension(destination *v20220615s.Dimension) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(dimension.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(dimension.Name) + + // Operator + destination.Operator = genruntime.ClonePointerToString(dimension.Operator) + + // Values + destination.Values = genruntime.CloneSliceOfString(dimension.Values) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForDimension interface (if implemented) to customize the conversion + var dimensionAsAny any = dimension + if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension); ok { + err := augmentedDimension.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +// Storage version of v1api20240101preview.Dimension_STATUS +// Dimension splitting and filtering definition +type Dimension_STATUS struct { + Name *string `json:"name,omitempty"` + Operator *string `json:"operator,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Values []string `json:"values,omitempty"` +} + +// AssignProperties_From_Dimension_STATUS populates our Dimension_STATUS from the provided source Dimension_STATUS +func (dimension *Dimension_STATUS) AssignProperties_From_Dimension_STATUS(source *v20220615s.Dimension_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Name + dimension.Name = genruntime.ClonePointerToString(source.Name) + + // Operator + dimension.Operator = genruntime.ClonePointerToString(source.Operator) + + // Values + dimension.Values = genruntime.CloneSliceOfString(source.Values) + + // Update the property bag + if len(propertyBag) > 0 { + dimension.PropertyBag = propertyBag + } else { + dimension.PropertyBag = nil + } + + // Invoke the augmentConversionForDimension_STATUS interface (if implemented) to customize the conversion + var dimensionAsAny any = dimension + if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension_STATUS); ok { + err := augmentedDimension.AssignPropertiesFrom(source) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_Dimension_STATUS populates the provided destination Dimension_STATUS from our Dimension_STATUS +func (dimension *Dimension_STATUS) AssignProperties_To_Dimension_STATUS(destination *v20220615s.Dimension_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(dimension.PropertyBag) + + // Name + destination.Name = genruntime.ClonePointerToString(dimension.Name) + + // Operator + destination.Operator = genruntime.ClonePointerToString(dimension.Operator) + + // Values + destination.Values = genruntime.CloneSliceOfString(dimension.Values) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForDimension_STATUS interface (if implemented) to customize the conversion + var dimensionAsAny any = dimension + if augmentedDimension, ok := dimensionAsAny.(augmentConversionForDimension_STATUS); ok { + err := augmentedDimension.AssignPropertiesTo(destination) + if err != nil { + return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForCondition_FailingPeriods interface { + AssignPropertiesFrom(src *v20220615s.Condition_FailingPeriods) error + AssignPropertiesTo(dst *v20220615s.Condition_FailingPeriods) error +} + +type augmentConversionForCondition_FailingPeriods_STATUS interface { + AssignPropertiesFrom(src *v20220615s.Condition_FailingPeriods_STATUS) error + AssignPropertiesTo(dst *v20220615s.Condition_FailingPeriods_STATUS) error +} + +type augmentConversionForDimension interface { + AssignPropertiesFrom(src *v20220615s.Dimension) error + AssignPropertiesTo(dst *v20220615s.Dimension) error +} + +type augmentConversionForDimension_STATUS interface { + AssignPropertiesFrom(src *v20220615s.Dimension_STATUS) error + AssignPropertiesTo(dst *v20220615s.Dimension_STATUS) error +} + +func init() { + SchemeBuilder.Register(&ScheduledQueryRule{}, &ScheduledQueryRuleList{}) +} diff --git a/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen_test.go b/v2/api/insights/v1api20240101preview/storage/scheduled_query_rule_types_gen_test.go similarity index 68% rename from v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen_test.go rename to v2/api/insights/v1api20240101preview/storage/scheduled_query_rule_types_gen_test.go index 866a3c917ae..4d3ddf83ad2 100644 --- a/v2/api/insights/v1api20231201/storage/scheduled_query_rule_types_gen_test.go +++ b/v2/api/insights/v1api20240101preview/storage/scheduled_query_rule_types_gen_test.go @@ -5,6 +5,8 @@ package storage import ( "encoding/json" + v20220615s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20220615/storage" + v20221001s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -17,6 +19,48 @@ import ( "testing" ) +func Test_Actions_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Actions to Actions via AssignProperties_To_Actions & AssignProperties_From_Actions returns original", + prop.ForAll(RunPropertyAssignmentTestForActions, ActionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForActions tests if a specific instance of Actions can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForActions(subject Actions) 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.Actions + err := copied.AssignProperties_To_Actions(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Actions + err = actual.AssignProperties_From_Actions(&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_Actions_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -82,6 +126,48 @@ func AddIndependentPropertyGeneratorsForActions(gens map[string]gopter.Gen) { gen.AlphaString()) } +func Test_Actions_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Actions_STATUS to Actions_STATUS via AssignProperties_To_Actions_STATUS & AssignProperties_From_Actions_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForActions_STATUS, Actions_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForActions_STATUS tests if a specific instance of Actions_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForActions_STATUS(subject Actions_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.Actions_STATUS + err := copied.AssignProperties_To_Actions_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Actions_STATUS + err = actual.AssignProperties_From_Actions_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_Actions_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -148,6 +234,48 @@ func AddIndependentPropertyGeneratorsForActions_STATUS(gens map[string]gopter.Ge gen.AlphaString()) } +func Test_Condition_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition to Condition via AssignProperties_To_Condition & AssignProperties_From_Condition returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition, ConditionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition tests if a specific instance of Condition can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition(subject Condition) 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.Condition + err := copied.AssignProperties_To_Condition(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition + err = actual.AssignProperties_From_Condition(&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_Condition_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -214,6 +342,9 @@ func ConditionGenerator() gopter.Gen { // AddIndependentPropertyGeneratorsForCondition is a factory method for creating gopter generators func AddIndependentPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { + gens["AlertSensitivity"] = gen.PtrOf(gen.AlphaString()) + gens["CriterionType"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreDataBefore"] = gen.PtrOf(gen.AlphaString()) gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) gens["MetricName"] = gen.PtrOf(gen.AlphaString()) gens["Operator"] = gen.PtrOf(gen.AlphaString()) @@ -228,6 +359,48 @@ func AddRelatedPropertyGeneratorsForCondition(gens map[string]gopter.Gen) { gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriodsGenerator()) } +func Test_Condition_FailingPeriods_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition_FailingPeriods to Condition_FailingPeriods via AssignProperties_To_Condition_FailingPeriods & AssignProperties_From_Condition_FailingPeriods returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition_FailingPeriods, Condition_FailingPeriodsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition_FailingPeriods tests if a specific instance of Condition_FailingPeriods can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition_FailingPeriods(subject Condition_FailingPeriods) 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.Condition_FailingPeriods + err := copied.AssignProperties_To_Condition_FailingPeriods(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition_FailingPeriods + err = actual.AssignProperties_From_Condition_FailingPeriods(&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_Condition_FailingPeriods_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -290,6 +463,48 @@ func AddIndependentPropertyGeneratorsForCondition_FailingPeriods(gens map[string gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) } +func Test_Condition_FailingPeriods_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition_FailingPeriods_STATUS to Condition_FailingPeriods_STATUS via AssignProperties_To_Condition_FailingPeriods_STATUS & AssignProperties_From_Condition_FailingPeriods_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS, Condition_FailingPeriods_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS tests if a specific instance of Condition_FailingPeriods_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition_FailingPeriods_STATUS(subject Condition_FailingPeriods_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.Condition_FailingPeriods_STATUS + err := copied.AssignProperties_To_Condition_FailingPeriods_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition_FailingPeriods_STATUS + err = actual.AssignProperties_From_Condition_FailingPeriods_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_Condition_FailingPeriods_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -352,6 +567,48 @@ func AddIndependentPropertyGeneratorsForCondition_FailingPeriods_STATUS(gens map gens["NumberOfEvaluationPeriods"] = gen.PtrOf(gen.Int()) } +func Test_Condition_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Condition_STATUS to Condition_STATUS via AssignProperties_To_Condition_STATUS & AssignProperties_From_Condition_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForCondition_STATUS, Condition_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForCondition_STATUS tests if a specific instance of Condition_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForCondition_STATUS(subject Condition_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.Condition_STATUS + err := copied.AssignProperties_To_Condition_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Condition_STATUS + err = actual.AssignProperties_From_Condition_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_Condition_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -418,6 +675,9 @@ func Condition_STATUSGenerator() gopter.Gen { // AddIndependentPropertyGeneratorsForCondition_STATUS is a factory method for creating gopter generators func AddIndependentPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) { + gens["AlertSensitivity"] = gen.PtrOf(gen.AlphaString()) + gens["CriterionType"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreDataBefore"] = gen.PtrOf(gen.AlphaString()) gens["MetricMeasureColumn"] = gen.PtrOf(gen.AlphaString()) gens["MetricName"] = gen.PtrOf(gen.AlphaString()) gens["Operator"] = gen.PtrOf(gen.AlphaString()) @@ -433,6 +693,48 @@ func AddRelatedPropertyGeneratorsForCondition_STATUS(gens map[string]gopter.Gen) gens["FailingPeriods"] = gen.PtrOf(Condition_FailingPeriods_STATUSGenerator()) } +func Test_Dimension_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Dimension to Dimension via AssignProperties_To_Dimension & AssignProperties_From_Dimension returns original", + prop.ForAll(RunPropertyAssignmentTestForDimension, DimensionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDimension tests if a specific instance of Dimension can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDimension(subject Dimension) 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.Dimension + err := copied.AssignProperties_To_Dimension(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Dimension + err = actual.AssignProperties_From_Dimension(&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_Dimension_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -495,6 +797,48 @@ func AddIndependentPropertyGeneratorsForDimension(gens map[string]gopter.Gen) { gens["Values"] = gen.SliceOf(gen.AlphaString()) } +func Test_Dimension_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from Dimension_STATUS to Dimension_STATUS via AssignProperties_To_Dimension_STATUS & AssignProperties_From_Dimension_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForDimension_STATUS, Dimension_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDimension_STATUS tests if a specific instance of Dimension_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForDimension_STATUS(subject Dimension_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.Dimension_STATUS + err := copied.AssignProperties_To_Dimension_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual Dimension_STATUS + err = actual.AssignProperties_From_Dimension_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_Dimension_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -833,6 +1177,91 @@ func AddIndependentPropertyGeneratorsForRuleResolveConfiguration_STATUS(gens map gens["TimeToResolve"] = gen.PtrOf(gen.AlphaString()) } +func Test_ScheduledQueryRule_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 ScheduledQueryRule to hub returns original", + prop.ForAll(RunResourceConversionTestForScheduledQueryRule, ScheduledQueryRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForScheduledQueryRule tests if a specific instance of ScheduledQueryRule round trips to the hub storage version and back losslessly +func RunResourceConversionTestForScheduledQueryRule(subject ScheduledQueryRule) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20220615s.ScheduledQueryRule + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual ScheduledQueryRule + 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_ScheduledQueryRule_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRule to ScheduledQueryRule via AssignProperties_To_ScheduledQueryRule & AssignProperties_From_ScheduledQueryRule returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule, ScheduledQueryRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRule tests if a specific instance of ScheduledQueryRule can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRule(subject ScheduledQueryRule) 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.ScheduledQueryRule + err := copied.AssignProperties_To_ScheduledQueryRule(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRule + err = actual.AssignProperties_From_ScheduledQueryRule(&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_ScheduledQueryRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -894,6 +1323,48 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRule(gens map[string]gopter.Ge gens["Status"] = ScheduledQueryRule_STATUSGenerator() } +func Test_ScheduledQueryRuleCriteria_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRuleCriteria to ScheduledQueryRuleCriteria via AssignProperties_To_ScheduledQueryRuleCriteria & AssignProperties_From_ScheduledQueryRuleCriteria returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleCriteria, ScheduledQueryRuleCriteriaGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRuleCriteria tests if a specific instance of ScheduledQueryRuleCriteria can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRuleCriteria(subject ScheduledQueryRuleCriteria) 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.ScheduledQueryRuleCriteria + err := copied.AssignProperties_To_ScheduledQueryRuleCriteria(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRuleCriteria + err = actual.AssignProperties_From_ScheduledQueryRuleCriteria(&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_ScheduledQueryRuleCriteria_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -955,6 +1426,48 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria(gens map[string]g gens["AllOf"] = gen.SliceOf(ConditionGenerator()) } +func Test_ScheduledQueryRuleCriteria_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRuleCriteria_STATUS to ScheduledQueryRuleCriteria_STATUS via AssignProperties_To_ScheduledQueryRuleCriteria_STATUS & AssignProperties_From_ScheduledQueryRuleCriteria_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS, ScheduledQueryRuleCriteria_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS tests if a specific instance of ScheduledQueryRuleCriteria_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRuleCriteria_STATUS(subject ScheduledQueryRuleCriteria_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.ScheduledQueryRuleCriteria_STATUS + err := copied.AssignProperties_To_ScheduledQueryRuleCriteria_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRuleCriteria_STATUS + err = actual.AssignProperties_From_ScheduledQueryRuleCriteria_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_ScheduledQueryRuleCriteria_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1016,6 +1529,48 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRuleCriteria_STATUS(gens map[s gens["AllOf"] = gen.SliceOf(Condition_STATUSGenerator()) } +func Test_ScheduledQueryRuleOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRuleOperatorSpec to ScheduledQueryRuleOperatorSpec via AssignProperties_To_ScheduledQueryRuleOperatorSpec & AssignProperties_From_ScheduledQueryRuleOperatorSpec returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec, ScheduledQueryRuleOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec tests if a specific instance of ScheduledQueryRuleOperatorSpec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRuleOperatorSpec(subject ScheduledQueryRuleOperatorSpec) 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.ScheduledQueryRuleOperatorSpec + err := copied.AssignProperties_To_ScheduledQueryRuleOperatorSpec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRuleOperatorSpec + err = actual.AssignProperties_From_ScheduledQueryRuleOperatorSpec(&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_ScheduledQueryRuleOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1071,6 +1626,48 @@ func ScheduledQueryRuleOperatorSpecGenerator() gopter.Gen { return scheduledQueryRuleOperatorSpecGenerator } +func Test_ScheduledQueryRule_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRule_STATUS to ScheduledQueryRule_STATUS via AssignProperties_To_ScheduledQueryRule_STATUS & AssignProperties_From_ScheduledQueryRule_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule_STATUS, ScheduledQueryRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRule_STATUS tests if a specific instance of ScheduledQueryRule_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRule_STATUS(subject ScheduledQueryRule_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.ScheduledQueryRule_STATUS + err := copied.AssignProperties_To_ScheduledQueryRule_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRule_STATUS + err = actual.AssignProperties_From_ScheduledQueryRule_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_ScheduledQueryRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1174,6 +1771,48 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRule_STATUS(gens map[string]go gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator()) } +func Test_ScheduledQueryRule_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ScheduledQueryRule_Spec to ScheduledQueryRule_Spec via AssignProperties_To_ScheduledQueryRule_Spec & AssignProperties_From_ScheduledQueryRule_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForScheduledQueryRule_Spec, ScheduledQueryRule_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForScheduledQueryRule_Spec tests if a specific instance of ScheduledQueryRule_Spec can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForScheduledQueryRule_Spec(subject ScheduledQueryRule_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.ScheduledQueryRule_Spec + err := copied.AssignProperties_To_ScheduledQueryRule_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ScheduledQueryRule_Spec + err = actual.AssignProperties_From_ScheduledQueryRule_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_ScheduledQueryRule_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1271,6 +1910,48 @@ func AddRelatedPropertyGeneratorsForScheduledQueryRule_Spec(gens map[string]gopt gens["ResolveConfiguration"] = gen.PtrOf(RuleResolveConfigurationGenerator()) } +func Test_SystemData_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SystemData_STATUS to SystemData_STATUS via AssignProperties_To_SystemData_STATUS & AssignProperties_From_SystemData_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSystemData_STATUS, SystemData_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSystemData_STATUS tests if a specific instance of SystemData_STATUS can be assigned to storage and back losslessly +func RunPropertyAssignmentTestForSystemData_STATUS(subject SystemData_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 v20221001s.SystemData_STATUS + err := copied.AssignProperties_To_SystemData_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SystemData_STATUS + err = actual.AssignProperties_From_SystemData_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_SystemData_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/insights/v1api20231201/storage/structure.txt b/v2/api/insights/v1api20240101preview/storage/structure.txt similarity index 84% rename from v2/api/insights/v1api20231201/storage/structure.txt rename to v2/api/insights/v1api20240101preview/storage/structure.txt index 7123980b61b..d53f00fdcfb 100644 --- a/v2/api/insights/v1api20231201/storage/structure.txt +++ b/v2/api/insights/v1api20240101preview/storage/structure.txt @@ -1,8 +1,8 @@ // Code generated by azure-service-operator-codegen. DO NOT EDIT. -github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage ------------------------------------------------------------------------------ +github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview/storage +------------------------------------------------------------------------------------ APIVersion: Enum (1 value) -└── "2023-12-01" +└── "2024-01-01-preview" ScheduledQueryRule: Resource ├── Owner: resources/v1apiv20191001.ResourceGroup ├── Spec: Object (25 properties) @@ -15,7 +15,9 @@ ScheduledQueryRule: Resource │ ├── AzureName: string │ ├── CheckWorkspaceAlertsStorageConfigured: *bool │ ├── Criteria: *Object (2 properties) -│ │ ├── AllOf: Object (10 properties)[] +│ │ ├── AllOf: Object (13 properties)[] +│ │ │ ├── AlertSensitivity: *string +│ │ │ ├── CriterionType: *string │ │ │ ├── Dimensions: Object (4 properties)[] │ │ │ │ ├── Name: *string │ │ │ │ ├── Operator: *string @@ -25,6 +27,7 @@ ScheduledQueryRule: Resource │ │ │ │ ├── MinFailingPeriodsToAlert: *int │ │ │ │ ├── NumberOfEvaluationPeriods: *int │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── IgnoreDataBefore: *string │ │ │ ├── MetricMeasureColumn: *string │ │ │ ├── MetricName: *string │ │ │ ├── Operator: *string @@ -76,7 +79,9 @@ ScheduledQueryRule: Resource ├── Conditions: conditions.Condition[] ├── CreatedWithApiVersion: *string ├── Criteria: *Object (2 properties) - │ ├── AllOf: Object (10 properties)[] + │ ├── AllOf: Object (13 properties)[] + │ │ ├── AlertSensitivity: *string + │ │ ├── CriterionType: *string │ │ ├── Dimensions: Object (4 properties)[] │ │ │ ├── Name: *string │ │ │ ├── Operator: *string @@ -86,6 +91,7 @@ ScheduledQueryRule: Resource │ │ │ ├── MinFailingPeriodsToAlert: *int │ │ │ ├── NumberOfEvaluationPeriods: *int │ │ │ └── PropertyBag: genruntime.PropertyBag + │ │ ├── IgnoreDataBefore: *string │ │ ├── MetricMeasureColumn: *string │ │ ├── MetricName: *string │ │ ├── Operator: *string @@ -137,3 +143,18 @@ ScheduledQueryRule: Resource ├── TargetResourceTypes: string[] ├── Type: *string └── WindowSize: *string +augmentConversionForActions: Interface +augmentConversionForActions_STATUS: Interface +augmentConversionForCondition: Interface +augmentConversionForCondition_FailingPeriods: Interface +augmentConversionForCondition_FailingPeriods_STATUS: Interface +augmentConversionForCondition_STATUS: Interface +augmentConversionForDimension: Interface +augmentConversionForDimension_STATUS: Interface +augmentConversionForScheduledQueryRule: Interface +augmentConversionForScheduledQueryRuleCriteria: Interface +augmentConversionForScheduledQueryRuleCriteria_STATUS: Interface +augmentConversionForScheduledQueryRuleOperatorSpec: Interface +augmentConversionForScheduledQueryRule_STATUS: Interface +augmentConversionForScheduledQueryRule_Spec: Interface +augmentConversionForSystemData_STATUS: Interface diff --git a/v2/api/insights/v1api20231201/storage/zz_generated.deepcopy.go b/v2/api/insights/v1api20240101preview/storage/zz_generated.deepcopy.go similarity index 97% rename from v2/api/insights/v1api20231201/storage/zz_generated.deepcopy.go rename to v2/api/insights/v1api20240101preview/storage/zz_generated.deepcopy.go index 195b538e18d..2c4b03000c9 100644 --- a/v2/api/insights/v1api20231201/storage/zz_generated.deepcopy.go +++ b/v2/api/insights/v1api20240101preview/storage/zz_generated.deepcopy.go @@ -101,6 +101,16 @@ func (in *Actions_STATUS) DeepCopy() *Actions_STATUS { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Condition) DeepCopyInto(out *Condition) { *out = *in + if in.AlertSensitivity != nil { + in, out := &in.AlertSensitivity, &out.AlertSensitivity + *out = new(string) + **out = **in + } + if in.CriterionType != nil { + in, out := &in.CriterionType, &out.CriterionType + *out = new(string) + **out = **in + } if in.Dimensions != nil { in, out := &in.Dimensions, &out.Dimensions *out = make([]Dimension, len(*in)) @@ -113,6 +123,11 @@ func (in *Condition) DeepCopyInto(out *Condition) { *out = new(Condition_FailingPeriods) (*in).DeepCopyInto(*out) } + if in.IgnoreDataBefore != nil { + in, out := &in.IgnoreDataBefore, &out.IgnoreDataBefore + *out = new(string) + **out = **in + } if in.MetricMeasureColumn != nil { in, out := &in.MetricMeasureColumn, &out.MetricMeasureColumn *out = new(string) @@ -234,6 +249,16 @@ func (in *Condition_FailingPeriods_STATUS) DeepCopy() *Condition_FailingPeriods_ // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Condition_STATUS) DeepCopyInto(out *Condition_STATUS) { *out = *in + if in.AlertSensitivity != nil { + in, out := &in.AlertSensitivity, &out.AlertSensitivity + *out = new(string) + **out = **in + } + if in.CriterionType != nil { + in, out := &in.CriterionType, &out.CriterionType + *out = new(string) + **out = **in + } if in.Dimensions != nil { in, out := &in.Dimensions, &out.Dimensions *out = make([]Dimension_STATUS, len(*in)) @@ -246,6 +271,11 @@ func (in *Condition_STATUS) DeepCopyInto(out *Condition_STATUS) { *out = new(Condition_FailingPeriods_STATUS) (*in).DeepCopyInto(*out) } + if in.IgnoreDataBefore != nil { + in, out := &in.IgnoreDataBefore, &out.IgnoreDataBefore + *out = new(string) + **out = **in + } if in.MetricMeasureColumn != nil { in, out := &in.MetricMeasureColumn, &out.MetricMeasureColumn *out = new(string) diff --git a/v2/api/insights/v1api20231201/structure.txt b/v2/api/insights/v1api20240101preview/structure.txt similarity index 87% rename from v2/api/insights/v1api20231201/structure.txt rename to v2/api/insights/v1api20240101preview/structure.txt index aabf23af074..f9162f2456f 100644 --- a/v2/api/insights/v1api20231201/structure.txt +++ b/v2/api/insights/v1api20240101preview/structure.txt @@ -1,8 +1,8 @@ // Code generated by azure-service-operator-codegen. DO NOT EDIT. -github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201 ---------------------------------------------------------------------- +github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview +---------------------------------------------------------------------------- APIVersion: Enum (1 value) -└── "2023-12-01" +└── "2024-01-01-preview" ScheduledQueryRule: Resource ├── Owner: resources/v1apiv20191001.ResourceGroup ├── Spec: Object (23 properties) @@ -15,7 +15,11 @@ ScheduledQueryRule: Resource │ │ └── Rule 0: Pattern: "^[^#<>%&:\\?/{}*]{1,260}$" │ ├── CheckWorkspaceAlertsStorageConfigured: *bool │ ├── Criteria: *Object (1 property) -│ │ └── AllOf: Object (9 properties)[] +│ │ └── AllOf: Object (12 properties)[] +│ │ ├── AlertSensitivity: *string +│ │ ├── CriterionType: *Enum (2 values) +│ │ │ ├── "DynamicThresholdCriterion" +│ │ │ └── "StaticThresholdCriterion" │ │ ├── Dimensions: Object (3 properties)[] │ │ │ ├── Name: *string │ │ │ ├── Operator: *Enum (2 values) @@ -25,10 +29,12 @@ ScheduledQueryRule: Resource │ │ ├── FailingPeriods: *Object (2 properties) │ │ │ ├── MinFailingPeriodsToAlert: *int │ │ │ └── NumberOfEvaluationPeriods: *int +│ │ ├── IgnoreDataBefore: *string │ │ ├── MetricMeasureColumn: *string │ │ ├── MetricName: *string -│ │ ├── Operator: *Enum (5 values) +│ │ ├── Operator: *Enum (6 values) │ │ │ ├── "Equals" +│ │ │ ├── "GreaterOrLessThan" │ │ │ ├── "GreaterThan" │ │ │ ├── "GreaterThanOrEqual" │ │ │ ├── "LessThan" @@ -53,7 +59,8 @@ ScheduledQueryRule: Resource │ │ │ └── "UserAssigned" │ │ └── UserAssignedIdentities: Object (1 property)[] │ │ └── Reference: genruntime.ResourceReference -│ ├── Kind: *Enum (2 values) +│ ├── Kind: *Enum (3 values) +│ │ ├── "EventLogAlert" │ │ ├── "LogAlert" │ │ └── "LogToMetric" │ ├── Location: *string @@ -87,7 +94,11 @@ ScheduledQueryRule: Resource ├── Conditions: conditions.Condition[] ├── CreatedWithApiVersion: *string ├── Criteria: *Object (1 property) - │ └── AllOf: Object (9 properties)[] + │ └── AllOf: Object (12 properties)[] + │ ├── AlertSensitivity: *string + │ ├── CriterionType: *Enum (2 values) + │ │ ├── "DynamicThresholdCriterion" + │ │ └── "StaticThresholdCriterion" │ ├── Dimensions: Object (3 properties)[] │ │ ├── Name: *string │ │ ├── Operator: *Enum (2 values) @@ -97,10 +108,12 @@ ScheduledQueryRule: Resource │ ├── FailingPeriods: *Object (2 properties) │ │ ├── MinFailingPeriodsToAlert: *int │ │ └── NumberOfEvaluationPeriods: *int + │ ├── IgnoreDataBefore: *string │ ├── MetricMeasureColumn: *string │ ├── MetricName: *string - │ ├── Operator: *Enum (5 values) + │ ├── Operator: *Enum (6 values) │ │ ├── "Equals" + │ │ ├── "GreaterOrLessThan" │ │ ├── "GreaterThan" │ │ ├── "GreaterThanOrEqual" │ │ ├── "LessThan" @@ -132,7 +145,8 @@ ScheduledQueryRule: Resource │ └── PrincipalId: *string ├── IsLegacyLogAnalyticsRule: *bool ├── IsWorkspaceAlertsStorageConfigured: *bool - ├── Kind: *Enum (2 values) + ├── Kind: *Enum (3 values) + │ ├── "EventLogAlert" │ ├── "LogAlert" │ └── "LogToMetric" ├── Location: *string diff --git a/v2/api/insights/v1api20231201/zz_generated.deepcopy.go b/v2/api/insights/v1api20240101preview/zz_generated.deepcopy.go similarity index 97% rename from v2/api/insights/v1api20231201/zz_generated.deepcopy.go rename to v2/api/insights/v1api20240101preview/zz_generated.deepcopy.go index 98448976125..5d848885342 100644 --- a/v2/api/insights/v1api20231201/zz_generated.deepcopy.go +++ b/v2/api/insights/v1api20240101preview/zz_generated.deepcopy.go @@ -7,7 +7,7 @@ Licensed under the MIT license. // Code generated by controller-gen. DO NOT EDIT. -package v1api20231201 +package v1api20240101preview import ( "github.com/Azure/azure-service-operator/v2/pkg/genruntime" @@ -87,6 +87,16 @@ func (in *Actions_STATUS) DeepCopy() *Actions_STATUS { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Condition) DeepCopyInto(out *Condition) { *out = *in + if in.AlertSensitivity != nil { + in, out := &in.AlertSensitivity, &out.AlertSensitivity + *out = new(string) + **out = **in + } + if in.CriterionType != nil { + in, out := &in.CriterionType, &out.CriterionType + *out = new(Condition_CriterionType) + **out = **in + } if in.Dimensions != nil { in, out := &in.Dimensions, &out.Dimensions *out = make([]Dimension, len(*in)) @@ -99,6 +109,11 @@ func (in *Condition) DeepCopyInto(out *Condition) { *out = new(Condition_FailingPeriods) (*in).DeepCopyInto(*out) } + if in.IgnoreDataBefore != nil { + in, out := &in.IgnoreDataBefore, &out.IgnoreDataBefore + *out = new(string) + **out = **in + } if in.MetricMeasureColumn != nil { in, out := &in.MetricMeasureColumn, &out.MetricMeasureColumn *out = new(string) @@ -199,6 +214,16 @@ func (in *Condition_FailingPeriods_STATUS) DeepCopy() *Condition_FailingPeriods_ // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Condition_STATUS) DeepCopyInto(out *Condition_STATUS) { *out = *in + if in.AlertSensitivity != nil { + in, out := &in.AlertSensitivity, &out.AlertSensitivity + *out = new(string) + **out = **in + } + if in.CriterionType != nil { + in, out := &in.CriterionType, &out.CriterionType + *out = new(Condition_CriterionType_STATUS) + **out = **in + } if in.Dimensions != nil { in, out := &in.Dimensions, &out.Dimensions *out = make([]Dimension_STATUS, len(*in)) @@ -211,6 +236,11 @@ func (in *Condition_STATUS) DeepCopyInto(out *Condition_STATUS) { *out = new(Condition_FailingPeriods_STATUS) (*in).DeepCopyInto(*out) } + if in.IgnoreDataBefore != nil { + in, out := &in.IgnoreDataBefore, &out.IgnoreDataBefore + *out = new(string) + **out = **in + } if in.MetricMeasureColumn != nil { in, out := &in.MetricMeasureColumn, &out.MetricMeasureColumn *out = new(string) diff --git a/v2/api/insights/versions_matrix.md b/v2/api/insights/versions_matrix.md index 7ff01756a00..5a697d496ce 100644 --- a/v2/api/insights/versions_matrix.md +++ b/v2/api/insights/versions_matrix.md @@ -1,207 +1,209 @@ -| Type Definitions in package "insights" | v1api20180301 | v1api20180501preview | v1api20200202 | v1api20210501preview | v1api20220615 | v1api20221001 | v1api20230101 | v1api20231201 | -|--------------------------------------------------------------------|---------------|----------------------|---------------|----------------------|---------------|---------------|---------------|---------------| -| APIVersion | v1api20180301 | v1api20180501preview | v1api20200202 | v1api20210501preview | v1api20220615 | v1api20221001 | v1api20230101 | v1api20231201 | -| ActionGroup | | | | | | | v1api20230101 | | -| ActionGroupResource_STATUS | | | | | | | v1api20230101 | | -| ActionGroupSpec | | | | | | | v1api20230101 | | -| ActionGroup_STATUS | | | | | | | v1api20230101 | | -| ActionGroup_Spec | | | | | | | v1api20230101 | | -| Actions | | | | | v1api20220615 | | | v1api20231201 | -| Actions_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| ApplicationInsightsComponentProperties | | | v1api20200202 | | | | | | -| ApplicationInsightsComponentProperties_Application_Type | | | v1api20200202 | | | | | | -| ApplicationInsightsComponentProperties_Application_Type_STATUS | | | v1api20200202 | | | | | | -| ApplicationInsightsComponentProperties_Flow_Type | | | v1api20200202 | | | | | | -| ApplicationInsightsComponentProperties_Flow_Type_STATUS | | | v1api20200202 | | | | | | -| ApplicationInsightsComponentProperties_IngestionMode | | | v1api20200202 | | | | | | -| ApplicationInsightsComponentProperties_IngestionMode_STATUS | | | v1api20200202 | | | | | | -| ApplicationInsightsComponentProperties_Request_Source | | | v1api20200202 | | | | | | -| ApplicationInsightsComponentProperties_Request_Source_STATUS | | | v1api20200202 | | | | | | -| ApplicationInsightsComponentProperties_STATUS | | | v1api20200202 | | | | | | -| ArmRoleReceiver | | | | | | | v1api20230101 | | -| ArmRoleReceiver_STATUS | | | | | | | v1api20230101 | | -| AutomationRunbookReceiver | | | | | | | v1api20230101 | | -| AutomationRunbookReceiver_STATUS | | | | | | | v1api20230101 | | -| AutoscaleNotification | | | | | | v1api20221001 | | | -| AutoscaleNotification_Operation | | | | | | v1api20221001 | | | -| AutoscaleNotification_Operation_STATUS | | | | | | v1api20221001 | | | -| AutoscaleNotification_STATUS | | | | | | v1api20221001 | | | -| AutoscaleProfile | | | | | | v1api20221001 | | | -| AutoscaleProfile_STATUS | | | | | | v1api20221001 | | | -| AutoscaleSetting | | | | | | v1api20221001 | | | -| AutoscaleSettingProperties | | | | | | v1api20221001 | | | -| AutoscaleSetting_STATUS | | | | | | v1api20221001 | | | -| AutoscaleSetting_Spec | | | | | | v1api20221001 | | | -| Autoscalesetting_STATUS | | | | | | v1api20221001 | | | -| AzureAppPushReceiver | | | | | | | v1api20230101 | | -| AzureAppPushReceiver_STATUS | | | | | | | v1api20230101 | | -| AzureFunctionReceiver | | | | | | | v1api20230101 | | -| AzureFunctionReceiver_STATUS | | | | | | | v1api20230101 | | -| Component | | | v1api20200202 | | | | | | -| Component_STATUS | | | v1api20200202 | | | | | | -| Component_Spec | | | v1api20200202 | | | | | | -| Condition | | | | | v1api20220615 | | | v1api20231201 | -| Condition_FailingPeriods | | | | | v1api20220615 | | | v1api20231201 | -| Condition_FailingPeriods_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| Condition_Operator | | | | | v1api20220615 | | | v1api20231201 | -| Condition_Operator_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| Condition_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| Condition_TimeAggregation | | | | | v1api20220615 | | | v1api20231201 | -| Condition_TimeAggregation_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| DiagnosticSetting | | | | v1api20210501preview | | | | | -| DiagnosticSetting_STATUS | | | | v1api20210501preview | | | | | -| DiagnosticSetting_Spec | | | | v1api20210501preview | | | | | -| DiagnosticSettings | | | | v1api20210501preview | | | | | -| DiagnosticSettings_STATUS | | | | v1api20210501preview | | | | | -| Dimension | | | | | v1api20220615 | | | v1api20231201 | -| Dimension_Operator | | | | | v1api20220615 | | | v1api20231201 | -| Dimension_Operator_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| Dimension_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| DynamicMetricCriteria | v1api20180301 | | | | | | | | -| DynamicMetricCriteria_AlertSensitivity | v1api20180301 | | | | | | | | -| DynamicMetricCriteria_AlertSensitivity_STATUS | v1api20180301 | | | | | | | | -| DynamicMetricCriteria_CriterionType | v1api20180301 | | | | | | | | -| DynamicMetricCriteria_CriterionType_STATUS | v1api20180301 | | | | | | | | -| DynamicMetricCriteria_Operator | v1api20180301 | | | | | | | | -| DynamicMetricCriteria_Operator_STATUS | v1api20180301 | | | | | | | | -| DynamicMetricCriteria_STATUS | v1api20180301 | | | | | | | | -| DynamicMetricCriteria_TimeAggregation | v1api20180301 | | | | | | | | -| DynamicMetricCriteria_TimeAggregation_STATUS | v1api20180301 | | | | | | | | -| DynamicThresholdFailingPeriods | v1api20180301 | | | | | | | | -| DynamicThresholdFailingPeriods_STATUS | v1api20180301 | | | | | | | | -| EmailNotification | | | | | | v1api20221001 | | | -| EmailNotification_STATUS | | | | | | v1api20221001 | | | -| EmailReceiver | | | | | | | v1api20230101 | | -| EmailReceiver_STATUS | | | | | | | v1api20230101 | | -| EventHubReceiver | | | | | | | v1api20230101 | | -| EventHubReceiver_STATUS | | | | | | | v1api20230101 | | -| HeaderField | | v1api20180501preview | | | v1api20220615 | | | | -| HeaderField_STATUS | | v1api20180501preview | | | v1api20220615 | | | | -| Identity | | | | | | | | v1api20231201 | -| Identity_STATUS | | | | | | | | v1api20231201 | -| Identity_Type | | | | | | | | v1api20231201 | -| Identity_Type_STATUS | | | | | | | | v1api20231201 | -| ItsmReceiver | | | | | | | v1api20230101 | | -| ItsmReceiver_STATUS | | | | | | | v1api20230101 | | -| LogSettings | | | | v1api20210501preview | | | | | -| LogSettings_STATUS | | | | v1api20210501preview | | | | | -| LogicAppReceiver | | | | | | | v1api20230101 | | -| LogicAppReceiver_STATUS | | | | | | | v1api20230101 | | -| MetricAlert | v1api20180301 | | | | | | | | -| MetricAlertAction | v1api20180301 | | | | | | | | -| MetricAlertAction_STATUS | v1api20180301 | | | | | | | | -| MetricAlertCriteria | v1api20180301 | | | | | | | | -| MetricAlertCriteria_STATUS | v1api20180301 | | | | | | | | -| MetricAlertMultipleResourceMultipleMetricCriteria | v1api20180301 | | | | | | | | -| MetricAlertMultipleResourceMultipleMetricCriteria_OdataType | v1api20180301 | | | | | | | | -| MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS | v1api20180301 | | | | | | | | -| MetricAlertMultipleResourceMultipleMetricCriteria_STATUS | v1api20180301 | | | | | | | | -| MetricAlertProperties | v1api20180301 | | | | | | | | -| MetricAlertProperties_STATUS | v1api20180301 | | | | | | | | -| MetricAlertSingleResourceMultipleMetricCriteria | v1api20180301 | | | | | | | | -| MetricAlertSingleResourceMultipleMetricCriteria_OdataType | v1api20180301 | | | | | | | | -| MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS | v1api20180301 | | | | | | | | -| MetricAlertSingleResourceMultipleMetricCriteria_STATUS | v1api20180301 | | | | | | | | -| MetricAlert_STATUS | v1api20180301 | | | | | | | | -| MetricAlert_Spec | v1api20180301 | | | | | | | | -| MetricCriteria | v1api20180301 | | | | | | | | -| MetricCriteria_CriterionType | v1api20180301 | | | | | | | | -| MetricCriteria_CriterionType_STATUS | v1api20180301 | | | | | | | | -| MetricCriteria_Operator | v1api20180301 | | | | | | | | -| MetricCriteria_Operator_STATUS | v1api20180301 | | | | | | | | -| MetricCriteria_STATUS | v1api20180301 | | | | | | | | -| MetricCriteria_TimeAggregation | v1api20180301 | | | | | | | | -| MetricCriteria_TimeAggregation_STATUS | v1api20180301 | | | | | | | | -| MetricDimension | v1api20180301 | | | | | | | | -| MetricDimension_STATUS | v1api20180301 | | | | | | | | -| MetricSettings | | | | v1api20210501preview | | | | | -| MetricSettings_STATUS | | | | v1api20210501preview | | | | | -| MetricTrigger | | | | | | v1api20221001 | | | -| MetricTrigger_Operator | | | | | | v1api20221001 | | | -| MetricTrigger_Operator_STATUS | | | | | | v1api20221001 | | | -| MetricTrigger_STATUS | | | | | | v1api20221001 | | | -| MetricTrigger_Statistic | | | | | | v1api20221001 | | | -| MetricTrigger_Statistic_STATUS | | | | | | v1api20221001 | | | -| MetricTrigger_TimeAggregation | | | | | | v1api20221001 | | | -| MetricTrigger_TimeAggregation_STATUS | | | | | | v1api20221001 | | | -| MultiMetricCriteria | v1api20180301 | | | | | | | | -| MultiMetricCriteria_STATUS | v1api20180301 | | | | | | | | -| PredictiveAutoscalePolicy | | | | | | v1api20221001 | | | -| PredictiveAutoscalePolicy_STATUS | | | | | | v1api20221001 | | | -| PredictiveAutoscalePolicy_ScaleMode | | | | | | v1api20221001 | | | -| PredictiveAutoscalePolicy_ScaleMode_STATUS | | | | | | v1api20221001 | | | -| PrivateLinkScopedResource_STATUS | | | v1api20200202 | | | | | | -| PublicNetworkAccessType | | | v1api20200202 | | | | | | -| PublicNetworkAccessType_STATUS | | | v1api20200202 | | | | | | -| ReceiverStatus_STATUS | | | | | | | v1api20230101 | | -| Recurrence | | | | | | v1api20221001 | | | -| Recurrence_Frequency | | | | | | v1api20221001 | | | -| Recurrence_Frequency_STATUS | | | | | | v1api20221001 | | | -| Recurrence_STATUS | | | | | | v1api20221001 | | | -| RecurrentSchedule | | | | | | v1api20221001 | | | -| RecurrentSchedule_STATUS | | | | | | v1api20221001 | | | -| RetentionPolicy | | | | v1api20210501preview | | | | | -| RetentionPolicy_STATUS | | | | v1api20210501preview | | | | | -| RuleResolveConfiguration | | | | | | | | v1api20231201 | -| RuleResolveConfiguration_STATUS | | | | | | | | v1api20231201 | -| ScaleAction | | | | | | v1api20221001 | | | -| ScaleAction_Direction | | | | | | v1api20221001 | | | -| ScaleAction_Direction_STATUS | | | | | | v1api20221001 | | | -| ScaleAction_STATUS | | | | | | v1api20221001 | | | -| ScaleAction_Type | | | | | | v1api20221001 | | | -| ScaleAction_Type_STATUS | | | | | | v1api20221001 | | | -| ScaleCapacity | | | | | | v1api20221001 | | | -| ScaleCapacity_STATUS | | | | | | v1api20221001 | | | -| ScaleRule | | | | | | v1api20221001 | | | -| ScaleRuleMetricDimension | | | | | | v1api20221001 | | | -| ScaleRuleMetricDimension_Operator | | | | | | v1api20221001 | | | -| ScaleRuleMetricDimension_Operator_STATUS | | | | | | v1api20221001 | | | -| ScaleRuleMetricDimension_STATUS | | | | | | v1api20221001 | | | -| ScaleRule_STATUS | | | | | | v1api20221001 | | | -| ScheduledQueryRule | | | | | v1api20220615 | | | v1api20231201 | -| ScheduledQueryRuleCriteria | | | | | v1api20220615 | | | v1api20231201 | -| ScheduledQueryRuleCriteria_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| ScheduledQueryRuleProperties | | | | | v1api20220615 | | | v1api20231201 | -| ScheduledQueryRuleProperties_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| ScheduledQueryRuleProperties_Severity | | | | | v1api20220615 | | | v1api20231201 | -| ScheduledQueryRuleProperties_Severity_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| ScheduledQueryRule_Kind_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| ScheduledQueryRule_Kind_Spec | | | | | v1api20220615 | | | v1api20231201 | -| ScheduledQueryRule_STATUS | | | | | v1api20220615 | | | v1api20231201 | -| ScheduledQueryRule_Spec | | | | | v1api20220615 | | | v1api20231201 | -| SmsReceiver | | | | | | | v1api20230101 | | -| SmsReceiver_STATUS | | | | | | | v1api20230101 | | -| SystemData_CreatedByType_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | v1api20231201 | -| SystemData_LastModifiedByType_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | v1api20231201 | -| SystemData_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | v1api20231201 | -| TimeWindow | | | | | | v1api20221001 | | | -| TimeWindow_STATUS | | | | | | v1api20221001 | | | -| UserAssignedIdentityDetails | | | | | | | | v1api20231201 | -| UserIdentityProperties_STATUS | | | | | | | | v1api20231201 | -| VoiceReceiver | | | | | | | v1api20230101 | | -| VoiceReceiver_STATUS | | | | | | | v1api20230101 | | -| 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 | | | v1api20220615 | | | | -| WebtestLocationAvailabilityCriteria | v1api20180301 | | | | | | | | -| WebtestLocationAvailabilityCriteria_OdataType | v1api20180301 | | | | | | | | -| WebtestLocationAvailabilityCriteria_OdataType_STATUS | v1api20180301 | | | | | | | | -| WebtestLocationAvailabilityCriteria_STATUS | v1api20180301 | | | | | | | | -| Webtest_STATUS | | v1api20180501preview | | | v1api20220615 | | | | -| Webtest_Spec | | v1api20180501preview | | | v1api20220615 | | | | +| Type Definitions in package "insights" | v1api20180301 | v1api20180501preview | v1api20200202 | v1api20210501preview | v1api20220615 | v1api20221001 | v1api20230101 | v1api20240101preview | +|--------------------------------------------------------------------|---------------|----------------------|---------------|----------------------|---------------|---------------|---------------|----------------------| +| APIVersion | v1api20180301 | v1api20180501preview | v1api20200202 | v1api20210501preview | v1api20220615 | v1api20221001 | v1api20230101 | v1api20240101preview | +| ActionGroup | | | | | | | v1api20230101 | | +| ActionGroupResource_STATUS | | | | | | | v1api20230101 | | +| ActionGroupSpec | | | | | | | v1api20230101 | | +| ActionGroup_STATUS | | | | | | | v1api20230101 | | +| ActionGroup_Spec | | | | | | | v1api20230101 | | +| Actions | | | | | v1api20220615 | | | v1api20240101preview | +| Actions_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| ApplicationInsightsComponentProperties | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Application_Type | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Application_Type_STATUS | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Flow_Type | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Flow_Type_STATUS | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_IngestionMode | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_IngestionMode_STATUS | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Request_Source | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_Request_Source_STATUS | | | v1api20200202 | | | | | | +| ApplicationInsightsComponentProperties_STATUS | | | v1api20200202 | | | | | | +| ArmRoleReceiver | | | | | | | v1api20230101 | | +| ArmRoleReceiver_STATUS | | | | | | | v1api20230101 | | +| AutomationRunbookReceiver | | | | | | | v1api20230101 | | +| AutomationRunbookReceiver_STATUS | | | | | | | v1api20230101 | | +| AutoscaleNotification | | | | | | v1api20221001 | | | +| AutoscaleNotification_Operation | | | | | | v1api20221001 | | | +| AutoscaleNotification_Operation_STATUS | | | | | | v1api20221001 | | | +| AutoscaleNotification_STATUS | | | | | | v1api20221001 | | | +| AutoscaleProfile | | | | | | v1api20221001 | | | +| AutoscaleProfile_STATUS | | | | | | v1api20221001 | | | +| AutoscaleSetting | | | | | | v1api20221001 | | | +| AutoscaleSettingProperties | | | | | | v1api20221001 | | | +| AutoscaleSetting_STATUS | | | | | | v1api20221001 | | | +| AutoscaleSetting_Spec | | | | | | v1api20221001 | | | +| Autoscalesetting_STATUS | | | | | | v1api20221001 | | | +| AzureAppPushReceiver | | | | | | | v1api20230101 | | +| AzureAppPushReceiver_STATUS | | | | | | | v1api20230101 | | +| AzureFunctionReceiver | | | | | | | v1api20230101 | | +| AzureFunctionReceiver_STATUS | | | | | | | v1api20230101 | | +| Component | | | v1api20200202 | | | | | | +| Component_STATUS | | | v1api20200202 | | | | | | +| Component_Spec | | | v1api20200202 | | | | | | +| Condition | | | | | v1api20220615 | | | v1api20240101preview | +| Condition_CriterionType | | | | | | | | v1api20240101preview | +| Condition_CriterionType_STATUS | | | | | | | | v1api20240101preview | +| Condition_FailingPeriods | | | | | v1api20220615 | | | v1api20240101preview | +| Condition_FailingPeriods_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| Condition_Operator | | | | | v1api20220615 | | | v1api20240101preview | +| Condition_Operator_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| Condition_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| Condition_TimeAggregation | | | | | v1api20220615 | | | v1api20240101preview | +| Condition_TimeAggregation_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| DiagnosticSetting | | | | v1api20210501preview | | | | | +| DiagnosticSetting_STATUS | | | | v1api20210501preview | | | | | +| DiagnosticSetting_Spec | | | | v1api20210501preview | | | | | +| DiagnosticSettings | | | | v1api20210501preview | | | | | +| DiagnosticSettings_STATUS | | | | v1api20210501preview | | | | | +| Dimension | | | | | v1api20220615 | | | v1api20240101preview | +| Dimension_Operator | | | | | v1api20220615 | | | v1api20240101preview | +| Dimension_Operator_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| Dimension_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| DynamicMetricCriteria | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_AlertSensitivity | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_AlertSensitivity_STATUS | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_CriterionType | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_CriterionType_STATUS | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_Operator | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_Operator_STATUS | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_STATUS | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_TimeAggregation | v1api20180301 | | | | | | | | +| DynamicMetricCriteria_TimeAggregation_STATUS | v1api20180301 | | | | | | | | +| DynamicThresholdFailingPeriods | v1api20180301 | | | | | | | | +| DynamicThresholdFailingPeriods_STATUS | v1api20180301 | | | | | | | | +| EmailNotification | | | | | | v1api20221001 | | | +| EmailNotification_STATUS | | | | | | v1api20221001 | | | +| EmailReceiver | | | | | | | v1api20230101 | | +| EmailReceiver_STATUS | | | | | | | v1api20230101 | | +| EventHubReceiver | | | | | | | v1api20230101 | | +| EventHubReceiver_STATUS | | | | | | | v1api20230101 | | +| HeaderField | | v1api20180501preview | | | v1api20220615 | | | | +| HeaderField_STATUS | | v1api20180501preview | | | v1api20220615 | | | | +| Identity | | | | | | | | v1api20240101preview | +| Identity_STATUS | | | | | | | | v1api20240101preview | +| Identity_Type | | | | | | | | v1api20240101preview | +| Identity_Type_STATUS | | | | | | | | v1api20240101preview | +| ItsmReceiver | | | | | | | v1api20230101 | | +| ItsmReceiver_STATUS | | | | | | | v1api20230101 | | +| LogSettings | | | | v1api20210501preview | | | | | +| LogSettings_STATUS | | | | v1api20210501preview | | | | | +| LogicAppReceiver | | | | | | | v1api20230101 | | +| LogicAppReceiver_STATUS | | | | | | | v1api20230101 | | +| MetricAlert | v1api20180301 | | | | | | | | +| MetricAlertAction | v1api20180301 | | | | | | | | +| MetricAlertAction_STATUS | v1api20180301 | | | | | | | | +| MetricAlertCriteria | v1api20180301 | | | | | | | | +| MetricAlertCriteria_STATUS | v1api20180301 | | | | | | | | +| MetricAlertMultipleResourceMultipleMetricCriteria | v1api20180301 | | | | | | | | +| MetricAlertMultipleResourceMultipleMetricCriteria_OdataType | v1api20180301 | | | | | | | | +| MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS | v1api20180301 | | | | | | | | +| MetricAlertMultipleResourceMultipleMetricCriteria_STATUS | v1api20180301 | | | | | | | | +| MetricAlertProperties | v1api20180301 | | | | | | | | +| MetricAlertProperties_STATUS | v1api20180301 | | | | | | | | +| MetricAlertSingleResourceMultipleMetricCriteria | v1api20180301 | | | | | | | | +| MetricAlertSingleResourceMultipleMetricCriteria_OdataType | v1api20180301 | | | | | | | | +| MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS | v1api20180301 | | | | | | | | +| MetricAlertSingleResourceMultipleMetricCriteria_STATUS | v1api20180301 | | | | | | | | +| MetricAlert_STATUS | v1api20180301 | | | | | | | | +| MetricAlert_Spec | v1api20180301 | | | | | | | | +| MetricCriteria | v1api20180301 | | | | | | | | +| MetricCriteria_CriterionType | v1api20180301 | | | | | | | | +| MetricCriteria_CriterionType_STATUS | v1api20180301 | | | | | | | | +| MetricCriteria_Operator | v1api20180301 | | | | | | | | +| MetricCriteria_Operator_STATUS | v1api20180301 | | | | | | | | +| MetricCriteria_STATUS | v1api20180301 | | | | | | | | +| MetricCriteria_TimeAggregation | v1api20180301 | | | | | | | | +| MetricCriteria_TimeAggregation_STATUS | v1api20180301 | | | | | | | | +| MetricDimension | v1api20180301 | | | | | | | | +| MetricDimension_STATUS | v1api20180301 | | | | | | | | +| MetricSettings | | | | v1api20210501preview | | | | | +| MetricSettings_STATUS | | | | v1api20210501preview | | | | | +| MetricTrigger | | | | | | v1api20221001 | | | +| MetricTrigger_Operator | | | | | | v1api20221001 | | | +| MetricTrigger_Operator_STATUS | | | | | | v1api20221001 | | | +| MetricTrigger_STATUS | | | | | | v1api20221001 | | | +| MetricTrigger_Statistic | | | | | | v1api20221001 | | | +| MetricTrigger_Statistic_STATUS | | | | | | v1api20221001 | | | +| MetricTrigger_TimeAggregation | | | | | | v1api20221001 | | | +| MetricTrigger_TimeAggregation_STATUS | | | | | | v1api20221001 | | | +| MultiMetricCriteria | v1api20180301 | | | | | | | | +| MultiMetricCriteria_STATUS | v1api20180301 | | | | | | | | +| PredictiveAutoscalePolicy | | | | | | v1api20221001 | | | +| PredictiveAutoscalePolicy_STATUS | | | | | | v1api20221001 | | | +| PredictiveAutoscalePolicy_ScaleMode | | | | | | v1api20221001 | | | +| PredictiveAutoscalePolicy_ScaleMode_STATUS | | | | | | v1api20221001 | | | +| PrivateLinkScopedResource_STATUS | | | v1api20200202 | | | | | | +| PublicNetworkAccessType | | | v1api20200202 | | | | | | +| PublicNetworkAccessType_STATUS | | | v1api20200202 | | | | | | +| ReceiverStatus_STATUS | | | | | | | v1api20230101 | | +| Recurrence | | | | | | v1api20221001 | | | +| Recurrence_Frequency | | | | | | v1api20221001 | | | +| Recurrence_Frequency_STATUS | | | | | | v1api20221001 | | | +| Recurrence_STATUS | | | | | | v1api20221001 | | | +| RecurrentSchedule | | | | | | v1api20221001 | | | +| RecurrentSchedule_STATUS | | | | | | v1api20221001 | | | +| RetentionPolicy | | | | v1api20210501preview | | | | | +| RetentionPolicy_STATUS | | | | v1api20210501preview | | | | | +| RuleResolveConfiguration | | | | | | | | v1api20240101preview | +| RuleResolveConfiguration_STATUS | | | | | | | | v1api20240101preview | +| ScaleAction | | | | | | v1api20221001 | | | +| ScaleAction_Direction | | | | | | v1api20221001 | | | +| ScaleAction_Direction_STATUS | | | | | | v1api20221001 | | | +| ScaleAction_STATUS | | | | | | v1api20221001 | | | +| ScaleAction_Type | | | | | | v1api20221001 | | | +| ScaleAction_Type_STATUS | | | | | | v1api20221001 | | | +| ScaleCapacity | | | | | | v1api20221001 | | | +| ScaleCapacity_STATUS | | | | | | v1api20221001 | | | +| ScaleRule | | | | | | v1api20221001 | | | +| ScaleRuleMetricDimension | | | | | | v1api20221001 | | | +| ScaleRuleMetricDimension_Operator | | | | | | v1api20221001 | | | +| ScaleRuleMetricDimension_Operator_STATUS | | | | | | v1api20221001 | | | +| ScaleRuleMetricDimension_STATUS | | | | | | v1api20221001 | | | +| ScaleRule_STATUS | | | | | | v1api20221001 | | | +| ScheduledQueryRule | | | | | v1api20220615 | | | v1api20240101preview | +| ScheduledQueryRuleCriteria | | | | | v1api20220615 | | | v1api20240101preview | +| ScheduledQueryRuleCriteria_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| ScheduledQueryRuleProperties | | | | | v1api20220615 | | | v1api20240101preview | +| ScheduledQueryRuleProperties_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| ScheduledQueryRuleProperties_Severity | | | | | v1api20220615 | | | v1api20240101preview | +| ScheduledQueryRuleProperties_Severity_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| ScheduledQueryRule_Kind_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| ScheduledQueryRule_Kind_Spec | | | | | v1api20220615 | | | v1api20240101preview | +| ScheduledQueryRule_STATUS | | | | | v1api20220615 | | | v1api20240101preview | +| ScheduledQueryRule_Spec | | | | | v1api20220615 | | | v1api20240101preview | +| SmsReceiver | | | | | | | v1api20230101 | | +| SmsReceiver_STATUS | | | | | | | v1api20230101 | | +| SystemData_CreatedByType_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | v1api20240101preview | +| SystemData_LastModifiedByType_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | v1api20240101preview | +| SystemData_STATUS | | | | v1api20210501preview | v1api20220615 | v1api20221001 | | v1api20240101preview | +| TimeWindow | | | | | | v1api20221001 | | | +| TimeWindow_STATUS | | | | | | v1api20221001 | | | +| UserAssignedIdentityDetails | | | | | | | | v1api20240101preview | +| UserIdentityProperties_STATUS | | | | | | | | v1api20240101preview | +| VoiceReceiver | | | | | | | v1api20230101 | | +| VoiceReceiver_STATUS | | | | | | | v1api20230101 | | +| 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 | | | v1api20220615 | | | | +| WebtestLocationAvailabilityCriteria | v1api20180301 | | | | | | | | +| WebtestLocationAvailabilityCriteria_OdataType | v1api20180301 | | | | | | | | +| WebtestLocationAvailabilityCriteria_OdataType_STATUS | v1api20180301 | | | | | | | | +| WebtestLocationAvailabilityCriteria_STATUS | v1api20180301 | | | | | | | | +| Webtest_STATUS | | v1api20180501preview | | | v1api20220615 | | | | +| Webtest_Spec | | v1api20180501preview | | | v1api20220615 | | | | diff --git a/v2/azure-arm.yaml b/v2/azure-arm.yaml index 353237da232..857189eb3f9 100644 --- a/v2/azure-arm.yaml +++ b/v2/azure-arm.yaml @@ -91,6 +91,12 @@ typeFilters: version: v*20210501preview because: We're using DiagnosticSetting from this. +# Latest non-preview version is not supported, see https://github.com/Azure/bicep-types-az/issues/2185 + - action: include + group: insights + version: v*20240101preview + because: We need ScheduledQueryRules from this. + - action: include group: common because: we need these for common resource properties @@ -2570,7 +2576,7 @@ objectModelConfiguration: $armReference: true StorageAccountId: $armReference: true - 2023-12-01: + 2024-01-01-preview: ScheduledQueryRule: $export: true $supportedFrom: v2.12.0 diff --git a/v2/internal/controllers/controller_resources_gen.go b/v2/internal/controllers/controller_resources_gen.go index a3d51d63800..c43f15bbd52 100644 --- a/v2/internal/controllers/controller_resources_gen.go +++ b/v2/internal/controllers/controller_resources_gen.go @@ -131,8 +131,8 @@ import ( insights_v20221001s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20221001/storage" insights_v20230101 "github.com/Azure/azure-service-operator/v2/api/insights/v1api20230101" insights_v20230101s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20230101/storage" - insights_v20231201 "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201" - insights_v20231201s "github.com/Azure/azure-service-operator/v2/api/insights/v1api20231201/storage" + insights_v20240101p "github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview" + insights_v20240101ps "github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview/storage" keyvault_customizations "github.com/Azure/azure-service-operator/v2/api/keyvault/customizations" keyvault_v20210401p "github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20210401preview" keyvault_v20210401ps "github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20210401preview/storage" @@ -739,10 +739,10 @@ func getKnownStorageTypes() []*registration.StorageType { result = append(result, ®istration.StorageType{Obj: new(insights_v20180301s.MetricAlert)}) result = append(result, ®istration.StorageType{Obj: new(insights_v20200202s.Component)}) result = append(result, ®istration.StorageType{Obj: new(insights_v20210501ps.DiagnosticSetting)}) + 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{Obj: new(insights_v20231201s.ScheduledQueryRule)}) result = append(result, ®istration.StorageType{ Obj: new(keyvault_v20230701s.Vault), Indexes: []registration.Index{ @@ -1898,8 +1898,8 @@ func getKnownTypes() []client.Object { result = append(result, new(insights_v20221001s.AutoscaleSetting)) result = append(result, new(insights_v20230101.ActionGroup)) result = append(result, new(insights_v20230101s.ActionGroup)) - result = append(result, new(insights_v20231201.ScheduledQueryRule)) - result = append(result, new(insights_v20231201s.ScheduledQueryRule)) + result = append(result, new(insights_v20240101p.ScheduledQueryRule)) + result = append(result, new(insights_v20240101ps.ScheduledQueryRule)) result = append(result, new(keyvault_v20210401p.Vault)) result = append(result, new(keyvault_v20210401ps.Vault)) result = append(result, new(keyvault_v20230701.Vault)) @@ -2437,8 +2437,8 @@ func createScheme() *runtime.Scheme { _ = insights_v20221001s.AddToScheme(scheme) _ = insights_v20230101.AddToScheme(scheme) _ = insights_v20230101s.AddToScheme(scheme) - _ = insights_v20231201.AddToScheme(scheme) - _ = insights_v20231201s.AddToScheme(scheme) + _ = insights_v20240101p.AddToScheme(scheme) + _ = insights_v20240101ps.AddToScheme(scheme) _ = keyvault_v20210401p.AddToScheme(scheme) _ = keyvault_v20210401ps.AddToScheme(scheme) _ = keyvault_v20230701.AddToScheme(scheme) diff --git a/v2/internal/controllers/crd_insights_scheduledqueryrule_test.go b/v2/internal/controllers/crd_insights_scheduledqueryrule_20220615_test.go similarity index 100% rename from v2/internal/controllers/crd_insights_scheduledqueryrule_test.go rename to v2/internal/controllers/crd_insights_scheduledqueryrule_20220615_test.go diff --git a/v2/internal/controllers/crd_insights_scheduledqueryrule_20240101preview_test.go b/v2/internal/controllers/crd_insights_scheduledqueryrule_20240101preview_test.go new file mode 100644 index 00000000000..8b7f759489f --- /dev/null +++ b/v2/internal/controllers/crd_insights_scheduledqueryrule_20240101preview_test.go @@ -0,0 +1,132 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +package controllers_test + +import ( + "testing" + + . "github.com/onsi/gomega" + + authorization "github.com/Azure/azure-service-operator/v2/api/authorization/v1api20220401" + insights "github.com/Azure/azure-service-operator/v2/api/insights/v1api20240101preview" + managedidentity "github.com/Azure/azure-service-operator/v2/api/managedidentity/v1api20230131" + "github.com/Azure/azure-service-operator/v2/internal/testcommon" + "github.com/Azure/azure-service-operator/v2/internal/util/to" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +func Test_Insights_ScheduledQueryRule_20240101preview_CRUD(t *testing.T) { + t.Parallel() + + tc := globalTestContext.ForTest(t) + tc.AzureRegion = to.Ptr("eastus") + + rg := tc.CreateTestResourceGroupAndWait() + + configMapName := "my-configmap" + principalIdKey := "principalId" + + mi := &managedidentity.UserAssignedIdentity{ + ObjectMeta: tc.MakeObjectMeta("mi"), + Spec: managedidentity.UserAssignedIdentity_Spec{ + Location: tc.AzureRegion, + Owner: testcommon.AsOwner(rg), + OperatorSpec: &managedidentity.UserAssignedIdentityOperatorSpec{ + ConfigMaps: &managedidentity.UserAssignedIdentityOperatorConfigMaps{ + PrincipalId: &genruntime.ConfigMapDestination{ + Name: configMapName, + Key: principalIdKey, + }, + }, + }, + }, + } + tc.CreateResourcesAndWait(mi) + + component := newAppInsightsComponent(tc, rg) + tc.CreateResourceAndWait(component) + + armID := *component.Status.Id + + roleAssignmentGUID, err := tc.Namer.GenerateUUID() + tc.Expect(err).ToNot(HaveOccurred()) + roleAssignment := &authorization.RoleAssignment{ + ObjectMeta: tc.MakeObjectMetaWithName(roleAssignmentGUID.String()), + Spec: authorization.RoleAssignment_Spec{ + Owner: &genruntime.ArbitraryOwnerReference{ + ARMID: armID, + }, + PrincipalIdFromConfig: &genruntime.ConfigMapReference{ + Name: configMapName, + Key: principalIdKey, + }, + RoleDefinitionReference: &genruntime.ResourceReference{ + ARMID: "/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635", // This is owner + }, + }, + } + tc.CreateResourceAndWait(roleAssignment) + + tc.Expect(roleAssignment.Status.Id).ToNot(BeNil()) + armId := *roleAssignment.Status.Id + + rule := &insights.ScheduledQueryRule{ + ObjectMeta: tc.MakeObjectMeta("rule"), + Spec: insights.ScheduledQueryRule_Spec{ + Criteria: &insights.ScheduledQueryRuleCriteria{ + AllOf: []insights.Condition{ + { + FailingPeriods: &insights.Condition_FailingPeriods{ + MinFailingPeriodsToAlert: to.Ptr(1), + NumberOfEvaluationPeriods: to.Ptr(1), + }, + Operator: to.Ptr(insights.Condition_Operator_LessThan), + Query: to.Ptr("requests | summarize CountByCountry=count() by client_CountryOrRegion"), + ResourceIdColumnReference: nil, + Threshold: to.Ptr(10.0), + TimeAggregation: to.Ptr(insights.Condition_TimeAggregation_Count), + }, + }, + }, + EvaluationFrequency: to.Ptr("PT10M"), + Identity: &insights.Identity{ + Type: to.Ptr(insights.Identity_Type_UserAssigned), + UserAssignedIdentities: []insights.UserAssignedIdentityDetails{ + { + Reference: *tc.MakeReferenceFromResource(mi), + }, + }, + }, + Location: tc.AzureRegion, + Owner: testcommon.AsOwner(rg), + ScopesReferences: []genruntime.ResourceReference{ + *tc.MakeReferenceFromResource(component), + }, + Severity: to.Ptr(insights.ScheduledQueryRuleProperties_Severity_0), + WindowSize: to.Ptr("PT10M"), + }, + } + + tc.CreateResourceAndWait(rule) + + tc.Expect(rule.Status.Id).ToNot(BeNil()) + armId = *rule.Status.Id + + old := rule.DeepCopy() + key := "foo" + rule.Spec.Tags = map[string]string{key: "bar"} + + tc.PatchResourceAndWait(old, rule) + tc.Expect(rule.Status.Tags).To(HaveKey(key)) + + tc.DeleteResourceAndWait(rule) + + // Ensure delete + exists, retryAfter, err := tc.AzureClient.CheckExistenceWithGetByID(tc.Ctx, armId, string(insights.APIVersion_Value)) + tc.Expect(err).ToNot(HaveOccurred()) + tc.Expect(retryAfter).To(BeZero()) + tc.Expect(exists).To(BeFalse()) +} diff --git a/v2/internal/controllers/recordings/Test_Insights_ScheduledQueryRule_20240101preview_CRUD.yaml b/v2/internal/controllers/recordings/Test_Insights_ScheduledQueryRule_20240101preview_CRUD.yaml new file mode 100644 index 00000000000..043593c1b62 --- /dev/null +++ b/v2/internal/controllers/recordings/Test_Insights_ScheduledQueryRule_20240101preview_CRUD.yaml @@ -0,0 +1,1424 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 147 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"eastus","name":"asotest-rg-vrgxjp","tags":{"CreatedAt":"2001-02-03T04:05:06Z","Owner":"andrei.barbu@uipath.com","Project":"Mazewalk"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "147" + Content-Type: + - application/json + Test-Request-Hash: + - 1d0af2ee4389f2740ab33cf9d685dbc7fdde36d9b68b4a700d94624331fba002 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp?api-version=2020-06-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 330 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp","name":"asotest-rg-vrgxjp","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"CreatedAt":"2001-02-03T04:05:06Z","Owner":"andrei.barbu@uipath.com","Project":"Mazewalk"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "330" + 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-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: FF213D6C2595490C9526840577EDAC0E Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:16:52Z' + status: 201 Created + code: 201 + duration: 679.499675ms + - 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-vrgxjp?api-version=2020-06-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 330 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp","name":"asotest-rg-vrgxjp","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"CreatedAt":"2001-02-03T04:05:06Z","Owner":"andrei.barbu@uipath.com","Project":"Mazewalk"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "330" + 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-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: A8A57A54CF9548EC94B62C0EAA204703 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:16:53Z' + status: 200 OK + code: 200 + duration: 146.573577ms + - id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 48 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"eastus","name":"asotest-mi-jkuszl"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "48" + Content-Type: + - application/json + Test-Request-Hash: + - 54cdd5515b0f94632ccdd43f94bba26acf1d6a51005184f4dcba9ca5d9e2ba68 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl?api-version=2023-01-31 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 453 + uncompressed: false + body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl","name":"asotest-mi-jkuszl","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "453" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 919221BA9D774B559D8EFF794FF82FD0 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:16:59Z' + status: 201 Created + code: 201 + duration: 1.452674636s + - id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 48 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"eastus","name":"asotest-mi-jkuszl"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "48" + Content-Type: + - application/json + Test-Request-Hash: + - 54cdd5515b0f94632ccdd43f94bba26acf1d6a51005184f4dcba9ca5d9e2ba68 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl?api-version=2023-01-31 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 453 + uncompressed: false + body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl","name":"asotest-mi-jkuszl","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "453" + 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-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 84051F5EDBA54057A82D19D989506EC2 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:03Z' + status: 200 OK + code: 200 + duration: 766.746624ms + - id: 4 + 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-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl?api-version=2023-01-31 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 453 + uncompressed: false + body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl","name":"asotest-mi-jkuszl","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "453" + 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-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: B6796EA1D7204E759F92100C57848A3A Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:04Z' + status: 200 OK + code: 200 + duration: 237.905404ms + - id: 5 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 110 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"kind":"web","location":"eastus","name":"asotest-component-jlfdny","properties":{"Application_Type":"other"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "110" + Content-Type: + - application/json + Test-Request-Hash: + - 47c684ab06b7ba8be102c09f201facb60af898730fe6ea3ea996a0c3f0ab2df3 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny?api-version=2020-02-02 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1327 + uncompressed: false + body: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"4c04f964-0000-0100-0000-6779a5560000\\\"\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny\",\r\n \"name\": \"asotest-component-jlfdny\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"ApplicationId\": \"asotest-component-jlfdny\",\r\n \"AppId\": \"38835882-6954-4aa0-8c48-5066c6f0326b\",\r\n \"Application_Type\": \"other\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"a3ad27e0-6d6c-4b1b-a204-b0ae7ce5072a\",\r\n \"ConnectionString\": \"InstrumentationKey=a3ad27e0-6d6c-4b1b-a204-b0ae7ce5072a;IngestionEndpoint=https://eastus-1.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=38835882-6954-4aa0-8c48-5066c6f0326b\",\r\n \"Name\": \"asotest-component-jlfdny\",\r\n \"CreationDate\": \"2025-01-04T21:17:10.6985453+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: + - "1327" + 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-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 42729274D1E24B9E98938AF3DF2C6E56 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:09Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 5.632685648s + - id: 6 + 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-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny?api-version=2020-02-02 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1327 + uncompressed: false + body: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"4c04f964-0000-0100-0000-6779a5560000\\\"\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny\",\r\n \"name\": \"asotest-component-jlfdny\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"ApplicationId\": \"asotest-component-jlfdny\",\r\n \"AppId\": \"38835882-6954-4aa0-8c48-5066c6f0326b\",\r\n \"Application_Type\": \"other\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"a3ad27e0-6d6c-4b1b-a204-b0ae7ce5072a\",\r\n \"ConnectionString\": \"InstrumentationKey=a3ad27e0-6d6c-4b1b-a204-b0ae7ce5072a;IngestionEndpoint=https://eastus-1.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=38835882-6954-4aa0-8c48-5066c6f0326b\",\r\n \"Name\": \"asotest-component-jlfdny\",\r\n \"CreationDate\": \"2025-01-04T21:17:10.6985453+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: + - "1327" + 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-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 49270AAB39E8408DA42234F36824D945 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:20Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 178.531467ms + - id: 7 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 224 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","properties":{"principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","roleDefinitionId":"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "224" + Content-Type: + - application/json + Test-Request-Hash: + - f75ef0ce4155919f556206b37b47852e6a91aa8f89a25e0c704d2d5c5cafbc0c + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f?api-version=2022-04-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1019 + uncompressed: false + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":null,"updatedBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1019" + 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-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: CFB1DDA8900A4CF3A3067A9CBF319A01 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:24Z' + status: 201 Created + code: 201 + duration: 2.682208901s + - 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: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f?api-version=2022-04-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1053 + uncompressed: false + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","updatedBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1053" + 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-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: AEFBA3D3C41B4C50A62063521AAA3DDD Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:31Z' + status: 200 OK + code: 200 + duration: 333.325301ms + - 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: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f?api-version=2022-04-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1053 + uncompressed: false + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","updatedBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1053" + 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-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 0F17F6CAF31748A68D680F6A0D987B32 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:32Z' + status: 200 OK + code: 200 + duration: 277.877442ms + - id: 10 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 767 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{}}},"location":"eastus","name":"asotest-rule-vnlubb","properties":{"criteria":{"allOf":[{"failingPeriods":{"minFailingPeriodsToAlert":1,"numberOfEvaluationPeriods":1},"operator":"LessThan","query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","threshold":10,"timeAggregation":"Count"}]},"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"severity":0,"windowSize":"PT10M"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "767" + Content-Type: + - application/json + Test-Request-Hash: + - 063dbfc753b4f02c4e969f02a3edf8b44457137b053a1d81899a765539363195 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/scheduledQueryRules/asotest-rule-vnlubb?api-version=2024-01-01-preview + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1428 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","systemData":{"createdBy":"andrei.barbu@uipath.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"andrei.barbu@uipath.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "1428" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=bd40cb4406af7e019459240c4b3391e3ad50b18834d5536b66832ba63d6a7358;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=bd40cb4406af7e019459240c4b3391e3ad50b18834d5536b66832ba63d6a7358;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 0DD0A3E3BA464F33B96AF1121938F799 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:34Z' + X-Powered-By: + - ASP.NET + X-Rate-Limit-Limit: + - 1m + X-Rate-Limit-Remaining: + - "29" + X-Rate-Limit-Reset: + - "2025-01-04T21:18:35.8619122Z" + status: 201 Created + code: 201 + duration: 6.981253554s + - id: 11 + 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/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/scheduledQueryRules/asotest-rule-vnlubb?api-version=2024-01-01-preview + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1428 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","systemData":{"createdBy":"andrei.barbu@uipath.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"andrei.barbu@uipath.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "1428" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=1135860cb1787e6ecbd502a3790d0b01729a4523bbf848b5310d6027a3b35077;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=1135860cb1787e6ecbd502a3790d0b01729a4523bbf848b5310d6027a3b35077;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 53DC284EF7494E55B2EF20C40F8360BF Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:50Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 720.064463ms + - 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-vrgxjp/providers/Microsoft.Insights/scheduledQueryRules/asotest-rule-vnlubb?api-version=2024-01-01-preview + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1428 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","systemData":{"createdBy":"andrei.barbu@uipath.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"andrei.barbu@uipath.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "1428" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=dbffd5fe3566b989206bb0d2d7a9f23e23e676213d4e69b0da029e867e9581be;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=dbffd5fe3566b989206bb0d2d7a9f23e23e676213d4e69b0da029e867e9581be;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 451D671AB9EA4B389344F17D2DBB09E5 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:51Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 1.003778952s + - id: 13 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 788 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{}}},"location":"eastus","name":"asotest-rule-vnlubb","properties":{"criteria":{"allOf":[{"failingPeriods":{"minFailingPeriodsToAlert":1,"numberOfEvaluationPeriods":1},"operator":"LessThan","query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","threshold":10,"timeAggregation":"Count"}]},"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"severity":0,"windowSize":"PT10M"},"tags":{"foo":"bar"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "788" + Content-Type: + - application/json + Test-Request-Hash: + - 4eaa374f8940f05df119c75228837785974509bef62add03ed8e30ce2ed24cbc + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/scheduledQueryRules/asotest-rule-vnlubb?api-version=2024-01-01-preview + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1449 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","tags":{"foo":"bar"},"systemData":{"createdBy":"andrei.barbu@uipath.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"andrei.barbu@uipath.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "1449" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=93fb7eafabed342579d55cdc8bc202afb66fedcee6923b6f971167b265e56c7d;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=93fb7eafabed342579d55cdc8bc202afb66fedcee6923b6f971167b265e56c7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 0BC128E975A048E8BB5D649CFF3A4168 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:58Z' + X-Powered-By: + - ASP.NET + X-Rate-Limit-Limit: + - 1m + X-Rate-Limit-Remaining: + - "29" + X-Rate-Limit-Reset: + - "2025-01-04T21:18:59.9097791Z" + status: 200 OK + code: 200 + duration: 5.596240103s + - 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: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/scheduledQueryRules/asotest-rule-vnlubb?api-version=2024-01-01-preview + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1449 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","tags":{"foo":"bar"},"systemData":{"createdBy":"andrei.barbu@uipath.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"andrei.barbu@uipath.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "1449" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=936c5a1707dd3e2fcf89bbb614418d923f46b422b0bd509236f782b4798f469b;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=936c5a1707dd3e2fcf89bbb614418d923f46b422b0bd509236f782b4798f469b;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 4517DC20552E4A10B92D4059ADE69CBF Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:09Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 391.587957ms + - 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-vrgxjp/providers/Microsoft.Insights/scheduledQueryRules/asotest-rule-vnlubb?api-version=2024-01-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: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=d5e266b35b5458631210fa23598998ed376f688fa2a911f8ca5c0cf78f146b00;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=d5e266b35b5458631210fa23598998ed376f688fa2a911f8ca5c0cf78f146b00;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 2EDA47E4512D458D89BE97BC6DE7DC85 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:13Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 2.803555168s + - 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-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb?api-version=2024-01-01-preview + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 247 + uncompressed: false + body: '{"error":{"code":"ResourceNotFound","message":"The Resource ''microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb'' under resource group ''asotest-rg-vrgxjp'' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "247" + 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: 0FC72A55CDD74E9B9695ECFFD055BA23 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:23Z' + status: 404 Not Found + code: 404 + duration: 180.48166ms + - 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-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f?api-version=2022-04-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1053 + uncompressed: false + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","updatedBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1053" + 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-Ratelimit-Remaining-Subscription-Global-Deletes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 5CF6705248224777A1AE495F06F9B07D Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:24Z' + status: 200 OK + code: 200 + duration: 611.88282ms + - 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-vrgxjp?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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223052673718&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=OR_Irhx7XI598NK1IjZWeJdz4TTzV5oKflG6Z2l-DTPuv-OIWGRiHsBvp0tSPJt_6Rw69ZEDE3nRJbr3t9pS5GpKFv2AnFRPt6rHGpgyELR4KCz0eTK9LEAMdPMcTnNVdqxwonnQ56nsBogYXl-WxtjxSlM7ocC5q-xwue-r_y2rb5nNi9uV3RZX1vzgG94-IGEZchJpjvub92MMApU0wwSXrnx98cnN6g5bvcXtBsL9BN0YF1TyDzTSYXLBGuOmKlx-Vnz-kNZPje7-fPM7AZXCMpXcT1GdPuUIoIgTHq-TQtyHaPygPLIuccHuILrNG-xUkzHy_dF9nzbcndc4xQ&h=B9sxlBTncP_VjxIEt3de7oCGGF9hBMZsOMugIY0LPug + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 9CDED66D524D48F080D472C0AFFDF187 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:24Z' + status: 202 Accepted + code: 202 + duration: 950.950017ms + - 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: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223052673718&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=OR_Irhx7XI598NK1IjZWeJdz4TTzV5oKflG6Z2l-DTPuv-OIWGRiHsBvp0tSPJt_6Rw69ZEDE3nRJbr3t9pS5GpKFv2AnFRPt6rHGpgyELR4KCz0eTK9LEAMdPMcTnNVdqxwonnQ56nsBogYXl-WxtjxSlM7ocC5q-xwue-r_y2rb5nNi9uV3RZX1vzgG94-IGEZchJpjvub92MMApU0wwSXrnx98cnN6g5bvcXtBsL9BN0YF1TyDzTSYXLBGuOmKlx-Vnz-kNZPje7-fPM7AZXCMpXcT1GdPuUIoIgTHq-TQtyHaPygPLIuccHuILrNG-xUkzHy_dF9nzbcndc4xQ&h=B9sxlBTncP_VjxIEt3de7oCGGF9hBMZsOMugIY0LPug + 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" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223216514759&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=3ywMeJT8csalYz33BkWPsM1v--4MCUrQJv6CJwQRVq-YAvKBImEbzqyiN2pWzyh5IWGo5os4U9_B8brQOVy5uaTEb-bJSMbp58eGqZGdXdyWxHwYqwu84Dd2wdSq5RBh0CMEi_HAH7dQgOKrc5Dj_PjJVhicg1NYZrs7P4rGvMj36y42XEAKqZNwrGKlE0R94DrnDP1q71qbqrCghzqMmehGyrgKLI8m9GcELhJTMBv5gi078weDS0hFvbwQrEDEz5i3eST3J8YN0-C2Q9iOgDt87Vbp8gda2B9xbNMHpeVLJpJx_vE9GZ_SRImUN28iKtCjI5S_x5_2hXxQ21CoPw&h=4vd0_GK99PlMY-aUpbBYHXEiqhuRbTVzvrIZcJrqngk + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 80BC0B07703D43A68B2D24AD2A1B00FF Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:41Z' + status: 202 Accepted + code: 202 + duration: 384.527831ms + - 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: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223052673718&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=OR_Irhx7XI598NK1IjZWeJdz4TTzV5oKflG6Z2l-DTPuv-OIWGRiHsBvp0tSPJt_6Rw69ZEDE3nRJbr3t9pS5GpKFv2AnFRPt6rHGpgyELR4KCz0eTK9LEAMdPMcTnNVdqxwonnQ56nsBogYXl-WxtjxSlM7ocC5q-xwue-r_y2rb5nNi9uV3RZX1vzgG94-IGEZchJpjvub92MMApU0wwSXrnx98cnN6g5bvcXtBsL9BN0YF1TyDzTSYXLBGuOmKlx-Vnz-kNZPje7-fPM7AZXCMpXcT1GdPuUIoIgTHq-TQtyHaPygPLIuccHuILrNG-xUkzHy_dF9nzbcndc4xQ&h=B9sxlBTncP_VjxIEt3de7oCGGF9hBMZsOMugIY0LPug + 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" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223374506903&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=ah0wRC2s2YroC4snNQWyFmmyaYEVaOOjcTZPWdacDkcUJXGsTlYvQ3oa8mTypMjvAyHT778-CksZiT7aDWrKsNyWoEB68Uc9XTXgq5fZfwnh56in5USqIg3QGNCFMKWUiL_vVFTS8io5Wr5rKqaj9_7atoQDqASOHFeLiHjiv50L3pkfyC-JZIXhMxIgfsXMAC1j0bs1nlajKQylGEH5xMhKRebrEtieVbm5PvrkhrIj5cUHaHxO3k536t32f2anQrQKL6jGi8xumvTUtBh3op8VhH375-7LTUkJaPQTSteF1RShLLDHwiGMmHOz19x_0a7T94x7GbZnVn0RimPGsg&h=XpSxpeSbGSv0ZyuB4p-h5GOlvcx8xPBowcRN3_678bk + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 50500C65BBEF45C1942E7191486CC919 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:57Z' + status: 202 Accepted + code: 202 + duration: 417.766157ms + - 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: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223052673718&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=OR_Irhx7XI598NK1IjZWeJdz4TTzV5oKflG6Z2l-DTPuv-OIWGRiHsBvp0tSPJt_6Rw69ZEDE3nRJbr3t9pS5GpKFv2AnFRPt6rHGpgyELR4KCz0eTK9LEAMdPMcTnNVdqxwonnQ56nsBogYXl-WxtjxSlM7ocC5q-xwue-r_y2rb5nNi9uV3RZX1vzgG94-IGEZchJpjvub92MMApU0wwSXrnx98cnN6g5bvcXtBsL9BN0YF1TyDzTSYXLBGuOmKlx-Vnz-kNZPje7-fPM7AZXCMpXcT1GdPuUIoIgTHq-TQtyHaPygPLIuccHuILrNG-xUkzHy_dF9nzbcndc4xQ&h=B9sxlBTncP_VjxIEt3de7oCGGF9hBMZsOMugIY0LPug + 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" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223531014293&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=cKXxEeypnaBOMxX9ki_X1Xf2WLE_kmGMKc43jyjNaNfivEeubVdV69L0GpgCJHH7_kS_vC7_HGw28chqQm0Tp2Q1eRF1FS8U-Ris_dCH8S00WggBSfK3NDPA7-Gi6nppgpD3NoCsHG9XT5AdwLqQpw-dyc-PnMQzsfAi99212Y7Fgcf_11eNDdV8aJsMcSfzHeBY4N4mf0RpA-j3urJtupgYcuZPHE-57eyqDHHGYKYLmV-2H-ATrWfSA7cSgm_WauVxixbk6tY1WPiTP1OhzS8ubM_3_cs9C47R-AeMNvZ_tetncUUyaD5k4TMeIfgqS-pczwmaQUBZWlt7mwL6YA&h=7Ot1LS90L2Tc5LhGBOQFL8MBk2dIbSSrTKwRSYAEyE0 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 3F3059EEB2414D6F9AB5E4C96EF8EC45 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:19:12Z' + status: 202 Accepted + code: 202 + duration: 227.322024ms + - id: 22 + 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: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223052673718&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=OR_Irhx7XI598NK1IjZWeJdz4TTzV5oKflG6Z2l-DTPuv-OIWGRiHsBvp0tSPJt_6Rw69ZEDE3nRJbr3t9pS5GpKFv2AnFRPt6rHGpgyELR4KCz0eTK9LEAMdPMcTnNVdqxwonnQ56nsBogYXl-WxtjxSlM7ocC5q-xwue-r_y2rb5nNi9uV3RZX1vzgG94-IGEZchJpjvub92MMApU0wwSXrnx98cnN6g5bvcXtBsL9BN0YF1TyDzTSYXLBGuOmKlx-Vnz-kNZPje7-fPM7AZXCMpXcT1GdPuUIoIgTHq-TQtyHaPygPLIuccHuILrNG-xUkzHy_dF9nzbcndc4xQ&h=B9sxlBTncP_VjxIEt3de7oCGGF9hBMZsOMugIY0LPug + 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-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: F12014CC30384082B27346EB677B2605 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:19:28Z' + status: 200 OK + code: 200 + duration: 256.1841ms + - id: 23 + 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-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny?api-version=2020-02-02 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 109 + uncompressed: false + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-vrgxjp'' could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + 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: 0E63AC4DD15C4A43898E6F92104015B4 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:19:29Z' + status: 404 Not Found + code: 404 + duration: 182.938219ms + - id: 24 + 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-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl?api-version=2023-01-31 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 109 + uncompressed: false + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-vrgxjp'' could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + 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: C771CA182FE5485BB6DCFA65BA4DAC89 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:19:29Z' + status: 404 Not Found + code: 404 + duration: 232.354003ms diff --git a/v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml b/v2/samples/insights/v1api/v1api20240101preview_scheduledqueryrule.yaml similarity index 92% rename from v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml rename to v2/samples/insights/v1api/v1api20240101preview_scheduledqueryrule.yaml index e051e1618e1..9c2ebd748e0 100644 --- a/v2/samples/insights/v1api/v1api20231201_scheduledqueryrule.yaml +++ b/v2/samples/insights/v1api/v1api20240101preview_scheduledqueryrule.yaml @@ -1,4 +1,4 @@ -apiVersion: insights.azure.com/v1api20231201 +apiVersion: insights.azure.com/v1api20240101preview kind: ScheduledQueryRule metadata: name: aso-sample-rule From 7884677e48f320eabe5679683d4e4d9cdfe20743 Mon Sep 17 00:00:00 2001 From: AndreiBarbuOz Date: Mon, 6 Jan 2025 20:57:13 -0800 Subject: [PATCH 04/12] Move sample, add managed identities --- .golangci.yml | 1 - go.mod | 2 +- .../v1api20181130_userassignedidentity.yaml | 17 +++++++++++++++++ ...v1api20240101preview_scheduledqueryrule.yaml | 5 +++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 v2/samples/insights/v1api20240101preview/refs/v1api20181130_userassignedidentity.yaml rename v2/samples/insights/{v1api => v1api20240101preview}/v1api20240101preview_scheduledqueryrule.yaml (80%) diff --git a/.golangci.yml b/.golangci.yml index abf23165eec..fac90694680 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,7 +20,6 @@ linters: # The below rules are disabled due to bug with go1.18 and generics: https://github.com/golangci/golangci-lint/issues/2859 - stylecheck - musttag # Extremely slow, at least on CI machines - - recvcheck linters-settings: exhaustive: diff --git a/go.mod b/go.mod index 35c1f328163..427b8b9bf21 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/AndreiBarbuOz/azure-service-operator +module github.com/Azure/azure-service-operator go 1.20 diff --git a/v2/samples/insights/v1api20240101preview/refs/v1api20181130_userassignedidentity.yaml b/v2/samples/insights/v1api20240101preview/refs/v1api20181130_userassignedidentity.yaml new file mode 100644 index 00000000000..e5568d33312 --- /dev/null +++ b/v2/samples/insights/v1api20240101preview/refs/v1api20181130_userassignedidentity.yaml @@ -0,0 +1,17 @@ +apiVersion: managedidentity.azure.com/v1api20181130 +kind: UserAssignedIdentity +metadata: + name: adminidentity + namespace: default +spec: + location: eastus + owner: + name: aso-sample-rg + operatorSpec: + configMaps: + tenantId: + name: admin-settings + key: tenantId + clientId: + name: admin-settings + key: clientId diff --git a/v2/samples/insights/v1api/v1api20240101preview_scheduledqueryrule.yaml b/v2/samples/insights/v1api20240101preview/v1api20240101preview_scheduledqueryrule.yaml similarity index 80% rename from v2/samples/insights/v1api/v1api20240101preview_scheduledqueryrule.yaml rename to v2/samples/insights/v1api20240101preview/v1api20240101preview_scheduledqueryrule.yaml index 9c2ebd748e0..8b72fc4dc9b 100644 --- a/v2/samples/insights/v1api/v1api20240101preview_scheduledqueryrule.yaml +++ b/v2/samples/insights/v1api20240101preview/v1api20240101preview_scheduledqueryrule.yaml @@ -16,6 +16,11 @@ spec: evaluationFrequency: PT10M identity: type: UserAssigned + userAssignedIdentities: + - reference: + group: managedidentity.azure.com + kind: UserAssignedIdentity + name: adminidentity location: westus2 owner: name: aso-sample-rg From 67c7240766a143c5493b34a020a201b0600055b8 Mon Sep 17 00:00:00 2001 From: Petre Popescu Date: Tue, 4 Feb 2025 00:50:58 +0000 Subject: [PATCH 05/12] Complete samples with component and role --- docs/hugo/content/reference/_index.md | 6 +++--- .../hugo/content/reference/insights/_index.md | 6 +++--- .../v1api20181130_userassignedidentity.yaml | 3 +++ .../refs/v1api20200202_component.yaml | 19 +++++++++++++++++++ .../refs/v1api20220401_roleassignment.yaml | 16 ++++++++++++++++ 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 v2/samples/insights/v1api20240101preview/refs/v1api20200202_component.yaml create mode 100644 v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml diff --git a/docs/hugo/content/reference/_index.md b/docs/hugo/content/reference/_index.md index 7e681054ca5..074135c4c44 100644 --- a/docs/hugo/content/reference/_index.md +++ b/docs/hugo/content/reference/_index.md @@ -420,9 +420,9 @@ To install the CRDs for these resources, your ASO configuration must include `in 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 | -|--------------------|--------------------|----------------------|----------------|--------| -| ScheduledQueryRule | 2024-01-01-preview | v1api20240101preview | v2.12.0 | - | +| Resource | ARM Version | CRD Version | Supported From | Sample | +|--------------------|--------------------|----------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| +| ScheduledQueryRule | 2024-01-01-preview | v1api20240101preview | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api20240101preview/v1api20240101preview_scheduledqueryrule.yaml) | ### Released diff --git a/docs/hugo/content/reference/insights/_index.md b/docs/hugo/content/reference/insights/_index.md index d3059777ba9..00bf77f67b7 100644 --- a/docs/hugo/content/reference/insights/_index.md +++ b/docs/hugo/content/reference/insights/_index.md @@ -9,9 +9,9 @@ To install the CRDs for these resources, your ASO configuration must include `in 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 | -|--------------------|--------------------|----------------------|----------------|--------| -| ScheduledQueryRule | 2024-01-01-preview | v1api20240101preview | v2.12.0 | - | +| Resource | ARM Version | CRD Version | Supported From | Sample | +|--------------------|--------------------|----------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| +| ScheduledQueryRule | 2024-01-01-preview | v1api20240101preview | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api20240101preview/v1api20240101preview_scheduledqueryrule.yaml) | ### Released diff --git a/v2/samples/insights/v1api20240101preview/refs/v1api20181130_userassignedidentity.yaml b/v2/samples/insights/v1api20240101preview/refs/v1api20181130_userassignedidentity.yaml index e5568d33312..ea18ba80e0e 100644 --- a/v2/samples/insights/v1api20240101preview/refs/v1api20181130_userassignedidentity.yaml +++ b/v2/samples/insights/v1api20240101preview/refs/v1api20181130_userassignedidentity.yaml @@ -12,6 +12,9 @@ spec: tenantId: name: admin-settings key: tenantId + principalId: + name: admin-settings + key: principalId clientId: name: admin-settings key: clientId diff --git a/v2/samples/insights/v1api20240101preview/refs/v1api20200202_component.yaml b/v2/samples/insights/v1api20240101preview/refs/v1api20200202_component.yaml new file mode 100644 index 00000000000..052773af13e --- /dev/null +++ b/v2/samples/insights/v1api20240101preview/refs/v1api20200202_component.yaml @@ -0,0 +1,19 @@ +apiVersion: insights.azure.com/v1api20200202 +kind: Component +metadata: + name: sampleappinsights + namespace: default +spec: + location: eastus2 + owner: + name: aso-sample-rg + Application_Type: web + kind: web + operatorSpec: + configMaps: + connectionString: + name: componentconfig + key: connectionString + instrumentationKey: + name: componentconfig + key: instrumentationKey diff --git a/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml b/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml new file mode 100644 index 00000000000..71abd29c563 --- /dev/null +++ b/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml @@ -0,0 +1,16 @@ +apiVersion: authorization.azure.com/v1api20220401 +kind: RoleAssignment +metadata: + name: aso-sample-sp-to-vnet + namespace: default +spec: + owner: + name: aso-sample-rg + group: resources.azure.com + kind: ResourceGroup + principalIdFromConfig: + name: admin-settings + key: principalId + roleDefinitionReference: + # This is the ID of the built-in "Monitoring Contributor" role. See https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for more. + armId: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/749f88d5-cbae-40b8-bcfc-e573ddc772fa From e97f5958f6da18f37c8cfa32c7806ee9b31220e9 Mon Sep 17 00:00:00 2001 From: Petre Popescu Date: Tue, 4 Feb 2025 01:45:26 +0000 Subject: [PATCH 06/12] Try out non-empty action group --- .../refs/v1api20220401_roleassignment.yaml | 2 +- .../refs/v1api20230101_actiongroup.yaml | 12 +++++++++ ...api20240101preview_scheduledqueryrule.yaml | 25 +++++++++++-------- 3 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 v2/samples/insights/v1api20240101preview/refs/v1api20230101_actiongroup.yaml diff --git a/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml b/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml index 71abd29c563..0694f533c87 100644 --- a/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml +++ b/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml @@ -1,7 +1,7 @@ apiVersion: authorization.azure.com/v1api20220401 kind: RoleAssignment metadata: - name: aso-sample-sp-to-vnet + name: aso-sample-roleassignment namespace: default spec: owner: diff --git a/v2/samples/insights/v1api20240101preview/refs/v1api20230101_actiongroup.yaml b/v2/samples/insights/v1api20240101preview/refs/v1api20230101_actiongroup.yaml new file mode 100644 index 00000000000..dfb5c464991 --- /dev/null +++ b/v2/samples/insights/v1api20240101preview/refs/v1api20230101_actiongroup.yaml @@ -0,0 +1,12 @@ +apiVersion: insights.azure.com/v1api20230101 +kind: ActionGroup +metadata: + name: aso-sample-actiongroup + namespace: default +spec: + azureName: aso-sample-actiongroup + enabled: true + location: westus2 + groupShortName: acgr + owner: + name: aso-sample-rg diff --git a/v2/samples/insights/v1api20240101preview/v1api20240101preview_scheduledqueryrule.yaml b/v2/samples/insights/v1api20240101preview/v1api20240101preview_scheduledqueryrule.yaml index 8b72fc4dc9b..13838ed06da 100644 --- a/v2/samples/insights/v1api20240101preview/v1api20240101preview_scheduledqueryrule.yaml +++ b/v2/samples/insights/v1api20240101preview/v1api20240101preview_scheduledqueryrule.yaml @@ -6,13 +6,13 @@ metadata: spec: criteria: allOf: - - failingPeriods: - minFailingPeriodsToAlert: 1 - numberOfEvaluationPeriods: 1 - operator: LessThan - query: "requests | summarize CountByCountry=count() by client_CountryOrRegion" - threshold: 10 - timeAggregation: Count + - failingPeriods: + minFailingPeriodsToAlert: 1 + numberOfEvaluationPeriods: 1 + operator: LessThan + query: "requests | summarize CountByCountry=count() by client_CountryOrRegion" + threshold: 10 + timeAggregation: Count evaluationFrequency: PT10M identity: type: UserAssigned @@ -25,8 +25,13 @@ spec: owner: name: aso-sample-rg scopesReferences: - - group: insights.azure.com - kind: Component - name: sampleappinsights + - group: insights.azure.com + kind: Component + name: sampleappinsights severity: 0 windowSize: PT10M + actions: + actionGroupsReferences: + - group: insights.azure.com + kind: ActionGroup + name: aso-sample-actiongroup From 852581b528515427da302c5182fb3e0266038a9a Mon Sep 17 00:00:00 2001 From: Petre Popescu Date: Tue, 4 Feb 2025 08:39:22 +0000 Subject: [PATCH 07/12] Switch role to owner --- .../v1api20240101preview/refs/v1api20220401_roleassignment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml b/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml index 0694f533c87..2b770c4f9d4 100644 --- a/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml +++ b/v2/samples/insights/v1api20240101preview/refs/v1api20220401_roleassignment.yaml @@ -13,4 +13,4 @@ spec: key: principalId roleDefinitionReference: # This is the ID of the built-in "Monitoring Contributor" role. See https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for more. - armId: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/749f88d5-cbae-40b8-bcfc-e573ddc772fa + armId: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c From e4ac582c8946173f3d17598cc618728b0358f5b2 Mon Sep 17 00:00:00 2001 From: Petre Popescu Date: Tue, 4 Feb 2025 08:39:35 +0000 Subject: [PATCH 08/12] Retry on insufficient permissions --- .../customizations/scheduled_query_rule_extensions.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/v2/api/insights/customizations/scheduled_query_rule_extensions.go b/v2/api/insights/customizations/scheduled_query_rule_extensions.go index 7b9c004bf88..58c857dc18e 100644 --- a/v2/api/insights/customizations/scheduled_query_rule_extensions.go +++ b/v2/api/insights/customizations/scheduled_query_rule_extensions.go @@ -58,5 +58,13 @@ func isRetryableError(err *genericarmclient.CloudError) bool { return true } + // When a managed identity is used, if the role assignment was not created yet + // we get a BadRequest error with a message like: + // "The provided credentials have insufficient access to perform the requested operation" + // These should be retried to allow the role assignment to be created once the identity is ready. + if err.Code() == "BadRequest" && strings.Contains(err.Message(), "insufficient access") { + return true + } + return false } From 0125a98757824846d48978f9dba47bbd15956920 Mon Sep 17 00:00:00 2001 From: Petre Popescu Date: Tue, 4 Feb 2025 08:39:45 +0000 Subject: [PATCH 09/12] Execute samples test and record --- ...pi20240101preview_CreationAndDeletion.yaml | 1867 +++++++++++++++++ 1 file changed, 1867 insertions(+) create mode 100644 v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Insights_v1api20240101preview_CreationAndDeletion.yaml diff --git a/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Insights_v1api20240101preview_CreationAndDeletion.yaml b/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Insights_v1api20240101preview_CreationAndDeletion.yaml new file mode 100644 index 00000000000..7d496aba7f6 --- /dev/null +++ b/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Insights_v1api20240101preview_CreationAndDeletion.yaml @@ -0,0 +1,1867 @@ +--- +version: 2 +interactions: + - 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-wrktnw","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "93" + Content-Type: + - application/json + Test-Request-Hash: + - c9d9d299e36702218754f777cc008a9e8c096781a2a43cb82475bcac364a24aa + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw?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-wrktnw","name":"asotest-rg-wrktnw","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-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: F4922DEC09B947429E4D157B5AE8665D Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:40Z' + status: 200 OK + code: 200 + duration: 2.511950225s + - 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-wrktnw?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-wrktnw","name":"asotest-rg-wrktnw","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-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 059A58F4C748428AAF6C0113A925AE48 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:45Z' + status: 200 OK + code: 200 + duration: 219.214138ms + - id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 44 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"eastus","name":"adminidentity"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "44" + Content-Type: + - application/json + Test-Request-Hash: + - a3b7210e6287b9a23e20479a42cc4e409d61c7c904ab5be12aeee2bc44a2cebc + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity?api-version=2018-11-30 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 445 + uncompressed: false + body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity","name":"adminidentity","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73","clientId":"0122e497-2b4a-4e47-ad48-6ca7f67c069c"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "445" + 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-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 1E897F1B465146CC84483CFE2A4853F4 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:48Z' + status: 200 OK + code: 200 + duration: 756.195111ms + - id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 108 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"westus2","name":"aso-sample-actiongroup","properties":{"enabled":true,"groupShortName":"acgr"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "108" + Content-Type: + - application/json + Test-Request-Hash: + - 2e82b601071c159d9016996d3772902675b92f9307e789b1e7e55aad5675c58a + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup?api-version=2023-01-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 584 + uncompressed: false + body: '{"id":"/subscriptions/3E8E8F8D-5388-41DD-8CB1-6DD1D418FE76/resourceGroups/asotest-rg-wrktnw/providers/microsoft.insights/actionGroups/aso-sample-actiongroup","type":"Microsoft.Insights/ActionGroups","name":"aso-sample-actiongroup","location":"westus2","kind":null,"tags":null,"properties":{"groupShortName":"acgr","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"eventHubReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[],"armRoleReceivers":[]}}' + headers: + Access-Control-Expose-Headers: + - x-activityid + Api-Supported-Versions: + - 2016-09-01-preview, 2017-03-01-preview, 2017-04-01, 2018-03-01, 2018-09-01, 2019-03-01, 2019-06-01, 2021-09-01, 2022-04-01, 2022-06-01, 2023-01-01, 2023-03-01-preview, 2023-05-01-preview, 2023-05-01, 2023-08-01-preview, 2023-09-01-preview, 2024-10-01-preview + Cache-Control: + - no-cache + Content-Length: + - "584" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Activityid: + - becb62ed-3f52-4d23-b2de-33beb3680a99 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Ms-Ratelimit-Remaining-Subscription-Resource-Requests: + - "24" + X-Msedge-Ref: + - 'Ref A: 5F24BCAE1EB7403C899781CBA2EF3A4D Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:48Z' + X-Servedby: + - MWH1AZNS000009 + status: 200 OK + code: 200 + duration: 949.374736ms + - id: 4 + 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-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity?api-version=2018-11-30 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 445 + uncompressed: false + body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity","name":"adminidentity","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73","clientId":"0122e497-2b4a-4e47-ad48-6ca7f67c069c"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "445" + 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-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 9FBF9C4481074CDABB4AF3EC4D115E6A Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:50Z' + status: 200 OK + code: 200 + duration: 369.519728ms + - 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: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup?api-version=2023-01-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 584 + uncompressed: false + body: '{"id":"/subscriptions/3E8E8F8D-5388-41DD-8CB1-6DD1D418FE76/resourceGroups/asotest-rg-wrktnw/providers/microsoft.insights/actionGroups/aso-sample-actiongroup","type":"Microsoft.Insights/ActionGroups","name":"aso-sample-actiongroup","location":"westus2","kind":null,"tags":null,"properties":{"groupShortName":"acgr","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"eventHubReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[],"armRoleReceivers":[]}}' + headers: + Access-Control-Expose-Headers: + - x-activityid + Api-Supported-Versions: + - 2016-09-01-preview, 2017-03-01-preview, 2017-04-01, 2018-03-01, 2018-09-01, 2019-03-01, 2019-06-01, 2021-09-01, 2022-04-01, 2022-06-01, 2023-01-01, 2023-03-01-preview, 2023-05-01-preview, 2023-05-01, 2023-08-01-preview, 2023-09-01-preview, 2024-10-01-preview + Cache-Control: + - no-cache + Content-Length: + - "584" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Activityid: + - cfe248ee-ead7-4e60-917d-1135c54e7222 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Ms-Ratelimit-Remaining-Subscription-Resource-Requests: + - "249" + X-Msedge-Ref: + - 'Ref A: 7664BD5F7BCE42B1B3B7E20D485DA839 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:50Z' + X-Servedby: + - MWH1AZNS000009 + status: 200 OK + code: 200 + duration: 912.598526ms + - id: 6 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 102 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"kind":"web","location":"eastus2","name":"sampleappinsights","properties":{"Application_Type":"web"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "102" + Content-Type: + - application/json + Test-Request-Hash: + - 62d1811f5c0b4d9302cdf256d18e4ec5a86d3363b11f41aabf32d6870ad67cec + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/components/sampleappinsights?api-version=2020-02-02 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1300 + uncompressed: false + body: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"9e00da13-0000-0200-0000-67a1d1650000\\\"\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/microsoft.insights/components/sampleappinsights\",\r\n \"name\": \"sampleappinsights\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"ApplicationId\": \"sampleappinsights\",\r\n \"AppId\": \"298214c4-c637-4b43-9bea-a25dcb0d0da7\",\r\n \"Application_Type\": \"web\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"b82d7af6-912d-4ca1-8151-687b247b418a\",\r\n \"ConnectionString\": \"InstrumentationKey=b82d7af6-912d-4ca1-8151-687b247b418a;IngestionEndpoint=https://eastus2-4.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus2.livediagnostics.monitor.azure.com/;ApplicationId=298214c4-c637-4b43-9bea-a25dcb0d0da7\",\r\n \"Name\": \"sampleappinsights\",\r\n \"CreationDate\": \"2025-02-04T08:31:20.1626781+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: + - "1300" + 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-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 729A3A77D392452BB7E850BFAF8E52B5 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:48Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 2.862608627s + - id: 7 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 275 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"name":"b7dc8df4-6bba-5a50-b662-2a34356bf7ad","properties":{"principalId":"2e551177-cac4-46f0-8239-d2d35c927f73","roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "275" + Content-Type: + - application/json + Test-Request-Hash: + - ecb16118ab0940082f6697a19a9ddc86791c0a0d5ad87a855a1bc28bb519ad37 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad?api-version=2022-04-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 889 + uncompressed: false + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":null,"updatedBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad","type":"Microsoft.Authorization/roleAssignments","name":"b7dc8df4-6bba-5a50-b662-2a34356bf7ad"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "889" + 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-Ratelimit-Remaining-Subscription-Global-Writes: + - "2998" + X-Msedge-Ref: + - 'Ref A: 070675CBD76047E4BE5D86B9FF3C4126 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:50Z' + status: 201 Created + code: 201 + duration: 2.535281584s + - 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-wrktnw/providers/Microsoft.Insights/components/sampleappinsights?api-version=2020-02-02 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1300 + uncompressed: false + body: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"9e00da13-0000-0200-0000-67a1d1650000\\\"\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/microsoft.insights/components/sampleappinsights\",\r\n \"name\": \"sampleappinsights\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"ApplicationId\": \"sampleappinsights\",\r\n \"AppId\": \"298214c4-c637-4b43-9bea-a25dcb0d0da7\",\r\n \"Application_Type\": \"web\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"b82d7af6-912d-4ca1-8151-687b247b418a\",\r\n \"ConnectionString\": \"InstrumentationKey=b82d7af6-912d-4ca1-8151-687b247b418a;IngestionEndpoint=https://eastus2-4.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus2.livediagnostics.monitor.azure.com/;ApplicationId=298214c4-c637-4b43-9bea-a25dcb0d0da7\",\r\n \"Name\": \"sampleappinsights\",\r\n \"CreationDate\": \"2025-02-04T08:31:20.1626781+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: + - "1300" + 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-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 6D6B471567064D39A0B466FADD9A3037 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:54Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 325.244989ms + - id: 9 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 934 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity":{}}},"location":"westus2","name":"aso-sample-rule","properties":{"actions":{"actionGroups":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup"]},"criteria":{"allOf":[{"failingPeriods":{"minFailingPeriodsToAlert":1,"numberOfEvaluationPeriods":1},"operator":"LessThan","query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","threshold":10,"timeAggregation":"Count"}]},"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/components/sampleappinsights"],"severity":0,"windowSize":"PT10M"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "934" + Content-Type: + - application/json + Test-Request-Hash: + - 1dd172a5648c9b9f0e9fa0d83a463609e3cb0cf51d90e878374c73628424ca02 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/scheduledQueryRules/aso-sample-rule?api-version=2024-01-01-preview + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 179 + uncompressed: false + body: '{"error":{"code":"BadRequest","message":"The provided credentials have insufficient access to perform the requested operation Activity ID: 7acefe9b-b411-4f85-ba91-90699520712d."}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "179" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=56bb749273bf3e48971348b5652fd5d438f90662a1babc21ce62f54b15c97cb4;Path=/;HttpOnly;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + - ARRAffinitySameSite=56bb749273bf3e48971348b5652fd5d438f90662a1babc21ce62f54b15c97cb4;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 9A0C9DE1218F4FD397C31985DEFACC61 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:48Z' + X-Powered-By: + - ASP.NET + X-Rate-Limit-Limit: + - 1m + X-Rate-Limit-Remaining: + - "29" + X-Rate-Limit-Reset: + - "2025-02-04T08:36:51.4817651Z" + status: 400 Bad Request + code: 400 + duration: 6.015687294s + - id: 10 + 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/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad?api-version=2022-04-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 923 + uncompressed: false + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","updatedBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad","type":"Microsoft.Authorization/roleAssignments","name":"b7dc8df4-6bba-5a50-b662-2a34356bf7ad"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "923" + 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-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: B461E36935C9447CADE9D166C3DD966A Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:55Z' + status: 200 OK + code: 200 + duration: 133.958996ms + - id: 11 + 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-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad?api-version=2022-04-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 923 + uncompressed: false + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","updatedBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad","type":"Microsoft.Authorization/roleAssignments","name":"b7dc8df4-6bba-5a50-b662-2a34356bf7ad"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "923" + 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-Ratelimit-Remaining-Subscription-Global-Reads: + - "3748" + X-Msedge-Ref: + - 'Ref A: D7A7303B31B44A2FA8CFF5F34E4E1208 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:56Z' + status: 200 OK + code: 200 + duration: 136.167679ms + - id: 12 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 275 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"name":"b7dc8df4-6bba-5a50-b662-2a34356bf7ad","properties":{"principalId":"2e551177-cac4-46f0-8239-d2d35c927f73","roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "275" + Content-Type: + - application/json + Test-Request-Hash: + - ecb16118ab0940082f6697a19a9ddc86791c0a0d5ad87a855a1bc28bb519ad37 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad?api-version=2022-04-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 889 + uncompressed: false + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":null,"updatedBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad","type":"Microsoft.Authorization/roleAssignments","name":"b7dc8df4-6bba-5a50-b662-2a34356bf7ad"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "889" + 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-Ratelimit-Remaining-Subscription-Global-Writes: + - "2997" + X-Msedge-Ref: + - 'Ref A: 15CD4BA691E94A68A9E79722E7747333 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:56Z' + status: 201 Created + code: 201 + duration: 849.140329ms + - 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: + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad?api-version=2022-04-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 923 + uncompressed: false + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","updatedBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad","type":"Microsoft.Authorization/roleAssignments","name":"b7dc8df4-6bba-5a50-b662-2a34356bf7ad"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "923" + 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-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 6CC87C436875486DBB076B4170FE8587 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:35:59Z' + status: 200 OK + code: 200 + duration: 185.641095ms + - 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: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad?api-version=2022-04-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 923 + uncompressed: false + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","updatedBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad","type":"Microsoft.Authorization/roleAssignments","name":"b7dc8df4-6bba-5a50-b662-2a34356bf7ad"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "923" + 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-Ratelimit-Remaining-Subscription-Global-Reads: + - "3748" + X-Msedge-Ref: + - 'Ref A: 288711459AA04DBF94C31F55A69624DF Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:36:00Z' + status: 200 OK + code: 200 + duration: 192.649819ms + - id: 15 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 934 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity":{}}},"location":"westus2","name":"aso-sample-rule","properties":{"actions":{"actionGroups":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup"]},"criteria":{"allOf":[{"failingPeriods":{"minFailingPeriodsToAlert":1,"numberOfEvaluationPeriods":1},"operator":"LessThan","query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","threshold":10,"timeAggregation":"Count"}]},"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/components/sampleappinsights"],"severity":0,"windowSize":"PT10M"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "934" + Content-Type: + - application/json + Test-Request-Hash: + - 1dd172a5648c9b9f0e9fa0d83a463609e3cb0cf51d90e878374c73628424ca02 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/scheduledQueryRules/aso-sample-rule?api-version=2024-01-01-preview + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 179 + uncompressed: false + body: '{"error":{"code":"BadRequest","message":"The provided credentials have insufficient access to perform the requested operation Activity ID: 2e1acb2e-bc4d-4be8-9bef-895f87ba5f92."}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "179" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=c37ffea8ffbceff3bce75d545a37384e3a249dde32a929589c1477c17ae4d0dc;Path=/;HttpOnly;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + - ARRAffinitySameSite=c37ffea8ffbceff3bce75d545a37384e3a249dde32a929589c1477c17ae4d0dc;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: F22F465385BB443197B4E9A1E0B83840 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:36:01Z' + X-Powered-By: + - ASP.NET + X-Rate-Limit-Limit: + - 1m + X-Rate-Limit-Remaining: + - "29" + X-Rate-Limit-Reset: + - "2025-02-04T08:37:04.4007376Z" + status: 400 Bad Request + code: 400 + duration: 6.662117873s + - id: 16 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 934 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity":{}}},"location":"westus2","name":"aso-sample-rule","properties":{"actions":{"actionGroups":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup"]},"criteria":{"allOf":[{"failingPeriods":{"minFailingPeriodsToAlert":1,"numberOfEvaluationPeriods":1},"operator":"LessThan","query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","threshold":10,"timeAggregation":"Count"}]},"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/components/sampleappinsights"],"severity":0,"windowSize":"PT10M"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "934" + Content-Type: + - application/json + Test-Request-Hash: + - 1dd172a5648c9b9f0e9fa0d83a463609e3cb0cf51d90e878374c73628424ca02 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/scheduledQueryRules/aso-sample-rule?api-version=2024-01-01-preview + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 179 + uncompressed: false + body: '{"error":{"code":"BadRequest","message":"The provided credentials have insufficient access to perform the requested operation Activity ID: 9bd86601-7574-42db-864e-fdc6555b9716."}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "179" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=c37ffea8ffbceff3bce75d545a37384e3a249dde32a929589c1477c17ae4d0dc;Path=/;HttpOnly;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + - ARRAffinitySameSite=c37ffea8ffbceff3bce75d545a37384e3a249dde32a929589c1477c17ae4d0dc;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2998" + X-Msedge-Ref: + - 'Ref A: 462B82699E6C43879A812E5455312F85 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:36:17Z' + X-Powered-By: + - ASP.NET + X-Rate-Limit-Limit: + - 1m + X-Rate-Limit-Remaining: + - "28" + X-Rate-Limit-Reset: + - "2025-02-04T08:37:04.4007376Z" + status: 400 Bad Request + code: 400 + duration: 3.946646419s + - id: 17 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 934 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity":{}}},"location":"westus2","name":"aso-sample-rule","properties":{"actions":{"actionGroups":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup"]},"criteria":{"allOf":[{"failingPeriods":{"minFailingPeriodsToAlert":1,"numberOfEvaluationPeriods":1},"operator":"LessThan","query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","threshold":10,"timeAggregation":"Count"}]},"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/components/sampleappinsights"],"severity":0,"windowSize":"PT10M"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "934" + Content-Type: + - application/json + Test-Request-Hash: + - 1dd172a5648c9b9f0e9fa0d83a463609e3cb0cf51d90e878374c73628424ca02 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/scheduledQueryRules/aso-sample-rule?api-version=2024-01-01-preview + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 179 + uncompressed: false + body: '{"error":{"code":"BadRequest","message":"The provided credentials have insufficient access to perform the requested operation Activity ID: a270955d-9dc8-40f0-9102-a096e3daec14."}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "179" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=52f8a4371de16c7afc44f037d30946a21b847265bb64e90f074cad5f16452d0c;Path=/;HttpOnly;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + - ARRAffinitySameSite=52f8a4371de16c7afc44f037d30946a21b847265bb64e90f074cad5f16452d0c;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 61A7B0EE77044CA8ABDE3CB5F65E5860 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:36:29Z' + X-Powered-By: + - ASP.NET + X-Rate-Limit-Limit: + - 1m + X-Rate-Limit-Remaining: + - "29" + X-Rate-Limit-Reset: + - "2025-02-04T08:37:31.5268865Z" + status: 400 Bad Request + code: 400 + duration: 6.30182297s + - id: 18 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 934 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity":{}}},"location":"westus2","name":"aso-sample-rule","properties":{"actions":{"actionGroups":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup"]},"criteria":{"allOf":[{"failingPeriods":{"minFailingPeriodsToAlert":1,"numberOfEvaluationPeriods":1},"operator":"LessThan","query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","threshold":10,"timeAggregation":"Count"}]},"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/components/sampleappinsights"],"severity":0,"windowSize":"PT10M"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "934" + Content-Type: + - application/json + Test-Request-Hash: + - 1dd172a5648c9b9f0e9fa0d83a463609e3cb0cf51d90e878374c73628424ca02 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/scheduledQueryRules/aso-sample-rule?api-version=2024-01-01-preview + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 179 + uncompressed: false + body: '{"error":{"code":"BadRequest","message":"The provided credentials have insufficient access to perform the requested operation Activity ID: abd80933-b2c6-4de2-9b29-a1cc7b903a6a."}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "179" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=52f8a4371de16c7afc44f037d30946a21b847265bb64e90f074cad5f16452d0c;Path=/;HttpOnly;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + - ARRAffinitySameSite=52f8a4371de16c7afc44f037d30946a21b847265bb64e90f074cad5f16452d0c;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: D0F8A0E485FD4E80824AD1D2751207CA Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:36:49Z' + X-Powered-By: + - ASP.NET + X-Rate-Limit-Limit: + - 1m + X-Rate-Limit-Remaining: + - "28" + X-Rate-Limit-Reset: + - "2025-02-04T08:37:31.5268865Z" + status: 400 Bad Request + code: 400 + duration: 3.84989502s + - id: 19 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 934 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity":{}}},"location":"westus2","name":"aso-sample-rule","properties":{"actions":{"actionGroups":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup"]},"criteria":{"allOf":[{"failingPeriods":{"minFailingPeriodsToAlert":1,"numberOfEvaluationPeriods":1},"operator":"LessThan","query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","threshold":10,"timeAggregation":"Count"}]},"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/components/sampleappinsights"],"severity":0,"windowSize":"PT10M"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "934" + Content-Type: + - application/json + Test-Request-Hash: + - 1dd172a5648c9b9f0e9fa0d83a463609e3cb0cf51d90e878374c73628424ca02 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/scheduledQueryRules/aso-sample-rule?api-version=2024-01-01-preview + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1593 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/microsoft.insights/scheduledqueryrules/aso-sample-rule","name":"aso-sample-rule","type":"Microsoft.Insights/scheduledQueryRules","location":"westus2","systemData":{"createdBy":"petrepopescu21@gmail.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"petrepopescu21@gmail.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity":{"clientId":"0122e497-2b4a-4e47-ad48-6ca7f67c069c","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/components/sampleappinsights"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]},"actions":{"actionGroups":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup"]}}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "1593" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=78573bd266cd96f01cdb67a787db49fa16bcbe38547dd180b7f44ec92c953b2e;Path=/;HttpOnly;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + - ARRAffinitySameSite=78573bd266cd96f01cdb67a787db49fa16bcbe38547dd180b7f44ec92c953b2e;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "2999" + X-Msedge-Ref: + - 'Ref A: D937B7643EA0438CA543E27DE4D9B3B1 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:37:13Z' + X-Powered-By: + - ASP.NET + X-Rate-Limit-Limit: + - 1m + X-Rate-Limit-Remaining: + - "29" + X-Rate-Limit-Reset: + - "2025-02-04T08:38:16.0936924Z" + status: 201 Created + code: 201 + duration: 5.425655353s + - 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: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/scheduledQueryRules/aso-sample-rule?api-version=2024-01-01-preview + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1593 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/microsoft.insights/scheduledqueryrules/aso-sample-rule","name":"aso-sample-rule","type":"Microsoft.Insights/scheduledQueryRules","location":"westus2","systemData":{"createdBy":"petrepopescu21@gmail.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"petrepopescu21@gmail.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity":{"clientId":"0122e497-2b4a-4e47-ad48-6ca7f67c069c","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/components/sampleappinsights"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]},"actions":{"actionGroups":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup"]}}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "1593" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=e3f6a312fc362049ee34eeee41fd61a496cb7094845e130feb34ad13c909cfe0;Path=/;HttpOnly;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + - ARRAffinitySameSite=e3f6a312fc362049ee34eeee41fd61a496cb7094845e130feb34ad13c909cfe0;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Orig-Api-Version: + - 2024-01-01-preview + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: ADE2094E24734E94BCDAF842334D64A7 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:37:25Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 828.572166ms + - 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: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/scheduledQueryRules/aso-sample-rule?api-version=2024-01-01-preview + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1593 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/microsoft.insights/scheduledqueryrules/aso-sample-rule","name":"aso-sample-rule","type":"Microsoft.Insights/scheduledQueryRules","location":"westus2","systemData":{"createdBy":"petrepopescu21@gmail.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"petrepopescu21@gmail.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity":{"clientId":"0122e497-2b4a-4e47-ad48-6ca7f67c069c","principalId":"2e551177-cac4-46f0-8239-d2d35c927f73"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/components/sampleappinsights"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]},"actions":{"actionGroups":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup"]}}}' + headers: + Api-Supported-Versions: + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview + Cache-Control: + - no-cache + Content-Length: + - "1593" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Set-Cookie: + - ARRAffinity=78573bd266cd96f01cdb67a787db49fa16bcbe38547dd180b7f44ec92c953b2e;Path=/;HttpOnly;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + - ARRAffinitySameSite=78573bd266cd96f01cdb67a787db49fa16bcbe38547dd180b7f44ec92c953b2e;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.westus2.prod.alertsrp.azure.com + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Orig-Api-Version: + - 2024-01-01-preview + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 1B3A8A0E98064F5894B91AA18E65FB9E Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:37:27Z' + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 868.522668ms + - id: 22 + 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-wrktnw?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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRXUktUTlctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638742550559265779&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=MZdGshIPDCAtYRDH6PsZCIUPHUyWUhBPinboErzxS5VTH5jbTWuF9qPX5yxnlFSrkaUeZwSDBrcTxPH0cahzfAf2PzT7MeX6m8Yy5rqXV5cxKtT49GKKwPXUzsNjSzxK8klcOtMmCuWMwrOP1edoKyP60TlHFxxm0o4BtyFxvb52Tv-j2udgdWuBqWtRnM6U6h5X0fvSkVdrv8pUaIbC-kZ1PPYY453Bv7CXMyGA70uqX-JurchWRvvZR729mCoyCZGoEJUmzZ80RD0oTqNVhsqkCy3MfRytv7e3CHppesbvSH69yxKobOc65kSMmkUATfbDtQiHDX4SejjtT27H1A&h=c4WsvQcENMszXX84qrAzvqZ41rB7MaX4qJK9dS20AxI + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 9E7FAC20E7C44D4089BA3D0E53BED2F7 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:37:32Z' + status: 202 Accepted + code: 202 + duration: 3.149503015s + - id: 23 + 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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRXUktUTlctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638742550559265779&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=MZdGshIPDCAtYRDH6PsZCIUPHUyWUhBPinboErzxS5VTH5jbTWuF9qPX5yxnlFSrkaUeZwSDBrcTxPH0cahzfAf2PzT7MeX6m8Yy5rqXV5cxKtT49GKKwPXUzsNjSzxK8klcOtMmCuWMwrOP1edoKyP60TlHFxxm0o4BtyFxvb52Tv-j2udgdWuBqWtRnM6U6h5X0fvSkVdrv8pUaIbC-kZ1PPYY453Bv7CXMyGA70uqX-JurchWRvvZR729mCoyCZGoEJUmzZ80RD0oTqNVhsqkCy3MfRytv7e3CHppesbvSH69yxKobOc65kSMmkUATfbDtQiHDX4SejjtT27H1A&h=c4WsvQcENMszXX84qrAzvqZ41rB7MaX4qJK9dS20AxI + 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" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRXUktUTlctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638742550748457870&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=j36zRMJiJCGeGwnu12eLtFEnf6NEdXX4ieSMovW4x6UhSsem8_6KzxFQdDJVlMIpCpFvc6K410SlijeMRyrR7TgzOWp0QqNxPpM6YYlb-o1htbwR8ROts3lGUl_kEUQ8_mdD9MLtimx6TxKAF5JTMJJaWG8_WyDztNktbUaPh8JS7NbF6cDGPJr7qoiZDmLrBgVTdXiwUJWHek34N3-8GcXOsDLTyjtH-379ZtSdVzytOeziYmCBx8FxhbQnCFzGoAoyb1bMxoVCWZYUge3uGXQriTqMsAFYTNcH3MbMOrdetyXpzeNBTEwY5J-sGuwHorczvhgwCHujEFxrDIQ9Wg&h=UR-y21ox2JvPRqiim3xo0S3YwbUVR49kaQU0Tdb3dyk + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: A7E01397E7FF424BA3D6067506D2DA66 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:37:54Z' + status: 202 Accepted + code: 202 + duration: 667.606461ms + - id: 24 + 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: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRXUktUTlctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638742550559265779&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=MZdGshIPDCAtYRDH6PsZCIUPHUyWUhBPinboErzxS5VTH5jbTWuF9qPX5yxnlFSrkaUeZwSDBrcTxPH0cahzfAf2PzT7MeX6m8Yy5rqXV5cxKtT49GKKwPXUzsNjSzxK8klcOtMmCuWMwrOP1edoKyP60TlHFxxm0o4BtyFxvb52Tv-j2udgdWuBqWtRnM6U6h5X0fvSkVdrv8pUaIbC-kZ1PPYY453Bv7CXMyGA70uqX-JurchWRvvZR729mCoyCZGoEJUmzZ80RD0oTqNVhsqkCy3MfRytv7e3CHppesbvSH69yxKobOc65kSMmkUATfbDtQiHDX4SejjtT27H1A&h=c4WsvQcENMszXX84qrAzvqZ41rB7MaX4qJK9dS20AxI + 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" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRXUktUTlctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638742550912283198&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=lwqRYBOrBcTdXwK0cCLV3JJ2gq8qc93FIus0D3F_eHJpwxMi-VeIANr1LIu8_ZiC8vsITOGFJvNbQvW-ugmryfMPS01ngdxVqOh3-8aC4h_Dey8H3I_aWE56DtjFsT838KTajpXqq9w9hZVZnB2n0rIMbi56GvrsMzLifUq5W_27O6z_Tze80ASqF0QaXmpy7t_roiHvxlok7fc_5UvbSt_E39ZpETszXSKzpvQcKIK452J5B_wGjfnPtwF0B6D2GUblEvLqeWrAdWpR8CsFGe-40y6xAJ0DPUU9Z17cz2BYYyunEhTq6NWm3dxU_FFe7lWnujQspNuYKSBkxUfn_g&h=X_uZjmzHcb_DEGG_doYdt1J1CEhNdTUsRz3oTJLB1a0 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: CC3EE6306F1C4C29B8BD5353D40968A1 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:38:10Z' + status: 202 Accepted + code: 202 + duration: 708.220143ms + - id: 25 + 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: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRXUktUTlctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638742550559265779&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=MZdGshIPDCAtYRDH6PsZCIUPHUyWUhBPinboErzxS5VTH5jbTWuF9qPX5yxnlFSrkaUeZwSDBrcTxPH0cahzfAf2PzT7MeX6m8Yy5rqXV5cxKtT49GKKwPXUzsNjSzxK8klcOtMmCuWMwrOP1edoKyP60TlHFxxm0o4BtyFxvb52Tv-j2udgdWuBqWtRnM6U6h5X0fvSkVdrv8pUaIbC-kZ1PPYY453Bv7CXMyGA70uqX-JurchWRvvZR729mCoyCZGoEJUmzZ80RD0oTqNVhsqkCy3MfRytv7e3CHppesbvSH69yxKobOc65kSMmkUATfbDtQiHDX4SejjtT27H1A&h=c4WsvQcENMszXX84qrAzvqZ41rB7MaX4qJK9dS20AxI + 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" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRXUktUTlctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638742551076678325&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=cw8dcNfHKXiSpakQSzreyGH_4L7D_xxqdZafdt7NZBJiPnneI_7RVdOY8DLS6F8ZY4fClQLD1Eedb3w8GYI7BRCG7ZGCdfujHhIlTBxl28wvHjJaJMSP1SXs3ukqAj4p2GGk5zqHa7uqicRZGjQRZ8BjN42JjhyTg1WeIGB_8pbxD7d5tqVPu03ysNaX556LbIKAhAzJqBO5TP5HSiiBRaK54pQ8XIxuPIqrw5RURzsFjXM1OuJk37i89cIgAkZ5DmPQrmH2r_6_haKqhE5oZK8yE9dyap4FAxWdtsXsKGV5qkaXWtNYX5tm_i3zjjFIDvcm_aFRc08Y5tAmT7evNg&h=v6zrlKwKV7LHpw_6rQUnNAtb0PnWLCyOgdTBuOxynfQ + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 2FAD369BF7AD4DE6A5B9680A113FCE20 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:38:27Z' + status: 202 Accepted + code: 202 + duration: 756.273605ms + - id: 26 + 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: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRXUktUTlctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01&t=638742550559265779&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=MZdGshIPDCAtYRDH6PsZCIUPHUyWUhBPinboErzxS5VTH5jbTWuF9qPX5yxnlFSrkaUeZwSDBrcTxPH0cahzfAf2PzT7MeX6m8Yy5rqXV5cxKtT49GKKwPXUzsNjSzxK8klcOtMmCuWMwrOP1edoKyP60TlHFxxm0o4BtyFxvb52Tv-j2udgdWuBqWtRnM6U6h5X0fvSkVdrv8pUaIbC-kZ1PPYY453Bv7CXMyGA70uqX-JurchWRvvZR729mCoyCZGoEJUmzZ80RD0oTqNVhsqkCy3MfRytv7e3CHppesbvSH69yxKobOc65kSMmkUATfbDtQiHDX4SejjtT27H1A&h=c4WsvQcENMszXX84qrAzvqZ41rB7MaX4qJK9dS20AxI + 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-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "3749" + X-Msedge-Ref: + - 'Ref A: 709DAF1DB3634C85AA13F683C6BA3FD3 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:38:43Z' + status: 200 OK + code: 200 + duration: 358.274808ms + - id: 27 + 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-wrktnw/providers/Microsoft.Insights/actionGroups/aso-sample-actiongroup?api-version=2023-01-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 109 + uncompressed: false + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-wrktnw'' could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + 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: BA812070FF4F4878B3A778230E14D534 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:38:48Z' + status: 404 Not Found + code: 404 + duration: 252.504995ms + - id: 28 + 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-wrktnw/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adminidentity?api-version=2018-11-30 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 109 + uncompressed: false + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-wrktnw'' could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + 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: B79E398DA7074BE6AD2D31734B2F41A5 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:38:48Z' + status: 404 Not Found + code: 404 + duration: 286.82995ms + - id: 29 + 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-wrktnw/providers/Microsoft.Insights/scheduledQueryRules/aso-sample-rule?api-version=2024-01-01-preview + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 109 + uncompressed: false + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-wrktnw'' could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + 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: 5F25595FA84F48B4B0CDE858CF9F110A Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:38:48Z' + status: 404 Not Found + code: 404 + duration: 266.6631ms + - id: 30 + 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-wrktnw/providers/Microsoft.Insights/components/sampleappinsights?api-version=2020-02-02 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 109 + uncompressed: false + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-wrktnw'' could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + 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: 5FC66284EA654A88870462133A6F554D Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:38:48Z' + status: 404 Not Found + code: 404 + duration: 1.043325917s + - id: 31 + 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-wrktnw/providers/Microsoft.Authorization/roleAssignments/b7dc8df4-6bba-5a50-b662-2a34356bf7ad?api-version=2022-04-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: false + body: "" + headers: + Cache-Control: + - no-cache + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "2999" + X-Msedge-Ref: + - 'Ref A: 70F5D5889A85406E92F1FD15B80C8506 Ref B: VIEEDGE2422 Ref C: 2025-02-04T08:38:48Z' + status: 204 No Content + code: 204 + duration: 1.099745641s From 1a48db4a1a657d4e1f3554009a285c4ff0fc7f77 Mon Sep 17 00:00:00 2001 From: Petre Popescu Date: Tue, 4 Feb 2025 19:54:07 +0000 Subject: [PATCH 10/12] Revert sample move; Re-record CRUD test --- ...heduledQueryRule_20240101preview_CRUD.yaml | 270 +++++++++--------- .../v1api20220615_scheduledqueryrule.yaml | 0 2 files changed, 138 insertions(+), 132 deletions(-) rename v2/samples/insights/{v1api20220615 => v1api}/v1api20220615_scheduledqueryrule.yaml (100%) diff --git a/v2/internal/controllers/recordings/Test_Insights_ScheduledQueryRule_20240101preview_CRUD.yaml b/v2/internal/controllers/recordings/Test_Insights_ScheduledQueryRule_20240101preview_CRUD.yaml index 043593c1b62..f13d0afae9c 100644 --- a/v2/internal/controllers/recordings/Test_Insights_ScheduledQueryRule_20240101preview_CRUD.yaml +++ b/v2/internal/controllers/recordings/Test_Insights_ScheduledQueryRule_20240101preview_CRUD.yaml @@ -6,23 +6,23 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 147 + content_length: 92 transfer_encoding: [] trailer: {} host: management.azure.com remote_addr: "" request_uri: "" - body: '{"location":"eastus","name":"asotest-rg-vrgxjp","tags":{"CreatedAt":"2001-02-03T04:05:06Z","Owner":"andrei.barbu@uipath.com","Project":"Mazewalk"}}' + body: '{"location":"eastus","name":"asotest-rg-vrgxjp","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' form: {} headers: Accept: - application/json Content-Length: - - "147" + - "92" Content-Type: - application/json Test-Request-Hash: - - 1d0af2ee4389f2740ab33cf9d685dbc7fdde36d9b68b4a700d94624331fba002 + - 6b90763b7129de9f57f49df096c0bc816c1d0e86e211510ba0a1238442fc4b1f url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp?api-version=2020-06-01 method: PUT response: @@ -31,14 +31,14 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 330 + content_length: 275 uncompressed: false - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp","name":"asotest-rg-vrgxjp","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"CreatedAt":"2001-02-03T04:05:06Z","Owner":"andrei.barbu@uipath.com","Project":"Mazewalk"},"properties":{"provisioningState":"Succeeded"}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp","name":"asotest-rg-vrgxjp","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' headers: Cache-Control: - no-cache Content-Length: - - "330" + - "275" Content-Type: - application/json; charset=utf-8 Expires: @@ -54,10 +54,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: - "2999" X-Msedge-Ref: - - 'Ref A: FF213D6C2595490C9526840577EDAC0E Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:16:52Z' + - 'Ref A: 7D7AD259DF57440CAC32B750DB40917D Ref B: FRA231050414009 Ref C: 2025-02-04T19:46:49Z' status: 201 Created code: 201 - duration: 679.499675ms + duration: 2.361825439s - id: 1 request: proto: HTTP/1.1 @@ -84,14 +84,14 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 330 + content_length: 275 uncompressed: false - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp","name":"asotest-rg-vrgxjp","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"CreatedAt":"2001-02-03T04:05:06Z","Owner":"andrei.barbu@uipath.com","Project":"Mazewalk"},"properties":{"provisioningState":"Succeeded"}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp","name":"asotest-rg-vrgxjp","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' headers: Cache-Control: - no-cache Content-Length: - - "330" + - "275" Content-Type: - application/json; charset=utf-8 Expires: @@ -107,10 +107,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: A8A57A54CF9548EC94B62C0EAA204703 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:16:53Z' + - 'Ref A: 51F9F3A4E37D47859E5D8E2A40804398 Ref B: FRA231050414009 Ref C: 2025-02-04T19:46:53Z' status: 200 OK code: 200 - duration: 146.573577ms + duration: 218.27615ms - id: 2 request: proto: HTTP/1.1 @@ -143,7 +143,7 @@ interactions: trailer: {} content_length: 453 uncompressed: false - body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl","name":"asotest-mi-jkuszl","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6"}}' + body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl","name":"asotest-mi-jkuszl","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"d75bff43-efcb-4592-a619-73d28ed39475","clientId":"3edd942f-90ee-441e-925d-edc7f64b12eb"}}' headers: Cache-Control: - no-cache @@ -166,10 +166,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: - "2999" X-Msedge-Ref: - - 'Ref A: 919221BA9D774B559D8EFF794FF82FD0 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:16:59Z' + - 'Ref A: F0B14465526A42B6A1A0EFC8A241A36B Ref B: FRA231050414009 Ref C: 2025-02-04T19:46:58Z' status: 201 Created code: 201 - duration: 1.452674636s + duration: 1.89265176s - id: 3 request: proto: HTTP/1.1 @@ -202,7 +202,7 @@ interactions: trailer: {} content_length: 453 uncompressed: false - body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl","name":"asotest-mi-jkuszl","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6"}}' + body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl","name":"asotest-mi-jkuszl","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"d75bff43-efcb-4592-a619-73d28ed39475","clientId":"3edd942f-90ee-441e-925d-edc7f64b12eb"}}' headers: Cache-Control: - no-cache @@ -223,10 +223,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: - "2999" X-Msedge-Ref: - - 'Ref A: 84051F5EDBA54057A82D19D989506EC2 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:03Z' + - 'Ref A: 3263C4099217445E8EF192477E2B2B88 Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:02Z' status: 200 OK code: 200 - duration: 766.746624ms + duration: 526.858483ms - id: 4 request: proto: HTTP/1.1 @@ -255,7 +255,7 @@ interactions: trailer: {} content_length: 453 uncompressed: false - body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl","name":"asotest-mi-jkuszl","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6"}}' + body: '{"location":"eastus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl","name":"asotest-mi-jkuszl","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"d75bff43-efcb-4592-a619-73d28ed39475","clientId":"3edd942f-90ee-441e-925d-edc7f64b12eb"}}' headers: Cache-Control: - no-cache @@ -276,10 +276,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: B6796EA1D7204E759F92100C57848A3A Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:04Z' + - 'Ref A: BC0FD3EC9A904CE98D271E85C3BF3A1B Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:04Z' status: 200 OK code: 200 - duration: 237.905404ms + duration: 438.365683ms - id: 5 request: proto: HTTP/1.1 @@ -312,7 +312,7 @@ interactions: trailer: {} content_length: 1327 uncompressed: false - body: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"4c04f964-0000-0100-0000-6779a5560000\\\"\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny\",\r\n \"name\": \"asotest-component-jlfdny\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"ApplicationId\": \"asotest-component-jlfdny\",\r\n \"AppId\": \"38835882-6954-4aa0-8c48-5066c6f0326b\",\r\n \"Application_Type\": \"other\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"a3ad27e0-6d6c-4b1b-a204-b0ae7ce5072a\",\r\n \"ConnectionString\": \"InstrumentationKey=a3ad27e0-6d6c-4b1b-a204-b0ae7ce5072a;IngestionEndpoint=https://eastus-1.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=38835882-6954-4aa0-8c48-5066c6f0326b\",\r\n \"Name\": \"asotest-component-jlfdny\",\r\n \"CreationDate\": \"2025-01-04T21:17:10.6985453+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}" + body: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"3600f2c6-0000-0100-0000-67a26ebe0000\\\"\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny\",\r\n \"name\": \"asotest-component-jlfdny\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"ApplicationId\": \"asotest-component-jlfdny\",\r\n \"AppId\": \"cdaf5c1b-67cd-4a20-8add-d1c4c95e98bf\",\r\n \"Application_Type\": \"other\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"32611b8b-cd88-4e06-b369-da117c30a90c\",\r\n \"ConnectionString\": \"InstrumentationKey=32611b8b-cd88-4e06-b369-da117c30a90c;IngestionEndpoint=https://eastus-6.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=cdaf5c1b-67cd-4a20-8add-d1c4c95e98bf\",\r\n \"Name\": \"asotest-component-jlfdny\",\r\n \"CreationDate\": \"2025-02-04T19:47:10.6882876+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 @@ -337,12 +337,12 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: - "2999" X-Msedge-Ref: - - 'Ref A: 42729274D1E24B9E98938AF3DF2C6E56 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:09Z' + - 'Ref A: 6AC09CB39F244ABABC79B2176CA81D1C Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:08Z' X-Powered-By: - ASP.NET status: 200 OK code: 200 - duration: 5.632685648s + duration: 2.987546985s - id: 6 request: proto: HTTP/1.1 @@ -371,7 +371,7 @@ interactions: trailer: {} content_length: 1327 uncompressed: false - body: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"4c04f964-0000-0100-0000-6779a5560000\\\"\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny\",\r\n \"name\": \"asotest-component-jlfdny\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"ApplicationId\": \"asotest-component-jlfdny\",\r\n \"AppId\": \"38835882-6954-4aa0-8c48-5066c6f0326b\",\r\n \"Application_Type\": \"other\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"a3ad27e0-6d6c-4b1b-a204-b0ae7ce5072a\",\r\n \"ConnectionString\": \"InstrumentationKey=a3ad27e0-6d6c-4b1b-a204-b0ae7ce5072a;IngestionEndpoint=https://eastus-1.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=38835882-6954-4aa0-8c48-5066c6f0326b\",\r\n \"Name\": \"asotest-component-jlfdny\",\r\n \"CreationDate\": \"2025-01-04T21:17:10.6985453+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}" + body: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"3600f2c6-0000-0100-0000-67a26ebe0000\\\"\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny\",\r\n \"name\": \"asotest-component-jlfdny\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"ApplicationId\": \"asotest-component-jlfdny\",\r\n \"AppId\": \"cdaf5c1b-67cd-4a20-8add-d1c4c95e98bf\",\r\n \"Application_Type\": \"other\",\r\n \"Flow_Type\": null,\r\n \"Request_Source\": null,\r\n \"InstrumentationKey\": \"32611b8b-cd88-4e06-b369-da117c30a90c\",\r\n \"ConnectionString\": \"InstrumentationKey=32611b8b-cd88-4e06-b369-da117c30a90c;IngestionEndpoint=https://eastus-6.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=cdaf5c1b-67cd-4a20-8add-d1c4c95e98bf\",\r\n \"Name\": \"asotest-component-jlfdny\",\r\n \"CreationDate\": \"2025-02-04T19:47:10.6882876+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 @@ -396,12 +396,12 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: 49270AAB39E8408DA42234F36824D945 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:20Z' + - 'Ref A: 702CA2FCD1AE41DB894D945CBCB68E51 Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:14Z' X-Powered-By: - ASP.NET status: 200 OK code: 200 - duration: 178.531467ms + duration: 425.875743ms - id: 7 request: proto: HTTP/1.1 @@ -413,7 +413,7 @@ interactions: host: management.azure.com remote_addr: "" request_uri: "" - body: '{"name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","properties":{"principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","roleDefinitionId":"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"}}' + body: '{"name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","properties":{"principalId":"d75bff43-efcb-4592-a619-73d28ed39475","roleDefinitionId":"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"}}' form: {} headers: Accept: @@ -423,7 +423,7 @@ interactions: Content-Type: - application/json Test-Request-Hash: - - f75ef0ce4155919f556206b37b47852e6a91aa8f89a25e0c704d2d5c5cafbc0c + - e251ceecde8cd6e9be8fb48d5364246dd416ee94a08341a09adcd8da53f979ce url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f?api-version=2022-04-01 method: PUT response: @@ -434,7 +434,7 @@ interactions: trailer: {} content_length: 1019 uncompressed: false - body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":null,"updatedBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"d75bff43-efcb-4592-a619-73d28ed39475","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":null,"updatedBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' headers: Cache-Control: - no-cache @@ -455,10 +455,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: - "2999" X-Msedge-Ref: - - 'Ref A: CFB1DDA8900A4CF3A3067A9CBF319A01 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:24Z' + - 'Ref A: 86320B17109C47F88F29047B78284862 Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:18Z' status: 201 Created code: 201 - duration: 2.682208901s + duration: 2.75445209s - id: 8 request: proto: HTTP/1.1 @@ -485,7 +485,7 @@ interactions: trailer: {} content_length: 1053 uncompressed: false - body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","updatedBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"d75bff43-efcb-4592-a619-73d28ed39475","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","updatedBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' headers: Cache-Control: - no-cache @@ -506,10 +506,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: AEFBA3D3C41B4C50A62063521AAA3DDD Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:31Z' + - 'Ref A: 180602D050124B619FD4A465B441B12F Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:25Z' status: 200 OK code: 200 - duration: 333.325301ms + duration: 206.083627ms - id: 9 request: proto: HTTP/1.1 @@ -538,7 +538,7 @@ interactions: trailer: {} content_length: 1053 uncompressed: false - body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","updatedBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"d75bff43-efcb-4592-a619-73d28ed39475","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","updatedBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' headers: Cache-Control: - no-cache @@ -559,10 +559,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: 0F17F6CAF31748A68D680F6A0D987B32 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:32Z' + - 'Ref A: EB2A92104D324715BB2DC3481F4F240C Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:26Z' status: 200 OK code: 200 - duration: 277.877442ms + duration: 223.73522ms - id: 10 request: proto: HTTP/1.1 @@ -593,16 +593,16 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 1428 + content_length: 1430 uncompressed: false - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","systemData":{"createdBy":"andrei.barbu@uipath.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"andrei.barbu@uipath.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","systemData":{"createdBy":"petrepopescu21@gmail.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"petrepopescu21@gmail.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"3edd942f-90ee-441e-925d-edc7f64b12eb","principalId":"d75bff43-efcb-4592-a619-73d28ed39475"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' headers: Api-Supported-Versions: - - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview Cache-Control: - no-cache Content-Length: - - "1428" + - "1430" Content-Type: - application/json; charset=utf-8 Expires: @@ -610,8 +610,8 @@ interactions: Pragma: - no-cache Set-Cookie: - - ARRAffinity=bd40cb4406af7e019459240c4b3391e3ad50b18834d5536b66832ba63d6a7358;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com - - ARRAffinitySameSite=bd40cb4406af7e019459240c4b3391e3ad50b18834d5536b66832ba63d6a7358;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinity=37de4dff1b026f940ace5f917f84c44c9442abe95ebb32c3a087ebe66029626f;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=37de4dff1b026f940ace5f917f84c44c9442abe95ebb32c3a087ebe66029626f;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Cache: @@ -621,7 +621,7 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: - "2999" X-Msedge-Ref: - - 'Ref A: 0DD0A3E3BA464F33B96AF1121938F799 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:34Z' + - 'Ref A: 6AB1E63B29224326BC04A980B1B53060 Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:28Z' X-Powered-By: - ASP.NET X-Rate-Limit-Limit: @@ -629,10 +629,10 @@ interactions: X-Rate-Limit-Remaining: - "29" X-Rate-Limit-Reset: - - "2025-01-04T21:18:35.8619122Z" + - "2025-02-04T19:48:30.4155487Z" status: 201 Created code: 201 - duration: 6.981253554s + duration: 6.192538989s - id: 11 request: proto: HTTP/1.1 @@ -657,16 +657,16 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 1428 + content_length: 1430 uncompressed: false - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","systemData":{"createdBy":"andrei.barbu@uipath.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"andrei.barbu@uipath.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","systemData":{"createdBy":"petrepopescu21@gmail.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"petrepopescu21@gmail.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"3edd942f-90ee-441e-925d-edc7f64b12eb","principalId":"d75bff43-efcb-4592-a619-73d28ed39475"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' headers: Api-Supported-Versions: - - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview Cache-Control: - no-cache Content-Length: - - "1428" + - "1430" Content-Type: - application/json; charset=utf-8 Expires: @@ -674,8 +674,8 @@ interactions: Pragma: - no-cache Set-Cookie: - - ARRAffinity=1135860cb1787e6ecbd502a3790d0b01729a4523bbf848b5310d6027a3b35077;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com - - ARRAffinitySameSite=1135860cb1787e6ecbd502a3790d0b01729a4523bbf848b5310d6027a3b35077;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinity=1aa73cc8ba25c05f62078ae3d0472e982315ac6c23bade0e13ec7b13b2f490ff;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=1aa73cc8ba25c05f62078ae3d0472e982315ac6c23bade0e13ec7b13b2f490ff;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -684,15 +684,17 @@ interactions: - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Ms-Orig-Api-Version: + - 2024-01-01-preview X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: 53DC284EF7494E55B2EF20C40F8360BF Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:50Z' + - 'Ref A: 831B26B16661445B9CF7BE06CF3A5F25 Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:43Z' X-Powered-By: - ASP.NET status: 200 OK code: 200 - duration: 720.064463ms + duration: 1.33210862s - id: 12 request: proto: HTTP/1.1 @@ -719,16 +721,16 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 1428 + content_length: 1430 uncompressed: false - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","systemData":{"createdBy":"andrei.barbu@uipath.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"andrei.barbu@uipath.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","systemData":{"createdBy":"petrepopescu21@gmail.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"petrepopescu21@gmail.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"3edd942f-90ee-441e-925d-edc7f64b12eb","principalId":"d75bff43-efcb-4592-a619-73d28ed39475"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' headers: Api-Supported-Versions: - - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview Cache-Control: - no-cache Content-Length: - - "1428" + - "1430" Content-Type: - application/json; charset=utf-8 Expires: @@ -736,8 +738,8 @@ interactions: Pragma: - no-cache Set-Cookie: - - ARRAffinity=dbffd5fe3566b989206bb0d2d7a9f23e23e676213d4e69b0da029e867e9581be;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com - - ARRAffinitySameSite=dbffd5fe3566b989206bb0d2d7a9f23e23e676213d4e69b0da029e867e9581be;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinity=a340a76e318606afba243e3c7f38ee20153cebf13a5a2b2a1bc42681bae64418;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=a340a76e318606afba243e3c7f38ee20153cebf13a5a2b2a1bc42681bae64418;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -746,15 +748,17 @@ interactions: - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Ms-Orig-Api-Version: + - 2024-01-01-preview X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: 451D671AB9EA4B389344F17D2DBB09E5 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:51Z' + - 'Ref A: B9F73A1628C64949BE4115993FD818C7 Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:45Z' X-Powered-By: - ASP.NET status: 200 OK code: 200 - duration: 1.003778952s + duration: 720.48055ms - id: 13 request: proto: HTTP/1.1 @@ -785,16 +789,16 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 1449 + content_length: 1450 uncompressed: false - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","tags":{"foo":"bar"},"systemData":{"createdBy":"andrei.barbu@uipath.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"andrei.barbu@uipath.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","tags":{"foo":"bar"},"systemData":{"createdBy":"petrepopescu21@gmail.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"petrepopescu21@gmail.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"3edd942f-90ee-441e-925d-edc7f64b12eb","principalId":"d75bff43-efcb-4592-a619-73d28ed39475"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' headers: Api-Supported-Versions: - - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview Cache-Control: - no-cache Content-Length: - - "1449" + - "1450" Content-Type: - application/json; charset=utf-8 Expires: @@ -802,8 +806,8 @@ interactions: Pragma: - no-cache Set-Cookie: - - ARRAffinity=93fb7eafabed342579d55cdc8bc202afb66fedcee6923b6f971167b265e56c7d;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com - - ARRAffinitySameSite=93fb7eafabed342579d55cdc8bc202afb66fedcee6923b6f971167b265e56c7d;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinity=388daeaf53660b65110db2737db23177bd8daaeb46bebddd8087aad872e9952f;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=388daeaf53660b65110db2737db23177bd8daaeb46bebddd8087aad872e9952f;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -815,7 +819,7 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: - "2999" X-Msedge-Ref: - - 'Ref A: 0BC128E975A048E8BB5D649CFF3A4168 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:17:58Z' + - 'Ref A: 0E3C6C958BA641B4BEA84EF979D1293C Ref B: FRA231050414009 Ref C: 2025-02-04T19:47:52Z' X-Powered-By: - ASP.NET X-Rate-Limit-Limit: @@ -823,10 +827,10 @@ interactions: X-Rate-Limit-Remaining: - "29" X-Rate-Limit-Reset: - - "2025-01-04T21:18:59.9097791Z" + - "2025-02-04T19:48:54.2623387Z" status: 200 OK code: 200 - duration: 5.596240103s + duration: 7.666727943s - id: 14 request: proto: HTTP/1.1 @@ -853,16 +857,16 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 1449 + content_length: 1450 uncompressed: false - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","tags":{"foo":"bar"},"systemData":{"createdBy":"andrei.barbu@uipath.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"andrei.barbu@uipath.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"f47651b2-6ad7-40f2-a88c-6b772c730ad6","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/scheduledqueryrules/asotest-rule-vnlubb","name":"asotest-rule-vnlubb","type":"Microsoft.Insights/scheduledQueryRules","location":"eastus","tags":{"foo":"bar"},"systemData":{"createdBy":"petrepopescu21@gmail.com","createdByType":"User","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"petrepopescu21@gmail.com","lastModifiedByType":"User","lastModifiedAt":"2001-02-03T04:05:06Z"},"identity":{"type":"UserAssigned","tenantId":"00000000-0000-0000-0000-000000000000","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl":{"clientId":"3edd942f-90ee-441e-925d-edc7f64b12eb","principalId":"d75bff43-efcb-4592-a619-73d28ed39475"}}},"properties":{"createdWithApiVersion":"2024-01-01-preview","severity":0,"enabled":true,"evaluationFrequency":"PT10M","scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny"],"windowSize":"PT10M","criteria":{"allOf":[{"query":"requests | summarize CountByCountry=count() by client_CountryOrRegion","timeAggregation":"Count","operator":"LessThan","threshold":10.0,"failingPeriods":{"numberOfEvaluationPeriods":1,"minFailingPeriodsToAlert":1}}]}}}' headers: Api-Supported-Versions: - - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview Cache-Control: - no-cache Content-Length: - - "1449" + - "1450" Content-Type: - application/json; charset=utf-8 Expires: @@ -870,8 +874,8 @@ interactions: Pragma: - no-cache Set-Cookie: - - ARRAffinity=936c5a1707dd3e2fcf89bbb614418d923f46b422b0bd509236f782b4798f469b;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com - - ARRAffinitySameSite=936c5a1707dd3e2fcf89bbb614418d923f46b422b0bd509236f782b4798f469b;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinity=4cff0184ead6d39dd613dc1d1ceedd502dbd3bd0492c0eb1f0dd846179a6d377;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=4cff0184ead6d39dd613dc1d1ceedd502dbd3bd0492c0eb1f0dd846179a6d377;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -880,15 +884,17 @@ interactions: - CONFIG_NOCACHE X-Content-Type-Options: - nosniff + X-Ms-Orig-Api-Version: + - 2024-01-01-preview X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: 4517DC20552E4A10B92D4059ADE69CBF Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:09Z' + - 'Ref A: 0262AAC80653472BADE8EF42B52D2F36 Ref B: FRA231050414009 Ref C: 2025-02-04T19:48:07Z' X-Powered-By: - ASP.NET status: 200 OK code: 200 - duration: 391.587957ms + duration: 347.493769ms - id: 15 request: proto: HTTP/1.1 @@ -920,7 +926,7 @@ interactions: body: "" headers: Api-Supported-Versions: - - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview + - 2017-09-01-preview, 2017-09-01, 2018-04-16, 2020-05-01-preview, 2021-02-01-preview, 2021-08-01, 2022-06-15, 2022-08-01-preview, 2023-03-15-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview Cache-Control: - no-cache Content-Length: @@ -930,8 +936,8 @@ interactions: Pragma: - no-cache Set-Cookie: - - ARRAffinity=d5e266b35b5458631210fa23598998ed376f688fa2a911f8ca5c0cf78f146b00;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com - - ARRAffinitySameSite=d5e266b35b5458631210fa23598998ed376f688fa2a911f8ca5c0cf78f146b00;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinity=1aa73cc8ba25c05f62078ae3d0472e982315ac6c23bade0e13ec7b13b2f490ff;Path=/;HttpOnly;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com + - ARRAffinitySameSite=1aa73cc8ba25c05f62078ae3d0472e982315ac6c23bade0e13ec7b13b2f490ff;Path=/;HttpOnly;SameSite=None;Secure;Domain=lsa.eastus.prod.alertsrp.azure.com Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Cache: @@ -941,12 +947,12 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: - "2999" X-Msedge-Ref: - - 'Ref A: 2EDA47E4512D458D89BE97BC6DE7DC85 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:13Z' + - 'Ref A: E638257B3EBC4C49A11724B58222A4BD Ref B: FRA231050414009 Ref C: 2025-02-04T19:48:12Z' X-Powered-By: - ASP.NET status: 200 OK code: 200 - duration: 2.803555168s + duration: 4.29451219s - id: 16 request: proto: HTTP/1.1 @@ -996,10 +1002,10 @@ interactions: X-Ms-Failure-Cause: - gateway X-Msedge-Ref: - - 'Ref A: 0FC72A55CDD74E9B9695ECFFD055BA23 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:23Z' + - 'Ref A: E782D992C8744645901B38B6C6411F27 Ref B: FRA231050414009 Ref C: 2025-02-04T19:48:22Z' status: 404 Not Found code: 404 - duration: 180.48166ms + duration: 185.142386ms - id: 17 request: proto: HTTP/1.1 @@ -1018,7 +1024,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f?api-version=2022-04-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp?api-version=2020-06-01 method: DELETE response: proto: HTTP/2.0 @@ -1026,20 +1032,22 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 1053 + content_length: 0 uncompressed: false - body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"abb4f90a-44cb-4192-852c-eba9d9c44da4","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","updatedBy":"7fc43de6-8dfd-4804-ac82-3e5d71d9e477","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' + body: "" headers: Cache-Control: - no-cache Content-Length: - - "1053" - Content-Type: - - application/json; charset=utf-8 + - "0" Expires: - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638742953041570537&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=SmkzacCdWxK_TyZFyMOIrtzwzhyIjsuClhuEVQHk2RZcU6-2v3SggIR9LthsYtQKh4LN4zVptcARk-pxM8XKLX2JRgVleOrNRKm7-_E9SYpbCidBrGKGiVzOVaoSGrapce71nF5hMEPSiJz69t1fHqSlfRe7wOfv-rhOWHKXMEGLGt-BcpFu5Eehm3h60V-BXofG_Q8F6Soj4a7DU3dtTa6ba-lZiplO5App8WC_sxk2-8jyRhZYkSzChE-fIXeE58Oym-Rckj664aWjZ8D-xMZ1s0R4HT3RGNtw41lFF0FYDPcEIK_Qd8fSTQ5NDpwgL3otx29LZDLmerG8XC4RMg&h=LvmaXZBV-s2dv6Cs5q78LVD5oFXvgjvgHIHSOlH8RjA Pragma: - no-cache + Retry-After: + - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Cache: @@ -1049,10 +1057,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: - "2999" X-Msedge-Ref: - - 'Ref A: 5CF6705248224777A1AE495F06F9B07D Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:24Z' - status: 200 OK - code: 200 - duration: 611.88282ms + - 'Ref A: F849447316324ED9B97670B76730689D Ref B: FRA231050414009 Ref C: 2025-02-04T19:48:22Z' + status: 202 Accepted + code: 202 + duration: 1.332073127s - id: 18 request: proto: HTTP/1.1 @@ -1071,7 +1079,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp?api-version=2020-06-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f?api-version=2022-04-01 method: DELETE response: proto: HTTP/2.0 @@ -1079,22 +1087,20 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 0 + content_length: 1053 uncompressed: false - body: "" + body: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"d75bff43-efcb-4592-a619-73d28ed39475","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny","condition":null,"conditionVersion":null,"createdOn":"2001-02-03T04:05:06Z","updatedOn":"2001-02-03T04:05:06Z","createdBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","updatedBy":"2c27d50b-e87c-43c6-a870-9331d6f5e6b6","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/microsoft.insights/components/asotest-component-jlfdny/providers/Microsoft.Authorization/roleAssignments/808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f","type":"Microsoft.Authorization/roleAssignments","name":"808c8e81-8a6a-4f58-ac6a-ef04e1f6b66f"}' headers: Cache-Control: - no-cache Content-Length: - - "0" + - "1053" + Content-Type: + - application/json; charset=utf-8 Expires: - "-1" - Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223052673718&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=OR_Irhx7XI598NK1IjZWeJdz4TTzV5oKflG6Z2l-DTPuv-OIWGRiHsBvp0tSPJt_6Rw69ZEDE3nRJbr3t9pS5GpKFv2AnFRPt6rHGpgyELR4KCz0eTK9LEAMdPMcTnNVdqxwonnQ56nsBogYXl-WxtjxSlM7ocC5q-xwue-r_y2rb5nNi9uV3RZX1vzgG94-IGEZchJpjvub92MMApU0wwSXrnx98cnN6g5bvcXtBsL9BN0YF1TyDzTSYXLBGuOmKlx-Vnz-kNZPje7-fPM7AZXCMpXcT1GdPuUIoIgTHq-TQtyHaPygPLIuccHuILrNG-xUkzHy_dF9nzbcndc4xQ&h=B9sxlBTncP_VjxIEt3de7oCGGF9hBMZsOMugIY0LPug Pragma: - no-cache - Retry-After: - - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Cache: @@ -1104,10 +1110,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: - "2999" X-Msedge-Ref: - - 'Ref A: 9CDED66D524D48F080D472C0AFFDF187 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:24Z' - status: 202 Accepted - code: 202 - duration: 950.950017ms + - 'Ref A: D3E88ADEF08E4F51878F88D47C1739FA Ref B: FRA231050414009 Ref C: 2025-02-04T19:48:23Z' + status: 200 OK + code: 200 + duration: 2.960466161s - id: 19 request: proto: HTTP/1.1 @@ -1124,7 +1130,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223052673718&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=OR_Irhx7XI598NK1IjZWeJdz4TTzV5oKflG6Z2l-DTPuv-OIWGRiHsBvp0tSPJt_6Rw69ZEDE3nRJbr3t9pS5GpKFv2AnFRPt6rHGpgyELR4KCz0eTK9LEAMdPMcTnNVdqxwonnQ56nsBogYXl-WxtjxSlM7ocC5q-xwue-r_y2rb5nNi9uV3RZX1vzgG94-IGEZchJpjvub92MMApU0wwSXrnx98cnN6g5bvcXtBsL9BN0YF1TyDzTSYXLBGuOmKlx-Vnz-kNZPje7-fPM7AZXCMpXcT1GdPuUIoIgTHq-TQtyHaPygPLIuccHuILrNG-xUkzHy_dF9nzbcndc4xQ&h=B9sxlBTncP_VjxIEt3de7oCGGF9hBMZsOMugIY0LPug + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638742953041570537&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=SmkzacCdWxK_TyZFyMOIrtzwzhyIjsuClhuEVQHk2RZcU6-2v3SggIR9LthsYtQKh4LN4zVptcARk-pxM8XKLX2JRgVleOrNRKm7-_E9SYpbCidBrGKGiVzOVaoSGrapce71nF5hMEPSiJz69t1fHqSlfRe7wOfv-rhOWHKXMEGLGt-BcpFu5Eehm3h60V-BXofG_Q8F6Soj4a7DU3dtTa6ba-lZiplO5App8WC_sxk2-8jyRhZYkSzChE-fIXeE58Oym-Rckj664aWjZ8D-xMZ1s0R4HT3RGNtw41lFF0FYDPcEIK_Qd8fSTQ5NDpwgL3otx29LZDLmerG8XC4RMg&h=LvmaXZBV-s2dv6Cs5q78LVD5oFXvgjvgHIHSOlH8RjA method: GET response: proto: HTTP/2.0 @@ -1143,7 +1149,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223216514759&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=3ywMeJT8csalYz33BkWPsM1v--4MCUrQJv6CJwQRVq-YAvKBImEbzqyiN2pWzyh5IWGo5os4U9_B8brQOVy5uaTEb-bJSMbp58eGqZGdXdyWxHwYqwu84Dd2wdSq5RBh0CMEi_HAH7dQgOKrc5Dj_PjJVhicg1NYZrs7P4rGvMj36y42XEAKqZNwrGKlE0R94DrnDP1q71qbqrCghzqMmehGyrgKLI8m9GcELhJTMBv5gi078weDS0hFvbwQrEDEz5i3eST3J8YN0-C2Q9iOgDt87Vbp8gda2B9xbNMHpeVLJpJx_vE9GZ_SRImUN28iKtCjI5S_x5_2hXxQ21CoPw&h=4vd0_GK99PlMY-aUpbBYHXEiqhuRbTVzvrIZcJrqngk + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638742953210521688&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=jOvnq3wxQdk8gpkmpvGnexwsmTiOlwz7RiBA65yK_PuAIVxhOx16lv-uoATvyjJpVzSFHRB3orw2SPeB1v3mqpoKCmnvFbgvnamMgQ8uXTawVj66JpT_IXx6GQfb0xGAvpiHQ-aAi9TLcxUelxkhP1UfbblpCUzBS_sG-Uc4Yl8z63UhHS-Jm5aJJBP-EO5CGerDlY52umBi4XedcJ_fPS2PPKVGByzwuRV2nmv2mYjqLP5U-FBPLt9b8q7-lm8uo4oCiE-ekObCely1RqSWs2L0rrAl91zlfaJiHch5GSM9EZVE5xrexD9xVcO0oxDIX9BGIWQhJanJ9mFyFCtpAg&h=eWrsM5VKdwxnS4STwP1u-CnrQRpR0OdzvEREEMRFe6g Pragma: - no-cache Retry-After: @@ -1157,10 +1163,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: 80BC0B07703D43A68B2D24AD2A1B00FF Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:41Z' + - 'Ref A: E946E9F0F28F491DB630DEB3E19D425C Ref B: FRA231050414009 Ref C: 2025-02-04T19:48:40Z' status: 202 Accepted code: 202 - duration: 384.527831ms + duration: 510.606752ms - id: 20 request: proto: HTTP/1.1 @@ -1177,7 +1183,7 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223052673718&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=OR_Irhx7XI598NK1IjZWeJdz4TTzV5oKflG6Z2l-DTPuv-OIWGRiHsBvp0tSPJt_6Rw69ZEDE3nRJbr3t9pS5GpKFv2AnFRPt6rHGpgyELR4KCz0eTK9LEAMdPMcTnNVdqxwonnQ56nsBogYXl-WxtjxSlM7ocC5q-xwue-r_y2rb5nNi9uV3RZX1vzgG94-IGEZchJpjvub92MMApU0wwSXrnx98cnN6g5bvcXtBsL9BN0YF1TyDzTSYXLBGuOmKlx-Vnz-kNZPje7-fPM7AZXCMpXcT1GdPuUIoIgTHq-TQtyHaPygPLIuccHuILrNG-xUkzHy_dF9nzbcndc4xQ&h=B9sxlBTncP_VjxIEt3de7oCGGF9hBMZsOMugIY0LPug + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638742953041570537&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=SmkzacCdWxK_TyZFyMOIrtzwzhyIjsuClhuEVQHk2RZcU6-2v3SggIR9LthsYtQKh4LN4zVptcARk-pxM8XKLX2JRgVleOrNRKm7-_E9SYpbCidBrGKGiVzOVaoSGrapce71nF5hMEPSiJz69t1fHqSlfRe7wOfv-rhOWHKXMEGLGt-BcpFu5Eehm3h60V-BXofG_Q8F6Soj4a7DU3dtTa6ba-lZiplO5App8WC_sxk2-8jyRhZYkSzChE-fIXeE58Oym-Rckj664aWjZ8D-xMZ1s0R4HT3RGNtw41lFF0FYDPcEIK_Qd8fSTQ5NDpwgL3otx29LZDLmerG8XC4RMg&h=LvmaXZBV-s2dv6Cs5q78LVD5oFXvgjvgHIHSOlH8RjA method: GET response: proto: HTTP/2.0 @@ -1196,7 +1202,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223374506903&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=ah0wRC2s2YroC4snNQWyFmmyaYEVaOOjcTZPWdacDkcUJXGsTlYvQ3oa8mTypMjvAyHT778-CksZiT7aDWrKsNyWoEB68Uc9XTXgq5fZfwnh56in5USqIg3QGNCFMKWUiL_vVFTS8io5Wr5rKqaj9_7atoQDqASOHFeLiHjiv50L3pkfyC-JZIXhMxIgfsXMAC1j0bs1nlajKQylGEH5xMhKRebrEtieVbm5PvrkhrIj5cUHaHxO3k536t32f2anQrQKL6jGi8xumvTUtBh3op8VhH375-7LTUkJaPQTSteF1RShLLDHwiGMmHOz19x_0a7T94x7GbZnVn0RimPGsg&h=XpSxpeSbGSv0ZyuB4p-h5GOlvcx8xPBowcRN3_678bk + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638742953370440876&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=H3GVGl6vhe5sWUKeQYLdDrM7ZLLZ7Yg7YX-KSljtp61TIPYmEq4YbzVhb-jSNzAYRob7LDr1oNXlHWa9Gj10jyAYl82Ab1PE0oRGXrxuKZy7s1P2BUyqe0a3TN4FfKB-WFNcQJGsgYH8kz7g6ujrR-hOXBMEsuLHcXqM8BEOw6UzYBThQ6nTM1BQJuTh_1u3Eqel4EpH7blhG1E3RtGoWSo2Omi53eU8cywL09ypAGdfIQHyicvJWyPFcknwi-AREEvYctkLPoJlBYgjTZCFmKzDSJNllw4Xp1rCVfuU_g7pZqWE5dQxJ5JflnYIg4HAQyzzRi2ZtcUZ1lVWnVDsiQ&h=v8EZUjOIrRwADmzxWpR94yJiTmQQuXX0Ka0LyZGiHdA Pragma: - no-cache Retry-After: @@ -1210,10 +1216,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: 50500C65BBEF45C1942E7191486CC919 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:18:57Z' + - 'Ref A: 208BC87266164E5DB13062CB481D5CC3 Ref B: FRA231050414009 Ref C: 2025-02-04T19:48:56Z' status: 202 Accepted code: 202 - duration: 417.766157ms + duration: 390.793225ms - id: 21 request: proto: HTTP/1.1 @@ -1230,7 +1236,7 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223052673718&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=OR_Irhx7XI598NK1IjZWeJdz4TTzV5oKflG6Z2l-DTPuv-OIWGRiHsBvp0tSPJt_6Rw69ZEDE3nRJbr3t9pS5GpKFv2AnFRPt6rHGpgyELR4KCz0eTK9LEAMdPMcTnNVdqxwonnQ56nsBogYXl-WxtjxSlM7ocC5q-xwue-r_y2rb5nNi9uV3RZX1vzgG94-IGEZchJpjvub92MMApU0wwSXrnx98cnN6g5bvcXtBsL9BN0YF1TyDzTSYXLBGuOmKlx-Vnz-kNZPje7-fPM7AZXCMpXcT1GdPuUIoIgTHq-TQtyHaPygPLIuccHuILrNG-xUkzHy_dF9nzbcndc4xQ&h=B9sxlBTncP_VjxIEt3de7oCGGF9hBMZsOMugIY0LPug + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638742953041570537&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=SmkzacCdWxK_TyZFyMOIrtzwzhyIjsuClhuEVQHk2RZcU6-2v3SggIR9LthsYtQKh4LN4zVptcARk-pxM8XKLX2JRgVleOrNRKm7-_E9SYpbCidBrGKGiVzOVaoSGrapce71nF5hMEPSiJz69t1fHqSlfRe7wOfv-rhOWHKXMEGLGt-BcpFu5Eehm3h60V-BXofG_Q8F6Soj4a7DU3dtTa6ba-lZiplO5App8WC_sxk2-8jyRhZYkSzChE-fIXeE58Oym-Rckj664aWjZ8D-xMZ1s0R4HT3RGNtw41lFF0FYDPcEIK_Qd8fSTQ5NDpwgL3otx29LZDLmerG8XC4RMg&h=LvmaXZBV-s2dv6Cs5q78LVD5oFXvgjvgHIHSOlH8RjA method: GET response: proto: HTTP/2.0 @@ -1249,7 +1255,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223531014293&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=cKXxEeypnaBOMxX9ki_X1Xf2WLE_kmGMKc43jyjNaNfivEeubVdV69L0GpgCJHH7_kS_vC7_HGw28chqQm0Tp2Q1eRF1FS8U-Ris_dCH8S00WggBSfK3NDPA7-Gi6nppgpD3NoCsHG9XT5AdwLqQpw-dyc-PnMQzsfAi99212Y7Fgcf_11eNDdV8aJsMcSfzHeBY4N4mf0RpA-j3urJtupgYcuZPHE-57eyqDHHGYKYLmV-2H-ATrWfSA7cSgm_WauVxixbk6tY1WPiTP1OhzS8ubM_3_cs9C47R-AeMNvZ_tetncUUyaD5k4TMeIfgqS-pczwmaQUBZWlt7mwL6YA&h=7Ot1LS90L2Tc5LhGBOQFL8MBk2dIbSSrTKwRSYAEyE0 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638742953528699018&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=ZR7PvAg9H7H9vqoBuqLT5YUBtvreQQD4DGlh94Sk2E0b0IWoI2y_4bMO4ErLxVYpNzpS2QrZbIptmJ4gcEkXjFk37IoEnWrKBMBhymWcWoLlhyq7ASVvoqDyiqb6g2wIxyf0dEaJemj2zvNQ_UlLD3gKpX_gmiazIQ_iDBkjiTaI_R7uWBkfzxz-8WZSDr2gUalyEYrcgkChSN2GZUzkuWaGtaUyG41pGuMK5Pzou7ddYHEt7_th5jXmxlGRs5r73O6TNA2P7stLk0rTv8hHQ4U17WDwiNPEF_IOstdHwX9jHWY2fg_9RZCTXuzP5yb-4QAC20NT-l5G-dJxeClDCw&h=7kx7KXUroAVEGp0R4PHiW1UdrMu_NFszHUcRDlfglns Pragma: - no-cache Retry-After: @@ -1263,10 +1269,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: 3F3059EEB2414D6F9AB5E4C96EF8EC45 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:19:12Z' + - 'Ref A: 59B2CDEE16684D1397EAB9F7C6E5CCFD Ref B: FRA231050414009 Ref C: 2025-02-04T19:49:12Z' status: 202 Accepted code: 202 - duration: 227.322024ms + duration: 421.392259ms - id: 22 request: proto: HTTP/1.1 @@ -1283,7 +1289,7 @@ interactions: headers: Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638716223052673718&c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q&s=OR_Irhx7XI598NK1IjZWeJdz4TTzV5oKflG6Z2l-DTPuv-OIWGRiHsBvp0tSPJt_6Rw69ZEDE3nRJbr3t9pS5GpKFv2AnFRPt6rHGpgyELR4KCz0eTK9LEAMdPMcTnNVdqxwonnQ56nsBogYXl-WxtjxSlM7ocC5q-xwue-r_y2rb5nNi9uV3RZX1vzgG94-IGEZchJpjvub92MMApU0wwSXrnx98cnN6g5bvcXtBsL9BN0YF1TyDzTSYXLBGuOmKlx-Vnz-kNZPje7-fPM7AZXCMpXcT1GdPuUIoIgTHq-TQtyHaPygPLIuccHuILrNG-xUkzHy_dF9nzbcndc4xQ&h=B9sxlBTncP_VjxIEt3de7oCGGF9hBMZsOMugIY0LPug + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRWUkdYSlAtRUFTVFVTIiwiam9iTG9jYXRpb24iOiJlYXN0dXMifQ?api-version=2020-06-01&t=638742953041570537&c=MIIHhzCCBm-gAwIBAgITfAaTz0RjNSArOgD1QwAABpPPRDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwMTIyMDAzOTUzWhcNMjUwNzIxMDAzOTUzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKM6_CNyv_MLM3qZH23yqS02Ab8t1CHc6I_7-7PkWgnhUZ29LsIP9a89UMSE2YWrWETaF2Fi8lOjL_NShtzGeGt1KJrVf6zUklYnJmLhwa2Om2J1rYqhDvYntdv6Ab7ynqnr7x1FpVKLzBXkPagjtdMCouYaNhUerO2MtWAlXGPCRCm5n_NawPFsuWbDV26876jnouIejRyjq4PbKLnSuAhadA4YBNDCZypG2gAoBIq99BhxEWIMOqNqnzfSsHtLdEgGBZOb5KrxCw5SwPFxb0vfq_rQYDdHiGSAnh4bbiYsyzoGrKUM2S9UTclnKvJu-HAHU-83Vok01MCM_5DazOkCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBQy7-WaKuANcgzKkBejOxbLmE9XcTAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAC79qsV2tleujtuQv_T2MVL6uu9irv5BnuGe5aJvZLcI_OSUsK1p4cnbN_Z33stdXjeipg2nLPod0Z5kdM6hNtCZFgtRZBW9w7VYHm3m-iUrGIJJt2ZWXkQB-XhtdIL_AMyHS5hZ1Q1nFDV-rxeXaV1wmcbM7wZ2zh8YGSVEKE_m3NRw8HjVj50XnDNkYj_pL9bYWiHN8wol0N01l5roLsr6Cq-9_ziF_Z_UoJUI12HdLAiTlbWQJ-0NFktHZozmGpfwYLJtt-7-2rD4_PRSF7onMpf-gvfjd5JCukisGeUHP6P5gWF0P-4zsu4eDEHLS_D1-Ek0comvySKTRQplfug&s=SmkzacCdWxK_TyZFyMOIrtzwzhyIjsuClhuEVQHk2RZcU6-2v3SggIR9LthsYtQKh4LN4zVptcARk-pxM8XKLX2JRgVleOrNRKm7-_E9SYpbCidBrGKGiVzOVaoSGrapce71nF5hMEPSiJz69t1fHqSlfRe7wOfv-rhOWHKXMEGLGt-BcpFu5Eehm3h60V-BXofG_Q8F6Soj4a7DU3dtTa6ba-lZiplO5App8WC_sxk2-8jyRhZYkSzChE-fIXeE58Oym-Rckj664aWjZ8D-xMZ1s0R4HT3RGNtw41lFF0FYDPcEIK_Qd8fSTQ5NDpwgL3otx29LZDLmerG8XC4RMg&h=LvmaXZBV-s2dv6Cs5q78LVD5oFXvgjvgHIHSOlH8RjA method: GET response: proto: HTTP/2.0 @@ -1312,10 +1318,10 @@ interactions: X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - "3749" X-Msedge-Ref: - - 'Ref A: F12014CC30384082B27346EB677B2605 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:19:28Z' + - 'Ref A: E4DAB787DE334684B0B1D6917849E56D Ref B: FRA231050414009 Ref C: 2025-02-04T19:49:28Z' status: 200 OK code: 200 - duration: 256.1841ms + duration: 432.546193ms - id: 23 request: proto: HTTP/1.1 @@ -1334,7 +1340,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny?api-version=2020-02-02 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl?api-version=2023-01-31 method: DELETE response: proto: HTTP/2.0 @@ -1365,10 +1371,10 @@ interactions: X-Ms-Failure-Cause: - gateway X-Msedge-Ref: - - 'Ref A: 0E63AC4DD15C4A43898E6F92104015B4 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:19:29Z' + - 'Ref A: 05EB0E4D841C45E78F6B7B6A3A1340A3 Ref B: FRA231050414009 Ref C: 2025-02-04T19:49:33Z' status: 404 Not Found code: 404 - duration: 182.938219ms + duration: 188.244032ms - id: 24 request: proto: HTTP/1.1 @@ -1387,7 +1393,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-jkuszl?api-version=2023-01-31 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vrgxjp/providers/Microsoft.Insights/components/asotest-component-jlfdny?api-version=2020-02-02 method: DELETE response: proto: HTTP/2.0 @@ -1418,7 +1424,7 @@ interactions: X-Ms-Failure-Cause: - gateway X-Msedge-Ref: - - 'Ref A: C771CA182FE5485BB6DCFA65BA4DAC89 Ref B: CO6AA3150220019 Ref C: 2025-01-04T21:19:29Z' + - 'Ref A: A5F5B4F7F2E94507BA56F878A4B4E9CB Ref B: FRA231050414009 Ref C: 2025-02-04T19:49:33Z' status: 404 Not Found code: 404 - duration: 232.354003ms + duration: 228.374493ms diff --git a/v2/samples/insights/v1api20220615/v1api20220615_scheduledqueryrule.yaml b/v2/samples/insights/v1api/v1api20220615_scheduledqueryrule.yaml similarity index 100% rename from v2/samples/insights/v1api20220615/v1api20220615_scheduledqueryrule.yaml rename to v2/samples/insights/v1api/v1api20220615_scheduledqueryrule.yaml From 7e5ed650826f447186ca7f6c540b4aa25f0bb0d6 Mon Sep 17 00:00:00 2001 From: Petre Popescu Date: Wed, 5 Feb 2025 09:47:58 +0000 Subject: [PATCH 11/12] Remove unused assignment --- .../crd_insights_scheduledqueryrule_20240101preview_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/v2/internal/controllers/crd_insights_scheduledqueryrule_20240101preview_test.go b/v2/internal/controllers/crd_insights_scheduledqueryrule_20240101preview_test.go index 8b7f759489f..b6463aefb96 100644 --- a/v2/internal/controllers/crd_insights_scheduledqueryrule_20240101preview_test.go +++ b/v2/internal/controllers/crd_insights_scheduledqueryrule_20240101preview_test.go @@ -71,7 +71,6 @@ func Test_Insights_ScheduledQueryRule_20240101preview_CRUD(t *testing.T) { tc.CreateResourceAndWait(roleAssignment) tc.Expect(roleAssignment.Status.Id).ToNot(BeNil()) - armId := *roleAssignment.Status.Id rule := &insights.ScheduledQueryRule{ ObjectMeta: tc.MakeObjectMeta("rule"), @@ -113,7 +112,7 @@ func Test_Insights_ScheduledQueryRule_20240101preview_CRUD(t *testing.T) { tc.CreateResourceAndWait(rule) tc.Expect(rule.Status.Id).ToNot(BeNil()) - armId = *rule.Status.Id + armId := *rule.Status.Id old := rule.DeepCopy() key := "foo" From 62123ec858b023e1f4d86148a2bfba8e273b090c Mon Sep 17 00:00:00 2001 From: Petre Popescu Date: Wed, 5 Feb 2025 19:57:14 +0000 Subject: [PATCH 12/12] re-run task --- docs/hugo/content/reference/_index.md | 2 +- docs/hugo/content/reference/insights/_index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/hugo/content/reference/_index.md b/docs/hugo/content/reference/_index.md index 074135c4c44..f4377724041 100644 --- a/docs/hugo/content/reference/_index.md +++ b/docs/hugo/content/reference/_index.md @@ -435,7 +435,7 @@ These resource(s) are available for use in the current release of ASO. Different | [Component](https://azure.github.io/azure-service-operator/reference/insights/v1api20200202/#insights.azure.com/v1api20200202.Component) | 2020-02-02 | v1api20200202 | v2.0.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20200202_component.yaml) | | [DiagnosticSetting](https://azure.github.io/azure-service-operator/reference/insights/v1api20210501preview/#insights.azure.com/v1api20210501preview.DiagnosticSetting) | 2021-05-01-preview | v1api20210501preview | v2.11.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api20210501preview/v1api20210501preview_diagnosticsetting.yaml) | | [MetricAlert](https://azure.github.io/azure-service-operator/reference/insights/v1api20180301/#insights.azure.com/v1api20180301.MetricAlert) | 2018-03-01 | v1api20180301 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20180301_metricalert.yaml) | -| [ScheduledQueryRule](https://azure.github.io/azure-service-operator/reference/insights/v1api20220615/#insights.azure.com/v1api20220615.ScheduledQueryRule) | 2022-06-15 | v1api20220615 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api20220615/v1api20220615_scheduledqueryrule.yaml) | +| [ScheduledQueryRule](https://azure.github.io/azure-service-operator/reference/insights/v1api20220615/#insights.azure.com/v1api20220615.ScheduledQueryRule) | 2022-06-15 | v1api20220615 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20220615_scheduledqueryrule.yaml) | | [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) | | [Webtest](https://azure.github.io/azure-service-operator/reference/insights/v1api20180501preview/#insights.azure.com/v1api20180501preview.Webtest) | 2018-05-01-preview | v1api20180501preview | v2.0.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20180501preview_webtest.yaml) | diff --git a/docs/hugo/content/reference/insights/_index.md b/docs/hugo/content/reference/insights/_index.md index 00bf77f67b7..b1b94698291 100644 --- a/docs/hugo/content/reference/insights/_index.md +++ b/docs/hugo/content/reference/insights/_index.md @@ -24,7 +24,7 @@ These resource(s) are available for use in the current release of ASO. Different | [Component](https://azure.github.io/azure-service-operator/reference/insights/v1api20200202/#insights.azure.com/v1api20200202.Component) | 2020-02-02 | v1api20200202 | v2.0.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20200202_component.yaml) | | [DiagnosticSetting](https://azure.github.io/azure-service-operator/reference/insights/v1api20210501preview/#insights.azure.com/v1api20210501preview.DiagnosticSetting) | 2021-05-01-preview | v1api20210501preview | v2.11.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api20210501preview/v1api20210501preview_diagnosticsetting.yaml) | | [MetricAlert](https://azure.github.io/azure-service-operator/reference/insights/v1api20180301/#insights.azure.com/v1api20180301.MetricAlert) | 2018-03-01 | v1api20180301 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20180301_metricalert.yaml) | -| [ScheduledQueryRule](https://azure.github.io/azure-service-operator/reference/insights/v1api20220615/#insights.azure.com/v1api20220615.ScheduledQueryRule) | 2022-06-15 | v1api20220615 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api20220615/v1api20220615_scheduledqueryrule.yaml) | +| [ScheduledQueryRule](https://azure.github.io/azure-service-operator/reference/insights/v1api20220615/#insights.azure.com/v1api20220615.ScheduledQueryRule) | 2022-06-15 | v1api20220615 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20220615_scheduledqueryrule.yaml) | | [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) | | [Webtest](https://azure.github.io/azure-service-operator/reference/insights/v1api20180501preview/#insights.azure.com/v1api20180501preview.Webtest) | 2018-05-01-preview | v1api20180501preview | v2.0.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/insights/v1api/v1api20180501preview_webtest.yaml) |