From 6f230700a2307e37074ae06cfd89119062bdf04d Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 27 Aug 2025 07:15:08 +0000 Subject: [PATCH] Generate observability --- ...odel_update_alert_configs_payload_route.go | 56 +- ...lert_configs_payload_route_routes_inner.go | 571 ++++++++++++++++++ ...configs_payload_route_routes_inner_test.go | 11 + 3 files changed, 586 insertions(+), 52 deletions(-) create mode 100644 services/observability/model_update_alert_configs_payload_route_routes_inner.go create mode 100644 services/observability/model_update_alert_configs_payload_route_routes_inner_test.go diff --git a/services/observability/model_update_alert_configs_payload_route.go b/services/observability/model_update_alert_configs_payload_route.go index ab755009b..fbc86db7a 100644 --- a/services/observability/model_update_alert_configs_payload_route.go +++ b/services/observability/model_update_alert_configs_payload_route.go @@ -139,26 +139,6 @@ func setUpdateAlertConfigsPayloadRouteGetMatchReAttributeType(arg *UpdateAlertCo *arg = &val } -/* - types and functions for matchers -*/ - -// isArray -type UpdateAlertConfigsPayloadRouteGetMatchersAttributeType = *[]string -type UpdateAlertConfigsPayloadRouteGetMatchersArgType = []string -type UpdateAlertConfigsPayloadRouteGetMatchersRetType = []string - -func getUpdateAlertConfigsPayloadRouteGetMatchersAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetMatchersAttributeType) (ret UpdateAlertConfigsPayloadRouteGetMatchersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateAlertConfigsPayloadRouteGetMatchersAttributeType(arg *UpdateAlertConfigsPayloadRouteGetMatchersAttributeType, val UpdateAlertConfigsPayloadRouteGetMatchersRetType) { - *arg = &val -} - /* types and functions for receiver */ @@ -206,9 +186,9 @@ type UpdateAlertConfigsPayloadRouteGetRepeatIntervalRetType = string */ // isArray -type UpdateAlertConfigsPayloadRouteGetRoutesAttributeType = *[]CreateAlertConfigRoutePayloadRoutesInner -type UpdateAlertConfigsPayloadRouteGetRoutesArgType = []CreateAlertConfigRoutePayloadRoutesInner -type UpdateAlertConfigsPayloadRouteGetRoutesRetType = []CreateAlertConfigRoutePayloadRoutesInner +type UpdateAlertConfigsPayloadRouteGetRoutesAttributeType = *[]UpdateAlertConfigsPayloadRouteRoutesInner +type UpdateAlertConfigsPayloadRouteGetRoutesArgType = []UpdateAlertConfigsPayloadRouteRoutesInner +type UpdateAlertConfigsPayloadRouteGetRoutesRetType = []UpdateAlertConfigsPayloadRouteRoutesInner func getUpdateAlertConfigsPayloadRouteGetRoutesAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetRoutesAttributeType) (ret UpdateAlertConfigsPayloadRouteGetRoutesRetType, ok bool) { if arg == nil { @@ -235,8 +215,6 @@ type UpdateAlertConfigsPayloadRoute struct { Match UpdateAlertConfigsPayloadRouteGetMatchAttributeType `json:"match,omitempty"` // Deprecated: map of key:value. A set of regex-matchers an alert has to fulfill to match the node. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters MatchRe UpdateAlertConfigsPayloadRouteGetMatchReAttributeType `json:"matchRe,omitempty"` - // A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens: * A valid Prometheus label name. * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors. * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters - Matchers UpdateAlertConfigsPayloadRouteGetMatchersAttributeType `json:"matchers,omitempty"` // Receiver that should be one item of receivers `Additional Validators:` * must be a in name of receivers // REQUIRED Receiver UpdateAlertConfigsPayloadRouteGetReceiverAttributeType `json:"receiver" required:"true"` @@ -418,29 +396,6 @@ func (o *UpdateAlertConfigsPayloadRoute) SetMatchRe(v UpdateAlertConfigsPayloadR setUpdateAlertConfigsPayloadRouteGetMatchReAttributeType(&o.MatchRe, v) } -// GetMatchers returns the Matchers field value if set, zero value otherwise. -func (o *UpdateAlertConfigsPayloadRoute) GetMatchers() (res UpdateAlertConfigsPayloadRouteGetMatchersRetType) { - res, _ = o.GetMatchersOk() - return -} - -// GetMatchersOk returns a tuple with the Matchers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateAlertConfigsPayloadRoute) GetMatchersOk() (ret UpdateAlertConfigsPayloadRouteGetMatchersRetType, ok bool) { - return getUpdateAlertConfigsPayloadRouteGetMatchersAttributeTypeOk(o.Matchers) -} - -// HasMatchers returns a boolean if a field has been set. -func (o *UpdateAlertConfigsPayloadRoute) HasMatchers() bool { - _, ok := o.GetMatchersOk() - return ok -} - -// SetMatchers gets a reference to the given []string and assigns it to the Matchers field. -func (o *UpdateAlertConfigsPayloadRoute) SetMatchers(v UpdateAlertConfigsPayloadRouteGetMatchersRetType) { - setUpdateAlertConfigsPayloadRouteGetMatchersAttributeType(&o.Matchers, v) -} - // GetReceiver returns the Receiver field value func (o *UpdateAlertConfigsPayloadRoute) GetReceiver() (ret UpdateAlertConfigsPayloadRouteGetReceiverRetType) { ret, _ = o.GetReceiverOk() @@ -499,7 +454,7 @@ func (o *UpdateAlertConfigsPayloadRoute) HasRoutes() bool { return ok } -// SetRoutes gets a reference to the given []CreateAlertConfigRoutePayloadRoutesInner and assigns it to the Routes field. +// SetRoutes gets a reference to the given []UpdateAlertConfigsPayloadRouteRoutesInner and assigns it to the Routes field. func (o *UpdateAlertConfigsPayloadRoute) SetRoutes(v UpdateAlertConfigsPayloadRouteGetRoutesRetType) { setUpdateAlertConfigsPayloadRouteGetRoutesAttributeType(&o.Routes, v) } @@ -524,9 +479,6 @@ func (o UpdateAlertConfigsPayloadRoute) ToMap() (map[string]interface{}, error) if val, ok := getUpdateAlertConfigsPayloadRouteGetMatchReAttributeTypeOk(o.MatchRe); ok { toSerialize["MatchRe"] = val } - if val, ok := getUpdateAlertConfigsPayloadRouteGetMatchersAttributeTypeOk(o.Matchers); ok { - toSerialize["Matchers"] = val - } if val, ok := getUpdateAlertConfigsPayloadRouteGetReceiverAttributeTypeOk(o.Receiver); ok { toSerialize["Receiver"] = val } diff --git a/services/observability/model_update_alert_configs_payload_route_routes_inner.go b/services/observability/model_update_alert_configs_payload_route_routes_inner.go new file mode 100644 index 000000000..4e3dfdc1a --- /dev/null +++ b/services/observability/model_update_alert_configs_payload_route_routes_inner.go @@ -0,0 +1,571 @@ +/* +STACKIT Observability API + +API endpoints for Observability on STACKIT + +API version: 1.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package observability + +import ( + "encoding/json" +) + +// checks if the UpdateAlertConfigsPayloadRouteRoutesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAlertConfigsPayloadRouteRoutesInner{} + +/* + types and functions for continue +*/ + +// isBoolean +type UpdateAlertConfigsPayloadRouteRoutesInnergetContinueAttributeType = *bool +type UpdateAlertConfigsPayloadRouteRoutesInnergetContinueArgType = bool +type UpdateAlertConfigsPayloadRouteRoutesInnergetContinueRetType = bool + +func getUpdateAlertConfigsPayloadRouteRoutesInnergetContinueAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteRoutesInnergetContinueAttributeType) (ret UpdateAlertConfigsPayloadRouteRoutesInnergetContinueRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteRoutesInnergetContinueAttributeType(arg *UpdateAlertConfigsPayloadRouteRoutesInnergetContinueAttributeType, val UpdateAlertConfigsPayloadRouteRoutesInnergetContinueRetType) { + *arg = &val +} + +/* + types and functions for groupBy +*/ + +// isArray +type UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByAttributeType = *[]string +type UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByArgType = []string +type UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByRetType = []string + +func getUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByAttributeType) (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByAttributeType(arg *UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByAttributeType, val UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByRetType) { + *arg = &val +} + +/* + types and functions for groupInterval +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalAttributeType = *string + +func getUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalAttributeType) (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalAttributeType(arg *UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalAttributeType, val UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalArgType = string +type UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalRetType = string + +/* + types and functions for groupWait +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitAttributeType = *string + +func getUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitAttributeType) (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitAttributeType(arg *UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitAttributeType, val UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitArgType = string +type UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitRetType = string + +/* + types and functions for match +*/ + +// isFreeform +type UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchAttributeType = *map[string]interface{} +type UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchArgType = map[string]interface{} +type UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchRetType = map[string]interface{} + +func getUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchAttributeType) (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchAttributeType(arg *UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchAttributeType, val UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchRetType) { + *arg = &val +} + +/* + types and functions for matchRe +*/ + +// isFreeform +type UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReAttributeType = *map[string]interface{} +type UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReArgType = map[string]interface{} +type UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReRetType = map[string]interface{} + +func getUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReAttributeType) (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReAttributeType(arg *UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReAttributeType, val UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReRetType) { + *arg = &val +} + +/* + types and functions for matchers +*/ + +// isArray +type UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersAttributeType = *[]string +type UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersArgType = []string +type UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersRetType = []string + +func getUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersAttributeType) (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersAttributeType(arg *UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersAttributeType, val UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersRetType) { + *arg = &val +} + +/* + types and functions for receiver +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverAttributeType = *string + +func getUpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverAttributeType) (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverAttributeType(arg *UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverAttributeType, val UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverArgType = string +type UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverRetType = string + +/* + types and functions for repeatInterval +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalAttributeType = *string + +func getUpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalAttributeType) (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalAttributeType(arg *UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalAttributeType, val UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalArgType = string +type UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalRetType = string + +/* + types and functions for routes +*/ + +// isArray +type UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesAttributeType = *[]map[string]interface{} +type UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesArgType = []map[string]interface{} +type UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesRetType = []map[string]interface{} + +func getUpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesAttributeType) (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesAttributeType(arg *UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesAttributeType, val UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesRetType) { + *arg = &val +} + +// UpdateAlertConfigsPayloadRouteRoutesInner As in one level above +type UpdateAlertConfigsPayloadRouteRoutesInner struct { + // As in one level above + Continue UpdateAlertConfigsPayloadRouteRoutesInnergetContinueAttributeType `json:"continue,omitempty"` + GroupBy UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByAttributeType `json:"groupBy,omitempty"` + // As in one level above + GroupInterval UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalAttributeType `json:"groupInterval,omitempty"` + // As in one level above + GroupWait UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitAttributeType `json:"groupWait,omitempty"` + // Deprecated: As in one level above + Match UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchAttributeType `json:"match,omitempty"` + // Deprecated: As in one level above + MatchRe UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReAttributeType `json:"matchRe,omitempty"` + // A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens: * A valid Prometheus label name. * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors. * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters + Matchers UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersAttributeType `json:"matchers,omitempty"` + // As in one level above + Receiver UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverAttributeType `json:"receiver,omitempty"` + // As in one level above + RepeatInterval UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalAttributeType `json:"repeatInterval,omitempty"` + // Another child routes + Routes UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesAttributeType `json:"routes,omitempty"` +} + +// NewUpdateAlertConfigsPayloadRouteRoutesInner instantiates a new UpdateAlertConfigsPayloadRouteRoutesInner 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 NewUpdateAlertConfigsPayloadRouteRoutesInner() *UpdateAlertConfigsPayloadRouteRoutesInner { + this := UpdateAlertConfigsPayloadRouteRoutesInner{} + return &this +} + +// NewUpdateAlertConfigsPayloadRouteRoutesInnerWithDefaults instantiates a new UpdateAlertConfigsPayloadRouteRoutesInner 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 NewUpdateAlertConfigsPayloadRouteRoutesInnerWithDefaults() *UpdateAlertConfigsPayloadRouteRoutesInner { + this := UpdateAlertConfigsPayloadRouteRoutesInner{} + var continue_ bool = false + this.Continue = &continue_ + return &this +} + +// GetContinue returns the Continue field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetContinue() (res UpdateAlertConfigsPayloadRouteRoutesInnergetContinueRetType) { + res, _ = o.GetContinueOk() + return +} + +// GetContinueOk returns a tuple with the Continue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetContinueOk() (ret UpdateAlertConfigsPayloadRouteRoutesInnergetContinueRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteRoutesInnergetContinueAttributeTypeOk(o.Continue) +} + +// HasContinue returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) HasContinue() bool { + _, ok := o.GetContinueOk() + return ok +} + +// SetContinue gets a reference to the given bool and assigns it to the Continue field. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) SetContinue(v UpdateAlertConfigsPayloadRouteRoutesInnergetContinueRetType) { + setUpdateAlertConfigsPayloadRouteRoutesInnergetContinueAttributeType(&o.Continue, v) +} + +// GetGroupBy returns the GroupBy field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetGroupBy() (res UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByRetType) { + res, _ = o.GetGroupByOk() + return +} + +// GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetGroupByOk() (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByAttributeTypeOk(o.GroupBy) +} + +// HasGroupBy returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) HasGroupBy() bool { + _, ok := o.GetGroupByOk() + return ok +} + +// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) SetGroupBy(v UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByRetType) { + setUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByAttributeType(&o.GroupBy, v) +} + +// GetGroupInterval returns the GroupInterval field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetGroupInterval() (res UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalRetType) { + res, _ = o.GetGroupIntervalOk() + return +} + +// GetGroupIntervalOk returns a tuple with the GroupInterval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetGroupIntervalOk() (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalAttributeTypeOk(o.GroupInterval) +} + +// HasGroupInterval returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) HasGroupInterval() bool { + _, ok := o.GetGroupIntervalOk() + return ok +} + +// SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) SetGroupInterval(v UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalRetType) { + setUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalAttributeType(&o.GroupInterval, v) +} + +// GetGroupWait returns the GroupWait field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetGroupWait() (res UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitRetType) { + res, _ = o.GetGroupWaitOk() + return +} + +// GetGroupWaitOk returns a tuple with the GroupWait field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetGroupWaitOk() (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitAttributeTypeOk(o.GroupWait) +} + +// HasGroupWait returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) HasGroupWait() bool { + _, ok := o.GetGroupWaitOk() + return ok +} + +// SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) SetGroupWait(v UpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitRetType) { + setUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitAttributeType(&o.GroupWait, v) +} + +// GetMatch returns the Match field value if set, zero value otherwise. +// Deprecated +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetMatch() (res UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchRetType) { + res, _ = o.GetMatchOk() + return +} + +// GetMatchOk returns a tuple with the Match field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetMatchOk() (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchAttributeTypeOk(o.Match) +} + +// HasMatch returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) HasMatch() bool { + _, ok := o.GetMatchOk() + return ok +} + +// SetMatch gets a reference to the given map[string]interface{} and assigns it to the Match field. +// Deprecated +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) SetMatch(v UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchRetType) { + setUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchAttributeType(&o.Match, v) +} + +// GetMatchRe returns the MatchRe field value if set, zero value otherwise. +// Deprecated +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetMatchRe() (res UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReRetType) { + res, _ = o.GetMatchReOk() + return +} + +// GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetMatchReOk() (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReAttributeTypeOk(o.MatchRe) +} + +// HasMatchRe returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) HasMatchRe() bool { + _, ok := o.GetMatchReOk() + return ok +} + +// SetMatchRe gets a reference to the given map[string]interface{} and assigns it to the MatchRe field. +// Deprecated +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) SetMatchRe(v UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReRetType) { + setUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReAttributeType(&o.MatchRe, v) +} + +// GetMatchers returns the Matchers field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetMatchers() (res UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersRetType) { + res, _ = o.GetMatchersOk() + return +} + +// GetMatchersOk returns a tuple with the Matchers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetMatchersOk() (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersAttributeTypeOk(o.Matchers) +} + +// HasMatchers returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) HasMatchers() bool { + _, ok := o.GetMatchersOk() + return ok +} + +// SetMatchers gets a reference to the given []string and assigns it to the Matchers field. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) SetMatchers(v UpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersRetType) { + setUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersAttributeType(&o.Matchers, v) +} + +// GetReceiver returns the Receiver field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetReceiver() (res UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverRetType) { + res, _ = o.GetReceiverOk() + return +} + +// GetReceiverOk returns a tuple with the Receiver field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetReceiverOk() (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverAttributeTypeOk(o.Receiver) +} + +// HasReceiver returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) HasReceiver() bool { + _, ok := o.GetReceiverOk() + return ok +} + +// SetReceiver gets a reference to the given string and assigns it to the Receiver field. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) SetReceiver(v UpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverRetType) { + setUpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverAttributeType(&o.Receiver, v) +} + +// GetRepeatInterval returns the RepeatInterval field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetRepeatInterval() (res UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalRetType) { + res, _ = o.GetRepeatIntervalOk() + return +} + +// GetRepeatIntervalOk returns a tuple with the RepeatInterval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetRepeatIntervalOk() (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalAttributeTypeOk(o.RepeatInterval) +} + +// HasRepeatInterval returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) HasRepeatInterval() bool { + _, ok := o.GetRepeatIntervalOk() + return ok +} + +// SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) SetRepeatInterval(v UpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalRetType) { + setUpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalAttributeType(&o.RepeatInterval, v) +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetRoutes() (res UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesRetType) { + res, _ = o.GetRoutesOk() + return +} + +// GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) GetRoutesOk() (ret UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesAttributeTypeOk(o.Routes) +} + +// HasRoutes returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) HasRoutes() bool { + _, ok := o.GetRoutesOk() + return ok +} + +// SetRoutes gets a reference to the given []map[string]interface{} and assigns it to the Routes field. +func (o *UpdateAlertConfigsPayloadRouteRoutesInner) SetRoutes(v UpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesRetType) { + setUpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesAttributeType(&o.Routes, v) +} + +func (o UpdateAlertConfigsPayloadRouteRoutesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getUpdateAlertConfigsPayloadRouteRoutesInnergetContinueAttributeTypeOk(o.Continue); ok { + toSerialize["Continue"] = val + } + if val, ok := getUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupByAttributeTypeOk(o.GroupBy); ok { + toSerialize["GroupBy"] = val + } + if val, ok := getUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupIntervalAttributeTypeOk(o.GroupInterval); ok { + toSerialize["GroupInterval"] = val + } + if val, ok := getUpdateAlertConfigsPayloadRouteRoutesInnerGetGroupWaitAttributeTypeOk(o.GroupWait); ok { + toSerialize["GroupWait"] = val + } + if val, ok := getUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchAttributeTypeOk(o.Match); ok { + toSerialize["Match"] = val + } + if val, ok := getUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchReAttributeTypeOk(o.MatchRe); ok { + toSerialize["MatchRe"] = val + } + if val, ok := getUpdateAlertConfigsPayloadRouteRoutesInnerGetMatchersAttributeTypeOk(o.Matchers); ok { + toSerialize["Matchers"] = val + } + if val, ok := getUpdateAlertConfigsPayloadRouteRoutesInnerGetReceiverAttributeTypeOk(o.Receiver); ok { + toSerialize["Receiver"] = val + } + if val, ok := getUpdateAlertConfigsPayloadRouteRoutesInnerGetRepeatIntervalAttributeTypeOk(o.RepeatInterval); ok { + toSerialize["RepeatInterval"] = val + } + if val, ok := getUpdateAlertConfigsPayloadRouteRoutesInnerGetRoutesAttributeTypeOk(o.Routes); ok { + toSerialize["Routes"] = val + } + return toSerialize, nil +} + +type NullableUpdateAlertConfigsPayloadRouteRoutesInner struct { + value *UpdateAlertConfigsPayloadRouteRoutesInner + isSet bool +} + +func (v NullableUpdateAlertConfigsPayloadRouteRoutesInner) Get() *UpdateAlertConfigsPayloadRouteRoutesInner { + return v.value +} + +func (v *NullableUpdateAlertConfigsPayloadRouteRoutesInner) Set(val *UpdateAlertConfigsPayloadRouteRoutesInner) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAlertConfigsPayloadRouteRoutesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAlertConfigsPayloadRouteRoutesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAlertConfigsPayloadRouteRoutesInner(val *UpdateAlertConfigsPayloadRouteRoutesInner) *NullableUpdateAlertConfigsPayloadRouteRoutesInner { + return &NullableUpdateAlertConfigsPayloadRouteRoutesInner{value: val, isSet: true} +} + +func (v NullableUpdateAlertConfigsPayloadRouteRoutesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAlertConfigsPayloadRouteRoutesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_alert_configs_payload_route_routes_inner_test.go b/services/observability/model_update_alert_configs_payload_route_routes_inner_test.go new file mode 100644 index 000000000..ae3f559ed --- /dev/null +++ b/services/observability/model_update_alert_configs_payload_route_routes_inner_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Observability API + +API endpoints for Observability on STACKIT + +API version: 1.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package observability