diff --git a/metric_ruleset/model_exception_rule.go b/metric_ruleset/model_exception_rule.go deleted file mode 100644 index efb97c6..0000000 --- a/metric_ruleset/model_exception_rule.go +++ /dev/null @@ -1,247 +0,0 @@ -/* -Metric Ruleset API - - Metric ruleset API - -API version: 3.3.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package metric_ruleset - -import ( - "encoding/json" -) - -// ExceptionRule Fields for exception rules. -type ExceptionRule struct { - // Name of the exception rule. - Name string `json:"name"` - // Whether to reroute the metric with the specified dimension. If false, the rule remains defined but will not reroute metrics. - Enabled bool `json:"enabled"` - // Finds the metric to reroute. - Matcher DimensionMatcher `json:"matcher"` - // Contains fields for the restoration job. The restoration job reroutes metrics from the archival route to the real-time route. - Restoration []ExceptionRuleRestorationFields `json:"restoration,omitempty"` - // Information about an exception rule. - Description *string `json:"description,omitempty"` -} - -type _ExceptionRule ExceptionRule - -// NewExceptionRule instantiates a new ExceptionRule object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewExceptionRule(name string, enabled bool, matcher DimensionMatcher) *ExceptionRule { - this := ExceptionRule{} - this.Name = name - this.Enabled = enabled - this.Matcher = matcher - return &this -} - -// NewExceptionRuleWithDefaults instantiates a new ExceptionRule object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewExceptionRuleWithDefaults() *ExceptionRule { - this := ExceptionRule{} - return &this -} - -// GetName returns the Name field value -func (o *ExceptionRule) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ExceptionRule) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ExceptionRule) SetName(v string) { - o.Name = v -} - -// GetEnabled returns the Enabled field value -func (o *ExceptionRule) GetEnabled() bool { - if o == nil { - var ret bool - return ret - } - - return o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value -// and a boolean to check if the value has been set. -func (o *ExceptionRule) GetEnabledOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Enabled, true -} - -// SetEnabled sets field value -func (o *ExceptionRule) SetEnabled(v bool) { - o.Enabled = v -} - -// GetMatcher returns the Matcher field value -func (o *ExceptionRule) GetMatcher() DimensionMatcher { - if o == nil { - var ret DimensionMatcher - return ret - } - - return o.Matcher -} - -// GetMatcherOk returns a tuple with the Matcher field value -// and a boolean to check if the value has been set. -func (o *ExceptionRule) GetMatcherOk() (*DimensionMatcher, bool) { - if o == nil { - return nil, false - } - return &o.Matcher, true -} - -// SetMatcher sets field value -func (o *ExceptionRule) SetMatcher(v DimensionMatcher) { - o.Matcher = v -} - -// GetRestoration returns the Restoration field value if set, zero value otherwise. -func (o *ExceptionRule) GetRestoration() []ExceptionRuleRestorationFields { - if o == nil || isNil(o.Restoration) { - var ret []ExceptionRuleRestorationFields - return ret - } - return o.Restoration -} - -// GetRestorationOk returns a tuple with the Restoration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ExceptionRule) GetRestorationOk() ([]ExceptionRuleRestorationFields, bool) { - if o == nil || isNil(o.Restoration) { - return nil, false - } - return o.Restoration, true -} - -// HasRestoration returns a boolean if a field has been set. -func (o *ExceptionRule) HasRestoration() bool { - if o != nil && !isNil(o.Restoration) { - return true - } - - return false -} - -// SetRestoration gets a reference to the given []ExceptionRuleRestorationFields and assigns it to the Restoration field. -func (o *ExceptionRule) SetRestoration(v []ExceptionRuleRestorationFields) { - o.Restoration = v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *ExceptionRule) GetDescription() string { - if o == nil || isNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ExceptionRule) GetDescriptionOk() (*string, bool) { - if o == nil || isNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *ExceptionRule) HasDescription() bool { - if o != nil && !isNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *ExceptionRule) SetDescription(v string) { - o.Description = &v -} - -func (o ExceptionRule) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ExceptionRule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["enabled"] = o.Enabled - toSerialize["matcher"] = o.Matcher - if !isNil(o.Restoration) { - toSerialize["restoration"] = o.Restoration - } - if !isNil(o.Description) { - toSerialize["description"] = o.Description - } - return toSerialize, nil -} - -type NullableExceptionRule struct { - value *ExceptionRule - isSet bool -} - -func (v NullableExceptionRule) Get() *ExceptionRule { - return v.value -} - -func (v *NullableExceptionRule) Set(val *ExceptionRule) { - v.value = val - v.isSet = true -} - -func (v NullableExceptionRule) IsSet() bool { - return v.isSet -} - -func (v *NullableExceptionRule) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableExceptionRule(val *ExceptionRule) *NullableExceptionRule { - return &NullableExceptionRule{value: val, isSet: true} -} - -func (v NullableExceptionRule) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableExceptionRule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/metric_ruleset/model_exception_rule_restoration_fields.go b/metric_ruleset/model_exception_rule_restoration_fields.go deleted file mode 100644 index 7f5eff5..0000000 --- a/metric_ruleset/model_exception_rule_restoration_fields.go +++ /dev/null @@ -1,161 +0,0 @@ -/* -Metric Ruleset API - - Metric ruleset API - -API version: 3.3.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package metric_ruleset - -import ( - "encoding/json" -) - -// ExceptionRuleRestorationFields Fields of the exceptionRules restoration element. -type ExceptionRuleRestorationFields struct { - // ID of the restoration job. - RestorationId *string `json:"restorationId,omitempty"` - // Time at which the API begins the restoration job. - StartTime *int32 `json:"startTime,omitempty"` -} - -// NewExceptionRuleRestorationFields instantiates a new ExceptionRuleRestorationFields object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewExceptionRuleRestorationFields() *ExceptionRuleRestorationFields { - this := ExceptionRuleRestorationFields{} - return &this -} - -// NewExceptionRuleRestorationFieldsWithDefaults instantiates a new ExceptionRuleRestorationFields object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewExceptionRuleRestorationFieldsWithDefaults() *ExceptionRuleRestorationFields { - this := ExceptionRuleRestorationFields{} - return &this -} - -// GetRestorationId returns the RestorationId field value if set, zero value otherwise. -func (o *ExceptionRuleRestorationFields) GetRestorationId() string { - if o == nil || isNil(o.RestorationId) { - var ret string - return ret - } - return *o.RestorationId -} - -// GetRestorationIdOk returns a tuple with the RestorationId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ExceptionRuleRestorationFields) GetRestorationIdOk() (*string, bool) { - if o == nil || isNil(o.RestorationId) { - return nil, false - } - return o.RestorationId, true -} - -// HasRestorationId returns a boolean if a field has been set. -func (o *ExceptionRuleRestorationFields) HasRestorationId() bool { - if o != nil && !isNil(o.RestorationId) { - return true - } - - return false -} - -// SetRestorationId gets a reference to the given string and assigns it to the RestorationId field. -func (o *ExceptionRuleRestorationFields) SetRestorationId(v string) { - o.RestorationId = &v -} - -// GetStartTime returns the StartTime field value if set, zero value otherwise. -func (o *ExceptionRuleRestorationFields) GetStartTime() int32 { - if o == nil || isNil(o.StartTime) { - var ret int32 - return ret - } - return *o.StartTime -} - -// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ExceptionRuleRestorationFields) GetStartTimeOk() (*int32, bool) { - if o == nil || isNil(o.StartTime) { - return nil, false - } - return o.StartTime, true -} - -// HasStartTime returns a boolean if a field has been set. -func (o *ExceptionRuleRestorationFields) HasStartTime() bool { - if o != nil && !isNil(o.StartTime) { - return true - } - - return false -} - -// SetStartTime gets a reference to the given int32 and assigns it to the StartTime field. -func (o *ExceptionRuleRestorationFields) SetStartTime(v int32) { - o.StartTime = &v -} - -func (o ExceptionRuleRestorationFields) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ExceptionRuleRestorationFields) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.RestorationId) { - toSerialize["restorationId"] = o.RestorationId - } - if !isNil(o.StartTime) { - toSerialize["startTime"] = o.StartTime - } - return toSerialize, nil -} - -type NullableExceptionRuleRestorationFields struct { - value *ExceptionRuleRestorationFields - isSet bool -} - -func (v NullableExceptionRuleRestorationFields) Get() *ExceptionRuleRestorationFields { - return v.value -} - -func (v *NullableExceptionRuleRestorationFields) Set(val *ExceptionRuleRestorationFields) { - v.value = val - v.isSet = true -} - -func (v NullableExceptionRuleRestorationFields) IsSet() bool { - return v.isSet -} - -func (v *NullableExceptionRuleRestorationFields) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableExceptionRuleRestorationFields(val *ExceptionRuleRestorationFields) *NullableExceptionRuleRestorationFields { - return &NullableExceptionRuleRestorationFields{value: val, isSet: true} -} - -func (v NullableExceptionRuleRestorationFields) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableExceptionRuleRestorationFields) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/metric_ruleset/model_restoration_job_response.go b/metric_ruleset/model_restoration_job_response.go deleted file mode 100644 index 1607852..0000000 --- a/metric_ruleset/model_restoration_job_response.go +++ /dev/null @@ -1,383 +0,0 @@ -/* -Metric Ruleset API - - Metric ruleset API - -API version: 3.3.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package metric_ruleset - -import ( - "encoding/json" -) - -// RestorationJobResponse Response body returned when `GET /v2/metricruleset/restoration/{id}` successfully retrieves a restoration job. -type RestorationJobResponse struct { - // Ruleset creation timestamp - Created *int64 `json:"created,omitempty"` - // User ID of the user who created this metric ruleset - Creator *string `json:"creator,omitempty"` - // Name of the user who created this metric ruleset - CreatorName *string `json:"creatorName,omitempty"` - // Ruleset ID - Id *string `json:"id,omitempty"` - // Time at which this ruleset was last updated - LastUpdated *int64 `json:"lastUpdated,omitempty"` - // ID of the user who last updated the ruleset - LastUpdatedBy *string `json:"lastUpdatedBy,omitempty"` - // Name of the user who last updated the ruleset - LastUpdatedByName *string `json:"lastUpdatedByName,omitempty"` - // Status of the restoration job. - Status *string `json:"status,omitempty"` -} - -// NewRestorationJobResponse instantiates a new RestorationJobResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRestorationJobResponse() *RestorationJobResponse { - this := RestorationJobResponse{} - return &this -} - -// NewRestorationJobResponseWithDefaults instantiates a new RestorationJobResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRestorationJobResponseWithDefaults() *RestorationJobResponse { - this := RestorationJobResponse{} - return &this -} - -// GetCreated returns the Created field value if set, zero value otherwise. -func (o *RestorationJobResponse) GetCreated() int64 { - if o == nil || isNil(o.Created) { - var ret int64 - return ret - } - return *o.Created -} - -// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestorationJobResponse) GetCreatedOk() (*int64, bool) { - if o == nil || isNil(o.Created) { - return nil, false - } - return o.Created, true -} - -// HasCreated returns a boolean if a field has been set. -func (o *RestorationJobResponse) HasCreated() bool { - if o != nil && !isNil(o.Created) { - return true - } - - return false -} - -// SetCreated gets a reference to the given int64 and assigns it to the Created field. -func (o *RestorationJobResponse) SetCreated(v int64) { - o.Created = &v -} - -// GetCreator returns the Creator field value if set, zero value otherwise. -func (o *RestorationJobResponse) GetCreator() string { - if o == nil || isNil(o.Creator) { - var ret string - return ret - } - return *o.Creator -} - -// GetCreatorOk returns a tuple with the Creator field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestorationJobResponse) GetCreatorOk() (*string, bool) { - if o == nil || isNil(o.Creator) { - return nil, false - } - return o.Creator, true -} - -// HasCreator returns a boolean if a field has been set. -func (o *RestorationJobResponse) HasCreator() bool { - if o != nil && !isNil(o.Creator) { - return true - } - - return false -} - -// SetCreator gets a reference to the given string and assigns it to the Creator field. -func (o *RestorationJobResponse) SetCreator(v string) { - o.Creator = &v -} - -// GetCreatorName returns the CreatorName field value if set, zero value otherwise. -func (o *RestorationJobResponse) GetCreatorName() string { - if o == nil || isNil(o.CreatorName) { - var ret string - return ret - } - return *o.CreatorName -} - -// GetCreatorNameOk returns a tuple with the CreatorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestorationJobResponse) GetCreatorNameOk() (*string, bool) { - if o == nil || isNil(o.CreatorName) { - return nil, false - } - return o.CreatorName, true -} - -// HasCreatorName returns a boolean if a field has been set. -func (o *RestorationJobResponse) HasCreatorName() bool { - if o != nil && !isNil(o.CreatorName) { - return true - } - - return false -} - -// SetCreatorName gets a reference to the given string and assigns it to the CreatorName field. -func (o *RestorationJobResponse) SetCreatorName(v string) { - o.CreatorName = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *RestorationJobResponse) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestorationJobResponse) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *RestorationJobResponse) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *RestorationJobResponse) SetId(v string) { - o.Id = &v -} - -// GetLastUpdated returns the LastUpdated field value if set, zero value otherwise. -func (o *RestorationJobResponse) GetLastUpdated() int64 { - if o == nil || isNil(o.LastUpdated) { - var ret int64 - return ret - } - return *o.LastUpdated -} - -// GetLastUpdatedOk returns a tuple with the LastUpdated field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestorationJobResponse) GetLastUpdatedOk() (*int64, bool) { - if o == nil || isNil(o.LastUpdated) { - return nil, false - } - return o.LastUpdated, true -} - -// HasLastUpdated returns a boolean if a field has been set. -func (o *RestorationJobResponse) HasLastUpdated() bool { - if o != nil && !isNil(o.LastUpdated) { - return true - } - - return false -} - -// SetLastUpdated gets a reference to the given int64 and assigns it to the LastUpdated field. -func (o *RestorationJobResponse) SetLastUpdated(v int64) { - o.LastUpdated = &v -} - -// GetLastUpdatedBy returns the LastUpdatedBy field value if set, zero value otherwise. -func (o *RestorationJobResponse) GetLastUpdatedBy() string { - if o == nil || isNil(o.LastUpdatedBy) { - var ret string - return ret - } - return *o.LastUpdatedBy -} - -// GetLastUpdatedByOk returns a tuple with the LastUpdatedBy field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestorationJobResponse) GetLastUpdatedByOk() (*string, bool) { - if o == nil || isNil(o.LastUpdatedBy) { - return nil, false - } - return o.LastUpdatedBy, true -} - -// HasLastUpdatedBy returns a boolean if a field has been set. -func (o *RestorationJobResponse) HasLastUpdatedBy() bool { - if o != nil && !isNil(o.LastUpdatedBy) { - return true - } - - return false -} - -// SetLastUpdatedBy gets a reference to the given string and assigns it to the LastUpdatedBy field. -func (o *RestorationJobResponse) SetLastUpdatedBy(v string) { - o.LastUpdatedBy = &v -} - -// GetLastUpdatedByName returns the LastUpdatedByName field value if set, zero value otherwise. -func (o *RestorationJobResponse) GetLastUpdatedByName() string { - if o == nil || isNil(o.LastUpdatedByName) { - var ret string - return ret - } - return *o.LastUpdatedByName -} - -// GetLastUpdatedByNameOk returns a tuple with the LastUpdatedByName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestorationJobResponse) GetLastUpdatedByNameOk() (*string, bool) { - if o == nil || isNil(o.LastUpdatedByName) { - return nil, false - } - return o.LastUpdatedByName, true -} - -// HasLastUpdatedByName returns a boolean if a field has been set. -func (o *RestorationJobResponse) HasLastUpdatedByName() bool { - if o != nil && !isNil(o.LastUpdatedByName) { - return true - } - - return false -} - -// SetLastUpdatedByName gets a reference to the given string and assigns it to the LastUpdatedByName field. -func (o *RestorationJobResponse) SetLastUpdatedByName(v string) { - o.LastUpdatedByName = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *RestorationJobResponse) GetStatus() string { - if o == nil || isNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestorationJobResponse) GetStatusOk() (*string, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *RestorationJobResponse) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *RestorationJobResponse) SetStatus(v string) { - o.Status = &v -} - -func (o RestorationJobResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RestorationJobResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Created) { - toSerialize["created"] = o.Created - } - if !isNil(o.Creator) { - toSerialize["creator"] = o.Creator - } - if !isNil(o.CreatorName) { - toSerialize["creatorName"] = o.CreatorName - } - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.LastUpdated) { - toSerialize["lastUpdated"] = o.LastUpdated - } - if !isNil(o.LastUpdatedBy) { - toSerialize["lastUpdatedBy"] = o.LastUpdatedBy - } - if !isNil(o.LastUpdatedByName) { - toSerialize["lastUpdatedByName"] = o.LastUpdatedByName - } - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - return toSerialize, nil -} - -type NullableRestorationJobResponse struct { - value *RestorationJobResponse - isSet bool -} - -func (v NullableRestorationJobResponse) Get() *RestorationJobResponse { - return v.value -} - -func (v *NullableRestorationJobResponse) Set(val *RestorationJobResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRestorationJobResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRestorationJobResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRestorationJobResponse(val *RestorationJobResponse) *NullableRestorationJobResponse { - return &NullableRestorationJobResponse{value: val, isSet: true} -} - -func (v NullableRestorationJobResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRestorationJobResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/metric_ruleset/model_update_metric_ruleset_request.go b/metric_ruleset/model_update_metric_ruleset_request.go index abd0757..4706f68 100644 --- a/metric_ruleset/model_update_metric_ruleset_request.go +++ b/metric_ruleset/model_update_metric_ruleset_request.go @@ -18,8 +18,6 @@ import ( type UpdateMetricRulesetRequest struct { // Aggregation rules in the ruleset AggregationRules []AggregationRule `json:"aggregationRules,omitempty"` - // List of exception rules. Exception rules reroute a metric time series (MTS) from an archival route to a real-time route if the MTS contains values that match those of a specified filter. - ExceptionRules []ExceptionRule `json:"exceptionRules,omitempty"` // Name of the metric MetricName *string `json:"metricName,omitempty"` RoutingRule *RoutingRule `json:"routingRule,omitempty"` @@ -76,38 +74,6 @@ func (o *UpdateMetricRulesetRequest) SetAggregationRules(v []AggregationRule) { o.AggregationRules = v } -// GetExceptionRules returns the ExceptionRules field value if set, zero value otherwise. -func (o *UpdateMetricRulesetRequest) GetExceptionRules() []ExceptionRule { - if o == nil || isNil(o.ExceptionRules) { - var ret []ExceptionRule - return ret - } - return o.ExceptionRules -} - -// GetExceptionRulesOk returns a tuple with the ExceptionRules field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateMetricRulesetRequest) GetExceptionRulesOk() ([]ExceptionRule, bool) { - if o == nil || isNil(o.ExceptionRules) { - return nil, false - } - return o.ExceptionRules, true -} - -// HasExceptionRules returns a boolean if a field has been set. -func (o *UpdateMetricRulesetRequest) HasExceptionRules() bool { - if o != nil && !isNil(o.ExceptionRules) { - return true - } - - return false -} - -// SetExceptionRules gets a reference to the given []ExceptionRule and assigns it to the ExceptionRules field. -func (o *UpdateMetricRulesetRequest) SetExceptionRules(v []ExceptionRule) { - o.ExceptionRules = v -} - // GetMetricName returns the MetricName field value if set, zero value otherwise. func (o *UpdateMetricRulesetRequest) GetMetricName() string { if o == nil || isNil(o.MetricName) { @@ -209,9 +175,6 @@ func (o UpdateMetricRulesetRequest) MarshalJSON() ([]byte, error) { if !isNil(o.AggregationRules) { toSerialize["aggregationRules"] = o.AggregationRules } - if !isNil(o.ExceptionRules) { - toSerialize["exceptionRules"] = o.ExceptionRules - } if !isNil(o.MetricName) { toSerialize["metricName"] = o.MetricName } diff --git a/testdata/fixtures/metric_ruleset/create_archived_ruleset_success.json b/testdata/fixtures/metric_ruleset/create_archived_ruleset_success.json deleted file mode 100644 index ea32c56..0000000 --- a/testdata/fixtures/metric_ruleset/create_archived_ruleset_success.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "exceptionRules": [ - { - "enabled": true, - "matcher": { - "filters" : [ { - "NOT" : false, - "property" : "container_id", - "propertyValue" : [ "cont_a", "cont_b" ] - } ], - "type": "dimension" - }, - "name": "TestRule" - } - ], - "created": 1674598662022, - "creator": "TestCreatorId", - "creatorName": "TestName", - "id": "TestId", - "lastUpdated": 1674598662022, - "lastUpdatedBy": "TestUpdatedId", - "lastUpdatedByName": "TestName", - "metricName": "container_cpu_utilization", - "routingRule": { - "destination": "Archived" - }, - "version": 1 -} \ No newline at end of file