From 0e1caa5db3dcd472bfe054766c7fbf910f150f1d Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Fri, 11 Oct 2024 17:27:49 +0000 Subject: [PATCH 1/2] Generate observability --- services/observability/model_alert.go | 189 +++++ .../model_alert_config_receivers_response.go | 119 +++ .../model_alert_config_route_response.go | 119 +++ services/observability/model_basic_auth.go | 119 +++ ...el_create_alert_config_receiver_payload.go | 198 +++++ ...ig_receiver_payload_email_configs_inner.go | 275 +++++++ ...receiver_payload_opsgenie_configs_inner.go | 170 +++++ ...receiver_payload_web_hook_configs_inner.go | 139 ++++ ...model_create_alert_config_route_payload.go | 385 ++++++++++ ...alert_config_route_payload_routes_inner.go | 345 +++++++++ .../model_create_credentials_response.go | 119 +++ .../model_create_instance_payload.go | 163 ++++ .../model_create_instance_response.go | 145 ++++ .../model_create_scrape_config_payload.go | 594 +++++++++++++++ ...create_scrape_config_payload_basic_auth.go | 135 ++++ ...pe_config_payload_http_sd_configs_inner.go | 237 ++++++ ...ig_payload_http_sd_configs_inner_oauth2.go | 215 ++++++ ...http_sd_configs_inner_oauth2_tls_config.go | 104 +++ ...g_payload_metrics_relabel_configs_inner.go | 326 ++++++++ ...ape_config_payload_static_configs_inner.go | 128 ++++ services/observability/model_credentials.go | 119 +++ .../model_credentials_remote_write_config.go | 145 ++++ ...redentials_remote_write_delete_response.go | 119 +++ .../model_delete_scrape_config_response.go | 119 +++ services/observability/model_email_config.go | 307 ++++++++ services/observability/model_error.go | 128 ++++ .../model_get_alert_configs_response.go | 119 +++ .../model_get_credentials_response.go | 180 +++++ .../model_get_instance_response.go | 472 +++++++++++- ..._get_metrics_storage_retention_response.go | 171 +++++ .../model_get_scrape_config_response.go | 119 +++ services/observability/model_global.go | 349 +++++++++ .../observability/model_grafana_configs.go | 198 +++++ services/observability/model_grafana_oauth.go | 397 ++++++++++ .../observability/model_http_service_sd.go | 237 ++++++ services/observability/model_inhibit_rules.go | 310 ++++++++ services/observability/model_instance.go | 345 +++++++++ .../observability/model_instance_response.go | 93 +++ .../model_instance_sensitive_data.go | 678 +++++++++++++++++ services/observability/model_job.go | 607 +++++++++++++++ .../observability/model_list_acl_response.go | 119 +++ .../model_list_credentials_response.go | 119 +++ .../model_list_instances_response.go | 119 +++ .../model_list_scrape_configs_response.go | 119 +++ services/observability/model_message.go | 93 +++ .../model_metrics_relabel_config.go | 319 ++++++++ services/observability/model_o_auth2.go | 215 ++++++ .../observability/model_opsgenie_config.go | 244 ++++++ .../observability/model_permission_denied.go | 93 +++ services/observability/model_plan.go | 705 ++++++++++++++++++ services/observability/model_plan_model.go | 588 +++++++++++++++ .../observability/model_plans_response.go | 119 +++ .../model_project_instance_full.go | 279 +++++++ services/observability/model_receiver.go | 119 +++ services/observability/model_receivers.go | 198 +++++ services/observability/model_route.go | 389 ++++++++++ .../observability/model_route_serializer.go | 424 +++++++++++ .../model_scrape_configs_response.go | 119 +++ .../observability/model_service_keys_list.go | 154 ++++ .../observability/model_static_configs.go | 128 ++++ services/observability/model_tls_config.go | 104 +++ .../observability/model_update_acl_payload.go | 93 +++ ...el_update_alert_config_receiver_payload.go | 198 +++++ ...model_update_alert_config_route_payload.go | 385 ++++++++++ .../model_update_alert_configs_payload.go | 189 +++++ ...del_update_alert_configs_payload_global.go | 349 +++++++++ ...ate_alert_configs_payload_inhibit_rules.go | 240 ++++++ ...e_alert_configs_payload_receivers_inner.go | 198 +++++ ...odel_update_alert_configs_payload_route.go | 385 ++++++++++ .../model_update_alert_configs_response.go | 119 +++ ...credentials_remote_write_config_payload.go | 100 +++ .../model_update_grafana_configs_payload.go | 170 +++++ ...e_grafana_configs_payload_generic_oauth.go | 397 ++++++++++ .../model_update_instance_payload.go | 163 ++++ ...pdate_metrics_storage_retention_payload.go | 145 ++++ .../model_update_scrape_config_payload.go | 487 ++++++++++++ ...ape_config_payload_static_configs_inner.go | 128 ++++ services/observability/model_web_hook.go | 171 +++++ 78 files changed, 18118 insertions(+), 1 deletion(-) diff --git a/services/observability/model_alert.go b/services/observability/model_alert.go index a6c639a0c..93c76ad82 100644 --- a/services/observability/model_alert.go +++ b/services/observability/model_alert.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Alert type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Alert{} + // Alert struct for Alert type Alert struct { Global *Global `json:"global,omitempty"` @@ -19,3 +26,185 @@ type Alert struct { // REQUIRED Route *Route `json:"route"` } + +type _Alert Alert + +// NewAlert instantiates a new Alert 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 NewAlert(receivers *[]Receivers, route *Route) *Alert { + this := Alert{} + this.Receivers = receivers + this.Route = route + return &this +} + +// NewAlertWithDefaults instantiates a new Alert 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 NewAlertWithDefaults() *Alert { + this := Alert{} + return &this +} + +// GetGlobal returns the Global field value if set, zero value otherwise. +func (o *Alert) GetGlobal() *Global { + if o == nil || IsNil(o.Global) { + var ret *Global + return ret + } + return o.Global +} + +// GetGlobalOk returns a tuple with the Global field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Alert) GetGlobalOk() (*Global, bool) { + if o == nil || IsNil(o.Global) { + return nil, false + } + return o.Global, true +} + +// HasGlobal returns a boolean if a field has been set. +func (o *Alert) HasGlobal() bool { + if o != nil && !IsNil(o.Global) { + return true + } + + return false +} + +// SetGlobal gets a reference to the given Global and assigns it to the Global field. +func (o *Alert) SetGlobal(v *Global) { + o.Global = v +} + +// GetInhibitRules returns the InhibitRules field value if set, zero value otherwise. +func (o *Alert) GetInhibitRules() *[]InhibitRules { + if o == nil || IsNil(o.InhibitRules) { + var ret *[]InhibitRules + return ret + } + return o.InhibitRules +} + +// GetInhibitRulesOk returns a tuple with the InhibitRules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Alert) GetInhibitRulesOk() (*[]InhibitRules, bool) { + if o == nil || IsNil(o.InhibitRules) { + return nil, false + } + return o.InhibitRules, true +} + +// HasInhibitRules returns a boolean if a field has been set. +func (o *Alert) HasInhibitRules() bool { + if o != nil && !IsNil(o.InhibitRules) { + return true + } + + return false +} + +// SetInhibitRules gets a reference to the given []InhibitRules and assigns it to the InhibitRules field. +func (o *Alert) SetInhibitRules(v *[]InhibitRules) { + o.InhibitRules = v +} + +// GetReceivers returns the Receivers field value +func (o *Alert) GetReceivers() *[]Receivers { + if o == nil { + var ret *[]Receivers + return ret + } + + return o.Receivers +} + +// GetReceiversOk returns a tuple with the Receivers field value +// and a boolean to check if the value has been set. +func (o *Alert) GetReceiversOk() (*[]Receivers, bool) { + if o == nil { + return nil, false + } + return o.Receivers, true +} + +// SetReceivers sets field value +func (o *Alert) SetReceivers(v *[]Receivers) { + o.Receivers = v +} + +// GetRoute returns the Route field value +func (o *Alert) GetRoute() *Route { + if o == nil { + var ret *Route + return ret + } + + return o.Route +} + +// GetRouteOk returns a tuple with the Route field value +// and a boolean to check if the value has been set. +func (o *Alert) GetRouteOk() (*Route, bool) { + if o == nil { + return nil, false + } + return o.Route, true +} + +// SetRoute sets field value +func (o *Alert) SetRoute(v *Route) { + o.Route = v +} + +func (o Alert) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Global) { + toSerialize["global"] = o.Global + } + if !IsNil(o.InhibitRules) { + toSerialize["inhibitRules"] = o.InhibitRules + } + toSerialize["receivers"] = o.Receivers + toSerialize["route"] = o.Route + return toSerialize, nil +} + +type NullableAlert struct { + value *Alert + isSet bool +} + +func (v NullableAlert) Get() *Alert { + return v.value +} + +func (v *NullableAlert) Set(val *Alert) { + v.value = val + v.isSet = true +} + +func (v NullableAlert) IsSet() bool { + return v.isSet +} + +func (v *NullableAlert) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAlert(val *Alert) *NullableAlert { + return &NullableAlert{value: val, isSet: true} +} + +func (v NullableAlert) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAlert) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_alert_config_receivers_response.go b/services/observability/model_alert_config_receivers_response.go index d2b2eaec2..4c102999d 100644 --- a/services/observability/model_alert_config_receivers_response.go +++ b/services/observability/model_alert_config_receivers_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the AlertConfigReceiversResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AlertConfigReceiversResponse{} + // AlertConfigReceiversResponse struct for AlertConfigReceiversResponse type AlertConfigReceiversResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type AlertConfigReceiversResponse struct { // REQUIRED Message *string `json:"message"` } + +type _AlertConfigReceiversResponse AlertConfigReceiversResponse + +// NewAlertConfigReceiversResponse instantiates a new AlertConfigReceiversResponse 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 NewAlertConfigReceiversResponse(data *[]Receivers, message *string) *AlertConfigReceiversResponse { + this := AlertConfigReceiversResponse{} + this.Data = data + this.Message = message + return &this +} + +// NewAlertConfigReceiversResponseWithDefaults instantiates a new AlertConfigReceiversResponse 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 NewAlertConfigReceiversResponseWithDefaults() *AlertConfigReceiversResponse { + this := AlertConfigReceiversResponse{} + return &this +} + +// GetData returns the Data field value +func (o *AlertConfigReceiversResponse) GetData() *[]Receivers { + if o == nil { + var ret *[]Receivers + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *AlertConfigReceiversResponse) GetDataOk() (*[]Receivers, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *AlertConfigReceiversResponse) SetData(v *[]Receivers) { + o.Data = v +} + +// GetMessage returns the Message field value +func (o *AlertConfigReceiversResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *AlertConfigReceiversResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *AlertConfigReceiversResponse) SetMessage(v *string) { + o.Message = v +} + +func (o AlertConfigReceiversResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableAlertConfigReceiversResponse struct { + value *AlertConfigReceiversResponse + isSet bool +} + +func (v NullableAlertConfigReceiversResponse) Get() *AlertConfigReceiversResponse { + return v.value +} + +func (v *NullableAlertConfigReceiversResponse) Set(val *AlertConfigReceiversResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAlertConfigReceiversResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAlertConfigReceiversResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAlertConfigReceiversResponse(val *AlertConfigReceiversResponse) *NullableAlertConfigReceiversResponse { + return &NullableAlertConfigReceiversResponse{value: val, isSet: true} +} + +func (v NullableAlertConfigReceiversResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAlertConfigReceiversResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_alert_config_route_response.go b/services/observability/model_alert_config_route_response.go index 5fb8adb75..b0f9e3876 100644 --- a/services/observability/model_alert_config_route_response.go +++ b/services/observability/model_alert_config_route_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the AlertConfigRouteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AlertConfigRouteResponse{} + // AlertConfigRouteResponse struct for AlertConfigRouteResponse type AlertConfigRouteResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type AlertConfigRouteResponse struct { // REQUIRED Message *string `json:"message"` } + +type _AlertConfigRouteResponse AlertConfigRouteResponse + +// NewAlertConfigRouteResponse instantiates a new AlertConfigRouteResponse 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 NewAlertConfigRouteResponse(data *Route, message *string) *AlertConfigRouteResponse { + this := AlertConfigRouteResponse{} + this.Data = data + this.Message = message + return &this +} + +// NewAlertConfigRouteResponseWithDefaults instantiates a new AlertConfigRouteResponse 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 NewAlertConfigRouteResponseWithDefaults() *AlertConfigRouteResponse { + this := AlertConfigRouteResponse{} + return &this +} + +// GetData returns the Data field value +func (o *AlertConfigRouteResponse) GetData() *Route { + if o == nil { + var ret *Route + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *AlertConfigRouteResponse) GetDataOk() (*Route, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *AlertConfigRouteResponse) SetData(v *Route) { + o.Data = v +} + +// GetMessage returns the Message field value +func (o *AlertConfigRouteResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *AlertConfigRouteResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *AlertConfigRouteResponse) SetMessage(v *string) { + o.Message = v +} + +func (o AlertConfigRouteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableAlertConfigRouteResponse struct { + value *AlertConfigRouteResponse + isSet bool +} + +func (v NullableAlertConfigRouteResponse) Get() *AlertConfigRouteResponse { + return v.value +} + +func (v *NullableAlertConfigRouteResponse) Set(val *AlertConfigRouteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAlertConfigRouteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAlertConfigRouteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAlertConfigRouteResponse(val *AlertConfigRouteResponse) *NullableAlertConfigRouteResponse { + return &NullableAlertConfigRouteResponse{value: val, isSet: true} +} + +func (v NullableAlertConfigRouteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAlertConfigRouteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_basic_auth.go b/services/observability/model_basic_auth.go index c72a93d67..2d64b5772 100644 --- a/services/observability/model_basic_auth.go +++ b/services/observability/model_basic_auth.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the BasicAuth type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BasicAuth{} + // BasicAuth struct for BasicAuth type BasicAuth struct { // REQUIRED @@ -17,3 +24,115 @@ type BasicAuth struct { // REQUIRED Username *string `json:"username"` } + +type _BasicAuth BasicAuth + +// NewBasicAuth instantiates a new BasicAuth 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 NewBasicAuth(password *string, username *string) *BasicAuth { + this := BasicAuth{} + this.Password = password + this.Username = username + return &this +} + +// NewBasicAuthWithDefaults instantiates a new BasicAuth 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 NewBasicAuthWithDefaults() *BasicAuth { + this := BasicAuth{} + return &this +} + +// GetPassword returns the Password field value +func (o *BasicAuth) GetPassword() *string { + if o == nil { + var ret *string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *BasicAuth) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password, true +} + +// SetPassword sets field value +func (o *BasicAuth) SetPassword(v *string) { + o.Password = v +} + +// GetUsername returns the Username field value +func (o *BasicAuth) GetUsername() *string { + if o == nil { + var ret *string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *BasicAuth) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username, true +} + +// SetUsername sets field value +func (o *BasicAuth) SetUsername(v *string) { + o.Username = v +} + +func (o BasicAuth) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["password"] = o.Password + toSerialize["username"] = o.Username + return toSerialize, nil +} + +type NullableBasicAuth struct { + value *BasicAuth + isSet bool +} + +func (v NullableBasicAuth) Get() *BasicAuth { + return v.value +} + +func (v *NullableBasicAuth) Set(val *BasicAuth) { + v.value = val + v.isSet = true +} + +func (v NullableBasicAuth) IsSet() bool { + return v.isSet +} + +func (v *NullableBasicAuth) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBasicAuth(val *BasicAuth) *NullableBasicAuth { + return &NullableBasicAuth{value: val, isSet: true} +} + +func (v NullableBasicAuth) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBasicAuth) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_alert_config_receiver_payload.go b/services/observability/model_create_alert_config_receiver_payload.go index fb150bf8b..0f1a04630 100644 --- a/services/observability/model_create_alert_config_receiver_payload.go +++ b/services/observability/model_create_alert_config_receiver_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateAlertConfigReceiverPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateAlertConfigReceiverPayload{} + // CreateAlertConfigReceiverPayload Receivers type CreateAlertConfigReceiverPayload struct { // Email configurations @@ -21,3 +28,194 @@ type CreateAlertConfigReceiverPayload struct { OpsgenieConfigs *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner `json:"opsgenieConfigs,omitempty"` WebHookConfigs *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner `json:"webHookConfigs,omitempty"` } + +type _CreateAlertConfigReceiverPayload CreateAlertConfigReceiverPayload + +// NewCreateAlertConfigReceiverPayload instantiates a new CreateAlertConfigReceiverPayload 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 NewCreateAlertConfigReceiverPayload(name *string) *CreateAlertConfigReceiverPayload { + this := CreateAlertConfigReceiverPayload{} + this.Name = name + return &this +} + +// NewCreateAlertConfigReceiverPayloadWithDefaults instantiates a new CreateAlertConfigReceiverPayload 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 NewCreateAlertConfigReceiverPayloadWithDefaults() *CreateAlertConfigReceiverPayload { + this := CreateAlertConfigReceiverPayload{} + return &this +} + +// GetEmailConfigs returns the EmailConfigs field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayload) GetEmailConfigs() *[]CreateAlertConfigReceiverPayloadEmailConfigsInner { + if o == nil || IsNil(o.EmailConfigs) { + var ret *[]CreateAlertConfigReceiverPayloadEmailConfigsInner + return ret + } + return o.EmailConfigs +} + +// GetEmailConfigsOk returns a tuple with the EmailConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayload) GetEmailConfigsOk() (*[]CreateAlertConfigReceiverPayloadEmailConfigsInner, bool) { + if o == nil || IsNil(o.EmailConfigs) { + return nil, false + } + return o.EmailConfigs, true +} + +// HasEmailConfigs returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayload) HasEmailConfigs() bool { + if o != nil && !IsNil(o.EmailConfigs) { + return true + } + + return false +} + +// SetEmailConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadEmailConfigsInner and assigns it to the EmailConfigs field. +func (o *CreateAlertConfigReceiverPayload) SetEmailConfigs(v *[]CreateAlertConfigReceiverPayloadEmailConfigsInner) { + o.EmailConfigs = v +} + +// GetName returns the Name field value +func (o *CreateAlertConfigReceiverPayload) 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 *CreateAlertConfigReceiverPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateAlertConfigReceiverPayload) SetName(v *string) { + o.Name = v +} + +// GetOpsgenieConfigs returns the OpsgenieConfigs field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayload) GetOpsgenieConfigs() *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner { + if o == nil || IsNil(o.OpsgenieConfigs) { + var ret *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner + return ret + } + return o.OpsgenieConfigs +} + +// GetOpsgenieConfigsOk returns a tuple with the OpsgenieConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayload) GetOpsgenieConfigsOk() (*[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner, bool) { + if o == nil || IsNil(o.OpsgenieConfigs) { + return nil, false + } + return o.OpsgenieConfigs, true +} + +// HasOpsgenieConfigs returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayload) HasOpsgenieConfigs() bool { + if o != nil && !IsNil(o.OpsgenieConfigs) { + return true + } + + return false +} + +// SetOpsgenieConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner and assigns it to the OpsgenieConfigs field. +func (o *CreateAlertConfigReceiverPayload) SetOpsgenieConfigs(v *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) { + o.OpsgenieConfigs = v +} + +// GetWebHookConfigs returns the WebHookConfigs field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayload) GetWebHookConfigs() *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner { + if o == nil || IsNil(o.WebHookConfigs) { + var ret *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner + return ret + } + return o.WebHookConfigs +} + +// GetWebHookConfigsOk returns a tuple with the WebHookConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayload) GetWebHookConfigsOk() (*[]CreateAlertConfigReceiverPayloadWebHookConfigsInner, bool) { + if o == nil || IsNil(o.WebHookConfigs) { + return nil, false + } + return o.WebHookConfigs, true +} + +// HasWebHookConfigs returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayload) HasWebHookConfigs() bool { + if o != nil && !IsNil(o.WebHookConfigs) { + return true + } + + return false +} + +// SetWebHookConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadWebHookConfigsInner and assigns it to the WebHookConfigs field. +func (o *CreateAlertConfigReceiverPayload) SetWebHookConfigs(v *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner) { + o.WebHookConfigs = v +} + +func (o CreateAlertConfigReceiverPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EmailConfigs) { + toSerialize["emailConfigs"] = o.EmailConfigs + } + toSerialize["name"] = o.Name + if !IsNil(o.OpsgenieConfigs) { + toSerialize["opsgenieConfigs"] = o.OpsgenieConfigs + } + if !IsNil(o.WebHookConfigs) { + toSerialize["webHookConfigs"] = o.WebHookConfigs + } + return toSerialize, nil +} + +type NullableCreateAlertConfigReceiverPayload struct { + value *CreateAlertConfigReceiverPayload + isSet bool +} + +func (v NullableCreateAlertConfigReceiverPayload) Get() *CreateAlertConfigReceiverPayload { + return v.value +} + +func (v *NullableCreateAlertConfigReceiverPayload) Set(val *CreateAlertConfigReceiverPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAlertConfigReceiverPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAlertConfigReceiverPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAlertConfigReceiverPayload(val *CreateAlertConfigReceiverPayload) *NullableCreateAlertConfigReceiverPayload { + return &NullableCreateAlertConfigReceiverPayload{value: val, isSet: true} +} + +func (v NullableCreateAlertConfigReceiverPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAlertConfigReceiverPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_alert_config_receiver_payload_email_configs_inner.go b/services/observability/model_create_alert_config_receiver_payload_email_configs_inner.go index ffb3fe5db..faf1ead00 100644 --- a/services/observability/model_create_alert_config_receiver_payload_email_configs_inner.go +++ b/services/observability/model_create_alert_config_receiver_payload_email_configs_inner.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateAlertConfigReceiverPayloadEmailConfigsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateAlertConfigReceiverPayloadEmailConfigsInner{} + // CreateAlertConfigReceiverPayloadEmailConfigsInner struct for CreateAlertConfigReceiverPayloadEmailConfigsInner type CreateAlertConfigReceiverPayloadEmailConfigsInner struct { // SMTP authentication information. `Additional Validators:` * must be a syntactically valid email address @@ -25,3 +32,271 @@ type CreateAlertConfigReceiverPayloadEmailConfigsInner struct { // The email address to send notifications to. `Additional Validators:` * must be a syntactically valid email address To *string `json:"to,omitempty"` } + +// NewCreateAlertConfigReceiverPayloadEmailConfigsInner instantiates a new CreateAlertConfigReceiverPayloadEmailConfigsInner 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 NewCreateAlertConfigReceiverPayloadEmailConfigsInner() *CreateAlertConfigReceiverPayloadEmailConfigsInner { + this := CreateAlertConfigReceiverPayloadEmailConfigsInner{} + return &this +} + +// NewCreateAlertConfigReceiverPayloadEmailConfigsInnerWithDefaults instantiates a new CreateAlertConfigReceiverPayloadEmailConfigsInner 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 NewCreateAlertConfigReceiverPayloadEmailConfigsInnerWithDefaults() *CreateAlertConfigReceiverPayloadEmailConfigsInner { + this := CreateAlertConfigReceiverPayloadEmailConfigsInner{} + return &this +} + +// GetAuthIdentity returns the AuthIdentity field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthIdentity() *string { + if o == nil || IsNil(o.AuthIdentity) { + var ret *string + return ret + } + return o.AuthIdentity +} + +// GetAuthIdentityOk returns a tuple with the AuthIdentity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthIdentityOk() (*string, bool) { + if o == nil || IsNil(o.AuthIdentity) { + return nil, false + } + return o.AuthIdentity, true +} + +// HasAuthIdentity returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) HasAuthIdentity() bool { + if o != nil && !IsNil(o.AuthIdentity) { + return true + } + + return false +} + +// SetAuthIdentity gets a reference to the given string and assigns it to the AuthIdentity field. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetAuthIdentity(v *string) { + o.AuthIdentity = v +} + +// GetAuthPassword returns the AuthPassword field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthPassword() *string { + if o == nil || IsNil(o.AuthPassword) { + var ret *string + return ret + } + return o.AuthPassword +} + +// GetAuthPasswordOk returns a tuple with the AuthPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthPasswordOk() (*string, bool) { + if o == nil || IsNil(o.AuthPassword) { + return nil, false + } + return o.AuthPassword, true +} + +// HasAuthPassword returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) HasAuthPassword() bool { + if o != nil && !IsNil(o.AuthPassword) { + return true + } + + return false +} + +// SetAuthPassword gets a reference to the given string and assigns it to the AuthPassword field. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetAuthPassword(v *string) { + o.AuthPassword = v +} + +// GetAuthUsername returns the AuthUsername field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthUsername() *string { + if o == nil || IsNil(o.AuthUsername) { + var ret *string + return ret + } + return o.AuthUsername +} + +// GetAuthUsernameOk returns a tuple with the AuthUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthUsernameOk() (*string, bool) { + if o == nil || IsNil(o.AuthUsername) { + return nil, false + } + return o.AuthUsername, true +} + +// HasAuthUsername returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) HasAuthUsername() bool { + if o != nil && !IsNil(o.AuthUsername) { + return true + } + + return false +} + +// SetAuthUsername gets a reference to the given string and assigns it to the AuthUsername field. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetAuthUsername(v *string) { + o.AuthUsername = v +} + +// GetFrom returns the From field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetFrom() *string { + if o == nil || IsNil(o.From) { + var ret *string + return ret + } + return o.From +} + +// GetFromOk returns a tuple with the From field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetFromOk() (*string, bool) { + if o == nil || IsNil(o.From) { + return nil, false + } + return o.From, true +} + +// HasFrom returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) HasFrom() bool { + if o != nil && !IsNil(o.From) { + return true + } + + return false +} + +// SetFrom gets a reference to the given string and assigns it to the From field. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetFrom(v *string) { + o.From = v +} + +// GetSmarthost returns the Smarthost field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetSmarthost() *string { + if o == nil || IsNil(o.Smarthost) { + var ret *string + return ret + } + return o.Smarthost +} + +// GetSmarthostOk returns a tuple with the Smarthost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetSmarthostOk() (*string, bool) { + if o == nil || IsNil(o.Smarthost) { + return nil, false + } + return o.Smarthost, true +} + +// HasSmarthost returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) HasSmarthost() bool { + if o != nil && !IsNil(o.Smarthost) { + return true + } + + return false +} + +// SetSmarthost gets a reference to the given string and assigns it to the Smarthost field. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetSmarthost(v *string) { + o.Smarthost = v +} + +// GetTo returns the To field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetTo() *string { + if o == nil || IsNil(o.To) { + var ret *string + return ret + } + return o.To +} + +// GetToOk returns a tuple with the To field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetToOk() (*string, bool) { + if o == nil || IsNil(o.To) { + return nil, false + } + return o.To, true +} + +// HasTo returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) HasTo() bool { + if o != nil && !IsNil(o.To) { + return true + } + + return false +} + +// SetTo gets a reference to the given string and assigns it to the To field. +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetTo(v *string) { + o.To = v +} + +func (o CreateAlertConfigReceiverPayloadEmailConfigsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AuthIdentity) { + toSerialize["authIdentity"] = o.AuthIdentity + } + if !IsNil(o.AuthPassword) { + toSerialize["authPassword"] = o.AuthPassword + } + if !IsNil(o.AuthUsername) { + toSerialize["authUsername"] = o.AuthUsername + } + if !IsNil(o.From) { + toSerialize["from"] = o.From + } + if !IsNil(o.Smarthost) { + toSerialize["smarthost"] = o.Smarthost + } + if !IsNil(o.To) { + toSerialize["to"] = o.To + } + return toSerialize, nil +} + +type NullableCreateAlertConfigReceiverPayloadEmailConfigsInner struct { + value *CreateAlertConfigReceiverPayloadEmailConfigsInner + isSet bool +} + +func (v NullableCreateAlertConfigReceiverPayloadEmailConfigsInner) Get() *CreateAlertConfigReceiverPayloadEmailConfigsInner { + return v.value +} + +func (v *NullableCreateAlertConfigReceiverPayloadEmailConfigsInner) Set(val *CreateAlertConfigReceiverPayloadEmailConfigsInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAlertConfigReceiverPayloadEmailConfigsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAlertConfigReceiverPayloadEmailConfigsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAlertConfigReceiverPayloadEmailConfigsInner(val *CreateAlertConfigReceiverPayloadEmailConfigsInner) *NullableCreateAlertConfigReceiverPayloadEmailConfigsInner { + return &NullableCreateAlertConfigReceiverPayloadEmailConfigsInner{value: val, isSet: true} +} + +func (v NullableCreateAlertConfigReceiverPayloadEmailConfigsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAlertConfigReceiverPayloadEmailConfigsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_alert_config_receiver_payload_opsgenie_configs_inner.go b/services/observability/model_create_alert_config_receiver_payload_opsgenie_configs_inner.go index bd46c5f39..39ba9905b 100644 --- a/services/observability/model_create_alert_config_receiver_payload_opsgenie_configs_inner.go +++ b/services/observability/model_create_alert_config_receiver_payload_opsgenie_configs_inner.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateAlertConfigReceiverPayloadOpsgenieConfigsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateAlertConfigReceiverPayloadOpsgenieConfigsInner{} + // CreateAlertConfigReceiverPayloadOpsgenieConfigsInner struct for CreateAlertConfigReceiverPayloadOpsgenieConfigsInner type CreateAlertConfigReceiverPayloadOpsgenieConfigsInner struct { // The API key to use when talking to the OpsGenie API. `Additional Validators:` * should only include the characters: a-zA-Z0-9- @@ -19,3 +26,166 @@ type CreateAlertConfigReceiverPayloadOpsgenieConfigsInner struct { // Comma separated list of tags attached to the notifications. Tags *string `json:"tags,omitempty"` } + +// NewCreateAlertConfigReceiverPayloadOpsgenieConfigsInner instantiates a new CreateAlertConfigReceiverPayloadOpsgenieConfigsInner 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 NewCreateAlertConfigReceiverPayloadOpsgenieConfigsInner() *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner { + this := CreateAlertConfigReceiverPayloadOpsgenieConfigsInner{} + return &this +} + +// NewCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerWithDefaults instantiates a new CreateAlertConfigReceiverPayloadOpsgenieConfigsInner 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 NewCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerWithDefaults() *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner { + this := CreateAlertConfigReceiverPayloadOpsgenieConfigsInner{} + return &this +} + +// GetApiKey returns the ApiKey field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetApiKey() *string { + if o == nil || IsNil(o.ApiKey) { + var ret *string + return ret + } + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetApiKeyOk() (*string, bool) { + if o == nil || IsNil(o.ApiKey) { + return nil, false + } + return o.ApiKey, true +} + +// HasApiKey returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) HasApiKey() bool { + if o != nil && !IsNil(o.ApiKey) { + return true + } + + return false +} + +// SetApiKey gets a reference to the given string and assigns it to the ApiKey field. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) SetApiKey(v *string) { + o.ApiKey = v +} + +// GetApiUrl returns the ApiUrl field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetApiUrl() *string { + if o == nil || IsNil(o.ApiUrl) { + var ret *string + return ret + } + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetApiUrlOk() (*string, bool) { + if o == nil || IsNil(o.ApiUrl) { + return nil, false + } + return o.ApiUrl, true +} + +// HasApiUrl returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) HasApiUrl() bool { + if o != nil && !IsNil(o.ApiUrl) { + return true + } + + return false +} + +// SetApiUrl gets a reference to the given string and assigns it to the ApiUrl field. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) SetApiUrl(v *string) { + o.ApiUrl = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetTags() *string { + if o == nil || IsNil(o.Tags) { + var ret *string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetTagsOk() (*string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given string and assigns it to the Tags field. +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) SetTags(v *string) { + o.Tags = v +} + +func (o CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ApiKey) { + toSerialize["apiKey"] = o.ApiKey + } + if !IsNil(o.ApiUrl) { + toSerialize["apiUrl"] = o.ApiUrl + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + return toSerialize, nil +} + +type NullableCreateAlertConfigReceiverPayloadOpsgenieConfigsInner struct { + value *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner + isSet bool +} + +func (v NullableCreateAlertConfigReceiverPayloadOpsgenieConfigsInner) Get() *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner { + return v.value +} + +func (v *NullableCreateAlertConfigReceiverPayloadOpsgenieConfigsInner) Set(val *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAlertConfigReceiverPayloadOpsgenieConfigsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAlertConfigReceiverPayloadOpsgenieConfigsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAlertConfigReceiverPayloadOpsgenieConfigsInner(val *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) *NullableCreateAlertConfigReceiverPayloadOpsgenieConfigsInner { + return &NullableCreateAlertConfigReceiverPayloadOpsgenieConfigsInner{value: val, isSet: true} +} + +func (v NullableCreateAlertConfigReceiverPayloadOpsgenieConfigsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAlertConfigReceiverPayloadOpsgenieConfigsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_alert_config_receiver_payload_web_hook_configs_inner.go b/services/observability/model_create_alert_config_receiver_payload_web_hook_configs_inner.go index e278cad49..576f40c0c 100644 --- a/services/observability/model_create_alert_config_receiver_payload_web_hook_configs_inner.go +++ b/services/observability/model_create_alert_config_receiver_payload_web_hook_configs_inner.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateAlertConfigReceiverPayloadWebHookConfigsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateAlertConfigReceiverPayloadWebHookConfigsInner{} + // CreateAlertConfigReceiverPayloadWebHookConfigsInner struct for CreateAlertConfigReceiverPayloadWebHookConfigsInner type CreateAlertConfigReceiverPayloadWebHookConfigsInner struct { // Microsoft Teams webhooks require special handling. If you set this property to true, it is treated as such @@ -17,3 +24,135 @@ type CreateAlertConfigReceiverPayloadWebHookConfigsInner struct { // The endpoint to send HTTP POST requests to. `Additional Validators:` * must be a syntactically valid url address Url *string `json:"url,omitempty"` } + +// NewCreateAlertConfigReceiverPayloadWebHookConfigsInner instantiates a new CreateAlertConfigReceiverPayloadWebHookConfigsInner 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 NewCreateAlertConfigReceiverPayloadWebHookConfigsInner() *CreateAlertConfigReceiverPayloadWebHookConfigsInner { + this := CreateAlertConfigReceiverPayloadWebHookConfigsInner{} + var msTeams bool = false + this.MsTeams = &msTeams + return &this +} + +// NewCreateAlertConfigReceiverPayloadWebHookConfigsInnerWithDefaults instantiates a new CreateAlertConfigReceiverPayloadWebHookConfigsInner 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 NewCreateAlertConfigReceiverPayloadWebHookConfigsInnerWithDefaults() *CreateAlertConfigReceiverPayloadWebHookConfigsInner { + this := CreateAlertConfigReceiverPayloadWebHookConfigsInner{} + var msTeams bool = false + this.MsTeams = &msTeams + return &this +} + +// GetMsTeams returns the MsTeams field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) GetMsTeams() *bool { + if o == nil || IsNil(o.MsTeams) { + var ret *bool + return ret + } + return o.MsTeams +} + +// GetMsTeamsOk returns a tuple with the MsTeams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) GetMsTeamsOk() (*bool, bool) { + if o == nil || IsNil(o.MsTeams) { + return nil, false + } + return o.MsTeams, true +} + +// HasMsTeams returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) HasMsTeams() bool { + if o != nil && !IsNil(o.MsTeams) { + return true + } + + return false +} + +// SetMsTeams gets a reference to the given bool and assigns it to the MsTeams field. +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) SetMsTeams(v *bool) { + o.MsTeams = v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) GetUrl() *string { + if o == nil || IsNil(o.Url) { + var ret *string + return ret + } + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) SetUrl(v *string) { + o.Url = v +} + +func (o CreateAlertConfigReceiverPayloadWebHookConfigsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.MsTeams) { + toSerialize["msTeams"] = o.MsTeams + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + return toSerialize, nil +} + +type NullableCreateAlertConfigReceiverPayloadWebHookConfigsInner struct { + value *CreateAlertConfigReceiverPayloadWebHookConfigsInner + isSet bool +} + +func (v NullableCreateAlertConfigReceiverPayloadWebHookConfigsInner) Get() *CreateAlertConfigReceiverPayloadWebHookConfigsInner { + return v.value +} + +func (v *NullableCreateAlertConfigReceiverPayloadWebHookConfigsInner) Set(val *CreateAlertConfigReceiverPayloadWebHookConfigsInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAlertConfigReceiverPayloadWebHookConfigsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAlertConfigReceiverPayloadWebHookConfigsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAlertConfigReceiverPayloadWebHookConfigsInner(val *CreateAlertConfigReceiverPayloadWebHookConfigsInner) *NullableCreateAlertConfigReceiverPayloadWebHookConfigsInner { + return &NullableCreateAlertConfigReceiverPayloadWebHookConfigsInner{value: val, isSet: true} +} + +func (v NullableCreateAlertConfigReceiverPayloadWebHookConfigsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAlertConfigReceiverPayloadWebHookConfigsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_alert_config_route_payload.go b/services/observability/model_create_alert_config_route_payload.go index 262cb767e..e752c79ca 100644 --- a/services/observability/model_create_alert_config_route_payload.go +++ b/services/observability/model_create_alert_config_route_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateAlertConfigRoutePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateAlertConfigRoutePayload{} + // CreateAlertConfigRoutePayload The root node of the routing tree. type CreateAlertConfigRoutePayload struct { // The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping. @@ -32,3 +39,381 @@ type CreateAlertConfigRoutePayload struct { // Zero or more child routes. Routes *[]CreateAlertConfigRoutePayloadRoutesInner `json:"routes,omitempty"` } + +type _CreateAlertConfigRoutePayload CreateAlertConfigRoutePayload + +// NewCreateAlertConfigRoutePayload instantiates a new CreateAlertConfigRoutePayload 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 NewCreateAlertConfigRoutePayload(receiver *string) *CreateAlertConfigRoutePayload { + this := CreateAlertConfigRoutePayload{} + var groupInterval string = "5m" + this.GroupInterval = &groupInterval + var groupWait string = "30s" + this.GroupWait = &groupWait + this.Receiver = receiver + var repeatInterval string = "4h" + this.RepeatInterval = &repeatInterval + return &this +} + +// NewCreateAlertConfigRoutePayloadWithDefaults instantiates a new CreateAlertConfigRoutePayload 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 NewCreateAlertConfigRoutePayloadWithDefaults() *CreateAlertConfigRoutePayload { + this := CreateAlertConfigRoutePayload{} + var groupInterval string = "5m" + this.GroupInterval = &groupInterval + var groupWait string = "30s" + this.GroupWait = &groupWait + var repeatInterval string = "4h" + this.RepeatInterval = &repeatInterval + return &this +} + +// GetGroupBy returns the GroupBy field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayload) GetGroupBy() *[]string { + if o == nil || IsNil(o.GroupBy) { + var ret *[]string + return ret + } + return o.GroupBy +} + +// 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 *CreateAlertConfigRoutePayload) GetGroupByOk() (*[]string, bool) { + if o == nil || IsNil(o.GroupBy) { + return nil, false + } + return o.GroupBy, true +} + +// HasGroupBy returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayload) HasGroupBy() bool { + if o != nil && !IsNil(o.GroupBy) { + return true + } + + return false +} + +// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. +func (o *CreateAlertConfigRoutePayload) SetGroupBy(v *[]string) { + o.GroupBy = v +} + +// GetGroupInterval returns the GroupInterval field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayload) GetGroupInterval() *string { + if o == nil || IsNil(o.GroupInterval) { + var ret *string + return ret + } + return o.GroupInterval +} + +// 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 *CreateAlertConfigRoutePayload) GetGroupIntervalOk() (*string, bool) { + if o == nil || IsNil(o.GroupInterval) { + return nil, false + } + return o.GroupInterval, true +} + +// HasGroupInterval returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayload) HasGroupInterval() bool { + if o != nil && !IsNil(o.GroupInterval) { + return true + } + + return false +} + +// SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. +func (o *CreateAlertConfigRoutePayload) SetGroupInterval(v *string) { + o.GroupInterval = v +} + +// GetGroupWait returns the GroupWait field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayload) GetGroupWait() *string { + if o == nil || IsNil(o.GroupWait) { + var ret *string + return ret + } + return o.GroupWait +} + +// 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 *CreateAlertConfigRoutePayload) GetGroupWaitOk() (*string, bool) { + if o == nil || IsNil(o.GroupWait) { + return nil, false + } + return o.GroupWait, true +} + +// HasGroupWait returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayload) HasGroupWait() bool { + if o != nil && !IsNil(o.GroupWait) { + return true + } + + return false +} + +// SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. +func (o *CreateAlertConfigRoutePayload) SetGroupWait(v *string) { + o.GroupWait = v +} + +// GetMatch returns the Match field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayload) GetMatch() *map[string]interface{} { + if o == nil || IsNil(o.Match) { + var ret *map[string]interface{} + return ret + } + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigRoutePayload) GetMatchOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Match) { + return &map[string]interface{}{}, false + } + return o.Match, true +} + +// HasMatch returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayload) HasMatch() bool { + if o != nil && !IsNil(o.Match) { + return true + } + + return false +} + +// SetMatch gets a reference to the given map[string]interface{} and assigns it to the Match field. +func (o *CreateAlertConfigRoutePayload) SetMatch(v *map[string]interface{}) { + o.Match = v +} + +// GetMatchRe returns the MatchRe field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayload) GetMatchRe() *map[string]interface{} { + if o == nil || IsNil(o.MatchRe) { + var ret *map[string]interface{} + return ret + } + return o.MatchRe +} + +// GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigRoutePayload) GetMatchReOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.MatchRe) { + return &map[string]interface{}{}, false + } + return o.MatchRe, true +} + +// HasMatchRe returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayload) HasMatchRe() bool { + if o != nil && !IsNil(o.MatchRe) { + return true + } + + return false +} + +// SetMatchRe gets a reference to the given map[string]interface{} and assigns it to the MatchRe field. +func (o *CreateAlertConfigRoutePayload) SetMatchRe(v *map[string]interface{}) { + o.MatchRe = v +} + +// GetMatchers returns the Matchers field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayload) GetMatchers() *[]string { + if o == nil || IsNil(o.Matchers) { + var ret *[]string + return ret + } + return o.Matchers +} + +// 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 *CreateAlertConfigRoutePayload) GetMatchersOk() (*[]string, bool) { + if o == nil || IsNil(o.Matchers) { + return nil, false + } + return o.Matchers, true +} + +// HasMatchers returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayload) HasMatchers() bool { + if o != nil && !IsNil(o.Matchers) { + return true + } + + return false +} + +// SetMatchers gets a reference to the given []string and assigns it to the Matchers field. +func (o *CreateAlertConfigRoutePayload) SetMatchers(v *[]string) { + o.Matchers = v +} + +// GetReceiver returns the Receiver field value +func (o *CreateAlertConfigRoutePayload) GetReceiver() *string { + if o == nil { + var ret *string + return ret + } + + return o.Receiver +} + +// GetReceiverOk returns a tuple with the Receiver field value +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigRoutePayload) GetReceiverOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Receiver, true +} + +// SetReceiver sets field value +func (o *CreateAlertConfigRoutePayload) SetReceiver(v *string) { + o.Receiver = v +} + +// GetRepeatInterval returns the RepeatInterval field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayload) GetRepeatInterval() *string { + if o == nil || IsNil(o.RepeatInterval) { + var ret *string + return ret + } + return o.RepeatInterval +} + +// 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 *CreateAlertConfigRoutePayload) GetRepeatIntervalOk() (*string, bool) { + if o == nil || IsNil(o.RepeatInterval) { + return nil, false + } + return o.RepeatInterval, true +} + +// HasRepeatInterval returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayload) HasRepeatInterval() bool { + if o != nil && !IsNil(o.RepeatInterval) { + return true + } + + return false +} + +// SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. +func (o *CreateAlertConfigRoutePayload) SetRepeatInterval(v *string) { + o.RepeatInterval = v +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayload) GetRoutes() *[]CreateAlertConfigRoutePayloadRoutesInner { + if o == nil || IsNil(o.Routes) { + var ret *[]CreateAlertConfigRoutePayloadRoutesInner + return ret + } + return o.Routes +} + +// 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 *CreateAlertConfigRoutePayload) GetRoutesOk() (*[]CreateAlertConfigRoutePayloadRoutesInner, bool) { + if o == nil || IsNil(o.Routes) { + return nil, false + } + return o.Routes, true +} + +// HasRoutes returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayload) HasRoutes() bool { + if o != nil && !IsNil(o.Routes) { + return true + } + + return false +} + +// SetRoutes gets a reference to the given []CreateAlertConfigRoutePayloadRoutesInner and assigns it to the Routes field. +func (o *CreateAlertConfigRoutePayload) SetRoutes(v *[]CreateAlertConfigRoutePayloadRoutesInner) { + o.Routes = v +} + +func (o CreateAlertConfigRoutePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.GroupBy) { + toSerialize["groupBy"] = o.GroupBy + } + if !IsNil(o.GroupInterval) { + toSerialize["groupInterval"] = o.GroupInterval + } + if !IsNil(o.GroupWait) { + toSerialize["groupWait"] = o.GroupWait + } + if !IsNil(o.Match) { + toSerialize["match"] = o.Match + } + if !IsNil(o.MatchRe) { + toSerialize["matchRe"] = o.MatchRe + } + if !IsNil(o.Matchers) { + toSerialize["matchers"] = o.Matchers + } + toSerialize["receiver"] = o.Receiver + if !IsNil(o.RepeatInterval) { + toSerialize["repeatInterval"] = o.RepeatInterval + } + if !IsNil(o.Routes) { + toSerialize["routes"] = o.Routes + } + return toSerialize, nil +} + +type NullableCreateAlertConfigRoutePayload struct { + value *CreateAlertConfigRoutePayload + isSet bool +} + +func (v NullableCreateAlertConfigRoutePayload) Get() *CreateAlertConfigRoutePayload { + return v.value +} + +func (v *NullableCreateAlertConfigRoutePayload) Set(val *CreateAlertConfigRoutePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAlertConfigRoutePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAlertConfigRoutePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAlertConfigRoutePayload(val *CreateAlertConfigRoutePayload) *NullableCreateAlertConfigRoutePayload { + return &NullableCreateAlertConfigRoutePayload{value: val, isSet: true} +} + +func (v NullableCreateAlertConfigRoutePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAlertConfigRoutePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_alert_config_route_payload_routes_inner.go b/services/observability/model_create_alert_config_route_payload_routes_inner.go index e17392810..d382cb0a4 100644 --- a/services/observability/model_create_alert_config_route_payload_routes_inner.go +++ b/services/observability/model_create_alert_config_route_payload_routes_inner.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateAlertConfigRoutePayloadRoutesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateAlertConfigRoutePayloadRoutesInner{} + // CreateAlertConfigRoutePayloadRoutesInner As in one level above type CreateAlertConfigRoutePayloadRoutesInner struct { GroupBy *[]string `json:"groupBy,omitempty"` @@ -28,3 +35,341 @@ type CreateAlertConfigRoutePayloadRoutesInner struct { // Another child routes Routes *[]map[string]interface{} `json:"routes,omitempty"` } + +// NewCreateAlertConfigRoutePayloadRoutesInner instantiates a new CreateAlertConfigRoutePayloadRoutesInner 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 NewCreateAlertConfigRoutePayloadRoutesInner() *CreateAlertConfigRoutePayloadRoutesInner { + this := CreateAlertConfigRoutePayloadRoutesInner{} + return &this +} + +// NewCreateAlertConfigRoutePayloadRoutesInnerWithDefaults instantiates a new CreateAlertConfigRoutePayloadRoutesInner 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 NewCreateAlertConfigRoutePayloadRoutesInnerWithDefaults() *CreateAlertConfigRoutePayloadRoutesInner { + this := CreateAlertConfigRoutePayloadRoutesInner{} + return &this +} + +// GetGroupBy returns the GroupBy field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupBy() *[]string { + if o == nil || IsNil(o.GroupBy) { + var ret *[]string + return ret + } + return o.GroupBy +} + +// 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 *CreateAlertConfigRoutePayloadRoutesInner) GetGroupByOk() (*[]string, bool) { + if o == nil || IsNil(o.GroupBy) { + return nil, false + } + return o.GroupBy, true +} + +// HasGroupBy returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayloadRoutesInner) HasGroupBy() bool { + if o != nil && !IsNil(o.GroupBy) { + return true + } + + return false +} + +// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetGroupBy(v *[]string) { + o.GroupBy = v +} + +// GetGroupInterval returns the GroupInterval field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupInterval() *string { + if o == nil || IsNil(o.GroupInterval) { + var ret *string + return ret + } + return o.GroupInterval +} + +// 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 *CreateAlertConfigRoutePayloadRoutesInner) GetGroupIntervalOk() (*string, bool) { + if o == nil || IsNil(o.GroupInterval) { + return nil, false + } + return o.GroupInterval, true +} + +// HasGroupInterval returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayloadRoutesInner) HasGroupInterval() bool { + if o != nil && !IsNil(o.GroupInterval) { + return true + } + + return false +} + +// SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetGroupInterval(v *string) { + o.GroupInterval = v +} + +// GetGroupWait returns the GroupWait field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupWait() *string { + if o == nil || IsNil(o.GroupWait) { + var ret *string + return ret + } + return o.GroupWait +} + +// 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 *CreateAlertConfigRoutePayloadRoutesInner) GetGroupWaitOk() (*string, bool) { + if o == nil || IsNil(o.GroupWait) { + return nil, false + } + return o.GroupWait, true +} + +// HasGroupWait returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayloadRoutesInner) HasGroupWait() bool { + if o != nil && !IsNil(o.GroupWait) { + return true + } + + return false +} + +// SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetGroupWait(v *string) { + o.GroupWait = v +} + +// GetMatch returns the Match field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetMatch() *map[string]interface{} { + if o == nil || IsNil(o.Match) { + var ret *map[string]interface{} + return ret + } + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetMatchOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Match) { + return &map[string]interface{}{}, false + } + return o.Match, true +} + +// HasMatch returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayloadRoutesInner) HasMatch() bool { + if o != nil && !IsNil(o.Match) { + return true + } + + return false +} + +// SetMatch gets a reference to the given map[string]interface{} and assigns it to the Match field. +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetMatch(v *map[string]interface{}) { + o.Match = v +} + +// GetMatchRe returns the MatchRe field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetMatchRe() *map[string]interface{} { + if o == nil || IsNil(o.MatchRe) { + var ret *map[string]interface{} + return ret + } + return o.MatchRe +} + +// GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetMatchReOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.MatchRe) { + return &map[string]interface{}{}, false + } + return o.MatchRe, true +} + +// HasMatchRe returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayloadRoutesInner) HasMatchRe() bool { + if o != nil && !IsNil(o.MatchRe) { + return true + } + + return false +} + +// SetMatchRe gets a reference to the given map[string]interface{} and assigns it to the MatchRe field. +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetMatchRe(v *map[string]interface{}) { + o.MatchRe = v +} + +// GetReceiver returns the Receiver field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetReceiver() *string { + if o == nil || IsNil(o.Receiver) { + var ret *string + return ret + } + return o.Receiver +} + +// 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 *CreateAlertConfigRoutePayloadRoutesInner) GetReceiverOk() (*string, bool) { + if o == nil || IsNil(o.Receiver) { + return nil, false + } + return o.Receiver, true +} + +// HasReceiver returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayloadRoutesInner) HasReceiver() bool { + if o != nil && !IsNil(o.Receiver) { + return true + } + + return false +} + +// SetReceiver gets a reference to the given string and assigns it to the Receiver field. +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetReceiver(v *string) { + o.Receiver = v +} + +// GetRepeatInterval returns the RepeatInterval field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetRepeatInterval() *string { + if o == nil || IsNil(o.RepeatInterval) { + var ret *string + return ret + } + return o.RepeatInterval +} + +// 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 *CreateAlertConfigRoutePayloadRoutesInner) GetRepeatIntervalOk() (*string, bool) { + if o == nil || IsNil(o.RepeatInterval) { + return nil, false + } + return o.RepeatInterval, true +} + +// HasRepeatInterval returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayloadRoutesInner) HasRepeatInterval() bool { + if o != nil && !IsNil(o.RepeatInterval) { + return true + } + + return false +} + +// SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetRepeatInterval(v *string) { + o.RepeatInterval = v +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetRoutes() *[]map[string]interface{} { + if o == nil || IsNil(o.Routes) { + var ret *[]map[string]interface{} + return ret + } + return o.Routes +} + +// 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 *CreateAlertConfigRoutePayloadRoutesInner) GetRoutesOk() (*[]map[string]interface{}, bool) { + if o == nil || IsNil(o.Routes) { + return nil, false + } + return o.Routes, true +} + +// HasRoutes returns a boolean if a field has been set. +func (o *CreateAlertConfigRoutePayloadRoutesInner) HasRoutes() bool { + if o != nil && !IsNil(o.Routes) { + return true + } + + return false +} + +// SetRoutes gets a reference to the given []map[string]interface{} and assigns it to the Routes field. +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetRoutes(v *[]map[string]interface{}) { + o.Routes = v +} + +func (o CreateAlertConfigRoutePayloadRoutesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.GroupBy) { + toSerialize["groupBy"] = o.GroupBy + } + if !IsNil(o.GroupInterval) { + toSerialize["groupInterval"] = o.GroupInterval + } + if !IsNil(o.GroupWait) { + toSerialize["groupWait"] = o.GroupWait + } + if !IsNil(o.Match) { + toSerialize["match"] = o.Match + } + if !IsNil(o.MatchRe) { + toSerialize["matchRe"] = o.MatchRe + } + if !IsNil(o.Receiver) { + toSerialize["receiver"] = o.Receiver + } + if !IsNil(o.RepeatInterval) { + toSerialize["repeatInterval"] = o.RepeatInterval + } + if !IsNil(o.Routes) { + toSerialize["routes"] = o.Routes + } + return toSerialize, nil +} + +type NullableCreateAlertConfigRoutePayloadRoutesInner struct { + value *CreateAlertConfigRoutePayloadRoutesInner + isSet bool +} + +func (v NullableCreateAlertConfigRoutePayloadRoutesInner) Get() *CreateAlertConfigRoutePayloadRoutesInner { + return v.value +} + +func (v *NullableCreateAlertConfigRoutePayloadRoutesInner) Set(val *CreateAlertConfigRoutePayloadRoutesInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAlertConfigRoutePayloadRoutesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAlertConfigRoutePayloadRoutesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAlertConfigRoutePayloadRoutesInner(val *CreateAlertConfigRoutePayloadRoutesInner) *NullableCreateAlertConfigRoutePayloadRoutesInner { + return &NullableCreateAlertConfigRoutePayloadRoutesInner{value: val, isSet: true} +} + +func (v NullableCreateAlertConfigRoutePayloadRoutesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAlertConfigRoutePayloadRoutesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_credentials_response.go b/services/observability/model_create_credentials_response.go index 7ee6bab52..564722ff7 100644 --- a/services/observability/model_create_credentials_response.go +++ b/services/observability/model_create_credentials_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCredentialsResponse{} + // CreateCredentialsResponse struct for CreateCredentialsResponse type CreateCredentialsResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type CreateCredentialsResponse struct { // REQUIRED Message *string `json:"message"` } + +type _CreateCredentialsResponse CreateCredentialsResponse + +// NewCreateCredentialsResponse instantiates a new CreateCredentialsResponse 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 NewCreateCredentialsResponse(credentials *Credentials, message *string) *CreateCredentialsResponse { + this := CreateCredentialsResponse{} + this.Credentials = credentials + this.Message = message + return &this +} + +// NewCreateCredentialsResponseWithDefaults instantiates a new CreateCredentialsResponse 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 NewCreateCredentialsResponseWithDefaults() *CreateCredentialsResponse { + this := CreateCredentialsResponse{} + return &this +} + +// GetCredentials returns the Credentials field value +func (o *CreateCredentialsResponse) GetCredentials() *Credentials { + if o == nil { + var ret *Credentials + return ret + } + + return o.Credentials +} + +// GetCredentialsOk returns a tuple with the Credentials field value +// and a boolean to check if the value has been set. +func (o *CreateCredentialsResponse) GetCredentialsOk() (*Credentials, bool) { + if o == nil { + return nil, false + } + return o.Credentials, true +} + +// SetCredentials sets field value +func (o *CreateCredentialsResponse) SetCredentials(v *Credentials) { + o.Credentials = v +} + +// GetMessage returns the Message field value +func (o *CreateCredentialsResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *CreateCredentialsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *CreateCredentialsResponse) SetMessage(v *string) { + o.Message = v +} + +func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["credentials"] = o.Credentials + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableCreateCredentialsResponse struct { + value *CreateCredentialsResponse + isSet bool +} + +func (v NullableCreateCredentialsResponse) Get() *CreateCredentialsResponse { + return v.value +} + +func (v *NullableCreateCredentialsResponse) Set(val *CreateCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCredentialsResponse(val *CreateCredentialsResponse) *NullableCreateCredentialsResponse { + return &NullableCreateCredentialsResponse{value: val, isSet: true} +} + +func (v NullableCreateCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_instance_payload.go b/services/observability/model_create_instance_payload.go index f23d36e35..39383c845 100644 --- a/services/observability/model_create_instance_payload.go +++ b/services/observability/model_create_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayload{} + // CreateInstancePayload Create update instance body. type CreateInstancePayload struct { // Name of the service @@ -20,3 +27,159 @@ type CreateInstancePayload struct { // REQUIRED PlanId *string `json:"planId"` } + +type _CreateInstancePayload CreateInstancePayload + +// NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(planId *string) *CreateInstancePayload { + this := CreateInstancePayload{} + this.PlanId = planId + return &this +} + +// NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { + this := CreateInstancePayload{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateInstancePayload) SetName(v *string) { + o.Name = v +} + +// GetParameter returns the Parameter field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetParameter() *map[string]interface{} { + if o == nil || IsNil(o.Parameter) { + var ret *map[string]interface{} + return ret + } + return o.Parameter +} + +// GetParameterOk returns a tuple with the Parameter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetParameterOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Parameter) { + return &map[string]interface{}{}, false + } + return o.Parameter, true +} + +// HasParameter returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasParameter() bool { + if o != nil && !IsNil(o.Parameter) { + return true + } + + return false +} + +// SetParameter gets a reference to the given map[string]interface{} and assigns it to the Parameter field. +func (o *CreateInstancePayload) SetParameter(v *map[string]interface{}) { + o.Parameter = v +} + +// GetPlanId returns the PlanId field value +func (o *CreateInstancePayload) GetPlanId() *string { + if o == nil { + var ret *string + return ret + } + + return o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetPlanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PlanId, true +} + +// SetPlanId sets field value +func (o *CreateInstancePayload) SetPlanId(v *string) { + o.PlanId = v +} + +func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameter) { + toSerialize["parameter"] = o.Parameter + } + toSerialize["planId"] = o.PlanId + return toSerialize, nil +} + +type NullableCreateInstancePayload struct { + value *CreateInstancePayload + isSet bool +} + +func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { + return v.value +} + +func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { + return &NullableCreateInstancePayload{value: val, isSet: true} +} + +func (v NullableCreateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_instance_response.go b/services/observability/model_create_instance_response.go index 94faf165e..5c10a66ed 100644 --- a/services/observability/model_create_instance_response.go +++ b/services/observability/model_create_instance_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstanceResponse{} + // CreateInstanceResponse struct for CreateInstanceResponse type CreateInstanceResponse struct { // REQUIRED @@ -19,3 +26,141 @@ type CreateInstanceResponse struct { // REQUIRED Message *string `json:"message"` } + +type _CreateInstanceResponse CreateInstanceResponse + +// NewCreateInstanceResponse instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponse(dashboardUrl *string, instanceId *string, message *string) *CreateInstanceResponse { + this := CreateInstanceResponse{} + this.DashboardUrl = dashboardUrl + this.InstanceId = instanceId + this.Message = message + return &this +} + +// NewCreateInstanceResponseWithDefaults instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { + this := CreateInstanceResponse{} + return &this +} + +// GetDashboardUrl returns the DashboardUrl field value +func (o *CreateInstanceResponse) GetDashboardUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.DashboardUrl +} + +// GetDashboardUrlOk returns a tuple with the DashboardUrl field value +// and a boolean to check if the value has been set. +func (o *CreateInstanceResponse) GetDashboardUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DashboardUrl, true +} + +// SetDashboardUrl sets field value +func (o *CreateInstanceResponse) SetDashboardUrl(v *string) { + o.DashboardUrl = v +} + +// GetInstanceId returns the InstanceId field value +func (o *CreateInstanceResponse) GetInstanceId() *string { + if o == nil { + var ret *string + return ret + } + + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value +// and a boolean to check if the value has been set. +func (o *CreateInstanceResponse) GetInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.InstanceId, true +} + +// SetInstanceId sets field value +func (o *CreateInstanceResponse) SetInstanceId(v *string) { + o.InstanceId = v +} + +// GetMessage returns the Message field value +func (o *CreateInstanceResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *CreateInstanceResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *CreateInstanceResponse) SetMessage(v *string) { + o.Message = v +} + +func (o CreateInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dashboardUrl"] = o.DashboardUrl + toSerialize["instanceId"] = o.InstanceId + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableCreateInstanceResponse struct { + value *CreateInstanceResponse + isSet bool +} + +func (v NullableCreateInstanceResponse) Get() *CreateInstanceResponse { + return v.value +} + +func (v *NullableCreateInstanceResponse) Set(val *CreateInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstanceResponse(val *CreateInstanceResponse) *NullableCreateInstanceResponse { + return &NullableCreateInstanceResponse{value: val, isSet: true} +} + +func (v NullableCreateInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_scrape_config_payload.go b/services/observability/model_create_scrape_config_payload.go index 9c1a5157c..696233f4b 100644 --- a/services/observability/model_create_scrape_config_payload.go +++ b/services/observability/model_create_scrape_config_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateScrapeConfigPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateScrapeConfigPayload{} + // CreateScrapeConfigPayload struct for CreateScrapeConfigPayload type CreateScrapeConfigPayload struct { BasicAuth *CreateScrapeConfigPayloadBasicAuth `json:"basicAuth,omitempty"` @@ -47,3 +54,590 @@ type CreateScrapeConfigPayload struct { StaticConfigs *[]CreateScrapeConfigPayloadStaticConfigsInner `json:"staticConfigs"` TlsConfig *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig `json:"tlsConfig,omitempty"` } + +type _CreateScrapeConfigPayload CreateScrapeConfigPayload + +// NewCreateScrapeConfigPayload instantiates a new CreateScrapeConfigPayload 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 NewCreateScrapeConfigPayload(jobName *string, scheme *string, scrapeInterval *string, scrapeTimeout *string, staticConfigs *[]CreateScrapeConfigPayloadStaticConfigsInner) *CreateScrapeConfigPayload { + this := CreateScrapeConfigPayload{} + var honorLabels bool = false + this.HonorLabels = &honorLabels + var honorTimeStamps bool = false + this.HonorTimeStamps = &honorTimeStamps + this.JobName = jobName + var metricsPath string = "/metrics" + this.MetricsPath = &metricsPath + this.Scheme = scheme + this.ScrapeInterval = scrapeInterval + this.ScrapeTimeout = scrapeTimeout + this.StaticConfigs = staticConfigs + return &this +} + +// NewCreateScrapeConfigPayloadWithDefaults instantiates a new CreateScrapeConfigPayload 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 NewCreateScrapeConfigPayloadWithDefaults() *CreateScrapeConfigPayload { + this := CreateScrapeConfigPayload{} + var honorLabels bool = false + this.HonorLabels = &honorLabels + var honorTimeStamps bool = false + this.HonorTimeStamps = &honorTimeStamps + var metricsPath string = "/metrics" + this.MetricsPath = &metricsPath + return &this +} + +// GetBasicAuth returns the BasicAuth field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetBasicAuth() *CreateScrapeConfigPayloadBasicAuth { + if o == nil || IsNil(o.BasicAuth) { + var ret *CreateScrapeConfigPayloadBasicAuth + return ret + } + return o.BasicAuth +} + +// GetBasicAuthOk returns a tuple with the BasicAuth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetBasicAuthOk() (*CreateScrapeConfigPayloadBasicAuth, bool) { + if o == nil || IsNil(o.BasicAuth) { + return nil, false + } + return o.BasicAuth, true +} + +// HasBasicAuth returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasBasicAuth() bool { + if o != nil && !IsNil(o.BasicAuth) { + return true + } + + return false +} + +// SetBasicAuth gets a reference to the given CreateScrapeConfigPayloadBasicAuth and assigns it to the BasicAuth field. +func (o *CreateScrapeConfigPayload) SetBasicAuth(v *CreateScrapeConfigPayloadBasicAuth) { + o.BasicAuth = v +} + +// GetBearerToken returns the BearerToken field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetBearerToken() *string { + if o == nil || IsNil(o.BearerToken) { + var ret *string + return ret + } + return o.BearerToken +} + +// GetBearerTokenOk returns a tuple with the BearerToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetBearerTokenOk() (*string, bool) { + if o == nil || IsNil(o.BearerToken) { + return nil, false + } + return o.BearerToken, true +} + +// HasBearerToken returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasBearerToken() bool { + if o != nil && !IsNil(o.BearerToken) { + return true + } + + return false +} + +// SetBearerToken gets a reference to the given string and assigns it to the BearerToken field. +func (o *CreateScrapeConfigPayload) SetBearerToken(v *string) { + o.BearerToken = v +} + +// GetHonorLabels returns the HonorLabels field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetHonorLabels() *bool { + if o == nil || IsNil(o.HonorLabels) { + var ret *bool + return ret + } + return o.HonorLabels +} + +// GetHonorLabelsOk returns a tuple with the HonorLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetHonorLabelsOk() (*bool, bool) { + if o == nil || IsNil(o.HonorLabels) { + return nil, false + } + return o.HonorLabels, true +} + +// HasHonorLabels returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasHonorLabels() bool { + if o != nil && !IsNil(o.HonorLabels) { + return true + } + + return false +} + +// SetHonorLabels gets a reference to the given bool and assigns it to the HonorLabels field. +func (o *CreateScrapeConfigPayload) SetHonorLabels(v *bool) { + o.HonorLabels = v +} + +// GetHonorTimeStamps returns the HonorTimeStamps field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetHonorTimeStamps() *bool { + if o == nil || IsNil(o.HonorTimeStamps) { + var ret *bool + return ret + } + return o.HonorTimeStamps +} + +// GetHonorTimeStampsOk returns a tuple with the HonorTimeStamps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetHonorTimeStampsOk() (*bool, bool) { + if o == nil || IsNil(o.HonorTimeStamps) { + return nil, false + } + return o.HonorTimeStamps, true +} + +// HasHonorTimeStamps returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasHonorTimeStamps() bool { + if o != nil && !IsNil(o.HonorTimeStamps) { + return true + } + + return false +} + +// SetHonorTimeStamps gets a reference to the given bool and assigns it to the HonorTimeStamps field. +func (o *CreateScrapeConfigPayload) SetHonorTimeStamps(v *bool) { + o.HonorTimeStamps = v +} + +// GetHttpSdConfigs returns the HttpSdConfigs field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetHttpSdConfigs() *[]CreateScrapeConfigPayloadHttpSdConfigsInner { + if o == nil || IsNil(o.HttpSdConfigs) { + var ret *[]CreateScrapeConfigPayloadHttpSdConfigsInner + return ret + } + return o.HttpSdConfigs +} + +// GetHttpSdConfigsOk returns a tuple with the HttpSdConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetHttpSdConfigsOk() (*[]CreateScrapeConfigPayloadHttpSdConfigsInner, bool) { + if o == nil || IsNil(o.HttpSdConfigs) { + return nil, false + } + return o.HttpSdConfigs, true +} + +// HasHttpSdConfigs returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasHttpSdConfigs() bool { + if o != nil && !IsNil(o.HttpSdConfigs) { + return true + } + + return false +} + +// SetHttpSdConfigs gets a reference to the given []CreateScrapeConfigPayloadHttpSdConfigsInner and assigns it to the HttpSdConfigs field. +func (o *CreateScrapeConfigPayload) SetHttpSdConfigs(v *[]CreateScrapeConfigPayloadHttpSdConfigsInner) { + o.HttpSdConfigs = v +} + +// GetJobName returns the JobName field value +func (o *CreateScrapeConfigPayload) GetJobName() *string { + if o == nil { + var ret *string + return ret + } + + return o.JobName +} + +// GetJobNameOk returns a tuple with the JobName field value +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetJobNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.JobName, true +} + +// SetJobName sets field value +func (o *CreateScrapeConfigPayload) SetJobName(v *string) { + o.JobName = v +} + +// GetMetricsPath returns the MetricsPath field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetMetricsPath() *string { + if o == nil || IsNil(o.MetricsPath) { + var ret *string + return ret + } + return o.MetricsPath +} + +// GetMetricsPathOk returns a tuple with the MetricsPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetMetricsPathOk() (*string, bool) { + if o == nil || IsNil(o.MetricsPath) { + return nil, false + } + return o.MetricsPath, true +} + +// HasMetricsPath returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasMetricsPath() bool { + if o != nil && !IsNil(o.MetricsPath) { + return true + } + + return false +} + +// SetMetricsPath gets a reference to the given string and assigns it to the MetricsPath field. +func (o *CreateScrapeConfigPayload) SetMetricsPath(v *string) { + o.MetricsPath = v +} + +// GetMetricsRelabelConfigs returns the MetricsRelabelConfigs field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetMetricsRelabelConfigs() *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner { + if o == nil || IsNil(o.MetricsRelabelConfigs) { + var ret *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner + return ret + } + return o.MetricsRelabelConfigs +} + +// GetMetricsRelabelConfigsOk returns a tuple with the MetricsRelabelConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetMetricsRelabelConfigsOk() (*[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner, bool) { + if o == nil || IsNil(o.MetricsRelabelConfigs) { + return nil, false + } + return o.MetricsRelabelConfigs, true +} + +// HasMetricsRelabelConfigs returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasMetricsRelabelConfigs() bool { + if o != nil && !IsNil(o.MetricsRelabelConfigs) { + return true + } + + return false +} + +// SetMetricsRelabelConfigs gets a reference to the given []CreateScrapeConfigPayloadMetricsRelabelConfigsInner and assigns it to the MetricsRelabelConfigs field. +func (o *CreateScrapeConfigPayload) SetMetricsRelabelConfigs(v *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner) { + o.MetricsRelabelConfigs = v +} + +// GetOauth2 returns the Oauth2 field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetOauth2() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 { + if o == nil || IsNil(o.Oauth2) { + var ret *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 + return ret + } + return o.Oauth2 +} + +// GetOauth2Ok returns a tuple with the Oauth2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetOauth2Ok() (*CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2, bool) { + if o == nil || IsNil(o.Oauth2) { + return nil, false + } + return o.Oauth2, true +} + +// HasOauth2 returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasOauth2() bool { + if o != nil && !IsNil(o.Oauth2) { + return true + } + + return false +} + +// SetOauth2 gets a reference to the given CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 and assigns it to the Oauth2 field. +func (o *CreateScrapeConfigPayload) SetOauth2(v *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) { + o.Oauth2 = v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetParams() *map[string]interface{} { + if o == nil || IsNil(o.Params) { + var ret *map[string]interface{} + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetParamsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Params) { + return &map[string]interface{}{}, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]interface{} and assigns it to the Params field. +func (o *CreateScrapeConfigPayload) SetParams(v *map[string]interface{}) { + o.Params = v +} + +// GetSampleLimit returns the SampleLimit field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetSampleLimit() *float64 { + if o == nil || IsNil(o.SampleLimit) { + var ret *float64 + return ret + } + return o.SampleLimit +} + +// GetSampleLimitOk returns a tuple with the SampleLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetSampleLimitOk() (*float64, bool) { + if o == nil || IsNil(o.SampleLimit) { + return nil, false + } + return o.SampleLimit, true +} + +// HasSampleLimit returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasSampleLimit() bool { + if o != nil && !IsNil(o.SampleLimit) { + return true + } + + return false +} + +// SetSampleLimit gets a reference to the given float64 and assigns it to the SampleLimit field. +func (o *CreateScrapeConfigPayload) SetSampleLimit(v *float64) { + o.SampleLimit = v +} + +// GetScheme returns the Scheme field value +func (o *CreateScrapeConfigPayload) GetScheme() *string { + if o == nil { + var ret *string + return ret + } + + return o.Scheme +} + +// GetSchemeOk returns a tuple with the Scheme field value +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetSchemeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Scheme, true +} + +// SetScheme sets field value +func (o *CreateScrapeConfigPayload) SetScheme(v *string) { + o.Scheme = v +} + +// GetScrapeInterval returns the ScrapeInterval field value +func (o *CreateScrapeConfigPayload) GetScrapeInterval() *string { + if o == nil { + var ret *string + return ret + } + + return o.ScrapeInterval +} + +// GetScrapeIntervalOk returns a tuple with the ScrapeInterval field value +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetScrapeIntervalOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ScrapeInterval, true +} + +// SetScrapeInterval sets field value +func (o *CreateScrapeConfigPayload) SetScrapeInterval(v *string) { + o.ScrapeInterval = v +} + +// GetScrapeTimeout returns the ScrapeTimeout field value +func (o *CreateScrapeConfigPayload) GetScrapeTimeout() *string { + if o == nil { + var ret *string + return ret + } + + return o.ScrapeTimeout +} + +// GetScrapeTimeoutOk returns a tuple with the ScrapeTimeout field value +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetScrapeTimeoutOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ScrapeTimeout, true +} + +// SetScrapeTimeout sets field value +func (o *CreateScrapeConfigPayload) SetScrapeTimeout(v *string) { + o.ScrapeTimeout = v +} + +// GetStaticConfigs returns the StaticConfigs field value +func (o *CreateScrapeConfigPayload) GetStaticConfigs() *[]CreateScrapeConfigPayloadStaticConfigsInner { + if o == nil { + var ret *[]CreateScrapeConfigPayloadStaticConfigsInner + return ret + } + + return o.StaticConfigs +} + +// GetStaticConfigsOk returns a tuple with the StaticConfigs field value +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetStaticConfigsOk() (*[]CreateScrapeConfigPayloadStaticConfigsInner, bool) { + if o == nil { + return nil, false + } + return o.StaticConfigs, true +} + +// SetStaticConfigs sets field value +func (o *CreateScrapeConfigPayload) SetStaticConfigs(v *[]CreateScrapeConfigPayloadStaticConfigsInner) { + o.StaticConfigs = v +} + +// GetTlsConfig returns the TlsConfig field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayload) GetTlsConfig() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig { + if o == nil || IsNil(o.TlsConfig) { + var ret *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig + return ret + } + return o.TlsConfig +} + +// GetTlsConfigOk returns a tuple with the TlsConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayload) GetTlsConfigOk() (*CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig, bool) { + if o == nil || IsNil(o.TlsConfig) { + return nil, false + } + return o.TlsConfig, true +} + +// HasTlsConfig returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayload) HasTlsConfig() bool { + if o != nil && !IsNil(o.TlsConfig) { + return true + } + + return false +} + +// SetTlsConfig gets a reference to the given CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig and assigns it to the TlsConfig field. +func (o *CreateScrapeConfigPayload) SetTlsConfig(v *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) { + o.TlsConfig = v +} + +func (o CreateScrapeConfigPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasicAuth) { + toSerialize["basicAuth"] = o.BasicAuth + } + if !IsNil(o.BearerToken) { + toSerialize["bearerToken"] = o.BearerToken + } + if !IsNil(o.HonorLabels) { + toSerialize["honorLabels"] = o.HonorLabels + } + if !IsNil(o.HonorTimeStamps) { + toSerialize["honorTimeStamps"] = o.HonorTimeStamps + } + if !IsNil(o.HttpSdConfigs) { + toSerialize["httpSdConfigs"] = o.HttpSdConfigs + } + toSerialize["jobName"] = o.JobName + if !IsNil(o.MetricsPath) { + toSerialize["metricsPath"] = o.MetricsPath + } + if !IsNil(o.MetricsRelabelConfigs) { + toSerialize["metricsRelabelConfigs"] = o.MetricsRelabelConfigs + } + if !IsNil(o.Oauth2) { + toSerialize["oauth2"] = o.Oauth2 + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.SampleLimit) { + toSerialize["sampleLimit"] = o.SampleLimit + } + toSerialize["scheme"] = o.Scheme + toSerialize["scrapeInterval"] = o.ScrapeInterval + toSerialize["scrapeTimeout"] = o.ScrapeTimeout + toSerialize["staticConfigs"] = o.StaticConfigs + if !IsNil(o.TlsConfig) { + toSerialize["tlsConfig"] = o.TlsConfig + } + return toSerialize, nil +} + +type NullableCreateScrapeConfigPayload struct { + value *CreateScrapeConfigPayload + isSet bool +} + +func (v NullableCreateScrapeConfigPayload) Get() *CreateScrapeConfigPayload { + return v.value +} + +func (v *NullableCreateScrapeConfigPayload) Set(val *CreateScrapeConfigPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateScrapeConfigPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateScrapeConfigPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateScrapeConfigPayload(val *CreateScrapeConfigPayload) *NullableCreateScrapeConfigPayload { + return &NullableCreateScrapeConfigPayload{value: val, isSet: true} +} + +func (v NullableCreateScrapeConfigPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateScrapeConfigPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_scrape_config_payload_basic_auth.go b/services/observability/model_create_scrape_config_payload_basic_auth.go index 0da0a7f47..b0c02403f 100644 --- a/services/observability/model_create_scrape_config_payload_basic_auth.go +++ b/services/observability/model_create_scrape_config_payload_basic_auth.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateScrapeConfigPayloadBasicAuth type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateScrapeConfigPayloadBasicAuth{} + // CreateScrapeConfigPayloadBasicAuth Sets the 'Authorization' header on every scrape request with the configured username and password. `Additional Validators:` * if basicAuth is in the body no other authentication method should be in the body type CreateScrapeConfigPayloadBasicAuth struct { // password @@ -17,3 +24,131 @@ type CreateScrapeConfigPayloadBasicAuth struct { // username Username *string `json:"username,omitempty"` } + +// NewCreateScrapeConfigPayloadBasicAuth instantiates a new CreateScrapeConfigPayloadBasicAuth 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 NewCreateScrapeConfigPayloadBasicAuth() *CreateScrapeConfigPayloadBasicAuth { + this := CreateScrapeConfigPayloadBasicAuth{} + return &this +} + +// NewCreateScrapeConfigPayloadBasicAuthWithDefaults instantiates a new CreateScrapeConfigPayloadBasicAuth 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 NewCreateScrapeConfigPayloadBasicAuthWithDefaults() *CreateScrapeConfigPayloadBasicAuth { + this := CreateScrapeConfigPayloadBasicAuth{} + return &this +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadBasicAuth) GetPassword() *string { + if o == nil || IsNil(o.Password) { + var ret *string + return ret + } + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadBasicAuth) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadBasicAuth) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *CreateScrapeConfigPayloadBasicAuth) SetPassword(v *string) { + o.Password = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadBasicAuth) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadBasicAuth) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadBasicAuth) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CreateScrapeConfigPayloadBasicAuth) SetUsername(v *string) { + o.Username = v +} + +func (o CreateScrapeConfigPayloadBasicAuth) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableCreateScrapeConfigPayloadBasicAuth struct { + value *CreateScrapeConfigPayloadBasicAuth + isSet bool +} + +func (v NullableCreateScrapeConfigPayloadBasicAuth) Get() *CreateScrapeConfigPayloadBasicAuth { + return v.value +} + +func (v *NullableCreateScrapeConfigPayloadBasicAuth) Set(val *CreateScrapeConfigPayloadBasicAuth) { + v.value = val + v.isSet = true +} + +func (v NullableCreateScrapeConfigPayloadBasicAuth) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateScrapeConfigPayloadBasicAuth) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateScrapeConfigPayloadBasicAuth(val *CreateScrapeConfigPayloadBasicAuth) *NullableCreateScrapeConfigPayloadBasicAuth { + return &NullableCreateScrapeConfigPayloadBasicAuth{value: val, isSet: true} +} + +func (v NullableCreateScrapeConfigPayloadBasicAuth) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateScrapeConfigPayloadBasicAuth) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_scrape_config_payload_http_sd_configs_inner.go b/services/observability/model_create_scrape_config_payload_http_sd_configs_inner.go index 796ca265a..7d9e8eae3 100644 --- a/services/observability/model_create_scrape_config_payload_http_sd_configs_inner.go +++ b/services/observability/model_create_scrape_config_payload_http_sd_configs_inner.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateScrapeConfigPayloadHttpSdConfigsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateScrapeConfigPayloadHttpSdConfigsInner{} + // CreateScrapeConfigPayloadHttpSdConfigsInner struct for CreateScrapeConfigPayloadHttpSdConfigsInner type CreateScrapeConfigPayloadHttpSdConfigsInner struct { BasicAuth *CreateScrapeConfigPayloadBasicAuth `json:"basicAuth,omitempty"` @@ -21,3 +28,233 @@ type CreateScrapeConfigPayloadHttpSdConfigsInner struct { // REQUIRED Url *string `json:"url"` } + +type _CreateScrapeConfigPayloadHttpSdConfigsInner CreateScrapeConfigPayloadHttpSdConfigsInner + +// NewCreateScrapeConfigPayloadHttpSdConfigsInner instantiates a new CreateScrapeConfigPayloadHttpSdConfigsInner 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 NewCreateScrapeConfigPayloadHttpSdConfigsInner(url *string) *CreateScrapeConfigPayloadHttpSdConfigsInner { + this := CreateScrapeConfigPayloadHttpSdConfigsInner{} + var refreshInterval string = "60s" + this.RefreshInterval = &refreshInterval + this.Url = url + return &this +} + +// NewCreateScrapeConfigPayloadHttpSdConfigsInnerWithDefaults instantiates a new CreateScrapeConfigPayloadHttpSdConfigsInner 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 NewCreateScrapeConfigPayloadHttpSdConfigsInnerWithDefaults() *CreateScrapeConfigPayloadHttpSdConfigsInner { + this := CreateScrapeConfigPayloadHttpSdConfigsInner{} + var refreshInterval string = "60s" + this.RefreshInterval = &refreshInterval + return &this +} + +// GetBasicAuth returns the BasicAuth field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetBasicAuth() *CreateScrapeConfigPayloadBasicAuth { + if o == nil || IsNil(o.BasicAuth) { + var ret *CreateScrapeConfigPayloadBasicAuth + return ret + } + return o.BasicAuth +} + +// GetBasicAuthOk returns a tuple with the BasicAuth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetBasicAuthOk() (*CreateScrapeConfigPayloadBasicAuth, bool) { + if o == nil || IsNil(o.BasicAuth) { + return nil, false + } + return o.BasicAuth, true +} + +// HasBasicAuth returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) HasBasicAuth() bool { + if o != nil && !IsNil(o.BasicAuth) { + return true + } + + return false +} + +// SetBasicAuth gets a reference to the given CreateScrapeConfigPayloadBasicAuth and assigns it to the BasicAuth field. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetBasicAuth(v *CreateScrapeConfigPayloadBasicAuth) { + o.BasicAuth = v +} + +// GetOauth2 returns the Oauth2 field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetOauth2() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 { + if o == nil || IsNil(o.Oauth2) { + var ret *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 + return ret + } + return o.Oauth2 +} + +// GetOauth2Ok returns a tuple with the Oauth2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetOauth2Ok() (*CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2, bool) { + if o == nil || IsNil(o.Oauth2) { + return nil, false + } + return o.Oauth2, true +} + +// HasOauth2 returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) HasOauth2() bool { + if o != nil && !IsNil(o.Oauth2) { + return true + } + + return false +} + +// SetOauth2 gets a reference to the given CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 and assigns it to the Oauth2 field. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetOauth2(v *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) { + o.Oauth2 = v +} + +// GetRefreshInterval returns the RefreshInterval field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetRefreshInterval() *string { + if o == nil || IsNil(o.RefreshInterval) { + var ret *string + return ret + } + return o.RefreshInterval +} + +// GetRefreshIntervalOk returns a tuple with the RefreshInterval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetRefreshIntervalOk() (*string, bool) { + if o == nil || IsNil(o.RefreshInterval) { + return nil, false + } + return o.RefreshInterval, true +} + +// HasRefreshInterval returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) HasRefreshInterval() bool { + if o != nil && !IsNil(o.RefreshInterval) { + return true + } + + return false +} + +// SetRefreshInterval gets a reference to the given string and assigns it to the RefreshInterval field. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetRefreshInterval(v *string) { + o.RefreshInterval = v +} + +// GetTlsConfig returns the TlsConfig field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetTlsConfig() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig { + if o == nil || IsNil(o.TlsConfig) { + var ret *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig + return ret + } + return o.TlsConfig +} + +// GetTlsConfigOk returns a tuple with the TlsConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetTlsConfigOk() (*CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig, bool) { + if o == nil || IsNil(o.TlsConfig) { + return nil, false + } + return o.TlsConfig, true +} + +// HasTlsConfig returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) HasTlsConfig() bool { + if o != nil && !IsNil(o.TlsConfig) { + return true + } + + return false +} + +// SetTlsConfig gets a reference to the given CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig and assigns it to the TlsConfig field. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetTlsConfig(v *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) { + o.TlsConfig = v +} + +// GetUrl returns the Url field value +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url, true +} + +// SetUrl sets field value +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetUrl(v *string) { + o.Url = v +} + +func (o CreateScrapeConfigPayloadHttpSdConfigsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasicAuth) { + toSerialize["basicAuth"] = o.BasicAuth + } + if !IsNil(o.Oauth2) { + toSerialize["oauth2"] = o.Oauth2 + } + if !IsNil(o.RefreshInterval) { + toSerialize["refreshInterval"] = o.RefreshInterval + } + if !IsNil(o.TlsConfig) { + toSerialize["tlsConfig"] = o.TlsConfig + } + toSerialize["url"] = o.Url + return toSerialize, nil +} + +type NullableCreateScrapeConfigPayloadHttpSdConfigsInner struct { + value *CreateScrapeConfigPayloadHttpSdConfigsInner + isSet bool +} + +func (v NullableCreateScrapeConfigPayloadHttpSdConfigsInner) Get() *CreateScrapeConfigPayloadHttpSdConfigsInner { + return v.value +} + +func (v *NullableCreateScrapeConfigPayloadHttpSdConfigsInner) Set(val *CreateScrapeConfigPayloadHttpSdConfigsInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateScrapeConfigPayloadHttpSdConfigsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateScrapeConfigPayloadHttpSdConfigsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateScrapeConfigPayloadHttpSdConfigsInner(val *CreateScrapeConfigPayloadHttpSdConfigsInner) *NullableCreateScrapeConfigPayloadHttpSdConfigsInner { + return &NullableCreateScrapeConfigPayloadHttpSdConfigsInner{value: val, isSet: true} +} + +func (v NullableCreateScrapeConfigPayloadHttpSdConfigsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateScrapeConfigPayloadHttpSdConfigsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_scrape_config_payload_http_sd_configs_inner_oauth2.go b/services/observability/model_create_scrape_config_payload_http_sd_configs_inner_oauth2.go index 537d5b119..9a3da8c9a 100644 --- a/services/observability/model_create_scrape_config_payload_http_sd_configs_inner_oauth2.go +++ b/services/observability/model_create_scrape_config_payload_http_sd_configs_inner_oauth2.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2{} + // CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 OAuth 2.0 authentication using the client credentials grant type. Prometheus fetches an access token from the specified endpoint with the given client access and secret keys. `Additional Validators:` * if oauth2 is in the body no other authentication method should be in the body type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 struct { // clientId @@ -25,3 +32,211 @@ type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 struct { // REQUIRED TokenUrl *string `json:"tokenUrl"` } + +type _CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 + +// NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 instantiates a new CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 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 NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2(clientId *string, clientSecret *string, tokenUrl *string) *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 { + this := CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2{} + this.ClientId = clientId + this.ClientSecret = clientSecret + this.TokenUrl = tokenUrl + return &this +} + +// NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2WithDefaults instantiates a new CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 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 NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2WithDefaults() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 { + this := CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2{} + return &this +} + +// GetClientId returns the ClientId field value +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetClientId() *string { + if o == nil { + var ret *string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientId, true +} + +// SetClientId sets field value +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetClientId(v *string) { + o.ClientId = v +} + +// GetClientSecret returns the ClientSecret field value +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetClientSecret() *string { + if o == nil { + var ret *string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetClientSecret(v *string) { + o.ClientSecret = v +} + +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetScopes() *[]string { + if o == nil || IsNil(o.Scopes) { + var ret *[]string + return ret + } + return o.Scopes +} + +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetScopesOk() (*[]string, bool) { + if o == nil || IsNil(o.Scopes) { + return nil, false + } + return o.Scopes, true +} + +// HasScopes returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) HasScopes() bool { + if o != nil && !IsNil(o.Scopes) { + return true + } + + return false +} + +// SetScopes gets a reference to the given []string and assigns it to the Scopes field. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetScopes(v *[]string) { + o.Scopes = v +} + +// GetTlsConfig returns the TlsConfig field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetTlsConfig() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig { + if o == nil || IsNil(o.TlsConfig) { + var ret *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig + return ret + } + return o.TlsConfig +} + +// GetTlsConfigOk returns a tuple with the TlsConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetTlsConfigOk() (*CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig, bool) { + if o == nil || IsNil(o.TlsConfig) { + return nil, false + } + return o.TlsConfig, true +} + +// HasTlsConfig returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) HasTlsConfig() bool { + if o != nil && !IsNil(o.TlsConfig) { + return true + } + + return false +} + +// SetTlsConfig gets a reference to the given CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig and assigns it to the TlsConfig field. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetTlsConfig(v *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) { + o.TlsConfig = v +} + +// GetTokenUrl returns the TokenUrl field value +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetTokenUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.TokenUrl +} + +// GetTokenUrlOk returns a tuple with the TokenUrl field value +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetTokenUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TokenUrl, true +} + +// SetTokenUrl sets field value +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetTokenUrl(v *string) { + o.TokenUrl = v +} + +func (o CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["clientId"] = o.ClientId + toSerialize["clientSecret"] = o.ClientSecret + if !IsNil(o.Scopes) { + toSerialize["scopes"] = o.Scopes + } + if !IsNil(o.TlsConfig) { + toSerialize["tlsConfig"] = o.TlsConfig + } + toSerialize["tokenUrl"] = o.TokenUrl + return toSerialize, nil +} + +type NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 struct { + value *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 + isSet bool +} + +func (v NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) Get() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 { + return v.value +} + +func (v *NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) Set(val *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) { + v.value = val + v.isSet = true +} + +func (v NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2(val *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) *NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 { + return &NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2{value: val, isSet: true} +} + +func (v NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_scrape_config_payload_http_sd_configs_inner_oauth2_tls_config.go b/services/observability/model_create_scrape_config_payload_http_sd_configs_inner_oauth2_tls_config.go index 138dccd46..c3a2c03a9 100644 --- a/services/observability/model_create_scrape_config_payload_http_sd_configs_inner_oauth2_tls_config.go +++ b/services/observability/model_create_scrape_config_payload_http_sd_configs_inner_oauth2_tls_config.go @@ -10,8 +10,112 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig{} + // CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig Configures the scrape request's TLS settings. type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig struct { // Disable validation of the server certificate. InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"` } + +// NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig instantiates a new CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig 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 NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig { + this := CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig{} + var insecureSkipVerify bool = false + this.InsecureSkipVerify = &insecureSkipVerify + return &this +} + +// NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfigWithDefaults instantiates a new CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig 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 NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfigWithDefaults() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig { + this := CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig{} + var insecureSkipVerify bool = false + this.InsecureSkipVerify = &insecureSkipVerify + return &this +} + +// GetInsecureSkipVerify returns the InsecureSkipVerify field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) GetInsecureSkipVerify() *bool { + if o == nil || IsNil(o.InsecureSkipVerify) { + var ret *bool + return ret + } + return o.InsecureSkipVerify +} + +// GetInsecureSkipVerifyOk returns a tuple with the InsecureSkipVerify field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) GetInsecureSkipVerifyOk() (*bool, bool) { + if o == nil || IsNil(o.InsecureSkipVerify) { + return nil, false + } + return o.InsecureSkipVerify, true +} + +// HasInsecureSkipVerify returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) HasInsecureSkipVerify() bool { + if o != nil && !IsNil(o.InsecureSkipVerify) { + return true + } + + return false +} + +// SetInsecureSkipVerify gets a reference to the given bool and assigns it to the InsecureSkipVerify field. +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) SetInsecureSkipVerify(v *bool) { + o.InsecureSkipVerify = v +} + +func (o CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.InsecureSkipVerify) { + toSerialize["insecureSkipVerify"] = o.InsecureSkipVerify + } + return toSerialize, nil +} + +type NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig struct { + value *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig + isSet bool +} + +func (v NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) Get() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig { + return v.value +} + +func (v *NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) Set(val *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) { + v.value = val + v.isSet = true +} + +func (v NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig(val *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) *NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig { + return &NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig{value: val, isSet: true} +} + +func (v NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_scrape_config_payload_metrics_relabel_configs_inner.go b/services/observability/model_create_scrape_config_payload_metrics_relabel_configs_inner.go index 7358a198e..4fdfc5b99 100644 --- a/services/observability/model_create_scrape_config_payload_metrics_relabel_configs_inner.go +++ b/services/observability/model_create_scrape_config_payload_metrics_relabel_configs_inner.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateScrapeConfigPayloadMetricsRelabelConfigsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateScrapeConfigPayloadMetricsRelabelConfigsInner{} + // CreateScrapeConfigPayloadMetricsRelabelConfigsInner struct for CreateScrapeConfigPayloadMetricsRelabelConfigsInner type CreateScrapeConfigPayloadMetricsRelabelConfigsInner struct { // Action to perform based on regex matching. `Additional Validators:` * if action is replace, targetLabel needs to be in body @@ -27,3 +34,322 @@ type CreateScrapeConfigPayloadMetricsRelabelConfigsInner struct { // Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available. TargetLabel *string `json:"targetLabel,omitempty"` } + +// NewCreateScrapeConfigPayloadMetricsRelabelConfigsInner instantiates a new CreateScrapeConfigPayloadMetricsRelabelConfigsInner 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 NewCreateScrapeConfigPayloadMetricsRelabelConfigsInner() *CreateScrapeConfigPayloadMetricsRelabelConfigsInner { + this := CreateScrapeConfigPayloadMetricsRelabelConfigsInner{} + var action string = "replace" + this.Action = &action + var regex string = ".*" + this.Regex = ®ex + var replacement string = "$1" + this.Replacement = &replacement + var separator string = ";" + this.Separator = &separator + return &this +} + +// NewCreateScrapeConfigPayloadMetricsRelabelConfigsInnerWithDefaults instantiates a new CreateScrapeConfigPayloadMetricsRelabelConfigsInner 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 NewCreateScrapeConfigPayloadMetricsRelabelConfigsInnerWithDefaults() *CreateScrapeConfigPayloadMetricsRelabelConfigsInner { + this := CreateScrapeConfigPayloadMetricsRelabelConfigsInner{} + var action string = "replace" + this.Action = &action + var regex string = ".*" + this.Regex = ®ex + var replacement string = "$1" + this.Replacement = &replacement + var separator string = ";" + this.Separator = &separator + return &this +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetAction() *string { + if o == nil || IsNil(o.Action) { + var ret *string + return ret + } + return o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetAction(v *string) { + o.Action = v +} + +// GetModulus returns the Modulus field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetModulus() *float64 { + if o == nil || IsNil(o.Modulus) { + var ret *float64 + return ret + } + return o.Modulus +} + +// GetModulusOk returns a tuple with the Modulus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetModulusOk() (*float64, bool) { + if o == nil || IsNil(o.Modulus) { + return nil, false + } + return o.Modulus, true +} + +// HasModulus returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) HasModulus() bool { + if o != nil && !IsNil(o.Modulus) { + return true + } + + return false +} + +// SetModulus gets a reference to the given float64 and assigns it to the Modulus field. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetModulus(v *float64) { + o.Modulus = v +} + +// GetRegex returns the Regex field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetRegex() *string { + if o == nil || IsNil(o.Regex) { + var ret *string + return ret + } + return o.Regex +} + +// GetRegexOk returns a tuple with the Regex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetRegexOk() (*string, bool) { + if o == nil || IsNil(o.Regex) { + return nil, false + } + return o.Regex, true +} + +// HasRegex returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) HasRegex() bool { + if o != nil && !IsNil(o.Regex) { + return true + } + + return false +} + +// SetRegex gets a reference to the given string and assigns it to the Regex field. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetRegex(v *string) { + o.Regex = v +} + +// GetReplacement returns the Replacement field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetReplacement() *string { + if o == nil || IsNil(o.Replacement) { + var ret *string + return ret + } + return o.Replacement +} + +// GetReplacementOk returns a tuple with the Replacement field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetReplacementOk() (*string, bool) { + if o == nil || IsNil(o.Replacement) { + return nil, false + } + return o.Replacement, true +} + +// HasReplacement returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) HasReplacement() bool { + if o != nil && !IsNil(o.Replacement) { + return true + } + + return false +} + +// SetReplacement gets a reference to the given string and assigns it to the Replacement field. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetReplacement(v *string) { + o.Replacement = v +} + +// GetSeparator returns the Separator field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetSeparator() *string { + if o == nil || IsNil(o.Separator) { + var ret *string + return ret + } + return o.Separator +} + +// GetSeparatorOk returns a tuple with the Separator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetSeparatorOk() (*string, bool) { + if o == nil || IsNil(o.Separator) { + return nil, false + } + return o.Separator, true +} + +// HasSeparator returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) HasSeparator() bool { + if o != nil && !IsNil(o.Separator) { + return true + } + + return false +} + +// SetSeparator gets a reference to the given string and assigns it to the Separator field. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetSeparator(v *string) { + o.Separator = v +} + +// GetSourceLabels returns the SourceLabels field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetSourceLabels() *[]string { + if o == nil || IsNil(o.SourceLabels) { + var ret *[]string + return ret + } + return o.SourceLabels +} + +// GetSourceLabelsOk returns a tuple with the SourceLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetSourceLabelsOk() (*[]string, bool) { + if o == nil || IsNil(o.SourceLabels) { + return nil, false + } + return o.SourceLabels, true +} + +// HasSourceLabels returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) HasSourceLabels() bool { + if o != nil && !IsNil(o.SourceLabels) { + return true + } + + return false +} + +// SetSourceLabels gets a reference to the given []string and assigns it to the SourceLabels field. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetSourceLabels(v *[]string) { + o.SourceLabels = v +} + +// GetTargetLabel returns the TargetLabel field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetTargetLabel() *string { + if o == nil || IsNil(o.TargetLabel) { + var ret *string + return ret + } + return o.TargetLabel +} + +// GetTargetLabelOk returns a tuple with the TargetLabel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetTargetLabelOk() (*string, bool) { + if o == nil || IsNil(o.TargetLabel) { + return nil, false + } + return o.TargetLabel, true +} + +// HasTargetLabel returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) HasTargetLabel() bool { + if o != nil && !IsNil(o.TargetLabel) { + return true + } + + return false +} + +// SetTargetLabel gets a reference to the given string and assigns it to the TargetLabel field. +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetTargetLabel(v *string) { + o.TargetLabel = v +} + +func (o CreateScrapeConfigPayloadMetricsRelabelConfigsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.Modulus) { + toSerialize["modulus"] = o.Modulus + } + if !IsNil(o.Regex) { + toSerialize["regex"] = o.Regex + } + if !IsNil(o.Replacement) { + toSerialize["replacement"] = o.Replacement + } + if !IsNil(o.Separator) { + toSerialize["separator"] = o.Separator + } + if !IsNil(o.SourceLabels) { + toSerialize["sourceLabels"] = o.SourceLabels + } + if !IsNil(o.TargetLabel) { + toSerialize["targetLabel"] = o.TargetLabel + } + return toSerialize, nil +} + +type NullableCreateScrapeConfigPayloadMetricsRelabelConfigsInner struct { + value *CreateScrapeConfigPayloadMetricsRelabelConfigsInner + isSet bool +} + +func (v NullableCreateScrapeConfigPayloadMetricsRelabelConfigsInner) Get() *CreateScrapeConfigPayloadMetricsRelabelConfigsInner { + return v.value +} + +func (v *NullableCreateScrapeConfigPayloadMetricsRelabelConfigsInner) Set(val *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateScrapeConfigPayloadMetricsRelabelConfigsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateScrapeConfigPayloadMetricsRelabelConfigsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateScrapeConfigPayloadMetricsRelabelConfigsInner(val *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) *NullableCreateScrapeConfigPayloadMetricsRelabelConfigsInner { + return &NullableCreateScrapeConfigPayloadMetricsRelabelConfigsInner{value: val, isSet: true} +} + +func (v NullableCreateScrapeConfigPayloadMetricsRelabelConfigsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateScrapeConfigPayloadMetricsRelabelConfigsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_create_scrape_config_payload_static_configs_inner.go b/services/observability/model_create_scrape_config_payload_static_configs_inner.go index 166a1aacb..5b13e08ea 100644 --- a/services/observability/model_create_scrape_config_payload_static_configs_inner.go +++ b/services/observability/model_create_scrape_config_payload_static_configs_inner.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CreateScrapeConfigPayloadStaticConfigsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateScrapeConfigPayloadStaticConfigsInner{} + // CreateScrapeConfigPayloadStaticConfigsInner struct for CreateScrapeConfigPayloadStaticConfigsInner type CreateScrapeConfigPayloadStaticConfigsInner struct { // Labels assigned to all metrics scraped from the targets. `Additional Validators:` * should not contain more than 10 keys * each key and value should not be longer than 200 characters @@ -18,3 +25,124 @@ type CreateScrapeConfigPayloadStaticConfigsInner struct { // REQUIRED Targets *[]string `json:"targets"` } + +type _CreateScrapeConfigPayloadStaticConfigsInner CreateScrapeConfigPayloadStaticConfigsInner + +// NewCreateScrapeConfigPayloadStaticConfigsInner instantiates a new CreateScrapeConfigPayloadStaticConfigsInner 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 NewCreateScrapeConfigPayloadStaticConfigsInner(targets *[]string) *CreateScrapeConfigPayloadStaticConfigsInner { + this := CreateScrapeConfigPayloadStaticConfigsInner{} + this.Targets = targets + return &this +} + +// NewCreateScrapeConfigPayloadStaticConfigsInnerWithDefaults instantiates a new CreateScrapeConfigPayloadStaticConfigsInner 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 NewCreateScrapeConfigPayloadStaticConfigsInnerWithDefaults() *CreateScrapeConfigPayloadStaticConfigsInner { + this := CreateScrapeConfigPayloadStaticConfigsInner{} + return &this +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateScrapeConfigPayloadStaticConfigsInner) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadStaticConfigsInner) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateScrapeConfigPayloadStaticConfigsInner) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *CreateScrapeConfigPayloadStaticConfigsInner) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetTargets returns the Targets field value +func (o *CreateScrapeConfigPayloadStaticConfigsInner) GetTargets() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.Targets +} + +// GetTargetsOk returns a tuple with the Targets field value +// and a boolean to check if the value has been set. +func (o *CreateScrapeConfigPayloadStaticConfigsInner) GetTargetsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.Targets, true +} + +// SetTargets sets field value +func (o *CreateScrapeConfigPayloadStaticConfigsInner) SetTargets(v *[]string) { + o.Targets = v +} + +func (o CreateScrapeConfigPayloadStaticConfigsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["targets"] = o.Targets + return toSerialize, nil +} + +type NullableCreateScrapeConfigPayloadStaticConfigsInner struct { + value *CreateScrapeConfigPayloadStaticConfigsInner + isSet bool +} + +func (v NullableCreateScrapeConfigPayloadStaticConfigsInner) Get() *CreateScrapeConfigPayloadStaticConfigsInner { + return v.value +} + +func (v *NullableCreateScrapeConfigPayloadStaticConfigsInner) Set(val *CreateScrapeConfigPayloadStaticConfigsInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateScrapeConfigPayloadStaticConfigsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateScrapeConfigPayloadStaticConfigsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateScrapeConfigPayloadStaticConfigsInner(val *CreateScrapeConfigPayloadStaticConfigsInner) *NullableCreateScrapeConfigPayloadStaticConfigsInner { + return &NullableCreateScrapeConfigPayloadStaticConfigsInner{value: val, isSet: true} +} + +func (v NullableCreateScrapeConfigPayloadStaticConfigsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateScrapeConfigPayloadStaticConfigsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_credentials.go b/services/observability/model_credentials.go index 0aac164a1..8b03edbfc 100644 --- a/services/observability/model_credentials.go +++ b/services/observability/model_credentials.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Credentials type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Credentials{} + // Credentials struct for Credentials type Credentials struct { // REQUIRED @@ -17,3 +24,115 @@ type Credentials struct { // REQUIRED Username *string `json:"username"` } + +type _Credentials Credentials + +// NewCredentials instantiates a new Credentials 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 NewCredentials(password *string, username *string) *Credentials { + this := Credentials{} + this.Password = password + this.Username = username + return &this +} + +// NewCredentialsWithDefaults instantiates a new Credentials 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 NewCredentialsWithDefaults() *Credentials { + this := Credentials{} + return &this +} + +// GetPassword returns the Password field value +func (o *Credentials) GetPassword() *string { + if o == nil { + var ret *string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *Credentials) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password, true +} + +// SetPassword sets field value +func (o *Credentials) SetPassword(v *string) { + o.Password = v +} + +// GetUsername returns the Username field value +func (o *Credentials) GetUsername() *string { + if o == nil { + var ret *string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *Credentials) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username, true +} + +// SetUsername sets field value +func (o *Credentials) SetUsername(v *string) { + o.Username = v +} + +func (o Credentials) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["password"] = o.Password + toSerialize["username"] = o.Username + return toSerialize, nil +} + +type NullableCredentials struct { + value *Credentials + isSet bool +} + +func (v NullableCredentials) Get() *Credentials { + return v.value +} + +func (v *NullableCredentials) Set(val *Credentials) { + v.value = val + v.isSet = true +} + +func (v NullableCredentials) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentials) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentials(val *Credentials) *NullableCredentials { + return &NullableCredentials{value: val, isSet: true} +} + +func (v NullableCredentials) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentials) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_credentials_remote_write_config.go b/services/observability/model_credentials_remote_write_config.go index 07d9c72f7..338987e2c 100644 --- a/services/observability/model_credentials_remote_write_config.go +++ b/services/observability/model_credentials_remote_write_config.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CredentialsRemoteWriteConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialsRemoteWriteConfig{} + // CredentialsRemoteWriteConfig struct for CredentialsRemoteWriteConfig type CredentialsRemoteWriteConfig struct { // REQUIRED @@ -19,3 +26,141 @@ type CredentialsRemoteWriteConfig struct { // REQUIRED Message *string `json:"message"` } + +type _CredentialsRemoteWriteConfig CredentialsRemoteWriteConfig + +// NewCredentialsRemoteWriteConfig instantiates a new CredentialsRemoteWriteConfig 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 NewCredentialsRemoteWriteConfig(credentialsMaxLimit *int64, maxLimit *int64, message *string) *CredentialsRemoteWriteConfig { + this := CredentialsRemoteWriteConfig{} + this.CredentialsMaxLimit = credentialsMaxLimit + this.MaxLimit = maxLimit + this.Message = message + return &this +} + +// NewCredentialsRemoteWriteConfigWithDefaults instantiates a new CredentialsRemoteWriteConfig 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 NewCredentialsRemoteWriteConfigWithDefaults() *CredentialsRemoteWriteConfig { + this := CredentialsRemoteWriteConfig{} + return &this +} + +// GetCredentialsMaxLimit returns the CredentialsMaxLimit field value +func (o *CredentialsRemoteWriteConfig) GetCredentialsMaxLimit() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.CredentialsMaxLimit +} + +// GetCredentialsMaxLimitOk returns a tuple with the CredentialsMaxLimit field value +// and a boolean to check if the value has been set. +func (o *CredentialsRemoteWriteConfig) GetCredentialsMaxLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.CredentialsMaxLimit, true +} + +// SetCredentialsMaxLimit sets field value +func (o *CredentialsRemoteWriteConfig) SetCredentialsMaxLimit(v *int64) { + o.CredentialsMaxLimit = v +} + +// GetMaxLimit returns the MaxLimit field value +func (o *CredentialsRemoteWriteConfig) GetMaxLimit() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.MaxLimit +} + +// GetMaxLimitOk returns a tuple with the MaxLimit field value +// and a boolean to check if the value has been set. +func (o *CredentialsRemoteWriteConfig) GetMaxLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxLimit, true +} + +// SetMaxLimit sets field value +func (o *CredentialsRemoteWriteConfig) SetMaxLimit(v *int64) { + o.MaxLimit = v +} + +// GetMessage returns the Message field value +func (o *CredentialsRemoteWriteConfig) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *CredentialsRemoteWriteConfig) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *CredentialsRemoteWriteConfig) SetMessage(v *string) { + o.Message = v +} + +func (o CredentialsRemoteWriteConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["credentialsMaxLimit"] = o.CredentialsMaxLimit + toSerialize["maxLimit"] = o.MaxLimit + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableCredentialsRemoteWriteConfig struct { + value *CredentialsRemoteWriteConfig + isSet bool +} + +func (v NullableCredentialsRemoteWriteConfig) Get() *CredentialsRemoteWriteConfig { + return v.value +} + +func (v *NullableCredentialsRemoteWriteConfig) Set(val *CredentialsRemoteWriteConfig) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialsRemoteWriteConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialsRemoteWriteConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialsRemoteWriteConfig(val *CredentialsRemoteWriteConfig) *NullableCredentialsRemoteWriteConfig { + return &NullableCredentialsRemoteWriteConfig{value: val, isSet: true} +} + +func (v NullableCredentialsRemoteWriteConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialsRemoteWriteConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_credentials_remote_write_delete_response.go b/services/observability/model_credentials_remote_write_delete_response.go index 260ceafe0..82185e1b1 100644 --- a/services/observability/model_credentials_remote_write_delete_response.go +++ b/services/observability/model_credentials_remote_write_delete_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the CredentialsRemoteWriteDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialsRemoteWriteDeleteResponse{} + // CredentialsRemoteWriteDeleteResponse struct for CredentialsRemoteWriteDeleteResponse type CredentialsRemoteWriteDeleteResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type CredentialsRemoteWriteDeleteResponse struct { // REQUIRED Message *string `json:"message"` } + +type _CredentialsRemoteWriteDeleteResponse CredentialsRemoteWriteDeleteResponse + +// NewCredentialsRemoteWriteDeleteResponse instantiates a new CredentialsRemoteWriteDeleteResponse 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 NewCredentialsRemoteWriteDeleteResponse(maxLimit *int64, message *string) *CredentialsRemoteWriteDeleteResponse { + this := CredentialsRemoteWriteDeleteResponse{} + this.MaxLimit = maxLimit + this.Message = message + return &this +} + +// NewCredentialsRemoteWriteDeleteResponseWithDefaults instantiates a new CredentialsRemoteWriteDeleteResponse 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 NewCredentialsRemoteWriteDeleteResponseWithDefaults() *CredentialsRemoteWriteDeleteResponse { + this := CredentialsRemoteWriteDeleteResponse{} + return &this +} + +// GetMaxLimit returns the MaxLimit field value +func (o *CredentialsRemoteWriteDeleteResponse) GetMaxLimit() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.MaxLimit +} + +// GetMaxLimitOk returns a tuple with the MaxLimit field value +// and a boolean to check if the value has been set. +func (o *CredentialsRemoteWriteDeleteResponse) GetMaxLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxLimit, true +} + +// SetMaxLimit sets field value +func (o *CredentialsRemoteWriteDeleteResponse) SetMaxLimit(v *int64) { + o.MaxLimit = v +} + +// GetMessage returns the Message field value +func (o *CredentialsRemoteWriteDeleteResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *CredentialsRemoteWriteDeleteResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *CredentialsRemoteWriteDeleteResponse) SetMessage(v *string) { + o.Message = v +} + +func (o CredentialsRemoteWriteDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["maxLimit"] = o.MaxLimit + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableCredentialsRemoteWriteDeleteResponse struct { + value *CredentialsRemoteWriteDeleteResponse + isSet bool +} + +func (v NullableCredentialsRemoteWriteDeleteResponse) Get() *CredentialsRemoteWriteDeleteResponse { + return v.value +} + +func (v *NullableCredentialsRemoteWriteDeleteResponse) Set(val *CredentialsRemoteWriteDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialsRemoteWriteDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialsRemoteWriteDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialsRemoteWriteDeleteResponse(val *CredentialsRemoteWriteDeleteResponse) *NullableCredentialsRemoteWriteDeleteResponse { + return &NullableCredentialsRemoteWriteDeleteResponse{value: val, isSet: true} +} + +func (v NullableCredentialsRemoteWriteDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialsRemoteWriteDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_delete_scrape_config_response.go b/services/observability/model_delete_scrape_config_response.go index c5574c552..219601d3b 100644 --- a/services/observability/model_delete_scrape_config_response.go +++ b/services/observability/model_delete_scrape_config_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the DeleteScrapeConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeleteScrapeConfigResponse{} + // DeleteScrapeConfigResponse struct for DeleteScrapeConfigResponse type DeleteScrapeConfigResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type DeleteScrapeConfigResponse struct { // REQUIRED Message *string `json:"message"` } + +type _DeleteScrapeConfigResponse DeleteScrapeConfigResponse + +// NewDeleteScrapeConfigResponse instantiates a new DeleteScrapeConfigResponse 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 NewDeleteScrapeConfigResponse(data *[]Job, message *string) *DeleteScrapeConfigResponse { + this := DeleteScrapeConfigResponse{} + this.Data = data + this.Message = message + return &this +} + +// NewDeleteScrapeConfigResponseWithDefaults instantiates a new DeleteScrapeConfigResponse 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 NewDeleteScrapeConfigResponseWithDefaults() *DeleteScrapeConfigResponse { + this := DeleteScrapeConfigResponse{} + return &this +} + +// GetData returns the Data field value +func (o *DeleteScrapeConfigResponse) GetData() *[]Job { + if o == nil { + var ret *[]Job + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *DeleteScrapeConfigResponse) GetDataOk() (*[]Job, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *DeleteScrapeConfigResponse) SetData(v *[]Job) { + o.Data = v +} + +// GetMessage returns the Message field value +func (o *DeleteScrapeConfigResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DeleteScrapeConfigResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *DeleteScrapeConfigResponse) SetMessage(v *string) { + o.Message = v +} + +func (o DeleteScrapeConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableDeleteScrapeConfigResponse struct { + value *DeleteScrapeConfigResponse + isSet bool +} + +func (v NullableDeleteScrapeConfigResponse) Get() *DeleteScrapeConfigResponse { + return v.value +} + +func (v *NullableDeleteScrapeConfigResponse) Set(val *DeleteScrapeConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDeleteScrapeConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDeleteScrapeConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeleteScrapeConfigResponse(val *DeleteScrapeConfigResponse) *NullableDeleteScrapeConfigResponse { + return &NullableDeleteScrapeConfigResponse{value: val, isSet: true} +} + +func (v NullableDeleteScrapeConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeleteScrapeConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_email_config.go b/services/observability/model_email_config.go index ea4bd68c5..eafdb97a6 100644 --- a/services/observability/model_email_config.go +++ b/services/observability/model_email_config.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the EmailConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailConfig{} + // EmailConfig struct for EmailConfig type EmailConfig struct { AuthIdentity *string `json:"authIdentity,omitempty"` @@ -21,3 +28,303 @@ type EmailConfig struct { // REQUIRED To *string `json:"to"` } + +type _EmailConfig EmailConfig + +// NewEmailConfig instantiates a new EmailConfig 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 NewEmailConfig(to *string) *EmailConfig { + this := EmailConfig{} + var sendResolved bool = false + this.SendResolved = &sendResolved + this.To = to + return &this +} + +// NewEmailConfigWithDefaults instantiates a new EmailConfig 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 NewEmailConfigWithDefaults() *EmailConfig { + this := EmailConfig{} + var sendResolved bool = false + this.SendResolved = &sendResolved + return &this +} + +// GetAuthIdentity returns the AuthIdentity field value if set, zero value otherwise. +func (o *EmailConfig) GetAuthIdentity() *string { + if o == nil || IsNil(o.AuthIdentity) { + var ret *string + return ret + } + return o.AuthIdentity +} + +// GetAuthIdentityOk returns a tuple with the AuthIdentity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailConfig) GetAuthIdentityOk() (*string, bool) { + if o == nil || IsNil(o.AuthIdentity) { + return nil, false + } + return o.AuthIdentity, true +} + +// HasAuthIdentity returns a boolean if a field has been set. +func (o *EmailConfig) HasAuthIdentity() bool { + if o != nil && !IsNil(o.AuthIdentity) { + return true + } + + return false +} + +// SetAuthIdentity gets a reference to the given string and assigns it to the AuthIdentity field. +func (o *EmailConfig) SetAuthIdentity(v *string) { + o.AuthIdentity = v +} + +// GetAuthPassword returns the AuthPassword field value if set, zero value otherwise. +func (o *EmailConfig) GetAuthPassword() *string { + if o == nil || IsNil(o.AuthPassword) { + var ret *string + return ret + } + return o.AuthPassword +} + +// GetAuthPasswordOk returns a tuple with the AuthPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailConfig) GetAuthPasswordOk() (*string, bool) { + if o == nil || IsNil(o.AuthPassword) { + return nil, false + } + return o.AuthPassword, true +} + +// HasAuthPassword returns a boolean if a field has been set. +func (o *EmailConfig) HasAuthPassword() bool { + if o != nil && !IsNil(o.AuthPassword) { + return true + } + + return false +} + +// SetAuthPassword gets a reference to the given string and assigns it to the AuthPassword field. +func (o *EmailConfig) SetAuthPassword(v *string) { + o.AuthPassword = v +} + +// GetAuthUsername returns the AuthUsername field value if set, zero value otherwise. +func (o *EmailConfig) GetAuthUsername() *string { + if o == nil || IsNil(o.AuthUsername) { + var ret *string + return ret + } + return o.AuthUsername +} + +// GetAuthUsernameOk returns a tuple with the AuthUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailConfig) GetAuthUsernameOk() (*string, bool) { + if o == nil || IsNil(o.AuthUsername) { + return nil, false + } + return o.AuthUsername, true +} + +// HasAuthUsername returns a boolean if a field has been set. +func (o *EmailConfig) HasAuthUsername() bool { + if o != nil && !IsNil(o.AuthUsername) { + return true + } + + return false +} + +// SetAuthUsername gets a reference to the given string and assigns it to the AuthUsername field. +func (o *EmailConfig) SetAuthUsername(v *string) { + o.AuthUsername = v +} + +// GetFrom returns the From field value if set, zero value otherwise. +func (o *EmailConfig) GetFrom() *string { + if o == nil || IsNil(o.From) { + var ret *string + return ret + } + return o.From +} + +// GetFromOk returns a tuple with the From field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailConfig) GetFromOk() (*string, bool) { + if o == nil || IsNil(o.From) { + return nil, false + } + return o.From, true +} + +// HasFrom returns a boolean if a field has been set. +func (o *EmailConfig) HasFrom() bool { + if o != nil && !IsNil(o.From) { + return true + } + + return false +} + +// SetFrom gets a reference to the given string and assigns it to the From field. +func (o *EmailConfig) SetFrom(v *string) { + o.From = v +} + +// GetSendResolved returns the SendResolved field value if set, zero value otherwise. +func (o *EmailConfig) GetSendResolved() *bool { + if o == nil || IsNil(o.SendResolved) { + var ret *bool + return ret + } + return o.SendResolved +} + +// GetSendResolvedOk returns a tuple with the SendResolved field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailConfig) GetSendResolvedOk() (*bool, bool) { + if o == nil || IsNil(o.SendResolved) { + return nil, false + } + return o.SendResolved, true +} + +// HasSendResolved returns a boolean if a field has been set. +func (o *EmailConfig) HasSendResolved() bool { + if o != nil && !IsNil(o.SendResolved) { + return true + } + + return false +} + +// SetSendResolved gets a reference to the given bool and assigns it to the SendResolved field. +func (o *EmailConfig) SetSendResolved(v *bool) { + o.SendResolved = v +} + +// GetSmarthost returns the Smarthost field value if set, zero value otherwise. +func (o *EmailConfig) GetSmarthost() *string { + if o == nil || IsNil(o.Smarthost) { + var ret *string + return ret + } + return o.Smarthost +} + +// GetSmarthostOk returns a tuple with the Smarthost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailConfig) GetSmarthostOk() (*string, bool) { + if o == nil || IsNil(o.Smarthost) { + return nil, false + } + return o.Smarthost, true +} + +// HasSmarthost returns a boolean if a field has been set. +func (o *EmailConfig) HasSmarthost() bool { + if o != nil && !IsNil(o.Smarthost) { + return true + } + + return false +} + +// SetSmarthost gets a reference to the given string and assigns it to the Smarthost field. +func (o *EmailConfig) SetSmarthost(v *string) { + o.Smarthost = v +} + +// GetTo returns the To field value +func (o *EmailConfig) GetTo() *string { + if o == nil { + var ret *string + return ret + } + + return o.To +} + +// GetToOk returns a tuple with the To field value +// and a boolean to check if the value has been set. +func (o *EmailConfig) GetToOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.To, true +} + +// SetTo sets field value +func (o *EmailConfig) SetTo(v *string) { + o.To = v +} + +func (o EmailConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AuthIdentity) { + toSerialize["authIdentity"] = o.AuthIdentity + } + if !IsNil(o.AuthPassword) { + toSerialize["authPassword"] = o.AuthPassword + } + if !IsNil(o.AuthUsername) { + toSerialize["authUsername"] = o.AuthUsername + } + if !IsNil(o.From) { + toSerialize["from"] = o.From + } + if !IsNil(o.SendResolved) { + toSerialize["sendResolved"] = o.SendResolved + } + if !IsNil(o.Smarthost) { + toSerialize["smarthost"] = o.Smarthost + } + toSerialize["to"] = o.To + return toSerialize, nil +} + +type NullableEmailConfig struct { + value *EmailConfig + isSet bool +} + +func (v NullableEmailConfig) Get() *EmailConfig { + return v.value +} + +func (v *NullableEmailConfig) Set(val *EmailConfig) { + v.value = val + v.isSet = true +} + +func (v NullableEmailConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailConfig(val *EmailConfig) *NullableEmailConfig { + return &NullableEmailConfig{value: val, isSet: true} +} + +func (v NullableEmailConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_error.go b/services/observability/model_error.go index 46438e225..ff3932cb4 100644 --- a/services/observability/model_error.go +++ b/services/observability/model_error.go @@ -10,9 +10,137 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + // Error struct for Error type Error struct { Errors *[]map[string]string `json:"errors,omitempty"` // REQUIRED Message *string `json:"message"` } + +type _Error Error + +// NewError instantiates a new Error 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 NewError(message *string) *Error { + this := Error{} + this.Message = message + return &this +} + +// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *Error) GetErrors() *[]map[string]string { + if o == nil || IsNil(o.Errors) { + var ret *[]map[string]string + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetErrorsOk() (*[]map[string]string, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *Error) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []map[string]string and assigns it to the Errors field. +func (o *Error) SetErrors(v *[]map[string]string) { + o.Errors = v +} + +// GetMessage returns the Message field value +func (o *Error) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *Error) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *Error) SetMessage(v *string) { + o.Message = v +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_get_alert_configs_response.go b/services/observability/model_get_alert_configs_response.go index 5e21dc58b..54e7b5909 100644 --- a/services/observability/model_get_alert_configs_response.go +++ b/services/observability/model_get_alert_configs_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the GetAlertConfigsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetAlertConfigsResponse{} + // GetAlertConfigsResponse struct for GetAlertConfigsResponse type GetAlertConfigsResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type GetAlertConfigsResponse struct { // REQUIRED Message *string `json:"message"` } + +type _GetAlertConfigsResponse GetAlertConfigsResponse + +// NewGetAlertConfigsResponse instantiates a new GetAlertConfigsResponse 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 NewGetAlertConfigsResponse(data *Alert, message *string) *GetAlertConfigsResponse { + this := GetAlertConfigsResponse{} + this.Data = data + this.Message = message + return &this +} + +// NewGetAlertConfigsResponseWithDefaults instantiates a new GetAlertConfigsResponse 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 NewGetAlertConfigsResponseWithDefaults() *GetAlertConfigsResponse { + this := GetAlertConfigsResponse{} + return &this +} + +// GetData returns the Data field value +func (o *GetAlertConfigsResponse) GetData() *Alert { + if o == nil { + var ret *Alert + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *GetAlertConfigsResponse) GetDataOk() (*Alert, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *GetAlertConfigsResponse) SetData(v *Alert) { + o.Data = v +} + +// GetMessage returns the Message field value +func (o *GetAlertConfigsResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *GetAlertConfigsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *GetAlertConfigsResponse) SetMessage(v *string) { + o.Message = v +} + +func (o GetAlertConfigsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableGetAlertConfigsResponse struct { + value *GetAlertConfigsResponse + isSet bool +} + +func (v NullableGetAlertConfigsResponse) Get() *GetAlertConfigsResponse { + return v.value +} + +func (v *NullableGetAlertConfigsResponse) Set(val *GetAlertConfigsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetAlertConfigsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAlertConfigsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAlertConfigsResponse(val *GetAlertConfigsResponse) *NullableGetAlertConfigsResponse { + return &NullableGetAlertConfigsResponse{value: val, isSet: true} +} + +func (v NullableGetAlertConfigsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAlertConfigsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_get_credentials_response.go b/services/observability/model_get_credentials_response.go index 3dd8e176b..d62844ef6 100644 --- a/services/observability/model_get_credentials_response.go +++ b/services/observability/model_get_credentials_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the GetCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetCredentialsResponse{} + // GetCredentialsResponse struct for GetCredentialsResponse type GetCredentialsResponse struct { CredentialsInfo *map[string]string `json:"credentialsInfo,omitempty"` @@ -20,3 +27,176 @@ type GetCredentialsResponse struct { // REQUIRED Name *string `json:"name"` } + +type _GetCredentialsResponse GetCredentialsResponse + +// NewGetCredentialsResponse instantiates a new GetCredentialsResponse 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 NewGetCredentialsResponse(id *string, message *string, name *string) *GetCredentialsResponse { + this := GetCredentialsResponse{} + this.Id = id + this.Message = message + this.Name = name + return &this +} + +// NewGetCredentialsResponseWithDefaults instantiates a new GetCredentialsResponse 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 NewGetCredentialsResponseWithDefaults() *GetCredentialsResponse { + this := GetCredentialsResponse{} + return &this +} + +// GetCredentialsInfo returns the CredentialsInfo field value if set, zero value otherwise. +func (o *GetCredentialsResponse) GetCredentialsInfo() *map[string]string { + if o == nil || IsNil(o.CredentialsInfo) { + var ret *map[string]string + return ret + } + return o.CredentialsInfo +} + +// GetCredentialsInfoOk returns a tuple with the CredentialsInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCredentialsResponse) GetCredentialsInfoOk() (*map[string]string, bool) { + if o == nil || IsNil(o.CredentialsInfo) { + return nil, false + } + return o.CredentialsInfo, true +} + +// HasCredentialsInfo returns a boolean if a field has been set. +func (o *GetCredentialsResponse) HasCredentialsInfo() bool { + if o != nil && !IsNil(o.CredentialsInfo) { + return true + } + + return false +} + +// SetCredentialsInfo gets a reference to the given map[string]string and assigns it to the CredentialsInfo field. +func (o *GetCredentialsResponse) SetCredentialsInfo(v *map[string]string) { + o.CredentialsInfo = v +} + +// GetId returns the Id field value +func (o *GetCredentialsResponse) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GetCredentialsResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *GetCredentialsResponse) SetId(v *string) { + o.Id = v +} + +// GetMessage returns the Message field value +func (o *GetCredentialsResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *GetCredentialsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *GetCredentialsResponse) SetMessage(v *string) { + o.Message = v +} + +// GetName returns the Name field value +func (o *GetCredentialsResponse) 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 *GetCredentialsResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *GetCredentialsResponse) SetName(v *string) { + o.Name = v +} + +func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsInfo) { + toSerialize["credentialsInfo"] = o.CredentialsInfo + } + toSerialize["id"] = o.Id + toSerialize["message"] = o.Message + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableGetCredentialsResponse struct { + value *GetCredentialsResponse + isSet bool +} + +func (v NullableGetCredentialsResponse) Get() *GetCredentialsResponse { + return v.value +} + +func (v *NullableGetCredentialsResponse) Set(val *GetCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetCredentialsResponse(val *GetCredentialsResponse) *NullableGetCredentialsResponse { + return &NullableGetCredentialsResponse{value: val, isSet: true} +} + +func (v NullableGetCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_get_instance_response.go b/services/observability/model_get_instance_response.go index 18e8d64e8..94394a308 100644 --- a/services/observability/model_get_instance_response.go +++ b/services/observability/model_get_instance_response.go @@ -10,10 +10,18 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the GetInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetInstanceResponse{} + // GetInstanceResponse struct for GetInstanceResponse type GetInstanceResponse struct { // REQUIRED - DashboardUrl *string `json:"dashboardUrl"` + DashboardUrl *string `json:"dashboardUrl"` + Error *NullableString `json:"error,omitempty"` // REQUIRED Id *string `json:"id"` // REQUIRED @@ -33,3 +41,465 @@ type GetInstanceResponse struct { // REQUIRED Status *string `json:"status"` } + +type _GetInstanceResponse GetInstanceResponse + +// NewGetInstanceResponse instantiates a new GetInstanceResponse 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 NewGetInstanceResponse(dashboardUrl *string, id *string, instance *InstanceSensitiveData, message *string, planId *string, planName *string, serviceName *string, status *string) *GetInstanceResponse { + this := GetInstanceResponse{} + this.DashboardUrl = dashboardUrl + this.Id = id + this.Instance = instance + var isUpdatable bool = true + this.IsUpdatable = &isUpdatable + this.Message = message + this.PlanId = planId + this.PlanName = planName + var planSchema string = "" + this.PlanSchema = &planSchema + this.ServiceName = serviceName + this.Status = status + return &this +} + +// NewGetInstanceResponseWithDefaults instantiates a new GetInstanceResponse 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 NewGetInstanceResponseWithDefaults() *GetInstanceResponse { + this := GetInstanceResponse{} + var isUpdatable bool = true + this.IsUpdatable = &isUpdatable + var planSchema string = "" + this.PlanSchema = &planSchema + return &this +} + +// GetDashboardUrl returns the DashboardUrl field value +func (o *GetInstanceResponse) GetDashboardUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.DashboardUrl +} + +// GetDashboardUrlOk returns a tuple with the DashboardUrl field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetDashboardUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DashboardUrl, true +} + +// SetDashboardUrl sets field value +func (o *GetInstanceResponse) SetDashboardUrl(v *string) { + o.DashboardUrl = v +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetInstanceResponse) GetError() *string { + if o == nil || IsNil(o.Error.Get()) { + var ret *string + return ret + } + return o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GetInstanceResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *GetInstanceResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *GetInstanceResponse) SetError(v *string) { + o.Error.Set(v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *GetInstanceResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *GetInstanceResponse) UnsetError() { + o.Error.Unset() +} + +// GetId returns the Id field value +func (o *GetInstanceResponse) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *GetInstanceResponse) SetId(v *string) { + o.Id = v +} + +// GetInstance returns the Instance field value +func (o *GetInstanceResponse) GetInstance() *InstanceSensitiveData { + if o == nil { + var ret *InstanceSensitiveData + return ret + } + + return o.Instance +} + +// GetInstanceOk returns a tuple with the Instance field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetInstanceOk() (*InstanceSensitiveData, bool) { + if o == nil { + return nil, false + } + return o.Instance, true +} + +// SetInstance sets field value +func (o *GetInstanceResponse) SetInstance(v *InstanceSensitiveData) { + o.Instance = v +} + +// GetIsUpdatable returns the IsUpdatable field value if set, zero value otherwise. +func (o *GetInstanceResponse) GetIsUpdatable() *bool { + if o == nil || IsNil(o.IsUpdatable) { + var ret *bool + return ret + } + return o.IsUpdatable +} + +// GetIsUpdatableOk returns a tuple with the IsUpdatable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetIsUpdatableOk() (*bool, bool) { + if o == nil || IsNil(o.IsUpdatable) { + return nil, false + } + return o.IsUpdatable, true +} + +// HasIsUpdatable returns a boolean if a field has been set. +func (o *GetInstanceResponse) HasIsUpdatable() bool { + if o != nil && !IsNil(o.IsUpdatable) { + return true + } + + return false +} + +// SetIsUpdatable gets a reference to the given bool and assigns it to the IsUpdatable field. +func (o *GetInstanceResponse) SetIsUpdatable(v *bool) { + o.IsUpdatable = v +} + +// GetMessage returns the Message field value +func (o *GetInstanceResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *GetInstanceResponse) SetMessage(v *string) { + o.Message = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetInstanceResponse) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetInstanceResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetInstanceResponse) SetName(v *string) { + o.Name = v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *GetInstanceResponse) GetParameters() *map[string]string { + if o == nil || IsNil(o.Parameters) { + var ret *map[string]string + return ret + } + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetParametersOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *GetInstanceResponse) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given map[string]string and assigns it to the Parameters field. +func (o *GetInstanceResponse) SetParameters(v *map[string]string) { + o.Parameters = v +} + +// GetPlanId returns the PlanId field value +func (o *GetInstanceResponse) GetPlanId() *string { + if o == nil { + var ret *string + return ret + } + + return o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetPlanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PlanId, true +} + +// SetPlanId sets field value +func (o *GetInstanceResponse) SetPlanId(v *string) { + o.PlanId = v +} + +// GetPlanName returns the PlanName field value +func (o *GetInstanceResponse) GetPlanName() *string { + if o == nil { + var ret *string + return ret + } + + return o.PlanName +} + +// GetPlanNameOk returns a tuple with the PlanName field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetPlanNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PlanName, true +} + +// SetPlanName sets field value +func (o *GetInstanceResponse) SetPlanName(v *string) { + o.PlanName = v +} + +// GetPlanSchema returns the PlanSchema field value if set, zero value otherwise. +func (o *GetInstanceResponse) GetPlanSchema() *string { + if o == nil || IsNil(o.PlanSchema) { + var ret *string + return ret + } + return o.PlanSchema +} + +// GetPlanSchemaOk returns a tuple with the PlanSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetPlanSchemaOk() (*string, bool) { + if o == nil || IsNil(o.PlanSchema) { + return nil, false + } + return o.PlanSchema, true +} + +// HasPlanSchema returns a boolean if a field has been set. +func (o *GetInstanceResponse) HasPlanSchema() bool { + if o != nil && !IsNil(o.PlanSchema) { + return true + } + + return false +} + +// SetPlanSchema gets a reference to the given string and assigns it to the PlanSchema field. +func (o *GetInstanceResponse) SetPlanSchema(v *string) { + o.PlanSchema = v +} + +// GetServiceName returns the ServiceName field value +func (o *GetInstanceResponse) GetServiceName() *string { + if o == nil { + var ret *string + return ret + } + + return o.ServiceName +} + +// GetServiceNameOk returns a tuple with the ServiceName field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetServiceNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ServiceName, true +} + +// SetServiceName sets field value +func (o *GetInstanceResponse) SetServiceName(v *string) { + o.ServiceName = v +} + +// GetStatus returns the Status field value +func (o *GetInstanceResponse) GetStatus() *string { + if o == nil { + var ret *string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status, true +} + +// SetStatus sets field value +func (o *GetInstanceResponse) SetStatus(v *string) { + o.Status = v +} + +func (o GetInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dashboardUrl"] = o.DashboardUrl + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + toSerialize["id"] = o.Id + toSerialize["instance"] = o.Instance + if !IsNil(o.IsUpdatable) { + toSerialize["isUpdatable"] = o.IsUpdatable + } + toSerialize["message"] = o.Message + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + toSerialize["planId"] = o.PlanId + toSerialize["planName"] = o.PlanName + if !IsNil(o.PlanSchema) { + toSerialize["planSchema"] = o.PlanSchema + } + toSerialize["serviceName"] = o.ServiceName + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableGetInstanceResponse struct { + value *GetInstanceResponse + isSet bool +} + +func (v NullableGetInstanceResponse) Get() *GetInstanceResponse { + return v.value +} + +func (v *NullableGetInstanceResponse) Set(val *GetInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetInstanceResponse(val *GetInstanceResponse) *NullableGetInstanceResponse { + return &NullableGetInstanceResponse{value: val, isSet: true} +} + +func (v NullableGetInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_get_metrics_storage_retention_response.go b/services/observability/model_get_metrics_storage_retention_response.go index c98d1bdbf..79c5c7aef 100644 --- a/services/observability/model_get_metrics_storage_retention_response.go +++ b/services/observability/model_get_metrics_storage_retention_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the GetMetricsStorageRetentionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetMetricsStorageRetentionResponse{} + // GetMetricsStorageRetentionResponse struct for GetMetricsStorageRetentionResponse type GetMetricsStorageRetentionResponse struct { // REQUIRED @@ -21,3 +28,167 @@ type GetMetricsStorageRetentionResponse struct { // REQUIRED MetricsRetentionTimeRaw *string `json:"metricsRetentionTimeRaw"` } + +type _GetMetricsStorageRetentionResponse GetMetricsStorageRetentionResponse + +// NewGetMetricsStorageRetentionResponse instantiates a new GetMetricsStorageRetentionResponse 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 NewGetMetricsStorageRetentionResponse(message *string, metricsRetentionTime1h *string, metricsRetentionTime5m *string, metricsRetentionTimeRaw *string) *GetMetricsStorageRetentionResponse { + this := GetMetricsStorageRetentionResponse{} + this.Message = message + this.MetricsRetentionTime1h = metricsRetentionTime1h + this.MetricsRetentionTime5m = metricsRetentionTime5m + this.MetricsRetentionTimeRaw = metricsRetentionTimeRaw + return &this +} + +// NewGetMetricsStorageRetentionResponseWithDefaults instantiates a new GetMetricsStorageRetentionResponse 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 NewGetMetricsStorageRetentionResponseWithDefaults() *GetMetricsStorageRetentionResponse { + this := GetMetricsStorageRetentionResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *GetMetricsStorageRetentionResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *GetMetricsStorageRetentionResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *GetMetricsStorageRetentionResponse) SetMessage(v *string) { + o.Message = v +} + +// GetMetricsRetentionTime1h returns the MetricsRetentionTime1h field value +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTime1h() *string { + if o == nil { + var ret *string + return ret + } + + return o.MetricsRetentionTime1h +} + +// GetMetricsRetentionTime1hOk returns a tuple with the MetricsRetentionTime1h field value +// and a boolean to check if the value has been set. +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTime1hOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTime1h, true +} + +// SetMetricsRetentionTime1h sets field value +func (o *GetMetricsStorageRetentionResponse) SetMetricsRetentionTime1h(v *string) { + o.MetricsRetentionTime1h = v +} + +// GetMetricsRetentionTime5m returns the MetricsRetentionTime5m field value +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTime5m() *string { + if o == nil { + var ret *string + return ret + } + + return o.MetricsRetentionTime5m +} + +// GetMetricsRetentionTime5mOk returns a tuple with the MetricsRetentionTime5m field value +// and a boolean to check if the value has been set. +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTime5mOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTime5m, true +} + +// SetMetricsRetentionTime5m sets field value +func (o *GetMetricsStorageRetentionResponse) SetMetricsRetentionTime5m(v *string) { + o.MetricsRetentionTime5m = v +} + +// GetMetricsRetentionTimeRaw returns the MetricsRetentionTimeRaw field value +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTimeRaw() *string { + if o == nil { + var ret *string + return ret + } + + return o.MetricsRetentionTimeRaw +} + +// GetMetricsRetentionTimeRawOk returns a tuple with the MetricsRetentionTimeRaw field value +// and a boolean to check if the value has been set. +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTimeRawOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTimeRaw, true +} + +// SetMetricsRetentionTimeRaw sets field value +func (o *GetMetricsStorageRetentionResponse) SetMetricsRetentionTimeRaw(v *string) { + o.MetricsRetentionTimeRaw = v +} + +func (o GetMetricsStorageRetentionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["metricsRetentionTime1h"] = o.MetricsRetentionTime1h + toSerialize["metricsRetentionTime5m"] = o.MetricsRetentionTime5m + toSerialize["metricsRetentionTimeRaw"] = o.MetricsRetentionTimeRaw + return toSerialize, nil +} + +type NullableGetMetricsStorageRetentionResponse struct { + value *GetMetricsStorageRetentionResponse + isSet bool +} + +func (v NullableGetMetricsStorageRetentionResponse) Get() *GetMetricsStorageRetentionResponse { + return v.value +} + +func (v *NullableGetMetricsStorageRetentionResponse) Set(val *GetMetricsStorageRetentionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetMetricsStorageRetentionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetMetricsStorageRetentionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetMetricsStorageRetentionResponse(val *GetMetricsStorageRetentionResponse) *NullableGetMetricsStorageRetentionResponse { + return &NullableGetMetricsStorageRetentionResponse{value: val, isSet: true} +} + +func (v NullableGetMetricsStorageRetentionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetMetricsStorageRetentionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_get_scrape_config_response.go b/services/observability/model_get_scrape_config_response.go index e14d830d0..e910bccf2 100644 --- a/services/observability/model_get_scrape_config_response.go +++ b/services/observability/model_get_scrape_config_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the GetScrapeConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetScrapeConfigResponse{} + // GetScrapeConfigResponse struct for GetScrapeConfigResponse type GetScrapeConfigResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type GetScrapeConfigResponse struct { // REQUIRED Message *string `json:"message"` } + +type _GetScrapeConfigResponse GetScrapeConfigResponse + +// NewGetScrapeConfigResponse instantiates a new GetScrapeConfigResponse 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 NewGetScrapeConfigResponse(data *Job, message *string) *GetScrapeConfigResponse { + this := GetScrapeConfigResponse{} + this.Data = data + this.Message = message + return &this +} + +// NewGetScrapeConfigResponseWithDefaults instantiates a new GetScrapeConfigResponse 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 NewGetScrapeConfigResponseWithDefaults() *GetScrapeConfigResponse { + this := GetScrapeConfigResponse{} + return &this +} + +// GetData returns the Data field value +func (o *GetScrapeConfigResponse) GetData() *Job { + if o == nil { + var ret *Job + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *GetScrapeConfigResponse) GetDataOk() (*Job, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *GetScrapeConfigResponse) SetData(v *Job) { + o.Data = v +} + +// GetMessage returns the Message field value +func (o *GetScrapeConfigResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *GetScrapeConfigResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *GetScrapeConfigResponse) SetMessage(v *string) { + o.Message = v +} + +func (o GetScrapeConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableGetScrapeConfigResponse struct { + value *GetScrapeConfigResponse + isSet bool +} + +func (v NullableGetScrapeConfigResponse) Get() *GetScrapeConfigResponse { + return v.value +} + +func (v *NullableGetScrapeConfigResponse) Set(val *GetScrapeConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetScrapeConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetScrapeConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetScrapeConfigResponse(val *GetScrapeConfigResponse) *NullableGetScrapeConfigResponse { + return &NullableGetScrapeConfigResponse{value: val, isSet: true} +} + +func (v NullableGetScrapeConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetScrapeConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_global.go b/services/observability/model_global.go index f0636fe43..ca673ade2 100644 --- a/services/observability/model_global.go +++ b/services/observability/model_global.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Global type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Global{} + // Global struct for Global type Global struct { OpsgenieApiKey *string `json:"opsgenieApiKey,omitempty"` @@ -21,3 +28,345 @@ type Global struct { SmtpFrom *string `json:"smtpFrom,omitempty"` SmtpSmarthost *string `json:"smtpSmarthost,omitempty"` } + +// NewGlobal instantiates a new Global 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 NewGlobal() *Global { + this := Global{} + var resolveTimeout string = "5m" + this.ResolveTimeout = &resolveTimeout + return &this +} + +// NewGlobalWithDefaults instantiates a new Global 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 NewGlobalWithDefaults() *Global { + this := Global{} + var resolveTimeout string = "5m" + this.ResolveTimeout = &resolveTimeout + return &this +} + +// GetOpsgenieApiKey returns the OpsgenieApiKey field value if set, zero value otherwise. +func (o *Global) GetOpsgenieApiKey() *string { + if o == nil || IsNil(o.OpsgenieApiKey) { + var ret *string + return ret + } + return o.OpsgenieApiKey +} + +// GetOpsgenieApiKeyOk returns a tuple with the OpsgenieApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Global) GetOpsgenieApiKeyOk() (*string, bool) { + if o == nil || IsNil(o.OpsgenieApiKey) { + return nil, false + } + return o.OpsgenieApiKey, true +} + +// HasOpsgenieApiKey returns a boolean if a field has been set. +func (o *Global) HasOpsgenieApiKey() bool { + if o != nil && !IsNil(o.OpsgenieApiKey) { + return true + } + + return false +} + +// SetOpsgenieApiKey gets a reference to the given string and assigns it to the OpsgenieApiKey field. +func (o *Global) SetOpsgenieApiKey(v *string) { + o.OpsgenieApiKey = v +} + +// GetOpsgenieApiUrl returns the OpsgenieApiUrl field value if set, zero value otherwise. +func (o *Global) GetOpsgenieApiUrl() *string { + if o == nil || IsNil(o.OpsgenieApiUrl) { + var ret *string + return ret + } + return o.OpsgenieApiUrl +} + +// GetOpsgenieApiUrlOk returns a tuple with the OpsgenieApiUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Global) GetOpsgenieApiUrlOk() (*string, bool) { + if o == nil || IsNil(o.OpsgenieApiUrl) { + return nil, false + } + return o.OpsgenieApiUrl, true +} + +// HasOpsgenieApiUrl returns a boolean if a field has been set. +func (o *Global) HasOpsgenieApiUrl() bool { + if o != nil && !IsNil(o.OpsgenieApiUrl) { + return true + } + + return false +} + +// SetOpsgenieApiUrl gets a reference to the given string and assigns it to the OpsgenieApiUrl field. +func (o *Global) SetOpsgenieApiUrl(v *string) { + o.OpsgenieApiUrl = v +} + +// GetResolveTimeout returns the ResolveTimeout field value if set, zero value otherwise. +func (o *Global) GetResolveTimeout() *string { + if o == nil || IsNil(o.ResolveTimeout) { + var ret *string + return ret + } + return o.ResolveTimeout +} + +// GetResolveTimeoutOk returns a tuple with the ResolveTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Global) GetResolveTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.ResolveTimeout) { + return nil, false + } + return o.ResolveTimeout, true +} + +// HasResolveTimeout returns a boolean if a field has been set. +func (o *Global) HasResolveTimeout() bool { + if o != nil && !IsNil(o.ResolveTimeout) { + return true + } + + return false +} + +// SetResolveTimeout gets a reference to the given string and assigns it to the ResolveTimeout field. +func (o *Global) SetResolveTimeout(v *string) { + o.ResolveTimeout = v +} + +// GetSmtpAuthIdentity returns the SmtpAuthIdentity field value if set, zero value otherwise. +func (o *Global) GetSmtpAuthIdentity() *string { + if o == nil || IsNil(o.SmtpAuthIdentity) { + var ret *string + return ret + } + return o.SmtpAuthIdentity +} + +// GetSmtpAuthIdentityOk returns a tuple with the SmtpAuthIdentity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Global) GetSmtpAuthIdentityOk() (*string, bool) { + if o == nil || IsNil(o.SmtpAuthIdentity) { + return nil, false + } + return o.SmtpAuthIdentity, true +} + +// HasSmtpAuthIdentity returns a boolean if a field has been set. +func (o *Global) HasSmtpAuthIdentity() bool { + if o != nil && !IsNil(o.SmtpAuthIdentity) { + return true + } + + return false +} + +// SetSmtpAuthIdentity gets a reference to the given string and assigns it to the SmtpAuthIdentity field. +func (o *Global) SetSmtpAuthIdentity(v *string) { + o.SmtpAuthIdentity = v +} + +// GetSmtpAuthPassword returns the SmtpAuthPassword field value if set, zero value otherwise. +func (o *Global) GetSmtpAuthPassword() *string { + if o == nil || IsNil(o.SmtpAuthPassword) { + var ret *string + return ret + } + return o.SmtpAuthPassword +} + +// GetSmtpAuthPasswordOk returns a tuple with the SmtpAuthPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Global) GetSmtpAuthPasswordOk() (*string, bool) { + if o == nil || IsNil(o.SmtpAuthPassword) { + return nil, false + } + return o.SmtpAuthPassword, true +} + +// HasSmtpAuthPassword returns a boolean if a field has been set. +func (o *Global) HasSmtpAuthPassword() bool { + if o != nil && !IsNil(o.SmtpAuthPassword) { + return true + } + + return false +} + +// SetSmtpAuthPassword gets a reference to the given string and assigns it to the SmtpAuthPassword field. +func (o *Global) SetSmtpAuthPassword(v *string) { + o.SmtpAuthPassword = v +} + +// GetSmtpAuthUsername returns the SmtpAuthUsername field value if set, zero value otherwise. +func (o *Global) GetSmtpAuthUsername() *string { + if o == nil || IsNil(o.SmtpAuthUsername) { + var ret *string + return ret + } + return o.SmtpAuthUsername +} + +// GetSmtpAuthUsernameOk returns a tuple with the SmtpAuthUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Global) GetSmtpAuthUsernameOk() (*string, bool) { + if o == nil || IsNil(o.SmtpAuthUsername) { + return nil, false + } + return o.SmtpAuthUsername, true +} + +// HasSmtpAuthUsername returns a boolean if a field has been set. +func (o *Global) HasSmtpAuthUsername() bool { + if o != nil && !IsNil(o.SmtpAuthUsername) { + return true + } + + return false +} + +// SetSmtpAuthUsername gets a reference to the given string and assigns it to the SmtpAuthUsername field. +func (o *Global) SetSmtpAuthUsername(v *string) { + o.SmtpAuthUsername = v +} + +// GetSmtpFrom returns the SmtpFrom field value if set, zero value otherwise. +func (o *Global) GetSmtpFrom() *string { + if o == nil || IsNil(o.SmtpFrom) { + var ret *string + return ret + } + return o.SmtpFrom +} + +// GetSmtpFromOk returns a tuple with the SmtpFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Global) GetSmtpFromOk() (*string, bool) { + if o == nil || IsNil(o.SmtpFrom) { + return nil, false + } + return o.SmtpFrom, true +} + +// HasSmtpFrom returns a boolean if a field has been set. +func (o *Global) HasSmtpFrom() bool { + if o != nil && !IsNil(o.SmtpFrom) { + return true + } + + return false +} + +// SetSmtpFrom gets a reference to the given string and assigns it to the SmtpFrom field. +func (o *Global) SetSmtpFrom(v *string) { + o.SmtpFrom = v +} + +// GetSmtpSmarthost returns the SmtpSmarthost field value if set, zero value otherwise. +func (o *Global) GetSmtpSmarthost() *string { + if o == nil || IsNil(o.SmtpSmarthost) { + var ret *string + return ret + } + return o.SmtpSmarthost +} + +// GetSmtpSmarthostOk returns a tuple with the SmtpSmarthost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Global) GetSmtpSmarthostOk() (*string, bool) { + if o == nil || IsNil(o.SmtpSmarthost) { + return nil, false + } + return o.SmtpSmarthost, true +} + +// HasSmtpSmarthost returns a boolean if a field has been set. +func (o *Global) HasSmtpSmarthost() bool { + if o != nil && !IsNil(o.SmtpSmarthost) { + return true + } + + return false +} + +// SetSmtpSmarthost gets a reference to the given string and assigns it to the SmtpSmarthost field. +func (o *Global) SetSmtpSmarthost(v *string) { + o.SmtpSmarthost = v +} + +func (o Global) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.OpsgenieApiKey) { + toSerialize["opsgenieApiKey"] = o.OpsgenieApiKey + } + if !IsNil(o.OpsgenieApiUrl) { + toSerialize["opsgenieApiUrl"] = o.OpsgenieApiUrl + } + if !IsNil(o.ResolveTimeout) { + toSerialize["resolveTimeout"] = o.ResolveTimeout + } + if !IsNil(o.SmtpAuthIdentity) { + toSerialize["smtpAuthIdentity"] = o.SmtpAuthIdentity + } + if !IsNil(o.SmtpAuthPassword) { + toSerialize["smtpAuthPassword"] = o.SmtpAuthPassword + } + if !IsNil(o.SmtpAuthUsername) { + toSerialize["smtpAuthUsername"] = o.SmtpAuthUsername + } + if !IsNil(o.SmtpFrom) { + toSerialize["smtpFrom"] = o.SmtpFrom + } + if !IsNil(o.SmtpSmarthost) { + toSerialize["smtpSmarthost"] = o.SmtpSmarthost + } + return toSerialize, nil +} + +type NullableGlobal struct { + value *Global + isSet bool +} + +func (v NullableGlobal) Get() *Global { + return v.value +} + +func (v *NullableGlobal) Set(val *Global) { + v.value = val + v.isSet = true +} + +func (v NullableGlobal) IsSet() bool { + return v.isSet +} + +func (v *NullableGlobal) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGlobal(val *Global) *NullableGlobal { + return &NullableGlobal{value: val, isSet: true} +} + +func (v NullableGlobal) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGlobal) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_grafana_configs.go b/services/observability/model_grafana_configs.go index 6b5a0ab43..07caf9273 100644 --- a/services/observability/model_grafana_configs.go +++ b/services/observability/model_grafana_configs.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the GrafanaConfigs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GrafanaConfigs{} + // GrafanaConfigs struct for GrafanaConfigs type GrafanaConfigs struct { GenericOauth *GrafanaOauth `json:"genericOauth,omitempty"` @@ -18,3 +25,194 @@ type GrafanaConfigs struct { PublicReadAccess *bool `json:"publicReadAccess,omitempty"` UseStackitSso *bool `json:"useStackitSso,omitempty"` } + +type _GrafanaConfigs GrafanaConfigs + +// NewGrafanaConfigs instantiates a new GrafanaConfigs 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 NewGrafanaConfigs(message *string) *GrafanaConfigs { + this := GrafanaConfigs{} + this.Message = message + return &this +} + +// NewGrafanaConfigsWithDefaults instantiates a new GrafanaConfigs 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 NewGrafanaConfigsWithDefaults() *GrafanaConfigs { + this := GrafanaConfigs{} + return &this +} + +// GetGenericOauth returns the GenericOauth field value if set, zero value otherwise. +func (o *GrafanaConfigs) GetGenericOauth() *GrafanaOauth { + if o == nil || IsNil(o.GenericOauth) { + var ret *GrafanaOauth + return ret + } + return o.GenericOauth +} + +// GetGenericOauthOk returns a tuple with the GenericOauth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GrafanaConfigs) GetGenericOauthOk() (*GrafanaOauth, bool) { + if o == nil || IsNil(o.GenericOauth) { + return nil, false + } + return o.GenericOauth, true +} + +// HasGenericOauth returns a boolean if a field has been set. +func (o *GrafanaConfigs) HasGenericOauth() bool { + if o != nil && !IsNil(o.GenericOauth) { + return true + } + + return false +} + +// SetGenericOauth gets a reference to the given GrafanaOauth and assigns it to the GenericOauth field. +func (o *GrafanaConfigs) SetGenericOauth(v *GrafanaOauth) { + o.GenericOauth = v +} + +// GetMessage returns the Message field value +func (o *GrafanaConfigs) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *GrafanaConfigs) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *GrafanaConfigs) SetMessage(v *string) { + o.Message = v +} + +// GetPublicReadAccess returns the PublicReadAccess field value if set, zero value otherwise. +func (o *GrafanaConfigs) GetPublicReadAccess() *bool { + if o == nil || IsNil(o.PublicReadAccess) { + var ret *bool + return ret + } + return o.PublicReadAccess +} + +// GetPublicReadAccessOk returns a tuple with the PublicReadAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GrafanaConfigs) GetPublicReadAccessOk() (*bool, bool) { + if o == nil || IsNil(o.PublicReadAccess) { + return nil, false + } + return o.PublicReadAccess, true +} + +// HasPublicReadAccess returns a boolean if a field has been set. +func (o *GrafanaConfigs) HasPublicReadAccess() bool { + if o != nil && !IsNil(o.PublicReadAccess) { + return true + } + + return false +} + +// SetPublicReadAccess gets a reference to the given bool and assigns it to the PublicReadAccess field. +func (o *GrafanaConfigs) SetPublicReadAccess(v *bool) { + o.PublicReadAccess = v +} + +// GetUseStackitSso returns the UseStackitSso field value if set, zero value otherwise. +func (o *GrafanaConfigs) GetUseStackitSso() *bool { + if o == nil || IsNil(o.UseStackitSso) { + var ret *bool + return ret + } + return o.UseStackitSso +} + +// GetUseStackitSsoOk returns a tuple with the UseStackitSso field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GrafanaConfigs) GetUseStackitSsoOk() (*bool, bool) { + if o == nil || IsNil(o.UseStackitSso) { + return nil, false + } + return o.UseStackitSso, true +} + +// HasUseStackitSso returns a boolean if a field has been set. +func (o *GrafanaConfigs) HasUseStackitSso() bool { + if o != nil && !IsNil(o.UseStackitSso) { + return true + } + + return false +} + +// SetUseStackitSso gets a reference to the given bool and assigns it to the UseStackitSso field. +func (o *GrafanaConfigs) SetUseStackitSso(v *bool) { + o.UseStackitSso = v +} + +func (o GrafanaConfigs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.GenericOauth) { + toSerialize["genericOauth"] = o.GenericOauth + } + toSerialize["message"] = o.Message + if !IsNil(o.PublicReadAccess) { + toSerialize["publicReadAccess"] = o.PublicReadAccess + } + if !IsNil(o.UseStackitSso) { + toSerialize["useStackitSso"] = o.UseStackitSso + } + return toSerialize, nil +} + +type NullableGrafanaConfigs struct { + value *GrafanaConfigs + isSet bool +} + +func (v NullableGrafanaConfigs) Get() *GrafanaConfigs { + return v.value +} + +func (v *NullableGrafanaConfigs) Set(val *GrafanaConfigs) { + v.value = val + v.isSet = true +} + +func (v NullableGrafanaConfigs) IsSet() bool { + return v.isSet +} + +func (v *NullableGrafanaConfigs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGrafanaConfigs(val *GrafanaConfigs) *NullableGrafanaConfigs { + return &NullableGrafanaConfigs{value: val, isSet: true} +} + +func (v NullableGrafanaConfigs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGrafanaConfigs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_grafana_oauth.go b/services/observability/model_grafana_oauth.go index 3cf87915c..fb0d764c1 100644 --- a/services/observability/model_grafana_oauth.go +++ b/services/observability/model_grafana_oauth.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the GrafanaOauth type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GrafanaOauth{} + // GrafanaOauth struct for GrafanaOauth type GrafanaOauth struct { // REQUIRED @@ -31,3 +38,393 @@ type GrafanaOauth struct { TokenUrl *string `json:"tokenUrl"` UsePkce *bool `json:"usePkce,omitempty"` } + +type _GrafanaOauth GrafanaOauth + +// NewGrafanaOauth instantiates a new GrafanaOauth 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 NewGrafanaOauth(apiUrl *string, authUrl *string, enabled *bool, oauthClientId *string, oauthClientSecret *string, roleAttributePath *string, tokenUrl *string) *GrafanaOauth { + this := GrafanaOauth{} + this.ApiUrl = apiUrl + this.AuthUrl = authUrl + this.Enabled = enabled + this.OauthClientId = oauthClientId + this.OauthClientSecret = oauthClientSecret + this.RoleAttributePath = roleAttributePath + var roleAttributeStrict bool = true + this.RoleAttributeStrict = &roleAttributeStrict + var scopes string = "openid profile email" + this.Scopes = &scopes + this.TokenUrl = tokenUrl + return &this +} + +// NewGrafanaOauthWithDefaults instantiates a new GrafanaOauth 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 NewGrafanaOauthWithDefaults() *GrafanaOauth { + this := GrafanaOauth{} + var roleAttributeStrict bool = true + this.RoleAttributeStrict = &roleAttributeStrict + var scopes string = "openid profile email" + this.Scopes = &scopes + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *GrafanaOauth) GetApiUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *GrafanaOauth) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *GrafanaOauth) SetApiUrl(v *string) { + o.ApiUrl = v +} + +// GetAuthUrl returns the AuthUrl field value +func (o *GrafanaOauth) GetAuthUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.AuthUrl +} + +// GetAuthUrlOk returns a tuple with the AuthUrl field value +// and a boolean to check if the value has been set. +func (o *GrafanaOauth) GetAuthUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AuthUrl, true +} + +// SetAuthUrl sets field value +func (o *GrafanaOauth) SetAuthUrl(v *string) { + o.AuthUrl = v +} + +// GetEnabled returns the Enabled field value +func (o *GrafanaOauth) 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 *GrafanaOauth) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Enabled, true +} + +// SetEnabled sets field value +func (o *GrafanaOauth) SetEnabled(v *bool) { + o.Enabled = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GrafanaOauth) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GrafanaOauth) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GrafanaOauth) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GrafanaOauth) SetName(v *string) { + o.Name = v +} + +// GetOauthClientId returns the OauthClientId field value +func (o *GrafanaOauth) GetOauthClientId() *string { + if o == nil { + var ret *string + return ret + } + + return o.OauthClientId +} + +// GetOauthClientIdOk returns a tuple with the OauthClientId field value +// and a boolean to check if the value has been set. +func (o *GrafanaOauth) GetOauthClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OauthClientId, true +} + +// SetOauthClientId sets field value +func (o *GrafanaOauth) SetOauthClientId(v *string) { + o.OauthClientId = v +} + +// GetOauthClientSecret returns the OauthClientSecret field value +func (o *GrafanaOauth) GetOauthClientSecret() *string { + if o == nil { + var ret *string + return ret + } + + return o.OauthClientSecret +} + +// GetOauthClientSecretOk returns a tuple with the OauthClientSecret field value +// and a boolean to check if the value has been set. +func (o *GrafanaOauth) GetOauthClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OauthClientSecret, true +} + +// SetOauthClientSecret sets field value +func (o *GrafanaOauth) SetOauthClientSecret(v *string) { + o.OauthClientSecret = v +} + +// GetRoleAttributePath returns the RoleAttributePath field value +func (o *GrafanaOauth) GetRoleAttributePath() *string { + if o == nil { + var ret *string + return ret + } + + return o.RoleAttributePath +} + +// GetRoleAttributePathOk returns a tuple with the RoleAttributePath field value +// and a boolean to check if the value has been set. +func (o *GrafanaOauth) GetRoleAttributePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RoleAttributePath, true +} + +// SetRoleAttributePath sets field value +func (o *GrafanaOauth) SetRoleAttributePath(v *string) { + o.RoleAttributePath = v +} + +// GetRoleAttributeStrict returns the RoleAttributeStrict field value if set, zero value otherwise. +func (o *GrafanaOauth) GetRoleAttributeStrict() *bool { + if o == nil || IsNil(o.RoleAttributeStrict) { + var ret *bool + return ret + } + return o.RoleAttributeStrict +} + +// GetRoleAttributeStrictOk returns a tuple with the RoleAttributeStrict field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GrafanaOauth) GetRoleAttributeStrictOk() (*bool, bool) { + if o == nil || IsNil(o.RoleAttributeStrict) { + return nil, false + } + return o.RoleAttributeStrict, true +} + +// HasRoleAttributeStrict returns a boolean if a field has been set. +func (o *GrafanaOauth) HasRoleAttributeStrict() bool { + if o != nil && !IsNil(o.RoleAttributeStrict) { + return true + } + + return false +} + +// SetRoleAttributeStrict gets a reference to the given bool and assigns it to the RoleAttributeStrict field. +func (o *GrafanaOauth) SetRoleAttributeStrict(v *bool) { + o.RoleAttributeStrict = v +} + +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *GrafanaOauth) GetScopes() *string { + if o == nil || IsNil(o.Scopes) { + var ret *string + return ret + } + return o.Scopes +} + +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GrafanaOauth) GetScopesOk() (*string, bool) { + if o == nil || IsNil(o.Scopes) { + return nil, false + } + return o.Scopes, true +} + +// HasScopes returns a boolean if a field has been set. +func (o *GrafanaOauth) HasScopes() bool { + if o != nil && !IsNil(o.Scopes) { + return true + } + + return false +} + +// SetScopes gets a reference to the given string and assigns it to the Scopes field. +func (o *GrafanaOauth) SetScopes(v *string) { + o.Scopes = v +} + +// GetTokenUrl returns the TokenUrl field value +func (o *GrafanaOauth) GetTokenUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.TokenUrl +} + +// GetTokenUrlOk returns a tuple with the TokenUrl field value +// and a boolean to check if the value has been set. +func (o *GrafanaOauth) GetTokenUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TokenUrl, true +} + +// SetTokenUrl sets field value +func (o *GrafanaOauth) SetTokenUrl(v *string) { + o.TokenUrl = v +} + +// GetUsePkce returns the UsePkce field value if set, zero value otherwise. +func (o *GrafanaOauth) GetUsePkce() *bool { + if o == nil || IsNil(o.UsePkce) { + var ret *bool + return ret + } + return o.UsePkce +} + +// GetUsePkceOk returns a tuple with the UsePkce field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GrafanaOauth) GetUsePkceOk() (*bool, bool) { + if o == nil || IsNil(o.UsePkce) { + return nil, false + } + return o.UsePkce, true +} + +// HasUsePkce returns a boolean if a field has been set. +func (o *GrafanaOauth) HasUsePkce() bool { + if o != nil && !IsNil(o.UsePkce) { + return true + } + + return false +} + +// SetUsePkce gets a reference to the given bool and assigns it to the UsePkce field. +func (o *GrafanaOauth) SetUsePkce(v *bool) { + o.UsePkce = v +} + +func (o GrafanaOauth) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiUrl"] = o.ApiUrl + toSerialize["authUrl"] = o.AuthUrl + toSerialize["enabled"] = o.Enabled + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["oauthClientId"] = o.OauthClientId + toSerialize["oauthClientSecret"] = o.OauthClientSecret + toSerialize["roleAttributePath"] = o.RoleAttributePath + if !IsNil(o.RoleAttributeStrict) { + toSerialize["roleAttributeStrict"] = o.RoleAttributeStrict + } + if !IsNil(o.Scopes) { + toSerialize["scopes"] = o.Scopes + } + toSerialize["tokenUrl"] = o.TokenUrl + if !IsNil(o.UsePkce) { + toSerialize["usePkce"] = o.UsePkce + } + return toSerialize, nil +} + +type NullableGrafanaOauth struct { + value *GrafanaOauth + isSet bool +} + +func (v NullableGrafanaOauth) Get() *GrafanaOauth { + return v.value +} + +func (v *NullableGrafanaOauth) Set(val *GrafanaOauth) { + v.value = val + v.isSet = true +} + +func (v NullableGrafanaOauth) IsSet() bool { + return v.isSet +} + +func (v *NullableGrafanaOauth) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGrafanaOauth(val *GrafanaOauth) *NullableGrafanaOauth { + return &NullableGrafanaOauth{value: val, isSet: true} +} + +func (v NullableGrafanaOauth) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGrafanaOauth) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_http_service_sd.go b/services/observability/model_http_service_sd.go index 7793c4de9..a89427428 100644 --- a/services/observability/model_http_service_sd.go +++ b/services/observability/model_http_service_sd.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the HTTPServiceSD type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HTTPServiceSD{} + // HTTPServiceSD struct for HTTPServiceSD type HTTPServiceSD struct { BasicAuth *BasicAuth `json:"basicAuth,omitempty"` @@ -19,3 +26,233 @@ type HTTPServiceSD struct { // REQUIRED Url *string `json:"url"` } + +type _HTTPServiceSD HTTPServiceSD + +// NewHTTPServiceSD instantiates a new HTTPServiceSD 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 NewHTTPServiceSD(url *string) *HTTPServiceSD { + this := HTTPServiceSD{} + var refreshInterval string = "60s" + this.RefreshInterval = &refreshInterval + this.Url = url + return &this +} + +// NewHTTPServiceSDWithDefaults instantiates a new HTTPServiceSD 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 NewHTTPServiceSDWithDefaults() *HTTPServiceSD { + this := HTTPServiceSD{} + var refreshInterval string = "60s" + this.RefreshInterval = &refreshInterval + return &this +} + +// GetBasicAuth returns the BasicAuth field value if set, zero value otherwise. +func (o *HTTPServiceSD) GetBasicAuth() *BasicAuth { + if o == nil || IsNil(o.BasicAuth) { + var ret *BasicAuth + return ret + } + return o.BasicAuth +} + +// GetBasicAuthOk returns a tuple with the BasicAuth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPServiceSD) GetBasicAuthOk() (*BasicAuth, bool) { + if o == nil || IsNil(o.BasicAuth) { + return nil, false + } + return o.BasicAuth, true +} + +// HasBasicAuth returns a boolean if a field has been set. +func (o *HTTPServiceSD) HasBasicAuth() bool { + if o != nil && !IsNil(o.BasicAuth) { + return true + } + + return false +} + +// SetBasicAuth gets a reference to the given BasicAuth and assigns it to the BasicAuth field. +func (o *HTTPServiceSD) SetBasicAuth(v *BasicAuth) { + o.BasicAuth = v +} + +// GetOauth2 returns the Oauth2 field value if set, zero value otherwise. +func (o *HTTPServiceSD) GetOauth2() *OAuth2 { + if o == nil || IsNil(o.Oauth2) { + var ret *OAuth2 + return ret + } + return o.Oauth2 +} + +// GetOauth2Ok returns a tuple with the Oauth2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPServiceSD) GetOauth2Ok() (*OAuth2, bool) { + if o == nil || IsNil(o.Oauth2) { + return nil, false + } + return o.Oauth2, true +} + +// HasOauth2 returns a boolean if a field has been set. +func (o *HTTPServiceSD) HasOauth2() bool { + if o != nil && !IsNil(o.Oauth2) { + return true + } + + return false +} + +// SetOauth2 gets a reference to the given OAuth2 and assigns it to the Oauth2 field. +func (o *HTTPServiceSD) SetOauth2(v *OAuth2) { + o.Oauth2 = v +} + +// GetRefreshInterval returns the RefreshInterval field value if set, zero value otherwise. +func (o *HTTPServiceSD) GetRefreshInterval() *string { + if o == nil || IsNil(o.RefreshInterval) { + var ret *string + return ret + } + return o.RefreshInterval +} + +// GetRefreshIntervalOk returns a tuple with the RefreshInterval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPServiceSD) GetRefreshIntervalOk() (*string, bool) { + if o == nil || IsNil(o.RefreshInterval) { + return nil, false + } + return o.RefreshInterval, true +} + +// HasRefreshInterval returns a boolean if a field has been set. +func (o *HTTPServiceSD) HasRefreshInterval() bool { + if o != nil && !IsNil(o.RefreshInterval) { + return true + } + + return false +} + +// SetRefreshInterval gets a reference to the given string and assigns it to the RefreshInterval field. +func (o *HTTPServiceSD) SetRefreshInterval(v *string) { + o.RefreshInterval = v +} + +// GetTlsConfig returns the TlsConfig field value if set, zero value otherwise. +func (o *HTTPServiceSD) GetTlsConfig() *TLSConfig { + if o == nil || IsNil(o.TlsConfig) { + var ret *TLSConfig + return ret + } + return o.TlsConfig +} + +// GetTlsConfigOk returns a tuple with the TlsConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPServiceSD) GetTlsConfigOk() (*TLSConfig, bool) { + if o == nil || IsNil(o.TlsConfig) { + return nil, false + } + return o.TlsConfig, true +} + +// HasTlsConfig returns a boolean if a field has been set. +func (o *HTTPServiceSD) HasTlsConfig() bool { + if o != nil && !IsNil(o.TlsConfig) { + return true + } + + return false +} + +// SetTlsConfig gets a reference to the given TLSConfig and assigns it to the TlsConfig field. +func (o *HTTPServiceSD) SetTlsConfig(v *TLSConfig) { + o.TlsConfig = v +} + +// GetUrl returns the Url field value +func (o *HTTPServiceSD) GetUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *HTTPServiceSD) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url, true +} + +// SetUrl sets field value +func (o *HTTPServiceSD) SetUrl(v *string) { + o.Url = v +} + +func (o HTTPServiceSD) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasicAuth) { + toSerialize["basicAuth"] = o.BasicAuth + } + if !IsNil(o.Oauth2) { + toSerialize["oauth2"] = o.Oauth2 + } + if !IsNil(o.RefreshInterval) { + toSerialize["refreshInterval"] = o.RefreshInterval + } + if !IsNil(o.TlsConfig) { + toSerialize["tlsConfig"] = o.TlsConfig + } + toSerialize["url"] = o.Url + return toSerialize, nil +} + +type NullableHTTPServiceSD struct { + value *HTTPServiceSD + isSet bool +} + +func (v NullableHTTPServiceSD) Get() *HTTPServiceSD { + return v.value +} + +func (v *NullableHTTPServiceSD) Set(val *HTTPServiceSD) { + v.value = val + v.isSet = true +} + +func (v NullableHTTPServiceSD) IsSet() bool { + return v.isSet +} + +func (v *NullableHTTPServiceSD) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHTTPServiceSD(val *HTTPServiceSD) *NullableHTTPServiceSD { + return &NullableHTTPServiceSD{value: val, isSet: true} +} + +func (v NullableHTTPServiceSD) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHTTPServiceSD) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_inhibit_rules.go b/services/observability/model_inhibit_rules.go index 7b2ce4e5d..18e0c2a5a 100644 --- a/services/observability/model_inhibit_rules.go +++ b/services/observability/model_inhibit_rules.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the InhibitRules type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InhibitRules{} + // InhibitRules struct for InhibitRules type InhibitRules struct { Equal *[]string `json:"equal,omitempty"` @@ -20,3 +27,306 @@ type InhibitRules struct { TargetMatchRe *map[string]string `json:"targetMatchRe,omitempty"` TargetMatchers *[]string `json:"targetMatchers,omitempty"` } + +// NewInhibitRules instantiates a new InhibitRules 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 NewInhibitRules() *InhibitRules { + this := InhibitRules{} + return &this +} + +// NewInhibitRulesWithDefaults instantiates a new InhibitRules 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 NewInhibitRulesWithDefaults() *InhibitRules { + this := InhibitRules{} + return &this +} + +// GetEqual returns the Equal field value if set, zero value otherwise. +func (o *InhibitRules) GetEqual() *[]string { + if o == nil || IsNil(o.Equal) { + var ret *[]string + return ret + } + return o.Equal +} + +// GetEqualOk returns a tuple with the Equal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InhibitRules) GetEqualOk() (*[]string, bool) { + if o == nil || IsNil(o.Equal) { + return nil, false + } + return o.Equal, true +} + +// HasEqual returns a boolean if a field has been set. +func (o *InhibitRules) HasEqual() bool { + if o != nil && !IsNil(o.Equal) { + return true + } + + return false +} + +// SetEqual gets a reference to the given []string and assigns it to the Equal field. +func (o *InhibitRules) SetEqual(v *[]string) { + o.Equal = v +} + +// GetSourceMatch returns the SourceMatch field value if set, zero value otherwise. +func (o *InhibitRules) GetSourceMatch() *map[string]string { + if o == nil || IsNil(o.SourceMatch) { + var ret *map[string]string + return ret + } + return o.SourceMatch +} + +// GetSourceMatchOk returns a tuple with the SourceMatch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InhibitRules) GetSourceMatchOk() (*map[string]string, bool) { + if o == nil || IsNil(o.SourceMatch) { + return nil, false + } + return o.SourceMatch, true +} + +// HasSourceMatch returns a boolean if a field has been set. +func (o *InhibitRules) HasSourceMatch() bool { + if o != nil && !IsNil(o.SourceMatch) { + return true + } + + return false +} + +// SetSourceMatch gets a reference to the given map[string]string and assigns it to the SourceMatch field. +func (o *InhibitRules) SetSourceMatch(v *map[string]string) { + o.SourceMatch = v +} + +// GetSourceMatchRe returns the SourceMatchRe field value if set, zero value otherwise. +func (o *InhibitRules) GetSourceMatchRe() *map[string]string { + if o == nil || IsNil(o.SourceMatchRe) { + var ret *map[string]string + return ret + } + return o.SourceMatchRe +} + +// GetSourceMatchReOk returns a tuple with the SourceMatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InhibitRules) GetSourceMatchReOk() (*map[string]string, bool) { + if o == nil || IsNil(o.SourceMatchRe) { + return nil, false + } + return o.SourceMatchRe, true +} + +// HasSourceMatchRe returns a boolean if a field has been set. +func (o *InhibitRules) HasSourceMatchRe() bool { + if o != nil && !IsNil(o.SourceMatchRe) { + return true + } + + return false +} + +// SetSourceMatchRe gets a reference to the given map[string]string and assigns it to the SourceMatchRe field. +func (o *InhibitRules) SetSourceMatchRe(v *map[string]string) { + o.SourceMatchRe = v +} + +// GetSourceMatchers returns the SourceMatchers field value if set, zero value otherwise. +func (o *InhibitRules) GetSourceMatchers() *[]string { + if o == nil || IsNil(o.SourceMatchers) { + var ret *[]string + return ret + } + return o.SourceMatchers +} + +// GetSourceMatchersOk returns a tuple with the SourceMatchers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InhibitRules) GetSourceMatchersOk() (*[]string, bool) { + if o == nil || IsNil(o.SourceMatchers) { + return nil, false + } + return o.SourceMatchers, true +} + +// HasSourceMatchers returns a boolean if a field has been set. +func (o *InhibitRules) HasSourceMatchers() bool { + if o != nil && !IsNil(o.SourceMatchers) { + return true + } + + return false +} + +// SetSourceMatchers gets a reference to the given []string and assigns it to the SourceMatchers field. +func (o *InhibitRules) SetSourceMatchers(v *[]string) { + o.SourceMatchers = v +} + +// GetTargetMatch returns the TargetMatch field value if set, zero value otherwise. +func (o *InhibitRules) GetTargetMatch() *map[string]string { + if o == nil || IsNil(o.TargetMatch) { + var ret *map[string]string + return ret + } + return o.TargetMatch +} + +// GetTargetMatchOk returns a tuple with the TargetMatch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InhibitRules) GetTargetMatchOk() (*map[string]string, bool) { + if o == nil || IsNil(o.TargetMatch) { + return nil, false + } + return o.TargetMatch, true +} + +// HasTargetMatch returns a boolean if a field has been set. +func (o *InhibitRules) HasTargetMatch() bool { + if o != nil && !IsNil(o.TargetMatch) { + return true + } + + return false +} + +// SetTargetMatch gets a reference to the given map[string]string and assigns it to the TargetMatch field. +func (o *InhibitRules) SetTargetMatch(v *map[string]string) { + o.TargetMatch = v +} + +// GetTargetMatchRe returns the TargetMatchRe field value if set, zero value otherwise. +func (o *InhibitRules) GetTargetMatchRe() *map[string]string { + if o == nil || IsNil(o.TargetMatchRe) { + var ret *map[string]string + return ret + } + return o.TargetMatchRe +} + +// GetTargetMatchReOk returns a tuple with the TargetMatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InhibitRules) GetTargetMatchReOk() (*map[string]string, bool) { + if o == nil || IsNil(o.TargetMatchRe) { + return nil, false + } + return o.TargetMatchRe, true +} + +// HasTargetMatchRe returns a boolean if a field has been set. +func (o *InhibitRules) HasTargetMatchRe() bool { + if o != nil && !IsNil(o.TargetMatchRe) { + return true + } + + return false +} + +// SetTargetMatchRe gets a reference to the given map[string]string and assigns it to the TargetMatchRe field. +func (o *InhibitRules) SetTargetMatchRe(v *map[string]string) { + o.TargetMatchRe = v +} + +// GetTargetMatchers returns the TargetMatchers field value if set, zero value otherwise. +func (o *InhibitRules) GetTargetMatchers() *[]string { + if o == nil || IsNil(o.TargetMatchers) { + var ret *[]string + return ret + } + return o.TargetMatchers +} + +// GetTargetMatchersOk returns a tuple with the TargetMatchers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InhibitRules) GetTargetMatchersOk() (*[]string, bool) { + if o == nil || IsNil(o.TargetMatchers) { + return nil, false + } + return o.TargetMatchers, true +} + +// HasTargetMatchers returns a boolean if a field has been set. +func (o *InhibitRules) HasTargetMatchers() bool { + if o != nil && !IsNil(o.TargetMatchers) { + return true + } + + return false +} + +// SetTargetMatchers gets a reference to the given []string and assigns it to the TargetMatchers field. +func (o *InhibitRules) SetTargetMatchers(v *[]string) { + o.TargetMatchers = v +} + +func (o InhibitRules) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Equal) { + toSerialize["equal"] = o.Equal + } + if !IsNil(o.SourceMatch) { + toSerialize["sourceMatch"] = o.SourceMatch + } + if !IsNil(o.SourceMatchRe) { + toSerialize["sourceMatchRe"] = o.SourceMatchRe + } + if !IsNil(o.SourceMatchers) { + toSerialize["sourceMatchers"] = o.SourceMatchers + } + if !IsNil(o.TargetMatch) { + toSerialize["targetMatch"] = o.TargetMatch + } + if !IsNil(o.TargetMatchRe) { + toSerialize["targetMatchRe"] = o.TargetMatchRe + } + if !IsNil(o.TargetMatchers) { + toSerialize["targetMatchers"] = o.TargetMatchers + } + return toSerialize, nil +} + +type NullableInhibitRules struct { + value *InhibitRules + isSet bool +} + +func (v NullableInhibitRules) Get() *InhibitRules { + return v.value +} + +func (v *NullableInhibitRules) Set(val *InhibitRules) { + v.value = val + v.isSet = true +} + +func (v NullableInhibitRules) IsSet() bool { + return v.isSet +} + +func (v *NullableInhibitRules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInhibitRules(val *InhibitRules) *NullableInhibitRules { + return &NullableInhibitRules{value: val, isSet: true} +} + +func (v NullableInhibitRules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInhibitRules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_instance.go b/services/observability/model_instance.go index f44a3861d..20ea53d13 100644 --- a/services/observability/model_instance.go +++ b/services/observability/model_instance.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Instance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Instance{} + // Instance struct for Instance type Instance struct { // REQUIRED @@ -31,3 +38,341 @@ type Instance struct { Plan *PlanModel `json:"plan"` State *string `json:"state,omitempty"` } + +type _Instance Instance + +// NewInstance instantiates a new Instance 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 NewInstance(cluster *string, grafanaPublicReadAccess *bool, grafanaUseStackitSso *bool, instance *string, metricsRetentionTime1h *int64, metricsRetentionTime5m *int64, metricsRetentionTimeRaw *int64, plan *PlanModel) *Instance { + this := Instance{} + this.Cluster = cluster + this.GrafanaPublicReadAccess = grafanaPublicReadAccess + this.GrafanaUseStackitSso = grafanaUseStackitSso + this.Instance = instance + this.MetricsRetentionTime1h = metricsRetentionTime1h + this.MetricsRetentionTime5m = metricsRetentionTime5m + this.MetricsRetentionTimeRaw = metricsRetentionTimeRaw + this.Plan = plan + return &this +} + +// NewInstanceWithDefaults instantiates a new Instance 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 NewInstanceWithDefaults() *Instance { + this := Instance{} + return &this +} + +// GetCluster returns the Cluster field value +func (o *Instance) GetCluster() *string { + if o == nil { + var ret *string + return ret + } + + return o.Cluster +} + +// GetClusterOk returns a tuple with the Cluster field value +// and a boolean to check if the value has been set. +func (o *Instance) GetClusterOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Cluster, true +} + +// SetCluster sets field value +func (o *Instance) SetCluster(v *string) { + o.Cluster = v +} + +// GetGrafanaPublicReadAccess returns the GrafanaPublicReadAccess field value +func (o *Instance) GetGrafanaPublicReadAccess() *bool { + if o == nil { + var ret *bool + return ret + } + + return o.GrafanaPublicReadAccess +} + +// GetGrafanaPublicReadAccessOk returns a tuple with the GrafanaPublicReadAccess field value +// and a boolean to check if the value has been set. +func (o *Instance) GetGrafanaPublicReadAccessOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.GrafanaPublicReadAccess, true +} + +// SetGrafanaPublicReadAccess sets field value +func (o *Instance) SetGrafanaPublicReadAccess(v *bool) { + o.GrafanaPublicReadAccess = v +} + +// GetGrafanaUseStackitSso returns the GrafanaUseStackitSso field value +func (o *Instance) GetGrafanaUseStackitSso() *bool { + if o == nil { + var ret *bool + return ret + } + + return o.GrafanaUseStackitSso +} + +// GetGrafanaUseStackitSsoOk returns a tuple with the GrafanaUseStackitSso field value +// and a boolean to check if the value has been set. +func (o *Instance) GetGrafanaUseStackitSsoOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.GrafanaUseStackitSso, true +} + +// SetGrafanaUseStackitSso sets field value +func (o *Instance) SetGrafanaUseStackitSso(v *bool) { + o.GrafanaUseStackitSso = v +} + +// GetInstance returns the Instance field value +func (o *Instance) GetInstance() *string { + if o == nil { + var ret *string + return ret + } + + return o.Instance +} + +// GetInstanceOk returns a tuple with the Instance field value +// and a boolean to check if the value has been set. +func (o *Instance) GetInstanceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Instance, true +} + +// SetInstance sets field value +func (o *Instance) SetInstance(v *string) { + o.Instance = v +} + +// GetMetricsRetentionTime1h returns the MetricsRetentionTime1h field value +func (o *Instance) GetMetricsRetentionTime1h() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.MetricsRetentionTime1h +} + +// GetMetricsRetentionTime1hOk returns a tuple with the MetricsRetentionTime1h field value +// and a boolean to check if the value has been set. +func (o *Instance) GetMetricsRetentionTime1hOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTime1h, true +} + +// SetMetricsRetentionTime1h sets field value +func (o *Instance) SetMetricsRetentionTime1h(v *int64) { + o.MetricsRetentionTime1h = v +} + +// GetMetricsRetentionTime5m returns the MetricsRetentionTime5m field value +func (o *Instance) GetMetricsRetentionTime5m() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.MetricsRetentionTime5m +} + +// GetMetricsRetentionTime5mOk returns a tuple with the MetricsRetentionTime5m field value +// and a boolean to check if the value has been set. +func (o *Instance) GetMetricsRetentionTime5mOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTime5m, true +} + +// SetMetricsRetentionTime5m sets field value +func (o *Instance) SetMetricsRetentionTime5m(v *int64) { + o.MetricsRetentionTime5m = v +} + +// GetMetricsRetentionTimeRaw returns the MetricsRetentionTimeRaw field value +func (o *Instance) GetMetricsRetentionTimeRaw() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.MetricsRetentionTimeRaw +} + +// GetMetricsRetentionTimeRawOk returns a tuple with the MetricsRetentionTimeRaw field value +// and a boolean to check if the value has been set. +func (o *Instance) GetMetricsRetentionTimeRawOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTimeRaw, true +} + +// SetMetricsRetentionTimeRaw sets field value +func (o *Instance) SetMetricsRetentionTimeRaw(v *int64) { + o.MetricsRetentionTimeRaw = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Instance) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Instance) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Instance) SetName(v *string) { + o.Name = v +} + +// GetPlan returns the Plan field value +func (o *Instance) GetPlan() *PlanModel { + if o == nil { + var ret *PlanModel + return ret + } + + return o.Plan +} + +// GetPlanOk returns a tuple with the Plan field value +// and a boolean to check if the value has been set. +func (o *Instance) GetPlanOk() (*PlanModel, bool) { + if o == nil { + return nil, false + } + return o.Plan, true +} + +// SetPlan sets field value +func (o *Instance) SetPlan(v *PlanModel) { + o.Plan = v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *Instance) GetState() *string { + if o == nil || IsNil(o.State) { + var ret *string + return ret + } + return o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *Instance) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *Instance) SetState(v *string) { + o.State = v +} + +func (o Instance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cluster"] = o.Cluster + toSerialize["grafanaPublicReadAccess"] = o.GrafanaPublicReadAccess + toSerialize["grafanaUseStackitSso"] = o.GrafanaUseStackitSso + toSerialize["instance"] = o.Instance + toSerialize["metricsRetentionTime1h"] = o.MetricsRetentionTime1h + toSerialize["metricsRetentionTime5m"] = o.MetricsRetentionTime5m + toSerialize["metricsRetentionTimeRaw"] = o.MetricsRetentionTimeRaw + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["plan"] = o.Plan + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableInstance struct { + value *Instance + isSet bool +} + +func (v NullableInstance) Get() *Instance { + return v.value +} + +func (v *NullableInstance) Set(val *Instance) { + v.value = val + v.isSet = true +} + +func (v NullableInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstance(val *Instance) *NullableInstance { + return &NullableInstance{value: val, isSet: true} +} + +func (v NullableInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_instance_response.go b/services/observability/model_instance_response.go index 2f5f4cf18..27f7f8fdf 100644 --- a/services/observability/model_instance_response.go +++ b/services/observability/model_instance_response.go @@ -10,8 +10,101 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the InstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceResponse{} + // InstanceResponse struct for InstanceResponse type InstanceResponse struct { // REQUIRED Message *string `json:"message"` } + +type _InstanceResponse InstanceResponse + +// NewInstanceResponse instantiates a new InstanceResponse 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 NewInstanceResponse(message *string) *InstanceResponse { + this := InstanceResponse{} + this.Message = message + return &this +} + +// NewInstanceResponseWithDefaults instantiates a new InstanceResponse 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 NewInstanceResponseWithDefaults() *InstanceResponse { + this := InstanceResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *InstanceResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *InstanceResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *InstanceResponse) SetMessage(v *string) { + o.Message = v +} + +func (o InstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableInstanceResponse struct { + value *InstanceResponse + isSet bool +} + +func (v NullableInstanceResponse) Get() *InstanceResponse { + return v.value +} + +func (v *NullableInstanceResponse) Set(val *InstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceResponse(val *InstanceResponse) *NullableInstanceResponse { + return &NullableInstanceResponse{value: val, isSet: true} +} + +func (v NullableInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_instance_sensitive_data.go b/services/observability/model_instance_sensitive_data.go index fd7356f3d..3d6847196 100644 --- a/services/observability/model_instance_sensitive_data.go +++ b/services/observability/model_instance_sensitive_data.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the InstanceSensitiveData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceSensitiveData{} + // InstanceSensitiveData struct for InstanceSensitiveData type InstanceSensitiveData struct { // REQUIRED @@ -58,3 +65,674 @@ type InstanceSensitiveData struct { // REQUIRED ZipkinSpansUrl *string `json:"zipkinSpansUrl"` } + +type _InstanceSensitiveData InstanceSensitiveData + +// NewInstanceSensitiveData instantiates a new InstanceSensitiveData 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 NewInstanceSensitiveData(alertingUrl *string, cluster *string, dashboardUrl *string, grafanaAdminPassword *string, grafanaAdminUser *string, grafanaPublicReadAccess *bool, grafanaUrl *string, grafanaUseStackitSso *bool, instance *string, jaegerTracesUrl *string, jaegerUiUrl *string, logsPushUrl *string, logsUrl *string, metricsRetentionTime1h *int64, metricsRetentionTime5m *int64, metricsRetentionTimeRaw *int64, metricsUrl *string, otlpTracesUrl *string, plan *PlanModel, pushMetricsUrl *string, targetsUrl *string, zipkinSpansUrl *string) *InstanceSensitiveData { + this := InstanceSensitiveData{} + this.AlertingUrl = alertingUrl + this.Cluster = cluster + this.DashboardUrl = dashboardUrl + this.GrafanaAdminPassword = grafanaAdminPassword + this.GrafanaAdminUser = grafanaAdminUser + this.GrafanaPublicReadAccess = grafanaPublicReadAccess + this.GrafanaUrl = grafanaUrl + this.GrafanaUseStackitSso = grafanaUseStackitSso + this.Instance = instance + this.JaegerTracesUrl = jaegerTracesUrl + this.JaegerUiUrl = jaegerUiUrl + this.LogsPushUrl = logsPushUrl + this.LogsUrl = logsUrl + this.MetricsRetentionTime1h = metricsRetentionTime1h + this.MetricsRetentionTime5m = metricsRetentionTime5m + this.MetricsRetentionTimeRaw = metricsRetentionTimeRaw + this.MetricsUrl = metricsUrl + var name string = "" + this.Name = &name + this.OtlpTracesUrl = otlpTracesUrl + this.Plan = plan + this.PushMetricsUrl = pushMetricsUrl + this.TargetsUrl = targetsUrl + this.ZipkinSpansUrl = zipkinSpansUrl + return &this +} + +// NewInstanceSensitiveDataWithDefaults instantiates a new InstanceSensitiveData 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 NewInstanceSensitiveDataWithDefaults() *InstanceSensitiveData { + this := InstanceSensitiveData{} + var name string = "" + this.Name = &name + return &this +} + +// GetAlertingUrl returns the AlertingUrl field value +func (o *InstanceSensitiveData) GetAlertingUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.AlertingUrl +} + +// GetAlertingUrlOk returns a tuple with the AlertingUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetAlertingUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AlertingUrl, true +} + +// SetAlertingUrl sets field value +func (o *InstanceSensitiveData) SetAlertingUrl(v *string) { + o.AlertingUrl = v +} + +// GetCluster returns the Cluster field value +func (o *InstanceSensitiveData) GetCluster() *string { + if o == nil { + var ret *string + return ret + } + + return o.Cluster +} + +// GetClusterOk returns a tuple with the Cluster field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetClusterOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Cluster, true +} + +// SetCluster sets field value +func (o *InstanceSensitiveData) SetCluster(v *string) { + o.Cluster = v +} + +// GetDashboardUrl returns the DashboardUrl field value +func (o *InstanceSensitiveData) GetDashboardUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.DashboardUrl +} + +// GetDashboardUrlOk returns a tuple with the DashboardUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetDashboardUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DashboardUrl, true +} + +// SetDashboardUrl sets field value +func (o *InstanceSensitiveData) SetDashboardUrl(v *string) { + o.DashboardUrl = v +} + +// GetGrafanaAdminPassword returns the GrafanaAdminPassword field value +func (o *InstanceSensitiveData) GetGrafanaAdminPassword() *string { + if o == nil { + var ret *string + return ret + } + + return o.GrafanaAdminPassword +} + +// GetGrafanaAdminPasswordOk returns a tuple with the GrafanaAdminPassword field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetGrafanaAdminPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GrafanaAdminPassword, true +} + +// SetGrafanaAdminPassword sets field value +func (o *InstanceSensitiveData) SetGrafanaAdminPassword(v *string) { + o.GrafanaAdminPassword = v +} + +// GetGrafanaAdminUser returns the GrafanaAdminUser field value +func (o *InstanceSensitiveData) GetGrafanaAdminUser() *string { + if o == nil { + var ret *string + return ret + } + + return o.GrafanaAdminUser +} + +// GetGrafanaAdminUserOk returns a tuple with the GrafanaAdminUser field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetGrafanaAdminUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GrafanaAdminUser, true +} + +// SetGrafanaAdminUser sets field value +func (o *InstanceSensitiveData) SetGrafanaAdminUser(v *string) { + o.GrafanaAdminUser = v +} + +// GetGrafanaPublicReadAccess returns the GrafanaPublicReadAccess field value +func (o *InstanceSensitiveData) GetGrafanaPublicReadAccess() *bool { + if o == nil { + var ret *bool + return ret + } + + return o.GrafanaPublicReadAccess +} + +// GetGrafanaPublicReadAccessOk returns a tuple with the GrafanaPublicReadAccess field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetGrafanaPublicReadAccessOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.GrafanaPublicReadAccess, true +} + +// SetGrafanaPublicReadAccess sets field value +func (o *InstanceSensitiveData) SetGrafanaPublicReadAccess(v *bool) { + o.GrafanaPublicReadAccess = v +} + +// GetGrafanaUrl returns the GrafanaUrl field value +func (o *InstanceSensitiveData) GetGrafanaUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.GrafanaUrl +} + +// GetGrafanaUrlOk returns a tuple with the GrafanaUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetGrafanaUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GrafanaUrl, true +} + +// SetGrafanaUrl sets field value +func (o *InstanceSensitiveData) SetGrafanaUrl(v *string) { + o.GrafanaUrl = v +} + +// GetGrafanaUseStackitSso returns the GrafanaUseStackitSso field value +func (o *InstanceSensitiveData) GetGrafanaUseStackitSso() *bool { + if o == nil { + var ret *bool + return ret + } + + return o.GrafanaUseStackitSso +} + +// GetGrafanaUseStackitSsoOk returns a tuple with the GrafanaUseStackitSso field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetGrafanaUseStackitSsoOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.GrafanaUseStackitSso, true +} + +// SetGrafanaUseStackitSso sets field value +func (o *InstanceSensitiveData) SetGrafanaUseStackitSso(v *bool) { + o.GrafanaUseStackitSso = v +} + +// GetInstance returns the Instance field value +func (o *InstanceSensitiveData) GetInstance() *string { + if o == nil { + var ret *string + return ret + } + + return o.Instance +} + +// GetInstanceOk returns a tuple with the Instance field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetInstanceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Instance, true +} + +// SetInstance sets field value +func (o *InstanceSensitiveData) SetInstance(v *string) { + o.Instance = v +} + +// GetJaegerTracesUrl returns the JaegerTracesUrl field value +func (o *InstanceSensitiveData) GetJaegerTracesUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.JaegerTracesUrl +} + +// GetJaegerTracesUrlOk returns a tuple with the JaegerTracesUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetJaegerTracesUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.JaegerTracesUrl, true +} + +// SetJaegerTracesUrl sets field value +func (o *InstanceSensitiveData) SetJaegerTracesUrl(v *string) { + o.JaegerTracesUrl = v +} + +// GetJaegerUiUrl returns the JaegerUiUrl field value +func (o *InstanceSensitiveData) GetJaegerUiUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.JaegerUiUrl +} + +// GetJaegerUiUrlOk returns a tuple with the JaegerUiUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetJaegerUiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.JaegerUiUrl, true +} + +// SetJaegerUiUrl sets field value +func (o *InstanceSensitiveData) SetJaegerUiUrl(v *string) { + o.JaegerUiUrl = v +} + +// GetLogsPushUrl returns the LogsPushUrl field value +func (o *InstanceSensitiveData) GetLogsPushUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.LogsPushUrl +} + +// GetLogsPushUrlOk returns a tuple with the LogsPushUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetLogsPushUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LogsPushUrl, true +} + +// SetLogsPushUrl sets field value +func (o *InstanceSensitiveData) SetLogsPushUrl(v *string) { + o.LogsPushUrl = v +} + +// GetLogsUrl returns the LogsUrl field value +func (o *InstanceSensitiveData) GetLogsUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.LogsUrl +} + +// GetLogsUrlOk returns a tuple with the LogsUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetLogsUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LogsUrl, true +} + +// SetLogsUrl sets field value +func (o *InstanceSensitiveData) SetLogsUrl(v *string) { + o.LogsUrl = v +} + +// GetMetricsRetentionTime1h returns the MetricsRetentionTime1h field value +func (o *InstanceSensitiveData) GetMetricsRetentionTime1h() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.MetricsRetentionTime1h +} + +// GetMetricsRetentionTime1hOk returns a tuple with the MetricsRetentionTime1h field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetMetricsRetentionTime1hOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTime1h, true +} + +// SetMetricsRetentionTime1h sets field value +func (o *InstanceSensitiveData) SetMetricsRetentionTime1h(v *int64) { + o.MetricsRetentionTime1h = v +} + +// GetMetricsRetentionTime5m returns the MetricsRetentionTime5m field value +func (o *InstanceSensitiveData) GetMetricsRetentionTime5m() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.MetricsRetentionTime5m +} + +// GetMetricsRetentionTime5mOk returns a tuple with the MetricsRetentionTime5m field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetMetricsRetentionTime5mOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTime5m, true +} + +// SetMetricsRetentionTime5m sets field value +func (o *InstanceSensitiveData) SetMetricsRetentionTime5m(v *int64) { + o.MetricsRetentionTime5m = v +} + +// GetMetricsRetentionTimeRaw returns the MetricsRetentionTimeRaw field value +func (o *InstanceSensitiveData) GetMetricsRetentionTimeRaw() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.MetricsRetentionTimeRaw +} + +// GetMetricsRetentionTimeRawOk returns a tuple with the MetricsRetentionTimeRaw field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetMetricsRetentionTimeRawOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTimeRaw, true +} + +// SetMetricsRetentionTimeRaw sets field value +func (o *InstanceSensitiveData) SetMetricsRetentionTimeRaw(v *int64) { + o.MetricsRetentionTimeRaw = v +} + +// GetMetricsUrl returns the MetricsUrl field value +func (o *InstanceSensitiveData) GetMetricsUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.MetricsUrl +} + +// GetMetricsUrlOk returns a tuple with the MetricsUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetMetricsUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetricsUrl, true +} + +// SetMetricsUrl sets field value +func (o *InstanceSensitiveData) SetMetricsUrl(v *string) { + o.MetricsUrl = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *InstanceSensitiveData) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *InstanceSensitiveData) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *InstanceSensitiveData) SetName(v *string) { + o.Name = v +} + +// GetOtlpTracesUrl returns the OtlpTracesUrl field value +func (o *InstanceSensitiveData) GetOtlpTracesUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.OtlpTracesUrl +} + +// GetOtlpTracesUrlOk returns a tuple with the OtlpTracesUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetOtlpTracesUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OtlpTracesUrl, true +} + +// SetOtlpTracesUrl sets field value +func (o *InstanceSensitiveData) SetOtlpTracesUrl(v *string) { + o.OtlpTracesUrl = v +} + +// GetPlan returns the Plan field value +func (o *InstanceSensitiveData) GetPlan() *PlanModel { + if o == nil { + var ret *PlanModel + return ret + } + + return o.Plan +} + +// GetPlanOk returns a tuple with the Plan field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetPlanOk() (*PlanModel, bool) { + if o == nil { + return nil, false + } + return o.Plan, true +} + +// SetPlan sets field value +func (o *InstanceSensitiveData) SetPlan(v *PlanModel) { + o.Plan = v +} + +// GetPushMetricsUrl returns the PushMetricsUrl field value +func (o *InstanceSensitiveData) GetPushMetricsUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.PushMetricsUrl +} + +// GetPushMetricsUrlOk returns a tuple with the PushMetricsUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetPushMetricsUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PushMetricsUrl, true +} + +// SetPushMetricsUrl sets field value +func (o *InstanceSensitiveData) SetPushMetricsUrl(v *string) { + o.PushMetricsUrl = v +} + +// GetTargetsUrl returns the TargetsUrl field value +func (o *InstanceSensitiveData) GetTargetsUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.TargetsUrl +} + +// GetTargetsUrlOk returns a tuple with the TargetsUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetTargetsUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TargetsUrl, true +} + +// SetTargetsUrl sets field value +func (o *InstanceSensitiveData) SetTargetsUrl(v *string) { + o.TargetsUrl = v +} + +// GetZipkinSpansUrl returns the ZipkinSpansUrl field value +func (o *InstanceSensitiveData) GetZipkinSpansUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.ZipkinSpansUrl +} + +// GetZipkinSpansUrlOk returns a tuple with the ZipkinSpansUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetZipkinSpansUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ZipkinSpansUrl, true +} + +// SetZipkinSpansUrl sets field value +func (o *InstanceSensitiveData) SetZipkinSpansUrl(v *string) { + o.ZipkinSpansUrl = v +} + +func (o InstanceSensitiveData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["alertingUrl"] = o.AlertingUrl + toSerialize["cluster"] = o.Cluster + toSerialize["dashboardUrl"] = o.DashboardUrl + toSerialize["grafanaAdminPassword"] = o.GrafanaAdminPassword + toSerialize["grafanaAdminUser"] = o.GrafanaAdminUser + toSerialize["grafanaPublicReadAccess"] = o.GrafanaPublicReadAccess + toSerialize["grafanaUrl"] = o.GrafanaUrl + toSerialize["grafanaUseStackitSso"] = o.GrafanaUseStackitSso + toSerialize["instance"] = o.Instance + toSerialize["jaegerTracesUrl"] = o.JaegerTracesUrl + toSerialize["jaegerUiUrl"] = o.JaegerUiUrl + toSerialize["logsPushUrl"] = o.LogsPushUrl + toSerialize["logsUrl"] = o.LogsUrl + toSerialize["metricsRetentionTime1h"] = o.MetricsRetentionTime1h + toSerialize["metricsRetentionTime5m"] = o.MetricsRetentionTime5m + toSerialize["metricsRetentionTimeRaw"] = o.MetricsRetentionTimeRaw + toSerialize["metricsUrl"] = o.MetricsUrl + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["otlpTracesUrl"] = o.OtlpTracesUrl + toSerialize["plan"] = o.Plan + toSerialize["pushMetricsUrl"] = o.PushMetricsUrl + toSerialize["targetsUrl"] = o.TargetsUrl + toSerialize["zipkinSpansUrl"] = o.ZipkinSpansUrl + return toSerialize, nil +} + +type NullableInstanceSensitiveData struct { + value *InstanceSensitiveData + isSet bool +} + +func (v NullableInstanceSensitiveData) Get() *InstanceSensitiveData { + return v.value +} + +func (v *NullableInstanceSensitiveData) Set(val *InstanceSensitiveData) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceSensitiveData) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceSensitiveData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceSensitiveData(val *InstanceSensitiveData) *NullableInstanceSensitiveData { + return &NullableInstanceSensitiveData{value: val, isSet: true} +} + +func (v NullableInstanceSensitiveData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceSensitiveData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_job.go b/services/observability/model_job.go index a376e1aff..ed6597b11 100644 --- a/services/observability/model_job.go +++ b/services/observability/model_job.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Job type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Job{} + // Job struct for Job type Job struct { BasicAuth *BasicAuth `json:"basicAuth,omitempty"` @@ -33,3 +40,603 @@ type Job struct { StaticConfigs *[]StaticConfigs `json:"staticConfigs"` TlsConfig *TLSConfig `json:"tlsConfig,omitempty"` } + +type _Job Job + +// NewJob instantiates a new Job 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 NewJob(jobName *string, scrapeInterval *string, scrapeTimeout *string, staticConfigs *[]StaticConfigs) *Job { + this := Job{} + var honorLabels bool = false + this.HonorLabels = &honorLabels + var honorTimeStamps bool = false + this.HonorTimeStamps = &honorTimeStamps + this.JobName = jobName + var metricsPath string = "/metrics" + this.MetricsPath = &metricsPath + var scheme string = "http" + this.Scheme = &scheme + this.ScrapeInterval = scrapeInterval + this.ScrapeTimeout = scrapeTimeout + this.StaticConfigs = staticConfigs + return &this +} + +// NewJobWithDefaults instantiates a new Job 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 NewJobWithDefaults() *Job { + this := Job{} + var honorLabels bool = false + this.HonorLabels = &honorLabels + var honorTimeStamps bool = false + this.HonorTimeStamps = &honorTimeStamps + var metricsPath string = "/metrics" + this.MetricsPath = &metricsPath + var scheme string = "http" + this.Scheme = &scheme + return &this +} + +// GetBasicAuth returns the BasicAuth field value if set, zero value otherwise. +func (o *Job) GetBasicAuth() *BasicAuth { + if o == nil || IsNil(o.BasicAuth) { + var ret *BasicAuth + return ret + } + return o.BasicAuth +} + +// GetBasicAuthOk returns a tuple with the BasicAuth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetBasicAuthOk() (*BasicAuth, bool) { + if o == nil || IsNil(o.BasicAuth) { + return nil, false + } + return o.BasicAuth, true +} + +// HasBasicAuth returns a boolean if a field has been set. +func (o *Job) HasBasicAuth() bool { + if o != nil && !IsNil(o.BasicAuth) { + return true + } + + return false +} + +// SetBasicAuth gets a reference to the given BasicAuth and assigns it to the BasicAuth field. +func (o *Job) SetBasicAuth(v *BasicAuth) { + o.BasicAuth = v +} + +// GetBearerToken returns the BearerToken field value if set, zero value otherwise. +func (o *Job) GetBearerToken() *string { + if o == nil || IsNil(o.BearerToken) { + var ret *string + return ret + } + return o.BearerToken +} + +// GetBearerTokenOk returns a tuple with the BearerToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetBearerTokenOk() (*string, bool) { + if o == nil || IsNil(o.BearerToken) { + return nil, false + } + return o.BearerToken, true +} + +// HasBearerToken returns a boolean if a field has been set. +func (o *Job) HasBearerToken() bool { + if o != nil && !IsNil(o.BearerToken) { + return true + } + + return false +} + +// SetBearerToken gets a reference to the given string and assigns it to the BearerToken field. +func (o *Job) SetBearerToken(v *string) { + o.BearerToken = v +} + +// GetHonorLabels returns the HonorLabels field value if set, zero value otherwise. +func (o *Job) GetHonorLabels() *bool { + if o == nil || IsNil(o.HonorLabels) { + var ret *bool + return ret + } + return o.HonorLabels +} + +// GetHonorLabelsOk returns a tuple with the HonorLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetHonorLabelsOk() (*bool, bool) { + if o == nil || IsNil(o.HonorLabels) { + return nil, false + } + return o.HonorLabels, true +} + +// HasHonorLabels returns a boolean if a field has been set. +func (o *Job) HasHonorLabels() bool { + if o != nil && !IsNil(o.HonorLabels) { + return true + } + + return false +} + +// SetHonorLabels gets a reference to the given bool and assigns it to the HonorLabels field. +func (o *Job) SetHonorLabels(v *bool) { + o.HonorLabels = v +} + +// GetHonorTimeStamps returns the HonorTimeStamps field value if set, zero value otherwise. +func (o *Job) GetHonorTimeStamps() *bool { + if o == nil || IsNil(o.HonorTimeStamps) { + var ret *bool + return ret + } + return o.HonorTimeStamps +} + +// GetHonorTimeStampsOk returns a tuple with the HonorTimeStamps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetHonorTimeStampsOk() (*bool, bool) { + if o == nil || IsNil(o.HonorTimeStamps) { + return nil, false + } + return o.HonorTimeStamps, true +} + +// HasHonorTimeStamps returns a boolean if a field has been set. +func (o *Job) HasHonorTimeStamps() bool { + if o != nil && !IsNil(o.HonorTimeStamps) { + return true + } + + return false +} + +// SetHonorTimeStamps gets a reference to the given bool and assigns it to the HonorTimeStamps field. +func (o *Job) SetHonorTimeStamps(v *bool) { + o.HonorTimeStamps = v +} + +// GetHttpSdConfigs returns the HttpSdConfigs field value if set, zero value otherwise. +func (o *Job) GetHttpSdConfigs() *[]HTTPServiceSD { + if o == nil || IsNil(o.HttpSdConfigs) { + var ret *[]HTTPServiceSD + return ret + } + return o.HttpSdConfigs +} + +// GetHttpSdConfigsOk returns a tuple with the HttpSdConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetHttpSdConfigsOk() (*[]HTTPServiceSD, bool) { + if o == nil || IsNil(o.HttpSdConfigs) { + return nil, false + } + return o.HttpSdConfigs, true +} + +// HasHttpSdConfigs returns a boolean if a field has been set. +func (o *Job) HasHttpSdConfigs() bool { + if o != nil && !IsNil(o.HttpSdConfigs) { + return true + } + + return false +} + +// SetHttpSdConfigs gets a reference to the given []HTTPServiceSD and assigns it to the HttpSdConfigs field. +func (o *Job) SetHttpSdConfigs(v *[]HTTPServiceSD) { + o.HttpSdConfigs = v +} + +// GetJobName returns the JobName field value +func (o *Job) GetJobName() *string { + if o == nil { + var ret *string + return ret + } + + return o.JobName +} + +// GetJobNameOk returns a tuple with the JobName field value +// and a boolean to check if the value has been set. +func (o *Job) GetJobNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.JobName, true +} + +// SetJobName sets field value +func (o *Job) SetJobName(v *string) { + o.JobName = v +} + +// GetMetricsPath returns the MetricsPath field value if set, zero value otherwise. +func (o *Job) GetMetricsPath() *string { + if o == nil || IsNil(o.MetricsPath) { + var ret *string + return ret + } + return o.MetricsPath +} + +// GetMetricsPathOk returns a tuple with the MetricsPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetMetricsPathOk() (*string, bool) { + if o == nil || IsNil(o.MetricsPath) { + return nil, false + } + return o.MetricsPath, true +} + +// HasMetricsPath returns a boolean if a field has been set. +func (o *Job) HasMetricsPath() bool { + if o != nil && !IsNil(o.MetricsPath) { + return true + } + + return false +} + +// SetMetricsPath gets a reference to the given string and assigns it to the MetricsPath field. +func (o *Job) SetMetricsPath(v *string) { + o.MetricsPath = v +} + +// GetMetricsRelabelConfigs returns the MetricsRelabelConfigs field value if set, zero value otherwise. +func (o *Job) GetMetricsRelabelConfigs() *[]MetricsRelabelConfig { + if o == nil || IsNil(o.MetricsRelabelConfigs) { + var ret *[]MetricsRelabelConfig + return ret + } + return o.MetricsRelabelConfigs +} + +// GetMetricsRelabelConfigsOk returns a tuple with the MetricsRelabelConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetMetricsRelabelConfigsOk() (*[]MetricsRelabelConfig, bool) { + if o == nil || IsNil(o.MetricsRelabelConfigs) { + return nil, false + } + return o.MetricsRelabelConfigs, true +} + +// HasMetricsRelabelConfigs returns a boolean if a field has been set. +func (o *Job) HasMetricsRelabelConfigs() bool { + if o != nil && !IsNil(o.MetricsRelabelConfigs) { + return true + } + + return false +} + +// SetMetricsRelabelConfigs gets a reference to the given []MetricsRelabelConfig and assigns it to the MetricsRelabelConfigs field. +func (o *Job) SetMetricsRelabelConfigs(v *[]MetricsRelabelConfig) { + o.MetricsRelabelConfigs = v +} + +// GetOauth2 returns the Oauth2 field value if set, zero value otherwise. +func (o *Job) GetOauth2() *OAuth2 { + if o == nil || IsNil(o.Oauth2) { + var ret *OAuth2 + return ret + } + return o.Oauth2 +} + +// GetOauth2Ok returns a tuple with the Oauth2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetOauth2Ok() (*OAuth2, bool) { + if o == nil || IsNil(o.Oauth2) { + return nil, false + } + return o.Oauth2, true +} + +// HasOauth2 returns a boolean if a field has been set. +func (o *Job) HasOauth2() bool { + if o != nil && !IsNil(o.Oauth2) { + return true + } + + return false +} + +// SetOauth2 gets a reference to the given OAuth2 and assigns it to the Oauth2 field. +func (o *Job) SetOauth2(v *OAuth2) { + o.Oauth2 = v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *Job) GetParams() *map[string][]string { + if o == nil || IsNil(o.Params) { + var ret *map[string][]string + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetParamsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Params) { + return nil, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *Job) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string][]string and assigns it to the Params field. +func (o *Job) SetParams(v *map[string][]string) { + o.Params = v +} + +// GetSampleLimit returns the SampleLimit field value if set, zero value otherwise. +func (o *Job) GetSampleLimit() *int64 { + if o == nil || IsNil(o.SampleLimit) { + var ret *int64 + return ret + } + return o.SampleLimit +} + +// GetSampleLimitOk returns a tuple with the SampleLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetSampleLimitOk() (*int64, bool) { + if o == nil || IsNil(o.SampleLimit) { + return nil, false + } + return o.SampleLimit, true +} + +// HasSampleLimit returns a boolean if a field has been set. +func (o *Job) HasSampleLimit() bool { + if o != nil && !IsNil(o.SampleLimit) { + return true + } + + return false +} + +// SetSampleLimit gets a reference to the given int64 and assigns it to the SampleLimit field. +func (o *Job) SetSampleLimit(v *int64) { + o.SampleLimit = v +} + +// GetScheme returns the Scheme field value if set, zero value otherwise. +func (o *Job) GetScheme() *string { + if o == nil || IsNil(o.Scheme) { + var ret *string + return ret + } + return o.Scheme +} + +// GetSchemeOk returns a tuple with the Scheme field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetSchemeOk() (*string, bool) { + if o == nil || IsNil(o.Scheme) { + return nil, false + } + return o.Scheme, true +} + +// HasScheme returns a boolean if a field has been set. +func (o *Job) HasScheme() bool { + if o != nil && !IsNil(o.Scheme) { + return true + } + + return false +} + +// SetScheme gets a reference to the given string and assigns it to the Scheme field. +func (o *Job) SetScheme(v *string) { + o.Scheme = v +} + +// GetScrapeInterval returns the ScrapeInterval field value +func (o *Job) GetScrapeInterval() *string { + if o == nil { + var ret *string + return ret + } + + return o.ScrapeInterval +} + +// GetScrapeIntervalOk returns a tuple with the ScrapeInterval field value +// and a boolean to check if the value has been set. +func (o *Job) GetScrapeIntervalOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ScrapeInterval, true +} + +// SetScrapeInterval sets field value +func (o *Job) SetScrapeInterval(v *string) { + o.ScrapeInterval = v +} + +// GetScrapeTimeout returns the ScrapeTimeout field value +func (o *Job) GetScrapeTimeout() *string { + if o == nil { + var ret *string + return ret + } + + return o.ScrapeTimeout +} + +// GetScrapeTimeoutOk returns a tuple with the ScrapeTimeout field value +// and a boolean to check if the value has been set. +func (o *Job) GetScrapeTimeoutOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ScrapeTimeout, true +} + +// SetScrapeTimeout sets field value +func (o *Job) SetScrapeTimeout(v *string) { + o.ScrapeTimeout = v +} + +// GetStaticConfigs returns the StaticConfigs field value +func (o *Job) GetStaticConfigs() *[]StaticConfigs { + if o == nil { + var ret *[]StaticConfigs + return ret + } + + return o.StaticConfigs +} + +// GetStaticConfigsOk returns a tuple with the StaticConfigs field value +// and a boolean to check if the value has been set. +func (o *Job) GetStaticConfigsOk() (*[]StaticConfigs, bool) { + if o == nil { + return nil, false + } + return o.StaticConfigs, true +} + +// SetStaticConfigs sets field value +func (o *Job) SetStaticConfigs(v *[]StaticConfigs) { + o.StaticConfigs = v +} + +// GetTlsConfig returns the TlsConfig field value if set, zero value otherwise. +func (o *Job) GetTlsConfig() *TLSConfig { + if o == nil || IsNil(o.TlsConfig) { + var ret *TLSConfig + return ret + } + return o.TlsConfig +} + +// GetTlsConfigOk returns a tuple with the TlsConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Job) GetTlsConfigOk() (*TLSConfig, bool) { + if o == nil || IsNil(o.TlsConfig) { + return nil, false + } + return o.TlsConfig, true +} + +// HasTlsConfig returns a boolean if a field has been set. +func (o *Job) HasTlsConfig() bool { + if o != nil && !IsNil(o.TlsConfig) { + return true + } + + return false +} + +// SetTlsConfig gets a reference to the given TLSConfig and assigns it to the TlsConfig field. +func (o *Job) SetTlsConfig(v *TLSConfig) { + o.TlsConfig = v +} + +func (o Job) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasicAuth) { + toSerialize["basicAuth"] = o.BasicAuth + } + if !IsNil(o.BearerToken) { + toSerialize["bearerToken"] = o.BearerToken + } + if !IsNil(o.HonorLabels) { + toSerialize["honorLabels"] = o.HonorLabels + } + if !IsNil(o.HonorTimeStamps) { + toSerialize["honorTimeStamps"] = o.HonorTimeStamps + } + if !IsNil(o.HttpSdConfigs) { + toSerialize["httpSdConfigs"] = o.HttpSdConfigs + } + toSerialize["jobName"] = o.JobName + if !IsNil(o.MetricsPath) { + toSerialize["metricsPath"] = o.MetricsPath + } + if !IsNil(o.MetricsRelabelConfigs) { + toSerialize["metricsRelabelConfigs"] = o.MetricsRelabelConfigs + } + if !IsNil(o.Oauth2) { + toSerialize["oauth2"] = o.Oauth2 + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.SampleLimit) { + toSerialize["sampleLimit"] = o.SampleLimit + } + if !IsNil(o.Scheme) { + toSerialize["scheme"] = o.Scheme + } + toSerialize["scrapeInterval"] = o.ScrapeInterval + toSerialize["scrapeTimeout"] = o.ScrapeTimeout + toSerialize["staticConfigs"] = o.StaticConfigs + if !IsNil(o.TlsConfig) { + toSerialize["tlsConfig"] = o.TlsConfig + } + return toSerialize, nil +} + +type NullableJob struct { + value *Job + isSet bool +} + +func (v NullableJob) Get() *Job { + return v.value +} + +func (v *NullableJob) Set(val *Job) { + v.value = val + v.isSet = true +} + +func (v NullableJob) IsSet() bool { + return v.isSet +} + +func (v *NullableJob) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJob(val *Job) *NullableJob { + return &NullableJob{value: val, isSet: true} +} + +func (v NullableJob) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJob) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_list_acl_response.go b/services/observability/model_list_acl_response.go index ad6023941..6e9696b27 100644 --- a/services/observability/model_list_acl_response.go +++ b/services/observability/model_list_acl_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the ListACLResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListACLResponse{} + // ListACLResponse struct for ListACLResponse type ListACLResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type ListACLResponse struct { // REQUIRED Message *string `json:"message"` } + +type _ListACLResponse ListACLResponse + +// NewListACLResponse instantiates a new ListACLResponse 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 NewListACLResponse(acl *[]string, message *string) *ListACLResponse { + this := ListACLResponse{} + this.Acl = acl + this.Message = message + return &this +} + +// NewListACLResponseWithDefaults instantiates a new ListACLResponse 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 NewListACLResponseWithDefaults() *ListACLResponse { + this := ListACLResponse{} + return &this +} + +// GetAcl returns the Acl field value +func (o *ListACLResponse) GetAcl() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *ListACLResponse) GetAclOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *ListACLResponse) SetAcl(v *[]string) { + o.Acl = v +} + +// GetMessage returns the Message field value +func (o *ListACLResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ListACLResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *ListACLResponse) SetMessage(v *string) { + o.Message = v +} + +func (o ListACLResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableListACLResponse struct { + value *ListACLResponse + isSet bool +} + +func (v NullableListACLResponse) Get() *ListACLResponse { + return v.value +} + +func (v *NullableListACLResponse) Set(val *ListACLResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListACLResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListACLResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListACLResponse(val *ListACLResponse) *NullableListACLResponse { + return &NullableListACLResponse{value: val, isSet: true} +} + +func (v NullableListACLResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListACLResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_list_credentials_response.go b/services/observability/model_list_credentials_response.go index c37cdd2b3..c370646b7 100644 --- a/services/observability/model_list_credentials_response.go +++ b/services/observability/model_list_credentials_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCredentialsResponse{} + // ListCredentialsResponse struct for ListCredentialsResponse type ListCredentialsResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type ListCredentialsResponse struct { // REQUIRED Message *string `json:"message"` } + +type _ListCredentialsResponse ListCredentialsResponse + +// NewListCredentialsResponse instantiates a new ListCredentialsResponse 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 NewListCredentialsResponse(credentials *[]ServiceKeysList, message *string) *ListCredentialsResponse { + this := ListCredentialsResponse{} + this.Credentials = credentials + this.Message = message + return &this +} + +// NewListCredentialsResponseWithDefaults instantiates a new ListCredentialsResponse 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 NewListCredentialsResponseWithDefaults() *ListCredentialsResponse { + this := ListCredentialsResponse{} + return &this +} + +// GetCredentials returns the Credentials field value +func (o *ListCredentialsResponse) GetCredentials() *[]ServiceKeysList { + if o == nil { + var ret *[]ServiceKeysList + return ret + } + + return o.Credentials +} + +// GetCredentialsOk returns a tuple with the Credentials field value +// and a boolean to check if the value has been set. +func (o *ListCredentialsResponse) GetCredentialsOk() (*[]ServiceKeysList, bool) { + if o == nil { + return nil, false + } + return o.Credentials, true +} + +// SetCredentials sets field value +func (o *ListCredentialsResponse) SetCredentials(v *[]ServiceKeysList) { + o.Credentials = v +} + +// GetMessage returns the Message field value +func (o *ListCredentialsResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ListCredentialsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *ListCredentialsResponse) SetMessage(v *string) { + o.Message = v +} + +func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["credentials"] = o.Credentials + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableListCredentialsResponse struct { + value *ListCredentialsResponse + isSet bool +} + +func (v NullableListCredentialsResponse) Get() *ListCredentialsResponse { + return v.value +} + +func (v *NullableListCredentialsResponse) Set(val *ListCredentialsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListCredentialsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListCredentialsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCredentialsResponse(val *ListCredentialsResponse) *NullableListCredentialsResponse { + return &NullableListCredentialsResponse{value: val, isSet: true} +} + +func (v NullableListCredentialsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCredentialsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_list_instances_response.go b/services/observability/model_list_instances_response.go index b769b1bbf..56c544e4f 100644 --- a/services/observability/model_list_instances_response.go +++ b/services/observability/model_list_instances_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the ListInstancesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListInstancesResponse{} + // ListInstancesResponse struct for ListInstancesResponse type ListInstancesResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type ListInstancesResponse struct { // REQUIRED Message *string `json:"message"` } + +type _ListInstancesResponse ListInstancesResponse + +// NewListInstancesResponse instantiates a new ListInstancesResponse 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 NewListInstancesResponse(instances *[]ProjectInstanceFull, message *string) *ListInstancesResponse { + this := ListInstancesResponse{} + this.Instances = instances + this.Message = message + return &this +} + +// NewListInstancesResponseWithDefaults instantiates a new ListInstancesResponse 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 NewListInstancesResponseWithDefaults() *ListInstancesResponse { + this := ListInstancesResponse{} + return &this +} + +// GetInstances returns the Instances field value +func (o *ListInstancesResponse) GetInstances() *[]ProjectInstanceFull { + if o == nil { + var ret *[]ProjectInstanceFull + return ret + } + + return o.Instances +} + +// GetInstancesOk returns a tuple with the Instances field value +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetInstancesOk() (*[]ProjectInstanceFull, bool) { + if o == nil { + return nil, false + } + return o.Instances, true +} + +// SetInstances sets field value +func (o *ListInstancesResponse) SetInstances(v *[]ProjectInstanceFull) { + o.Instances = v +} + +// GetMessage returns the Message field value +func (o *ListInstancesResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *ListInstancesResponse) SetMessage(v *string) { + o.Message = v +} + +func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["instances"] = o.Instances + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableListInstancesResponse struct { + value *ListInstancesResponse + isSet bool +} + +func (v NullableListInstancesResponse) Get() *ListInstancesResponse { + return v.value +} + +func (v *NullableListInstancesResponse) Set(val *ListInstancesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListInstancesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListInstancesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListInstancesResponse(val *ListInstancesResponse) *NullableListInstancesResponse { + return &NullableListInstancesResponse{value: val, isSet: true} +} + +func (v NullableListInstancesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListInstancesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_list_scrape_configs_response.go b/services/observability/model_list_scrape_configs_response.go index dc7181188..4bea64ad0 100644 --- a/services/observability/model_list_scrape_configs_response.go +++ b/services/observability/model_list_scrape_configs_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the ListScrapeConfigsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListScrapeConfigsResponse{} + // ListScrapeConfigsResponse struct for ListScrapeConfigsResponse type ListScrapeConfigsResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type ListScrapeConfigsResponse struct { // REQUIRED Message *string `json:"message"` } + +type _ListScrapeConfigsResponse ListScrapeConfigsResponse + +// NewListScrapeConfigsResponse instantiates a new ListScrapeConfigsResponse 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 NewListScrapeConfigsResponse(data *[]Job, message *string) *ListScrapeConfigsResponse { + this := ListScrapeConfigsResponse{} + this.Data = data + this.Message = message + return &this +} + +// NewListScrapeConfigsResponseWithDefaults instantiates a new ListScrapeConfigsResponse 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 NewListScrapeConfigsResponseWithDefaults() *ListScrapeConfigsResponse { + this := ListScrapeConfigsResponse{} + return &this +} + +// GetData returns the Data field value +func (o *ListScrapeConfigsResponse) GetData() *[]Job { + if o == nil { + var ret *[]Job + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ListScrapeConfigsResponse) GetDataOk() (*[]Job, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *ListScrapeConfigsResponse) SetData(v *[]Job) { + o.Data = v +} + +// GetMessage returns the Message field value +func (o *ListScrapeConfigsResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ListScrapeConfigsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *ListScrapeConfigsResponse) SetMessage(v *string) { + o.Message = v +} + +func (o ListScrapeConfigsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableListScrapeConfigsResponse struct { + value *ListScrapeConfigsResponse + isSet bool +} + +func (v NullableListScrapeConfigsResponse) Get() *ListScrapeConfigsResponse { + return v.value +} + +func (v *NullableListScrapeConfigsResponse) Set(val *ListScrapeConfigsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListScrapeConfigsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListScrapeConfigsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListScrapeConfigsResponse(val *ListScrapeConfigsResponse) *NullableListScrapeConfigsResponse { + return &NullableListScrapeConfigsResponse{value: val, isSet: true} +} + +func (v NullableListScrapeConfigsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListScrapeConfigsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_message.go b/services/observability/model_message.go index 6f7efa8fc..3002d0dd2 100644 --- a/services/observability/model_message.go +++ b/services/observability/model_message.go @@ -10,8 +10,101 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Message type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Message{} + // Message struct for Message type Message struct { // REQUIRED Message *string `json:"message"` } + +type _Message Message + +// NewMessage instantiates a new Message 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 NewMessage(message *string) *Message { + this := Message{} + this.Message = message + return &this +} + +// NewMessageWithDefaults instantiates a new Message 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 NewMessageWithDefaults() *Message { + this := Message{} + return &this +} + +// GetMessage returns the Message field value +func (o *Message) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *Message) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *Message) SetMessage(v *string) { + o.Message = v +} + +func (o Message) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableMessage struct { + value *Message + isSet bool +} + +func (v NullableMessage) Get() *Message { + return v.value +} + +func (v *NullableMessage) Set(val *Message) { + v.value = val + v.isSet = true +} + +func (v NullableMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMessage(val *Message) *NullableMessage { + return &NullableMessage{value: val, isSet: true} +} + +func (v NullableMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_metrics_relabel_config.go b/services/observability/model_metrics_relabel_config.go index a5d80a4be..dadb0df4e 100644 --- a/services/observability/model_metrics_relabel_config.go +++ b/services/observability/model_metrics_relabel_config.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the MetricsRelabelConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MetricsRelabelConfig{} + // MetricsRelabelConfig struct for MetricsRelabelConfig type MetricsRelabelConfig struct { Action *string `json:"action,omitempty"` @@ -21,3 +28,315 @@ type MetricsRelabelConfig struct { SourceLabels *[]string `json:"sourceLabels"` TargetLabel *string `json:"targetLabel,omitempty"` } + +type _MetricsRelabelConfig MetricsRelabelConfig + +// NewMetricsRelabelConfig instantiates a new MetricsRelabelConfig 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 NewMetricsRelabelConfig(sourceLabels *[]string) *MetricsRelabelConfig { + this := MetricsRelabelConfig{} + var action string = "replace" + this.Action = &action + var regex string = ".*" + this.Regex = ®ex + var replacement string = "$1" + this.Replacement = &replacement + var separator string = ";" + this.Separator = &separator + this.SourceLabels = sourceLabels + return &this +} + +// NewMetricsRelabelConfigWithDefaults instantiates a new MetricsRelabelConfig 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 NewMetricsRelabelConfigWithDefaults() *MetricsRelabelConfig { + this := MetricsRelabelConfig{} + var action string = "replace" + this.Action = &action + var regex string = ".*" + this.Regex = ®ex + var replacement string = "$1" + this.Replacement = &replacement + var separator string = ";" + this.Separator = &separator + return &this +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *MetricsRelabelConfig) GetAction() *string { + if o == nil || IsNil(o.Action) { + var ret *string + return ret + } + return o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MetricsRelabelConfig) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *MetricsRelabelConfig) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *MetricsRelabelConfig) SetAction(v *string) { + o.Action = v +} + +// GetModulus returns the Modulus field value if set, zero value otherwise. +func (o *MetricsRelabelConfig) GetModulus() *int64 { + if o == nil || IsNil(o.Modulus) { + var ret *int64 + return ret + } + return o.Modulus +} + +// GetModulusOk returns a tuple with the Modulus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MetricsRelabelConfig) GetModulusOk() (*int64, bool) { + if o == nil || IsNil(o.Modulus) { + return nil, false + } + return o.Modulus, true +} + +// HasModulus returns a boolean if a field has been set. +func (o *MetricsRelabelConfig) HasModulus() bool { + if o != nil && !IsNil(o.Modulus) { + return true + } + + return false +} + +// SetModulus gets a reference to the given int64 and assigns it to the Modulus field. +func (o *MetricsRelabelConfig) SetModulus(v *int64) { + o.Modulus = v +} + +// GetRegex returns the Regex field value if set, zero value otherwise. +func (o *MetricsRelabelConfig) GetRegex() *string { + if o == nil || IsNil(o.Regex) { + var ret *string + return ret + } + return o.Regex +} + +// GetRegexOk returns a tuple with the Regex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MetricsRelabelConfig) GetRegexOk() (*string, bool) { + if o == nil || IsNil(o.Regex) { + return nil, false + } + return o.Regex, true +} + +// HasRegex returns a boolean if a field has been set. +func (o *MetricsRelabelConfig) HasRegex() bool { + if o != nil && !IsNil(o.Regex) { + return true + } + + return false +} + +// SetRegex gets a reference to the given string and assigns it to the Regex field. +func (o *MetricsRelabelConfig) SetRegex(v *string) { + o.Regex = v +} + +// GetReplacement returns the Replacement field value if set, zero value otherwise. +func (o *MetricsRelabelConfig) GetReplacement() *string { + if o == nil || IsNil(o.Replacement) { + var ret *string + return ret + } + return o.Replacement +} + +// GetReplacementOk returns a tuple with the Replacement field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MetricsRelabelConfig) GetReplacementOk() (*string, bool) { + if o == nil || IsNil(o.Replacement) { + return nil, false + } + return o.Replacement, true +} + +// HasReplacement returns a boolean if a field has been set. +func (o *MetricsRelabelConfig) HasReplacement() bool { + if o != nil && !IsNil(o.Replacement) { + return true + } + + return false +} + +// SetReplacement gets a reference to the given string and assigns it to the Replacement field. +func (o *MetricsRelabelConfig) SetReplacement(v *string) { + o.Replacement = v +} + +// GetSeparator returns the Separator field value if set, zero value otherwise. +func (o *MetricsRelabelConfig) GetSeparator() *string { + if o == nil || IsNil(o.Separator) { + var ret *string + return ret + } + return o.Separator +} + +// GetSeparatorOk returns a tuple with the Separator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MetricsRelabelConfig) GetSeparatorOk() (*string, bool) { + if o == nil || IsNil(o.Separator) { + return nil, false + } + return o.Separator, true +} + +// HasSeparator returns a boolean if a field has been set. +func (o *MetricsRelabelConfig) HasSeparator() bool { + if o != nil && !IsNil(o.Separator) { + return true + } + + return false +} + +// SetSeparator gets a reference to the given string and assigns it to the Separator field. +func (o *MetricsRelabelConfig) SetSeparator(v *string) { + o.Separator = v +} + +// GetSourceLabels returns the SourceLabels field value +func (o *MetricsRelabelConfig) GetSourceLabels() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.SourceLabels +} + +// GetSourceLabelsOk returns a tuple with the SourceLabels field value +// and a boolean to check if the value has been set. +func (o *MetricsRelabelConfig) GetSourceLabelsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.SourceLabels, true +} + +// SetSourceLabels sets field value +func (o *MetricsRelabelConfig) SetSourceLabels(v *[]string) { + o.SourceLabels = v +} + +// GetTargetLabel returns the TargetLabel field value if set, zero value otherwise. +func (o *MetricsRelabelConfig) GetTargetLabel() *string { + if o == nil || IsNil(o.TargetLabel) { + var ret *string + return ret + } + return o.TargetLabel +} + +// GetTargetLabelOk returns a tuple with the TargetLabel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MetricsRelabelConfig) GetTargetLabelOk() (*string, bool) { + if o == nil || IsNil(o.TargetLabel) { + return nil, false + } + return o.TargetLabel, true +} + +// HasTargetLabel returns a boolean if a field has been set. +func (o *MetricsRelabelConfig) HasTargetLabel() bool { + if o != nil && !IsNil(o.TargetLabel) { + return true + } + + return false +} + +// SetTargetLabel gets a reference to the given string and assigns it to the TargetLabel field. +func (o *MetricsRelabelConfig) SetTargetLabel(v *string) { + o.TargetLabel = v +} + +func (o MetricsRelabelConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.Modulus) { + toSerialize["modulus"] = o.Modulus + } + if !IsNil(o.Regex) { + toSerialize["regex"] = o.Regex + } + if !IsNil(o.Replacement) { + toSerialize["replacement"] = o.Replacement + } + if !IsNil(o.Separator) { + toSerialize["separator"] = o.Separator + } + toSerialize["sourceLabels"] = o.SourceLabels + if !IsNil(o.TargetLabel) { + toSerialize["targetLabel"] = o.TargetLabel + } + return toSerialize, nil +} + +type NullableMetricsRelabelConfig struct { + value *MetricsRelabelConfig + isSet bool +} + +func (v NullableMetricsRelabelConfig) Get() *MetricsRelabelConfig { + return v.value +} + +func (v *NullableMetricsRelabelConfig) Set(val *MetricsRelabelConfig) { + v.value = val + v.isSet = true +} + +func (v NullableMetricsRelabelConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableMetricsRelabelConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetricsRelabelConfig(val *MetricsRelabelConfig) *NullableMetricsRelabelConfig { + return &NullableMetricsRelabelConfig{value: val, isSet: true} +} + +func (v NullableMetricsRelabelConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetricsRelabelConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_o_auth2.go b/services/observability/model_o_auth2.go index 367cd844a..e5df143a4 100644 --- a/services/observability/model_o_auth2.go +++ b/services/observability/model_o_auth2.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the OAuth2 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OAuth2{} + // OAuth2 struct for OAuth2 type OAuth2 struct { // REQUIRED @@ -21,3 +28,211 @@ type OAuth2 struct { // REQUIRED TokenUrl *string `json:"tokenUrl"` } + +type _OAuth2 OAuth2 + +// NewOAuth2 instantiates a new OAuth2 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 NewOAuth2(clientId *string, clientSecret *string, tokenUrl *string) *OAuth2 { + this := OAuth2{} + this.ClientId = clientId + this.ClientSecret = clientSecret + this.TokenUrl = tokenUrl + return &this +} + +// NewOAuth2WithDefaults instantiates a new OAuth2 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 NewOAuth2WithDefaults() *OAuth2 { + this := OAuth2{} + return &this +} + +// GetClientId returns the ClientId field value +func (o *OAuth2) GetClientId() *string { + if o == nil { + var ret *string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *OAuth2) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientId, true +} + +// SetClientId sets field value +func (o *OAuth2) SetClientId(v *string) { + o.ClientId = v +} + +// GetClientSecret returns the ClientSecret field value +func (o *OAuth2) GetClientSecret() *string { + if o == nil { + var ret *string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *OAuth2) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *OAuth2) SetClientSecret(v *string) { + o.ClientSecret = v +} + +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *OAuth2) GetScopes() *[]string { + if o == nil || IsNil(o.Scopes) { + var ret *[]string + return ret + } + return o.Scopes +} + +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2) GetScopesOk() (*[]string, bool) { + if o == nil || IsNil(o.Scopes) { + return nil, false + } + return o.Scopes, true +} + +// HasScopes returns a boolean if a field has been set. +func (o *OAuth2) HasScopes() bool { + if o != nil && !IsNil(o.Scopes) { + return true + } + + return false +} + +// SetScopes gets a reference to the given []string and assigns it to the Scopes field. +func (o *OAuth2) SetScopes(v *[]string) { + o.Scopes = v +} + +// GetTlsConfig returns the TlsConfig field value if set, zero value otherwise. +func (o *OAuth2) GetTlsConfig() *TLSConfig { + if o == nil || IsNil(o.TlsConfig) { + var ret *TLSConfig + return ret + } + return o.TlsConfig +} + +// GetTlsConfigOk returns a tuple with the TlsConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2) GetTlsConfigOk() (*TLSConfig, bool) { + if o == nil || IsNil(o.TlsConfig) { + return nil, false + } + return o.TlsConfig, true +} + +// HasTlsConfig returns a boolean if a field has been set. +func (o *OAuth2) HasTlsConfig() bool { + if o != nil && !IsNil(o.TlsConfig) { + return true + } + + return false +} + +// SetTlsConfig gets a reference to the given TLSConfig and assigns it to the TlsConfig field. +func (o *OAuth2) SetTlsConfig(v *TLSConfig) { + o.TlsConfig = v +} + +// GetTokenUrl returns the TokenUrl field value +func (o *OAuth2) GetTokenUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.TokenUrl +} + +// GetTokenUrlOk returns a tuple with the TokenUrl field value +// and a boolean to check if the value has been set. +func (o *OAuth2) GetTokenUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TokenUrl, true +} + +// SetTokenUrl sets field value +func (o *OAuth2) SetTokenUrl(v *string) { + o.TokenUrl = v +} + +func (o OAuth2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["clientId"] = o.ClientId + toSerialize["clientSecret"] = o.ClientSecret + if !IsNil(o.Scopes) { + toSerialize["scopes"] = o.Scopes + } + if !IsNil(o.TlsConfig) { + toSerialize["tlsConfig"] = o.TlsConfig + } + toSerialize["tokenUrl"] = o.TokenUrl + return toSerialize, nil +} + +type NullableOAuth2 struct { + value *OAuth2 + isSet bool +} + +func (v NullableOAuth2) Get() *OAuth2 { + return v.value +} + +func (v *NullableOAuth2) Set(val *OAuth2) { + v.value = val + v.isSet = true +} + +func (v NullableOAuth2) IsSet() bool { + return v.isSet +} + +func (v *NullableOAuth2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOAuth2(val *OAuth2) *NullableOAuth2 { + return &NullableOAuth2{value: val, isSet: true} +} + +func (v NullableOAuth2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOAuth2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_opsgenie_config.go b/services/observability/model_opsgenie_config.go index 9ad8069b0..ca8f7d2ab 100644 --- a/services/observability/model_opsgenie_config.go +++ b/services/observability/model_opsgenie_config.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the OpsgenieConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OpsgenieConfig{} + // OpsgenieConfig struct for OpsgenieConfig type OpsgenieConfig struct { ApiKey *string `json:"apiKey,omitempty"` @@ -18,3 +25,240 @@ type OpsgenieConfig struct { SendResolved *bool `json:"sendResolved,omitempty"` Tags *string `json:"tags,omitempty"` } + +// NewOpsgenieConfig instantiates a new OpsgenieConfig 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 NewOpsgenieConfig() *OpsgenieConfig { + this := OpsgenieConfig{} + var sendResolved bool = true + this.SendResolved = &sendResolved + return &this +} + +// NewOpsgenieConfigWithDefaults instantiates a new OpsgenieConfig 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 NewOpsgenieConfigWithDefaults() *OpsgenieConfig { + this := OpsgenieConfig{} + var sendResolved bool = true + this.SendResolved = &sendResolved + return &this +} + +// GetApiKey returns the ApiKey field value if set, zero value otherwise. +func (o *OpsgenieConfig) GetApiKey() *string { + if o == nil || IsNil(o.ApiKey) { + var ret *string + return ret + } + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpsgenieConfig) GetApiKeyOk() (*string, bool) { + if o == nil || IsNil(o.ApiKey) { + return nil, false + } + return o.ApiKey, true +} + +// HasApiKey returns a boolean if a field has been set. +func (o *OpsgenieConfig) HasApiKey() bool { + if o != nil && !IsNil(o.ApiKey) { + return true + } + + return false +} + +// SetApiKey gets a reference to the given string and assigns it to the ApiKey field. +func (o *OpsgenieConfig) SetApiKey(v *string) { + o.ApiKey = v +} + +// GetApiUrl returns the ApiUrl field value if set, zero value otherwise. +func (o *OpsgenieConfig) GetApiUrl() *string { + if o == nil || IsNil(o.ApiUrl) { + var ret *string + return ret + } + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpsgenieConfig) GetApiUrlOk() (*string, bool) { + if o == nil || IsNil(o.ApiUrl) { + return nil, false + } + return o.ApiUrl, true +} + +// HasApiUrl returns a boolean if a field has been set. +func (o *OpsgenieConfig) HasApiUrl() bool { + if o != nil && !IsNil(o.ApiUrl) { + return true + } + + return false +} + +// SetApiUrl gets a reference to the given string and assigns it to the ApiUrl field. +func (o *OpsgenieConfig) SetApiUrl(v *string) { + o.ApiUrl = v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *OpsgenieConfig) GetPriority() *string { + if o == nil || IsNil(o.Priority) { + var ret *string + return ret + } + return o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpsgenieConfig) GetPriorityOk() (*string, bool) { + if o == nil || IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *OpsgenieConfig) HasPriority() bool { + if o != nil && !IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given string and assigns it to the Priority field. +func (o *OpsgenieConfig) SetPriority(v *string) { + o.Priority = v +} + +// GetSendResolved returns the SendResolved field value if set, zero value otherwise. +func (o *OpsgenieConfig) GetSendResolved() *bool { + if o == nil || IsNil(o.SendResolved) { + var ret *bool + return ret + } + return o.SendResolved +} + +// GetSendResolvedOk returns a tuple with the SendResolved field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpsgenieConfig) GetSendResolvedOk() (*bool, bool) { + if o == nil || IsNil(o.SendResolved) { + return nil, false + } + return o.SendResolved, true +} + +// HasSendResolved returns a boolean if a field has been set. +func (o *OpsgenieConfig) HasSendResolved() bool { + if o != nil && !IsNil(o.SendResolved) { + return true + } + + return false +} + +// SetSendResolved gets a reference to the given bool and assigns it to the SendResolved field. +func (o *OpsgenieConfig) SetSendResolved(v *bool) { + o.SendResolved = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *OpsgenieConfig) GetTags() *string { + if o == nil || IsNil(o.Tags) { + var ret *string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpsgenieConfig) GetTagsOk() (*string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *OpsgenieConfig) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given string and assigns it to the Tags field. +func (o *OpsgenieConfig) SetTags(v *string) { + o.Tags = v +} + +func (o OpsgenieConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ApiKey) { + toSerialize["apiKey"] = o.ApiKey + } + if !IsNil(o.ApiUrl) { + toSerialize["apiUrl"] = o.ApiUrl + } + if !IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + if !IsNil(o.SendResolved) { + toSerialize["sendResolved"] = o.SendResolved + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + return toSerialize, nil +} + +type NullableOpsgenieConfig struct { + value *OpsgenieConfig + isSet bool +} + +func (v NullableOpsgenieConfig) Get() *OpsgenieConfig { + return v.value +} + +func (v *NullableOpsgenieConfig) Set(val *OpsgenieConfig) { + v.value = val + v.isSet = true +} + +func (v NullableOpsgenieConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableOpsgenieConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOpsgenieConfig(val *OpsgenieConfig) *NullableOpsgenieConfig { + return &NullableOpsgenieConfig{value: val, isSet: true} +} + +func (v NullableOpsgenieConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOpsgenieConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_permission_denied.go b/services/observability/model_permission_denied.go index 97ff1c639..8a57d2a74 100644 --- a/services/observability/model_permission_denied.go +++ b/services/observability/model_permission_denied.go @@ -10,8 +10,101 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the PermissionDenied type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PermissionDenied{} + // PermissionDenied struct for PermissionDenied type PermissionDenied struct { // REQUIRED Detail *string `json:"detail"` } + +type _PermissionDenied PermissionDenied + +// NewPermissionDenied instantiates a new PermissionDenied 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 NewPermissionDenied(detail *string) *PermissionDenied { + this := PermissionDenied{} + this.Detail = detail + return &this +} + +// NewPermissionDeniedWithDefaults instantiates a new PermissionDenied 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 NewPermissionDeniedWithDefaults() *PermissionDenied { + this := PermissionDenied{} + return &this +} + +// GetDetail returns the Detail field value +func (o *PermissionDenied) GetDetail() *string { + if o == nil { + var ret *string + return ret + } + + return o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value +// and a boolean to check if the value has been set. +func (o *PermissionDenied) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail, true +} + +// SetDetail sets field value +func (o *PermissionDenied) SetDetail(v *string) { + o.Detail = v +} + +func (o PermissionDenied) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["detail"] = o.Detail + return toSerialize, nil +} + +type NullablePermissionDenied struct { + value *PermissionDenied + isSet bool +} + +func (v NullablePermissionDenied) Get() *PermissionDenied { + return v.value +} + +func (v *NullablePermissionDenied) Set(val *PermissionDenied) { + v.value = val + v.isSet = true +} + +func (v NullablePermissionDenied) IsSet() bool { + return v.isSet +} + +func (v *NullablePermissionDenied) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePermissionDenied(val *PermissionDenied) *NullablePermissionDenied { + return &NullablePermissionDenied{value: val, isSet: true} +} + +func (v NullablePermissionDenied) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePermissionDenied) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_plan.go b/services/observability/model_plan.go index adfff2c43..dceb6fe11 100644 --- a/services/observability/model_plan.go +++ b/services/observability/model_plan.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Plan type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Plan{} + // Plan struct for Plan type Plan struct { // REQUIRED @@ -51,3 +58,701 @@ type Plan struct { // REQUIRED TracesStorage *int64 `json:"tracesStorage"` } + +type _Plan Plan + +// NewPlan instantiates a new Plan 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 NewPlan(alertMatchers *int64, alertReceivers *int64, alertRules *int64, bucketSize *int64, grafanaGlobalDashboards *int64, grafanaGlobalOrgs *int64, grafanaGlobalSessions *int64, grafanaGlobalUsers *int64, id *string, logsAlert *int64, logsStorage *int64, planId *string, samplesPerScrape *int64, targetNumber *int64, totalMetricSamples *int64, tracesStorage *int64) *Plan { + this := Plan{} + this.AlertMatchers = alertMatchers + this.AlertReceivers = alertReceivers + this.AlertRules = alertRules + this.BucketSize = bucketSize + this.GrafanaGlobalDashboards = grafanaGlobalDashboards + this.GrafanaGlobalOrgs = grafanaGlobalOrgs + this.GrafanaGlobalSessions = grafanaGlobalSessions + this.GrafanaGlobalUsers = grafanaGlobalUsers + this.Id = id + var isFree bool = false + this.IsFree = &isFree + var isPublic bool = true + this.IsPublic = &isPublic + this.LogsAlert = logsAlert + this.LogsStorage = logsStorage + this.PlanId = planId + this.SamplesPerScrape = samplesPerScrape + var schema string = "" + this.Schema = &schema + this.TargetNumber = targetNumber + this.TotalMetricSamples = totalMetricSamples + this.TracesStorage = tracesStorage + return &this +} + +// NewPlanWithDefaults instantiates a new Plan 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 NewPlanWithDefaults() *Plan { + this := Plan{} + var isFree bool = false + this.IsFree = &isFree + var isPublic bool = true + this.IsPublic = &isPublic + var schema string = "" + this.Schema = &schema + return &this +} + +// GetAlertMatchers returns the AlertMatchers field value +func (o *Plan) GetAlertMatchers() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.AlertMatchers +} + +// GetAlertMatchersOk returns a tuple with the AlertMatchers field value +// and a boolean to check if the value has been set. +func (o *Plan) GetAlertMatchersOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.AlertMatchers, true +} + +// SetAlertMatchers sets field value +func (o *Plan) SetAlertMatchers(v *int64) { + o.AlertMatchers = v +} + +// GetAlertReceivers returns the AlertReceivers field value +func (o *Plan) GetAlertReceivers() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.AlertReceivers +} + +// GetAlertReceiversOk returns a tuple with the AlertReceivers field value +// and a boolean to check if the value has been set. +func (o *Plan) GetAlertReceiversOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.AlertReceivers, true +} + +// SetAlertReceivers sets field value +func (o *Plan) SetAlertReceivers(v *int64) { + o.AlertReceivers = v +} + +// GetAlertRules returns the AlertRules field value +func (o *Plan) GetAlertRules() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.AlertRules +} + +// GetAlertRulesOk returns a tuple with the AlertRules field value +// and a boolean to check if the value has been set. +func (o *Plan) GetAlertRulesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.AlertRules, true +} + +// SetAlertRules sets field value +func (o *Plan) SetAlertRules(v *int64) { + o.AlertRules = v +} + +// GetAmount returns the Amount field value if set, zero value otherwise. +func (o *Plan) GetAmount() *float64 { + if o == nil || IsNil(o.Amount) { + var ret *float64 + return ret + } + return o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Plan) GetAmountOk() (*float64, bool) { + if o == nil || IsNil(o.Amount) { + return nil, false + } + return o.Amount, true +} + +// HasAmount returns a boolean if a field has been set. +func (o *Plan) HasAmount() bool { + if o != nil && !IsNil(o.Amount) { + return true + } + + return false +} + +// SetAmount gets a reference to the given float64 and assigns it to the Amount field. +func (o *Plan) SetAmount(v *float64) { + o.Amount = v +} + +// GetBucketSize returns the BucketSize field value +func (o *Plan) GetBucketSize() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.BucketSize +} + +// GetBucketSizeOk returns a tuple with the BucketSize field value +// and a boolean to check if the value has been set. +func (o *Plan) GetBucketSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.BucketSize, true +} + +// SetBucketSize sets field value +func (o *Plan) SetBucketSize(v *int64) { + o.BucketSize = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Plan) 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 *Plan) 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 *Plan) 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 *Plan) SetDescription(v *string) { + o.Description = v +} + +// GetGrafanaGlobalDashboards returns the GrafanaGlobalDashboards field value +func (o *Plan) GetGrafanaGlobalDashboards() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.GrafanaGlobalDashboards +} + +// GetGrafanaGlobalDashboardsOk returns a tuple with the GrafanaGlobalDashboards field value +// and a boolean to check if the value has been set. +func (o *Plan) GetGrafanaGlobalDashboardsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.GrafanaGlobalDashboards, true +} + +// SetGrafanaGlobalDashboards sets field value +func (o *Plan) SetGrafanaGlobalDashboards(v *int64) { + o.GrafanaGlobalDashboards = v +} + +// GetGrafanaGlobalOrgs returns the GrafanaGlobalOrgs field value +func (o *Plan) GetGrafanaGlobalOrgs() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.GrafanaGlobalOrgs +} + +// GetGrafanaGlobalOrgsOk returns a tuple with the GrafanaGlobalOrgs field value +// and a boolean to check if the value has been set. +func (o *Plan) GetGrafanaGlobalOrgsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.GrafanaGlobalOrgs, true +} + +// SetGrafanaGlobalOrgs sets field value +func (o *Plan) SetGrafanaGlobalOrgs(v *int64) { + o.GrafanaGlobalOrgs = v +} + +// GetGrafanaGlobalSessions returns the GrafanaGlobalSessions field value +func (o *Plan) GetGrafanaGlobalSessions() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.GrafanaGlobalSessions +} + +// GetGrafanaGlobalSessionsOk returns a tuple with the GrafanaGlobalSessions field value +// and a boolean to check if the value has been set. +func (o *Plan) GetGrafanaGlobalSessionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.GrafanaGlobalSessions, true +} + +// SetGrafanaGlobalSessions sets field value +func (o *Plan) SetGrafanaGlobalSessions(v *int64) { + o.GrafanaGlobalSessions = v +} + +// GetGrafanaGlobalUsers returns the GrafanaGlobalUsers field value +func (o *Plan) GetGrafanaGlobalUsers() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.GrafanaGlobalUsers +} + +// GetGrafanaGlobalUsersOk returns a tuple with the GrafanaGlobalUsers field value +// and a boolean to check if the value has been set. +func (o *Plan) GetGrafanaGlobalUsersOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.GrafanaGlobalUsers, true +} + +// SetGrafanaGlobalUsers sets field value +func (o *Plan) SetGrafanaGlobalUsers(v *int64) { + o.GrafanaGlobalUsers = v +} + +// GetId returns the Id field value +func (o *Plan) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Plan) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *Plan) SetId(v *string) { + o.Id = v +} + +// GetIsFree returns the IsFree field value if set, zero value otherwise. +func (o *Plan) GetIsFree() *bool { + if o == nil || IsNil(o.IsFree) { + var ret *bool + return ret + } + return o.IsFree +} + +// GetIsFreeOk returns a tuple with the IsFree field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Plan) GetIsFreeOk() (*bool, bool) { + if o == nil || IsNil(o.IsFree) { + return nil, false + } + return o.IsFree, true +} + +// HasIsFree returns a boolean if a field has been set. +func (o *Plan) HasIsFree() bool { + if o != nil && !IsNil(o.IsFree) { + return true + } + + return false +} + +// SetIsFree gets a reference to the given bool and assigns it to the IsFree field. +func (o *Plan) SetIsFree(v *bool) { + o.IsFree = v +} + +// GetIsPublic returns the IsPublic field value if set, zero value otherwise. +func (o *Plan) GetIsPublic() *bool { + if o == nil || IsNil(o.IsPublic) { + var ret *bool + return ret + } + return o.IsPublic +} + +// GetIsPublicOk returns a tuple with the IsPublic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Plan) GetIsPublicOk() (*bool, bool) { + if o == nil || IsNil(o.IsPublic) { + return nil, false + } + return o.IsPublic, true +} + +// HasIsPublic returns a boolean if a field has been set. +func (o *Plan) HasIsPublic() bool { + if o != nil && !IsNil(o.IsPublic) { + return true + } + + return false +} + +// SetIsPublic gets a reference to the given bool and assigns it to the IsPublic field. +func (o *Plan) SetIsPublic(v *bool) { + o.IsPublic = v +} + +// GetLogsAlert returns the LogsAlert field value +func (o *Plan) GetLogsAlert() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.LogsAlert +} + +// GetLogsAlertOk returns a tuple with the LogsAlert field value +// and a boolean to check if the value has been set. +func (o *Plan) GetLogsAlertOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.LogsAlert, true +} + +// SetLogsAlert sets field value +func (o *Plan) SetLogsAlert(v *int64) { + o.LogsAlert = v +} + +// GetLogsStorage returns the LogsStorage field value +func (o *Plan) GetLogsStorage() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.LogsStorage +} + +// GetLogsStorageOk returns a tuple with the LogsStorage field value +// and a boolean to check if the value has been set. +func (o *Plan) GetLogsStorageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.LogsStorage, true +} + +// SetLogsStorage sets field value +func (o *Plan) SetLogsStorage(v *int64) { + o.LogsStorage = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Plan) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Plan) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Plan) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Plan) SetName(v *string) { + o.Name = v +} + +// GetPlanId returns the PlanId field value +func (o *Plan) GetPlanId() *string { + if o == nil { + var ret *string + return ret + } + + return o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value +// and a boolean to check if the value has been set. +func (o *Plan) GetPlanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PlanId, true +} + +// SetPlanId sets field value +func (o *Plan) SetPlanId(v *string) { + o.PlanId = v +} + +// GetSamplesPerScrape returns the SamplesPerScrape field value +func (o *Plan) GetSamplesPerScrape() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.SamplesPerScrape +} + +// GetSamplesPerScrapeOk returns a tuple with the SamplesPerScrape field value +// and a boolean to check if the value has been set. +func (o *Plan) GetSamplesPerScrapeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.SamplesPerScrape, true +} + +// SetSamplesPerScrape sets field value +func (o *Plan) SetSamplesPerScrape(v *int64) { + o.SamplesPerScrape = v +} + +// GetSchema returns the Schema field value if set, zero value otherwise. +func (o *Plan) GetSchema() *string { + if o == nil || IsNil(o.Schema) { + var ret *string + return ret + } + return o.Schema +} + +// GetSchemaOk returns a tuple with the Schema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Plan) GetSchemaOk() (*string, bool) { + if o == nil || IsNil(o.Schema) { + return nil, false + } + return o.Schema, true +} + +// HasSchema returns a boolean if a field has been set. +func (o *Plan) HasSchema() bool { + if o != nil && !IsNil(o.Schema) { + return true + } + + return false +} + +// SetSchema gets a reference to the given string and assigns it to the Schema field. +func (o *Plan) SetSchema(v *string) { + o.Schema = v +} + +// GetTargetNumber returns the TargetNumber field value +func (o *Plan) GetTargetNumber() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.TargetNumber +} + +// GetTargetNumberOk returns a tuple with the TargetNumber field value +// and a boolean to check if the value has been set. +func (o *Plan) GetTargetNumberOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TargetNumber, true +} + +// SetTargetNumber sets field value +func (o *Plan) SetTargetNumber(v *int64) { + o.TargetNumber = v +} + +// GetTotalMetricSamples returns the TotalMetricSamples field value +func (o *Plan) GetTotalMetricSamples() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.TotalMetricSamples +} + +// GetTotalMetricSamplesOk returns a tuple with the TotalMetricSamples field value +// and a boolean to check if the value has been set. +func (o *Plan) GetTotalMetricSamplesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TotalMetricSamples, true +} + +// SetTotalMetricSamples sets field value +func (o *Plan) SetTotalMetricSamples(v *int64) { + o.TotalMetricSamples = v +} + +// GetTracesStorage returns the TracesStorage field value +func (o *Plan) GetTracesStorage() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.TracesStorage +} + +// GetTracesStorageOk returns a tuple with the TracesStorage field value +// and a boolean to check if the value has been set. +func (o *Plan) GetTracesStorageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TracesStorage, true +} + +// SetTracesStorage sets field value +func (o *Plan) SetTracesStorage(v *int64) { + o.TracesStorage = v +} + +func (o Plan) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["alertMatchers"] = o.AlertMatchers + toSerialize["alertReceivers"] = o.AlertReceivers + toSerialize["alertRules"] = o.AlertRules + if !IsNil(o.Amount) { + toSerialize["amount"] = o.Amount + } + toSerialize["bucketSize"] = o.BucketSize + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["grafanaGlobalDashboards"] = o.GrafanaGlobalDashboards + toSerialize["grafanaGlobalOrgs"] = o.GrafanaGlobalOrgs + toSerialize["grafanaGlobalSessions"] = o.GrafanaGlobalSessions + toSerialize["grafanaGlobalUsers"] = o.GrafanaGlobalUsers + toSerialize["id"] = o.Id + if !IsNil(o.IsFree) { + toSerialize["isFree"] = o.IsFree + } + if !IsNil(o.IsPublic) { + toSerialize["isPublic"] = o.IsPublic + } + toSerialize["logsAlert"] = o.LogsAlert + toSerialize["logsStorage"] = o.LogsStorage + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["planId"] = o.PlanId + toSerialize["samplesPerScrape"] = o.SamplesPerScrape + if !IsNil(o.Schema) { + toSerialize["schema"] = o.Schema + } + toSerialize["targetNumber"] = o.TargetNumber + toSerialize["totalMetricSamples"] = o.TotalMetricSamples + toSerialize["tracesStorage"] = o.TracesStorage + return toSerialize, nil +} + +type NullablePlan struct { + value *Plan + isSet bool +} + +func (v NullablePlan) Get() *Plan { + return v.value +} + +func (v *NullablePlan) Set(val *Plan) { + v.value = val + v.isSet = true +} + +func (v NullablePlan) IsSet() bool { + return v.isSet +} + +func (v *NullablePlan) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlan(val *Plan) *NullablePlan { + return &NullablePlan{value: val, isSet: true} +} + +func (v NullablePlan) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlan) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_plan_model.go b/services/observability/model_plan_model.go index 47736c276..172915ab5 100644 --- a/services/observability/model_plan_model.go +++ b/services/observability/model_plan_model.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the PlanModel type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlanModel{} + // PlanModel struct for PlanModel type PlanModel struct { // REQUIRED @@ -48,3 +55,584 @@ type PlanModel struct { // REQUIRED TracesStorage *int64 `json:"tracesStorage"` } + +type _PlanModel PlanModel + +// NewPlanModel instantiates a new PlanModel 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 NewPlanModel(alertMatchers *int64, alertReceivers *int64, alertRules *int64, bucketSize *int64, grafanaGlobalDashboards *int64, grafanaGlobalOrgs *int64, grafanaGlobalSessions *int64, grafanaGlobalUsers *int64, id *string, logsAlert *int64, logsStorage *int64, planId *string, samplesPerScrape *int64, targetNumber *int64, totalMetricSamples *int64, tracesStorage *int64) *PlanModel { + this := PlanModel{} + this.AlertMatchers = alertMatchers + this.AlertReceivers = alertReceivers + this.AlertRules = alertRules + this.BucketSize = bucketSize + this.GrafanaGlobalDashboards = grafanaGlobalDashboards + this.GrafanaGlobalOrgs = grafanaGlobalOrgs + this.GrafanaGlobalSessions = grafanaGlobalSessions + this.GrafanaGlobalUsers = grafanaGlobalUsers + this.Id = id + this.LogsAlert = logsAlert + this.LogsStorage = logsStorage + this.PlanId = planId + this.SamplesPerScrape = samplesPerScrape + this.TargetNumber = targetNumber + this.TotalMetricSamples = totalMetricSamples + this.TracesStorage = tracesStorage + return &this +} + +// NewPlanModelWithDefaults instantiates a new PlanModel 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 NewPlanModelWithDefaults() *PlanModel { + this := PlanModel{} + return &this +} + +// GetAlertMatchers returns the AlertMatchers field value +func (o *PlanModel) GetAlertMatchers() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.AlertMatchers +} + +// GetAlertMatchersOk returns a tuple with the AlertMatchers field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetAlertMatchersOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.AlertMatchers, true +} + +// SetAlertMatchers sets field value +func (o *PlanModel) SetAlertMatchers(v *int64) { + o.AlertMatchers = v +} + +// GetAlertReceivers returns the AlertReceivers field value +func (o *PlanModel) GetAlertReceivers() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.AlertReceivers +} + +// GetAlertReceiversOk returns a tuple with the AlertReceivers field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetAlertReceiversOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.AlertReceivers, true +} + +// SetAlertReceivers sets field value +func (o *PlanModel) SetAlertReceivers(v *int64) { + o.AlertReceivers = v +} + +// GetAlertRules returns the AlertRules field value +func (o *PlanModel) GetAlertRules() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.AlertRules +} + +// GetAlertRulesOk returns a tuple with the AlertRules field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetAlertRulesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.AlertRules, true +} + +// SetAlertRules sets field value +func (o *PlanModel) SetAlertRules(v *int64) { + o.AlertRules = v +} + +// GetAmount returns the Amount field value if set, zero value otherwise. +func (o *PlanModel) GetAmount() *float64 { + if o == nil || IsNil(o.Amount) { + var ret *float64 + return ret + } + return o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanModel) GetAmountOk() (*float64, bool) { + if o == nil || IsNil(o.Amount) { + return nil, false + } + return o.Amount, true +} + +// HasAmount returns a boolean if a field has been set. +func (o *PlanModel) HasAmount() bool { + if o != nil && !IsNil(o.Amount) { + return true + } + + return false +} + +// SetAmount gets a reference to the given float64 and assigns it to the Amount field. +func (o *PlanModel) SetAmount(v *float64) { + o.Amount = v +} + +// GetBucketSize returns the BucketSize field value +func (o *PlanModel) GetBucketSize() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.BucketSize +} + +// GetBucketSizeOk returns a tuple with the BucketSize field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetBucketSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.BucketSize, true +} + +// SetBucketSize sets field value +func (o *PlanModel) SetBucketSize(v *int64) { + o.BucketSize = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PlanModel) 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 *PlanModel) 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 *PlanModel) 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 *PlanModel) SetDescription(v *string) { + o.Description = v +} + +// GetGrafanaGlobalDashboards returns the GrafanaGlobalDashboards field value +func (o *PlanModel) GetGrafanaGlobalDashboards() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.GrafanaGlobalDashboards +} + +// GetGrafanaGlobalDashboardsOk returns a tuple with the GrafanaGlobalDashboards field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetGrafanaGlobalDashboardsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.GrafanaGlobalDashboards, true +} + +// SetGrafanaGlobalDashboards sets field value +func (o *PlanModel) SetGrafanaGlobalDashboards(v *int64) { + o.GrafanaGlobalDashboards = v +} + +// GetGrafanaGlobalOrgs returns the GrafanaGlobalOrgs field value +func (o *PlanModel) GetGrafanaGlobalOrgs() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.GrafanaGlobalOrgs +} + +// GetGrafanaGlobalOrgsOk returns a tuple with the GrafanaGlobalOrgs field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetGrafanaGlobalOrgsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.GrafanaGlobalOrgs, true +} + +// SetGrafanaGlobalOrgs sets field value +func (o *PlanModel) SetGrafanaGlobalOrgs(v *int64) { + o.GrafanaGlobalOrgs = v +} + +// GetGrafanaGlobalSessions returns the GrafanaGlobalSessions field value +func (o *PlanModel) GetGrafanaGlobalSessions() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.GrafanaGlobalSessions +} + +// GetGrafanaGlobalSessionsOk returns a tuple with the GrafanaGlobalSessions field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetGrafanaGlobalSessionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.GrafanaGlobalSessions, true +} + +// SetGrafanaGlobalSessions sets field value +func (o *PlanModel) SetGrafanaGlobalSessions(v *int64) { + o.GrafanaGlobalSessions = v +} + +// GetGrafanaGlobalUsers returns the GrafanaGlobalUsers field value +func (o *PlanModel) GetGrafanaGlobalUsers() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.GrafanaGlobalUsers +} + +// GetGrafanaGlobalUsersOk returns a tuple with the GrafanaGlobalUsers field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetGrafanaGlobalUsersOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.GrafanaGlobalUsers, true +} + +// SetGrafanaGlobalUsers sets field value +func (o *PlanModel) SetGrafanaGlobalUsers(v *int64) { + o.GrafanaGlobalUsers = v +} + +// GetId returns the Id field value +func (o *PlanModel) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *PlanModel) SetId(v *string) { + o.Id = v +} + +// GetLogsAlert returns the LogsAlert field value +func (o *PlanModel) GetLogsAlert() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.LogsAlert +} + +// GetLogsAlertOk returns a tuple with the LogsAlert field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetLogsAlertOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.LogsAlert, true +} + +// SetLogsAlert sets field value +func (o *PlanModel) SetLogsAlert(v *int64) { + o.LogsAlert = v +} + +// GetLogsStorage returns the LogsStorage field value +func (o *PlanModel) GetLogsStorage() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.LogsStorage +} + +// GetLogsStorageOk returns a tuple with the LogsStorage field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetLogsStorageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.LogsStorage, true +} + +// SetLogsStorage sets field value +func (o *PlanModel) SetLogsStorage(v *int64) { + o.LogsStorage = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PlanModel) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanModel) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PlanModel) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PlanModel) SetName(v *string) { + o.Name = v +} + +// GetPlanId returns the PlanId field value +func (o *PlanModel) GetPlanId() *string { + if o == nil { + var ret *string + return ret + } + + return o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetPlanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PlanId, true +} + +// SetPlanId sets field value +func (o *PlanModel) SetPlanId(v *string) { + o.PlanId = v +} + +// GetSamplesPerScrape returns the SamplesPerScrape field value +func (o *PlanModel) GetSamplesPerScrape() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.SamplesPerScrape +} + +// GetSamplesPerScrapeOk returns a tuple with the SamplesPerScrape field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetSamplesPerScrapeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.SamplesPerScrape, true +} + +// SetSamplesPerScrape sets field value +func (o *PlanModel) SetSamplesPerScrape(v *int64) { + o.SamplesPerScrape = v +} + +// GetTargetNumber returns the TargetNumber field value +func (o *PlanModel) GetTargetNumber() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.TargetNumber +} + +// GetTargetNumberOk returns a tuple with the TargetNumber field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetTargetNumberOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TargetNumber, true +} + +// SetTargetNumber sets field value +func (o *PlanModel) SetTargetNumber(v *int64) { + o.TargetNumber = v +} + +// GetTotalMetricSamples returns the TotalMetricSamples field value +func (o *PlanModel) GetTotalMetricSamples() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.TotalMetricSamples +} + +// GetTotalMetricSamplesOk returns a tuple with the TotalMetricSamples field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetTotalMetricSamplesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TotalMetricSamples, true +} + +// SetTotalMetricSamples sets field value +func (o *PlanModel) SetTotalMetricSamples(v *int64) { + o.TotalMetricSamples = v +} + +// GetTracesStorage returns the TracesStorage field value +func (o *PlanModel) GetTracesStorage() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.TracesStorage +} + +// GetTracesStorageOk returns a tuple with the TracesStorage field value +// and a boolean to check if the value has been set. +func (o *PlanModel) GetTracesStorageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.TracesStorage, true +} + +// SetTracesStorage sets field value +func (o *PlanModel) SetTracesStorage(v *int64) { + o.TracesStorage = v +} + +func (o PlanModel) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["alertMatchers"] = o.AlertMatchers + toSerialize["alertReceivers"] = o.AlertReceivers + toSerialize["alertRules"] = o.AlertRules + if !IsNil(o.Amount) { + toSerialize["amount"] = o.Amount + } + toSerialize["bucketSize"] = o.BucketSize + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["grafanaGlobalDashboards"] = o.GrafanaGlobalDashboards + toSerialize["grafanaGlobalOrgs"] = o.GrafanaGlobalOrgs + toSerialize["grafanaGlobalSessions"] = o.GrafanaGlobalSessions + toSerialize["grafanaGlobalUsers"] = o.GrafanaGlobalUsers + toSerialize["id"] = o.Id + toSerialize["logsAlert"] = o.LogsAlert + toSerialize["logsStorage"] = o.LogsStorage + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["planId"] = o.PlanId + toSerialize["samplesPerScrape"] = o.SamplesPerScrape + toSerialize["targetNumber"] = o.TargetNumber + toSerialize["totalMetricSamples"] = o.TotalMetricSamples + toSerialize["tracesStorage"] = o.TracesStorage + return toSerialize, nil +} + +type NullablePlanModel struct { + value *PlanModel + isSet bool +} + +func (v NullablePlanModel) Get() *PlanModel { + return v.value +} + +func (v *NullablePlanModel) Set(val *PlanModel) { + v.value = val + v.isSet = true +} + +func (v NullablePlanModel) IsSet() bool { + return v.isSet +} + +func (v *NullablePlanModel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlanModel(val *PlanModel) *NullablePlanModel { + return &NullablePlanModel{value: val, isSet: true} +} + +func (v NullablePlanModel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlanModel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_plans_response.go b/services/observability/model_plans_response.go index 23e7abd8c..bef6b9a4c 100644 --- a/services/observability/model_plans_response.go +++ b/services/observability/model_plans_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the PlansResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlansResponse{} + // PlansResponse struct for PlansResponse type PlansResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type PlansResponse struct { // REQUIRED Plans *[]Plan `json:"plans"` } + +type _PlansResponse PlansResponse + +// NewPlansResponse instantiates a new PlansResponse 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 NewPlansResponse(message *string, plans *[]Plan) *PlansResponse { + this := PlansResponse{} + this.Message = message + this.Plans = plans + return &this +} + +// NewPlansResponseWithDefaults instantiates a new PlansResponse 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 NewPlansResponseWithDefaults() *PlansResponse { + this := PlansResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *PlansResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *PlansResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *PlansResponse) SetMessage(v *string) { + o.Message = v +} + +// GetPlans returns the Plans field value +func (o *PlansResponse) GetPlans() *[]Plan { + if o == nil { + var ret *[]Plan + return ret + } + + return o.Plans +} + +// GetPlansOk returns a tuple with the Plans field value +// and a boolean to check if the value has been set. +func (o *PlansResponse) GetPlansOk() (*[]Plan, bool) { + if o == nil { + return nil, false + } + return o.Plans, true +} + +// SetPlans sets field value +func (o *PlansResponse) SetPlans(v *[]Plan) { + o.Plans = v +} + +func (o PlansResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["plans"] = o.Plans + return toSerialize, nil +} + +type NullablePlansResponse struct { + value *PlansResponse + isSet bool +} + +func (v NullablePlansResponse) Get() *PlansResponse { + return v.value +} + +func (v *NullablePlansResponse) Set(val *PlansResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePlansResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePlansResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlansResponse(val *PlansResponse) *NullablePlansResponse { + return &NullablePlansResponse{value: val, isSet: true} +} + +func (v NullablePlansResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlansResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_project_instance_full.go b/services/observability/model_project_instance_full.go index d512cec03..7391184ea 100644 --- a/services/observability/model_project_instance_full.go +++ b/services/observability/model_project_instance_full.go @@ -10,8 +10,16 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the ProjectInstanceFull type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectInstanceFull{} + // ProjectInstanceFull struct for ProjectInstanceFull type ProjectInstanceFull struct { + Error *NullableString `json:"error,omitempty"` // REQUIRED Id *string `json:"id"` // REQUIRED @@ -24,3 +32,274 @@ type ProjectInstanceFull struct { // REQUIRED Status *string `json:"status"` } + +type _ProjectInstanceFull ProjectInstanceFull + +// NewProjectInstanceFull instantiates a new ProjectInstanceFull 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 NewProjectInstanceFull(id *string, instance *string, planName *string, serviceName *string, status *string) *ProjectInstanceFull { + this := ProjectInstanceFull{} + this.Id = id + this.Instance = instance + this.PlanName = planName + this.ServiceName = serviceName + this.Status = status + return &this +} + +// NewProjectInstanceFullWithDefaults instantiates a new ProjectInstanceFull 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 NewProjectInstanceFullWithDefaults() *ProjectInstanceFull { + this := ProjectInstanceFull{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProjectInstanceFull) GetError() *string { + if o == nil || IsNil(o.Error.Get()) { + var ret *string + return ret + } + return o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProjectInstanceFull) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *ProjectInstanceFull) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *ProjectInstanceFull) SetError(v *string) { + o.Error.Set(v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *ProjectInstanceFull) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *ProjectInstanceFull) UnsetError() { + o.Error.Unset() +} + +// GetId returns the Id field value +func (o *ProjectInstanceFull) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ProjectInstanceFull) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *ProjectInstanceFull) SetId(v *string) { + o.Id = v +} + +// GetInstance returns the Instance field value +func (o *ProjectInstanceFull) GetInstance() *string { + if o == nil { + var ret *string + return ret + } + + return o.Instance +} + +// GetInstanceOk returns a tuple with the Instance field value +// and a boolean to check if the value has been set. +func (o *ProjectInstanceFull) GetInstanceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Instance, true +} + +// SetInstance sets field value +func (o *ProjectInstanceFull) SetInstance(v *string) { + o.Instance = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ProjectInstanceFull) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProjectInstanceFull) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ProjectInstanceFull) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ProjectInstanceFull) SetName(v *string) { + o.Name = v +} + +// GetPlanName returns the PlanName field value +func (o *ProjectInstanceFull) GetPlanName() *string { + if o == nil { + var ret *string + return ret + } + + return o.PlanName +} + +// GetPlanNameOk returns a tuple with the PlanName field value +// and a boolean to check if the value has been set. +func (o *ProjectInstanceFull) GetPlanNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PlanName, true +} + +// SetPlanName sets field value +func (o *ProjectInstanceFull) SetPlanName(v *string) { + o.PlanName = v +} + +// GetServiceName returns the ServiceName field value +func (o *ProjectInstanceFull) GetServiceName() *string { + if o == nil { + var ret *string + return ret + } + + return o.ServiceName +} + +// GetServiceNameOk returns a tuple with the ServiceName field value +// and a boolean to check if the value has been set. +func (o *ProjectInstanceFull) GetServiceNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ServiceName, true +} + +// SetServiceName sets field value +func (o *ProjectInstanceFull) SetServiceName(v *string) { + o.ServiceName = v +} + +// GetStatus returns the Status field value +func (o *ProjectInstanceFull) GetStatus() *string { + if o == nil { + var ret *string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ProjectInstanceFull) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status, true +} + +// SetStatus sets field value +func (o *ProjectInstanceFull) SetStatus(v *string) { + o.Status = v +} + +func (o ProjectInstanceFull) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + toSerialize["id"] = o.Id + toSerialize["instance"] = o.Instance + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["planName"] = o.PlanName + toSerialize["serviceName"] = o.ServiceName + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableProjectInstanceFull struct { + value *ProjectInstanceFull + isSet bool +} + +func (v NullableProjectInstanceFull) Get() *ProjectInstanceFull { + return v.value +} + +func (v *NullableProjectInstanceFull) Set(val *ProjectInstanceFull) { + v.value = val + v.isSet = true +} + +func (v NullableProjectInstanceFull) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectInstanceFull) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectInstanceFull(val *ProjectInstanceFull) *NullableProjectInstanceFull { + return &NullableProjectInstanceFull{value: val, isSet: true} +} + +func (v NullableProjectInstanceFull) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectInstanceFull) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_receiver.go b/services/observability/model_receiver.go index aaca33294..8ad00a153 100644 --- a/services/observability/model_receiver.go +++ b/services/observability/model_receiver.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Receiver type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Receiver{} + // Receiver struct for Receiver type Receiver struct { // REQUIRED @@ -17,3 +24,115 @@ type Receiver struct { // REQUIRED Message *string `json:"message"` } + +type _Receiver Receiver + +// NewReceiver instantiates a new Receiver 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 NewReceiver(data *Receivers, message *string) *Receiver { + this := Receiver{} + this.Data = data + this.Message = message + return &this +} + +// NewReceiverWithDefaults instantiates a new Receiver 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 NewReceiverWithDefaults() *Receiver { + this := Receiver{} + return &this +} + +// GetData returns the Data field value +func (o *Receiver) GetData() *Receivers { + if o == nil { + var ret *Receivers + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *Receiver) GetDataOk() (*Receivers, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *Receiver) SetData(v *Receivers) { + o.Data = v +} + +// GetMessage returns the Message field value +func (o *Receiver) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *Receiver) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *Receiver) SetMessage(v *string) { + o.Message = v +} + +func (o Receiver) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableReceiver struct { + value *Receiver + isSet bool +} + +func (v NullableReceiver) Get() *Receiver { + return v.value +} + +func (v *NullableReceiver) Set(val *Receiver) { + v.value = val + v.isSet = true +} + +func (v NullableReceiver) IsSet() bool { + return v.isSet +} + +func (v *NullableReceiver) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReceiver(val *Receiver) *NullableReceiver { + return &NullableReceiver{value: val, isSet: true} +} + +func (v NullableReceiver) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReceiver) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_receivers.go b/services/observability/model_receivers.go index 072313213..bbac735a5 100644 --- a/services/observability/model_receivers.go +++ b/services/observability/model_receivers.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Receivers type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Receivers{} + // Receivers struct for Receivers type Receivers struct { EmailConfigs *[]EmailConfig `json:"emailConfigs,omitempty"` @@ -18,3 +25,194 @@ type Receivers struct { OpsgenieConfigs *[]OpsgenieConfig `json:"opsgenieConfigs,omitempty"` WebHookConfigs *[]WebHook `json:"webHookConfigs,omitempty"` } + +type _Receivers Receivers + +// NewReceivers instantiates a new Receivers 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 NewReceivers(name *string) *Receivers { + this := Receivers{} + this.Name = name + return &this +} + +// NewReceiversWithDefaults instantiates a new Receivers 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 NewReceiversWithDefaults() *Receivers { + this := Receivers{} + return &this +} + +// GetEmailConfigs returns the EmailConfigs field value if set, zero value otherwise. +func (o *Receivers) GetEmailConfigs() *[]EmailConfig { + if o == nil || IsNil(o.EmailConfigs) { + var ret *[]EmailConfig + return ret + } + return o.EmailConfigs +} + +// GetEmailConfigsOk returns a tuple with the EmailConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Receivers) GetEmailConfigsOk() (*[]EmailConfig, bool) { + if o == nil || IsNil(o.EmailConfigs) { + return nil, false + } + return o.EmailConfigs, true +} + +// HasEmailConfigs returns a boolean if a field has been set. +func (o *Receivers) HasEmailConfigs() bool { + if o != nil && !IsNil(o.EmailConfigs) { + return true + } + + return false +} + +// SetEmailConfigs gets a reference to the given []EmailConfig and assigns it to the EmailConfigs field. +func (o *Receivers) SetEmailConfigs(v *[]EmailConfig) { + o.EmailConfigs = v +} + +// GetName returns the Name field value +func (o *Receivers) 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 *Receivers) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *Receivers) SetName(v *string) { + o.Name = v +} + +// GetOpsgenieConfigs returns the OpsgenieConfigs field value if set, zero value otherwise. +func (o *Receivers) GetOpsgenieConfigs() *[]OpsgenieConfig { + if o == nil || IsNil(o.OpsgenieConfigs) { + var ret *[]OpsgenieConfig + return ret + } + return o.OpsgenieConfigs +} + +// GetOpsgenieConfigsOk returns a tuple with the OpsgenieConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Receivers) GetOpsgenieConfigsOk() (*[]OpsgenieConfig, bool) { + if o == nil || IsNil(o.OpsgenieConfigs) { + return nil, false + } + return o.OpsgenieConfigs, true +} + +// HasOpsgenieConfigs returns a boolean if a field has been set. +func (o *Receivers) HasOpsgenieConfigs() bool { + if o != nil && !IsNil(o.OpsgenieConfigs) { + return true + } + + return false +} + +// SetOpsgenieConfigs gets a reference to the given []OpsgenieConfig and assigns it to the OpsgenieConfigs field. +func (o *Receivers) SetOpsgenieConfigs(v *[]OpsgenieConfig) { + o.OpsgenieConfigs = v +} + +// GetWebHookConfigs returns the WebHookConfigs field value if set, zero value otherwise. +func (o *Receivers) GetWebHookConfigs() *[]WebHook { + if o == nil || IsNil(o.WebHookConfigs) { + var ret *[]WebHook + return ret + } + return o.WebHookConfigs +} + +// GetWebHookConfigsOk returns a tuple with the WebHookConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Receivers) GetWebHookConfigsOk() (*[]WebHook, bool) { + if o == nil || IsNil(o.WebHookConfigs) { + return nil, false + } + return o.WebHookConfigs, true +} + +// HasWebHookConfigs returns a boolean if a field has been set. +func (o *Receivers) HasWebHookConfigs() bool { + if o != nil && !IsNil(o.WebHookConfigs) { + return true + } + + return false +} + +// SetWebHookConfigs gets a reference to the given []WebHook and assigns it to the WebHookConfigs field. +func (o *Receivers) SetWebHookConfigs(v *[]WebHook) { + o.WebHookConfigs = v +} + +func (o Receivers) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EmailConfigs) { + toSerialize["emailConfigs"] = o.EmailConfigs + } + toSerialize["name"] = o.Name + if !IsNil(o.OpsgenieConfigs) { + toSerialize["opsgenieConfigs"] = o.OpsgenieConfigs + } + if !IsNil(o.WebHookConfigs) { + toSerialize["webHookConfigs"] = o.WebHookConfigs + } + return toSerialize, nil +} + +type NullableReceivers struct { + value *Receivers + isSet bool +} + +func (v NullableReceivers) Get() *Receivers { + return v.value +} + +func (v *NullableReceivers) Set(val *Receivers) { + v.value = val + v.isSet = true +} + +func (v NullableReceivers) IsSet() bool { + return v.isSet +} + +func (v *NullableReceivers) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReceivers(val *Receivers) *NullableReceivers { + return &NullableReceivers{value: val, isSet: true} +} + +func (v NullableReceivers) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReceivers) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_route.go b/services/observability/model_route.go index 4fdddfb17..0502f880f 100644 --- a/services/observability/model_route.go +++ b/services/observability/model_route.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the Route type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Route{} + // Route struct for Route type Route struct { Continue *bool `json:"continue,omitempty"` @@ -23,3 +30,385 @@ type Route struct { RepeatInterval *string `json:"repeatInterval,omitempty"` Routes *[]RouteSerializer `json:"routes,omitempty"` } + +type _Route Route + +// NewRoute instantiates a new Route 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 NewRoute(receiver *string) *Route { + this := Route{} + var continue_ bool = false + this.Continue = &continue_ + var groupInterval string = "5m" + this.GroupInterval = &groupInterval + var groupWait string = "30s" + this.GroupWait = &groupWait + this.Receiver = receiver + var repeatInterval string = "4h" + this.RepeatInterval = &repeatInterval + return &this +} + +// NewRouteWithDefaults instantiates a new Route 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 NewRouteWithDefaults() *Route { + this := Route{} + var continue_ bool = false + this.Continue = &continue_ + var groupInterval string = "5m" + this.GroupInterval = &groupInterval + var groupWait string = "30s" + this.GroupWait = &groupWait + var repeatInterval string = "4h" + this.RepeatInterval = &repeatInterval + return &this +} + +// GetContinue returns the Continue field value if set, zero value otherwise. +func (o *Route) GetContinue() *bool { + if o == nil || IsNil(o.Continue) { + var ret *bool + return ret + } + return o.Continue +} + +// 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 *Route) GetContinueOk() (*bool, bool) { + if o == nil || IsNil(o.Continue) { + return nil, false + } + return o.Continue, true +} + +// HasContinue returns a boolean if a field has been set. +func (o *Route) HasContinue() bool { + if o != nil && !IsNil(o.Continue) { + return true + } + + return false +} + +// SetContinue gets a reference to the given bool and assigns it to the Continue field. +func (o *Route) SetContinue(v *bool) { + o.Continue = v +} + +// GetGroupBy returns the GroupBy field value if set, zero value otherwise. +func (o *Route) GetGroupBy() *[]string { + if o == nil || IsNil(o.GroupBy) { + var ret *[]string + return ret + } + return o.GroupBy +} + +// 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 *Route) GetGroupByOk() (*[]string, bool) { + if o == nil || IsNil(o.GroupBy) { + return nil, false + } + return o.GroupBy, true +} + +// HasGroupBy returns a boolean if a field has been set. +func (o *Route) HasGroupBy() bool { + if o != nil && !IsNil(o.GroupBy) { + return true + } + + return false +} + +// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. +func (o *Route) SetGroupBy(v *[]string) { + o.GroupBy = v +} + +// GetGroupInterval returns the GroupInterval field value if set, zero value otherwise. +func (o *Route) GetGroupInterval() *string { + if o == nil || IsNil(o.GroupInterval) { + var ret *string + return ret + } + return o.GroupInterval +} + +// 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 *Route) GetGroupIntervalOk() (*string, bool) { + if o == nil || IsNil(o.GroupInterval) { + return nil, false + } + return o.GroupInterval, true +} + +// HasGroupInterval returns a boolean if a field has been set. +func (o *Route) HasGroupInterval() bool { + if o != nil && !IsNil(o.GroupInterval) { + return true + } + + return false +} + +// SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. +func (o *Route) SetGroupInterval(v *string) { + o.GroupInterval = v +} + +// GetGroupWait returns the GroupWait field value if set, zero value otherwise. +func (o *Route) GetGroupWait() *string { + if o == nil || IsNil(o.GroupWait) { + var ret *string + return ret + } + return o.GroupWait +} + +// 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 *Route) GetGroupWaitOk() (*string, bool) { + if o == nil || IsNil(o.GroupWait) { + return nil, false + } + return o.GroupWait, true +} + +// HasGroupWait returns a boolean if a field has been set. +func (o *Route) HasGroupWait() bool { + if o != nil && !IsNil(o.GroupWait) { + return true + } + + return false +} + +// SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. +func (o *Route) SetGroupWait(v *string) { + o.GroupWait = v +} + +// GetMatch returns the Match field value if set, zero value otherwise. +func (o *Route) GetMatch() *map[string]string { + if o == nil || IsNil(o.Match) { + var ret *map[string]string + return ret + } + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetMatchOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Match) { + return nil, false + } + return o.Match, true +} + +// HasMatch returns a boolean if a field has been set. +func (o *Route) HasMatch() bool { + if o != nil && !IsNil(o.Match) { + return true + } + + return false +} + +// SetMatch gets a reference to the given map[string]string and assigns it to the Match field. +func (o *Route) SetMatch(v *map[string]string) { + o.Match = v +} + +// GetMatchRe returns the MatchRe field value if set, zero value otherwise. +func (o *Route) GetMatchRe() *map[string]string { + if o == nil || IsNil(o.MatchRe) { + var ret *map[string]string + return ret + } + return o.MatchRe +} + +// GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetMatchReOk() (*map[string]string, bool) { + if o == nil || IsNil(o.MatchRe) { + return nil, false + } + return o.MatchRe, true +} + +// HasMatchRe returns a boolean if a field has been set. +func (o *Route) HasMatchRe() bool { + if o != nil && !IsNil(o.MatchRe) { + return true + } + + return false +} + +// SetMatchRe gets a reference to the given map[string]string and assigns it to the MatchRe field. +func (o *Route) SetMatchRe(v *map[string]string) { + o.MatchRe = v +} + +// GetReceiver returns the Receiver field value +func (o *Route) GetReceiver() *string { + if o == nil { + var ret *string + return ret + } + + return o.Receiver +} + +// GetReceiverOk returns a tuple with the Receiver field value +// and a boolean to check if the value has been set. +func (o *Route) GetReceiverOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Receiver, true +} + +// SetReceiver sets field value +func (o *Route) SetReceiver(v *string) { + o.Receiver = v +} + +// GetRepeatInterval returns the RepeatInterval field value if set, zero value otherwise. +func (o *Route) GetRepeatInterval() *string { + if o == nil || IsNil(o.RepeatInterval) { + var ret *string + return ret + } + return o.RepeatInterval +} + +// 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 *Route) GetRepeatIntervalOk() (*string, bool) { + if o == nil || IsNil(o.RepeatInterval) { + return nil, false + } + return o.RepeatInterval, true +} + +// HasRepeatInterval returns a boolean if a field has been set. +func (o *Route) HasRepeatInterval() bool { + if o != nil && !IsNil(o.RepeatInterval) { + return true + } + + return false +} + +// SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. +func (o *Route) SetRepeatInterval(v *string) { + o.RepeatInterval = v +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *Route) GetRoutes() *[]RouteSerializer { + if o == nil || IsNil(o.Routes) { + var ret *[]RouteSerializer + return ret + } + return o.Routes +} + +// 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 *Route) GetRoutesOk() (*[]RouteSerializer, bool) { + if o == nil || IsNil(o.Routes) { + return nil, false + } + return o.Routes, true +} + +// HasRoutes returns a boolean if a field has been set. +func (o *Route) HasRoutes() bool { + if o != nil && !IsNil(o.Routes) { + return true + } + + return false +} + +// SetRoutes gets a reference to the given []RouteSerializer and assigns it to the Routes field. +func (o *Route) SetRoutes(v *[]RouteSerializer) { + o.Routes = v +} + +func (o Route) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Continue) { + toSerialize["continue"] = o.Continue + } + if !IsNil(o.GroupBy) { + toSerialize["groupBy"] = o.GroupBy + } + if !IsNil(o.GroupInterval) { + toSerialize["groupInterval"] = o.GroupInterval + } + if !IsNil(o.GroupWait) { + toSerialize["groupWait"] = o.GroupWait + } + if !IsNil(o.Match) { + toSerialize["match"] = o.Match + } + if !IsNil(o.MatchRe) { + toSerialize["matchRe"] = o.MatchRe + } + toSerialize["receiver"] = o.Receiver + if !IsNil(o.RepeatInterval) { + toSerialize["repeatInterval"] = o.RepeatInterval + } + if !IsNil(o.Routes) { + toSerialize["routes"] = o.Routes + } + return toSerialize, nil +} + +type NullableRoute struct { + value *Route + isSet bool +} + +func (v NullableRoute) Get() *Route { + return v.value +} + +func (v *NullableRoute) Set(val *Route) { + v.value = val + v.isSet = true +} + +func (v NullableRoute) IsSet() bool { + return v.isSet +} + +func (v *NullableRoute) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRoute(val *Route) *NullableRoute { + return &NullableRoute{value: val, isSet: true} +} + +func (v NullableRoute) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRoute) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_route_serializer.go b/services/observability/model_route_serializer.go index 998b8beaf..ae5ab89ff 100644 --- a/services/observability/model_route_serializer.go +++ b/services/observability/model_route_serializer.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the RouteSerializer type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RouteSerializer{} + // RouteSerializer struct for RouteSerializer type RouteSerializer struct { Continue *bool `json:"continue,omitempty"` @@ -24,3 +31,420 @@ type RouteSerializer struct { RepeatInterval *string `json:"repeatInterval,omitempty"` Routes *[]map[string]string `json:"routes,omitempty"` } + +type _RouteSerializer RouteSerializer + +// NewRouteSerializer instantiates a new RouteSerializer 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 NewRouteSerializer(receiver *string) *RouteSerializer { + this := RouteSerializer{} + var continue_ bool = false + this.Continue = &continue_ + var groupInterval string = "5m" + this.GroupInterval = &groupInterval + var groupWait string = "30s" + this.GroupWait = &groupWait + this.Receiver = receiver + var repeatInterval string = "4h" + this.RepeatInterval = &repeatInterval + return &this +} + +// NewRouteSerializerWithDefaults instantiates a new RouteSerializer 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 NewRouteSerializerWithDefaults() *RouteSerializer { + this := RouteSerializer{} + var continue_ bool = false + this.Continue = &continue_ + var groupInterval string = "5m" + this.GroupInterval = &groupInterval + var groupWait string = "30s" + this.GroupWait = &groupWait + var repeatInterval string = "4h" + this.RepeatInterval = &repeatInterval + return &this +} + +// GetContinue returns the Continue field value if set, zero value otherwise. +func (o *RouteSerializer) GetContinue() *bool { + if o == nil || IsNil(o.Continue) { + var ret *bool + return ret + } + return o.Continue +} + +// 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 *RouteSerializer) GetContinueOk() (*bool, bool) { + if o == nil || IsNil(o.Continue) { + return nil, false + } + return o.Continue, true +} + +// HasContinue returns a boolean if a field has been set. +func (o *RouteSerializer) HasContinue() bool { + if o != nil && !IsNil(o.Continue) { + return true + } + + return false +} + +// SetContinue gets a reference to the given bool and assigns it to the Continue field. +func (o *RouteSerializer) SetContinue(v *bool) { + o.Continue = v +} + +// GetGroupBy returns the GroupBy field value if set, zero value otherwise. +func (o *RouteSerializer) GetGroupBy() *[]string { + if o == nil || IsNil(o.GroupBy) { + var ret *[]string + return ret + } + return o.GroupBy +} + +// 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 *RouteSerializer) GetGroupByOk() (*[]string, bool) { + if o == nil || IsNil(o.GroupBy) { + return nil, false + } + return o.GroupBy, true +} + +// HasGroupBy returns a boolean if a field has been set. +func (o *RouteSerializer) HasGroupBy() bool { + if o != nil && !IsNil(o.GroupBy) { + return true + } + + return false +} + +// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. +func (o *RouteSerializer) SetGroupBy(v *[]string) { + o.GroupBy = v +} + +// GetGroupInterval returns the GroupInterval field value if set, zero value otherwise. +func (o *RouteSerializer) GetGroupInterval() *string { + if o == nil || IsNil(o.GroupInterval) { + var ret *string + return ret + } + return o.GroupInterval +} + +// 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 *RouteSerializer) GetGroupIntervalOk() (*string, bool) { + if o == nil || IsNil(o.GroupInterval) { + return nil, false + } + return o.GroupInterval, true +} + +// HasGroupInterval returns a boolean if a field has been set. +func (o *RouteSerializer) HasGroupInterval() bool { + if o != nil && !IsNil(o.GroupInterval) { + return true + } + + return false +} + +// SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. +func (o *RouteSerializer) SetGroupInterval(v *string) { + o.GroupInterval = v +} + +// GetGroupWait returns the GroupWait field value if set, zero value otherwise. +func (o *RouteSerializer) GetGroupWait() *string { + if o == nil || IsNil(o.GroupWait) { + var ret *string + return ret + } + return o.GroupWait +} + +// 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 *RouteSerializer) GetGroupWaitOk() (*string, bool) { + if o == nil || IsNil(o.GroupWait) { + return nil, false + } + return o.GroupWait, true +} + +// HasGroupWait returns a boolean if a field has been set. +func (o *RouteSerializer) HasGroupWait() bool { + if o != nil && !IsNil(o.GroupWait) { + return true + } + + return false +} + +// SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. +func (o *RouteSerializer) SetGroupWait(v *string) { + o.GroupWait = v +} + +// GetMatch returns the Match field value if set, zero value otherwise. +func (o *RouteSerializer) GetMatch() *map[string]string { + if o == nil || IsNil(o.Match) { + var ret *map[string]string + return ret + } + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RouteSerializer) GetMatchOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Match) { + return nil, false + } + return o.Match, true +} + +// HasMatch returns a boolean if a field has been set. +func (o *RouteSerializer) HasMatch() bool { + if o != nil && !IsNil(o.Match) { + return true + } + + return false +} + +// SetMatch gets a reference to the given map[string]string and assigns it to the Match field. +func (o *RouteSerializer) SetMatch(v *map[string]string) { + o.Match = v +} + +// GetMatchRe returns the MatchRe field value if set, zero value otherwise. +func (o *RouteSerializer) GetMatchRe() *map[string]string { + if o == nil || IsNil(o.MatchRe) { + var ret *map[string]string + return ret + } + return o.MatchRe +} + +// GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RouteSerializer) GetMatchReOk() (*map[string]string, bool) { + if o == nil || IsNil(o.MatchRe) { + return nil, false + } + return o.MatchRe, true +} + +// HasMatchRe returns a boolean if a field has been set. +func (o *RouteSerializer) HasMatchRe() bool { + if o != nil && !IsNil(o.MatchRe) { + return true + } + + return false +} + +// SetMatchRe gets a reference to the given map[string]string and assigns it to the MatchRe field. +func (o *RouteSerializer) SetMatchRe(v *map[string]string) { + o.MatchRe = v +} + +// GetMatchers returns the Matchers field value if set, zero value otherwise. +func (o *RouteSerializer) GetMatchers() *[]string { + if o == nil || IsNil(o.Matchers) { + var ret *[]string + return ret + } + return o.Matchers +} + +// 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 *RouteSerializer) GetMatchersOk() (*[]string, bool) { + if o == nil || IsNil(o.Matchers) { + return nil, false + } + return o.Matchers, true +} + +// HasMatchers returns a boolean if a field has been set. +func (o *RouteSerializer) HasMatchers() bool { + if o != nil && !IsNil(o.Matchers) { + return true + } + + return false +} + +// SetMatchers gets a reference to the given []string and assigns it to the Matchers field. +func (o *RouteSerializer) SetMatchers(v *[]string) { + o.Matchers = v +} + +// GetReceiver returns the Receiver field value +func (o *RouteSerializer) GetReceiver() *string { + if o == nil { + var ret *string + return ret + } + + return o.Receiver +} + +// GetReceiverOk returns a tuple with the Receiver field value +// and a boolean to check if the value has been set. +func (o *RouteSerializer) GetReceiverOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Receiver, true +} + +// SetReceiver sets field value +func (o *RouteSerializer) SetReceiver(v *string) { + o.Receiver = v +} + +// GetRepeatInterval returns the RepeatInterval field value if set, zero value otherwise. +func (o *RouteSerializer) GetRepeatInterval() *string { + if o == nil || IsNil(o.RepeatInterval) { + var ret *string + return ret + } + return o.RepeatInterval +} + +// 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 *RouteSerializer) GetRepeatIntervalOk() (*string, bool) { + if o == nil || IsNil(o.RepeatInterval) { + return nil, false + } + return o.RepeatInterval, true +} + +// HasRepeatInterval returns a boolean if a field has been set. +func (o *RouteSerializer) HasRepeatInterval() bool { + if o != nil && !IsNil(o.RepeatInterval) { + return true + } + + return false +} + +// SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. +func (o *RouteSerializer) SetRepeatInterval(v *string) { + o.RepeatInterval = v +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *RouteSerializer) GetRoutes() *[]map[string]string { + if o == nil || IsNil(o.Routes) { + var ret *[]map[string]string + return ret + } + return o.Routes +} + +// 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 *RouteSerializer) GetRoutesOk() (*[]map[string]string, bool) { + if o == nil || IsNil(o.Routes) { + return nil, false + } + return o.Routes, true +} + +// HasRoutes returns a boolean if a field has been set. +func (o *RouteSerializer) HasRoutes() bool { + if o != nil && !IsNil(o.Routes) { + return true + } + + return false +} + +// SetRoutes gets a reference to the given []map[string]string and assigns it to the Routes field. +func (o *RouteSerializer) SetRoutes(v *[]map[string]string) { + o.Routes = v +} + +func (o RouteSerializer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Continue) { + toSerialize["continue"] = o.Continue + } + if !IsNil(o.GroupBy) { + toSerialize["groupBy"] = o.GroupBy + } + if !IsNil(o.GroupInterval) { + toSerialize["groupInterval"] = o.GroupInterval + } + if !IsNil(o.GroupWait) { + toSerialize["groupWait"] = o.GroupWait + } + if !IsNil(o.Match) { + toSerialize["match"] = o.Match + } + if !IsNil(o.MatchRe) { + toSerialize["matchRe"] = o.MatchRe + } + if !IsNil(o.Matchers) { + toSerialize["matchers"] = o.Matchers + } + toSerialize["receiver"] = o.Receiver + if !IsNil(o.RepeatInterval) { + toSerialize["repeatInterval"] = o.RepeatInterval + } + if !IsNil(o.Routes) { + toSerialize["routes"] = o.Routes + } + return toSerialize, nil +} + +type NullableRouteSerializer struct { + value *RouteSerializer + isSet bool +} + +func (v NullableRouteSerializer) Get() *RouteSerializer { + return v.value +} + +func (v *NullableRouteSerializer) Set(val *RouteSerializer) { + v.value = val + v.isSet = true +} + +func (v NullableRouteSerializer) IsSet() bool { + return v.isSet +} + +func (v *NullableRouteSerializer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRouteSerializer(val *RouteSerializer) *NullableRouteSerializer { + return &NullableRouteSerializer{value: val, isSet: true} +} + +func (v NullableRouteSerializer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRouteSerializer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_scrape_configs_response.go b/services/observability/model_scrape_configs_response.go index 4a5a8b239..9a51df2a6 100644 --- a/services/observability/model_scrape_configs_response.go +++ b/services/observability/model_scrape_configs_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the ScrapeConfigsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScrapeConfigsResponse{} + // ScrapeConfigsResponse struct for ScrapeConfigsResponse type ScrapeConfigsResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type ScrapeConfigsResponse struct { // REQUIRED Message *string `json:"message"` } + +type _ScrapeConfigsResponse ScrapeConfigsResponse + +// NewScrapeConfigsResponse instantiates a new ScrapeConfigsResponse 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 NewScrapeConfigsResponse(data *[]Job, message *string) *ScrapeConfigsResponse { + this := ScrapeConfigsResponse{} + this.Data = data + this.Message = message + return &this +} + +// NewScrapeConfigsResponseWithDefaults instantiates a new ScrapeConfigsResponse 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 NewScrapeConfigsResponseWithDefaults() *ScrapeConfigsResponse { + this := ScrapeConfigsResponse{} + return &this +} + +// GetData returns the Data field value +func (o *ScrapeConfigsResponse) GetData() *[]Job { + if o == nil { + var ret *[]Job + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ScrapeConfigsResponse) GetDataOk() (*[]Job, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *ScrapeConfigsResponse) SetData(v *[]Job) { + o.Data = v +} + +// GetMessage returns the Message field value +func (o *ScrapeConfigsResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ScrapeConfigsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *ScrapeConfigsResponse) SetMessage(v *string) { + o.Message = v +} + +func (o ScrapeConfigsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableScrapeConfigsResponse struct { + value *ScrapeConfigsResponse + isSet bool +} + +func (v NullableScrapeConfigsResponse) Get() *ScrapeConfigsResponse { + return v.value +} + +func (v *NullableScrapeConfigsResponse) Set(val *ScrapeConfigsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScrapeConfigsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScrapeConfigsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScrapeConfigsResponse(val *ScrapeConfigsResponse) *NullableScrapeConfigsResponse { + return &NullableScrapeConfigsResponse{value: val, isSet: true} +} + +func (v NullableScrapeConfigsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScrapeConfigsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_service_keys_list.go b/services/observability/model_service_keys_list.go index de92c0ead..7c62d4c0d 100644 --- a/services/observability/model_service_keys_list.go +++ b/services/observability/model_service_keys_list.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the ServiceKeysList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceKeysList{} + // ServiceKeysList struct for ServiceKeysList type ServiceKeysList struct { CredentialsInfo *map[string]string `json:"credentialsInfo,omitempty"` @@ -18,3 +25,150 @@ type ServiceKeysList struct { // REQUIRED Name *string `json:"name"` } + +type _ServiceKeysList ServiceKeysList + +// NewServiceKeysList instantiates a new ServiceKeysList 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 NewServiceKeysList(id *string, name *string) *ServiceKeysList { + this := ServiceKeysList{} + this.Id = id + this.Name = name + return &this +} + +// NewServiceKeysListWithDefaults instantiates a new ServiceKeysList 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 NewServiceKeysListWithDefaults() *ServiceKeysList { + this := ServiceKeysList{} + return &this +} + +// GetCredentialsInfo returns the CredentialsInfo field value if set, zero value otherwise. +func (o *ServiceKeysList) GetCredentialsInfo() *map[string]string { + if o == nil || IsNil(o.CredentialsInfo) { + var ret *map[string]string + return ret + } + return o.CredentialsInfo +} + +// GetCredentialsInfoOk returns a tuple with the CredentialsInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceKeysList) GetCredentialsInfoOk() (*map[string]string, bool) { + if o == nil || IsNil(o.CredentialsInfo) { + return nil, false + } + return o.CredentialsInfo, true +} + +// HasCredentialsInfo returns a boolean if a field has been set. +func (o *ServiceKeysList) HasCredentialsInfo() bool { + if o != nil && !IsNil(o.CredentialsInfo) { + return true + } + + return false +} + +// SetCredentialsInfo gets a reference to the given map[string]string and assigns it to the CredentialsInfo field. +func (o *ServiceKeysList) SetCredentialsInfo(v *map[string]string) { + o.CredentialsInfo = v +} + +// GetId returns the Id field value +func (o *ServiceKeysList) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ServiceKeysList) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *ServiceKeysList) SetId(v *string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ServiceKeysList) 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 *ServiceKeysList) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *ServiceKeysList) SetName(v *string) { + o.Name = v +} + +func (o ServiceKeysList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CredentialsInfo) { + toSerialize["credentialsInfo"] = o.CredentialsInfo + } + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableServiceKeysList struct { + value *ServiceKeysList + isSet bool +} + +func (v NullableServiceKeysList) Get() *ServiceKeysList { + return v.value +} + +func (v *NullableServiceKeysList) Set(val *ServiceKeysList) { + v.value = val + v.isSet = true +} + +func (v NullableServiceKeysList) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceKeysList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceKeysList(val *ServiceKeysList) *NullableServiceKeysList { + return &NullableServiceKeysList{value: val, isSet: true} +} + +func (v NullableServiceKeysList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceKeysList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_static_configs.go b/services/observability/model_static_configs.go index 7eab67782..1b4bcf187 100644 --- a/services/observability/model_static_configs.go +++ b/services/observability/model_static_configs.go @@ -10,9 +10,137 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the StaticConfigs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StaticConfigs{} + // StaticConfigs struct for StaticConfigs type StaticConfigs struct { Labels *map[string]string `json:"labels,omitempty"` // REQUIRED Targets *[]string `json:"targets"` } + +type _StaticConfigs StaticConfigs + +// NewStaticConfigs instantiates a new StaticConfigs 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 NewStaticConfigs(targets *[]string) *StaticConfigs { + this := StaticConfigs{} + this.Targets = targets + return &this +} + +// NewStaticConfigsWithDefaults instantiates a new StaticConfigs 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 NewStaticConfigsWithDefaults() *StaticConfigs { + this := StaticConfigs{} + return &this +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *StaticConfigs) GetLabels() *map[string]string { + if o == nil || IsNil(o.Labels) { + var ret *map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StaticConfigs) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *StaticConfigs) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *StaticConfigs) SetLabels(v *map[string]string) { + o.Labels = v +} + +// GetTargets returns the Targets field value +func (o *StaticConfigs) GetTargets() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.Targets +} + +// GetTargetsOk returns a tuple with the Targets field value +// and a boolean to check if the value has been set. +func (o *StaticConfigs) GetTargetsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.Targets, true +} + +// SetTargets sets field value +func (o *StaticConfigs) SetTargets(v *[]string) { + o.Targets = v +} + +func (o StaticConfigs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["targets"] = o.Targets + return toSerialize, nil +} + +type NullableStaticConfigs struct { + value *StaticConfigs + isSet bool +} + +func (v NullableStaticConfigs) Get() *StaticConfigs { + return v.value +} + +func (v *NullableStaticConfigs) Set(val *StaticConfigs) { + v.value = val + v.isSet = true +} + +func (v NullableStaticConfigs) IsSet() bool { + return v.isSet +} + +func (v *NullableStaticConfigs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStaticConfigs(val *StaticConfigs) *NullableStaticConfigs { + return &NullableStaticConfigs{value: val, isSet: true} +} + +func (v NullableStaticConfigs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStaticConfigs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_tls_config.go b/services/observability/model_tls_config.go index 906f428ff..ff47b7e6f 100644 --- a/services/observability/model_tls_config.go +++ b/services/observability/model_tls_config.go @@ -10,7 +10,111 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the TLSConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TLSConfig{} + // TLSConfig struct for TLSConfig type TLSConfig struct { InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"` } + +// NewTLSConfig instantiates a new TLSConfig 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 NewTLSConfig() *TLSConfig { + this := TLSConfig{} + var insecureSkipVerify bool = false + this.InsecureSkipVerify = &insecureSkipVerify + return &this +} + +// NewTLSConfigWithDefaults instantiates a new TLSConfig 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 NewTLSConfigWithDefaults() *TLSConfig { + this := TLSConfig{} + var insecureSkipVerify bool = false + this.InsecureSkipVerify = &insecureSkipVerify + return &this +} + +// GetInsecureSkipVerify returns the InsecureSkipVerify field value if set, zero value otherwise. +func (o *TLSConfig) GetInsecureSkipVerify() *bool { + if o == nil || IsNil(o.InsecureSkipVerify) { + var ret *bool + return ret + } + return o.InsecureSkipVerify +} + +// GetInsecureSkipVerifyOk returns a tuple with the InsecureSkipVerify field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSConfig) GetInsecureSkipVerifyOk() (*bool, bool) { + if o == nil || IsNil(o.InsecureSkipVerify) { + return nil, false + } + return o.InsecureSkipVerify, true +} + +// HasInsecureSkipVerify returns a boolean if a field has been set. +func (o *TLSConfig) HasInsecureSkipVerify() bool { + if o != nil && !IsNil(o.InsecureSkipVerify) { + return true + } + + return false +} + +// SetInsecureSkipVerify gets a reference to the given bool and assigns it to the InsecureSkipVerify field. +func (o *TLSConfig) SetInsecureSkipVerify(v *bool) { + o.InsecureSkipVerify = v +} + +func (o TLSConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.InsecureSkipVerify) { + toSerialize["insecureSkipVerify"] = o.InsecureSkipVerify + } + return toSerialize, nil +} + +type NullableTLSConfig struct { + value *TLSConfig + isSet bool +} + +func (v NullableTLSConfig) Get() *TLSConfig { + return v.value +} + +func (v *NullableTLSConfig) Set(val *TLSConfig) { + v.value = val + v.isSet = true +} + +func (v NullableTLSConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableTLSConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTLSConfig(val *TLSConfig) *NullableTLSConfig { + return &NullableTLSConfig{value: val, isSet: true} +} + +func (v NullableTLSConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTLSConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_acl_payload.go b/services/observability/model_update_acl_payload.go index 955a148de..025b6548e 100644 --- a/services/observability/model_update_acl_payload.go +++ b/services/observability/model_update_acl_payload.go @@ -10,9 +10,102 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateACLPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateACLPayload{} + // UpdateACLPayload List of cidr. Send empty string to remove acl. type UpdateACLPayload struct { // list of cidr // REQUIRED Acl *[]string `json:"acl"` } + +type _UpdateACLPayload UpdateACLPayload + +// NewUpdateACLPayload instantiates a new UpdateACLPayload 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 NewUpdateACLPayload(acl *[]string) *UpdateACLPayload { + this := UpdateACLPayload{} + this.Acl = acl + return &this +} + +// NewUpdateACLPayloadWithDefaults instantiates a new UpdateACLPayload 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 NewUpdateACLPayloadWithDefaults() *UpdateACLPayload { + this := UpdateACLPayload{} + return &this +} + +// GetAcl returns the Acl field value +func (o *UpdateACLPayload) GetAcl() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *UpdateACLPayload) GetAclOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *UpdateACLPayload) SetAcl(v *[]string) { + o.Acl = v +} + +func (o UpdateACLPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + return toSerialize, nil +} + +type NullableUpdateACLPayload struct { + value *UpdateACLPayload + isSet bool +} + +func (v NullableUpdateACLPayload) Get() *UpdateACLPayload { + return v.value +} + +func (v *NullableUpdateACLPayload) Set(val *UpdateACLPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateACLPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateACLPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateACLPayload(val *UpdateACLPayload) *NullableUpdateACLPayload { + return &NullableUpdateACLPayload{value: val, isSet: true} +} + +func (v NullableUpdateACLPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateACLPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_alert_config_receiver_payload.go b/services/observability/model_update_alert_config_receiver_payload.go index 0c8ffae66..7e6b7eb8d 100644 --- a/services/observability/model_update_alert_config_receiver_payload.go +++ b/services/observability/model_update_alert_config_receiver_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateAlertConfigReceiverPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAlertConfigReceiverPayload{} + // UpdateAlertConfigReceiverPayload Receivers type UpdateAlertConfigReceiverPayload struct { // Email configurations @@ -21,3 +28,194 @@ type UpdateAlertConfigReceiverPayload struct { OpsgenieConfigs *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner `json:"opsgenieConfigs,omitempty"` WebHookConfigs *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner `json:"webHookConfigs,omitempty"` } + +type _UpdateAlertConfigReceiverPayload UpdateAlertConfigReceiverPayload + +// NewUpdateAlertConfigReceiverPayload instantiates a new UpdateAlertConfigReceiverPayload 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 NewUpdateAlertConfigReceiverPayload(name *string) *UpdateAlertConfigReceiverPayload { + this := UpdateAlertConfigReceiverPayload{} + this.Name = name + return &this +} + +// NewUpdateAlertConfigReceiverPayloadWithDefaults instantiates a new UpdateAlertConfigReceiverPayload 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 NewUpdateAlertConfigReceiverPayloadWithDefaults() *UpdateAlertConfigReceiverPayload { + this := UpdateAlertConfigReceiverPayload{} + return &this +} + +// GetEmailConfigs returns the EmailConfigs field value if set, zero value otherwise. +func (o *UpdateAlertConfigReceiverPayload) GetEmailConfigs() *[]CreateAlertConfigReceiverPayloadEmailConfigsInner { + if o == nil || IsNil(o.EmailConfigs) { + var ret *[]CreateAlertConfigReceiverPayloadEmailConfigsInner + return ret + } + return o.EmailConfigs +} + +// GetEmailConfigsOk returns a tuple with the EmailConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigReceiverPayload) GetEmailConfigsOk() (*[]CreateAlertConfigReceiverPayloadEmailConfigsInner, bool) { + if o == nil || IsNil(o.EmailConfigs) { + return nil, false + } + return o.EmailConfigs, true +} + +// HasEmailConfigs returns a boolean if a field has been set. +func (o *UpdateAlertConfigReceiverPayload) HasEmailConfigs() bool { + if o != nil && !IsNil(o.EmailConfigs) { + return true + } + + return false +} + +// SetEmailConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadEmailConfigsInner and assigns it to the EmailConfigs field. +func (o *UpdateAlertConfigReceiverPayload) SetEmailConfigs(v *[]CreateAlertConfigReceiverPayloadEmailConfigsInner) { + o.EmailConfigs = v +} + +// GetName returns the Name field value +func (o *UpdateAlertConfigReceiverPayload) 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 *UpdateAlertConfigReceiverPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *UpdateAlertConfigReceiverPayload) SetName(v *string) { + o.Name = v +} + +// GetOpsgenieConfigs returns the OpsgenieConfigs field value if set, zero value otherwise. +func (o *UpdateAlertConfigReceiverPayload) GetOpsgenieConfigs() *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner { + if o == nil || IsNil(o.OpsgenieConfigs) { + var ret *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner + return ret + } + return o.OpsgenieConfigs +} + +// GetOpsgenieConfigsOk returns a tuple with the OpsgenieConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigReceiverPayload) GetOpsgenieConfigsOk() (*[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner, bool) { + if o == nil || IsNil(o.OpsgenieConfigs) { + return nil, false + } + return o.OpsgenieConfigs, true +} + +// HasOpsgenieConfigs returns a boolean if a field has been set. +func (o *UpdateAlertConfigReceiverPayload) HasOpsgenieConfigs() bool { + if o != nil && !IsNil(o.OpsgenieConfigs) { + return true + } + + return false +} + +// SetOpsgenieConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner and assigns it to the OpsgenieConfigs field. +func (o *UpdateAlertConfigReceiverPayload) SetOpsgenieConfigs(v *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) { + o.OpsgenieConfigs = v +} + +// GetWebHookConfigs returns the WebHookConfigs field value if set, zero value otherwise. +func (o *UpdateAlertConfigReceiverPayload) GetWebHookConfigs() *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner { + if o == nil || IsNil(o.WebHookConfigs) { + var ret *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner + return ret + } + return o.WebHookConfigs +} + +// GetWebHookConfigsOk returns a tuple with the WebHookConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigReceiverPayload) GetWebHookConfigsOk() (*[]CreateAlertConfigReceiverPayloadWebHookConfigsInner, bool) { + if o == nil || IsNil(o.WebHookConfigs) { + return nil, false + } + return o.WebHookConfigs, true +} + +// HasWebHookConfigs returns a boolean if a field has been set. +func (o *UpdateAlertConfigReceiverPayload) HasWebHookConfigs() bool { + if o != nil && !IsNil(o.WebHookConfigs) { + return true + } + + return false +} + +// SetWebHookConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadWebHookConfigsInner and assigns it to the WebHookConfigs field. +func (o *UpdateAlertConfigReceiverPayload) SetWebHookConfigs(v *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner) { + o.WebHookConfigs = v +} + +func (o UpdateAlertConfigReceiverPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EmailConfigs) { + toSerialize["emailConfigs"] = o.EmailConfigs + } + toSerialize["name"] = o.Name + if !IsNil(o.OpsgenieConfigs) { + toSerialize["opsgenieConfigs"] = o.OpsgenieConfigs + } + if !IsNil(o.WebHookConfigs) { + toSerialize["webHookConfigs"] = o.WebHookConfigs + } + return toSerialize, nil +} + +type NullableUpdateAlertConfigReceiverPayload struct { + value *UpdateAlertConfigReceiverPayload + isSet bool +} + +func (v NullableUpdateAlertConfigReceiverPayload) Get() *UpdateAlertConfigReceiverPayload { + return v.value +} + +func (v *NullableUpdateAlertConfigReceiverPayload) Set(val *UpdateAlertConfigReceiverPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAlertConfigReceiverPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAlertConfigReceiverPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAlertConfigReceiverPayload(val *UpdateAlertConfigReceiverPayload) *NullableUpdateAlertConfigReceiverPayload { + return &NullableUpdateAlertConfigReceiverPayload{value: val, isSet: true} +} + +func (v NullableUpdateAlertConfigReceiverPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAlertConfigReceiverPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_alert_config_route_payload.go b/services/observability/model_update_alert_config_route_payload.go index 78d664892..4e24e289b 100644 --- a/services/observability/model_update_alert_config_route_payload.go +++ b/services/observability/model_update_alert_config_route_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateAlertConfigRoutePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAlertConfigRoutePayload{} + // UpdateAlertConfigRoutePayload The root node of the routing tree. type UpdateAlertConfigRoutePayload struct { // The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping. @@ -32,3 +39,381 @@ type UpdateAlertConfigRoutePayload struct { // Zero or more child routes. Routes *[]CreateAlertConfigRoutePayloadRoutesInner `json:"routes,omitempty"` } + +type _UpdateAlertConfigRoutePayload UpdateAlertConfigRoutePayload + +// NewUpdateAlertConfigRoutePayload instantiates a new UpdateAlertConfigRoutePayload 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 NewUpdateAlertConfigRoutePayload(receiver *string) *UpdateAlertConfigRoutePayload { + this := UpdateAlertConfigRoutePayload{} + var groupInterval string = "5m" + this.GroupInterval = &groupInterval + var groupWait string = "30s" + this.GroupWait = &groupWait + this.Receiver = receiver + var repeatInterval string = "4h" + this.RepeatInterval = &repeatInterval + return &this +} + +// NewUpdateAlertConfigRoutePayloadWithDefaults instantiates a new UpdateAlertConfigRoutePayload 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 NewUpdateAlertConfigRoutePayloadWithDefaults() *UpdateAlertConfigRoutePayload { + this := UpdateAlertConfigRoutePayload{} + var groupInterval string = "5m" + this.GroupInterval = &groupInterval + var groupWait string = "30s" + this.GroupWait = &groupWait + var repeatInterval string = "4h" + this.RepeatInterval = &repeatInterval + return &this +} + +// GetGroupBy returns the GroupBy field value if set, zero value otherwise. +func (o *UpdateAlertConfigRoutePayload) GetGroupBy() *[]string { + if o == nil || IsNil(o.GroupBy) { + var ret *[]string + return ret + } + return o.GroupBy +} + +// 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 *UpdateAlertConfigRoutePayload) GetGroupByOk() (*[]string, bool) { + if o == nil || IsNil(o.GroupBy) { + return nil, false + } + return o.GroupBy, true +} + +// HasGroupBy returns a boolean if a field has been set. +func (o *UpdateAlertConfigRoutePayload) HasGroupBy() bool { + if o != nil && !IsNil(o.GroupBy) { + return true + } + + return false +} + +// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. +func (o *UpdateAlertConfigRoutePayload) SetGroupBy(v *[]string) { + o.GroupBy = v +} + +// GetGroupInterval returns the GroupInterval field value if set, zero value otherwise. +func (o *UpdateAlertConfigRoutePayload) GetGroupInterval() *string { + if o == nil || IsNil(o.GroupInterval) { + var ret *string + return ret + } + return o.GroupInterval +} + +// 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 *UpdateAlertConfigRoutePayload) GetGroupIntervalOk() (*string, bool) { + if o == nil || IsNil(o.GroupInterval) { + return nil, false + } + return o.GroupInterval, true +} + +// HasGroupInterval returns a boolean if a field has been set. +func (o *UpdateAlertConfigRoutePayload) HasGroupInterval() bool { + if o != nil && !IsNil(o.GroupInterval) { + return true + } + + return false +} + +// SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. +func (o *UpdateAlertConfigRoutePayload) SetGroupInterval(v *string) { + o.GroupInterval = v +} + +// GetGroupWait returns the GroupWait field value if set, zero value otherwise. +func (o *UpdateAlertConfigRoutePayload) GetGroupWait() *string { + if o == nil || IsNil(o.GroupWait) { + var ret *string + return ret + } + return o.GroupWait +} + +// 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 *UpdateAlertConfigRoutePayload) GetGroupWaitOk() (*string, bool) { + if o == nil || IsNil(o.GroupWait) { + return nil, false + } + return o.GroupWait, true +} + +// HasGroupWait returns a boolean if a field has been set. +func (o *UpdateAlertConfigRoutePayload) HasGroupWait() bool { + if o != nil && !IsNil(o.GroupWait) { + return true + } + + return false +} + +// SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. +func (o *UpdateAlertConfigRoutePayload) SetGroupWait(v *string) { + o.GroupWait = v +} + +// GetMatch returns the Match field value if set, zero value otherwise. +func (o *UpdateAlertConfigRoutePayload) GetMatch() *map[string]interface{} { + if o == nil || IsNil(o.Match) { + var ret *map[string]interface{} + return ret + } + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigRoutePayload) GetMatchOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Match) { + return &map[string]interface{}{}, false + } + return o.Match, true +} + +// HasMatch returns a boolean if a field has been set. +func (o *UpdateAlertConfigRoutePayload) HasMatch() bool { + if o != nil && !IsNil(o.Match) { + return true + } + + return false +} + +// SetMatch gets a reference to the given map[string]interface{} and assigns it to the Match field. +func (o *UpdateAlertConfigRoutePayload) SetMatch(v *map[string]interface{}) { + o.Match = v +} + +// GetMatchRe returns the MatchRe field value if set, zero value otherwise. +func (o *UpdateAlertConfigRoutePayload) GetMatchRe() *map[string]interface{} { + if o == nil || IsNil(o.MatchRe) { + var ret *map[string]interface{} + return ret + } + return o.MatchRe +} + +// GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigRoutePayload) GetMatchReOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.MatchRe) { + return &map[string]interface{}{}, false + } + return o.MatchRe, true +} + +// HasMatchRe returns a boolean if a field has been set. +func (o *UpdateAlertConfigRoutePayload) HasMatchRe() bool { + if o != nil && !IsNil(o.MatchRe) { + return true + } + + return false +} + +// SetMatchRe gets a reference to the given map[string]interface{} and assigns it to the MatchRe field. +func (o *UpdateAlertConfigRoutePayload) SetMatchRe(v *map[string]interface{}) { + o.MatchRe = v +} + +// GetMatchers returns the Matchers field value if set, zero value otherwise. +func (o *UpdateAlertConfigRoutePayload) GetMatchers() *[]string { + if o == nil || IsNil(o.Matchers) { + var ret *[]string + return ret + } + return o.Matchers +} + +// 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 *UpdateAlertConfigRoutePayload) GetMatchersOk() (*[]string, bool) { + if o == nil || IsNil(o.Matchers) { + return nil, false + } + return o.Matchers, true +} + +// HasMatchers returns a boolean if a field has been set. +func (o *UpdateAlertConfigRoutePayload) HasMatchers() bool { + if o != nil && !IsNil(o.Matchers) { + return true + } + + return false +} + +// SetMatchers gets a reference to the given []string and assigns it to the Matchers field. +func (o *UpdateAlertConfigRoutePayload) SetMatchers(v *[]string) { + o.Matchers = v +} + +// GetReceiver returns the Receiver field value +func (o *UpdateAlertConfigRoutePayload) GetReceiver() *string { + if o == nil { + var ret *string + return ret + } + + return o.Receiver +} + +// GetReceiverOk returns a tuple with the Receiver field value +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigRoutePayload) GetReceiverOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Receiver, true +} + +// SetReceiver sets field value +func (o *UpdateAlertConfigRoutePayload) SetReceiver(v *string) { + o.Receiver = v +} + +// GetRepeatInterval returns the RepeatInterval field value if set, zero value otherwise. +func (o *UpdateAlertConfigRoutePayload) GetRepeatInterval() *string { + if o == nil || IsNil(o.RepeatInterval) { + var ret *string + return ret + } + return o.RepeatInterval +} + +// 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 *UpdateAlertConfigRoutePayload) GetRepeatIntervalOk() (*string, bool) { + if o == nil || IsNil(o.RepeatInterval) { + return nil, false + } + return o.RepeatInterval, true +} + +// HasRepeatInterval returns a boolean if a field has been set. +func (o *UpdateAlertConfigRoutePayload) HasRepeatInterval() bool { + if o != nil && !IsNil(o.RepeatInterval) { + return true + } + + return false +} + +// SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. +func (o *UpdateAlertConfigRoutePayload) SetRepeatInterval(v *string) { + o.RepeatInterval = v +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *UpdateAlertConfigRoutePayload) GetRoutes() *[]CreateAlertConfigRoutePayloadRoutesInner { + if o == nil || IsNil(o.Routes) { + var ret *[]CreateAlertConfigRoutePayloadRoutesInner + return ret + } + return o.Routes +} + +// 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 *UpdateAlertConfigRoutePayload) GetRoutesOk() (*[]CreateAlertConfigRoutePayloadRoutesInner, bool) { + if o == nil || IsNil(o.Routes) { + return nil, false + } + return o.Routes, true +} + +// HasRoutes returns a boolean if a field has been set. +func (o *UpdateAlertConfigRoutePayload) HasRoutes() bool { + if o != nil && !IsNil(o.Routes) { + return true + } + + return false +} + +// SetRoutes gets a reference to the given []CreateAlertConfigRoutePayloadRoutesInner and assigns it to the Routes field. +func (o *UpdateAlertConfigRoutePayload) SetRoutes(v *[]CreateAlertConfigRoutePayloadRoutesInner) { + o.Routes = v +} + +func (o UpdateAlertConfigRoutePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.GroupBy) { + toSerialize["groupBy"] = o.GroupBy + } + if !IsNil(o.GroupInterval) { + toSerialize["groupInterval"] = o.GroupInterval + } + if !IsNil(o.GroupWait) { + toSerialize["groupWait"] = o.GroupWait + } + if !IsNil(o.Match) { + toSerialize["match"] = o.Match + } + if !IsNil(o.MatchRe) { + toSerialize["matchRe"] = o.MatchRe + } + if !IsNil(o.Matchers) { + toSerialize["matchers"] = o.Matchers + } + toSerialize["receiver"] = o.Receiver + if !IsNil(o.RepeatInterval) { + toSerialize["repeatInterval"] = o.RepeatInterval + } + if !IsNil(o.Routes) { + toSerialize["routes"] = o.Routes + } + return toSerialize, nil +} + +type NullableUpdateAlertConfigRoutePayload struct { + value *UpdateAlertConfigRoutePayload + isSet bool +} + +func (v NullableUpdateAlertConfigRoutePayload) Get() *UpdateAlertConfigRoutePayload { + return v.value +} + +func (v *NullableUpdateAlertConfigRoutePayload) Set(val *UpdateAlertConfigRoutePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAlertConfigRoutePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAlertConfigRoutePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAlertConfigRoutePayload(val *UpdateAlertConfigRoutePayload) *NullableUpdateAlertConfigRoutePayload { + return &NullableUpdateAlertConfigRoutePayload{value: val, isSet: true} +} + +func (v NullableUpdateAlertConfigRoutePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAlertConfigRoutePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_alert_configs_payload.go b/services/observability/model_update_alert_configs_payload.go index 1bcebd83e..18fa5b5a7 100644 --- a/services/observability/model_update_alert_configs_payload.go +++ b/services/observability/model_update_alert_configs_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateAlertConfigsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAlertConfigsPayload{} + // UpdateAlertConfigsPayload Alert config type UpdateAlertConfigsPayload struct { Global *UpdateAlertConfigsPayloadGlobal `json:"global,omitempty"` @@ -20,3 +27,185 @@ type UpdateAlertConfigsPayload struct { // REQUIRED Route *UpdateAlertConfigsPayloadRoute `json:"route"` } + +type _UpdateAlertConfigsPayload UpdateAlertConfigsPayload + +// NewUpdateAlertConfigsPayload instantiates a new UpdateAlertConfigsPayload 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 NewUpdateAlertConfigsPayload(receivers *[]UpdateAlertConfigsPayloadReceiversInner, route *UpdateAlertConfigsPayloadRoute) *UpdateAlertConfigsPayload { + this := UpdateAlertConfigsPayload{} + this.Receivers = receivers + this.Route = route + return &this +} + +// NewUpdateAlertConfigsPayloadWithDefaults instantiates a new UpdateAlertConfigsPayload 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 NewUpdateAlertConfigsPayloadWithDefaults() *UpdateAlertConfigsPayload { + this := UpdateAlertConfigsPayload{} + return &this +} + +// GetGlobal returns the Global field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayload) GetGlobal() *UpdateAlertConfigsPayloadGlobal { + if o == nil || IsNil(o.Global) { + var ret *UpdateAlertConfigsPayloadGlobal + return ret + } + return o.Global +} + +// GetGlobalOk returns a tuple with the Global field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayload) GetGlobalOk() (*UpdateAlertConfigsPayloadGlobal, bool) { + if o == nil || IsNil(o.Global) { + return nil, false + } + return o.Global, true +} + +// HasGlobal returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayload) HasGlobal() bool { + if o != nil && !IsNil(o.Global) { + return true + } + + return false +} + +// SetGlobal gets a reference to the given UpdateAlertConfigsPayloadGlobal and assigns it to the Global field. +func (o *UpdateAlertConfigsPayload) SetGlobal(v *UpdateAlertConfigsPayloadGlobal) { + o.Global = v +} + +// GetInhibitRules returns the InhibitRules field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayload) GetInhibitRules() *UpdateAlertConfigsPayloadInhibitRules { + if o == nil || IsNil(o.InhibitRules) { + var ret *UpdateAlertConfigsPayloadInhibitRules + return ret + } + return o.InhibitRules +} + +// GetInhibitRulesOk returns a tuple with the InhibitRules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayload) GetInhibitRulesOk() (*UpdateAlertConfigsPayloadInhibitRules, bool) { + if o == nil || IsNil(o.InhibitRules) { + return nil, false + } + return o.InhibitRules, true +} + +// HasInhibitRules returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayload) HasInhibitRules() bool { + if o != nil && !IsNil(o.InhibitRules) { + return true + } + + return false +} + +// SetInhibitRules gets a reference to the given UpdateAlertConfigsPayloadInhibitRules and assigns it to the InhibitRules field. +func (o *UpdateAlertConfigsPayload) SetInhibitRules(v *UpdateAlertConfigsPayloadInhibitRules) { + o.InhibitRules = v +} + +// GetReceivers returns the Receivers field value +func (o *UpdateAlertConfigsPayload) GetReceivers() *[]UpdateAlertConfigsPayloadReceiversInner { + if o == nil { + var ret *[]UpdateAlertConfigsPayloadReceiversInner + return ret + } + + return o.Receivers +} + +// GetReceiversOk returns a tuple with the Receivers field value +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayload) GetReceiversOk() (*[]UpdateAlertConfigsPayloadReceiversInner, bool) { + if o == nil { + return nil, false + } + return o.Receivers, true +} + +// SetReceivers sets field value +func (o *UpdateAlertConfigsPayload) SetReceivers(v *[]UpdateAlertConfigsPayloadReceiversInner) { + o.Receivers = v +} + +// GetRoute returns the Route field value +func (o *UpdateAlertConfigsPayload) GetRoute() *UpdateAlertConfigsPayloadRoute { + if o == nil { + var ret *UpdateAlertConfigsPayloadRoute + return ret + } + + return o.Route +} + +// GetRouteOk returns a tuple with the Route field value +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayload) GetRouteOk() (*UpdateAlertConfigsPayloadRoute, bool) { + if o == nil { + return nil, false + } + return o.Route, true +} + +// SetRoute sets field value +func (o *UpdateAlertConfigsPayload) SetRoute(v *UpdateAlertConfigsPayloadRoute) { + o.Route = v +} + +func (o UpdateAlertConfigsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Global) { + toSerialize["global"] = o.Global + } + if !IsNil(o.InhibitRules) { + toSerialize["inhibitRules"] = o.InhibitRules + } + toSerialize["receivers"] = o.Receivers + toSerialize["route"] = o.Route + return toSerialize, nil +} + +type NullableUpdateAlertConfigsPayload struct { + value *UpdateAlertConfigsPayload + isSet bool +} + +func (v NullableUpdateAlertConfigsPayload) Get() *UpdateAlertConfigsPayload { + return v.value +} + +func (v *NullableUpdateAlertConfigsPayload) Set(val *UpdateAlertConfigsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAlertConfigsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAlertConfigsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAlertConfigsPayload(val *UpdateAlertConfigsPayload) *NullableUpdateAlertConfigsPayload { + return &NullableUpdateAlertConfigsPayload{value: val, isSet: true} +} + +func (v NullableUpdateAlertConfigsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAlertConfigsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_alert_configs_payload_global.go b/services/observability/model_update_alert_configs_payload_global.go index 43dbb2bff..b2d135b4c 100644 --- a/services/observability/model_update_alert_configs_payload_global.go +++ b/services/observability/model_update_alert_configs_payload_global.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateAlertConfigsPayloadGlobal type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAlertConfigsPayloadGlobal{} + // UpdateAlertConfigsPayloadGlobal Global config. If nothing passed the default argus config will be used. type UpdateAlertConfigsPayloadGlobal struct { // Opsgenie api key `Additional Validators:` * should only include the characters: a-zA-Z0-9- @@ -29,3 +36,345 @@ type UpdateAlertConfigsPayloadGlobal struct { // The default SMTP smarthost used for sending emails, including port number. Port number usually is 25, or 587 for SMTP over TLS (sometimes referred to as STARTTLS). Example: smtp.example.org:587 `Additional Validators:` * should only include the characters: a-zA-Z0-9_./@&?:- SmtpSmarthost *string `json:"smtpSmarthost,omitempty"` } + +// NewUpdateAlertConfigsPayloadGlobal instantiates a new UpdateAlertConfigsPayloadGlobal 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 NewUpdateAlertConfigsPayloadGlobal() *UpdateAlertConfigsPayloadGlobal { + this := UpdateAlertConfigsPayloadGlobal{} + var resolveTimeout string = "5m" + this.ResolveTimeout = &resolveTimeout + return &this +} + +// NewUpdateAlertConfigsPayloadGlobalWithDefaults instantiates a new UpdateAlertConfigsPayloadGlobal 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 NewUpdateAlertConfigsPayloadGlobalWithDefaults() *UpdateAlertConfigsPayloadGlobal { + this := UpdateAlertConfigsPayloadGlobal{} + var resolveTimeout string = "5m" + this.ResolveTimeout = &resolveTimeout + return &this +} + +// GetOpsgenieApiKey returns the OpsgenieApiKey field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadGlobal) GetOpsgenieApiKey() *string { + if o == nil || IsNil(o.OpsgenieApiKey) { + var ret *string + return ret + } + return o.OpsgenieApiKey +} + +// GetOpsgenieApiKeyOk returns a tuple with the OpsgenieApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadGlobal) GetOpsgenieApiKeyOk() (*string, bool) { + if o == nil || IsNil(o.OpsgenieApiKey) { + return nil, false + } + return o.OpsgenieApiKey, true +} + +// HasOpsgenieApiKey returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadGlobal) HasOpsgenieApiKey() bool { + if o != nil && !IsNil(o.OpsgenieApiKey) { + return true + } + + return false +} + +// SetOpsgenieApiKey gets a reference to the given string and assigns it to the OpsgenieApiKey field. +func (o *UpdateAlertConfigsPayloadGlobal) SetOpsgenieApiKey(v *string) { + o.OpsgenieApiKey = v +} + +// GetOpsgenieApiUrl returns the OpsgenieApiUrl field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadGlobal) GetOpsgenieApiUrl() *string { + if o == nil || IsNil(o.OpsgenieApiUrl) { + var ret *string + return ret + } + return o.OpsgenieApiUrl +} + +// GetOpsgenieApiUrlOk returns a tuple with the OpsgenieApiUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadGlobal) GetOpsgenieApiUrlOk() (*string, bool) { + if o == nil || IsNil(o.OpsgenieApiUrl) { + return nil, false + } + return o.OpsgenieApiUrl, true +} + +// HasOpsgenieApiUrl returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadGlobal) HasOpsgenieApiUrl() bool { + if o != nil && !IsNil(o.OpsgenieApiUrl) { + return true + } + + return false +} + +// SetOpsgenieApiUrl gets a reference to the given string and assigns it to the OpsgenieApiUrl field. +func (o *UpdateAlertConfigsPayloadGlobal) SetOpsgenieApiUrl(v *string) { + o.OpsgenieApiUrl = v +} + +// GetResolveTimeout returns the ResolveTimeout field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadGlobal) GetResolveTimeout() *string { + if o == nil || IsNil(o.ResolveTimeout) { + var ret *string + return ret + } + return o.ResolveTimeout +} + +// GetResolveTimeoutOk returns a tuple with the ResolveTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadGlobal) GetResolveTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.ResolveTimeout) { + return nil, false + } + return o.ResolveTimeout, true +} + +// HasResolveTimeout returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadGlobal) HasResolveTimeout() bool { + if o != nil && !IsNil(o.ResolveTimeout) { + return true + } + + return false +} + +// SetResolveTimeout gets a reference to the given string and assigns it to the ResolveTimeout field. +func (o *UpdateAlertConfigsPayloadGlobal) SetResolveTimeout(v *string) { + o.ResolveTimeout = v +} + +// GetSmtpAuthIdentity returns the SmtpAuthIdentity field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthIdentity() *string { + if o == nil || IsNil(o.SmtpAuthIdentity) { + var ret *string + return ret + } + return o.SmtpAuthIdentity +} + +// GetSmtpAuthIdentityOk returns a tuple with the SmtpAuthIdentity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthIdentityOk() (*string, bool) { + if o == nil || IsNil(o.SmtpAuthIdentity) { + return nil, false + } + return o.SmtpAuthIdentity, true +} + +// HasSmtpAuthIdentity returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadGlobal) HasSmtpAuthIdentity() bool { + if o != nil && !IsNil(o.SmtpAuthIdentity) { + return true + } + + return false +} + +// SetSmtpAuthIdentity gets a reference to the given string and assigns it to the SmtpAuthIdentity field. +func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpAuthIdentity(v *string) { + o.SmtpAuthIdentity = v +} + +// GetSmtpAuthPassword returns the SmtpAuthPassword field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthPassword() *string { + if o == nil || IsNil(o.SmtpAuthPassword) { + var ret *string + return ret + } + return o.SmtpAuthPassword +} + +// GetSmtpAuthPasswordOk returns a tuple with the SmtpAuthPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthPasswordOk() (*string, bool) { + if o == nil || IsNil(o.SmtpAuthPassword) { + return nil, false + } + return o.SmtpAuthPassword, true +} + +// HasSmtpAuthPassword returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadGlobal) HasSmtpAuthPassword() bool { + if o != nil && !IsNil(o.SmtpAuthPassword) { + return true + } + + return false +} + +// SetSmtpAuthPassword gets a reference to the given string and assigns it to the SmtpAuthPassword field. +func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpAuthPassword(v *string) { + o.SmtpAuthPassword = v +} + +// GetSmtpAuthUsername returns the SmtpAuthUsername field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthUsername() *string { + if o == nil || IsNil(o.SmtpAuthUsername) { + var ret *string + return ret + } + return o.SmtpAuthUsername +} + +// GetSmtpAuthUsernameOk returns a tuple with the SmtpAuthUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthUsernameOk() (*string, bool) { + if o == nil || IsNil(o.SmtpAuthUsername) { + return nil, false + } + return o.SmtpAuthUsername, true +} + +// HasSmtpAuthUsername returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadGlobal) HasSmtpAuthUsername() bool { + if o != nil && !IsNil(o.SmtpAuthUsername) { + return true + } + + return false +} + +// SetSmtpAuthUsername gets a reference to the given string and assigns it to the SmtpAuthUsername field. +func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpAuthUsername(v *string) { + o.SmtpAuthUsername = v +} + +// GetSmtpFrom returns the SmtpFrom field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpFrom() *string { + if o == nil || IsNil(o.SmtpFrom) { + var ret *string + return ret + } + return o.SmtpFrom +} + +// GetSmtpFromOk returns a tuple with the SmtpFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpFromOk() (*string, bool) { + if o == nil || IsNil(o.SmtpFrom) { + return nil, false + } + return o.SmtpFrom, true +} + +// HasSmtpFrom returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadGlobal) HasSmtpFrom() bool { + if o != nil && !IsNil(o.SmtpFrom) { + return true + } + + return false +} + +// SetSmtpFrom gets a reference to the given string and assigns it to the SmtpFrom field. +func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpFrom(v *string) { + o.SmtpFrom = v +} + +// GetSmtpSmarthost returns the SmtpSmarthost field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpSmarthost() *string { + if o == nil || IsNil(o.SmtpSmarthost) { + var ret *string + return ret + } + return o.SmtpSmarthost +} + +// GetSmtpSmarthostOk returns a tuple with the SmtpSmarthost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpSmarthostOk() (*string, bool) { + if o == nil || IsNil(o.SmtpSmarthost) { + return nil, false + } + return o.SmtpSmarthost, true +} + +// HasSmtpSmarthost returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadGlobal) HasSmtpSmarthost() bool { + if o != nil && !IsNil(o.SmtpSmarthost) { + return true + } + + return false +} + +// SetSmtpSmarthost gets a reference to the given string and assigns it to the SmtpSmarthost field. +func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpSmarthost(v *string) { + o.SmtpSmarthost = v +} + +func (o UpdateAlertConfigsPayloadGlobal) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.OpsgenieApiKey) { + toSerialize["opsgenieApiKey"] = o.OpsgenieApiKey + } + if !IsNil(o.OpsgenieApiUrl) { + toSerialize["opsgenieApiUrl"] = o.OpsgenieApiUrl + } + if !IsNil(o.ResolveTimeout) { + toSerialize["resolveTimeout"] = o.ResolveTimeout + } + if !IsNil(o.SmtpAuthIdentity) { + toSerialize["smtpAuthIdentity"] = o.SmtpAuthIdentity + } + if !IsNil(o.SmtpAuthPassword) { + toSerialize["smtpAuthPassword"] = o.SmtpAuthPassword + } + if !IsNil(o.SmtpAuthUsername) { + toSerialize["smtpAuthUsername"] = o.SmtpAuthUsername + } + if !IsNil(o.SmtpFrom) { + toSerialize["smtpFrom"] = o.SmtpFrom + } + if !IsNil(o.SmtpSmarthost) { + toSerialize["smtpSmarthost"] = o.SmtpSmarthost + } + return toSerialize, nil +} + +type NullableUpdateAlertConfigsPayloadGlobal struct { + value *UpdateAlertConfigsPayloadGlobal + isSet bool +} + +func (v NullableUpdateAlertConfigsPayloadGlobal) Get() *UpdateAlertConfigsPayloadGlobal { + return v.value +} + +func (v *NullableUpdateAlertConfigsPayloadGlobal) Set(val *UpdateAlertConfigsPayloadGlobal) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAlertConfigsPayloadGlobal) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAlertConfigsPayloadGlobal) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAlertConfigsPayloadGlobal(val *UpdateAlertConfigsPayloadGlobal) *NullableUpdateAlertConfigsPayloadGlobal { + return &NullableUpdateAlertConfigsPayloadGlobal{value: val, isSet: true} +} + +func (v NullableUpdateAlertConfigsPayloadGlobal) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAlertConfigsPayloadGlobal) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_alert_configs_payload_inhibit_rules.go b/services/observability/model_update_alert_configs_payload_inhibit_rules.go index ff3d6abde..2bebf6514 100644 --- a/services/observability/model_update_alert_configs_payload_inhibit_rules.go +++ b/services/observability/model_update_alert_configs_payload_inhibit_rules.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateAlertConfigsPayloadInhibitRules type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAlertConfigsPayloadInhibitRules{} + // UpdateAlertConfigsPayloadInhibitRules A list of inhibition rules. type UpdateAlertConfigsPayloadInhibitRules struct { // Labels that must have an equal value in the source and target alert for the inhibition to take effect. `Additional Validators:` * should only include the characters: a-zA-Z0-9_./@&?:- @@ -23,3 +30,236 @@ type UpdateAlertConfigsPayloadInhibitRules struct { // map of key:value. Matchers that have to be fulfilled in the alerts to be muted. Regex. `Additional Validators:` * should not contain more than 5 keys * each key and value should not have more than 200 characters TargetMatchRe *map[string]interface{} `json:"targetMatchRe,omitempty"` } + +// NewUpdateAlertConfigsPayloadInhibitRules instantiates a new UpdateAlertConfigsPayloadInhibitRules 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 NewUpdateAlertConfigsPayloadInhibitRules() *UpdateAlertConfigsPayloadInhibitRules { + this := UpdateAlertConfigsPayloadInhibitRules{} + return &this +} + +// NewUpdateAlertConfigsPayloadInhibitRulesWithDefaults instantiates a new UpdateAlertConfigsPayloadInhibitRules 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 NewUpdateAlertConfigsPayloadInhibitRulesWithDefaults() *UpdateAlertConfigsPayloadInhibitRules { + this := UpdateAlertConfigsPayloadInhibitRules{} + return &this +} + +// GetEqual returns the Equal field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadInhibitRules) GetEqual() *[]string { + if o == nil || IsNil(o.Equal) { + var ret *[]string + return ret + } + return o.Equal +} + +// GetEqualOk returns a tuple with the Equal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadInhibitRules) GetEqualOk() (*[]string, bool) { + if o == nil || IsNil(o.Equal) { + return nil, false + } + return o.Equal, true +} + +// HasEqual returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadInhibitRules) HasEqual() bool { + if o != nil && !IsNil(o.Equal) { + return true + } + + return false +} + +// SetEqual gets a reference to the given []string and assigns it to the Equal field. +func (o *UpdateAlertConfigsPayloadInhibitRules) SetEqual(v *[]string) { + o.Equal = v +} + +// GetSourceMatch returns the SourceMatch field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadInhibitRules) GetSourceMatch() *map[string]interface{} { + if o == nil || IsNil(o.SourceMatch) { + var ret *map[string]interface{} + return ret + } + return o.SourceMatch +} + +// GetSourceMatchOk returns a tuple with the SourceMatch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadInhibitRules) GetSourceMatchOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.SourceMatch) { + return &map[string]interface{}{}, false + } + return o.SourceMatch, true +} + +// HasSourceMatch returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadInhibitRules) HasSourceMatch() bool { + if o != nil && !IsNil(o.SourceMatch) { + return true + } + + return false +} + +// SetSourceMatch gets a reference to the given map[string]interface{} and assigns it to the SourceMatch field. +func (o *UpdateAlertConfigsPayloadInhibitRules) SetSourceMatch(v *map[string]interface{}) { + o.SourceMatch = v +} + +// GetSourceMatchRe returns the SourceMatchRe field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadInhibitRules) GetSourceMatchRe() *map[string]interface{} { + if o == nil || IsNil(o.SourceMatchRe) { + var ret *map[string]interface{} + return ret + } + return o.SourceMatchRe +} + +// GetSourceMatchReOk returns a tuple with the SourceMatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadInhibitRules) GetSourceMatchReOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.SourceMatchRe) { + return &map[string]interface{}{}, false + } + return o.SourceMatchRe, true +} + +// HasSourceMatchRe returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadInhibitRules) HasSourceMatchRe() bool { + if o != nil && !IsNil(o.SourceMatchRe) { + return true + } + + return false +} + +// SetSourceMatchRe gets a reference to the given map[string]interface{} and assigns it to the SourceMatchRe field. +func (o *UpdateAlertConfigsPayloadInhibitRules) SetSourceMatchRe(v *map[string]interface{}) { + o.SourceMatchRe = v +} + +// GetTargetMatch returns the TargetMatch field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadInhibitRules) GetTargetMatch() *map[string]interface{} { + if o == nil || IsNil(o.TargetMatch) { + var ret *map[string]interface{} + return ret + } + return o.TargetMatch +} + +// GetTargetMatchOk returns a tuple with the TargetMatch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadInhibitRules) GetTargetMatchOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.TargetMatch) { + return &map[string]interface{}{}, false + } + return o.TargetMatch, true +} + +// HasTargetMatch returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadInhibitRules) HasTargetMatch() bool { + if o != nil && !IsNil(o.TargetMatch) { + return true + } + + return false +} + +// SetTargetMatch gets a reference to the given map[string]interface{} and assigns it to the TargetMatch field. +func (o *UpdateAlertConfigsPayloadInhibitRules) SetTargetMatch(v *map[string]interface{}) { + o.TargetMatch = v +} + +// GetTargetMatchRe returns the TargetMatchRe field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadInhibitRules) GetTargetMatchRe() *map[string]interface{} { + if o == nil || IsNil(o.TargetMatchRe) { + var ret *map[string]interface{} + return ret + } + return o.TargetMatchRe +} + +// GetTargetMatchReOk returns a tuple with the TargetMatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadInhibitRules) GetTargetMatchReOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.TargetMatchRe) { + return &map[string]interface{}{}, false + } + return o.TargetMatchRe, true +} + +// HasTargetMatchRe returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadInhibitRules) HasTargetMatchRe() bool { + if o != nil && !IsNil(o.TargetMatchRe) { + return true + } + + return false +} + +// SetTargetMatchRe gets a reference to the given map[string]interface{} and assigns it to the TargetMatchRe field. +func (o *UpdateAlertConfigsPayloadInhibitRules) SetTargetMatchRe(v *map[string]interface{}) { + o.TargetMatchRe = v +} + +func (o UpdateAlertConfigsPayloadInhibitRules) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Equal) { + toSerialize["equal"] = o.Equal + } + if !IsNil(o.SourceMatch) { + toSerialize["sourceMatch"] = o.SourceMatch + } + if !IsNil(o.SourceMatchRe) { + toSerialize["sourceMatchRe"] = o.SourceMatchRe + } + if !IsNil(o.TargetMatch) { + toSerialize["targetMatch"] = o.TargetMatch + } + if !IsNil(o.TargetMatchRe) { + toSerialize["targetMatchRe"] = o.TargetMatchRe + } + return toSerialize, nil +} + +type NullableUpdateAlertConfigsPayloadInhibitRules struct { + value *UpdateAlertConfigsPayloadInhibitRules + isSet bool +} + +func (v NullableUpdateAlertConfigsPayloadInhibitRules) Get() *UpdateAlertConfigsPayloadInhibitRules { + return v.value +} + +func (v *NullableUpdateAlertConfigsPayloadInhibitRules) Set(val *UpdateAlertConfigsPayloadInhibitRules) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAlertConfigsPayloadInhibitRules) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAlertConfigsPayloadInhibitRules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAlertConfigsPayloadInhibitRules(val *UpdateAlertConfigsPayloadInhibitRules) *NullableUpdateAlertConfigsPayloadInhibitRules { + return &NullableUpdateAlertConfigsPayloadInhibitRules{value: val, isSet: true} +} + +func (v NullableUpdateAlertConfigsPayloadInhibitRules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAlertConfigsPayloadInhibitRules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_alert_configs_payload_receivers_inner.go b/services/observability/model_update_alert_configs_payload_receivers_inner.go index f6e9a3e46..391ac1bda 100644 --- a/services/observability/model_update_alert_configs_payload_receivers_inner.go +++ b/services/observability/model_update_alert_configs_payload_receivers_inner.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateAlertConfigsPayloadReceiversInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAlertConfigsPayloadReceiversInner{} + // UpdateAlertConfigsPayloadReceiversInner Receivers type UpdateAlertConfigsPayloadReceiversInner struct { // Email configurations @@ -21,3 +28,194 @@ type UpdateAlertConfigsPayloadReceiversInner struct { OpsgenieConfigs *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner `json:"opsgenieConfigs,omitempty"` WebHookConfigs *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner `json:"webHookConfigs,omitempty"` } + +type _UpdateAlertConfigsPayloadReceiversInner UpdateAlertConfigsPayloadReceiversInner + +// NewUpdateAlertConfigsPayloadReceiversInner instantiates a new UpdateAlertConfigsPayloadReceiversInner 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 NewUpdateAlertConfigsPayloadReceiversInner(name *string) *UpdateAlertConfigsPayloadReceiversInner { + this := UpdateAlertConfigsPayloadReceiversInner{} + this.Name = name + return &this +} + +// NewUpdateAlertConfigsPayloadReceiversInnerWithDefaults instantiates a new UpdateAlertConfigsPayloadReceiversInner 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 NewUpdateAlertConfigsPayloadReceiversInnerWithDefaults() *UpdateAlertConfigsPayloadReceiversInner { + this := UpdateAlertConfigsPayloadReceiversInner{} + return &this +} + +// GetEmailConfigs returns the EmailConfigs field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadReceiversInner) GetEmailConfigs() *[]CreateAlertConfigReceiverPayloadEmailConfigsInner { + if o == nil || IsNil(o.EmailConfigs) { + var ret *[]CreateAlertConfigReceiverPayloadEmailConfigsInner + return ret + } + return o.EmailConfigs +} + +// GetEmailConfigsOk returns a tuple with the EmailConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadReceiversInner) GetEmailConfigsOk() (*[]CreateAlertConfigReceiverPayloadEmailConfigsInner, bool) { + if o == nil || IsNil(o.EmailConfigs) { + return nil, false + } + return o.EmailConfigs, true +} + +// HasEmailConfigs returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadReceiversInner) HasEmailConfigs() bool { + if o != nil && !IsNil(o.EmailConfigs) { + return true + } + + return false +} + +// SetEmailConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadEmailConfigsInner and assigns it to the EmailConfigs field. +func (o *UpdateAlertConfigsPayloadReceiversInner) SetEmailConfigs(v *[]CreateAlertConfigReceiverPayloadEmailConfigsInner) { + o.EmailConfigs = v +} + +// GetName returns the Name field value +func (o *UpdateAlertConfigsPayloadReceiversInner) 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 *UpdateAlertConfigsPayloadReceiversInner) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *UpdateAlertConfigsPayloadReceiversInner) SetName(v *string) { + o.Name = v +} + +// GetOpsgenieConfigs returns the OpsgenieConfigs field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadReceiversInner) GetOpsgenieConfigs() *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner { + if o == nil || IsNil(o.OpsgenieConfigs) { + var ret *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner + return ret + } + return o.OpsgenieConfigs +} + +// GetOpsgenieConfigsOk returns a tuple with the OpsgenieConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadReceiversInner) GetOpsgenieConfigsOk() (*[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner, bool) { + if o == nil || IsNil(o.OpsgenieConfigs) { + return nil, false + } + return o.OpsgenieConfigs, true +} + +// HasOpsgenieConfigs returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadReceiversInner) HasOpsgenieConfigs() bool { + if o != nil && !IsNil(o.OpsgenieConfigs) { + return true + } + + return false +} + +// SetOpsgenieConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner and assigns it to the OpsgenieConfigs field. +func (o *UpdateAlertConfigsPayloadReceiversInner) SetOpsgenieConfigs(v *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) { + o.OpsgenieConfigs = v +} + +// GetWebHookConfigs returns the WebHookConfigs field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadReceiversInner) GetWebHookConfigs() *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner { + if o == nil || IsNil(o.WebHookConfigs) { + var ret *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner + return ret + } + return o.WebHookConfigs +} + +// GetWebHookConfigsOk returns a tuple with the WebHookConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadReceiversInner) GetWebHookConfigsOk() (*[]CreateAlertConfigReceiverPayloadWebHookConfigsInner, bool) { + if o == nil || IsNil(o.WebHookConfigs) { + return nil, false + } + return o.WebHookConfigs, true +} + +// HasWebHookConfigs returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadReceiversInner) HasWebHookConfigs() bool { + if o != nil && !IsNil(o.WebHookConfigs) { + return true + } + + return false +} + +// SetWebHookConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadWebHookConfigsInner and assigns it to the WebHookConfigs field. +func (o *UpdateAlertConfigsPayloadReceiversInner) SetWebHookConfigs(v *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner) { + o.WebHookConfigs = v +} + +func (o UpdateAlertConfigsPayloadReceiversInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EmailConfigs) { + toSerialize["emailConfigs"] = o.EmailConfigs + } + toSerialize["name"] = o.Name + if !IsNil(o.OpsgenieConfigs) { + toSerialize["opsgenieConfigs"] = o.OpsgenieConfigs + } + if !IsNil(o.WebHookConfigs) { + toSerialize["webHookConfigs"] = o.WebHookConfigs + } + return toSerialize, nil +} + +type NullableUpdateAlertConfigsPayloadReceiversInner struct { + value *UpdateAlertConfigsPayloadReceiversInner + isSet bool +} + +func (v NullableUpdateAlertConfigsPayloadReceiversInner) Get() *UpdateAlertConfigsPayloadReceiversInner { + return v.value +} + +func (v *NullableUpdateAlertConfigsPayloadReceiversInner) Set(val *UpdateAlertConfigsPayloadReceiversInner) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAlertConfigsPayloadReceiversInner) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAlertConfigsPayloadReceiversInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAlertConfigsPayloadReceiversInner(val *UpdateAlertConfigsPayloadReceiversInner) *NullableUpdateAlertConfigsPayloadReceiversInner { + return &NullableUpdateAlertConfigsPayloadReceiversInner{value: val, isSet: true} +} + +func (v NullableUpdateAlertConfigsPayloadReceiversInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAlertConfigsPayloadReceiversInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_alert_configs_payload_route.go b/services/observability/model_update_alert_configs_payload_route.go index ce11c20cb..2c3027137 100644 --- a/services/observability/model_update_alert_configs_payload_route.go +++ b/services/observability/model_update_alert_configs_payload_route.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateAlertConfigsPayloadRoute type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAlertConfigsPayloadRoute{} + // UpdateAlertConfigsPayloadRoute The root node of the routing tree. type UpdateAlertConfigsPayloadRoute struct { // The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping. @@ -32,3 +39,381 @@ type UpdateAlertConfigsPayloadRoute struct { // Zero or more child routes. Routes *[]CreateAlertConfigRoutePayloadRoutesInner `json:"routes,omitempty"` } + +type _UpdateAlertConfigsPayloadRoute UpdateAlertConfigsPayloadRoute + +// NewUpdateAlertConfigsPayloadRoute instantiates a new UpdateAlertConfigsPayloadRoute 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 NewUpdateAlertConfigsPayloadRoute(receiver *string) *UpdateAlertConfigsPayloadRoute { + this := UpdateAlertConfigsPayloadRoute{} + var groupInterval string = "5m" + this.GroupInterval = &groupInterval + var groupWait string = "30s" + this.GroupWait = &groupWait + this.Receiver = receiver + var repeatInterval string = "4h" + this.RepeatInterval = &repeatInterval + return &this +} + +// NewUpdateAlertConfigsPayloadRouteWithDefaults instantiates a new UpdateAlertConfigsPayloadRoute 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 NewUpdateAlertConfigsPayloadRouteWithDefaults() *UpdateAlertConfigsPayloadRoute { + this := UpdateAlertConfigsPayloadRoute{} + var groupInterval string = "5m" + this.GroupInterval = &groupInterval + var groupWait string = "30s" + this.GroupWait = &groupWait + var repeatInterval string = "4h" + this.RepeatInterval = &repeatInterval + return &this +} + +// GetGroupBy returns the GroupBy field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRoute) GetGroupBy() *[]string { + if o == nil || IsNil(o.GroupBy) { + var ret *[]string + return ret + } + return o.GroupBy +} + +// 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 *UpdateAlertConfigsPayloadRoute) GetGroupByOk() (*[]string, bool) { + if o == nil || IsNil(o.GroupBy) { + return nil, false + } + return o.GroupBy, true +} + +// HasGroupBy returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRoute) HasGroupBy() bool { + if o != nil && !IsNil(o.GroupBy) { + return true + } + + return false +} + +// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. +func (o *UpdateAlertConfigsPayloadRoute) SetGroupBy(v *[]string) { + o.GroupBy = v +} + +// GetGroupInterval returns the GroupInterval field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRoute) GetGroupInterval() *string { + if o == nil || IsNil(o.GroupInterval) { + var ret *string + return ret + } + return o.GroupInterval +} + +// 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 *UpdateAlertConfigsPayloadRoute) GetGroupIntervalOk() (*string, bool) { + if o == nil || IsNil(o.GroupInterval) { + return nil, false + } + return o.GroupInterval, true +} + +// HasGroupInterval returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRoute) HasGroupInterval() bool { + if o != nil && !IsNil(o.GroupInterval) { + return true + } + + return false +} + +// SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. +func (o *UpdateAlertConfigsPayloadRoute) SetGroupInterval(v *string) { + o.GroupInterval = v +} + +// GetGroupWait returns the GroupWait field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRoute) GetGroupWait() *string { + if o == nil || IsNil(o.GroupWait) { + var ret *string + return ret + } + return o.GroupWait +} + +// 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 *UpdateAlertConfigsPayloadRoute) GetGroupWaitOk() (*string, bool) { + if o == nil || IsNil(o.GroupWait) { + return nil, false + } + return o.GroupWait, true +} + +// HasGroupWait returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRoute) HasGroupWait() bool { + if o != nil && !IsNil(o.GroupWait) { + return true + } + + return false +} + +// SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. +func (o *UpdateAlertConfigsPayloadRoute) SetGroupWait(v *string) { + o.GroupWait = v +} + +// GetMatch returns the Match field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRoute) GetMatch() *map[string]interface{} { + if o == nil || IsNil(o.Match) { + var ret *map[string]interface{} + return ret + } + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRoute) GetMatchOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Match) { + return &map[string]interface{}{}, false + } + return o.Match, true +} + +// HasMatch returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRoute) HasMatch() bool { + if o != nil && !IsNil(o.Match) { + return true + } + + return false +} + +// SetMatch gets a reference to the given map[string]interface{} and assigns it to the Match field. +func (o *UpdateAlertConfigsPayloadRoute) SetMatch(v *map[string]interface{}) { + o.Match = v +} + +// GetMatchRe returns the MatchRe field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRoute) GetMatchRe() *map[string]interface{} { + if o == nil || IsNil(o.MatchRe) { + var ret *map[string]interface{} + return ret + } + return o.MatchRe +} + +// GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRoute) GetMatchReOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.MatchRe) { + return &map[string]interface{}{}, false + } + return o.MatchRe, true +} + +// HasMatchRe returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRoute) HasMatchRe() bool { + if o != nil && !IsNil(o.MatchRe) { + return true + } + + return false +} + +// SetMatchRe gets a reference to the given map[string]interface{} and assigns it to the MatchRe field. +func (o *UpdateAlertConfigsPayloadRoute) SetMatchRe(v *map[string]interface{}) { + o.MatchRe = v +} + +// GetMatchers returns the Matchers field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRoute) GetMatchers() *[]string { + if o == nil || IsNil(o.Matchers) { + var ret *[]string + return ret + } + return o.Matchers +} + +// 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() (*[]string, bool) { + if o == nil || IsNil(o.Matchers) { + return nil, false + } + return o.Matchers, true +} + +// HasMatchers returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRoute) HasMatchers() bool { + if o != nil && !IsNil(o.Matchers) { + return true + } + + return false +} + +// SetMatchers gets a reference to the given []string and assigns it to the Matchers field. +func (o *UpdateAlertConfigsPayloadRoute) SetMatchers(v *[]string) { + o.Matchers = v +} + +// GetReceiver returns the Receiver field value +func (o *UpdateAlertConfigsPayloadRoute) GetReceiver() *string { + if o == nil { + var ret *string + return ret + } + + return o.Receiver +} + +// GetReceiverOk returns a tuple with the Receiver field value +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsPayloadRoute) GetReceiverOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Receiver, true +} + +// SetReceiver sets field value +func (o *UpdateAlertConfigsPayloadRoute) SetReceiver(v *string) { + o.Receiver = v +} + +// GetRepeatInterval returns the RepeatInterval field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRoute) GetRepeatInterval() *string { + if o == nil || IsNil(o.RepeatInterval) { + var ret *string + return ret + } + return o.RepeatInterval +} + +// 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 *UpdateAlertConfigsPayloadRoute) GetRepeatIntervalOk() (*string, bool) { + if o == nil || IsNil(o.RepeatInterval) { + return nil, false + } + return o.RepeatInterval, true +} + +// HasRepeatInterval returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRoute) HasRepeatInterval() bool { + if o != nil && !IsNil(o.RepeatInterval) { + return true + } + + return false +} + +// SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. +func (o *UpdateAlertConfigsPayloadRoute) SetRepeatInterval(v *string) { + o.RepeatInterval = v +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *UpdateAlertConfigsPayloadRoute) GetRoutes() *[]CreateAlertConfigRoutePayloadRoutesInner { + if o == nil || IsNil(o.Routes) { + var ret *[]CreateAlertConfigRoutePayloadRoutesInner + return ret + } + return o.Routes +} + +// 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 *UpdateAlertConfigsPayloadRoute) GetRoutesOk() (*[]CreateAlertConfigRoutePayloadRoutesInner, bool) { + if o == nil || IsNil(o.Routes) { + return nil, false + } + return o.Routes, true +} + +// HasRoutes returns a boolean if a field has been set. +func (o *UpdateAlertConfigsPayloadRoute) HasRoutes() bool { + if o != nil && !IsNil(o.Routes) { + return true + } + + return false +} + +// SetRoutes gets a reference to the given []CreateAlertConfigRoutePayloadRoutesInner and assigns it to the Routes field. +func (o *UpdateAlertConfigsPayloadRoute) SetRoutes(v *[]CreateAlertConfigRoutePayloadRoutesInner) { + o.Routes = v +} + +func (o UpdateAlertConfigsPayloadRoute) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.GroupBy) { + toSerialize["groupBy"] = o.GroupBy + } + if !IsNil(o.GroupInterval) { + toSerialize["groupInterval"] = o.GroupInterval + } + if !IsNil(o.GroupWait) { + toSerialize["groupWait"] = o.GroupWait + } + if !IsNil(o.Match) { + toSerialize["match"] = o.Match + } + if !IsNil(o.MatchRe) { + toSerialize["matchRe"] = o.MatchRe + } + if !IsNil(o.Matchers) { + toSerialize["matchers"] = o.Matchers + } + toSerialize["receiver"] = o.Receiver + if !IsNil(o.RepeatInterval) { + toSerialize["repeatInterval"] = o.RepeatInterval + } + if !IsNil(o.Routes) { + toSerialize["routes"] = o.Routes + } + return toSerialize, nil +} + +type NullableUpdateAlertConfigsPayloadRoute struct { + value *UpdateAlertConfigsPayloadRoute + isSet bool +} + +func (v NullableUpdateAlertConfigsPayloadRoute) Get() *UpdateAlertConfigsPayloadRoute { + return v.value +} + +func (v *NullableUpdateAlertConfigsPayloadRoute) Set(val *UpdateAlertConfigsPayloadRoute) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAlertConfigsPayloadRoute) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAlertConfigsPayloadRoute) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAlertConfigsPayloadRoute(val *UpdateAlertConfigsPayloadRoute) *NullableUpdateAlertConfigsPayloadRoute { + return &NullableUpdateAlertConfigsPayloadRoute{value: val, isSet: true} +} + +func (v NullableUpdateAlertConfigsPayloadRoute) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAlertConfigsPayloadRoute) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_alert_configs_response.go b/services/observability/model_update_alert_configs_response.go index 5a6e294e5..fd0bce826 100644 --- a/services/observability/model_update_alert_configs_response.go +++ b/services/observability/model_update_alert_configs_response.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateAlertConfigsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAlertConfigsResponse{} + // UpdateAlertConfigsResponse struct for UpdateAlertConfigsResponse type UpdateAlertConfigsResponse struct { // REQUIRED @@ -17,3 +24,115 @@ type UpdateAlertConfigsResponse struct { // REQUIRED Message *string `json:"message"` } + +type _UpdateAlertConfigsResponse UpdateAlertConfigsResponse + +// NewUpdateAlertConfigsResponse instantiates a new UpdateAlertConfigsResponse 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 NewUpdateAlertConfigsResponse(data *Alert, message *string) *UpdateAlertConfigsResponse { + this := UpdateAlertConfigsResponse{} + this.Data = data + this.Message = message + return &this +} + +// NewUpdateAlertConfigsResponseWithDefaults instantiates a new UpdateAlertConfigsResponse 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 NewUpdateAlertConfigsResponseWithDefaults() *UpdateAlertConfigsResponse { + this := UpdateAlertConfigsResponse{} + return &this +} + +// GetData returns the Data field value +func (o *UpdateAlertConfigsResponse) GetData() *Alert { + if o == nil { + var ret *Alert + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsResponse) GetDataOk() (*Alert, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *UpdateAlertConfigsResponse) SetData(v *Alert) { + o.Data = v +} + +// GetMessage returns the Message field value +func (o *UpdateAlertConfigsResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *UpdateAlertConfigsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *UpdateAlertConfigsResponse) SetMessage(v *string) { + o.Message = v +} + +func (o UpdateAlertConfigsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableUpdateAlertConfigsResponse struct { + value *UpdateAlertConfigsResponse + isSet bool +} + +func (v NullableUpdateAlertConfigsResponse) Get() *UpdateAlertConfigsResponse { + return v.value +} + +func (v *NullableUpdateAlertConfigsResponse) Set(val *UpdateAlertConfigsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAlertConfigsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAlertConfigsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAlertConfigsResponse(val *UpdateAlertConfigsResponse) *NullableUpdateAlertConfigsResponse { + return &NullableUpdateAlertConfigsResponse{value: val, isSet: true} +} + +func (v NullableUpdateAlertConfigsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAlertConfigsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_credentials_remote_write_config_payload.go b/services/observability/model_update_credentials_remote_write_config_payload.go index 13ea543ae..d4bc5aee8 100644 --- a/services/observability/model_update_credentials_remote_write_config_payload.go +++ b/services/observability/model_update_credentials_remote_write_config_payload.go @@ -10,8 +10,108 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateCredentialsRemoteWriteConfigPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateCredentialsRemoteWriteConfigPayload{} + // UpdateCredentialsRemoteWriteConfigPayload Remote write limit config. type UpdateCredentialsRemoteWriteConfigPayload struct { // Remote write metric sample limit for credential to push in a single minute. MaxLimit *float64 `json:"maxLimit,omitempty"` } + +// NewUpdateCredentialsRemoteWriteConfigPayload instantiates a new UpdateCredentialsRemoteWriteConfigPayload 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 NewUpdateCredentialsRemoteWriteConfigPayload() *UpdateCredentialsRemoteWriteConfigPayload { + this := UpdateCredentialsRemoteWriteConfigPayload{} + return &this +} + +// NewUpdateCredentialsRemoteWriteConfigPayloadWithDefaults instantiates a new UpdateCredentialsRemoteWriteConfigPayload 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 NewUpdateCredentialsRemoteWriteConfigPayloadWithDefaults() *UpdateCredentialsRemoteWriteConfigPayload { + this := UpdateCredentialsRemoteWriteConfigPayload{} + return &this +} + +// GetMaxLimit returns the MaxLimit field value if set, zero value otherwise. +func (o *UpdateCredentialsRemoteWriteConfigPayload) GetMaxLimit() *float64 { + if o == nil || IsNil(o.MaxLimit) { + var ret *float64 + return ret + } + return o.MaxLimit +} + +// GetMaxLimitOk returns a tuple with the MaxLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCredentialsRemoteWriteConfigPayload) GetMaxLimitOk() (*float64, bool) { + if o == nil || IsNil(o.MaxLimit) { + return nil, false + } + return o.MaxLimit, true +} + +// HasMaxLimit returns a boolean if a field has been set. +func (o *UpdateCredentialsRemoteWriteConfigPayload) HasMaxLimit() bool { + if o != nil && !IsNil(o.MaxLimit) { + return true + } + + return false +} + +// SetMaxLimit gets a reference to the given float64 and assigns it to the MaxLimit field. +func (o *UpdateCredentialsRemoteWriteConfigPayload) SetMaxLimit(v *float64) { + o.MaxLimit = v +} + +func (o UpdateCredentialsRemoteWriteConfigPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.MaxLimit) { + toSerialize["maxLimit"] = o.MaxLimit + } + return toSerialize, nil +} + +type NullableUpdateCredentialsRemoteWriteConfigPayload struct { + value *UpdateCredentialsRemoteWriteConfigPayload + isSet bool +} + +func (v NullableUpdateCredentialsRemoteWriteConfigPayload) Get() *UpdateCredentialsRemoteWriteConfigPayload { + return v.value +} + +func (v *NullableUpdateCredentialsRemoteWriteConfigPayload) Set(val *UpdateCredentialsRemoteWriteConfigPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateCredentialsRemoteWriteConfigPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateCredentialsRemoteWriteConfigPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateCredentialsRemoteWriteConfigPayload(val *UpdateCredentialsRemoteWriteConfigPayload) *NullableUpdateCredentialsRemoteWriteConfigPayload { + return &NullableUpdateCredentialsRemoteWriteConfigPayload{value: val, isSet: true} +} + +func (v NullableUpdateCredentialsRemoteWriteConfigPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateCredentialsRemoteWriteConfigPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_grafana_configs_payload.go b/services/observability/model_update_grafana_configs_payload.go index 642728823..33c90e16f 100644 --- a/services/observability/model_update_grafana_configs_payload.go +++ b/services/observability/model_update_grafana_configs_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateGrafanaConfigsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateGrafanaConfigsPayload{} + // UpdateGrafanaConfigsPayload Sending any of the attributes results in a set of the attribute and overwrites any previous configuration. type UpdateGrafanaConfigsPayload struct { GenericOauth *UpdateGrafanaConfigsPayloadGenericOauth `json:"genericOauth,omitempty"` @@ -18,3 +25,166 @@ type UpdateGrafanaConfigsPayload struct { // If it's true, it overwrites the current genericOauth config and configures STACKIT SSO for this instance. UseStackitSso *bool `json:"useStackitSso,omitempty"` } + +// NewUpdateGrafanaConfigsPayload instantiates a new UpdateGrafanaConfigsPayload 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 NewUpdateGrafanaConfigsPayload() *UpdateGrafanaConfigsPayload { + this := UpdateGrafanaConfigsPayload{} + return &this +} + +// NewUpdateGrafanaConfigsPayloadWithDefaults instantiates a new UpdateGrafanaConfigsPayload 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 NewUpdateGrafanaConfigsPayloadWithDefaults() *UpdateGrafanaConfigsPayload { + this := UpdateGrafanaConfigsPayload{} + return &this +} + +// GetGenericOauth returns the GenericOauth field value if set, zero value otherwise. +func (o *UpdateGrafanaConfigsPayload) GetGenericOauth() *UpdateGrafanaConfigsPayloadGenericOauth { + if o == nil || IsNil(o.GenericOauth) { + var ret *UpdateGrafanaConfigsPayloadGenericOauth + return ret + } + return o.GenericOauth +} + +// GetGenericOauthOk returns a tuple with the GenericOauth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayload) GetGenericOauthOk() (*UpdateGrafanaConfigsPayloadGenericOauth, bool) { + if o == nil || IsNil(o.GenericOauth) { + return nil, false + } + return o.GenericOauth, true +} + +// HasGenericOauth returns a boolean if a field has been set. +func (o *UpdateGrafanaConfigsPayload) HasGenericOauth() bool { + if o != nil && !IsNil(o.GenericOauth) { + return true + } + + return false +} + +// SetGenericOauth gets a reference to the given UpdateGrafanaConfigsPayloadGenericOauth and assigns it to the GenericOauth field. +func (o *UpdateGrafanaConfigsPayload) SetGenericOauth(v *UpdateGrafanaConfigsPayloadGenericOauth) { + o.GenericOauth = v +} + +// GetPublicReadAccess returns the PublicReadAccess field value if set, zero value otherwise. +func (o *UpdateGrafanaConfigsPayload) GetPublicReadAccess() *bool { + if o == nil || IsNil(o.PublicReadAccess) { + var ret *bool + return ret + } + return o.PublicReadAccess +} + +// GetPublicReadAccessOk returns a tuple with the PublicReadAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayload) GetPublicReadAccessOk() (*bool, bool) { + if o == nil || IsNil(o.PublicReadAccess) { + return nil, false + } + return o.PublicReadAccess, true +} + +// HasPublicReadAccess returns a boolean if a field has been set. +func (o *UpdateGrafanaConfigsPayload) HasPublicReadAccess() bool { + if o != nil && !IsNil(o.PublicReadAccess) { + return true + } + + return false +} + +// SetPublicReadAccess gets a reference to the given bool and assigns it to the PublicReadAccess field. +func (o *UpdateGrafanaConfigsPayload) SetPublicReadAccess(v *bool) { + o.PublicReadAccess = v +} + +// GetUseStackitSso returns the UseStackitSso field value if set, zero value otherwise. +func (o *UpdateGrafanaConfigsPayload) GetUseStackitSso() *bool { + if o == nil || IsNil(o.UseStackitSso) { + var ret *bool + return ret + } + return o.UseStackitSso +} + +// GetUseStackitSsoOk returns a tuple with the UseStackitSso field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayload) GetUseStackitSsoOk() (*bool, bool) { + if o == nil || IsNil(o.UseStackitSso) { + return nil, false + } + return o.UseStackitSso, true +} + +// HasUseStackitSso returns a boolean if a field has been set. +func (o *UpdateGrafanaConfigsPayload) HasUseStackitSso() bool { + if o != nil && !IsNil(o.UseStackitSso) { + return true + } + + return false +} + +// SetUseStackitSso gets a reference to the given bool and assigns it to the UseStackitSso field. +func (o *UpdateGrafanaConfigsPayload) SetUseStackitSso(v *bool) { + o.UseStackitSso = v +} + +func (o UpdateGrafanaConfigsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.GenericOauth) { + toSerialize["genericOauth"] = o.GenericOauth + } + if !IsNil(o.PublicReadAccess) { + toSerialize["publicReadAccess"] = o.PublicReadAccess + } + if !IsNil(o.UseStackitSso) { + toSerialize["useStackitSso"] = o.UseStackitSso + } + return toSerialize, nil +} + +type NullableUpdateGrafanaConfigsPayload struct { + value *UpdateGrafanaConfigsPayload + isSet bool +} + +func (v NullableUpdateGrafanaConfigsPayload) Get() *UpdateGrafanaConfigsPayload { + return v.value +} + +func (v *NullableUpdateGrafanaConfigsPayload) Set(val *UpdateGrafanaConfigsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateGrafanaConfigsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateGrafanaConfigsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateGrafanaConfigsPayload(val *UpdateGrafanaConfigsPayload) *NullableUpdateGrafanaConfigsPayload { + return &NullableUpdateGrafanaConfigsPayload{value: val, isSet: true} +} + +func (v NullableUpdateGrafanaConfigsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateGrafanaConfigsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_grafana_configs_payload_generic_oauth.go b/services/observability/model_update_grafana_configs_payload_generic_oauth.go index b1febac77..c2785d36f 100644 --- a/services/observability/model_update_grafana_configs_payload_generic_oauth.go +++ b/services/observability/model_update_grafana_configs_payload_generic_oauth.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateGrafanaConfigsPayloadGenericOauth type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateGrafanaConfigsPayloadGenericOauth{} + // UpdateGrafanaConfigsPayloadGenericOauth struct for UpdateGrafanaConfigsPayloadGenericOauth type UpdateGrafanaConfigsPayloadGenericOauth struct { // Set api_url to the resource that returns OpenID UserInfo compatible information. @@ -42,3 +49,393 @@ type UpdateGrafanaConfigsPayloadGenericOauth struct { // enable or disable Proof Key for Code Exchange UsePkce *bool `json:"usePkce,omitempty"` } + +type _UpdateGrafanaConfigsPayloadGenericOauth UpdateGrafanaConfigsPayloadGenericOauth + +// NewUpdateGrafanaConfigsPayloadGenericOauth instantiates a new UpdateGrafanaConfigsPayloadGenericOauth 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 NewUpdateGrafanaConfigsPayloadGenericOauth(apiUrl *string, authUrl *string, enabled *bool, oauthClientId *string, oauthClientSecret *string, roleAttributePath *string, tokenUrl *string) *UpdateGrafanaConfigsPayloadGenericOauth { + this := UpdateGrafanaConfigsPayloadGenericOauth{} + this.ApiUrl = apiUrl + this.AuthUrl = authUrl + this.Enabled = enabled + this.OauthClientId = oauthClientId + this.OauthClientSecret = oauthClientSecret + this.RoleAttributePath = roleAttributePath + var roleAttributeStrict bool = true + this.RoleAttributeStrict = &roleAttributeStrict + var scopes string = "openid profile email" + this.Scopes = &scopes + this.TokenUrl = tokenUrl + return &this +} + +// NewUpdateGrafanaConfigsPayloadGenericOauthWithDefaults instantiates a new UpdateGrafanaConfigsPayloadGenericOauth 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 NewUpdateGrafanaConfigsPayloadGenericOauthWithDefaults() *UpdateGrafanaConfigsPayloadGenericOauth { + this := UpdateGrafanaConfigsPayloadGenericOauth{} + var roleAttributeStrict bool = true + this.RoleAttributeStrict = &roleAttributeStrict + var scopes string = "openid profile email" + this.Scopes = &scopes + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetApiUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetApiUrl(v *string) { + o.ApiUrl = v +} + +// GetAuthUrl returns the AuthUrl field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetAuthUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.AuthUrl +} + +// GetAuthUrlOk returns a tuple with the AuthUrl field value +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetAuthUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AuthUrl, true +} + +// SetAuthUrl sets field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetAuthUrl(v *string) { + o.AuthUrl = v +} + +// GetEnabled returns the Enabled field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) 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 *UpdateGrafanaConfigsPayloadGenericOauth) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Enabled, true +} + +// SetEnabled sets field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetEnabled(v *bool) { + o.Enabled = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetName(v *string) { + o.Name = v +} + +// GetOauthClientId returns the OauthClientId field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetOauthClientId() *string { + if o == nil { + var ret *string + return ret + } + + return o.OauthClientId +} + +// GetOauthClientIdOk returns a tuple with the OauthClientId field value +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetOauthClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OauthClientId, true +} + +// SetOauthClientId sets field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetOauthClientId(v *string) { + o.OauthClientId = v +} + +// GetOauthClientSecret returns the OauthClientSecret field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetOauthClientSecret() *string { + if o == nil { + var ret *string + return ret + } + + return o.OauthClientSecret +} + +// GetOauthClientSecretOk returns a tuple with the OauthClientSecret field value +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetOauthClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OauthClientSecret, true +} + +// SetOauthClientSecret sets field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetOauthClientSecret(v *string) { + o.OauthClientSecret = v +} + +// GetRoleAttributePath returns the RoleAttributePath field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetRoleAttributePath() *string { + if o == nil { + var ret *string + return ret + } + + return o.RoleAttributePath +} + +// GetRoleAttributePathOk returns a tuple with the RoleAttributePath field value +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetRoleAttributePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RoleAttributePath, true +} + +// SetRoleAttributePath sets field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetRoleAttributePath(v *string) { + o.RoleAttributePath = v +} + +// GetRoleAttributeStrict returns the RoleAttributeStrict field value if set, zero value otherwise. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetRoleAttributeStrict() *bool { + if o == nil || IsNil(o.RoleAttributeStrict) { + var ret *bool + return ret + } + return o.RoleAttributeStrict +} + +// GetRoleAttributeStrictOk returns a tuple with the RoleAttributeStrict field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetRoleAttributeStrictOk() (*bool, bool) { + if o == nil || IsNil(o.RoleAttributeStrict) { + return nil, false + } + return o.RoleAttributeStrict, true +} + +// HasRoleAttributeStrict returns a boolean if a field has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) HasRoleAttributeStrict() bool { + if o != nil && !IsNil(o.RoleAttributeStrict) { + return true + } + + return false +} + +// SetRoleAttributeStrict gets a reference to the given bool and assigns it to the RoleAttributeStrict field. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetRoleAttributeStrict(v *bool) { + o.RoleAttributeStrict = v +} + +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetScopes() *string { + if o == nil || IsNil(o.Scopes) { + var ret *string + return ret + } + return o.Scopes +} + +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetScopesOk() (*string, bool) { + if o == nil || IsNil(o.Scopes) { + return nil, false + } + return o.Scopes, true +} + +// HasScopes returns a boolean if a field has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) HasScopes() bool { + if o != nil && !IsNil(o.Scopes) { + return true + } + + return false +} + +// SetScopes gets a reference to the given string and assigns it to the Scopes field. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetScopes(v *string) { + o.Scopes = v +} + +// GetTokenUrl returns the TokenUrl field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetTokenUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.TokenUrl +} + +// GetTokenUrlOk returns a tuple with the TokenUrl field value +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetTokenUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TokenUrl, true +} + +// SetTokenUrl sets field value +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetTokenUrl(v *string) { + o.TokenUrl = v +} + +// GetUsePkce returns the UsePkce field value if set, zero value otherwise. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetUsePkce() *bool { + if o == nil || IsNil(o.UsePkce) { + var ret *bool + return ret + } + return o.UsePkce +} + +// GetUsePkceOk returns a tuple with the UsePkce field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetUsePkceOk() (*bool, bool) { + if o == nil || IsNil(o.UsePkce) { + return nil, false + } + return o.UsePkce, true +} + +// HasUsePkce returns a boolean if a field has been set. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) HasUsePkce() bool { + if o != nil && !IsNil(o.UsePkce) { + return true + } + + return false +} + +// SetUsePkce gets a reference to the given bool and assigns it to the UsePkce field. +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetUsePkce(v *bool) { + o.UsePkce = v +} + +func (o UpdateGrafanaConfigsPayloadGenericOauth) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiUrl"] = o.ApiUrl + toSerialize["authUrl"] = o.AuthUrl + toSerialize["enabled"] = o.Enabled + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["oauthClientId"] = o.OauthClientId + toSerialize["oauthClientSecret"] = o.OauthClientSecret + toSerialize["roleAttributePath"] = o.RoleAttributePath + if !IsNil(o.RoleAttributeStrict) { + toSerialize["roleAttributeStrict"] = o.RoleAttributeStrict + } + if !IsNil(o.Scopes) { + toSerialize["scopes"] = o.Scopes + } + toSerialize["tokenUrl"] = o.TokenUrl + if !IsNil(o.UsePkce) { + toSerialize["usePkce"] = o.UsePkce + } + return toSerialize, nil +} + +type NullableUpdateGrafanaConfigsPayloadGenericOauth struct { + value *UpdateGrafanaConfigsPayloadGenericOauth + isSet bool +} + +func (v NullableUpdateGrafanaConfigsPayloadGenericOauth) Get() *UpdateGrafanaConfigsPayloadGenericOauth { + return v.value +} + +func (v *NullableUpdateGrafanaConfigsPayloadGenericOauth) Set(val *UpdateGrafanaConfigsPayloadGenericOauth) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateGrafanaConfigsPayloadGenericOauth) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateGrafanaConfigsPayloadGenericOauth) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateGrafanaConfigsPayloadGenericOauth(val *UpdateGrafanaConfigsPayloadGenericOauth) *NullableUpdateGrafanaConfigsPayloadGenericOauth { + return &NullableUpdateGrafanaConfigsPayloadGenericOauth{value: val, isSet: true} +} + +func (v NullableUpdateGrafanaConfigsPayloadGenericOauth) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateGrafanaConfigsPayloadGenericOauth) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_instance_payload.go b/services/observability/model_update_instance_payload.go index 0f3ca958b..49a7a2b69 100644 --- a/services/observability/model_update_instance_payload.go +++ b/services/observability/model_update_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstancePayload{} + // UpdateInstancePayload Create update instance body. type UpdateInstancePayload struct { // Name of the service @@ -20,3 +27,159 @@ type UpdateInstancePayload struct { // REQUIRED PlanId *string `json:"planId"` } + +type _UpdateInstancePayload UpdateInstancePayload + +// NewUpdateInstancePayload instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayload(planId *string) *UpdateInstancePayload { + this := UpdateInstancePayload{} + this.PlanId = planId + return &this +} + +// NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { + this := UpdateInstancePayload{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateInstancePayload) SetName(v *string) { + o.Name = v +} + +// GetParameter returns the Parameter field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetParameter() *map[string]interface{} { + if o == nil || IsNil(o.Parameter) { + var ret *map[string]interface{} + return ret + } + return o.Parameter +} + +// GetParameterOk returns a tuple with the Parameter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetParameterOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Parameter) { + return &map[string]interface{}{}, false + } + return o.Parameter, true +} + +// HasParameter returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasParameter() bool { + if o != nil && !IsNil(o.Parameter) { + return true + } + + return false +} + +// SetParameter gets a reference to the given map[string]interface{} and assigns it to the Parameter field. +func (o *UpdateInstancePayload) SetParameter(v *map[string]interface{}) { + o.Parameter = v +} + +// GetPlanId returns the PlanId field value +func (o *UpdateInstancePayload) GetPlanId() *string { + if o == nil { + var ret *string + return ret + } + + return o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetPlanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PlanId, true +} + +// SetPlanId sets field value +func (o *UpdateInstancePayload) SetPlanId(v *string) { + o.PlanId = v +} + +func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameter) { + toSerialize["parameter"] = o.Parameter + } + toSerialize["planId"] = o.PlanId + return toSerialize, nil +} + +type NullableUpdateInstancePayload struct { + value *UpdateInstancePayload + isSet bool +} + +func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { + return v.value +} + +func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { + return &NullableUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_metrics_storage_retention_payload.go b/services/observability/model_update_metrics_storage_retention_payload.go index 55d695c0f..2b6c82734 100644 --- a/services/observability/model_update_metrics_storage_retention_payload.go +++ b/services/observability/model_update_metrics_storage_retention_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateMetricsStorageRetentionPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMetricsStorageRetentionPayload{} + // UpdateMetricsStorageRetentionPayload struct for UpdateMetricsStorageRetentionPayload type UpdateMetricsStorageRetentionPayload struct { // Retention time of longtime storage of 1h sampled data. After that time the data will be deleted permanently. `Additional Validators:` * Should be a valid time string * Should not be bigger than metricsRetentionTime5m @@ -22,3 +29,141 @@ type UpdateMetricsStorageRetentionPayload struct { // REQUIRED MetricsRetentionTimeRaw *string `json:"metricsRetentionTimeRaw"` } + +type _UpdateMetricsStorageRetentionPayload UpdateMetricsStorageRetentionPayload + +// NewUpdateMetricsStorageRetentionPayload instantiates a new UpdateMetricsStorageRetentionPayload 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 NewUpdateMetricsStorageRetentionPayload(metricsRetentionTime1h *string, metricsRetentionTime5m *string, metricsRetentionTimeRaw *string) *UpdateMetricsStorageRetentionPayload { + this := UpdateMetricsStorageRetentionPayload{} + this.MetricsRetentionTime1h = metricsRetentionTime1h + this.MetricsRetentionTime5m = metricsRetentionTime5m + this.MetricsRetentionTimeRaw = metricsRetentionTimeRaw + return &this +} + +// NewUpdateMetricsStorageRetentionPayloadWithDefaults instantiates a new UpdateMetricsStorageRetentionPayload 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 NewUpdateMetricsStorageRetentionPayloadWithDefaults() *UpdateMetricsStorageRetentionPayload { + this := UpdateMetricsStorageRetentionPayload{} + return &this +} + +// GetMetricsRetentionTime1h returns the MetricsRetentionTime1h field value +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTime1h() *string { + if o == nil { + var ret *string + return ret + } + + return o.MetricsRetentionTime1h +} + +// GetMetricsRetentionTime1hOk returns a tuple with the MetricsRetentionTime1h field value +// and a boolean to check if the value has been set. +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTime1hOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTime1h, true +} + +// SetMetricsRetentionTime1h sets field value +func (o *UpdateMetricsStorageRetentionPayload) SetMetricsRetentionTime1h(v *string) { + o.MetricsRetentionTime1h = v +} + +// GetMetricsRetentionTime5m returns the MetricsRetentionTime5m field value +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTime5m() *string { + if o == nil { + var ret *string + return ret + } + + return o.MetricsRetentionTime5m +} + +// GetMetricsRetentionTime5mOk returns a tuple with the MetricsRetentionTime5m field value +// and a boolean to check if the value has been set. +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTime5mOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTime5m, true +} + +// SetMetricsRetentionTime5m sets field value +func (o *UpdateMetricsStorageRetentionPayload) SetMetricsRetentionTime5m(v *string) { + o.MetricsRetentionTime5m = v +} + +// GetMetricsRetentionTimeRaw returns the MetricsRetentionTimeRaw field value +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTimeRaw() *string { + if o == nil { + var ret *string + return ret + } + + return o.MetricsRetentionTimeRaw +} + +// GetMetricsRetentionTimeRawOk returns a tuple with the MetricsRetentionTimeRaw field value +// and a boolean to check if the value has been set. +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTimeRawOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetricsRetentionTimeRaw, true +} + +// SetMetricsRetentionTimeRaw sets field value +func (o *UpdateMetricsStorageRetentionPayload) SetMetricsRetentionTimeRaw(v *string) { + o.MetricsRetentionTimeRaw = v +} + +func (o UpdateMetricsStorageRetentionPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["metricsRetentionTime1h"] = o.MetricsRetentionTime1h + toSerialize["metricsRetentionTime5m"] = o.MetricsRetentionTime5m + toSerialize["metricsRetentionTimeRaw"] = o.MetricsRetentionTimeRaw + return toSerialize, nil +} + +type NullableUpdateMetricsStorageRetentionPayload struct { + value *UpdateMetricsStorageRetentionPayload + isSet bool +} + +func (v NullableUpdateMetricsStorageRetentionPayload) Get() *UpdateMetricsStorageRetentionPayload { + return v.value +} + +func (v *NullableUpdateMetricsStorageRetentionPayload) Set(val *UpdateMetricsStorageRetentionPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMetricsStorageRetentionPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMetricsStorageRetentionPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMetricsStorageRetentionPayload(val *UpdateMetricsStorageRetentionPayload) *NullableUpdateMetricsStorageRetentionPayload { + return &NullableUpdateMetricsStorageRetentionPayload{value: val, isSet: true} +} + +func (v NullableUpdateMetricsStorageRetentionPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMetricsStorageRetentionPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_scrape_config_payload.go b/services/observability/model_update_scrape_config_payload.go index 270ce08d5..364f78415 100644 --- a/services/observability/model_update_scrape_config_payload.go +++ b/services/observability/model_update_scrape_config_payload.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateScrapeConfigPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateScrapeConfigPayload{} + // UpdateScrapeConfigPayload struct for UpdateScrapeConfigPayload type UpdateScrapeConfigPayload struct { BasicAuth *CreateScrapeConfigPayloadBasicAuth `json:"basicAuth,omitempty"` @@ -42,3 +49,483 @@ type UpdateScrapeConfigPayload struct { StaticConfigs *[]UpdateScrapeConfigPayloadStaticConfigsInner `json:"staticConfigs"` TlsConfig *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig `json:"tlsConfig,omitempty"` } + +type _UpdateScrapeConfigPayload UpdateScrapeConfigPayload + +// NewUpdateScrapeConfigPayload instantiates a new UpdateScrapeConfigPayload 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 NewUpdateScrapeConfigPayload(metricsPath *string, scheme *string, scrapeInterval *string, scrapeTimeout *string, staticConfigs *[]UpdateScrapeConfigPayloadStaticConfigsInner) *UpdateScrapeConfigPayload { + this := UpdateScrapeConfigPayload{} + var honorLabels bool = false + this.HonorLabels = &honorLabels + var honorTimeStamps bool = false + this.HonorTimeStamps = &honorTimeStamps + this.MetricsPath = metricsPath + this.Scheme = scheme + this.ScrapeInterval = scrapeInterval + this.ScrapeTimeout = scrapeTimeout + this.StaticConfigs = staticConfigs + return &this +} + +// NewUpdateScrapeConfigPayloadWithDefaults instantiates a new UpdateScrapeConfigPayload 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 NewUpdateScrapeConfigPayloadWithDefaults() *UpdateScrapeConfigPayload { + this := UpdateScrapeConfigPayload{} + var honorLabels bool = false + this.HonorLabels = &honorLabels + var honorTimeStamps bool = false + this.HonorTimeStamps = &honorTimeStamps + var metricsPath string = "/metrics" + this.MetricsPath = &metricsPath + return &this +} + +// GetBasicAuth returns the BasicAuth field value if set, zero value otherwise. +func (o *UpdateScrapeConfigPayload) GetBasicAuth() *CreateScrapeConfigPayloadBasicAuth { + if o == nil || IsNil(o.BasicAuth) { + var ret *CreateScrapeConfigPayloadBasicAuth + return ret + } + return o.BasicAuth +} + +// GetBasicAuthOk returns a tuple with the BasicAuth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetBasicAuthOk() (*CreateScrapeConfigPayloadBasicAuth, bool) { + if o == nil || IsNil(o.BasicAuth) { + return nil, false + } + return o.BasicAuth, true +} + +// HasBasicAuth returns a boolean if a field has been set. +func (o *UpdateScrapeConfigPayload) HasBasicAuth() bool { + if o != nil && !IsNil(o.BasicAuth) { + return true + } + + return false +} + +// SetBasicAuth gets a reference to the given CreateScrapeConfigPayloadBasicAuth and assigns it to the BasicAuth field. +func (o *UpdateScrapeConfigPayload) SetBasicAuth(v *CreateScrapeConfigPayloadBasicAuth) { + o.BasicAuth = v +} + +// GetBearerToken returns the BearerToken field value if set, zero value otherwise. +func (o *UpdateScrapeConfigPayload) GetBearerToken() *string { + if o == nil || IsNil(o.BearerToken) { + var ret *string + return ret + } + return o.BearerToken +} + +// GetBearerTokenOk returns a tuple with the BearerToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetBearerTokenOk() (*string, bool) { + if o == nil || IsNil(o.BearerToken) { + return nil, false + } + return o.BearerToken, true +} + +// HasBearerToken returns a boolean if a field has been set. +func (o *UpdateScrapeConfigPayload) HasBearerToken() bool { + if o != nil && !IsNil(o.BearerToken) { + return true + } + + return false +} + +// SetBearerToken gets a reference to the given string and assigns it to the BearerToken field. +func (o *UpdateScrapeConfigPayload) SetBearerToken(v *string) { + o.BearerToken = v +} + +// GetHonorLabels returns the HonorLabels field value if set, zero value otherwise. +func (o *UpdateScrapeConfigPayload) GetHonorLabels() *bool { + if o == nil || IsNil(o.HonorLabels) { + var ret *bool + return ret + } + return o.HonorLabels +} + +// GetHonorLabelsOk returns a tuple with the HonorLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetHonorLabelsOk() (*bool, bool) { + if o == nil || IsNil(o.HonorLabels) { + return nil, false + } + return o.HonorLabels, true +} + +// HasHonorLabels returns a boolean if a field has been set. +func (o *UpdateScrapeConfigPayload) HasHonorLabels() bool { + if o != nil && !IsNil(o.HonorLabels) { + return true + } + + return false +} + +// SetHonorLabels gets a reference to the given bool and assigns it to the HonorLabels field. +func (o *UpdateScrapeConfigPayload) SetHonorLabels(v *bool) { + o.HonorLabels = v +} + +// GetHonorTimeStamps returns the HonorTimeStamps field value if set, zero value otherwise. +func (o *UpdateScrapeConfigPayload) GetHonorTimeStamps() *bool { + if o == nil || IsNil(o.HonorTimeStamps) { + var ret *bool + return ret + } + return o.HonorTimeStamps +} + +// GetHonorTimeStampsOk returns a tuple with the HonorTimeStamps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetHonorTimeStampsOk() (*bool, bool) { + if o == nil || IsNil(o.HonorTimeStamps) { + return nil, false + } + return o.HonorTimeStamps, true +} + +// HasHonorTimeStamps returns a boolean if a field has been set. +func (o *UpdateScrapeConfigPayload) HasHonorTimeStamps() bool { + if o != nil && !IsNil(o.HonorTimeStamps) { + return true + } + + return false +} + +// SetHonorTimeStamps gets a reference to the given bool and assigns it to the HonorTimeStamps field. +func (o *UpdateScrapeConfigPayload) SetHonorTimeStamps(v *bool) { + o.HonorTimeStamps = v +} + +// GetMetricsPath returns the MetricsPath field value +func (o *UpdateScrapeConfigPayload) GetMetricsPath() *string { + if o == nil { + var ret *string + return ret + } + + return o.MetricsPath +} + +// GetMetricsPathOk returns a tuple with the MetricsPath field value +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetMetricsPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetricsPath, true +} + +// SetMetricsPath sets field value +func (o *UpdateScrapeConfigPayload) SetMetricsPath(v *string) { + o.MetricsPath = v +} + +// GetMetricsRelabelConfigs returns the MetricsRelabelConfigs field value if set, zero value otherwise. +func (o *UpdateScrapeConfigPayload) GetMetricsRelabelConfigs() *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner { + if o == nil || IsNil(o.MetricsRelabelConfigs) { + var ret *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner + return ret + } + return o.MetricsRelabelConfigs +} + +// GetMetricsRelabelConfigsOk returns a tuple with the MetricsRelabelConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetMetricsRelabelConfigsOk() (*[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner, bool) { + if o == nil || IsNil(o.MetricsRelabelConfigs) { + return nil, false + } + return o.MetricsRelabelConfigs, true +} + +// HasMetricsRelabelConfigs returns a boolean if a field has been set. +func (o *UpdateScrapeConfigPayload) HasMetricsRelabelConfigs() bool { + if o != nil && !IsNil(o.MetricsRelabelConfigs) { + return true + } + + return false +} + +// SetMetricsRelabelConfigs gets a reference to the given []CreateScrapeConfigPayloadMetricsRelabelConfigsInner and assigns it to the MetricsRelabelConfigs field. +func (o *UpdateScrapeConfigPayload) SetMetricsRelabelConfigs(v *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner) { + o.MetricsRelabelConfigs = v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *UpdateScrapeConfigPayload) GetParams() *map[string]interface{} { + if o == nil || IsNil(o.Params) { + var ret *map[string]interface{} + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetParamsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Params) { + return &map[string]interface{}{}, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *UpdateScrapeConfigPayload) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]interface{} and assigns it to the Params field. +func (o *UpdateScrapeConfigPayload) SetParams(v *map[string]interface{}) { + o.Params = v +} + +// GetSampleLimit returns the SampleLimit field value if set, zero value otherwise. +func (o *UpdateScrapeConfigPayload) GetSampleLimit() *float64 { + if o == nil || IsNil(o.SampleLimit) { + var ret *float64 + return ret + } + return o.SampleLimit +} + +// GetSampleLimitOk returns a tuple with the SampleLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetSampleLimitOk() (*float64, bool) { + if o == nil || IsNil(o.SampleLimit) { + return nil, false + } + return o.SampleLimit, true +} + +// HasSampleLimit returns a boolean if a field has been set. +func (o *UpdateScrapeConfigPayload) HasSampleLimit() bool { + if o != nil && !IsNil(o.SampleLimit) { + return true + } + + return false +} + +// SetSampleLimit gets a reference to the given float64 and assigns it to the SampleLimit field. +func (o *UpdateScrapeConfigPayload) SetSampleLimit(v *float64) { + o.SampleLimit = v +} + +// GetScheme returns the Scheme field value +func (o *UpdateScrapeConfigPayload) GetScheme() *string { + if o == nil { + var ret *string + return ret + } + + return o.Scheme +} + +// GetSchemeOk returns a tuple with the Scheme field value +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetSchemeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Scheme, true +} + +// SetScheme sets field value +func (o *UpdateScrapeConfigPayload) SetScheme(v *string) { + o.Scheme = v +} + +// GetScrapeInterval returns the ScrapeInterval field value +func (o *UpdateScrapeConfigPayload) GetScrapeInterval() *string { + if o == nil { + var ret *string + return ret + } + + return o.ScrapeInterval +} + +// GetScrapeIntervalOk returns a tuple with the ScrapeInterval field value +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetScrapeIntervalOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ScrapeInterval, true +} + +// SetScrapeInterval sets field value +func (o *UpdateScrapeConfigPayload) SetScrapeInterval(v *string) { + o.ScrapeInterval = v +} + +// GetScrapeTimeout returns the ScrapeTimeout field value +func (o *UpdateScrapeConfigPayload) GetScrapeTimeout() *string { + if o == nil { + var ret *string + return ret + } + + return o.ScrapeTimeout +} + +// GetScrapeTimeoutOk returns a tuple with the ScrapeTimeout field value +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetScrapeTimeoutOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ScrapeTimeout, true +} + +// SetScrapeTimeout sets field value +func (o *UpdateScrapeConfigPayload) SetScrapeTimeout(v *string) { + o.ScrapeTimeout = v +} + +// GetStaticConfigs returns the StaticConfigs field value +func (o *UpdateScrapeConfigPayload) GetStaticConfigs() *[]UpdateScrapeConfigPayloadStaticConfigsInner { + if o == nil { + var ret *[]UpdateScrapeConfigPayloadStaticConfigsInner + return ret + } + + return o.StaticConfigs +} + +// GetStaticConfigsOk returns a tuple with the StaticConfigs field value +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetStaticConfigsOk() (*[]UpdateScrapeConfigPayloadStaticConfigsInner, bool) { + if o == nil { + return nil, false + } + return o.StaticConfigs, true +} + +// SetStaticConfigs sets field value +func (o *UpdateScrapeConfigPayload) SetStaticConfigs(v *[]UpdateScrapeConfigPayloadStaticConfigsInner) { + o.StaticConfigs = v +} + +// GetTlsConfig returns the TlsConfig field value if set, zero value otherwise. +func (o *UpdateScrapeConfigPayload) GetTlsConfig() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig { + if o == nil || IsNil(o.TlsConfig) { + var ret *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig + return ret + } + return o.TlsConfig +} + +// GetTlsConfigOk returns a tuple with the TlsConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayload) GetTlsConfigOk() (*CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig, bool) { + if o == nil || IsNil(o.TlsConfig) { + return nil, false + } + return o.TlsConfig, true +} + +// HasTlsConfig returns a boolean if a field has been set. +func (o *UpdateScrapeConfigPayload) HasTlsConfig() bool { + if o != nil && !IsNil(o.TlsConfig) { + return true + } + + return false +} + +// SetTlsConfig gets a reference to the given CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig and assigns it to the TlsConfig field. +func (o *UpdateScrapeConfigPayload) SetTlsConfig(v *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) { + o.TlsConfig = v +} + +func (o UpdateScrapeConfigPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasicAuth) { + toSerialize["basicAuth"] = o.BasicAuth + } + if !IsNil(o.BearerToken) { + toSerialize["bearerToken"] = o.BearerToken + } + if !IsNil(o.HonorLabels) { + toSerialize["honorLabels"] = o.HonorLabels + } + if !IsNil(o.HonorTimeStamps) { + toSerialize["honorTimeStamps"] = o.HonorTimeStamps + } + toSerialize["metricsPath"] = o.MetricsPath + if !IsNil(o.MetricsRelabelConfigs) { + toSerialize["metricsRelabelConfigs"] = o.MetricsRelabelConfigs + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.SampleLimit) { + toSerialize["sampleLimit"] = o.SampleLimit + } + toSerialize["scheme"] = o.Scheme + toSerialize["scrapeInterval"] = o.ScrapeInterval + toSerialize["scrapeTimeout"] = o.ScrapeTimeout + toSerialize["staticConfigs"] = o.StaticConfigs + if !IsNil(o.TlsConfig) { + toSerialize["tlsConfig"] = o.TlsConfig + } + return toSerialize, nil +} + +type NullableUpdateScrapeConfigPayload struct { + value *UpdateScrapeConfigPayload + isSet bool +} + +func (v NullableUpdateScrapeConfigPayload) Get() *UpdateScrapeConfigPayload { + return v.value +} + +func (v *NullableUpdateScrapeConfigPayload) Set(val *UpdateScrapeConfigPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateScrapeConfigPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateScrapeConfigPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateScrapeConfigPayload(val *UpdateScrapeConfigPayload) *NullableUpdateScrapeConfigPayload { + return &NullableUpdateScrapeConfigPayload{value: val, isSet: true} +} + +func (v NullableUpdateScrapeConfigPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateScrapeConfigPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_update_scrape_config_payload_static_configs_inner.go b/services/observability/model_update_scrape_config_payload_static_configs_inner.go index df1245f6f..ad67023bb 100644 --- a/services/observability/model_update_scrape_config_payload_static_configs_inner.go +++ b/services/observability/model_update_scrape_config_payload_static_configs_inner.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the UpdateScrapeConfigPayloadStaticConfigsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateScrapeConfigPayloadStaticConfigsInner{} + // UpdateScrapeConfigPayloadStaticConfigsInner struct for UpdateScrapeConfigPayloadStaticConfigsInner type UpdateScrapeConfigPayloadStaticConfigsInner struct { // Labels assigned to all metrics scraped from the targets. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters @@ -18,3 +25,124 @@ type UpdateScrapeConfigPayloadStaticConfigsInner struct { // REQUIRED Targets *[]string `json:"targets"` } + +type _UpdateScrapeConfigPayloadStaticConfigsInner UpdateScrapeConfigPayloadStaticConfigsInner + +// NewUpdateScrapeConfigPayloadStaticConfigsInner instantiates a new UpdateScrapeConfigPayloadStaticConfigsInner 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 NewUpdateScrapeConfigPayloadStaticConfigsInner(targets *[]string) *UpdateScrapeConfigPayloadStaticConfigsInner { + this := UpdateScrapeConfigPayloadStaticConfigsInner{} + this.Targets = targets + return &this +} + +// NewUpdateScrapeConfigPayloadStaticConfigsInnerWithDefaults instantiates a new UpdateScrapeConfigPayloadStaticConfigsInner 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 NewUpdateScrapeConfigPayloadStaticConfigsInnerWithDefaults() *UpdateScrapeConfigPayloadStaticConfigsInner { + this := UpdateScrapeConfigPayloadStaticConfigsInner{} + return &this +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetTargets returns the Targets field value +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) GetTargets() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.Targets +} + +// GetTargetsOk returns a tuple with the Targets field value +// and a boolean to check if the value has been set. +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) GetTargetsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.Targets, true +} + +// SetTargets sets field value +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) SetTargets(v *[]string) { + o.Targets = v +} + +func (o UpdateScrapeConfigPayloadStaticConfigsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["targets"] = o.Targets + return toSerialize, nil +} + +type NullableUpdateScrapeConfigPayloadStaticConfigsInner struct { + value *UpdateScrapeConfigPayloadStaticConfigsInner + isSet bool +} + +func (v NullableUpdateScrapeConfigPayloadStaticConfigsInner) Get() *UpdateScrapeConfigPayloadStaticConfigsInner { + return v.value +} + +func (v *NullableUpdateScrapeConfigPayloadStaticConfigsInner) Set(val *UpdateScrapeConfigPayloadStaticConfigsInner) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateScrapeConfigPayloadStaticConfigsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateScrapeConfigPayloadStaticConfigsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateScrapeConfigPayloadStaticConfigsInner(val *UpdateScrapeConfigPayloadStaticConfigsInner) *NullableUpdateScrapeConfigPayloadStaticConfigsInner { + return &NullableUpdateScrapeConfigPayloadStaticConfigsInner{value: val, isSet: true} +} + +func (v NullableUpdateScrapeConfigPayloadStaticConfigsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateScrapeConfigPayloadStaticConfigsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/observability/model_web_hook.go b/services/observability/model_web_hook.go index b7ce6a552..0babf106f 100644 --- a/services/observability/model_web_hook.go +++ b/services/observability/model_web_hook.go @@ -10,6 +10,13 @@ API version: 1.1.1 package observability +import ( + "encoding/json" +) + +// checks if the WebHook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WebHook{} + // WebHook struct for WebHook type WebHook struct { MsTeams *bool `json:"msTeams,omitempty"` @@ -17,3 +24,167 @@ type WebHook struct { // REQUIRED Url *string `json:"url"` } + +type _WebHook WebHook + +// NewWebHook instantiates a new WebHook 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 NewWebHook(url *string) *WebHook { + this := WebHook{} + var msTeams bool = false + this.MsTeams = &msTeams + var sendResolved bool = true + this.SendResolved = &sendResolved + this.Url = url + return &this +} + +// NewWebHookWithDefaults instantiates a new WebHook 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 NewWebHookWithDefaults() *WebHook { + this := WebHook{} + var msTeams bool = false + this.MsTeams = &msTeams + var sendResolved bool = true + this.SendResolved = &sendResolved + return &this +} + +// GetMsTeams returns the MsTeams field value if set, zero value otherwise. +func (o *WebHook) GetMsTeams() *bool { + if o == nil || IsNil(o.MsTeams) { + var ret *bool + return ret + } + return o.MsTeams +} + +// GetMsTeamsOk returns a tuple with the MsTeams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebHook) GetMsTeamsOk() (*bool, bool) { + if o == nil || IsNil(o.MsTeams) { + return nil, false + } + return o.MsTeams, true +} + +// HasMsTeams returns a boolean if a field has been set. +func (o *WebHook) HasMsTeams() bool { + if o != nil && !IsNil(o.MsTeams) { + return true + } + + return false +} + +// SetMsTeams gets a reference to the given bool and assigns it to the MsTeams field. +func (o *WebHook) SetMsTeams(v *bool) { + o.MsTeams = v +} + +// GetSendResolved returns the SendResolved field value if set, zero value otherwise. +func (o *WebHook) GetSendResolved() *bool { + if o == nil || IsNil(o.SendResolved) { + var ret *bool + return ret + } + return o.SendResolved +} + +// GetSendResolvedOk returns a tuple with the SendResolved field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebHook) GetSendResolvedOk() (*bool, bool) { + if o == nil || IsNil(o.SendResolved) { + return nil, false + } + return o.SendResolved, true +} + +// HasSendResolved returns a boolean if a field has been set. +func (o *WebHook) HasSendResolved() bool { + if o != nil && !IsNil(o.SendResolved) { + return true + } + + return false +} + +// SetSendResolved gets a reference to the given bool and assigns it to the SendResolved field. +func (o *WebHook) SetSendResolved(v *bool) { + o.SendResolved = v +} + +// GetUrl returns the Url field value +func (o *WebHook) GetUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *WebHook) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url, true +} + +// SetUrl sets field value +func (o *WebHook) SetUrl(v *string) { + o.Url = v +} + +func (o WebHook) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.MsTeams) { + toSerialize["msTeams"] = o.MsTeams + } + if !IsNil(o.SendResolved) { + toSerialize["sendResolved"] = o.SendResolved + } + toSerialize["url"] = o.Url + return toSerialize, nil +} + +type NullableWebHook struct { + value *WebHook + isSet bool +} + +func (v NullableWebHook) Get() *WebHook { + return v.value +} + +func (v *NullableWebHook) Set(val *WebHook) { + v.value = val + v.isSet = true +} + +func (v NullableWebHook) IsSet() bool { + return v.isSet +} + +func (v *NullableWebHook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWebHook(val *WebHook) *NullableWebHook { + return &NullableWebHook{value: val, isSet: true} +} + +func (v NullableWebHook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWebHook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} From 63ce6291fadaa31f3a468465070929039435ff26 Mon Sep 17 00:00:00 2001 From: Vicente Pinto Date: Fri, 11 Oct 2024 18:47:13 +0100 Subject: [PATCH 2/2] Update changelog --- services/observability/CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/observability/CHANGELOG.md b/services/observability/CHANGELOG.md index 2014b7c87..c77bc1200 100644 --- a/services/observability/CHANGELOG.md +++ b/services/observability/CHANGELOG.md @@ -1,7 +1,9 @@ -## v0.1.0 (2024-08-21) -First release. +## v0.2.0 (2024-10-14) -This module offers the same functionalities as `argus` (release [v0.11.0](https://github.com/stackitcloud/stackit-sdk-go/blob/main/services/argus/CHANGELOG.md#v0110-2024-05-23). +- **Feature:** Add support for nullable models +## v0.1.0 (2024-08-21) +First release. +This module offers the same functionalities as `argus` (release [v0.11.0](https://github.com/stackitcloud/stackit-sdk-go/blob/main/services/argus/CHANGELOG.md#v0110-2024-05-23).