From ed21c941ed468c48cf624ecf195180cf0a146502 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 17 Mar 2025 11:08:25 +0000 Subject: [PATCH] Generate observability --- services/observability/api_default_test.go | 548 ++++---- services/observability/model_alert.go | 206 +-- .../model_alert_config_receivers_response.go | 101 +- .../model_alert_config_route_response.go | 101 +- services/observability/model_basic_auth.go | 102 +- ...el_create_alert_config_receiver_payload.go | 211 +-- ...ig_receiver_payload_email_configs_inner.go | 324 +++-- ...receiver_payload_opsgenie_configs_inner.go | 162 ++- ...receiver_payload_web_hook_configs_inner.go | 109 +- ...model_create_alert_config_route_payload.go | 485 ++++--- ...alert_config_route_payload_routes_inner.go | 428 +++--- .../model_create_credentials_response.go | 101 +- .../model_create_instance_payload.go | 159 ++- .../model_create_instance_response.go | 152 ++- .../model_create_scrape_config_payload.go | 841 +++++++----- ...create_scrape_config_payload_basic_auth.go | 108 +- ...pe_config_payload_http_sd_configs_inner.go | 267 ++-- ...ig_payload_http_sd_configs_inner_oauth2.go | 258 ++-- ...http_sd_configs_inner_oauth2_tls_config.go | 55 +- ...g_payload_metrics_relabel_configs_inner.go | 383 +++--- ...ape_config_payload_static_configs_inner.go | 104 +- services/observability/model_credentials.go | 102 +- .../model_credentials_remote_write_config.go | 150 ++- ...redentials_remote_write_delete_response.go | 101 +- .../model_delete_scrape_config_response.go | 101 +- services/observability/model_email_config.go | 377 +++--- services/observability/model_error.go | 105 +- .../model_get_alert_configs_response.go | 101 +- .../model_get_credentials_response.go | 205 +-- .../model_get_instance_response.go | 689 ++++++---- ..._get_metrics_storage_retention_response.go | 202 ++- .../model_get_scrape_config_response.go | 101 +- services/observability/model_global.go | 434 ++++--- .../observability/model_grafana_configs.go | 211 +-- services/observability/model_grafana_oauth.go | 569 +++++--- .../observability/model_http_service_sd.go | 267 ++-- services/observability/model_inhibit_rules.go | 371 +++--- services/observability/model_instance.go | 503 ++++--- .../observability/model_instance_response.go | 52 +- .../model_instance_sensitive_data.go | 1154 +++++++++++------ services/observability/model_job.go | 847 +++++++----- .../observability/model_list_acl_response.go | 101 +- .../model_list_credentials_response.go | 101 +- .../model_list_instances_response.go | 101 +- .../model_list_scrape_configs_response.go | 101 +- services/observability/model_message.go | 52 +- .../model_metrics_relabel_config.go | 381 +++--- services/observability/model_o_auth2.go | 258 ++-- .../observability/model_opsgenie_config.go | 271 ++-- .../observability/model_permission_denied.go | 52 +- services/observability/model_plan.go | 1127 ++++++++++------ services/observability/model_plan_model.go | 955 +++++++++----- .../observability/model_plans_response.go | 101 +- .../model_project_instance_full.go | 376 ++++-- services/observability/model_receiver.go | 101 +- services/observability/model_receivers.go | 211 +-- services/observability/model_route.go | 487 ++++--- .../observability/model_route_serializer.go | 540 +++++--- .../model_scrape_configs_response.go | 101 +- .../observability/model_service_keys_list.go | 155 ++- .../observability/model_static_configs.go | 104 +- services/observability/model_tls_config.go | 55 +- .../observability/model_update_acl_payload.go | 51 +- ...el_update_alert_config_receiver_payload.go | 211 +-- ...model_update_alert_config_route_payload.go | 485 ++++--- .../model_update_alert_configs_payload.go | 206 +-- ...del_update_alert_configs_payload_global.go | 434 ++++--- ...ate_alert_configs_payload_inhibit_rules.go | 265 ++-- ...e_alert_configs_payload_receivers_inner.go | 211 +-- ...odel_update_alert_configs_payload_route.go | 485 ++++--- .../model_update_alert_configs_response.go | 101 +- ...credentials_remote_write_config_payload.go | 53 +- .../model_update_grafana_configs_payload.go | 159 ++- ...e_grafana_configs_payload_generic_oauth.go | 569 +++++--- .../model_update_instance_payload.go | 159 ++- ...pdate_metrics_storage_retention_payload.go | 152 ++- .../model_update_scrape_config_payload.go | 679 ++++++---- ...ape_config_payload_static_configs_inner.go | 104 +- services/observability/model_web_hook.go | 162 ++- services/observability/utils.go | 26 + 80 files changed, 13740 insertions(+), 8350 deletions(-) diff --git a/services/observability/api_default_test.go b/services/observability/api_default_test.go index 20458e9a3..9958a33ed 100644 --- a/services/observability/api_default_test.go +++ b/services/observability/api_default_test.go @@ -24,14 +24,14 @@ import ( func Test_observability_DefaultApiService(t *testing.T) { t.Run("Test DefaultApiService CreateAlertConfigReceiver", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := AlertConfigReceiversResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -65,8 +65,8 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue createAlertConfigReceiverPayload := CreateAlertConfigReceiverPayload{} resp, reqErr := apiClient.CreateAlertConfigReceiver(context.Background(), instanceId, projectId).CreateAlertConfigReceiverPayload(createAlertConfigReceiverPayload).Execute() @@ -74,20 +74,20 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService CreateAlertConfigRoute", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := AlertConfigRouteResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -121,8 +121,8 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue createAlertConfigRoutePayload := CreateAlertConfigRoutePayload{} resp, reqErr := apiClient.CreateAlertConfigRoute(context.Background(), instanceId, projectId).CreateAlertConfigRoutePayload(createAlertConfigRoutePayload).Execute() @@ -130,20 +130,20 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService CreateCredentials", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/credentials" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/credentials" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := CreateCredentialsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -177,26 +177,26 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.CreateCredentials(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService CreateInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances" + _apiUrlPath := "/v1/projects/{projectId}/instances" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := CreateInstanceResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -230,7 +230,7 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue createInstancePayload := CreateInstancePayload{} resp, reqErr := apiClient.CreateInstance(context.Background(), projectId).CreateInstancePayload(createInstancePayload).Execute() @@ -238,20 +238,20 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService CreateScrapeConfig", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ScrapeConfigsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -285,8 +285,8 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue createScrapeConfigPayload := CreateScrapeConfigPayload{} resp, reqErr := apiClient.CreateScrapeConfig(context.Background(), instanceId, projectId).CreateScrapeConfigPayload(createScrapeConfigPayload).Execute() @@ -294,22 +294,22 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService DeleteAlertConfigReceiver", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers/{receiver}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers/{receiver}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) receiverValue := "receiver" - path = strings.Replace(path, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := AlertConfigReceiversResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -343,31 +343,31 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - receiver := "receiver" + instanceId := instanceIdValue + projectId := projectIdValue + receiver := receiverValue resp, reqErr := apiClient.DeleteAlertConfigReceiver(context.Background(), instanceId, projectId, receiver).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService DeleteAlertConfigRoute", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes/{receiver}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes/{receiver}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) receiverValue := "receiver" - path = strings.Replace(path, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := AlertConfigRouteResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -401,31 +401,31 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - receiver := "receiver" + instanceId := instanceIdValue + projectId := projectIdValue + receiver := receiverValue resp, reqErr := apiClient.DeleteAlertConfigRoute(context.Background(), instanceId, projectId, receiver).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService DeleteCredentials", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) usernameValue := "username" - path = strings.Replace(path, "{"+"username"+"}", url.PathEscape(ParameterValueToString(usernameValue, "username")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"username"+"}", url.PathEscape(ParameterValueToString(usernameValue, "username")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -459,31 +459,31 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - username := "username" + instanceId := instanceIdValue + projectId := projectIdValue + username := usernameValue resp, reqErr := apiClient.DeleteCredentials(context.Background(), instanceId, projectId, username).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService DeleteCredentialsRemoteWriteConfig", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}/remote-write-limits" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}/remote-write-limits" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) usernameValue := "username" - path = strings.Replace(path, "{"+"username"+"}", url.PathEscape(ParameterValueToString(usernameValue, "username")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"username"+"}", url.PathEscape(ParameterValueToString(usernameValue, "username")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := CredentialsRemoteWriteDeleteResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -517,29 +517,29 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - username := "username" + instanceId := instanceIdValue + projectId := projectIdValue + username := usernameValue resp, reqErr := apiClient.DeleteCredentialsRemoteWriteConfig(context.Background(), instanceId, projectId, username).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService DeleteInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := InstanceResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -573,30 +573,30 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.DeleteInstance(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService DeleteScrapeConfig", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) jobNameValue := "jobName" - path = strings.Replace(path, "{"+"jobName"+"}", url.PathEscape(ParameterValueToString(jobNameValue, "jobName")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"jobName"+"}", url.PathEscape(ParameterValueToString(jobNameValue, "jobName")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := DeleteScrapeConfigResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -630,31 +630,31 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - jobName := "jobName" - projectId := "projectId" + instanceId := instanceIdValue + jobName := jobNameValue + projectId := projectIdValue resp, reqErr := apiClient.DeleteScrapeConfig(context.Background(), instanceId, jobName, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetAlertConfigReceiver", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers/{receiver}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers/{receiver}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) receiverValue := "receiver" - path = strings.Replace(path, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Receiver{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -688,31 +688,31 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - receiver := "receiver" + instanceId := instanceIdValue + projectId := projectIdValue + receiver := receiverValue resp, reqErr := apiClient.GetAlertConfigReceiver(context.Background(), instanceId, projectId, receiver).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetAlertConfigRoute", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes/{receiver}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes/{receiver}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) receiverValue := "receiver" - path = strings.Replace(path, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := AlertConfigRouteResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -746,29 +746,29 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - receiver := "receiver" + instanceId := instanceIdValue + projectId := projectIdValue + receiver := receiverValue resp, reqErr := apiClient.GetAlertConfigRoute(context.Background(), instanceId, projectId, receiver).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetAlertConfigs", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := GetAlertConfigsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -802,30 +802,30 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.GetAlertConfigs(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetCredentials", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) usernameValue := "username" - path = strings.Replace(path, "{"+"username"+"}", url.PathEscape(ParameterValueToString(usernameValue, "username")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"username"+"}", url.PathEscape(ParameterValueToString(usernameValue, "username")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := GetCredentialsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -859,31 +859,31 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - username := "username" + instanceId := instanceIdValue + projectId := projectIdValue + username := usernameValue resp, reqErr := apiClient.GetCredentials(context.Background(), instanceId, projectId, username).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetCredentialsRemoteWriteConfig", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}/remote-write-limits" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}/remote-write-limits" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) usernameValue := "username" - path = strings.Replace(path, "{"+"username"+"}", url.PathEscape(ParameterValueToString(usernameValue, "username")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"username"+"}", url.PathEscape(ParameterValueToString(usernameValue, "username")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := CredentialsRemoteWriteConfig{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -917,29 +917,29 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - username := "username" + instanceId := instanceIdValue + projectId := projectIdValue + username := usernameValue resp, reqErr := apiClient.GetCredentialsRemoteWriteConfig(context.Background(), instanceId, projectId, username).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetGrafanaConfigs", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/grafana-configs" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/grafana-configs" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := GrafanaConfigs{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -973,28 +973,28 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.GetGrafanaConfigs(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := GetInstanceResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1028,28 +1028,28 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.GetInstance(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetMetricsStorageRetention", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/metrics-storage-retentions" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/metrics-storage-retentions" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := GetMetricsStorageRetentionResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1083,30 +1083,30 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.GetMetricsStorageRetention(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetScrapeConfig", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) jobNameValue := "jobName" - path = strings.Replace(path, "{"+"jobName"+"}", url.PathEscape(ParameterValueToString(jobNameValue, "jobName")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"jobName"+"}", url.PathEscape(ParameterValueToString(jobNameValue, "jobName")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := GetScrapeConfigResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1140,29 +1140,29 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - jobName := "jobName" - projectId := "projectId" + instanceId := instanceIdValue + jobName := jobNameValue + projectId := projectIdValue resp, reqErr := apiClient.GetScrapeConfig(context.Background(), instanceId, jobName, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListACL", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/acl" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/acl" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ListACLResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1196,28 +1196,28 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.ListACL(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListAlertConfigReceivers", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := AlertConfigReceiversResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1251,28 +1251,28 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.ListAlertConfigReceivers(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListAlertConfigRoutes", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := AlertConfigRouteResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1306,28 +1306,28 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.ListAlertConfigRoutes(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListCredentials", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/credentials" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/credentials" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ListCredentialsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1361,26 +1361,26 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.ListCredentials(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListInstances", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances" + _apiUrlPath := "/v1/projects/{projectId}/instances" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ListInstancesResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1414,25 +1414,25 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.ListInstances(context.Background(), projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListPlans", func(t *testing.T) { - path := "/v1/projects/{projectId}/plans" + _apiUrlPath := "/v1/projects/{projectId}/plans" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := PlansResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1466,27 +1466,27 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.ListPlans(context.Background(), projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListScrapeConfigs", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ListScrapeConfigsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1520,28 +1520,28 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.ListScrapeConfigs(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService UpdateACL", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/acl" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/acl" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1575,30 +1575,30 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.UpdateACL(context.Background(), instanceId, projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService UpdateAlertConfigReceiver", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers/{receiver}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/receivers/{receiver}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) receiverValue := "receiver" - path = strings.Replace(path, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := AlertConfigReceiversResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1632,9 +1632,9 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - receiver := "receiver" + instanceId := instanceIdValue + projectId := projectIdValue + receiver := receiverValue updateAlertConfigReceiverPayload := UpdateAlertConfigReceiverPayload{} resp, reqErr := apiClient.UpdateAlertConfigReceiver(context.Background(), instanceId, projectId, receiver).UpdateAlertConfigReceiverPayload(updateAlertConfigReceiverPayload).Execute() @@ -1642,22 +1642,22 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService UpdateAlertConfigRoute", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes/{receiver}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs/routes/{receiver}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) receiverValue := "receiver" - path = strings.Replace(path, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"receiver"+"}", url.PathEscape(ParameterValueToString(receiverValue, "receiver")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := AlertConfigRouteResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1691,9 +1691,9 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - receiver := "receiver" + instanceId := instanceIdValue + projectId := projectIdValue + receiver := receiverValue updateAlertConfigRoutePayload := UpdateAlertConfigRoutePayload{} resp, reqErr := apiClient.UpdateAlertConfigRoute(context.Background(), instanceId, projectId, receiver).UpdateAlertConfigRoutePayload(updateAlertConfigRoutePayload).Execute() @@ -1701,20 +1701,20 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService UpdateAlertConfigs", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/alertconfigs" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := UpdateAlertConfigsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1748,8 +1748,8 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue updateAlertConfigsPayload := UpdateAlertConfigsPayload{} resp, reqErr := apiClient.UpdateAlertConfigs(context.Background(), instanceId, projectId).UpdateAlertConfigsPayload(updateAlertConfigsPayload).Execute() @@ -1757,22 +1757,22 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService UpdateCredentialsRemoteWriteConfig", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}/remote-write-limits" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{username}/remote-write-limits" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) usernameValue := "username" - path = strings.Replace(path, "{"+"username"+"}", url.PathEscape(ParameterValueToString(usernameValue, "username")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"username"+"}", url.PathEscape(ParameterValueToString(usernameValue, "username")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := CredentialsRemoteWriteConfig{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1806,9 +1806,9 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - username := "username" + instanceId := instanceIdValue + projectId := projectIdValue + username := usernameValue updateCredentialsRemoteWriteConfigPayload := UpdateCredentialsRemoteWriteConfigPayload{} resp, reqErr := apiClient.UpdateCredentialsRemoteWriteConfig(context.Background(), instanceId, projectId, username).UpdateCredentialsRemoteWriteConfigPayload(updateCredentialsRemoteWriteConfigPayload).Execute() @@ -1816,20 +1816,20 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService UpdateGrafanaConfigs", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/grafana-configs" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/grafana-configs" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1863,8 +1863,8 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue updateGrafanaConfigsPayload := UpdateGrafanaConfigsPayload{} resp, reqErr := apiClient.UpdateGrafanaConfigs(context.Background(), instanceId, projectId).UpdateGrafanaConfigsPayload(updateGrafanaConfigsPayload).Execute() @@ -1872,20 +1872,20 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService UpdateInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := InstanceResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1919,8 +1919,8 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue updateInstancePayload := UpdateInstancePayload{} resp, reqErr := apiClient.UpdateInstance(context.Background(), instanceId, projectId).UpdateInstancePayload(updateInstancePayload).Execute() @@ -1928,20 +1928,20 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService UpdateMetricsStorageRetention", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/metrics-storage-retentions" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/metrics-storage-retentions" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1975,8 +1975,8 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue updateMetricsStorageRetentionPayload := UpdateMetricsStorageRetentionPayload{} resp, reqErr := apiClient.UpdateMetricsStorageRetention(context.Background(), instanceId, projectId).UpdateMetricsStorageRetentionPayload(updateMetricsStorageRetentionPayload).Execute() @@ -1984,22 +1984,22 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService UpdateScrapeConfig", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/scrapeconfigs/{jobName}" instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) jobNameValue := "jobName" - path = strings.Replace(path, "{"+"jobName"+"}", url.PathEscape(ParameterValueToString(jobNameValue, "jobName")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"jobName"+"}", url.PathEscape(ParameterValueToString(jobNameValue, "jobName")), -1) projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ScrapeConfigsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -2033,9 +2033,9 @@ func Test_observability_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - jobName := "jobName" - projectId := "projectId" + instanceId := instanceIdValue + jobName := jobNameValue + projectId := projectIdValue updateScrapeConfigPayload := UpdateScrapeConfigPayload{} resp, reqErr := apiClient.UpdateScrapeConfig(context.Background(), instanceId, jobName, projectId).UpdateScrapeConfigPayload(updateScrapeConfigPayload).Execute() @@ -2043,7 +2043,7 @@ func Test_observability_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) diff --git a/services/observability/model_alert.go b/services/observability/model_alert.go index 0c22821b2..e35cc0844 100644 --- a/services/observability/model_alert.go +++ b/services/observability/model_alert.go @@ -17,14 +17,94 @@ import ( // checks if the Alert type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Alert{} +/* + types and functions for global +*/ + +// isModel +type AlertGetGlobalAttributeType = *Global +type AlertGetGlobalArgType = Global +type AlertGetGlobalRetType = Global + +func getAlertGetGlobalAttributeTypeOk(arg AlertGetGlobalAttributeType) (ret AlertGetGlobalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAlertGetGlobalAttributeType(arg *AlertGetGlobalAttributeType, val AlertGetGlobalRetType) { + *arg = &val +} + +/* + types and functions for inhibitRules +*/ + +// isArray +type AlertGetInhibitRulesAttributeType = *[]InhibitRules +type AlertGetInhibitRulesArgType = []InhibitRules +type AlertGetInhibitRulesRetType = []InhibitRules + +func getAlertGetInhibitRulesAttributeTypeOk(arg AlertGetInhibitRulesAttributeType) (ret AlertGetInhibitRulesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAlertGetInhibitRulesAttributeType(arg *AlertGetInhibitRulesAttributeType, val AlertGetInhibitRulesRetType) { + *arg = &val +} + +/* + types and functions for receivers +*/ + +// isArray +type AlertGetReceiversAttributeType = *[]Receivers +type AlertGetReceiversArgType = []Receivers +type AlertGetReceiversRetType = []Receivers + +func getAlertGetReceiversAttributeTypeOk(arg AlertGetReceiversAttributeType) (ret AlertGetReceiversRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAlertGetReceiversAttributeType(arg *AlertGetReceiversAttributeType, val AlertGetReceiversRetType) { + *arg = &val +} + +/* + types and functions for route +*/ + +// isModel +type AlertGetRouteAttributeType = *Route +type AlertGetRouteArgType = Route +type AlertGetRouteRetType = Route + +func getAlertGetRouteAttributeTypeOk(arg AlertGetRouteAttributeType) (ret AlertGetRouteRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAlertGetRouteAttributeType(arg *AlertGetRouteAttributeType, val AlertGetRouteRetType) { + *arg = &val +} + // Alert struct for Alert type Alert struct { - Global *Global `json:"global,omitempty"` - InhibitRules *[]InhibitRules `json:"inhibitRules,omitempty"` + Global AlertGetGlobalAttributeType `json:"global,omitempty"` + InhibitRules AlertGetInhibitRulesAttributeType `json:"inhibitRules,omitempty"` // REQUIRED - Receivers *[]Receivers `json:"receivers"` + Receivers AlertGetReceiversAttributeType `json:"receivers"` // REQUIRED - Route *Route `json:"route"` + Route AlertGetRouteAttributeType `json:"route"` } type _Alert Alert @@ -33,10 +113,10 @@ type _Alert Alert // 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 { +func NewAlert(receivers AlertGetReceiversArgType, route AlertGetRouteArgType) *Alert { this := Alert{} - this.Receivers = receivers - this.Route = route + setAlertGetReceiversAttributeType(&this.Receivers, receivers) + setAlertGetRouteAttributeType(&this.Route, route) return &this } @@ -49,127 +129,99 @@ func NewAlertWithDefaults() *Alert { } // 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 +func (o *Alert) GetGlobal() (res AlertGetGlobalRetType) { + res, _ = o.GetGlobalOk() + return } // 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 +func (o *Alert) GetGlobalOk() (ret AlertGetGlobalRetType, ok bool) { + return getAlertGetGlobalAttributeTypeOk(o.Global) } // 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 + _, ok := o.GetGlobalOk() + return ok } // SetGlobal gets a reference to the given Global and assigns it to the Global field. -func (o *Alert) SetGlobal(v *Global) { - o.Global = v +func (o *Alert) SetGlobal(v AlertGetGlobalRetType) { + setAlertGetGlobalAttributeType(&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 +func (o *Alert) GetInhibitRules() (res AlertGetInhibitRulesRetType) { + res, _ = o.GetInhibitRulesOk() + return } // 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 +func (o *Alert) GetInhibitRulesOk() (ret AlertGetInhibitRulesRetType, ok bool) { + return getAlertGetInhibitRulesAttributeTypeOk(o.InhibitRules) } // 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 + _, ok := o.GetInhibitRulesOk() + return ok } // SetInhibitRules gets a reference to the given []InhibitRules and assigns it to the InhibitRules field. -func (o *Alert) SetInhibitRules(v *[]InhibitRules) { - o.InhibitRules = v +func (o *Alert) SetInhibitRules(v AlertGetInhibitRulesRetType) { + setAlertGetInhibitRulesAttributeType(&o.InhibitRules, v) } // GetReceivers returns the Receivers field value -func (o *Alert) GetReceivers() *[]Receivers { - if o == nil || IsNil(o.Receivers) { - var ret *[]Receivers - return ret - } - - return o.Receivers +func (o *Alert) GetReceivers() (ret AlertGetReceiversRetType) { + ret, _ = o.GetReceiversOk() + return ret } // 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 +func (o *Alert) GetReceiversOk() (ret AlertGetReceiversRetType, ok bool) { + return getAlertGetReceiversAttributeTypeOk(o.Receivers) } // SetReceivers sets field value -func (o *Alert) SetReceivers(v *[]Receivers) { - o.Receivers = v +func (o *Alert) SetReceivers(v AlertGetReceiversRetType) { + setAlertGetReceiversAttributeType(&o.Receivers, v) } // GetRoute returns the Route field value -func (o *Alert) GetRoute() *Route { - if o == nil || IsNil(o.Route) { - var ret *Route - return ret - } - - return o.Route +func (o *Alert) GetRoute() (ret AlertGetRouteRetType) { + ret, _ = o.GetRouteOk() + return ret } // 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 +func (o *Alert) GetRouteOk() (ret AlertGetRouteRetType, ok bool) { + return getAlertGetRouteAttributeTypeOk(o.Route) } // SetRoute sets field value -func (o *Alert) SetRoute(v *Route) { - o.Route = v +func (o *Alert) SetRoute(v AlertGetRouteRetType) { + setAlertGetRouteAttributeType(&o.Route, v) } func (o Alert) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Global) { - toSerialize["global"] = o.Global + if val, ok := getAlertGetGlobalAttributeTypeOk(o.Global); ok { + toSerialize["Global"] = val + } + if val, ok := getAlertGetInhibitRulesAttributeTypeOk(o.InhibitRules); ok { + toSerialize["InhibitRules"] = val + } + if val, ok := getAlertGetReceiversAttributeTypeOk(o.Receivers); ok { + toSerialize["Receivers"] = val } - if !IsNil(o.InhibitRules) { - toSerialize["inhibitRules"] = o.InhibitRules + if val, ok := getAlertGetRouteAttributeTypeOk(o.Route); ok { + toSerialize["Route"] = val } - toSerialize["receivers"] = o.Receivers - toSerialize["route"] = o.Route return toSerialize, nil } diff --git a/services/observability/model_alert_config_receivers_response.go b/services/observability/model_alert_config_receivers_response.go index 4e0538ad1..5dd45a2c4 100644 --- a/services/observability/model_alert_config_receivers_response.go +++ b/services/observability/model_alert_config_receivers_response.go @@ -17,12 +17,53 @@ import ( // checks if the AlertConfigReceiversResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &AlertConfigReceiversResponse{} +/* + types and functions for data +*/ + +// isArray +type AlertConfigReceiversResponseGetDataAttributeType = *[]Receivers +type AlertConfigReceiversResponseGetDataArgType = []Receivers +type AlertConfigReceiversResponseGetDataRetType = []Receivers + +func getAlertConfigReceiversResponseGetDataAttributeTypeOk(arg AlertConfigReceiversResponseGetDataAttributeType) (ret AlertConfigReceiversResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAlertConfigReceiversResponseGetDataAttributeType(arg *AlertConfigReceiversResponseGetDataAttributeType, val AlertConfigReceiversResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type AlertConfigReceiversResponseGetMessageAttributeType = *string + +func getAlertConfigReceiversResponseGetMessageAttributeTypeOk(arg AlertConfigReceiversResponseGetMessageAttributeType) (ret AlertConfigReceiversResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAlertConfigReceiversResponseGetMessageAttributeType(arg *AlertConfigReceiversResponseGetMessageAttributeType, val AlertConfigReceiversResponseGetMessageRetType) { + *arg = &val +} + +type AlertConfigReceiversResponseGetMessageArgType = string +type AlertConfigReceiversResponseGetMessageRetType = string + // AlertConfigReceiversResponse struct for AlertConfigReceiversResponse type AlertConfigReceiversResponse struct { // REQUIRED - Data *[]Receivers `json:"data"` + Data AlertConfigReceiversResponseGetDataAttributeType `json:"data"` // REQUIRED - Message *string `json:"message"` + Message AlertConfigReceiversResponseGetMessageAttributeType `json:"message"` } type _AlertConfigReceiversResponse AlertConfigReceiversResponse @@ -31,10 +72,10 @@ type _AlertConfigReceiversResponse AlertConfigReceiversResponse // 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 { +func NewAlertConfigReceiversResponse(data AlertConfigReceiversResponseGetDataArgType, message AlertConfigReceiversResponseGetMessageArgType) *AlertConfigReceiversResponse { this := AlertConfigReceiversResponse{} - this.Data = data - this.Message = message + setAlertConfigReceiversResponseGetDataAttributeType(&this.Data, data) + setAlertConfigReceiversResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewAlertConfigReceiversResponseWithDefaults() *AlertConfigReceiversResponse } // GetData returns the Data field value -func (o *AlertConfigReceiversResponse) GetData() *[]Receivers { - if o == nil || IsNil(o.Data) { - var ret *[]Receivers - return ret - } - - return o.Data +func (o *AlertConfigReceiversResponse) GetData() (ret AlertConfigReceiversResponseGetDataRetType) { + ret, _ = o.GetDataOk() + return ret } // 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 +func (o *AlertConfigReceiversResponse) GetDataOk() (ret AlertConfigReceiversResponseGetDataRetType, ok bool) { + return getAlertConfigReceiversResponseGetDataAttributeTypeOk(o.Data) } // SetData sets field value -func (o *AlertConfigReceiversResponse) SetData(v *[]Receivers) { - o.Data = v +func (o *AlertConfigReceiversResponse) SetData(v AlertConfigReceiversResponseGetDataRetType) { + setAlertConfigReceiversResponseGetDataAttributeType(&o.Data, v) } // GetMessage returns the Message field value -func (o *AlertConfigReceiversResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *AlertConfigReceiversResponse) GetMessage() (ret AlertConfigReceiversResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *AlertConfigReceiversResponse) GetMessageOk() (ret AlertConfigReceiversResponseGetMessageRetType, ok bool) { + return getAlertConfigReceiversResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *AlertConfigReceiversResponse) SetMessage(v *string) { - o.Message = v +func (o *AlertConfigReceiversResponse) SetMessage(v AlertConfigReceiversResponseGetMessageRetType) { + setAlertConfigReceiversResponseGetMessageAttributeType(&o.Message, v) } func (o AlertConfigReceiversResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["data"] = o.Data - toSerialize["message"] = o.Message + if val, ok := getAlertConfigReceiversResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getAlertConfigReceiversResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_alert_config_route_response.go b/services/observability/model_alert_config_route_response.go index 82803ef3a..e4d7346d2 100644 --- a/services/observability/model_alert_config_route_response.go +++ b/services/observability/model_alert_config_route_response.go @@ -17,12 +17,53 @@ import ( // checks if the AlertConfigRouteResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &AlertConfigRouteResponse{} +/* + types and functions for data +*/ + +// isModel +type AlertConfigRouteResponseGetDataAttributeType = *Route +type AlertConfigRouteResponseGetDataArgType = Route +type AlertConfigRouteResponseGetDataRetType = Route + +func getAlertConfigRouteResponseGetDataAttributeTypeOk(arg AlertConfigRouteResponseGetDataAttributeType) (ret AlertConfigRouteResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAlertConfigRouteResponseGetDataAttributeType(arg *AlertConfigRouteResponseGetDataAttributeType, val AlertConfigRouteResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type AlertConfigRouteResponseGetMessageAttributeType = *string + +func getAlertConfigRouteResponseGetMessageAttributeTypeOk(arg AlertConfigRouteResponseGetMessageAttributeType) (ret AlertConfigRouteResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAlertConfigRouteResponseGetMessageAttributeType(arg *AlertConfigRouteResponseGetMessageAttributeType, val AlertConfigRouteResponseGetMessageRetType) { + *arg = &val +} + +type AlertConfigRouteResponseGetMessageArgType = string +type AlertConfigRouteResponseGetMessageRetType = string + // AlertConfigRouteResponse struct for AlertConfigRouteResponse type AlertConfigRouteResponse struct { // REQUIRED - Data *Route `json:"data"` + Data AlertConfigRouteResponseGetDataAttributeType `json:"data"` // REQUIRED - Message *string `json:"message"` + Message AlertConfigRouteResponseGetMessageAttributeType `json:"message"` } type _AlertConfigRouteResponse AlertConfigRouteResponse @@ -31,10 +72,10 @@ type _AlertConfigRouteResponse AlertConfigRouteResponse // 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 { +func NewAlertConfigRouteResponse(data AlertConfigRouteResponseGetDataArgType, message AlertConfigRouteResponseGetMessageArgType) *AlertConfigRouteResponse { this := AlertConfigRouteResponse{} - this.Data = data - this.Message = message + setAlertConfigRouteResponseGetDataAttributeType(&this.Data, data) + setAlertConfigRouteResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewAlertConfigRouteResponseWithDefaults() *AlertConfigRouteResponse { } // GetData returns the Data field value -func (o *AlertConfigRouteResponse) GetData() *Route { - if o == nil || IsNil(o.Data) { - var ret *Route - return ret - } - - return o.Data +func (o *AlertConfigRouteResponse) GetData() (ret AlertConfigRouteResponseGetDataRetType) { + ret, _ = o.GetDataOk() + return ret } // 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 +func (o *AlertConfigRouteResponse) GetDataOk() (ret AlertConfigRouteResponseGetDataRetType, ok bool) { + return getAlertConfigRouteResponseGetDataAttributeTypeOk(o.Data) } // SetData sets field value -func (o *AlertConfigRouteResponse) SetData(v *Route) { - o.Data = v +func (o *AlertConfigRouteResponse) SetData(v AlertConfigRouteResponseGetDataRetType) { + setAlertConfigRouteResponseGetDataAttributeType(&o.Data, v) } // GetMessage returns the Message field value -func (o *AlertConfigRouteResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *AlertConfigRouteResponse) GetMessage() (ret AlertConfigRouteResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *AlertConfigRouteResponse) GetMessageOk() (ret AlertConfigRouteResponseGetMessageRetType, ok bool) { + return getAlertConfigRouteResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *AlertConfigRouteResponse) SetMessage(v *string) { - o.Message = v +func (o *AlertConfigRouteResponse) SetMessage(v AlertConfigRouteResponseGetMessageRetType) { + setAlertConfigRouteResponseGetMessageAttributeType(&o.Message, v) } func (o AlertConfigRouteResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["data"] = o.Data - toSerialize["message"] = o.Message + if val, ok := getAlertConfigRouteResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getAlertConfigRouteResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_basic_auth.go b/services/observability/model_basic_auth.go index f7c67f51e..26d69d54d 100644 --- a/services/observability/model_basic_auth.go +++ b/services/observability/model_basic_auth.go @@ -17,12 +17,54 @@ import ( // checks if the BasicAuth type satisfies the MappedNullable interface at compile time var _ MappedNullable = &BasicAuth{} +/* + types and functions for password +*/ + +// isNotNullableString +type BasicAuthGetPasswordAttributeType = *string + +func getBasicAuthGetPasswordAttributeTypeOk(arg BasicAuthGetPasswordAttributeType) (ret BasicAuthGetPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBasicAuthGetPasswordAttributeType(arg *BasicAuthGetPasswordAttributeType, val BasicAuthGetPasswordRetType) { + *arg = &val +} + +type BasicAuthGetPasswordArgType = string +type BasicAuthGetPasswordRetType = string + +/* + types and functions for username +*/ + +// isNotNullableString +type BasicAuthGetUsernameAttributeType = *string + +func getBasicAuthGetUsernameAttributeTypeOk(arg BasicAuthGetUsernameAttributeType) (ret BasicAuthGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBasicAuthGetUsernameAttributeType(arg *BasicAuthGetUsernameAttributeType, val BasicAuthGetUsernameRetType) { + *arg = &val +} + +type BasicAuthGetUsernameArgType = string +type BasicAuthGetUsernameRetType = string + // BasicAuth struct for BasicAuth type BasicAuth struct { // REQUIRED - Password *string `json:"password"` + Password BasicAuthGetPasswordAttributeType `json:"password"` // REQUIRED - Username *string `json:"username"` + Username BasicAuthGetUsernameAttributeType `json:"username"` } type _BasicAuth BasicAuth @@ -31,10 +73,10 @@ type _BasicAuth BasicAuth // 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 { +func NewBasicAuth(password BasicAuthGetPasswordArgType, username BasicAuthGetUsernameArgType) *BasicAuth { this := BasicAuth{} - this.Password = password - this.Username = username + setBasicAuthGetPasswordAttributeType(&this.Password, password) + setBasicAuthGetUsernameAttributeType(&this.Username, username) return &this } @@ -47,57 +89,47 @@ func NewBasicAuthWithDefaults() *BasicAuth { } // GetPassword returns the Password field value -func (o *BasicAuth) GetPassword() *string { - if o == nil || IsNil(o.Password) { - var ret *string - return ret - } - - return o.Password +func (o *BasicAuth) GetPassword() (ret BasicAuthGetPasswordRetType) { + ret, _ = o.GetPasswordOk() + return ret } // 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 +func (o *BasicAuth) GetPasswordOk() (ret BasicAuthGetPasswordRetType, ok bool) { + return getBasicAuthGetPasswordAttributeTypeOk(o.Password) } // SetPassword sets field value -func (o *BasicAuth) SetPassword(v *string) { - o.Password = v +func (o *BasicAuth) SetPassword(v BasicAuthGetPasswordRetType) { + setBasicAuthGetPasswordAttributeType(&o.Password, v) } // GetUsername returns the Username field value -func (o *BasicAuth) GetUsername() *string { - if o == nil || IsNil(o.Username) { - var ret *string - return ret - } - - return o.Username +func (o *BasicAuth) GetUsername() (ret BasicAuthGetUsernameRetType) { + ret, _ = o.GetUsernameOk() + return ret } // 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 +func (o *BasicAuth) GetUsernameOk() (ret BasicAuthGetUsernameRetType, ok bool) { + return getBasicAuthGetUsernameAttributeTypeOk(o.Username) } // SetUsername sets field value -func (o *BasicAuth) SetUsername(v *string) { - o.Username = v +func (o *BasicAuth) SetUsername(v BasicAuthGetUsernameRetType) { + setBasicAuthGetUsernameAttributeType(&o.Username, v) } func (o BasicAuth) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["password"] = o.Password - toSerialize["username"] = o.Username + if val, ok := getBasicAuthGetPasswordAttributeTypeOk(o.Password); ok { + toSerialize["Password"] = val + } + if val, ok := getBasicAuthGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val + } return toSerialize, nil } diff --git a/services/observability/model_create_alert_config_receiver_payload.go b/services/observability/model_create_alert_config_receiver_payload.go index 4e461e459..873bef0a7 100644 --- a/services/observability/model_create_alert_config_receiver_payload.go +++ b/services/observability/model_create_alert_config_receiver_payload.go @@ -17,16 +17,97 @@ import ( // checks if the CreateAlertConfigReceiverPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateAlertConfigReceiverPayload{} +/* + types and functions for emailConfigs +*/ + +// isArray +type CreateAlertConfigReceiverPayloadGetEmailConfigsAttributeType = *[]CreateAlertConfigReceiverPayloadEmailConfigsInner +type CreateAlertConfigReceiverPayloadGetEmailConfigsArgType = []CreateAlertConfigReceiverPayloadEmailConfigsInner +type CreateAlertConfigReceiverPayloadGetEmailConfigsRetType = []CreateAlertConfigReceiverPayloadEmailConfigsInner + +func getCreateAlertConfigReceiverPayloadGetEmailConfigsAttributeTypeOk(arg CreateAlertConfigReceiverPayloadGetEmailConfigsAttributeType) (ret CreateAlertConfigReceiverPayloadGetEmailConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadGetEmailConfigsAttributeType(arg *CreateAlertConfigReceiverPayloadGetEmailConfigsAttributeType, val CreateAlertConfigReceiverPayloadGetEmailConfigsRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadGetNameAttributeType = *string + +func getCreateAlertConfigReceiverPayloadGetNameAttributeTypeOk(arg CreateAlertConfigReceiverPayloadGetNameAttributeType) (ret CreateAlertConfigReceiverPayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadGetNameAttributeType(arg *CreateAlertConfigReceiverPayloadGetNameAttributeType, val CreateAlertConfigReceiverPayloadGetNameRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadGetNameArgType = string +type CreateAlertConfigReceiverPayloadGetNameRetType = string + +/* + types and functions for opsgenieConfigs +*/ + +// isArray +type CreateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType = *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner +type CreateAlertConfigReceiverPayloadGetOpsgenieConfigsArgType = []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner +type CreateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType = []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner + +func getCreateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeTypeOk(arg CreateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType) (ret CreateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType(arg *CreateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType, val CreateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType) { + *arg = &val +} + +/* + types and functions for webHookConfigs +*/ + +// isArray +type CreateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType = *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner +type CreateAlertConfigReceiverPayloadGetWebHookConfigsArgType = []CreateAlertConfigReceiverPayloadWebHookConfigsInner +type CreateAlertConfigReceiverPayloadGetWebHookConfigsRetType = []CreateAlertConfigReceiverPayloadWebHookConfigsInner + +func getCreateAlertConfigReceiverPayloadGetWebHookConfigsAttributeTypeOk(arg CreateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType) (ret CreateAlertConfigReceiverPayloadGetWebHookConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType(arg *CreateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType, val CreateAlertConfigReceiverPayloadGetWebHookConfigsRetType) { + *arg = &val +} + // CreateAlertConfigReceiverPayload Receivers type CreateAlertConfigReceiverPayload struct { // Email configurations - EmailConfigs *[]CreateAlertConfigReceiverPayloadEmailConfigsInner `json:"emailConfigs,omitempty"` + EmailConfigs CreateAlertConfigReceiverPayloadGetEmailConfigsAttributeType `json:"emailConfigs,omitempty"` // `Additional Validators:` * must be unique * should only include the characters: a-zA-Z0-9- // REQUIRED - Name *string `json:"name"` + Name CreateAlertConfigReceiverPayloadGetNameAttributeType `json:"name"` // Configuration for ops genie. - OpsgenieConfigs *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner `json:"opsgenieConfigs,omitempty"` - WebHookConfigs *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner `json:"webHookConfigs,omitempty"` + OpsgenieConfigs CreateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType `json:"opsgenieConfigs,omitempty"` + WebHookConfigs CreateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType `json:"webHookConfigs,omitempty"` } type _CreateAlertConfigReceiverPayload CreateAlertConfigReceiverPayload @@ -35,9 +116,9 @@ type _CreateAlertConfigReceiverPayload CreateAlertConfigReceiverPayload // 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 { +func NewCreateAlertConfigReceiverPayload(name CreateAlertConfigReceiverPayloadGetNameArgType) *CreateAlertConfigReceiverPayload { this := CreateAlertConfigReceiverPayload{} - this.Name = name + setCreateAlertConfigReceiverPayloadGetNameAttributeType(&this.Name, name) return &this } @@ -50,136 +131,104 @@ func NewCreateAlertConfigReceiverPayloadWithDefaults() *CreateAlertConfigReceive } // 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 +func (o *CreateAlertConfigReceiverPayload) GetEmailConfigs() (res CreateAlertConfigReceiverPayloadGetEmailConfigsRetType) { + res, _ = o.GetEmailConfigsOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayload) GetEmailConfigsOk() (ret CreateAlertConfigReceiverPayloadGetEmailConfigsRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadGetEmailConfigsAttributeTypeOk(o.EmailConfigs) } // 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 + _, ok := o.GetEmailConfigsOk() + return ok } // SetEmailConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadEmailConfigsInner and assigns it to the EmailConfigs field. -func (o *CreateAlertConfigReceiverPayload) SetEmailConfigs(v *[]CreateAlertConfigReceiverPayloadEmailConfigsInner) { - o.EmailConfigs = v +func (o *CreateAlertConfigReceiverPayload) SetEmailConfigs(v CreateAlertConfigReceiverPayloadGetEmailConfigsRetType) { + setCreateAlertConfigReceiverPayloadGetEmailConfigsAttributeType(&o.EmailConfigs, v) } // GetName returns the Name field value -func (o *CreateAlertConfigReceiverPayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *CreateAlertConfigReceiverPayload) GetName() (ret CreateAlertConfigReceiverPayloadGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // 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 +func (o *CreateAlertConfigReceiverPayload) GetNameOk() (ret CreateAlertConfigReceiverPayloadGetNameRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *CreateAlertConfigReceiverPayload) SetName(v *string) { - o.Name = v +func (o *CreateAlertConfigReceiverPayload) SetName(v CreateAlertConfigReceiverPayloadGetNameRetType) { + setCreateAlertConfigReceiverPayloadGetNameAttributeType(&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 +func (o *CreateAlertConfigReceiverPayload) GetOpsgenieConfigs() (res CreateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType) { + res, _ = o.GetOpsgenieConfigsOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayload) GetOpsgenieConfigsOk() (ret CreateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeTypeOk(o.OpsgenieConfigs) } // 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 + _, ok := o.GetOpsgenieConfigsOk() + return ok } // SetOpsgenieConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner and assigns it to the OpsgenieConfigs field. -func (o *CreateAlertConfigReceiverPayload) SetOpsgenieConfigs(v *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) { - o.OpsgenieConfigs = v +func (o *CreateAlertConfigReceiverPayload) SetOpsgenieConfigs(v CreateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType) { + setCreateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType(&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 +func (o *CreateAlertConfigReceiverPayload) GetWebHookConfigs() (res CreateAlertConfigReceiverPayloadGetWebHookConfigsRetType) { + res, _ = o.GetWebHookConfigsOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayload) GetWebHookConfigsOk() (ret CreateAlertConfigReceiverPayloadGetWebHookConfigsRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadGetWebHookConfigsAttributeTypeOk(o.WebHookConfigs) } // 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 + _, ok := o.GetWebHookConfigsOk() + return ok } // 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) SetWebHookConfigs(v CreateAlertConfigReceiverPayloadGetWebHookConfigsRetType) { + setCreateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType(&o.WebHookConfigs, v) } func (o CreateAlertConfigReceiverPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.EmailConfigs) { - toSerialize["emailConfigs"] = o.EmailConfigs + if val, ok := getCreateAlertConfigReceiverPayloadGetEmailConfigsAttributeTypeOk(o.EmailConfigs); ok { + toSerialize["EmailConfigs"] = val + } + if val, ok := getCreateAlertConfigReceiverPayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - toSerialize["name"] = o.Name - if !IsNil(o.OpsgenieConfigs) { - toSerialize["opsgenieConfigs"] = o.OpsgenieConfigs + if val, ok := getCreateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeTypeOk(o.OpsgenieConfigs); ok { + toSerialize["OpsgenieConfigs"] = val } - if !IsNil(o.WebHookConfigs) { - toSerialize["webHookConfigs"] = o.WebHookConfigs + if val, ok := getCreateAlertConfigReceiverPayloadGetWebHookConfigsAttributeTypeOk(o.WebHookConfigs); ok { + toSerialize["WebHookConfigs"] = val } return toSerialize, nil } 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 faf1ead00..d7dc1f7c5 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 @@ -17,20 +17,146 @@ import ( // checks if the CreateAlertConfigReceiverPayloadEmailConfigsInner type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateAlertConfigReceiverPayloadEmailConfigsInner{} +/* + types and functions for authIdentity +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityAttributeType = *string + +func getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityAttributeTypeOk(arg CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityAttributeType) (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityAttributeType(arg *CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityAttributeType, val CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityArgType = string +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityRetType = string + +/* + types and functions for authPassword +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordAttributeType = *string + +func getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordAttributeTypeOk(arg CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordAttributeType) (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordAttributeType(arg *CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordAttributeType, val CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordArgType = string +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordRetType = string + +/* + types and functions for authUsername +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameAttributeType = *string + +func getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameAttributeTypeOk(arg CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameAttributeType) (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameAttributeType(arg *CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameAttributeType, val CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameArgType = string +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameRetType = string + +/* + types and functions for from +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromAttributeType = *string + +func getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromAttributeTypeOk(arg CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromAttributeType) (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromAttributeType(arg *CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromAttributeType, val CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromArgType = string +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromRetType = string + +/* + types and functions for smarthost +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostAttributeType = *string + +func getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostAttributeTypeOk(arg CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostAttributeType) (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostAttributeType(arg *CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostAttributeType, val CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostArgType = string +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostRetType = string + +/* + types and functions for to +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToAttributeType = *string + +func getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetToAttributeTypeOk(arg CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToAttributeType) (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetToAttributeType(arg *CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToAttributeType, val CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToArgType = string +type CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToRetType = string + // CreateAlertConfigReceiverPayloadEmailConfigsInner struct for CreateAlertConfigReceiverPayloadEmailConfigsInner type CreateAlertConfigReceiverPayloadEmailConfigsInner struct { // SMTP authentication information. `Additional Validators:` * must be a syntactically valid email address - AuthIdentity *string `json:"authIdentity,omitempty"` + AuthIdentity CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityAttributeType `json:"authIdentity,omitempty"` // SMTP authentication information. - AuthPassword *string `json:"authPassword,omitempty"` + AuthPassword CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordAttributeType `json:"authPassword,omitempty"` // SMTP authentication information. - AuthUsername *string `json:"authUsername,omitempty"` + AuthUsername CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameAttributeType `json:"authUsername,omitempty"` // The sender address. `Additional Validators:` * must be a syntactically valid email address - From *string `json:"from,omitempty"` + From CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromAttributeType `json:"from,omitempty"` // The SMTP host through which emails are sent. `Additional Validators:` * should only include the characters: a-zA-Z0-9_./@&?:- - Smarthost *string `json:"smarthost,omitempty"` + Smarthost CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostAttributeType `json:"smarthost,omitempty"` // The email address to send notifications to. `Additional Validators:` * must be a syntactically valid email address - To *string `json:"to,omitempty"` + To CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToAttributeType `json:"to,omitempty"` } // NewCreateAlertConfigReceiverPayloadEmailConfigsInner instantiates a new CreateAlertConfigReceiverPayloadEmailConfigsInner object @@ -51,216 +177,162 @@ func NewCreateAlertConfigReceiverPayloadEmailConfigsInnerWithDefaults() *CreateA } // 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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthIdentity() (res CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityRetType) { + res, _ = o.GetAuthIdentityOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthIdentityOk() (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityAttributeTypeOk(o.AuthIdentity) } // 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 + _, ok := o.GetAuthIdentityOk() + return ok } // SetAuthIdentity gets a reference to the given string and assigns it to the AuthIdentity field. -func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetAuthIdentity(v *string) { - o.AuthIdentity = v +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetAuthIdentity(v CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityRetType) { + setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityAttributeType(&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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthPassword() (res CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordRetType) { + res, _ = o.GetAuthPasswordOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthPasswordOk() (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordAttributeTypeOk(o.AuthPassword) } // 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 + _, ok := o.GetAuthPasswordOk() + return ok } // SetAuthPassword gets a reference to the given string and assigns it to the AuthPassword field. -func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetAuthPassword(v *string) { - o.AuthPassword = v +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetAuthPassword(v CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordRetType) { + setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordAttributeType(&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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthUsername() (res CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameRetType) { + res, _ = o.GetAuthUsernameOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetAuthUsernameOk() (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameAttributeTypeOk(o.AuthUsername) } // 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 + _, ok := o.GetAuthUsernameOk() + return ok } // SetAuthUsername gets a reference to the given string and assigns it to the AuthUsername field. -func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetAuthUsername(v *string) { - o.AuthUsername = v +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetAuthUsername(v CreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameRetType) { + setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameAttributeType(&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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetFrom() (res CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromRetType) { + res, _ = o.GetFromOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetFromOk() (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromAttributeTypeOk(o.From) } // 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 + _, ok := o.GetFromOk() + return ok } // SetFrom gets a reference to the given string and assigns it to the From field. -func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetFrom(v *string) { - o.From = v +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetFrom(v CreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromRetType) { + setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromAttributeType(&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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetSmarthost() (res CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostRetType) { + res, _ = o.GetSmarthostOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetSmarthostOk() (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostAttributeTypeOk(o.Smarthost) } // 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 + _, ok := o.GetSmarthostOk() + return ok } // SetSmarthost gets a reference to the given string and assigns it to the Smarthost field. -func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetSmarthost(v *string) { - o.Smarthost = v +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) SetSmarthost(v CreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostRetType) { + setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostAttributeType(&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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetTo() (res CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToRetType) { + res, _ = o.GetToOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadEmailConfigsInner) GetToOk() (ret CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetToAttributeTypeOk(o.To) } // 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 + _, ok := o.GetToOk() + return ok } // 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) SetTo(v CreateAlertConfigReceiverPayloadEmailConfigsInnerGetToRetType) { + setCreateAlertConfigReceiverPayloadEmailConfigsInnerGetToAttributeType(&o.To, v) } func (o CreateAlertConfigReceiverPayloadEmailConfigsInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.AuthIdentity) { - toSerialize["authIdentity"] = o.AuthIdentity + if val, ok := getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthIdentityAttributeTypeOk(o.AuthIdentity); ok { + toSerialize["AuthIdentity"] = val } - if !IsNil(o.AuthPassword) { - toSerialize["authPassword"] = o.AuthPassword + if val, ok := getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthPasswordAttributeTypeOk(o.AuthPassword); ok { + toSerialize["AuthPassword"] = val } - if !IsNil(o.AuthUsername) { - toSerialize["authUsername"] = o.AuthUsername + if val, ok := getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetAuthUsernameAttributeTypeOk(o.AuthUsername); ok { + toSerialize["AuthUsername"] = val } - if !IsNil(o.From) { - toSerialize["from"] = o.From + if val, ok := getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetFromAttributeTypeOk(o.From); ok { + toSerialize["From"] = val } - if !IsNil(o.Smarthost) { - toSerialize["smarthost"] = o.Smarthost + if val, ok := getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetSmarthostAttributeTypeOk(o.Smarthost); ok { + toSerialize["Smarthost"] = val } - if !IsNil(o.To) { - toSerialize["to"] = o.To + if val, ok := getCreateAlertConfigReceiverPayloadEmailConfigsInnerGetToAttributeTypeOk(o.To); ok { + toSerialize["To"] = val } return toSerialize, nil } 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 39ba9905b..009bc1f74 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 @@ -17,14 +17,77 @@ import ( // checks if the CreateAlertConfigReceiverPayloadOpsgenieConfigsInner type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateAlertConfigReceiverPayloadOpsgenieConfigsInner{} +/* + types and functions for apiKey +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyAttributeType = *string + +func getCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyAttributeTypeOk(arg CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyAttributeType) (ret CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyAttributeType(arg *CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyAttributeType, val CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyArgType = string +type CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyRetType = string + +/* + types and functions for apiUrl +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlAttributeType = *string + +func getCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlAttributeTypeOk(arg CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlAttributeType) (ret CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlAttributeType(arg *CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlAttributeType, val CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlArgType = string +type CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlRetType = string + +/* + types and functions for tags +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsAttributeType = *string + +func getCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsAttributeTypeOk(arg CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsAttributeType) (ret CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsAttributeType(arg *CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsAttributeType, val CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsArgType = string +type CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsRetType = string + // 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- - ApiKey *string `json:"apiKey,omitempty"` + ApiKey CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyAttributeType `json:"apiKey,omitempty"` // The host to send OpsGenie API requests to. `Additional Validators:` * must be a syntactically valid url address - ApiUrl *string `json:"apiUrl,omitempty"` + ApiUrl CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlAttributeType `json:"apiUrl,omitempty"` // Comma separated list of tags attached to the notifications. - Tags *string `json:"tags,omitempty"` + Tags CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsAttributeType `json:"tags,omitempty"` } // NewCreateAlertConfigReceiverPayloadOpsgenieConfigsInner instantiates a new CreateAlertConfigReceiverPayloadOpsgenieConfigsInner object @@ -45,111 +108,84 @@ func NewCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerWithDefaults() *Crea } // 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 +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetApiKey() (res CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyRetType) { + res, _ = o.GetApiKeyOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetApiKeyOk() (ret CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyAttributeTypeOk(o.ApiKey) } // 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 + _, ok := o.GetApiKeyOk() + return ok } // SetApiKey gets a reference to the given string and assigns it to the ApiKey field. -func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) SetApiKey(v *string) { - o.ApiKey = v +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) SetApiKey(v CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyRetType) { + setCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyAttributeType(&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 +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetApiUrl() (res CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlRetType) { + res, _ = o.GetApiUrlOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetApiUrlOk() (ret CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlAttributeTypeOk(o.ApiUrl) } // 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 + _, ok := o.GetApiUrlOk() + return ok } // SetApiUrl gets a reference to the given string and assigns it to the ApiUrl field. -func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) SetApiUrl(v *string) { - o.ApiUrl = v +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) SetApiUrl(v CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlRetType) { + setCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlAttributeType(&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 +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetTags() (res CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsRetType) { + res, _ = o.GetTagsOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) GetTagsOk() (ret CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsAttributeTypeOk(o.Tags) } // 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 + _, ok := o.GetTagsOk() + return ok } // 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) SetTags(v CreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsRetType) { + setCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsAttributeType(&o.Tags, v) } func (o CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ApiKey) { - toSerialize["apiKey"] = o.ApiKey + if val, ok := getCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiKeyAttributeTypeOk(o.ApiKey); ok { + toSerialize["ApiKey"] = val } - if !IsNil(o.ApiUrl) { - toSerialize["apiUrl"] = o.ApiUrl + if val, ok := getCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetApiUrlAttributeTypeOk(o.ApiUrl); ok { + toSerialize["ApiUrl"] = val } - if !IsNil(o.Tags) { - toSerialize["tags"] = o.Tags + if val, ok := getCreateAlertConfigReceiverPayloadOpsgenieConfigsInnerGetTagsAttributeTypeOk(o.Tags); ok { + toSerialize["Tags"] = val } return toSerialize, nil } 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 576f40c0c..344528200 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 @@ -17,12 +17,53 @@ import ( // checks if the CreateAlertConfigReceiverPayloadWebHookConfigsInner type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateAlertConfigReceiverPayloadWebHookConfigsInner{} +/* + types and functions for msTeams +*/ + +// isBoolean +type CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsAttributeType = *bool +type CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsArgType = bool +type CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsRetType = bool + +func getCreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsAttributeTypeOk(arg CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsAttributeType) (ret CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsAttributeType(arg *CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsAttributeType, val CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsRetType) { + *arg = &val +} + +/* + types and functions for url +*/ + +// isNotNullableString +type CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlAttributeType = *string + +func getCreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlAttributeTypeOk(arg CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlAttributeType) (ret CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlAttributeType(arg *CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlAttributeType, val CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlRetType) { + *arg = &val +} + +type CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlArgType = string +type CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlRetType = string + // 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 - MsTeams *bool `json:"msTeams,omitempty"` + MsTeams CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsAttributeType `json:"msTeams,omitempty"` // The endpoint to send HTTP POST requests to. `Additional Validators:` * must be a syntactically valid url address - Url *string `json:"url,omitempty"` + Url CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlAttributeType `json:"url,omitempty"` } // NewCreateAlertConfigReceiverPayloadWebHookConfigsInner instantiates a new CreateAlertConfigReceiverPayloadWebHookConfigsInner object @@ -31,8 +72,6 @@ type CreateAlertConfigReceiverPayloadWebHookConfigsInner struct { // will change when the set of required properties is changed func NewCreateAlertConfigReceiverPayloadWebHookConfigsInner() *CreateAlertConfigReceiverPayloadWebHookConfigsInner { this := CreateAlertConfigReceiverPayloadWebHookConfigsInner{} - var msTeams bool = false - this.MsTeams = &msTeams return &this } @@ -47,76 +86,58 @@ func NewCreateAlertConfigReceiverPayloadWebHookConfigsInnerWithDefaults() *Creat } // 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 +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) GetMsTeams() (res CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsRetType) { + res, _ = o.GetMsTeamsOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) GetMsTeamsOk() (ret CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsAttributeTypeOk(o.MsTeams) } // 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 + _, ok := o.GetMsTeamsOk() + return ok } // SetMsTeams gets a reference to the given bool and assigns it to the MsTeams field. -func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) SetMsTeams(v *bool) { - o.MsTeams = v +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) SetMsTeams(v CreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsRetType) { + setCreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsAttributeType(&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 +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) GetUrl() (res CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlRetType) { + res, _ = o.GetUrlOk() + return } // 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 +func (o *CreateAlertConfigReceiverPayloadWebHookConfigsInner) GetUrlOk() (ret CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlRetType, ok bool) { + return getCreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlAttributeTypeOk(o.Url) } // 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 + _, ok := o.GetUrlOk() + return ok } // 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) SetUrl(v CreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlRetType) { + setCreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlAttributeType(&o.Url, v) } func (o CreateAlertConfigReceiverPayloadWebHookConfigsInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.MsTeams) { - toSerialize["msTeams"] = o.MsTeams + if val, ok := getCreateAlertConfigReceiverPayloadWebHookConfigsInnergetMsTeamsAttributeTypeOk(o.MsTeams); ok { + toSerialize["MsTeams"] = val } - if !IsNil(o.Url) { - toSerialize["url"] = o.Url + if val, ok := getCreateAlertConfigReceiverPayloadWebHookConfigsInnerGetUrlAttributeTypeOk(o.Url); ok { + toSerialize["Url"] = val } return toSerialize, nil } diff --git a/services/observability/model_create_alert_config_route_payload.go b/services/observability/model_create_alert_config_route_payload.go index 87c5d5280..c10f8a9a1 100644 --- a/services/observability/model_create_alert_config_route_payload.go +++ b/services/observability/model_create_alert_config_route_payload.go @@ -17,27 +17,211 @@ import ( // checks if the CreateAlertConfigRoutePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateAlertConfigRoutePayload{} +/* + types and functions for groupBy +*/ + +// isArray +type CreateAlertConfigRoutePayloadGetGroupByAttributeType = *[]string +type CreateAlertConfigRoutePayloadGetGroupByArgType = []string +type CreateAlertConfigRoutePayloadGetGroupByRetType = []string + +func getCreateAlertConfigRoutePayloadGetGroupByAttributeTypeOk(arg CreateAlertConfigRoutePayloadGetGroupByAttributeType) (ret CreateAlertConfigRoutePayloadGetGroupByRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadGetGroupByAttributeType(arg *CreateAlertConfigRoutePayloadGetGroupByAttributeType, val CreateAlertConfigRoutePayloadGetGroupByRetType) { + *arg = &val +} + +/* + types and functions for groupInterval +*/ + +// isNotNullableString +type CreateAlertConfigRoutePayloadGetGroupIntervalAttributeType = *string + +func getCreateAlertConfigRoutePayloadGetGroupIntervalAttributeTypeOk(arg CreateAlertConfigRoutePayloadGetGroupIntervalAttributeType) (ret CreateAlertConfigRoutePayloadGetGroupIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadGetGroupIntervalAttributeType(arg *CreateAlertConfigRoutePayloadGetGroupIntervalAttributeType, val CreateAlertConfigRoutePayloadGetGroupIntervalRetType) { + *arg = &val +} + +type CreateAlertConfigRoutePayloadGetGroupIntervalArgType = string +type CreateAlertConfigRoutePayloadGetGroupIntervalRetType = string + +/* + types and functions for groupWait +*/ + +// isNotNullableString +type CreateAlertConfigRoutePayloadGetGroupWaitAttributeType = *string + +func getCreateAlertConfigRoutePayloadGetGroupWaitAttributeTypeOk(arg CreateAlertConfigRoutePayloadGetGroupWaitAttributeType) (ret CreateAlertConfigRoutePayloadGetGroupWaitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadGetGroupWaitAttributeType(arg *CreateAlertConfigRoutePayloadGetGroupWaitAttributeType, val CreateAlertConfigRoutePayloadGetGroupWaitRetType) { + *arg = &val +} + +type CreateAlertConfigRoutePayloadGetGroupWaitArgType = string +type CreateAlertConfigRoutePayloadGetGroupWaitRetType = string + +/* + types and functions for match +*/ + +// isFreeform +type CreateAlertConfigRoutePayloadGetMatchAttributeType = *map[string]interface{} +type CreateAlertConfigRoutePayloadGetMatchArgType = map[string]interface{} +type CreateAlertConfigRoutePayloadGetMatchRetType = map[string]interface{} + +func getCreateAlertConfigRoutePayloadGetMatchAttributeTypeOk(arg CreateAlertConfigRoutePayloadGetMatchAttributeType) (ret CreateAlertConfigRoutePayloadGetMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadGetMatchAttributeType(arg *CreateAlertConfigRoutePayloadGetMatchAttributeType, val CreateAlertConfigRoutePayloadGetMatchRetType) { + *arg = &val +} + +/* + types and functions for matchRe +*/ + +// isFreeform +type CreateAlertConfigRoutePayloadGetMatchReAttributeType = *map[string]interface{} +type CreateAlertConfigRoutePayloadGetMatchReArgType = map[string]interface{} +type CreateAlertConfigRoutePayloadGetMatchReRetType = map[string]interface{} + +func getCreateAlertConfigRoutePayloadGetMatchReAttributeTypeOk(arg CreateAlertConfigRoutePayloadGetMatchReAttributeType) (ret CreateAlertConfigRoutePayloadGetMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadGetMatchReAttributeType(arg *CreateAlertConfigRoutePayloadGetMatchReAttributeType, val CreateAlertConfigRoutePayloadGetMatchReRetType) { + *arg = &val +} + +/* + types and functions for matchers +*/ + +// isArray +type CreateAlertConfigRoutePayloadGetMatchersAttributeType = *[]string +type CreateAlertConfigRoutePayloadGetMatchersArgType = []string +type CreateAlertConfigRoutePayloadGetMatchersRetType = []string + +func getCreateAlertConfigRoutePayloadGetMatchersAttributeTypeOk(arg CreateAlertConfigRoutePayloadGetMatchersAttributeType) (ret CreateAlertConfigRoutePayloadGetMatchersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadGetMatchersAttributeType(arg *CreateAlertConfigRoutePayloadGetMatchersAttributeType, val CreateAlertConfigRoutePayloadGetMatchersRetType) { + *arg = &val +} + +/* + types and functions for receiver +*/ + +// isNotNullableString +type CreateAlertConfigRoutePayloadGetReceiverAttributeType = *string + +func getCreateAlertConfigRoutePayloadGetReceiverAttributeTypeOk(arg CreateAlertConfigRoutePayloadGetReceiverAttributeType) (ret CreateAlertConfigRoutePayloadGetReceiverRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadGetReceiverAttributeType(arg *CreateAlertConfigRoutePayloadGetReceiverAttributeType, val CreateAlertConfigRoutePayloadGetReceiverRetType) { + *arg = &val +} + +type CreateAlertConfigRoutePayloadGetReceiverArgType = string +type CreateAlertConfigRoutePayloadGetReceiverRetType = string + +/* + types and functions for repeatInterval +*/ + +// isNotNullableString +type CreateAlertConfigRoutePayloadGetRepeatIntervalAttributeType = *string + +func getCreateAlertConfigRoutePayloadGetRepeatIntervalAttributeTypeOk(arg CreateAlertConfigRoutePayloadGetRepeatIntervalAttributeType) (ret CreateAlertConfigRoutePayloadGetRepeatIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadGetRepeatIntervalAttributeType(arg *CreateAlertConfigRoutePayloadGetRepeatIntervalAttributeType, val CreateAlertConfigRoutePayloadGetRepeatIntervalRetType) { + *arg = &val +} + +type CreateAlertConfigRoutePayloadGetRepeatIntervalArgType = string +type CreateAlertConfigRoutePayloadGetRepeatIntervalRetType = string + +/* + types and functions for routes +*/ + +// isArray +type CreateAlertConfigRoutePayloadGetRoutesAttributeType = *[]CreateAlertConfigRoutePayloadRoutesInner +type CreateAlertConfigRoutePayloadGetRoutesArgType = []CreateAlertConfigRoutePayloadRoutesInner +type CreateAlertConfigRoutePayloadGetRoutesRetType = []CreateAlertConfigRoutePayloadRoutesInner + +func getCreateAlertConfigRoutePayloadGetRoutesAttributeTypeOk(arg CreateAlertConfigRoutePayloadGetRoutesAttributeType) (ret CreateAlertConfigRoutePayloadGetRoutesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadGetRoutesAttributeType(arg *CreateAlertConfigRoutePayloadGetRoutesAttributeType, val CreateAlertConfigRoutePayloadGetRoutesRetType) { + *arg = &val +} + // 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. - GroupBy *[]string `json:"groupBy,omitempty"` + GroupBy CreateAlertConfigRoutePayloadGetGroupByAttributeType `json:"groupBy,omitempty"` // How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.) `Additional Validators:` * must be a valid time format - GroupInterval *string `json:"groupInterval,omitempty"` + GroupInterval CreateAlertConfigRoutePayloadGetGroupIntervalAttributeType `json:"groupInterval,omitempty"` // How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.) `Additional Validators:` * must be a valid time format - GroupWait *string `json:"groupWait,omitempty"` + GroupWait CreateAlertConfigRoutePayloadGetGroupWaitAttributeType `json:"groupWait,omitempty"` // map of key:value. A set of equality matchers an alert has to fulfill to match the node. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters * key and values should only include the characters: a-zA-Z0-9_./@&?:- - Match *map[string]interface{} `json:"match,omitempty"` + Match CreateAlertConfigRoutePayloadGetMatchAttributeType `json:"match,omitempty"` // map of key:value. A set of regex-matchers an alert has to fulfill to match the node. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters - MatchRe *map[string]interface{} `json:"matchRe,omitempty"` + MatchRe CreateAlertConfigRoutePayloadGetMatchReAttributeType `json:"matchRe,omitempty"` // A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens: * A valid Prometheus label name. * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors. * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters - Matchers *[]string `json:"matchers,omitempty"` + Matchers CreateAlertConfigRoutePayloadGetMatchersAttributeType `json:"matchers,omitempty"` // Receiver that should be one item of receivers `Additional Validators:` * must be a in name of receivers // REQUIRED - Receiver *string `json:"receiver"` + Receiver CreateAlertConfigRoutePayloadGetReceiverAttributeType `json:"receiver"` // How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more). `Additional Validators:` * must be a valid time format - RepeatInterval *string `json:"repeatInterval,omitempty"` + RepeatInterval CreateAlertConfigRoutePayloadGetRepeatIntervalAttributeType `json:"repeatInterval,omitempty"` // Zero or more child routes. - Routes *[]CreateAlertConfigRoutePayloadRoutesInner `json:"routes,omitempty"` + Routes CreateAlertConfigRoutePayloadGetRoutesAttributeType `json:"routes,omitempty"` } type _CreateAlertConfigRoutePayload CreateAlertConfigRoutePayload @@ -46,15 +230,9 @@ type _CreateAlertConfigRoutePayload CreateAlertConfigRoutePayload // 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 { +func NewCreateAlertConfigRoutePayload(receiver CreateAlertConfigRoutePayloadGetReceiverArgType) *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 + setCreateAlertConfigRoutePayloadGetReceiverAttributeType(&this.Receiver, receiver) return &this } @@ -73,311 +251,234 @@ func NewCreateAlertConfigRoutePayloadWithDefaults() *CreateAlertConfigRoutePaylo } // 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 +func (o *CreateAlertConfigRoutePayload) GetGroupBy() (res CreateAlertConfigRoutePayloadGetGroupByRetType) { + res, _ = o.GetGroupByOk() + return } // GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayload) GetGroupByOk() (*[]string, bool) { - if o == nil || IsNil(o.GroupBy) { - return nil, false - } - return o.GroupBy, true +func (o *CreateAlertConfigRoutePayload) GetGroupByOk() (ret CreateAlertConfigRoutePayloadGetGroupByRetType, ok bool) { + return getCreateAlertConfigRoutePayloadGetGroupByAttributeTypeOk(o.GroupBy) } // 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 + _, ok := o.GetGroupByOk() + return ok } // SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. -func (o *CreateAlertConfigRoutePayload) SetGroupBy(v *[]string) { - o.GroupBy = v +func (o *CreateAlertConfigRoutePayload) SetGroupBy(v CreateAlertConfigRoutePayloadGetGroupByRetType) { + setCreateAlertConfigRoutePayloadGetGroupByAttributeType(&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 +func (o *CreateAlertConfigRoutePayload) GetGroupInterval() (res CreateAlertConfigRoutePayloadGetGroupIntervalRetType) { + res, _ = o.GetGroupIntervalOk() + return } // GetGroupIntervalOk returns a tuple with the GroupInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayload) GetGroupIntervalOk() (*string, bool) { - if o == nil || IsNil(o.GroupInterval) { - return nil, false - } - return o.GroupInterval, true +func (o *CreateAlertConfigRoutePayload) GetGroupIntervalOk() (ret CreateAlertConfigRoutePayloadGetGroupIntervalRetType, ok bool) { + return getCreateAlertConfigRoutePayloadGetGroupIntervalAttributeTypeOk(o.GroupInterval) } // 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 + _, ok := o.GetGroupIntervalOk() + return ok } // SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. -func (o *CreateAlertConfigRoutePayload) SetGroupInterval(v *string) { - o.GroupInterval = v +func (o *CreateAlertConfigRoutePayload) SetGroupInterval(v CreateAlertConfigRoutePayloadGetGroupIntervalRetType) { + setCreateAlertConfigRoutePayloadGetGroupIntervalAttributeType(&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 +func (o *CreateAlertConfigRoutePayload) GetGroupWait() (res CreateAlertConfigRoutePayloadGetGroupWaitRetType) { + res, _ = o.GetGroupWaitOk() + return } // GetGroupWaitOk returns a tuple with the GroupWait field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayload) GetGroupWaitOk() (*string, bool) { - if o == nil || IsNil(o.GroupWait) { - return nil, false - } - return o.GroupWait, true +func (o *CreateAlertConfigRoutePayload) GetGroupWaitOk() (ret CreateAlertConfigRoutePayloadGetGroupWaitRetType, ok bool) { + return getCreateAlertConfigRoutePayloadGetGroupWaitAttributeTypeOk(o.GroupWait) } // 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 + _, ok := o.GetGroupWaitOk() + return ok } // SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. -func (o *CreateAlertConfigRoutePayload) SetGroupWait(v *string) { - o.GroupWait = v +func (o *CreateAlertConfigRoutePayload) SetGroupWait(v CreateAlertConfigRoutePayloadGetGroupWaitRetType) { + setCreateAlertConfigRoutePayloadGetGroupWaitAttributeType(&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 +func (o *CreateAlertConfigRoutePayload) GetMatch() (res CreateAlertConfigRoutePayloadGetMatchRetType) { + res, _ = o.GetMatchOk() + return } // GetMatchOk returns a tuple with the Match field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayload) GetMatchOk() (*map[string]interface{}, bool) { - if o == nil || IsNil(o.Match) { - return &map[string]interface{}{}, false - } - return o.Match, true +func (o *CreateAlertConfigRoutePayload) GetMatchOk() (ret CreateAlertConfigRoutePayloadGetMatchRetType, ok bool) { + return getCreateAlertConfigRoutePayloadGetMatchAttributeTypeOk(o.Match) } // 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 + _, ok := o.GetMatchOk() + return ok } // 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 +func (o *CreateAlertConfigRoutePayload) SetMatch(v CreateAlertConfigRoutePayloadGetMatchRetType) { + setCreateAlertConfigRoutePayloadGetMatchAttributeType(&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 +func (o *CreateAlertConfigRoutePayload) GetMatchRe() (res CreateAlertConfigRoutePayloadGetMatchReRetType) { + res, _ = o.GetMatchReOk() + return } // GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayload) GetMatchReOk() (*map[string]interface{}, bool) { - if o == nil || IsNil(o.MatchRe) { - return &map[string]interface{}{}, false - } - return o.MatchRe, true +func (o *CreateAlertConfigRoutePayload) GetMatchReOk() (ret CreateAlertConfigRoutePayloadGetMatchReRetType, ok bool) { + return getCreateAlertConfigRoutePayloadGetMatchReAttributeTypeOk(o.MatchRe) } // 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 + _, ok := o.GetMatchReOk() + return ok } // 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 +func (o *CreateAlertConfigRoutePayload) SetMatchRe(v CreateAlertConfigRoutePayloadGetMatchReRetType) { + setCreateAlertConfigRoutePayloadGetMatchReAttributeType(&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 +func (o *CreateAlertConfigRoutePayload) GetMatchers() (res CreateAlertConfigRoutePayloadGetMatchersRetType) { + res, _ = o.GetMatchersOk() + return } // GetMatchersOk returns a tuple with the Matchers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayload) GetMatchersOk() (*[]string, bool) { - if o == nil || IsNil(o.Matchers) { - return nil, false - } - return o.Matchers, true +func (o *CreateAlertConfigRoutePayload) GetMatchersOk() (ret CreateAlertConfigRoutePayloadGetMatchersRetType, ok bool) { + return getCreateAlertConfigRoutePayloadGetMatchersAttributeTypeOk(o.Matchers) } // 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 + _, ok := o.GetMatchersOk() + return ok } // SetMatchers gets a reference to the given []string and assigns it to the Matchers field. -func (o *CreateAlertConfigRoutePayload) SetMatchers(v *[]string) { - o.Matchers = v +func (o *CreateAlertConfigRoutePayload) SetMatchers(v CreateAlertConfigRoutePayloadGetMatchersRetType) { + setCreateAlertConfigRoutePayloadGetMatchersAttributeType(&o.Matchers, v) } // GetReceiver returns the Receiver field value -func (o *CreateAlertConfigRoutePayload) GetReceiver() *string { - if o == nil || IsNil(o.Receiver) { - var ret *string - return ret - } - - return o.Receiver +func (o *CreateAlertConfigRoutePayload) GetReceiver() (ret CreateAlertConfigRoutePayloadGetReceiverRetType) { + ret, _ = o.GetReceiverOk() + return ret } // 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 +func (o *CreateAlertConfigRoutePayload) GetReceiverOk() (ret CreateAlertConfigRoutePayloadGetReceiverRetType, ok bool) { + return getCreateAlertConfigRoutePayloadGetReceiverAttributeTypeOk(o.Receiver) } // SetReceiver sets field value -func (o *CreateAlertConfigRoutePayload) SetReceiver(v *string) { - o.Receiver = v +func (o *CreateAlertConfigRoutePayload) SetReceiver(v CreateAlertConfigRoutePayloadGetReceiverRetType) { + setCreateAlertConfigRoutePayloadGetReceiverAttributeType(&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 +func (o *CreateAlertConfigRoutePayload) GetRepeatInterval() (res CreateAlertConfigRoutePayloadGetRepeatIntervalRetType) { + res, _ = o.GetRepeatIntervalOk() + return } // GetRepeatIntervalOk returns a tuple with the RepeatInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayload) GetRepeatIntervalOk() (*string, bool) { - if o == nil || IsNil(o.RepeatInterval) { - return nil, false - } - return o.RepeatInterval, true +func (o *CreateAlertConfigRoutePayload) GetRepeatIntervalOk() (ret CreateAlertConfigRoutePayloadGetRepeatIntervalRetType, ok bool) { + return getCreateAlertConfigRoutePayloadGetRepeatIntervalAttributeTypeOk(o.RepeatInterval) } // 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 + _, ok := o.GetRepeatIntervalOk() + return ok } // SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. -func (o *CreateAlertConfigRoutePayload) SetRepeatInterval(v *string) { - o.RepeatInterval = v +func (o *CreateAlertConfigRoutePayload) SetRepeatInterval(v CreateAlertConfigRoutePayloadGetRepeatIntervalRetType) { + setCreateAlertConfigRoutePayloadGetRepeatIntervalAttributeType(&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 +func (o *CreateAlertConfigRoutePayload) GetRoutes() (res CreateAlertConfigRoutePayloadGetRoutesRetType) { + res, _ = o.GetRoutesOk() + return } // GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayload) GetRoutesOk() (*[]CreateAlertConfigRoutePayloadRoutesInner, bool) { - if o == nil || IsNil(o.Routes) { - return nil, false - } - return o.Routes, true +func (o *CreateAlertConfigRoutePayload) GetRoutesOk() (ret CreateAlertConfigRoutePayloadGetRoutesRetType, ok bool) { + return getCreateAlertConfigRoutePayloadGetRoutesAttributeTypeOk(o.Routes) } // 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 + _, ok := o.GetRoutesOk() + return ok } // 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) SetRoutes(v CreateAlertConfigRoutePayloadGetRoutesRetType) { + setCreateAlertConfigRoutePayloadGetRoutesAttributeType(&o.Routes, v) } func (o CreateAlertConfigRoutePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.GroupBy) { - toSerialize["groupBy"] = o.GroupBy + if val, ok := getCreateAlertConfigRoutePayloadGetGroupByAttributeTypeOk(o.GroupBy); ok { + toSerialize["GroupBy"] = val + } + if val, ok := getCreateAlertConfigRoutePayloadGetGroupIntervalAttributeTypeOk(o.GroupInterval); ok { + toSerialize["GroupInterval"] = val } - if !IsNil(o.GroupInterval) { - toSerialize["groupInterval"] = o.GroupInterval + if val, ok := getCreateAlertConfigRoutePayloadGetGroupWaitAttributeTypeOk(o.GroupWait); ok { + toSerialize["GroupWait"] = val } - if !IsNil(o.GroupWait) { - toSerialize["groupWait"] = o.GroupWait + if val, ok := getCreateAlertConfigRoutePayloadGetMatchAttributeTypeOk(o.Match); ok { + toSerialize["Match"] = val } - if !IsNil(o.Match) { - toSerialize["match"] = o.Match + if val, ok := getCreateAlertConfigRoutePayloadGetMatchReAttributeTypeOk(o.MatchRe); ok { + toSerialize["MatchRe"] = val } - if !IsNil(o.MatchRe) { - toSerialize["matchRe"] = o.MatchRe + if val, ok := getCreateAlertConfigRoutePayloadGetMatchersAttributeTypeOk(o.Matchers); ok { + toSerialize["Matchers"] = val } - if !IsNil(o.Matchers) { - toSerialize["matchers"] = o.Matchers + if val, ok := getCreateAlertConfigRoutePayloadGetReceiverAttributeTypeOk(o.Receiver); ok { + toSerialize["Receiver"] = val } - toSerialize["receiver"] = o.Receiver - if !IsNil(o.RepeatInterval) { - toSerialize["repeatInterval"] = o.RepeatInterval + if val, ok := getCreateAlertConfigRoutePayloadGetRepeatIntervalAttributeTypeOk(o.RepeatInterval); ok { + toSerialize["RepeatInterval"] = val } - if !IsNil(o.Routes) { - toSerialize["routes"] = o.Routes + if val, ok := getCreateAlertConfigRoutePayloadGetRoutesAttributeTypeOk(o.Routes); ok { + toSerialize["Routes"] = val } return toSerialize, nil } 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 d382cb0a4..102015da2 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 @@ -17,23 +17,187 @@ import ( // checks if the CreateAlertConfigRoutePayloadRoutesInner type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateAlertConfigRoutePayloadRoutesInner{} +/* + types and functions for groupBy +*/ + +// isArray +type CreateAlertConfigRoutePayloadRoutesInnerGetGroupByAttributeType = *[]string +type CreateAlertConfigRoutePayloadRoutesInnerGetGroupByArgType = []string +type CreateAlertConfigRoutePayloadRoutesInnerGetGroupByRetType = []string + +func getCreateAlertConfigRoutePayloadRoutesInnerGetGroupByAttributeTypeOk(arg CreateAlertConfigRoutePayloadRoutesInnerGetGroupByAttributeType) (ret CreateAlertConfigRoutePayloadRoutesInnerGetGroupByRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadRoutesInnerGetGroupByAttributeType(arg *CreateAlertConfigRoutePayloadRoutesInnerGetGroupByAttributeType, val CreateAlertConfigRoutePayloadRoutesInnerGetGroupByRetType) { + *arg = &val +} + +/* + types and functions for groupInterval +*/ + +// isNotNullableString +type CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalAttributeType = *string + +func getCreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalAttributeTypeOk(arg CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalAttributeType) (ret CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalAttributeType(arg *CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalAttributeType, val CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalRetType) { + *arg = &val +} + +type CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalArgType = string +type CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalRetType = string + +/* + types and functions for groupWait +*/ + +// isNotNullableString +type CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitAttributeType = *string + +func getCreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitAttributeTypeOk(arg CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitAttributeType) (ret CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitAttributeType(arg *CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitAttributeType, val CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitRetType) { + *arg = &val +} + +type CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitArgType = string +type CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitRetType = string + +/* + types and functions for match +*/ + +// isFreeform +type CreateAlertConfigRoutePayloadRoutesInnerGetMatchAttributeType = *map[string]interface{} +type CreateAlertConfigRoutePayloadRoutesInnerGetMatchArgType = map[string]interface{} +type CreateAlertConfigRoutePayloadRoutesInnerGetMatchRetType = map[string]interface{} + +func getCreateAlertConfigRoutePayloadRoutesInnerGetMatchAttributeTypeOk(arg CreateAlertConfigRoutePayloadRoutesInnerGetMatchAttributeType) (ret CreateAlertConfigRoutePayloadRoutesInnerGetMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadRoutesInnerGetMatchAttributeType(arg *CreateAlertConfigRoutePayloadRoutesInnerGetMatchAttributeType, val CreateAlertConfigRoutePayloadRoutesInnerGetMatchRetType) { + *arg = &val +} + +/* + types and functions for matchRe +*/ + +// isFreeform +type CreateAlertConfigRoutePayloadRoutesInnerGetMatchReAttributeType = *map[string]interface{} +type CreateAlertConfigRoutePayloadRoutesInnerGetMatchReArgType = map[string]interface{} +type CreateAlertConfigRoutePayloadRoutesInnerGetMatchReRetType = map[string]interface{} + +func getCreateAlertConfigRoutePayloadRoutesInnerGetMatchReAttributeTypeOk(arg CreateAlertConfigRoutePayloadRoutesInnerGetMatchReAttributeType) (ret CreateAlertConfigRoutePayloadRoutesInnerGetMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadRoutesInnerGetMatchReAttributeType(arg *CreateAlertConfigRoutePayloadRoutesInnerGetMatchReAttributeType, val CreateAlertConfigRoutePayloadRoutesInnerGetMatchReRetType) { + *arg = &val +} + +/* + types and functions for receiver +*/ + +// isNotNullableString +type CreateAlertConfigRoutePayloadRoutesInnerGetReceiverAttributeType = *string + +func getCreateAlertConfigRoutePayloadRoutesInnerGetReceiverAttributeTypeOk(arg CreateAlertConfigRoutePayloadRoutesInnerGetReceiverAttributeType) (ret CreateAlertConfigRoutePayloadRoutesInnerGetReceiverRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadRoutesInnerGetReceiverAttributeType(arg *CreateAlertConfigRoutePayloadRoutesInnerGetReceiverAttributeType, val CreateAlertConfigRoutePayloadRoutesInnerGetReceiverRetType) { + *arg = &val +} + +type CreateAlertConfigRoutePayloadRoutesInnerGetReceiverArgType = string +type CreateAlertConfigRoutePayloadRoutesInnerGetReceiverRetType = string + +/* + types and functions for repeatInterval +*/ + +// isNotNullableString +type CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalAttributeType = *string + +func getCreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalAttributeTypeOk(arg CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalAttributeType) (ret CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalAttributeType(arg *CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalAttributeType, val CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalRetType) { + *arg = &val +} + +type CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalArgType = string +type CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalRetType = string + +/* + types and functions for routes +*/ + +// isArray +type CreateAlertConfigRoutePayloadRoutesInnerGetRoutesAttributeType = *[]map[string]interface{} +type CreateAlertConfigRoutePayloadRoutesInnerGetRoutesArgType = []map[string]interface{} +type CreateAlertConfigRoutePayloadRoutesInnerGetRoutesRetType = []map[string]interface{} + +func getCreateAlertConfigRoutePayloadRoutesInnerGetRoutesAttributeTypeOk(arg CreateAlertConfigRoutePayloadRoutesInnerGetRoutesAttributeType) (ret CreateAlertConfigRoutePayloadRoutesInnerGetRoutesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAlertConfigRoutePayloadRoutesInnerGetRoutesAttributeType(arg *CreateAlertConfigRoutePayloadRoutesInnerGetRoutesAttributeType, val CreateAlertConfigRoutePayloadRoutesInnerGetRoutesRetType) { + *arg = &val +} + // CreateAlertConfigRoutePayloadRoutesInner As in one level above type CreateAlertConfigRoutePayloadRoutesInner struct { - GroupBy *[]string `json:"groupBy,omitempty"` + GroupBy CreateAlertConfigRoutePayloadRoutesInnerGetGroupByAttributeType `json:"groupBy,omitempty"` // As in one level above - GroupInterval *string `json:"groupInterval,omitempty"` + GroupInterval CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalAttributeType `json:"groupInterval,omitempty"` // As in one level above - GroupWait *string `json:"groupWait,omitempty"` + GroupWait CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitAttributeType `json:"groupWait,omitempty"` // As in one level above - Match *map[string]interface{} `json:"match,omitempty"` + Match CreateAlertConfigRoutePayloadRoutesInnerGetMatchAttributeType `json:"match,omitempty"` // As in one level above - MatchRe *map[string]interface{} `json:"matchRe,omitempty"` + MatchRe CreateAlertConfigRoutePayloadRoutesInnerGetMatchReAttributeType `json:"matchRe,omitempty"` // As in one level above - Receiver *string `json:"receiver,omitempty"` + Receiver CreateAlertConfigRoutePayloadRoutesInnerGetReceiverAttributeType `json:"receiver,omitempty"` // As in one level above - RepeatInterval *string `json:"repeatInterval,omitempty"` + RepeatInterval CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalAttributeType `json:"repeatInterval,omitempty"` // Another child routes - Routes *[]map[string]interface{} `json:"routes,omitempty"` + Routes CreateAlertConfigRoutePayloadRoutesInnerGetRoutesAttributeType `json:"routes,omitempty"` } // NewCreateAlertConfigRoutePayloadRoutesInner instantiates a new CreateAlertConfigRoutePayloadRoutesInner object @@ -54,286 +218,214 @@ func NewCreateAlertConfigRoutePayloadRoutesInnerWithDefaults() *CreateAlertConfi } // 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 +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupBy() (res CreateAlertConfigRoutePayloadRoutesInnerGetGroupByRetType) { + res, _ = o.GetGroupByOk() + return } // GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupByOk() (*[]string, bool) { - if o == nil || IsNil(o.GroupBy) { - return nil, false - } - return o.GroupBy, true +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupByOk() (ret CreateAlertConfigRoutePayloadRoutesInnerGetGroupByRetType, ok bool) { + return getCreateAlertConfigRoutePayloadRoutesInnerGetGroupByAttributeTypeOk(o.GroupBy) } // 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 + _, ok := o.GetGroupByOk() + return ok } // SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. -func (o *CreateAlertConfigRoutePayloadRoutesInner) SetGroupBy(v *[]string) { - o.GroupBy = v +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetGroupBy(v CreateAlertConfigRoutePayloadRoutesInnerGetGroupByRetType) { + setCreateAlertConfigRoutePayloadRoutesInnerGetGroupByAttributeType(&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 +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupInterval() (res CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalRetType) { + res, _ = o.GetGroupIntervalOk() + return } // GetGroupIntervalOk returns a tuple with the GroupInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupIntervalOk() (*string, bool) { - if o == nil || IsNil(o.GroupInterval) { - return nil, false - } - return o.GroupInterval, true +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupIntervalOk() (ret CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalRetType, ok bool) { + return getCreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalAttributeTypeOk(o.GroupInterval) } // 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 + _, ok := o.GetGroupIntervalOk() + return ok } // SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. -func (o *CreateAlertConfigRoutePayloadRoutesInner) SetGroupInterval(v *string) { - o.GroupInterval = v +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetGroupInterval(v CreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalRetType) { + setCreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalAttributeType(&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 +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupWait() (res CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitRetType) { + res, _ = o.GetGroupWaitOk() + return } // GetGroupWaitOk returns a tuple with the GroupWait field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupWaitOk() (*string, bool) { - if o == nil || IsNil(o.GroupWait) { - return nil, false - } - return o.GroupWait, true +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetGroupWaitOk() (ret CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitRetType, ok bool) { + return getCreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitAttributeTypeOk(o.GroupWait) } // 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 + _, ok := o.GetGroupWaitOk() + return ok } // SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. -func (o *CreateAlertConfigRoutePayloadRoutesInner) SetGroupWait(v *string) { - o.GroupWait = v +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetGroupWait(v CreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitRetType) { + setCreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitAttributeType(&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 +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetMatch() (res CreateAlertConfigRoutePayloadRoutesInnerGetMatchRetType) { + res, _ = o.GetMatchOk() + return } // GetMatchOk returns a tuple with the Match field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayloadRoutesInner) GetMatchOk() (*map[string]interface{}, bool) { - if o == nil || IsNil(o.Match) { - return &map[string]interface{}{}, false - } - return o.Match, true +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetMatchOk() (ret CreateAlertConfigRoutePayloadRoutesInnerGetMatchRetType, ok bool) { + return getCreateAlertConfigRoutePayloadRoutesInnerGetMatchAttributeTypeOk(o.Match) } // 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 + _, ok := o.GetMatchOk() + return ok } // 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 +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetMatch(v CreateAlertConfigRoutePayloadRoutesInnerGetMatchRetType) { + setCreateAlertConfigRoutePayloadRoutesInnerGetMatchAttributeType(&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 +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetMatchRe() (res CreateAlertConfigRoutePayloadRoutesInnerGetMatchReRetType) { + res, _ = o.GetMatchReOk() + return } // GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayloadRoutesInner) GetMatchReOk() (*map[string]interface{}, bool) { - if o == nil || IsNil(o.MatchRe) { - return &map[string]interface{}{}, false - } - return o.MatchRe, true +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetMatchReOk() (ret CreateAlertConfigRoutePayloadRoutesInnerGetMatchReRetType, ok bool) { + return getCreateAlertConfigRoutePayloadRoutesInnerGetMatchReAttributeTypeOk(o.MatchRe) } // 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 + _, ok := o.GetMatchReOk() + return ok } // 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 +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetMatchRe(v CreateAlertConfigRoutePayloadRoutesInnerGetMatchReRetType) { + setCreateAlertConfigRoutePayloadRoutesInnerGetMatchReAttributeType(&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 +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetReceiver() (res CreateAlertConfigRoutePayloadRoutesInnerGetReceiverRetType) { + res, _ = o.GetReceiverOk() + return } // GetReceiverOk returns a tuple with the Receiver field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayloadRoutesInner) GetReceiverOk() (*string, bool) { - if o == nil || IsNil(o.Receiver) { - return nil, false - } - return o.Receiver, true +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetReceiverOk() (ret CreateAlertConfigRoutePayloadRoutesInnerGetReceiverRetType, ok bool) { + return getCreateAlertConfigRoutePayloadRoutesInnerGetReceiverAttributeTypeOk(o.Receiver) } // 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 + _, ok := o.GetReceiverOk() + return ok } // SetReceiver gets a reference to the given string and assigns it to the Receiver field. -func (o *CreateAlertConfigRoutePayloadRoutesInner) SetReceiver(v *string) { - o.Receiver = v +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetReceiver(v CreateAlertConfigRoutePayloadRoutesInnerGetReceiverRetType) { + setCreateAlertConfigRoutePayloadRoutesInnerGetReceiverAttributeType(&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 +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetRepeatInterval() (res CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalRetType) { + res, _ = o.GetRepeatIntervalOk() + return } // GetRepeatIntervalOk returns a tuple with the RepeatInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayloadRoutesInner) GetRepeatIntervalOk() (*string, bool) { - if o == nil || IsNil(o.RepeatInterval) { - return nil, false - } - return o.RepeatInterval, true +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetRepeatIntervalOk() (ret CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalRetType, ok bool) { + return getCreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalAttributeTypeOk(o.RepeatInterval) } // 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 + _, ok := o.GetRepeatIntervalOk() + return ok } // SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. -func (o *CreateAlertConfigRoutePayloadRoutesInner) SetRepeatInterval(v *string) { - o.RepeatInterval = v +func (o *CreateAlertConfigRoutePayloadRoutesInner) SetRepeatInterval(v CreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalRetType) { + setCreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalAttributeType(&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 +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetRoutes() (res CreateAlertConfigRoutePayloadRoutesInnerGetRoutesRetType) { + res, _ = o.GetRoutesOk() + return } // GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAlertConfigRoutePayloadRoutesInner) GetRoutesOk() (*[]map[string]interface{}, bool) { - if o == nil || IsNil(o.Routes) { - return nil, false - } - return o.Routes, true +func (o *CreateAlertConfigRoutePayloadRoutesInner) GetRoutesOk() (ret CreateAlertConfigRoutePayloadRoutesInnerGetRoutesRetType, ok bool) { + return getCreateAlertConfigRoutePayloadRoutesInnerGetRoutesAttributeTypeOk(o.Routes) } // 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 + _, ok := o.GetRoutesOk() + return ok } // 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) SetRoutes(v CreateAlertConfigRoutePayloadRoutesInnerGetRoutesRetType) { + setCreateAlertConfigRoutePayloadRoutesInnerGetRoutesAttributeType(&o.Routes, v) } func (o CreateAlertConfigRoutePayloadRoutesInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.GroupBy) { - toSerialize["groupBy"] = o.GroupBy + if val, ok := getCreateAlertConfigRoutePayloadRoutesInnerGetGroupByAttributeTypeOk(o.GroupBy); ok { + toSerialize["GroupBy"] = val } - if !IsNil(o.GroupInterval) { - toSerialize["groupInterval"] = o.GroupInterval + if val, ok := getCreateAlertConfigRoutePayloadRoutesInnerGetGroupIntervalAttributeTypeOk(o.GroupInterval); ok { + toSerialize["GroupInterval"] = val } - if !IsNil(o.GroupWait) { - toSerialize["groupWait"] = o.GroupWait + if val, ok := getCreateAlertConfigRoutePayloadRoutesInnerGetGroupWaitAttributeTypeOk(o.GroupWait); ok { + toSerialize["GroupWait"] = val } - if !IsNil(o.Match) { - toSerialize["match"] = o.Match + if val, ok := getCreateAlertConfigRoutePayloadRoutesInnerGetMatchAttributeTypeOk(o.Match); ok { + toSerialize["Match"] = val } - if !IsNil(o.MatchRe) { - toSerialize["matchRe"] = o.MatchRe + if val, ok := getCreateAlertConfigRoutePayloadRoutesInnerGetMatchReAttributeTypeOk(o.MatchRe); ok { + toSerialize["MatchRe"] = val } - if !IsNil(o.Receiver) { - toSerialize["receiver"] = o.Receiver + if val, ok := getCreateAlertConfigRoutePayloadRoutesInnerGetReceiverAttributeTypeOk(o.Receiver); ok { + toSerialize["Receiver"] = val } - if !IsNil(o.RepeatInterval) { - toSerialize["repeatInterval"] = o.RepeatInterval + if val, ok := getCreateAlertConfigRoutePayloadRoutesInnerGetRepeatIntervalAttributeTypeOk(o.RepeatInterval); ok { + toSerialize["RepeatInterval"] = val } - if !IsNil(o.Routes) { - toSerialize["routes"] = o.Routes + if val, ok := getCreateAlertConfigRoutePayloadRoutesInnerGetRoutesAttributeTypeOk(o.Routes); ok { + toSerialize["Routes"] = val } return toSerialize, nil } diff --git a/services/observability/model_create_credentials_response.go b/services/observability/model_create_credentials_response.go index 0a1000ad1..14e1fd996 100644 --- a/services/observability/model_create_credentials_response.go +++ b/services/observability/model_create_credentials_response.go @@ -17,12 +17,53 @@ import ( // checks if the CreateCredentialsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateCredentialsResponse{} +/* + types and functions for credentials +*/ + +// isModel +type CreateCredentialsResponseGetCredentialsAttributeType = *Credentials +type CreateCredentialsResponseGetCredentialsArgType = Credentials +type CreateCredentialsResponseGetCredentialsRetType = Credentials + +func getCreateCredentialsResponseGetCredentialsAttributeTypeOk(arg CreateCredentialsResponseGetCredentialsAttributeType) (ret CreateCredentialsResponseGetCredentialsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateCredentialsResponseGetCredentialsAttributeType(arg *CreateCredentialsResponseGetCredentialsAttributeType, val CreateCredentialsResponseGetCredentialsRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type CreateCredentialsResponseGetMessageAttributeType = *string + +func getCreateCredentialsResponseGetMessageAttributeTypeOk(arg CreateCredentialsResponseGetMessageAttributeType) (ret CreateCredentialsResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateCredentialsResponseGetMessageAttributeType(arg *CreateCredentialsResponseGetMessageAttributeType, val CreateCredentialsResponseGetMessageRetType) { + *arg = &val +} + +type CreateCredentialsResponseGetMessageArgType = string +type CreateCredentialsResponseGetMessageRetType = string + // CreateCredentialsResponse struct for CreateCredentialsResponse type CreateCredentialsResponse struct { // REQUIRED - Credentials *Credentials `json:"credentials"` + Credentials CreateCredentialsResponseGetCredentialsAttributeType `json:"credentials"` // REQUIRED - Message *string `json:"message"` + Message CreateCredentialsResponseGetMessageAttributeType `json:"message"` } type _CreateCredentialsResponse CreateCredentialsResponse @@ -31,10 +72,10 @@ type _CreateCredentialsResponse CreateCredentialsResponse // 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 { +func NewCreateCredentialsResponse(credentials CreateCredentialsResponseGetCredentialsArgType, message CreateCredentialsResponseGetMessageArgType) *CreateCredentialsResponse { this := CreateCredentialsResponse{} - this.Credentials = credentials - this.Message = message + setCreateCredentialsResponseGetCredentialsAttributeType(&this.Credentials, credentials) + setCreateCredentialsResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewCreateCredentialsResponseWithDefaults() *CreateCredentialsResponse { } // GetCredentials returns the Credentials field value -func (o *CreateCredentialsResponse) GetCredentials() *Credentials { - if o == nil || IsNil(o.Credentials) { - var ret *Credentials - return ret - } - - return o.Credentials +func (o *CreateCredentialsResponse) GetCredentials() (ret CreateCredentialsResponseGetCredentialsRetType) { + ret, _ = o.GetCredentialsOk() + return ret } // 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 +func (o *CreateCredentialsResponse) GetCredentialsOk() (ret CreateCredentialsResponseGetCredentialsRetType, ok bool) { + return getCreateCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials) } // SetCredentials sets field value -func (o *CreateCredentialsResponse) SetCredentials(v *Credentials) { - o.Credentials = v +func (o *CreateCredentialsResponse) SetCredentials(v CreateCredentialsResponseGetCredentialsRetType) { + setCreateCredentialsResponseGetCredentialsAttributeType(&o.Credentials, v) } // GetMessage returns the Message field value -func (o *CreateCredentialsResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *CreateCredentialsResponse) GetMessage() (ret CreateCredentialsResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *CreateCredentialsResponse) GetMessageOk() (ret CreateCredentialsResponseGetMessageRetType, ok bool) { + return getCreateCredentialsResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *CreateCredentialsResponse) SetMessage(v *string) { - o.Message = v +func (o *CreateCredentialsResponse) SetMessage(v CreateCredentialsResponseGetMessageRetType) { + setCreateCredentialsResponseGetMessageAttributeType(&o.Message, v) } func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["credentials"] = o.Credentials - toSerialize["message"] = o.Message + if val, ok := getCreateCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials); ok { + toSerialize["Credentials"] = val + } + if val, ok := getCreateCredentialsResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_create_instance_payload.go b/services/observability/model_create_instance_payload.go index 610fbc6e7..bc18bb53e 100644 --- a/services/observability/model_create_instance_payload.go +++ b/services/observability/model_create_instance_payload.go @@ -17,15 +17,77 @@ import ( // checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateInstancePayload{} +/* + types and functions for name +*/ + +// isNotNullableString +type CreateInstancePayloadGetNameAttributeType = *string + +func getCreateInstancePayloadGetNameAttributeTypeOk(arg CreateInstancePayloadGetNameAttributeType) (ret CreateInstancePayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstancePayloadGetNameAttributeType(arg *CreateInstancePayloadGetNameAttributeType, val CreateInstancePayloadGetNameRetType) { + *arg = &val +} + +type CreateInstancePayloadGetNameArgType = string +type CreateInstancePayloadGetNameRetType = string + +/* + types and functions for parameter +*/ + +// isFreeform +type CreateInstancePayloadGetParameterAttributeType = *map[string]interface{} +type CreateInstancePayloadGetParameterArgType = map[string]interface{} +type CreateInstancePayloadGetParameterRetType = map[string]interface{} + +func getCreateInstancePayloadGetParameterAttributeTypeOk(arg CreateInstancePayloadGetParameterAttributeType) (ret CreateInstancePayloadGetParameterRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstancePayloadGetParameterAttributeType(arg *CreateInstancePayloadGetParameterAttributeType, val CreateInstancePayloadGetParameterRetType) { + *arg = &val +} + +/* + types and functions for planId +*/ + +// isNotNullableString +type CreateInstancePayloadGetPlanIdAttributeType = *string + +func getCreateInstancePayloadGetPlanIdAttributeTypeOk(arg CreateInstancePayloadGetPlanIdAttributeType) (ret CreateInstancePayloadGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstancePayloadGetPlanIdAttributeType(arg *CreateInstancePayloadGetPlanIdAttributeType, val CreateInstancePayloadGetPlanIdRetType) { + *arg = &val +} + +type CreateInstancePayloadGetPlanIdArgType = string +type CreateInstancePayloadGetPlanIdRetType = string + // CreateInstancePayload Create update instance body. type CreateInstancePayload struct { // Name of the service - Name *string `json:"name,omitempty"` + Name CreateInstancePayloadGetNameAttributeType `json:"name,omitempty"` // additional parameters - Parameter *map[string]interface{} `json:"parameter,omitempty"` + Parameter CreateInstancePayloadGetParameterAttributeType `json:"parameter,omitempty"` // uuid of the plan to create/update // REQUIRED - PlanId *string `json:"planId"` + PlanId CreateInstancePayloadGetPlanIdAttributeType `json:"planId"` } type _CreateInstancePayload CreateInstancePayload @@ -34,9 +96,9 @@ type _CreateInstancePayload CreateInstancePayload // 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 { +func NewCreateInstancePayload(planId CreateInstancePayloadGetPlanIdArgType) *CreateInstancePayload { this := CreateInstancePayload{} - this.PlanId = planId + setCreateInstancePayloadGetPlanIdAttributeType(&this.PlanId, planId) return &this } @@ -49,102 +111,79 @@ func NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { } // 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 +func (o *CreateInstancePayload) GetName() (res CreateInstancePayloadGetNameRetType) { + res, _ = o.GetNameOk() + return } // 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 +func (o *CreateInstancePayload) GetNameOk() (ret CreateInstancePayloadGetNameRetType, ok bool) { + return getCreateInstancePayloadGetNameAttributeTypeOk(o.Name) } // 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 + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *CreateInstancePayload) SetName(v *string) { - o.Name = v +func (o *CreateInstancePayload) SetName(v CreateInstancePayloadGetNameRetType) { + setCreateInstancePayloadGetNameAttributeType(&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 +func (o *CreateInstancePayload) GetParameter() (res CreateInstancePayloadGetParameterRetType) { + res, _ = o.GetParameterOk() + return } // 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 +func (o *CreateInstancePayload) GetParameterOk() (ret CreateInstancePayloadGetParameterRetType, ok bool) { + return getCreateInstancePayloadGetParameterAttributeTypeOk(o.Parameter) } // 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 + _, ok := o.GetParameterOk() + return ok } // 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 +func (o *CreateInstancePayload) SetParameter(v CreateInstancePayloadGetParameterRetType) { + setCreateInstancePayloadGetParameterAttributeType(&o.Parameter, v) } // GetPlanId returns the PlanId field value -func (o *CreateInstancePayload) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - - return o.PlanId +func (o *CreateInstancePayload) GetPlanId() (ret CreateInstancePayloadGetPlanIdRetType) { + ret, _ = o.GetPlanIdOk() + return ret } // 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 +func (o *CreateInstancePayload) GetPlanIdOk() (ret CreateInstancePayloadGetPlanIdRetType, ok bool) { + return getCreateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId) } // SetPlanId sets field value -func (o *CreateInstancePayload) SetPlanId(v *string) { - o.PlanId = v +func (o *CreateInstancePayload) SetPlanId(v CreateInstancePayloadGetPlanIdRetType) { + setCreateInstancePayloadGetPlanIdAttributeType(&o.PlanId, v) } func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getCreateInstancePayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getCreateInstancePayloadGetParameterAttributeTypeOk(o.Parameter); ok { + toSerialize["Parameter"] = val } - if !IsNil(o.Parameter) { - toSerialize["parameter"] = o.Parameter + if val, ok := getCreateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val } - toSerialize["planId"] = o.PlanId return toSerialize, nil } diff --git a/services/observability/model_create_instance_response.go b/services/observability/model_create_instance_response.go index a192cad5f..c7b4dcf95 100644 --- a/services/observability/model_create_instance_response.go +++ b/services/observability/model_create_instance_response.go @@ -17,14 +17,77 @@ import ( // checks if the CreateInstanceResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateInstanceResponse{} +/* + types and functions for dashboardUrl +*/ + +// isNotNullableString +type CreateInstanceResponseGetDashboardUrlAttributeType = *string + +func getCreateInstanceResponseGetDashboardUrlAttributeTypeOk(arg CreateInstanceResponseGetDashboardUrlAttributeType) (ret CreateInstanceResponseGetDashboardUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstanceResponseGetDashboardUrlAttributeType(arg *CreateInstanceResponseGetDashboardUrlAttributeType, val CreateInstanceResponseGetDashboardUrlRetType) { + *arg = &val +} + +type CreateInstanceResponseGetDashboardUrlArgType = string +type CreateInstanceResponseGetDashboardUrlRetType = string + +/* + types and functions for instanceId +*/ + +// isNotNullableString +type CreateInstanceResponseGetInstanceIdAttributeType = *string + +func getCreateInstanceResponseGetInstanceIdAttributeTypeOk(arg CreateInstanceResponseGetInstanceIdAttributeType) (ret CreateInstanceResponseGetInstanceIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstanceResponseGetInstanceIdAttributeType(arg *CreateInstanceResponseGetInstanceIdAttributeType, val CreateInstanceResponseGetInstanceIdRetType) { + *arg = &val +} + +type CreateInstanceResponseGetInstanceIdArgType = string +type CreateInstanceResponseGetInstanceIdRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type CreateInstanceResponseGetMessageAttributeType = *string + +func getCreateInstanceResponseGetMessageAttributeTypeOk(arg CreateInstanceResponseGetMessageAttributeType) (ret CreateInstanceResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstanceResponseGetMessageAttributeType(arg *CreateInstanceResponseGetMessageAttributeType, val CreateInstanceResponseGetMessageRetType) { + *arg = &val +} + +type CreateInstanceResponseGetMessageArgType = string +type CreateInstanceResponseGetMessageRetType = string + // CreateInstanceResponse struct for CreateInstanceResponse type CreateInstanceResponse struct { // REQUIRED - DashboardUrl *string `json:"dashboardUrl"` + DashboardUrl CreateInstanceResponseGetDashboardUrlAttributeType `json:"dashboardUrl"` // REQUIRED - InstanceId *string `json:"instanceId"` + InstanceId CreateInstanceResponseGetInstanceIdAttributeType `json:"instanceId"` // REQUIRED - Message *string `json:"message"` + Message CreateInstanceResponseGetMessageAttributeType `json:"message"` } type _CreateInstanceResponse CreateInstanceResponse @@ -33,11 +96,11 @@ type _CreateInstanceResponse CreateInstanceResponse // 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 { +func NewCreateInstanceResponse(dashboardUrl CreateInstanceResponseGetDashboardUrlArgType, instanceId CreateInstanceResponseGetInstanceIdArgType, message CreateInstanceResponseGetMessageArgType) *CreateInstanceResponse { this := CreateInstanceResponse{} - this.DashboardUrl = dashboardUrl - this.InstanceId = instanceId - this.Message = message + setCreateInstanceResponseGetDashboardUrlAttributeType(&this.DashboardUrl, dashboardUrl) + setCreateInstanceResponseGetInstanceIdAttributeType(&this.InstanceId, instanceId) + setCreateInstanceResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -50,82 +113,67 @@ func NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { } // GetDashboardUrl returns the DashboardUrl field value -func (o *CreateInstanceResponse) GetDashboardUrl() *string { - if o == nil || IsNil(o.DashboardUrl) { - var ret *string - return ret - } - - return o.DashboardUrl +func (o *CreateInstanceResponse) GetDashboardUrl() (ret CreateInstanceResponseGetDashboardUrlRetType) { + ret, _ = o.GetDashboardUrlOk() + return ret } // 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 +func (o *CreateInstanceResponse) GetDashboardUrlOk() (ret CreateInstanceResponseGetDashboardUrlRetType, ok bool) { + return getCreateInstanceResponseGetDashboardUrlAttributeTypeOk(o.DashboardUrl) } // SetDashboardUrl sets field value -func (o *CreateInstanceResponse) SetDashboardUrl(v *string) { - o.DashboardUrl = v +func (o *CreateInstanceResponse) SetDashboardUrl(v CreateInstanceResponseGetDashboardUrlRetType) { + setCreateInstanceResponseGetDashboardUrlAttributeType(&o.DashboardUrl, v) } // GetInstanceId returns the InstanceId field value -func (o *CreateInstanceResponse) GetInstanceId() *string { - if o == nil || IsNil(o.InstanceId) { - var ret *string - return ret - } - - return o.InstanceId +func (o *CreateInstanceResponse) GetInstanceId() (ret CreateInstanceResponseGetInstanceIdRetType) { + ret, _ = o.GetInstanceIdOk() + return ret } // 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 +func (o *CreateInstanceResponse) GetInstanceIdOk() (ret CreateInstanceResponseGetInstanceIdRetType, ok bool) { + return getCreateInstanceResponseGetInstanceIdAttributeTypeOk(o.InstanceId) } // SetInstanceId sets field value -func (o *CreateInstanceResponse) SetInstanceId(v *string) { - o.InstanceId = v +func (o *CreateInstanceResponse) SetInstanceId(v CreateInstanceResponseGetInstanceIdRetType) { + setCreateInstanceResponseGetInstanceIdAttributeType(&o.InstanceId, v) } // GetMessage returns the Message field value -func (o *CreateInstanceResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *CreateInstanceResponse) GetMessage() (ret CreateInstanceResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *CreateInstanceResponse) GetMessageOk() (ret CreateInstanceResponseGetMessageRetType, ok bool) { + return getCreateInstanceResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *CreateInstanceResponse) SetMessage(v *string) { - o.Message = v +func (o *CreateInstanceResponse) SetMessage(v CreateInstanceResponseGetMessageRetType) { + setCreateInstanceResponseGetMessageAttributeType(&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 + if val, ok := getCreateInstanceResponseGetDashboardUrlAttributeTypeOk(o.DashboardUrl); ok { + toSerialize["DashboardUrl"] = val + } + if val, ok := getCreateInstanceResponseGetInstanceIdAttributeTypeOk(o.InstanceId); ok { + toSerialize["InstanceId"] = val + } + if val, ok := getCreateInstanceResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_create_scrape_config_payload.go b/services/observability/model_create_scrape_config_payload.go index cf3a9764d..428e6b280 100644 --- a/services/observability/model_create_scrape_config_payload.go +++ b/services/observability/model_create_scrape_config_payload.go @@ -17,42 +17,367 @@ import ( // checks if the CreateScrapeConfigPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateScrapeConfigPayload{} +/* + types and functions for basicAuth +*/ + +// isModel +type CreateScrapeConfigPayloadGetBasicAuthAttributeType = *CreateScrapeConfigPayloadBasicAuth +type CreateScrapeConfigPayloadGetBasicAuthArgType = CreateScrapeConfigPayloadBasicAuth +type CreateScrapeConfigPayloadGetBasicAuthRetType = CreateScrapeConfigPayloadBasicAuth + +func getCreateScrapeConfigPayloadGetBasicAuthAttributeTypeOk(arg CreateScrapeConfigPayloadGetBasicAuthAttributeType) (ret CreateScrapeConfigPayloadGetBasicAuthRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetBasicAuthAttributeType(arg *CreateScrapeConfigPayloadGetBasicAuthAttributeType, val CreateScrapeConfigPayloadGetBasicAuthRetType) { + *arg = &val +} + +/* + types and functions for bearerToken +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadGetBearerTokenAttributeType = *string + +func getCreateScrapeConfigPayloadGetBearerTokenAttributeTypeOk(arg CreateScrapeConfigPayloadGetBearerTokenAttributeType) (ret CreateScrapeConfigPayloadGetBearerTokenRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetBearerTokenAttributeType(arg *CreateScrapeConfigPayloadGetBearerTokenAttributeType, val CreateScrapeConfigPayloadGetBearerTokenRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadGetBearerTokenArgType = string +type CreateScrapeConfigPayloadGetBearerTokenRetType = string + +/* + types and functions for honorLabels +*/ + +// isBoolean +type CreateScrapeConfigPayloadgetHonorLabelsAttributeType = *bool +type CreateScrapeConfigPayloadgetHonorLabelsArgType = bool +type CreateScrapeConfigPayloadgetHonorLabelsRetType = bool + +func getCreateScrapeConfigPayloadgetHonorLabelsAttributeTypeOk(arg CreateScrapeConfigPayloadgetHonorLabelsAttributeType) (ret CreateScrapeConfigPayloadgetHonorLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadgetHonorLabelsAttributeType(arg *CreateScrapeConfigPayloadgetHonorLabelsAttributeType, val CreateScrapeConfigPayloadgetHonorLabelsRetType) { + *arg = &val +} + +/* + types and functions for honorTimeStamps +*/ + +// isBoolean +type CreateScrapeConfigPayloadgetHonorTimeStampsAttributeType = *bool +type CreateScrapeConfigPayloadgetHonorTimeStampsArgType = bool +type CreateScrapeConfigPayloadgetHonorTimeStampsRetType = bool + +func getCreateScrapeConfigPayloadgetHonorTimeStampsAttributeTypeOk(arg CreateScrapeConfigPayloadgetHonorTimeStampsAttributeType) (ret CreateScrapeConfigPayloadgetHonorTimeStampsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadgetHonorTimeStampsAttributeType(arg *CreateScrapeConfigPayloadgetHonorTimeStampsAttributeType, val CreateScrapeConfigPayloadgetHonorTimeStampsRetType) { + *arg = &val +} + +/* + types and functions for httpSdConfigs +*/ + +// isArray +type CreateScrapeConfigPayloadGetHttpSdConfigsAttributeType = *[]CreateScrapeConfigPayloadHttpSdConfigsInner +type CreateScrapeConfigPayloadGetHttpSdConfigsArgType = []CreateScrapeConfigPayloadHttpSdConfigsInner +type CreateScrapeConfigPayloadGetHttpSdConfigsRetType = []CreateScrapeConfigPayloadHttpSdConfigsInner + +func getCreateScrapeConfigPayloadGetHttpSdConfigsAttributeTypeOk(arg CreateScrapeConfigPayloadGetHttpSdConfigsAttributeType) (ret CreateScrapeConfigPayloadGetHttpSdConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetHttpSdConfigsAttributeType(arg *CreateScrapeConfigPayloadGetHttpSdConfigsAttributeType, val CreateScrapeConfigPayloadGetHttpSdConfigsRetType) { + *arg = &val +} + +/* + types and functions for jobName +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadGetJobNameAttributeType = *string + +func getCreateScrapeConfigPayloadGetJobNameAttributeTypeOk(arg CreateScrapeConfigPayloadGetJobNameAttributeType) (ret CreateScrapeConfigPayloadGetJobNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetJobNameAttributeType(arg *CreateScrapeConfigPayloadGetJobNameAttributeType, val CreateScrapeConfigPayloadGetJobNameRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadGetJobNameArgType = string +type CreateScrapeConfigPayloadGetJobNameRetType = string + +/* + types and functions for metricsPath +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadGetMetricsPathAttributeType = *string + +func getCreateScrapeConfigPayloadGetMetricsPathAttributeTypeOk(arg CreateScrapeConfigPayloadGetMetricsPathAttributeType) (ret CreateScrapeConfigPayloadGetMetricsPathRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetMetricsPathAttributeType(arg *CreateScrapeConfigPayloadGetMetricsPathAttributeType, val CreateScrapeConfigPayloadGetMetricsPathRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadGetMetricsPathArgType = string +type CreateScrapeConfigPayloadGetMetricsPathRetType = string + +/* + types and functions for metricsRelabelConfigs +*/ + +// isArray +type CreateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType = *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner +type CreateScrapeConfigPayloadGetMetricsRelabelConfigsArgType = []CreateScrapeConfigPayloadMetricsRelabelConfigsInner +type CreateScrapeConfigPayloadGetMetricsRelabelConfigsRetType = []CreateScrapeConfigPayloadMetricsRelabelConfigsInner + +func getCreateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeTypeOk(arg CreateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType) (ret CreateScrapeConfigPayloadGetMetricsRelabelConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType(arg *CreateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType, val CreateScrapeConfigPayloadGetMetricsRelabelConfigsRetType) { + *arg = &val +} + +/* + types and functions for oauth2 +*/ + +// isModel +type CreateScrapeConfigPayloadGetOauth2AttributeType = *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 +type CreateScrapeConfigPayloadGetOauth2ArgType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 +type CreateScrapeConfigPayloadGetOauth2RetType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 + +func getCreateScrapeConfigPayloadGetOauth2AttributeTypeOk(arg CreateScrapeConfigPayloadGetOauth2AttributeType) (ret CreateScrapeConfigPayloadGetOauth2RetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetOauth2AttributeType(arg *CreateScrapeConfigPayloadGetOauth2AttributeType, val CreateScrapeConfigPayloadGetOauth2RetType) { + *arg = &val +} + +/* + types and functions for params +*/ + +// isFreeform +type CreateScrapeConfigPayloadGetParamsAttributeType = *map[string]interface{} +type CreateScrapeConfigPayloadGetParamsArgType = map[string]interface{} +type CreateScrapeConfigPayloadGetParamsRetType = map[string]interface{} + +func getCreateScrapeConfigPayloadGetParamsAttributeTypeOk(arg CreateScrapeConfigPayloadGetParamsAttributeType) (ret CreateScrapeConfigPayloadGetParamsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetParamsAttributeType(arg *CreateScrapeConfigPayloadGetParamsAttributeType, val CreateScrapeConfigPayloadGetParamsRetType) { + *arg = &val +} + +/* + types and functions for sampleLimit +*/ + +// isNumber +type CreateScrapeConfigPayloadGetSampleLimitAttributeType = *float64 +type CreateScrapeConfigPayloadGetSampleLimitArgType = float64 +type CreateScrapeConfigPayloadGetSampleLimitRetType = float64 + +func getCreateScrapeConfigPayloadGetSampleLimitAttributeTypeOk(arg CreateScrapeConfigPayloadGetSampleLimitAttributeType) (ret CreateScrapeConfigPayloadGetSampleLimitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetSampleLimitAttributeType(arg *CreateScrapeConfigPayloadGetSampleLimitAttributeType, val CreateScrapeConfigPayloadGetSampleLimitRetType) { + *arg = &val +} + +/* + types and functions for scheme +*/ + +// isEnumRef +type CreateScrapeConfigPayloadGetSchemeAttributeType = *string +type CreateScrapeConfigPayloadGetSchemeArgType = string +type CreateScrapeConfigPayloadGetSchemeRetType = string + +func getCreateScrapeConfigPayloadGetSchemeAttributeTypeOk(arg CreateScrapeConfigPayloadGetSchemeAttributeType) (ret CreateScrapeConfigPayloadGetSchemeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetSchemeAttributeType(arg *CreateScrapeConfigPayloadGetSchemeAttributeType, val CreateScrapeConfigPayloadGetSchemeRetType) { + *arg = &val +} + +/* + types and functions for scrapeInterval +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadGetScrapeIntervalAttributeType = *string + +func getCreateScrapeConfigPayloadGetScrapeIntervalAttributeTypeOk(arg CreateScrapeConfigPayloadGetScrapeIntervalAttributeType) (ret CreateScrapeConfigPayloadGetScrapeIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetScrapeIntervalAttributeType(arg *CreateScrapeConfigPayloadGetScrapeIntervalAttributeType, val CreateScrapeConfigPayloadGetScrapeIntervalRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadGetScrapeIntervalArgType = string +type CreateScrapeConfigPayloadGetScrapeIntervalRetType = string + +/* + types and functions for scrapeTimeout +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadGetScrapeTimeoutAttributeType = *string + +func getCreateScrapeConfigPayloadGetScrapeTimeoutAttributeTypeOk(arg CreateScrapeConfigPayloadGetScrapeTimeoutAttributeType) (ret CreateScrapeConfigPayloadGetScrapeTimeoutRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetScrapeTimeoutAttributeType(arg *CreateScrapeConfigPayloadGetScrapeTimeoutAttributeType, val CreateScrapeConfigPayloadGetScrapeTimeoutRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadGetScrapeTimeoutArgType = string +type CreateScrapeConfigPayloadGetScrapeTimeoutRetType = string + +/* + types and functions for staticConfigs +*/ + +// isArray +type CreateScrapeConfigPayloadGetStaticConfigsAttributeType = *[]CreateScrapeConfigPayloadStaticConfigsInner +type CreateScrapeConfigPayloadGetStaticConfigsArgType = []CreateScrapeConfigPayloadStaticConfigsInner +type CreateScrapeConfigPayloadGetStaticConfigsRetType = []CreateScrapeConfigPayloadStaticConfigsInner + +func getCreateScrapeConfigPayloadGetStaticConfigsAttributeTypeOk(arg CreateScrapeConfigPayloadGetStaticConfigsAttributeType) (ret CreateScrapeConfigPayloadGetStaticConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetStaticConfigsAttributeType(arg *CreateScrapeConfigPayloadGetStaticConfigsAttributeType, val CreateScrapeConfigPayloadGetStaticConfigsRetType) { + *arg = &val +} + +/* + types and functions for tlsConfig +*/ + +// isModel +type CreateScrapeConfigPayloadGetTlsConfigAttributeType = *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig +type CreateScrapeConfigPayloadGetTlsConfigArgType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig +type CreateScrapeConfigPayloadGetTlsConfigRetType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig + +func getCreateScrapeConfigPayloadGetTlsConfigAttributeTypeOk(arg CreateScrapeConfigPayloadGetTlsConfigAttributeType) (ret CreateScrapeConfigPayloadGetTlsConfigRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadGetTlsConfigAttributeType(arg *CreateScrapeConfigPayloadGetTlsConfigAttributeType, val CreateScrapeConfigPayloadGetTlsConfigRetType) { + *arg = &val +} + // CreateScrapeConfigPayload struct for CreateScrapeConfigPayload type CreateScrapeConfigPayload struct { - BasicAuth *CreateScrapeConfigPayloadBasicAuth `json:"basicAuth,omitempty"` + BasicAuth CreateScrapeConfigPayloadGetBasicAuthAttributeType `json:"basicAuth,omitempty"` // Sets the 'Authorization' header on every scrape request with the configured bearer token. It is mutually exclusive with 'bearer_token_file'. `Additional Validators:` * needs to be a valid bearer token * if bearerToken is in the body no other authentication method should be in the body - BearerToken *string `json:"bearerToken,omitempty"` + BearerToken CreateScrapeConfigPayloadGetBearerTokenAttributeType `json:"bearerToken,omitempty"` // Note that any globally configured 'external_labels' are unaffected by this setting. In communication with external systems, they are always applied only when a time series does not have a given label yet and are ignored otherwise. - HonorLabels *bool `json:"honorLabels,omitempty"` + HonorLabels CreateScrapeConfigPayloadgetHonorLabelsAttributeType `json:"honorLabels,omitempty"` // honor_timestamps controls whether Prometheus respects the timestamps present in scraped data. If honor_timestamps is set to 'true', the timestamps of the metrics exposed by the target will be used. - HonorTimeStamps *bool `json:"honorTimeStamps,omitempty"` + HonorTimeStamps CreateScrapeConfigPayloadgetHonorTimeStampsAttributeType `json:"honorTimeStamps,omitempty"` // HTTP-based service discovery provides a more generic way to configure static targets and serves as an interface to plug in custom service discovery mechanisms. - HttpSdConfigs *[]CreateScrapeConfigPayloadHttpSdConfigsInner `json:"httpSdConfigs,omitempty"` + HttpSdConfigs CreateScrapeConfigPayloadGetHttpSdConfigsAttributeType `json:"httpSdConfigs,omitempty"` // The job name assigned to scraped metrics by default. `Additional Validators:` * must be unique * key and values should only include the characters: a-zA-Z0-9- // REQUIRED - JobName *string `json:"jobName"` + JobName CreateScrapeConfigPayloadGetJobNameAttributeType `json:"jobName"` // The HTTP resource path on which to fetch metrics from targets. E.g. /metrics - MetricsPath *string `json:"metricsPath,omitempty"` + MetricsPath CreateScrapeConfigPayloadGetMetricsPathAttributeType `json:"metricsPath,omitempty"` // List of metric relabel configurations - MetricsRelabelConfigs *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner `json:"metricsRelabelConfigs,omitempty"` - Oauth2 *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 `json:"oauth2,omitempty"` + MetricsRelabelConfigs CreateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType `json:"metricsRelabelConfigs,omitempty"` + Oauth2 CreateScrapeConfigPayloadGetOauth2AttributeType `json:"oauth2,omitempty"` // Optional http params `Additional Validators:` * should not contain more than 5 keys * each key and value should not have more than 200 characters - Params *map[string]interface{} `json:"params,omitempty"` + Params CreateScrapeConfigPayloadGetParamsAttributeType `json:"params,omitempty"` // Per-scrape limit on number of scraped samples that will be accepted. If more than this number of samples are present after metric relabeling the entire scrape will be treated as failed. The total limit depends on the service plan target limits * samples - SampleLimit *float64 `json:"sampleLimit,omitempty"` + SampleLimit CreateScrapeConfigPayloadGetSampleLimitAttributeType `json:"sampleLimit,omitempty"` // Configures the protocol scheme used for requests. https or http // REQUIRED - Scheme *string `json:"scheme"` + Scheme CreateScrapeConfigPayloadGetSchemeAttributeType `json:"scheme"` // How frequently to scrape targets from this job. E.g. 5m `Additional Validators:` * must be a valid time format* must be >= 60s // REQUIRED - ScrapeInterval *string `json:"scrapeInterval"` + ScrapeInterval CreateScrapeConfigPayloadGetScrapeIntervalAttributeType `json:"scrapeInterval"` // Per-scrape timeout when scraping this job. `Additional Validators:` * must be a valid time format* must be smaller than scrapeInterval // REQUIRED - ScrapeTimeout *string `json:"scrapeTimeout"` + ScrapeTimeout CreateScrapeConfigPayloadGetScrapeTimeoutAttributeType `json:"scrapeTimeout"` // A list of scrape configurations. // REQUIRED - StaticConfigs *[]CreateScrapeConfigPayloadStaticConfigsInner `json:"staticConfigs"` - TlsConfig *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig `json:"tlsConfig,omitempty"` + StaticConfigs CreateScrapeConfigPayloadGetStaticConfigsAttributeType `json:"staticConfigs"` + TlsConfig CreateScrapeConfigPayloadGetTlsConfigAttributeType `json:"tlsConfig,omitempty"` } type _CreateScrapeConfigPayload CreateScrapeConfigPayload @@ -61,19 +386,13 @@ type _CreateScrapeConfigPayload CreateScrapeConfigPayload // 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 { +func NewCreateScrapeConfigPayload(jobName CreateScrapeConfigPayloadGetJobNameArgType, scheme CreateScrapeConfigPayloadGetSchemeArgType, scrapeInterval CreateScrapeConfigPayloadGetScrapeIntervalArgType, scrapeTimeout CreateScrapeConfigPayloadGetScrapeTimeoutArgType, staticConfigs CreateScrapeConfigPayloadGetStaticConfigsArgType) *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 + setCreateScrapeConfigPayloadGetJobNameAttributeType(&this.JobName, jobName) + setCreateScrapeConfigPayloadGetSchemeAttributeType(&this.Scheme, scheme) + setCreateScrapeConfigPayloadGetScrapeIntervalAttributeType(&this.ScrapeInterval, scrapeInterval) + setCreateScrapeConfigPayloadGetScrapeTimeoutAttributeType(&this.ScrapeTimeout, scrapeTimeout) + setCreateScrapeConfigPayloadGetStaticConfigsAttributeType(&this.StaticConfigs, staticConfigs) return &this } @@ -92,516 +411,392 @@ func NewCreateScrapeConfigPayloadWithDefaults() *CreateScrapeConfigPayload { } // 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 +func (o *CreateScrapeConfigPayload) GetBasicAuth() (res CreateScrapeConfigPayloadGetBasicAuthRetType) { + res, _ = o.GetBasicAuthOk() + return } // 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 +func (o *CreateScrapeConfigPayload) GetBasicAuthOk() (ret CreateScrapeConfigPayloadGetBasicAuthRetType, ok bool) { + return getCreateScrapeConfigPayloadGetBasicAuthAttributeTypeOk(o.BasicAuth) } // 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 + _, ok := o.GetBasicAuthOk() + return ok } // SetBasicAuth gets a reference to the given CreateScrapeConfigPayloadBasicAuth and assigns it to the BasicAuth field. -func (o *CreateScrapeConfigPayload) SetBasicAuth(v *CreateScrapeConfigPayloadBasicAuth) { - o.BasicAuth = v +func (o *CreateScrapeConfigPayload) SetBasicAuth(v CreateScrapeConfigPayloadGetBasicAuthRetType) { + setCreateScrapeConfigPayloadGetBasicAuthAttributeType(&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 +func (o *CreateScrapeConfigPayload) GetBearerToken() (res CreateScrapeConfigPayloadGetBearerTokenRetType) { + res, _ = o.GetBearerTokenOk() + return } // 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 +func (o *CreateScrapeConfigPayload) GetBearerTokenOk() (ret CreateScrapeConfigPayloadGetBearerTokenRetType, ok bool) { + return getCreateScrapeConfigPayloadGetBearerTokenAttributeTypeOk(o.BearerToken) } // 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 + _, ok := o.GetBearerTokenOk() + return ok } // SetBearerToken gets a reference to the given string and assigns it to the BearerToken field. -func (o *CreateScrapeConfigPayload) SetBearerToken(v *string) { - o.BearerToken = v +func (o *CreateScrapeConfigPayload) SetBearerToken(v CreateScrapeConfigPayloadGetBearerTokenRetType) { + setCreateScrapeConfigPayloadGetBearerTokenAttributeType(&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 +func (o *CreateScrapeConfigPayload) GetHonorLabels() (res CreateScrapeConfigPayloadgetHonorLabelsRetType) { + res, _ = o.GetHonorLabelsOk() + return } // 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 +func (o *CreateScrapeConfigPayload) GetHonorLabelsOk() (ret CreateScrapeConfigPayloadgetHonorLabelsRetType, ok bool) { + return getCreateScrapeConfigPayloadgetHonorLabelsAttributeTypeOk(o.HonorLabels) } // 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 + _, ok := o.GetHonorLabelsOk() + return ok } // SetHonorLabels gets a reference to the given bool and assigns it to the HonorLabels field. -func (o *CreateScrapeConfigPayload) SetHonorLabels(v *bool) { - o.HonorLabels = v +func (o *CreateScrapeConfigPayload) SetHonorLabels(v CreateScrapeConfigPayloadgetHonorLabelsRetType) { + setCreateScrapeConfigPayloadgetHonorLabelsAttributeType(&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 +func (o *CreateScrapeConfigPayload) GetHonorTimeStamps() (res CreateScrapeConfigPayloadgetHonorTimeStampsRetType) { + res, _ = o.GetHonorTimeStampsOk() + return } // 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 +func (o *CreateScrapeConfigPayload) GetHonorTimeStampsOk() (ret CreateScrapeConfigPayloadgetHonorTimeStampsRetType, ok bool) { + return getCreateScrapeConfigPayloadgetHonorTimeStampsAttributeTypeOk(o.HonorTimeStamps) } // 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 + _, ok := o.GetHonorTimeStampsOk() + return ok } // SetHonorTimeStamps gets a reference to the given bool and assigns it to the HonorTimeStamps field. -func (o *CreateScrapeConfigPayload) SetHonorTimeStamps(v *bool) { - o.HonorTimeStamps = v +func (o *CreateScrapeConfigPayload) SetHonorTimeStamps(v CreateScrapeConfigPayloadgetHonorTimeStampsRetType) { + setCreateScrapeConfigPayloadgetHonorTimeStampsAttributeType(&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 +func (o *CreateScrapeConfigPayload) GetHttpSdConfigs() (res CreateScrapeConfigPayloadGetHttpSdConfigsRetType) { + res, _ = o.GetHttpSdConfigsOk() + return } // 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 +func (o *CreateScrapeConfigPayload) GetHttpSdConfigsOk() (ret CreateScrapeConfigPayloadGetHttpSdConfigsRetType, ok bool) { + return getCreateScrapeConfigPayloadGetHttpSdConfigsAttributeTypeOk(o.HttpSdConfigs) } // 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 + _, ok := o.GetHttpSdConfigsOk() + return ok } // SetHttpSdConfigs gets a reference to the given []CreateScrapeConfigPayloadHttpSdConfigsInner and assigns it to the HttpSdConfigs field. -func (o *CreateScrapeConfigPayload) SetHttpSdConfigs(v *[]CreateScrapeConfigPayloadHttpSdConfigsInner) { - o.HttpSdConfigs = v +func (o *CreateScrapeConfigPayload) SetHttpSdConfigs(v CreateScrapeConfigPayloadGetHttpSdConfigsRetType) { + setCreateScrapeConfigPayloadGetHttpSdConfigsAttributeType(&o.HttpSdConfigs, v) } // GetJobName returns the JobName field value -func (o *CreateScrapeConfigPayload) GetJobName() *string { - if o == nil || IsNil(o.JobName) { - var ret *string - return ret - } - - return o.JobName +func (o *CreateScrapeConfigPayload) GetJobName() (ret CreateScrapeConfigPayloadGetJobNameRetType) { + ret, _ = o.GetJobNameOk() + return ret } // 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 +func (o *CreateScrapeConfigPayload) GetJobNameOk() (ret CreateScrapeConfigPayloadGetJobNameRetType, ok bool) { + return getCreateScrapeConfigPayloadGetJobNameAttributeTypeOk(o.JobName) } // SetJobName sets field value -func (o *CreateScrapeConfigPayload) SetJobName(v *string) { - o.JobName = v +func (o *CreateScrapeConfigPayload) SetJobName(v CreateScrapeConfigPayloadGetJobNameRetType) { + setCreateScrapeConfigPayloadGetJobNameAttributeType(&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 +func (o *CreateScrapeConfigPayload) GetMetricsPath() (res CreateScrapeConfigPayloadGetMetricsPathRetType) { + res, _ = o.GetMetricsPathOk() + return } // 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 +func (o *CreateScrapeConfigPayload) GetMetricsPathOk() (ret CreateScrapeConfigPayloadGetMetricsPathRetType, ok bool) { + return getCreateScrapeConfigPayloadGetMetricsPathAttributeTypeOk(o.MetricsPath) } // 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 + _, ok := o.GetMetricsPathOk() + return ok } // SetMetricsPath gets a reference to the given string and assigns it to the MetricsPath field. -func (o *CreateScrapeConfigPayload) SetMetricsPath(v *string) { - o.MetricsPath = v +func (o *CreateScrapeConfigPayload) SetMetricsPath(v CreateScrapeConfigPayloadGetMetricsPathRetType) { + setCreateScrapeConfigPayloadGetMetricsPathAttributeType(&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 +func (o *CreateScrapeConfigPayload) GetMetricsRelabelConfigs() (res CreateScrapeConfigPayloadGetMetricsRelabelConfigsRetType) { + res, _ = o.GetMetricsRelabelConfigsOk() + return } // 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 +func (o *CreateScrapeConfigPayload) GetMetricsRelabelConfigsOk() (ret CreateScrapeConfigPayloadGetMetricsRelabelConfigsRetType, ok bool) { + return getCreateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeTypeOk(o.MetricsRelabelConfigs) } // 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 + _, ok := o.GetMetricsRelabelConfigsOk() + return ok } // SetMetricsRelabelConfigs gets a reference to the given []CreateScrapeConfigPayloadMetricsRelabelConfigsInner and assigns it to the MetricsRelabelConfigs field. -func (o *CreateScrapeConfigPayload) SetMetricsRelabelConfigs(v *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner) { - o.MetricsRelabelConfigs = v +func (o *CreateScrapeConfigPayload) SetMetricsRelabelConfigs(v CreateScrapeConfigPayloadGetMetricsRelabelConfigsRetType) { + setCreateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType(&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 +func (o *CreateScrapeConfigPayload) GetOauth2() (res CreateScrapeConfigPayloadGetOauth2RetType) { + res, _ = o.GetOauth2Ok() + return } // 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 +func (o *CreateScrapeConfigPayload) GetOauth2Ok() (ret CreateScrapeConfigPayloadGetOauth2RetType, ok bool) { + return getCreateScrapeConfigPayloadGetOauth2AttributeTypeOk(o.Oauth2) } // 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 + _, ok := o.GetOauth2Ok() + return ok } // SetOauth2 gets a reference to the given CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 and assigns it to the Oauth2 field. -func (o *CreateScrapeConfigPayload) SetOauth2(v *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) { - o.Oauth2 = v +func (o *CreateScrapeConfigPayload) SetOauth2(v CreateScrapeConfigPayloadGetOauth2RetType) { + setCreateScrapeConfigPayloadGetOauth2AttributeType(&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 +func (o *CreateScrapeConfigPayload) GetParams() (res CreateScrapeConfigPayloadGetParamsRetType) { + res, _ = o.GetParamsOk() + return } // 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 +func (o *CreateScrapeConfigPayload) GetParamsOk() (ret CreateScrapeConfigPayloadGetParamsRetType, ok bool) { + return getCreateScrapeConfigPayloadGetParamsAttributeTypeOk(o.Params) } // 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 + _, ok := o.GetParamsOk() + return ok } // 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 +func (o *CreateScrapeConfigPayload) SetParams(v CreateScrapeConfigPayloadGetParamsRetType) { + setCreateScrapeConfigPayloadGetParamsAttributeType(&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 +func (o *CreateScrapeConfigPayload) GetSampleLimit() (res CreateScrapeConfigPayloadGetSampleLimitRetType) { + res, _ = o.GetSampleLimitOk() + return } // 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 +func (o *CreateScrapeConfigPayload) GetSampleLimitOk() (ret CreateScrapeConfigPayloadGetSampleLimitRetType, ok bool) { + return getCreateScrapeConfigPayloadGetSampleLimitAttributeTypeOk(o.SampleLimit) } // 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 + _, ok := o.GetSampleLimitOk() + return ok } // SetSampleLimit gets a reference to the given float64 and assigns it to the SampleLimit field. -func (o *CreateScrapeConfigPayload) SetSampleLimit(v *float64) { - o.SampleLimit = v +func (o *CreateScrapeConfigPayload) SetSampleLimit(v CreateScrapeConfigPayloadGetSampleLimitRetType) { + setCreateScrapeConfigPayloadGetSampleLimitAttributeType(&o.SampleLimit, v) } // GetScheme returns the Scheme field value -func (o *CreateScrapeConfigPayload) GetScheme() *string { - if o == nil || IsNil(o.Scheme) { - var ret *string - return ret - } - - return o.Scheme +func (o *CreateScrapeConfigPayload) GetScheme() (ret CreateScrapeConfigPayloadGetSchemeRetType) { + ret, _ = o.GetSchemeOk() + return ret } // 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 +func (o *CreateScrapeConfigPayload) GetSchemeOk() (ret CreateScrapeConfigPayloadGetSchemeRetType, ok bool) { + return getCreateScrapeConfigPayloadGetSchemeAttributeTypeOk(o.Scheme) } // SetScheme sets field value -func (o *CreateScrapeConfigPayload) SetScheme(v *string) { - o.Scheme = v +func (o *CreateScrapeConfigPayload) SetScheme(v CreateScrapeConfigPayloadGetSchemeRetType) { + setCreateScrapeConfigPayloadGetSchemeAttributeType(&o.Scheme, v) } // GetScrapeInterval returns the ScrapeInterval field value -func (o *CreateScrapeConfigPayload) GetScrapeInterval() *string { - if o == nil || IsNil(o.ScrapeInterval) { - var ret *string - return ret - } - - return o.ScrapeInterval +func (o *CreateScrapeConfigPayload) GetScrapeInterval() (ret CreateScrapeConfigPayloadGetScrapeIntervalRetType) { + ret, _ = o.GetScrapeIntervalOk() + return ret } // 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 +func (o *CreateScrapeConfigPayload) GetScrapeIntervalOk() (ret CreateScrapeConfigPayloadGetScrapeIntervalRetType, ok bool) { + return getCreateScrapeConfigPayloadGetScrapeIntervalAttributeTypeOk(o.ScrapeInterval) } // SetScrapeInterval sets field value -func (o *CreateScrapeConfigPayload) SetScrapeInterval(v *string) { - o.ScrapeInterval = v +func (o *CreateScrapeConfigPayload) SetScrapeInterval(v CreateScrapeConfigPayloadGetScrapeIntervalRetType) { + setCreateScrapeConfigPayloadGetScrapeIntervalAttributeType(&o.ScrapeInterval, v) } // GetScrapeTimeout returns the ScrapeTimeout field value -func (o *CreateScrapeConfigPayload) GetScrapeTimeout() *string { - if o == nil || IsNil(o.ScrapeTimeout) { - var ret *string - return ret - } - - return o.ScrapeTimeout +func (o *CreateScrapeConfigPayload) GetScrapeTimeout() (ret CreateScrapeConfigPayloadGetScrapeTimeoutRetType) { + ret, _ = o.GetScrapeTimeoutOk() + return ret } // 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 +func (o *CreateScrapeConfigPayload) GetScrapeTimeoutOk() (ret CreateScrapeConfigPayloadGetScrapeTimeoutRetType, ok bool) { + return getCreateScrapeConfigPayloadGetScrapeTimeoutAttributeTypeOk(o.ScrapeTimeout) } // SetScrapeTimeout sets field value -func (o *CreateScrapeConfigPayload) SetScrapeTimeout(v *string) { - o.ScrapeTimeout = v +func (o *CreateScrapeConfigPayload) SetScrapeTimeout(v CreateScrapeConfigPayloadGetScrapeTimeoutRetType) { + setCreateScrapeConfigPayloadGetScrapeTimeoutAttributeType(&o.ScrapeTimeout, v) } // GetStaticConfigs returns the StaticConfigs field value -func (o *CreateScrapeConfigPayload) GetStaticConfigs() *[]CreateScrapeConfigPayloadStaticConfigsInner { - if o == nil || IsNil(o.StaticConfigs) { - var ret *[]CreateScrapeConfigPayloadStaticConfigsInner - return ret - } - - return o.StaticConfigs +func (o *CreateScrapeConfigPayload) GetStaticConfigs() (ret CreateScrapeConfigPayloadGetStaticConfigsRetType) { + ret, _ = o.GetStaticConfigsOk() + return ret } // 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 +func (o *CreateScrapeConfigPayload) GetStaticConfigsOk() (ret CreateScrapeConfigPayloadGetStaticConfigsRetType, ok bool) { + return getCreateScrapeConfigPayloadGetStaticConfigsAttributeTypeOk(o.StaticConfigs) } // SetStaticConfigs sets field value -func (o *CreateScrapeConfigPayload) SetStaticConfigs(v *[]CreateScrapeConfigPayloadStaticConfigsInner) { - o.StaticConfigs = v +func (o *CreateScrapeConfigPayload) SetStaticConfigs(v CreateScrapeConfigPayloadGetStaticConfigsRetType) { + setCreateScrapeConfigPayloadGetStaticConfigsAttributeType(&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 +func (o *CreateScrapeConfigPayload) GetTlsConfig() (res CreateScrapeConfigPayloadGetTlsConfigRetType) { + res, _ = o.GetTlsConfigOk() + return } // 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 +func (o *CreateScrapeConfigPayload) GetTlsConfigOk() (ret CreateScrapeConfigPayloadGetTlsConfigRetType, ok bool) { + return getCreateScrapeConfigPayloadGetTlsConfigAttributeTypeOk(o.TlsConfig) } // 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 + _, ok := o.GetTlsConfigOk() + return ok } // 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) SetTlsConfig(v CreateScrapeConfigPayloadGetTlsConfigRetType) { + setCreateScrapeConfigPayloadGetTlsConfigAttributeType(&o.TlsConfig, v) } func (o CreateScrapeConfigPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.BasicAuth) { - toSerialize["basicAuth"] = o.BasicAuth + if val, ok := getCreateScrapeConfigPayloadGetBasicAuthAttributeTypeOk(o.BasicAuth); ok { + toSerialize["BasicAuth"] = val + } + if val, ok := getCreateScrapeConfigPayloadGetBearerTokenAttributeTypeOk(o.BearerToken); ok { + toSerialize["BearerToken"] = val + } + if val, ok := getCreateScrapeConfigPayloadgetHonorLabelsAttributeTypeOk(o.HonorLabels); ok { + toSerialize["HonorLabels"] = val + } + if val, ok := getCreateScrapeConfigPayloadgetHonorTimeStampsAttributeTypeOk(o.HonorTimeStamps); ok { + toSerialize["HonorTimeStamps"] = val + } + if val, ok := getCreateScrapeConfigPayloadGetHttpSdConfigsAttributeTypeOk(o.HttpSdConfigs); ok { + toSerialize["HttpSdConfigs"] = val + } + if val, ok := getCreateScrapeConfigPayloadGetJobNameAttributeTypeOk(o.JobName); ok { + toSerialize["JobName"] = val } - if !IsNil(o.BearerToken) { - toSerialize["bearerToken"] = o.BearerToken + if val, ok := getCreateScrapeConfigPayloadGetMetricsPathAttributeTypeOk(o.MetricsPath); ok { + toSerialize["MetricsPath"] = val } - if !IsNil(o.HonorLabels) { - toSerialize["honorLabels"] = o.HonorLabels + if val, ok := getCreateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeTypeOk(o.MetricsRelabelConfigs); ok { + toSerialize["MetricsRelabelConfigs"] = val } - if !IsNil(o.HonorTimeStamps) { - toSerialize["honorTimeStamps"] = o.HonorTimeStamps + if val, ok := getCreateScrapeConfigPayloadGetOauth2AttributeTypeOk(o.Oauth2); ok { + toSerialize["Oauth2"] = val } - if !IsNil(o.HttpSdConfigs) { - toSerialize["httpSdConfigs"] = o.HttpSdConfigs + if val, ok := getCreateScrapeConfigPayloadGetParamsAttributeTypeOk(o.Params); ok { + toSerialize["Params"] = val } - toSerialize["jobName"] = o.JobName - if !IsNil(o.MetricsPath) { - toSerialize["metricsPath"] = o.MetricsPath + if val, ok := getCreateScrapeConfigPayloadGetSampleLimitAttributeTypeOk(o.SampleLimit); ok { + toSerialize["SampleLimit"] = val } - if !IsNil(o.MetricsRelabelConfigs) { - toSerialize["metricsRelabelConfigs"] = o.MetricsRelabelConfigs + if val, ok := getCreateScrapeConfigPayloadGetSchemeAttributeTypeOk(o.Scheme); ok { + toSerialize["Scheme"] = val } - if !IsNil(o.Oauth2) { - toSerialize["oauth2"] = o.Oauth2 + if val, ok := getCreateScrapeConfigPayloadGetScrapeIntervalAttributeTypeOk(o.ScrapeInterval); ok { + toSerialize["ScrapeInterval"] = val } - if !IsNil(o.Params) { - toSerialize["params"] = o.Params + if val, ok := getCreateScrapeConfigPayloadGetScrapeTimeoutAttributeTypeOk(o.ScrapeTimeout); ok { + toSerialize["ScrapeTimeout"] = val } - if !IsNil(o.SampleLimit) { - toSerialize["sampleLimit"] = o.SampleLimit + if val, ok := getCreateScrapeConfigPayloadGetStaticConfigsAttributeTypeOk(o.StaticConfigs); ok { + toSerialize["StaticConfigs"] = val } - toSerialize["scheme"] = o.Scheme - toSerialize["scrapeInterval"] = o.ScrapeInterval - toSerialize["scrapeTimeout"] = o.ScrapeTimeout - toSerialize["staticConfigs"] = o.StaticConfigs - if !IsNil(o.TlsConfig) { - toSerialize["tlsConfig"] = o.TlsConfig + if val, ok := getCreateScrapeConfigPayloadGetTlsConfigAttributeTypeOk(o.TlsConfig); ok { + toSerialize["TlsConfig"] = val } return toSerialize, nil } 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 b0c02403f..8b2551856 100644 --- a/services/observability/model_create_scrape_config_payload_basic_auth.go +++ b/services/observability/model_create_scrape_config_payload_basic_auth.go @@ -17,12 +17,54 @@ import ( // checks if the CreateScrapeConfigPayloadBasicAuth type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateScrapeConfigPayloadBasicAuth{} +/* + types and functions for password +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadBasicAuthGetPasswordAttributeType = *string + +func getCreateScrapeConfigPayloadBasicAuthGetPasswordAttributeTypeOk(arg CreateScrapeConfigPayloadBasicAuthGetPasswordAttributeType) (ret CreateScrapeConfigPayloadBasicAuthGetPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadBasicAuthGetPasswordAttributeType(arg *CreateScrapeConfigPayloadBasicAuthGetPasswordAttributeType, val CreateScrapeConfigPayloadBasicAuthGetPasswordRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadBasicAuthGetPasswordArgType = string +type CreateScrapeConfigPayloadBasicAuthGetPasswordRetType = string + +/* + types and functions for username +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadBasicAuthGetUsernameAttributeType = *string + +func getCreateScrapeConfigPayloadBasicAuthGetUsernameAttributeTypeOk(arg CreateScrapeConfigPayloadBasicAuthGetUsernameAttributeType) (ret CreateScrapeConfigPayloadBasicAuthGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadBasicAuthGetUsernameAttributeType(arg *CreateScrapeConfigPayloadBasicAuthGetUsernameAttributeType, val CreateScrapeConfigPayloadBasicAuthGetUsernameRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadBasicAuthGetUsernameArgType = string +type CreateScrapeConfigPayloadBasicAuthGetUsernameRetType = string + // 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 - Password *string `json:"password,omitempty"` + Password CreateScrapeConfigPayloadBasicAuthGetPasswordAttributeType `json:"password,omitempty"` // username - Username *string `json:"username,omitempty"` + Username CreateScrapeConfigPayloadBasicAuthGetUsernameAttributeType `json:"username,omitempty"` } // NewCreateScrapeConfigPayloadBasicAuth instantiates a new CreateScrapeConfigPayloadBasicAuth object @@ -43,76 +85,58 @@ func NewCreateScrapeConfigPayloadBasicAuthWithDefaults() *CreateScrapeConfigPayl } // 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 +func (o *CreateScrapeConfigPayloadBasicAuth) GetPassword() (res CreateScrapeConfigPayloadBasicAuthGetPasswordRetType) { + res, _ = o.GetPasswordOk() + return } // 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 +func (o *CreateScrapeConfigPayloadBasicAuth) GetPasswordOk() (ret CreateScrapeConfigPayloadBasicAuthGetPasswordRetType, ok bool) { + return getCreateScrapeConfigPayloadBasicAuthGetPasswordAttributeTypeOk(o.Password) } // 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 + _, ok := o.GetPasswordOk() + return ok } // SetPassword gets a reference to the given string and assigns it to the Password field. -func (o *CreateScrapeConfigPayloadBasicAuth) SetPassword(v *string) { - o.Password = v +func (o *CreateScrapeConfigPayloadBasicAuth) SetPassword(v CreateScrapeConfigPayloadBasicAuthGetPasswordRetType) { + setCreateScrapeConfigPayloadBasicAuthGetPasswordAttributeType(&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 +func (o *CreateScrapeConfigPayloadBasicAuth) GetUsername() (res CreateScrapeConfigPayloadBasicAuthGetUsernameRetType) { + res, _ = o.GetUsernameOk() + return } // 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 +func (o *CreateScrapeConfigPayloadBasicAuth) GetUsernameOk() (ret CreateScrapeConfigPayloadBasicAuthGetUsernameRetType, ok bool) { + return getCreateScrapeConfigPayloadBasicAuthGetUsernameAttributeTypeOk(o.Username) } // 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 + _, ok := o.GetUsernameOk() + return ok } // 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) SetUsername(v CreateScrapeConfigPayloadBasicAuthGetUsernameRetType) { + setCreateScrapeConfigPayloadBasicAuthGetUsernameAttributeType(&o.Username, v) } func (o CreateScrapeConfigPayloadBasicAuth) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Password) { - toSerialize["password"] = o.Password + if val, ok := getCreateScrapeConfigPayloadBasicAuthGetPasswordAttributeTypeOk(o.Password); ok { + toSerialize["Password"] = val } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username + if val, ok := getCreateScrapeConfigPayloadBasicAuthGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val } return toSerialize, nil } 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 5f751ef70..9f2fe03f1 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 @@ -17,16 +17,118 @@ import ( // checks if the CreateScrapeConfigPayloadHttpSdConfigsInner type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateScrapeConfigPayloadHttpSdConfigsInner{} +/* + types and functions for basicAuth +*/ + +// isModel +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthAttributeType = *CreateScrapeConfigPayloadBasicAuth +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthArgType = CreateScrapeConfigPayloadBasicAuth +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthRetType = CreateScrapeConfigPayloadBasicAuth + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthAttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthAttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthAttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthAttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthRetType) { + *arg = &val +} + +/* + types and functions for oauth2 +*/ + +// isModel +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2AttributeType = *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2ArgType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2RetType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2AttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2AttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2RetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2AttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2AttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2RetType) { + *arg = &val +} + +/* + types and functions for refreshInterval +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalAttributeType = *string + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalAttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalAttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalAttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalAttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalArgType = string +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalRetType = string + +/* + types and functions for tlsConfig +*/ + +// isModel +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigAttributeType = *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigArgType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigRetType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigAttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigAttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigAttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigAttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigRetType) { + *arg = &val +} + +/* + types and functions for url +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlAttributeType = *string + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlAttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlAttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlAttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlAttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlArgType = string +type CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlRetType = string + // CreateScrapeConfigPayloadHttpSdConfigsInner struct for CreateScrapeConfigPayloadHttpSdConfigsInner type CreateScrapeConfigPayloadHttpSdConfigsInner struct { - BasicAuth *CreateScrapeConfigPayloadBasicAuth `json:"basicAuth,omitempty"` - Oauth2 *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 `json:"oauth2,omitempty"` + BasicAuth CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthAttributeType `json:"basicAuth,omitempty"` + Oauth2 CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2AttributeType `json:"oauth2,omitempty"` // Refresh interval to re-query the endpoint. E.g. 60s `Additional Validators:` * must be a valid time format* must be >= 60s - RefreshInterval *string `json:"refreshInterval,omitempty"` - TlsConfig *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig `json:"tlsConfig,omitempty"` + RefreshInterval CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalAttributeType `json:"refreshInterval,omitempty"` + TlsConfig CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigAttributeType `json:"tlsConfig,omitempty"` // URL from which the targets are fetched. // REQUIRED - Url *string `json:"url"` + Url CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlAttributeType `json:"url"` } type _CreateScrapeConfigPayloadHttpSdConfigsInner CreateScrapeConfigPayloadHttpSdConfigsInner @@ -35,11 +137,9 @@ type _CreateScrapeConfigPayloadHttpSdConfigsInner CreateScrapeConfigPayloadHttpS // 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 { +func NewCreateScrapeConfigPayloadHttpSdConfigsInner(url CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlArgType) *CreateScrapeConfigPayloadHttpSdConfigsInner { this := CreateScrapeConfigPayloadHttpSdConfigsInner{} - var refreshInterval string = "60s" - this.RefreshInterval = &refreshInterval - this.Url = url + setCreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlAttributeType(&this.Url, url) return &this } @@ -54,172 +154,131 @@ func NewCreateScrapeConfigPayloadHttpSdConfigsInnerWithDefaults() *CreateScrapeC } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetBasicAuth() (res CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthRetType) { + res, _ = o.GetBasicAuthOk() + return } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetBasicAuthOk() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthRetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthAttributeTypeOk(o.BasicAuth) } // 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 + _, ok := o.GetBasicAuthOk() + return ok } // SetBasicAuth gets a reference to the given CreateScrapeConfigPayloadBasicAuth and assigns it to the BasicAuth field. -func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetBasicAuth(v *CreateScrapeConfigPayloadBasicAuth) { - o.BasicAuth = v +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetBasicAuth(v CreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthRetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthAttributeType(&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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetOauth2() (res CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2RetType) { + res, _ = o.GetOauth2Ok() + return } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetOauth2Ok() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2RetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2AttributeTypeOk(o.Oauth2) } // 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 + _, ok := o.GetOauth2Ok() + return ok } // SetOauth2 gets a reference to the given CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 and assigns it to the Oauth2 field. -func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetOauth2(v *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) { - o.Oauth2 = v +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetOauth2(v CreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2RetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2AttributeType(&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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetRefreshInterval() (res CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalRetType) { + res, _ = o.GetRefreshIntervalOk() + return } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetRefreshIntervalOk() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalRetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalAttributeTypeOk(o.RefreshInterval) } // 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 + _, ok := o.GetRefreshIntervalOk() + return ok } // SetRefreshInterval gets a reference to the given string and assigns it to the RefreshInterval field. -func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetRefreshInterval(v *string) { - o.RefreshInterval = v +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetRefreshInterval(v CreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalRetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalAttributeType(&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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetTlsConfig() (res CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigRetType) { + res, _ = o.GetTlsConfigOk() + return } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetTlsConfigOk() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigRetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigAttributeTypeOk(o.TlsConfig) } // 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 + _, ok := o.GetTlsConfigOk() + return ok } // SetTlsConfig gets a reference to the given CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig and assigns it to the TlsConfig field. -func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetTlsConfig(v *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) { - o.TlsConfig = v +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetTlsConfig(v CreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigRetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigAttributeType(&o.TlsConfig, v) } // GetUrl returns the Url field value -func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetUrl() *string { - if o == nil || IsNil(o.Url) { - var ret *string - return ret - } - - return o.Url +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetUrl() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlRetType) { + ret, _ = o.GetUrlOk() + return ret } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) GetUrlOk() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlRetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlAttributeTypeOk(o.Url) } // SetUrl sets field value -func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetUrl(v *string) { - o.Url = v +func (o *CreateScrapeConfigPayloadHttpSdConfigsInner) SetUrl(v CreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlRetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlAttributeType(&o.Url, v) } func (o CreateScrapeConfigPayloadHttpSdConfigsInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.BasicAuth) { - toSerialize["basicAuth"] = o.BasicAuth + if val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerGetBasicAuthAttributeTypeOk(o.BasicAuth); ok { + toSerialize["BasicAuth"] = val + } + if val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerGetOauth2AttributeTypeOk(o.Oauth2); ok { + toSerialize["Oauth2"] = val } - if !IsNil(o.Oauth2) { - toSerialize["oauth2"] = o.Oauth2 + if val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerGetRefreshIntervalAttributeTypeOk(o.RefreshInterval); ok { + toSerialize["RefreshInterval"] = val } - if !IsNil(o.RefreshInterval) { - toSerialize["refreshInterval"] = o.RefreshInterval + if val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerGetTlsConfigAttributeTypeOk(o.TlsConfig); ok { + toSerialize["TlsConfig"] = val } - if !IsNil(o.TlsConfig) { - toSerialize["tlsConfig"] = o.TlsConfig + if val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerGetUrlAttributeTypeOk(o.Url); ok { + toSerialize["Url"] = val } - toSerialize["url"] = o.Url return toSerialize, nil } 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 135bcb38d..9d93e466a 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 @@ -17,20 +17,123 @@ import ( // checks if the CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2{} +/* + types and functions for clientId +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdAttributeType = *string + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdAttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdAttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdAttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdAttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdArgType = string +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdRetType = string + +/* + types and functions for clientSecret +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretAttributeType = *string + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretAttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretAttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretAttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretAttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretArgType = string +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretRetType = string + +/* + types and functions for scopes +*/ + +// isArray +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesAttributeType = *[]string +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesArgType = []string +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesRetType = []string + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesAttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesAttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesAttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesAttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesRetType) { + *arg = &val +} + +/* + types and functions for tlsConfig +*/ + +// isModel +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigAttributeType = *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigArgType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigRetType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigAttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigAttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigAttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigAttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigRetType) { + *arg = &val +} + +/* + types and functions for tokenUrl +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlAttributeType = *string + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlAttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlAttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlAttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlAttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlArgType = string +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlRetType = string + // 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 // REQUIRED - ClientId *string `json:"clientId"` + ClientId CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdAttributeType `json:"clientId"` // clientSecret // REQUIRED - ClientSecret *string `json:"clientSecret"` + ClientSecret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretAttributeType `json:"clientSecret"` // The URL to fetch the token from. - Scopes *[]string `json:"scopes,omitempty"` - TlsConfig *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig `json:"tlsConfig,omitempty"` + Scopes CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesAttributeType `json:"scopes,omitempty"` + TlsConfig CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigAttributeType `json:"tlsConfig,omitempty"` // The URL to fetch the token from. // REQUIRED - TokenUrl *string `json:"tokenUrl"` + TokenUrl CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlAttributeType `json:"tokenUrl"` } type _CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 @@ -39,11 +142,11 @@ type _CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 CreateScrapeConfigPayloa // 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 { +func NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2(clientId CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdArgType, clientSecret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretArgType, tokenUrl CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlArgType) *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2 { this := CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2{} - this.ClientId = clientId - this.ClientSecret = clientSecret - this.TokenUrl = tokenUrl + setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdAttributeType(&this.ClientId, clientId) + setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretAttributeType(&this.ClientSecret, clientSecret) + setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlAttributeType(&this.TokenUrl, tokenUrl) return &this } @@ -56,152 +159,119 @@ func NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2WithDefaults() *CreateS } // GetClientId returns the ClientId field value -func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetClientId() *string { - if o == nil || IsNil(o.ClientId) { - var ret *string - return ret - } - - return o.ClientId +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetClientId() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdRetType) { + ret, _ = o.GetClientIdOk() + return ret } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetClientIdOk() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdRetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdAttributeTypeOk(o.ClientId) } // SetClientId sets field value -func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetClientId(v *string) { - o.ClientId = v +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetClientId(v CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdRetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdAttributeType(&o.ClientId, v) } // GetClientSecret returns the ClientSecret field value -func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetClientSecret() *string { - if o == nil || IsNil(o.ClientSecret) { - var ret *string - return ret - } - - return o.ClientSecret +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetClientSecret() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretRetType) { + ret, _ = o.GetClientSecretOk() + return ret } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetClientSecretOk() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretRetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretAttributeTypeOk(o.ClientSecret) } // SetClientSecret sets field value -func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetClientSecret(v *string) { - o.ClientSecret = v +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetClientSecret(v CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretRetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretAttributeType(&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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetScopes() (res CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesRetType) { + res, _ = o.GetScopesOk() + return } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetScopesOk() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesRetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesAttributeTypeOk(o.Scopes) } // 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 + _, ok := o.GetScopesOk() + return ok } // SetScopes gets a reference to the given []string and assigns it to the Scopes field. -func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetScopes(v *[]string) { - o.Scopes = v +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetScopes(v CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesRetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesAttributeType(&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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetTlsConfig() (res CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigRetType) { + res, _ = o.GetTlsConfigOk() + return } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetTlsConfigOk() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigRetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigAttributeTypeOk(o.TlsConfig) } // 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 + _, ok := o.GetTlsConfigOk() + return ok } // SetTlsConfig gets a reference to the given CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig and assigns it to the TlsConfig field. -func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetTlsConfig(v *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) { - o.TlsConfig = v +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetTlsConfig(v CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigRetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigAttributeType(&o.TlsConfig, v) } // GetTokenUrl returns the TokenUrl field value -func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetTokenUrl() *string { - if o == nil || IsNil(o.TokenUrl) { - var ret *string - return ret - } - - return o.TokenUrl +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetTokenUrl() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlRetType) { + ret, _ = o.GetTokenUrlOk() + return ret } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) GetTokenUrlOk() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlRetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlAttributeTypeOk(o.TokenUrl) } // SetTokenUrl sets field value -func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetTokenUrl(v *string) { - o.TokenUrl = v +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2) SetTokenUrl(v CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlRetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlAttributeType(&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 val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientIdAttributeTypeOk(o.ClientId); ok { + toSerialize["ClientId"] = val + } + if val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetClientSecretAttributeTypeOk(o.ClientSecret); ok { + toSerialize["ClientSecret"] = val + } + if val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetScopesAttributeTypeOk(o.Scopes); ok { + toSerialize["Scopes"] = val + } + if val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTlsConfigAttributeTypeOk(o.TlsConfig); ok { + toSerialize["TlsConfig"] = val } - if !IsNil(o.TlsConfig) { - toSerialize["tlsConfig"] = o.TlsConfig + if val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2GetTokenUrlAttributeTypeOk(o.TokenUrl); ok { + toSerialize["TokenUrl"] = val } - toSerialize["tokenUrl"] = o.TokenUrl return toSerialize, nil } 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 c3a2c03a9..8c9c34f38 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 @@ -17,10 +17,30 @@ import ( // checks if the CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig{} +/* + types and functions for insecureSkipVerify +*/ + +// isBoolean +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyAttributeType = *bool +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyArgType = bool +type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyRetType = bool + +func getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyAttributeTypeOk(arg CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyAttributeType) (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyAttributeType(arg *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyAttributeType, val CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyRetType) { + *arg = &val +} + // CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig Configures the scrape request's TLS settings. type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig struct { // Disable validation of the server certificate. - InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"` + InsecureSkipVerify CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyAttributeType `json:"insecureSkipVerify,omitempty"` } // NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig instantiates a new CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig object @@ -29,8 +49,6 @@ type CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig struct { // will change when the set of required properties is changed func NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig() *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig { this := CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig{} - var insecureSkipVerify bool = false - this.InsecureSkipVerify = &insecureSkipVerify return &this } @@ -45,41 +63,32 @@ func NewCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfigWithDefaults() } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) GetInsecureSkipVerify() (res CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyRetType) { + res, _ = o.GetInsecureSkipVerifyOk() + return } // 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 +func (o *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) GetInsecureSkipVerifyOk() (ret CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyRetType, ok bool) { + return getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyAttributeTypeOk(o.InsecureSkipVerify) } // 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 + _, ok := o.GetInsecureSkipVerifyOk() + return ok } // 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) SetInsecureSkipVerify(v CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyRetType) { + setCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyAttributeType(&o.InsecureSkipVerify, v) } func (o CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.InsecureSkipVerify) { - toSerialize["insecureSkipVerify"] = o.InsecureSkipVerify + if val, ok := getCreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfiggetInsecureSkipVerifyAttributeTypeOk(o.InsecureSkipVerify); ok { + toSerialize["InsecureSkipVerify"] = val } return toSerialize, nil } 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 4fdfc5b99..a5362b183 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 @@ -17,22 +17,166 @@ import ( // checks if the CreateScrapeConfigPayloadMetricsRelabelConfigsInner type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateScrapeConfigPayloadMetricsRelabelConfigsInner{} +/* + types and functions for action +*/ + +// isEnumRef +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionAttributeType = *string +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionArgType = string +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionRetType = string + +func getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionAttributeTypeOk(arg CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionAttributeType) (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionAttributeType(arg *CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionAttributeType, val CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionRetType) { + *arg = &val +} + +/* + types and functions for modulus +*/ + +// isNumber +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusAttributeType = *float64 +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusArgType = float64 +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusRetType = float64 + +func getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusAttributeTypeOk(arg CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusAttributeType) (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusAttributeType(arg *CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusAttributeType, val CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusRetType) { + *arg = &val +} + +/* + types and functions for regex +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexAttributeType = *string + +func getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexAttributeTypeOk(arg CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexAttributeType) (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexAttributeType(arg *CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexAttributeType, val CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexArgType = string +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexRetType = string + +/* + types and functions for replacement +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementAttributeType = *string + +func getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementAttributeTypeOk(arg CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementAttributeType) (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementAttributeType(arg *CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementAttributeType, val CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementArgType = string +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementRetType = string + +/* + types and functions for separator +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorAttributeType = *string + +func getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorAttributeTypeOk(arg CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorAttributeType) (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorAttributeType(arg *CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorAttributeType, val CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorArgType = string +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorRetType = string + +/* + types and functions for sourceLabels +*/ + +// isArray +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsAttributeType = *[]string +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsArgType = []string +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsRetType = []string + +func getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsAttributeTypeOk(arg CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsAttributeType) (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsAttributeType(arg *CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsAttributeType, val CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsRetType) { + *arg = &val +} + +/* + types and functions for targetLabel +*/ + +// isNotNullableString +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelAttributeType = *string + +func getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelAttributeTypeOk(arg CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelAttributeType) (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelAttributeType(arg *CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelAttributeType, val CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelRetType) { + *arg = &val +} + +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelArgType = string +type CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelRetType = string + // 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 - Action *string `json:"action,omitempty"` + Action CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionAttributeType `json:"action,omitempty"` // Modulus to take of the hash of the source label values. - Modulus *float64 `json:"modulus,omitempty"` + Modulus CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusAttributeType `json:"modulus,omitempty"` // Regular expression against which the extracted value is matched. - Regex *string `json:"regex,omitempty"` + Regex CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexAttributeType `json:"regex,omitempty"` // Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. - Replacement *string `json:"replacement,omitempty"` + Replacement CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementAttributeType `json:"replacement,omitempty"` // Separator placed between concatenated source label values. - Separator *string `json:"separator,omitempty"` + Separator CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorAttributeType `json:"separator,omitempty"` // The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions. - SourceLabels *[]string `json:"sourceLabels,omitempty"` + SourceLabels CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsAttributeType `json:"sourceLabels,omitempty"` // 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"` + TargetLabel CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelAttributeType `json:"targetLabel,omitempty"` } // NewCreateScrapeConfigPayloadMetricsRelabelConfigsInner instantiates a new CreateScrapeConfigPayloadMetricsRelabelConfigsInner object @@ -41,14 +185,6 @@ type CreateScrapeConfigPayloadMetricsRelabelConfigsInner struct { // 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 } @@ -69,251 +205,188 @@ func NewCreateScrapeConfigPayloadMetricsRelabelConfigsInnerWithDefaults() *Creat } // 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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetAction() (res CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionRetType) { + res, _ = o.GetActionOk() + return } // 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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetActionOk() (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionRetType, ok bool) { + return getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionAttributeTypeOk(o.Action) } // 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 + _, ok := o.GetActionOk() + return ok } // SetAction gets a reference to the given string and assigns it to the Action field. -func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetAction(v *string) { - o.Action = v +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetAction(v CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionRetType) { + setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionAttributeType(&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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetModulus() (res CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusRetType) { + res, _ = o.GetModulusOk() + return } // 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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetModulusOk() (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusRetType, ok bool) { + return getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusAttributeTypeOk(o.Modulus) } // 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 + _, ok := o.GetModulusOk() + return ok } // SetModulus gets a reference to the given float64 and assigns it to the Modulus field. -func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetModulus(v *float64) { - o.Modulus = v +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetModulus(v CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusRetType) { + setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusAttributeType(&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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetRegex() (res CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexRetType) { + res, _ = o.GetRegexOk() + return } // 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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetRegexOk() (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexRetType, ok bool) { + return getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexAttributeTypeOk(o.Regex) } // 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 + _, ok := o.GetRegexOk() + return ok } // SetRegex gets a reference to the given string and assigns it to the Regex field. -func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetRegex(v *string) { - o.Regex = v +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetRegex(v CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexRetType) { + setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexAttributeType(&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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetReplacement() (res CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementRetType) { + res, _ = o.GetReplacementOk() + return } // 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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetReplacementOk() (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementRetType, ok bool) { + return getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementAttributeTypeOk(o.Replacement) } // 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 + _, ok := o.GetReplacementOk() + return ok } // SetReplacement gets a reference to the given string and assigns it to the Replacement field. -func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetReplacement(v *string) { - o.Replacement = v +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetReplacement(v CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementRetType) { + setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementAttributeType(&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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetSeparator() (res CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorRetType) { + res, _ = o.GetSeparatorOk() + return } // 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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetSeparatorOk() (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorRetType, ok bool) { + return getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorAttributeTypeOk(o.Separator) } // 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 + _, ok := o.GetSeparatorOk() + return ok } // SetSeparator gets a reference to the given string and assigns it to the Separator field. -func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetSeparator(v *string) { - o.Separator = v +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetSeparator(v CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorRetType) { + setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorAttributeType(&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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetSourceLabels() (res CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsRetType) { + res, _ = o.GetSourceLabelsOk() + return } // 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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetSourceLabelsOk() (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsRetType, ok bool) { + return getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsAttributeTypeOk(o.SourceLabels) } // 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 + _, ok := o.GetSourceLabelsOk() + return ok } // SetSourceLabels gets a reference to the given []string and assigns it to the SourceLabels field. -func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetSourceLabels(v *[]string) { - o.SourceLabels = v +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) SetSourceLabels(v CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsRetType) { + setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsAttributeType(&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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetTargetLabel() (res CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelRetType) { + res, _ = o.GetTargetLabelOk() + return } // 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 +func (o *CreateScrapeConfigPayloadMetricsRelabelConfigsInner) GetTargetLabelOk() (ret CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelRetType, ok bool) { + return getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelAttributeTypeOk(o.TargetLabel) } // 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 + _, ok := o.GetTargetLabelOk() + return ok } // 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) SetTargetLabel(v CreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelRetType) { + setCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelAttributeType(&o.TargetLabel, v) } func (o CreateScrapeConfigPayloadMetricsRelabelConfigsInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Action) { - toSerialize["action"] = o.Action + if val, ok := getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetActionAttributeTypeOk(o.Action); ok { + toSerialize["Action"] = val } - if !IsNil(o.Modulus) { - toSerialize["modulus"] = o.Modulus + if val, ok := getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetModulusAttributeTypeOk(o.Modulus); ok { + toSerialize["Modulus"] = val } - if !IsNil(o.Regex) { - toSerialize["regex"] = o.Regex + if val, ok := getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetRegexAttributeTypeOk(o.Regex); ok { + toSerialize["Regex"] = val } - if !IsNil(o.Replacement) { - toSerialize["replacement"] = o.Replacement + if val, ok := getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetReplacementAttributeTypeOk(o.Replacement); ok { + toSerialize["Replacement"] = val } - if !IsNil(o.Separator) { - toSerialize["separator"] = o.Separator + if val, ok := getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSeparatorAttributeTypeOk(o.Separator); ok { + toSerialize["Separator"] = val } - if !IsNil(o.SourceLabels) { - toSerialize["sourceLabels"] = o.SourceLabels + if val, ok := getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetSourceLabelsAttributeTypeOk(o.SourceLabels); ok { + toSerialize["SourceLabels"] = val } - if !IsNil(o.TargetLabel) { - toSerialize["targetLabel"] = o.TargetLabel + if val, ok := getCreateScrapeConfigPayloadMetricsRelabelConfigsInnerGetTargetLabelAttributeTypeOk(o.TargetLabel); ok { + toSerialize["TargetLabel"] = val } return toSerialize, nil } 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 19e955e8f..36e798e37 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 @@ -17,13 +17,53 @@ import ( // checks if the CreateScrapeConfigPayloadStaticConfigsInner type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateScrapeConfigPayloadStaticConfigsInner{} +/* + types and functions for labels +*/ + +// isFreeform +type CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType = *map[string]interface{} +type CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsArgType = map[string]interface{} +type CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType = map[string]interface{} + +func getCreateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeTypeOk(arg CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType) (ret CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType(arg *CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType, val CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType) { + *arg = &val +} + +/* + types and functions for targets +*/ + +// isArray +type CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType = *[]string +type CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsArgType = []string +type CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType = []string + +func getCreateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeTypeOk(arg CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType) (ret CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType(arg *CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType, val CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType) { + *arg = &val +} + // 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 - Labels *map[string]interface{} `json:"labels,omitempty"` + Labels CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType `json:"labels,omitempty"` // The targets specified by the static config. // REQUIRED - Targets *[]string `json:"targets"` + Targets CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType `json:"targets"` } type _CreateScrapeConfigPayloadStaticConfigsInner CreateScrapeConfigPayloadStaticConfigsInner @@ -32,9 +72,9 @@ type _CreateScrapeConfigPayloadStaticConfigsInner CreateScrapeConfigPayloadStati // 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 { +func NewCreateScrapeConfigPayloadStaticConfigsInner(targets CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsArgType) *CreateScrapeConfigPayloadStaticConfigsInner { this := CreateScrapeConfigPayloadStaticConfigsInner{} - this.Targets = targets + setCreateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType(&this.Targets, targets) return &this } @@ -47,67 +87,53 @@ func NewCreateScrapeConfigPayloadStaticConfigsInnerWithDefaults() *CreateScrapeC } // 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 +func (o *CreateScrapeConfigPayloadStaticConfigsInner) GetLabels() (res CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return } // 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 +func (o *CreateScrapeConfigPayloadStaticConfigsInner) GetLabelsOk() (ret CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType, ok bool) { + return getCreateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeTypeOk(o.Labels) } // 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 + _, ok := o.GetLabelsOk() + return ok } // 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 +func (o *CreateScrapeConfigPayloadStaticConfigsInner) SetLabels(v CreateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType) { + setCreateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType(&o.Labels, v) } // GetTargets returns the Targets field value -func (o *CreateScrapeConfigPayloadStaticConfigsInner) GetTargets() *[]string { - if o == nil || IsNil(o.Targets) { - var ret *[]string - return ret - } - - return o.Targets +func (o *CreateScrapeConfigPayloadStaticConfigsInner) GetTargets() (ret CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType) { + ret, _ = o.GetTargetsOk() + return ret } // 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 +func (o *CreateScrapeConfigPayloadStaticConfigsInner) GetTargetsOk() (ret CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType, ok bool) { + return getCreateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeTypeOk(o.Targets) } // SetTargets sets field value -func (o *CreateScrapeConfigPayloadStaticConfigsInner) SetTargets(v *[]string) { - o.Targets = v +func (o *CreateScrapeConfigPayloadStaticConfigsInner) SetTargets(v CreateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType) { + setCreateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType(&o.Targets, v) } func (o CreateScrapeConfigPayloadStaticConfigsInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels + if val, ok := getCreateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } + if val, ok := getCreateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeTypeOk(o.Targets); ok { + toSerialize["Targets"] = val } - toSerialize["targets"] = o.Targets return toSerialize, nil } diff --git a/services/observability/model_credentials.go b/services/observability/model_credentials.go index 225ba8ecb..271d3a16b 100644 --- a/services/observability/model_credentials.go +++ b/services/observability/model_credentials.go @@ -17,12 +17,54 @@ import ( // checks if the Credentials type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Credentials{} +/* + types and functions for password +*/ + +// isNotNullableString +type CredentialsGetPasswordAttributeType = *string + +func getCredentialsGetPasswordAttributeTypeOk(arg CredentialsGetPasswordAttributeType) (ret CredentialsGetPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsGetPasswordAttributeType(arg *CredentialsGetPasswordAttributeType, val CredentialsGetPasswordRetType) { + *arg = &val +} + +type CredentialsGetPasswordArgType = string +type CredentialsGetPasswordRetType = string + +/* + types and functions for username +*/ + +// isNotNullableString +type CredentialsGetUsernameAttributeType = *string + +func getCredentialsGetUsernameAttributeTypeOk(arg CredentialsGetUsernameAttributeType) (ret CredentialsGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsGetUsernameAttributeType(arg *CredentialsGetUsernameAttributeType, val CredentialsGetUsernameRetType) { + *arg = &val +} + +type CredentialsGetUsernameArgType = string +type CredentialsGetUsernameRetType = string + // Credentials struct for Credentials type Credentials struct { // REQUIRED - Password *string `json:"password"` + Password CredentialsGetPasswordAttributeType `json:"password"` // REQUIRED - Username *string `json:"username"` + Username CredentialsGetUsernameAttributeType `json:"username"` } type _Credentials Credentials @@ -31,10 +73,10 @@ type _Credentials Credentials // 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 { +func NewCredentials(password CredentialsGetPasswordArgType, username CredentialsGetUsernameArgType) *Credentials { this := Credentials{} - this.Password = password - this.Username = username + setCredentialsGetPasswordAttributeType(&this.Password, password) + setCredentialsGetUsernameAttributeType(&this.Username, username) return &this } @@ -47,57 +89,47 @@ func NewCredentialsWithDefaults() *Credentials { } // GetPassword returns the Password field value -func (o *Credentials) GetPassword() *string { - if o == nil || IsNil(o.Password) { - var ret *string - return ret - } - - return o.Password +func (o *Credentials) GetPassword() (ret CredentialsGetPasswordRetType) { + ret, _ = o.GetPasswordOk() + return ret } // 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 +func (o *Credentials) GetPasswordOk() (ret CredentialsGetPasswordRetType, ok bool) { + return getCredentialsGetPasswordAttributeTypeOk(o.Password) } // SetPassword sets field value -func (o *Credentials) SetPassword(v *string) { - o.Password = v +func (o *Credentials) SetPassword(v CredentialsGetPasswordRetType) { + setCredentialsGetPasswordAttributeType(&o.Password, v) } // GetUsername returns the Username field value -func (o *Credentials) GetUsername() *string { - if o == nil || IsNil(o.Username) { - var ret *string - return ret - } - - return o.Username +func (o *Credentials) GetUsername() (ret CredentialsGetUsernameRetType) { + ret, _ = o.GetUsernameOk() + return ret } // 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 +func (o *Credentials) GetUsernameOk() (ret CredentialsGetUsernameRetType, ok bool) { + return getCredentialsGetUsernameAttributeTypeOk(o.Username) } // SetUsername sets field value -func (o *Credentials) SetUsername(v *string) { - o.Username = v +func (o *Credentials) SetUsername(v CredentialsGetUsernameRetType) { + setCredentialsGetUsernameAttributeType(&o.Username, v) } func (o Credentials) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["password"] = o.Password - toSerialize["username"] = o.Username + if val, ok := getCredentialsGetPasswordAttributeTypeOk(o.Password); ok { + toSerialize["Password"] = val + } + if val, ok := getCredentialsGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val + } return toSerialize, nil } diff --git a/services/observability/model_credentials_remote_write_config.go b/services/observability/model_credentials_remote_write_config.go index a122c4f61..b5895367e 100644 --- a/services/observability/model_credentials_remote_write_config.go +++ b/services/observability/model_credentials_remote_write_config.go @@ -17,14 +17,75 @@ import ( // checks if the CredentialsRemoteWriteConfig type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CredentialsRemoteWriteConfig{} +/* + types and functions for credentialsMaxLimit +*/ + +// isInteger +type CredentialsRemoteWriteConfigGetCredentialsMaxLimitAttributeType = *int64 +type CredentialsRemoteWriteConfigGetCredentialsMaxLimitArgType = int64 +type CredentialsRemoteWriteConfigGetCredentialsMaxLimitRetType = int64 + +func getCredentialsRemoteWriteConfigGetCredentialsMaxLimitAttributeTypeOk(arg CredentialsRemoteWriteConfigGetCredentialsMaxLimitAttributeType) (ret CredentialsRemoteWriteConfigGetCredentialsMaxLimitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsRemoteWriteConfigGetCredentialsMaxLimitAttributeType(arg *CredentialsRemoteWriteConfigGetCredentialsMaxLimitAttributeType, val CredentialsRemoteWriteConfigGetCredentialsMaxLimitRetType) { + *arg = &val +} + +/* + types and functions for maxLimit +*/ + +// isInteger +type CredentialsRemoteWriteConfigGetMaxLimitAttributeType = *int64 +type CredentialsRemoteWriteConfigGetMaxLimitArgType = int64 +type CredentialsRemoteWriteConfigGetMaxLimitRetType = int64 + +func getCredentialsRemoteWriteConfigGetMaxLimitAttributeTypeOk(arg CredentialsRemoteWriteConfigGetMaxLimitAttributeType) (ret CredentialsRemoteWriteConfigGetMaxLimitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsRemoteWriteConfigGetMaxLimitAttributeType(arg *CredentialsRemoteWriteConfigGetMaxLimitAttributeType, val CredentialsRemoteWriteConfigGetMaxLimitRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type CredentialsRemoteWriteConfigGetMessageAttributeType = *string + +func getCredentialsRemoteWriteConfigGetMessageAttributeTypeOk(arg CredentialsRemoteWriteConfigGetMessageAttributeType) (ret CredentialsRemoteWriteConfigGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsRemoteWriteConfigGetMessageAttributeType(arg *CredentialsRemoteWriteConfigGetMessageAttributeType, val CredentialsRemoteWriteConfigGetMessageRetType) { + *arg = &val +} + +type CredentialsRemoteWriteConfigGetMessageArgType = string +type CredentialsRemoteWriteConfigGetMessageRetType = string + // CredentialsRemoteWriteConfig struct for CredentialsRemoteWriteConfig type CredentialsRemoteWriteConfig struct { // REQUIRED - CredentialsMaxLimit *int64 `json:"credentialsMaxLimit"` + CredentialsMaxLimit CredentialsRemoteWriteConfigGetCredentialsMaxLimitAttributeType `json:"credentialsMaxLimit"` // REQUIRED - MaxLimit *int64 `json:"maxLimit"` + MaxLimit CredentialsRemoteWriteConfigGetMaxLimitAttributeType `json:"maxLimit"` // REQUIRED - Message *string `json:"message"` + Message CredentialsRemoteWriteConfigGetMessageAttributeType `json:"message"` } type _CredentialsRemoteWriteConfig CredentialsRemoteWriteConfig @@ -33,11 +94,11 @@ type _CredentialsRemoteWriteConfig CredentialsRemoteWriteConfig // 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 { +func NewCredentialsRemoteWriteConfig(credentialsMaxLimit CredentialsRemoteWriteConfigGetCredentialsMaxLimitArgType, maxLimit CredentialsRemoteWriteConfigGetMaxLimitArgType, message CredentialsRemoteWriteConfigGetMessageArgType) *CredentialsRemoteWriteConfig { this := CredentialsRemoteWriteConfig{} - this.CredentialsMaxLimit = credentialsMaxLimit - this.MaxLimit = maxLimit - this.Message = message + setCredentialsRemoteWriteConfigGetCredentialsMaxLimitAttributeType(&this.CredentialsMaxLimit, credentialsMaxLimit) + setCredentialsRemoteWriteConfigGetMaxLimitAttributeType(&this.MaxLimit, maxLimit) + setCredentialsRemoteWriteConfigGetMessageAttributeType(&this.Message, message) return &this } @@ -50,82 +111,67 @@ func NewCredentialsRemoteWriteConfigWithDefaults() *CredentialsRemoteWriteConfig } // GetCredentialsMaxLimit returns the CredentialsMaxLimit field value -func (o *CredentialsRemoteWriteConfig) GetCredentialsMaxLimit() *int64 { - if o == nil || IsNil(o.CredentialsMaxLimit) { - var ret *int64 - return ret - } - - return o.CredentialsMaxLimit +func (o *CredentialsRemoteWriteConfig) GetCredentialsMaxLimit() (ret CredentialsRemoteWriteConfigGetCredentialsMaxLimitRetType) { + ret, _ = o.GetCredentialsMaxLimitOk() + return ret } // 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 +func (o *CredentialsRemoteWriteConfig) GetCredentialsMaxLimitOk() (ret CredentialsRemoteWriteConfigGetCredentialsMaxLimitRetType, ok bool) { + return getCredentialsRemoteWriteConfigGetCredentialsMaxLimitAttributeTypeOk(o.CredentialsMaxLimit) } // SetCredentialsMaxLimit sets field value -func (o *CredentialsRemoteWriteConfig) SetCredentialsMaxLimit(v *int64) { - o.CredentialsMaxLimit = v +func (o *CredentialsRemoteWriteConfig) SetCredentialsMaxLimit(v CredentialsRemoteWriteConfigGetCredentialsMaxLimitRetType) { + setCredentialsRemoteWriteConfigGetCredentialsMaxLimitAttributeType(&o.CredentialsMaxLimit, v) } // GetMaxLimit returns the MaxLimit field value -func (o *CredentialsRemoteWriteConfig) GetMaxLimit() *int64 { - if o == nil || IsNil(o.MaxLimit) { - var ret *int64 - return ret - } - - return o.MaxLimit +func (o *CredentialsRemoteWriteConfig) GetMaxLimit() (ret CredentialsRemoteWriteConfigGetMaxLimitRetType) { + ret, _ = o.GetMaxLimitOk() + return ret } // 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 +func (o *CredentialsRemoteWriteConfig) GetMaxLimitOk() (ret CredentialsRemoteWriteConfigGetMaxLimitRetType, ok bool) { + return getCredentialsRemoteWriteConfigGetMaxLimitAttributeTypeOk(o.MaxLimit) } // SetMaxLimit sets field value -func (o *CredentialsRemoteWriteConfig) SetMaxLimit(v *int64) { - o.MaxLimit = v +func (o *CredentialsRemoteWriteConfig) SetMaxLimit(v CredentialsRemoteWriteConfigGetMaxLimitRetType) { + setCredentialsRemoteWriteConfigGetMaxLimitAttributeType(&o.MaxLimit, v) } // GetMessage returns the Message field value -func (o *CredentialsRemoteWriteConfig) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *CredentialsRemoteWriteConfig) GetMessage() (ret CredentialsRemoteWriteConfigGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *CredentialsRemoteWriteConfig) GetMessageOk() (ret CredentialsRemoteWriteConfigGetMessageRetType, ok bool) { + return getCredentialsRemoteWriteConfigGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *CredentialsRemoteWriteConfig) SetMessage(v *string) { - o.Message = v +func (o *CredentialsRemoteWriteConfig) SetMessage(v CredentialsRemoteWriteConfigGetMessageRetType) { + setCredentialsRemoteWriteConfigGetMessageAttributeType(&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 + if val, ok := getCredentialsRemoteWriteConfigGetCredentialsMaxLimitAttributeTypeOk(o.CredentialsMaxLimit); ok { + toSerialize["CredentialsMaxLimit"] = val + } + if val, ok := getCredentialsRemoteWriteConfigGetMaxLimitAttributeTypeOk(o.MaxLimit); ok { + toSerialize["MaxLimit"] = val + } + if val, ok := getCredentialsRemoteWriteConfigGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_credentials_remote_write_delete_response.go b/services/observability/model_credentials_remote_write_delete_response.go index 16f857ca0..7f536f059 100644 --- a/services/observability/model_credentials_remote_write_delete_response.go +++ b/services/observability/model_credentials_remote_write_delete_response.go @@ -17,12 +17,53 @@ import ( // checks if the CredentialsRemoteWriteDeleteResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CredentialsRemoteWriteDeleteResponse{} +/* + types and functions for maxLimit +*/ + +// isInteger +type CredentialsRemoteWriteDeleteResponseGetMaxLimitAttributeType = *int64 +type CredentialsRemoteWriteDeleteResponseGetMaxLimitArgType = int64 +type CredentialsRemoteWriteDeleteResponseGetMaxLimitRetType = int64 + +func getCredentialsRemoteWriteDeleteResponseGetMaxLimitAttributeTypeOk(arg CredentialsRemoteWriteDeleteResponseGetMaxLimitAttributeType) (ret CredentialsRemoteWriteDeleteResponseGetMaxLimitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsRemoteWriteDeleteResponseGetMaxLimitAttributeType(arg *CredentialsRemoteWriteDeleteResponseGetMaxLimitAttributeType, val CredentialsRemoteWriteDeleteResponseGetMaxLimitRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type CredentialsRemoteWriteDeleteResponseGetMessageAttributeType = *string + +func getCredentialsRemoteWriteDeleteResponseGetMessageAttributeTypeOk(arg CredentialsRemoteWriteDeleteResponseGetMessageAttributeType) (ret CredentialsRemoteWriteDeleteResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsRemoteWriteDeleteResponseGetMessageAttributeType(arg *CredentialsRemoteWriteDeleteResponseGetMessageAttributeType, val CredentialsRemoteWriteDeleteResponseGetMessageRetType) { + *arg = &val +} + +type CredentialsRemoteWriteDeleteResponseGetMessageArgType = string +type CredentialsRemoteWriteDeleteResponseGetMessageRetType = string + // CredentialsRemoteWriteDeleteResponse struct for CredentialsRemoteWriteDeleteResponse type CredentialsRemoteWriteDeleteResponse struct { // REQUIRED - MaxLimit *int64 `json:"maxLimit"` + MaxLimit CredentialsRemoteWriteDeleteResponseGetMaxLimitAttributeType `json:"maxLimit"` // REQUIRED - Message *string `json:"message"` + Message CredentialsRemoteWriteDeleteResponseGetMessageAttributeType `json:"message"` } type _CredentialsRemoteWriteDeleteResponse CredentialsRemoteWriteDeleteResponse @@ -31,10 +72,10 @@ type _CredentialsRemoteWriteDeleteResponse CredentialsRemoteWriteDeleteResponse // 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 { +func NewCredentialsRemoteWriteDeleteResponse(maxLimit CredentialsRemoteWriteDeleteResponseGetMaxLimitArgType, message CredentialsRemoteWriteDeleteResponseGetMessageArgType) *CredentialsRemoteWriteDeleteResponse { this := CredentialsRemoteWriteDeleteResponse{} - this.MaxLimit = maxLimit - this.Message = message + setCredentialsRemoteWriteDeleteResponseGetMaxLimitAttributeType(&this.MaxLimit, maxLimit) + setCredentialsRemoteWriteDeleteResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewCredentialsRemoteWriteDeleteResponseWithDefaults() *CredentialsRemoteWri } // GetMaxLimit returns the MaxLimit field value -func (o *CredentialsRemoteWriteDeleteResponse) GetMaxLimit() *int64 { - if o == nil || IsNil(o.MaxLimit) { - var ret *int64 - return ret - } - - return o.MaxLimit +func (o *CredentialsRemoteWriteDeleteResponse) GetMaxLimit() (ret CredentialsRemoteWriteDeleteResponseGetMaxLimitRetType) { + ret, _ = o.GetMaxLimitOk() + return ret } // 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 +func (o *CredentialsRemoteWriteDeleteResponse) GetMaxLimitOk() (ret CredentialsRemoteWriteDeleteResponseGetMaxLimitRetType, ok bool) { + return getCredentialsRemoteWriteDeleteResponseGetMaxLimitAttributeTypeOk(o.MaxLimit) } // SetMaxLimit sets field value -func (o *CredentialsRemoteWriteDeleteResponse) SetMaxLimit(v *int64) { - o.MaxLimit = v +func (o *CredentialsRemoteWriteDeleteResponse) SetMaxLimit(v CredentialsRemoteWriteDeleteResponseGetMaxLimitRetType) { + setCredentialsRemoteWriteDeleteResponseGetMaxLimitAttributeType(&o.MaxLimit, v) } // GetMessage returns the Message field value -func (o *CredentialsRemoteWriteDeleteResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *CredentialsRemoteWriteDeleteResponse) GetMessage() (ret CredentialsRemoteWriteDeleteResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *CredentialsRemoteWriteDeleteResponse) GetMessageOk() (ret CredentialsRemoteWriteDeleteResponseGetMessageRetType, ok bool) { + return getCredentialsRemoteWriteDeleteResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *CredentialsRemoteWriteDeleteResponse) SetMessage(v *string) { - o.Message = v +func (o *CredentialsRemoteWriteDeleteResponse) SetMessage(v CredentialsRemoteWriteDeleteResponseGetMessageRetType) { + setCredentialsRemoteWriteDeleteResponseGetMessageAttributeType(&o.Message, v) } func (o CredentialsRemoteWriteDeleteResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["maxLimit"] = o.MaxLimit - toSerialize["message"] = o.Message + if val, ok := getCredentialsRemoteWriteDeleteResponseGetMaxLimitAttributeTypeOk(o.MaxLimit); ok { + toSerialize["MaxLimit"] = val + } + if val, ok := getCredentialsRemoteWriteDeleteResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_delete_scrape_config_response.go b/services/observability/model_delete_scrape_config_response.go index f6fe0d2c7..f87c603de 100644 --- a/services/observability/model_delete_scrape_config_response.go +++ b/services/observability/model_delete_scrape_config_response.go @@ -17,12 +17,53 @@ import ( // checks if the DeleteScrapeConfigResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DeleteScrapeConfigResponse{} +/* + types and functions for data +*/ + +// isArray +type DeleteScrapeConfigResponseGetDataAttributeType = *[]Job +type DeleteScrapeConfigResponseGetDataArgType = []Job +type DeleteScrapeConfigResponseGetDataRetType = []Job + +func getDeleteScrapeConfigResponseGetDataAttributeTypeOk(arg DeleteScrapeConfigResponseGetDataAttributeType) (ret DeleteScrapeConfigResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDeleteScrapeConfigResponseGetDataAttributeType(arg *DeleteScrapeConfigResponseGetDataAttributeType, val DeleteScrapeConfigResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type DeleteScrapeConfigResponseGetMessageAttributeType = *string + +func getDeleteScrapeConfigResponseGetMessageAttributeTypeOk(arg DeleteScrapeConfigResponseGetMessageAttributeType) (ret DeleteScrapeConfigResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDeleteScrapeConfigResponseGetMessageAttributeType(arg *DeleteScrapeConfigResponseGetMessageAttributeType, val DeleteScrapeConfigResponseGetMessageRetType) { + *arg = &val +} + +type DeleteScrapeConfigResponseGetMessageArgType = string +type DeleteScrapeConfigResponseGetMessageRetType = string + // DeleteScrapeConfigResponse struct for DeleteScrapeConfigResponse type DeleteScrapeConfigResponse struct { // REQUIRED - Data *[]Job `json:"data"` + Data DeleteScrapeConfigResponseGetDataAttributeType `json:"data"` // REQUIRED - Message *string `json:"message"` + Message DeleteScrapeConfigResponseGetMessageAttributeType `json:"message"` } type _DeleteScrapeConfigResponse DeleteScrapeConfigResponse @@ -31,10 +72,10 @@ type _DeleteScrapeConfigResponse DeleteScrapeConfigResponse // 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 { +func NewDeleteScrapeConfigResponse(data DeleteScrapeConfigResponseGetDataArgType, message DeleteScrapeConfigResponseGetMessageArgType) *DeleteScrapeConfigResponse { this := DeleteScrapeConfigResponse{} - this.Data = data - this.Message = message + setDeleteScrapeConfigResponseGetDataAttributeType(&this.Data, data) + setDeleteScrapeConfigResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewDeleteScrapeConfigResponseWithDefaults() *DeleteScrapeConfigResponse { } // GetData returns the Data field value -func (o *DeleteScrapeConfigResponse) GetData() *[]Job { - if o == nil || IsNil(o.Data) { - var ret *[]Job - return ret - } - - return o.Data +func (o *DeleteScrapeConfigResponse) GetData() (ret DeleteScrapeConfigResponseGetDataRetType) { + ret, _ = o.GetDataOk() + return ret } // 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 +func (o *DeleteScrapeConfigResponse) GetDataOk() (ret DeleteScrapeConfigResponseGetDataRetType, ok bool) { + return getDeleteScrapeConfigResponseGetDataAttributeTypeOk(o.Data) } // SetData sets field value -func (o *DeleteScrapeConfigResponse) SetData(v *[]Job) { - o.Data = v +func (o *DeleteScrapeConfigResponse) SetData(v DeleteScrapeConfigResponseGetDataRetType) { + setDeleteScrapeConfigResponseGetDataAttributeType(&o.Data, v) } // GetMessage returns the Message field value -func (o *DeleteScrapeConfigResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *DeleteScrapeConfigResponse) GetMessage() (ret DeleteScrapeConfigResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *DeleteScrapeConfigResponse) GetMessageOk() (ret DeleteScrapeConfigResponseGetMessageRetType, ok bool) { + return getDeleteScrapeConfigResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *DeleteScrapeConfigResponse) SetMessage(v *string) { - o.Message = v +func (o *DeleteScrapeConfigResponse) SetMessage(v DeleteScrapeConfigResponseGetMessageRetType) { + setDeleteScrapeConfigResponseGetMessageAttributeType(&o.Message, v) } func (o DeleteScrapeConfigResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["data"] = o.Data - toSerialize["message"] = o.Message + if val, ok := getDeleteScrapeConfigResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getDeleteScrapeConfigResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_email_config.go b/services/observability/model_email_config.go index e97e8dd5e..f96e311da 100644 --- a/services/observability/model_email_config.go +++ b/services/observability/model_email_config.go @@ -17,16 +17,162 @@ import ( // checks if the EmailConfig type satisfies the MappedNullable interface at compile time var _ MappedNullable = &EmailConfig{} +/* + types and functions for authIdentity +*/ + +// isNotNullableString +type EmailConfigGetAuthIdentityAttributeType = *string + +func getEmailConfigGetAuthIdentityAttributeTypeOk(arg EmailConfigGetAuthIdentityAttributeType) (ret EmailConfigGetAuthIdentityRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setEmailConfigGetAuthIdentityAttributeType(arg *EmailConfigGetAuthIdentityAttributeType, val EmailConfigGetAuthIdentityRetType) { + *arg = &val +} + +type EmailConfigGetAuthIdentityArgType = string +type EmailConfigGetAuthIdentityRetType = string + +/* + types and functions for authPassword +*/ + +// isNotNullableString +type EmailConfigGetAuthPasswordAttributeType = *string + +func getEmailConfigGetAuthPasswordAttributeTypeOk(arg EmailConfigGetAuthPasswordAttributeType) (ret EmailConfigGetAuthPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setEmailConfigGetAuthPasswordAttributeType(arg *EmailConfigGetAuthPasswordAttributeType, val EmailConfigGetAuthPasswordRetType) { + *arg = &val +} + +type EmailConfigGetAuthPasswordArgType = string +type EmailConfigGetAuthPasswordRetType = string + +/* + types and functions for authUsername +*/ + +// isNotNullableString +type EmailConfigGetAuthUsernameAttributeType = *string + +func getEmailConfigGetAuthUsernameAttributeTypeOk(arg EmailConfigGetAuthUsernameAttributeType) (ret EmailConfigGetAuthUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setEmailConfigGetAuthUsernameAttributeType(arg *EmailConfigGetAuthUsernameAttributeType, val EmailConfigGetAuthUsernameRetType) { + *arg = &val +} + +type EmailConfigGetAuthUsernameArgType = string +type EmailConfigGetAuthUsernameRetType = string + +/* + types and functions for from +*/ + +// isNotNullableString +type EmailConfigGetFromAttributeType = *string + +func getEmailConfigGetFromAttributeTypeOk(arg EmailConfigGetFromAttributeType) (ret EmailConfigGetFromRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setEmailConfigGetFromAttributeType(arg *EmailConfigGetFromAttributeType, val EmailConfigGetFromRetType) { + *arg = &val +} + +type EmailConfigGetFromArgType = string +type EmailConfigGetFromRetType = string + +/* + types and functions for sendResolved +*/ + +// isBoolean +type EmailConfiggetSendResolvedAttributeType = *bool +type EmailConfiggetSendResolvedArgType = bool +type EmailConfiggetSendResolvedRetType = bool + +func getEmailConfiggetSendResolvedAttributeTypeOk(arg EmailConfiggetSendResolvedAttributeType) (ret EmailConfiggetSendResolvedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setEmailConfiggetSendResolvedAttributeType(arg *EmailConfiggetSendResolvedAttributeType, val EmailConfiggetSendResolvedRetType) { + *arg = &val +} + +/* + types and functions for smarthost +*/ + +// isNotNullableString +type EmailConfigGetSmarthostAttributeType = *string + +func getEmailConfigGetSmarthostAttributeTypeOk(arg EmailConfigGetSmarthostAttributeType) (ret EmailConfigGetSmarthostRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setEmailConfigGetSmarthostAttributeType(arg *EmailConfigGetSmarthostAttributeType, val EmailConfigGetSmarthostRetType) { + *arg = &val +} + +type EmailConfigGetSmarthostArgType = string +type EmailConfigGetSmarthostRetType = string + +/* + types and functions for to +*/ + +// isNotNullableString +type EmailConfigGetToAttributeType = *string + +func getEmailConfigGetToAttributeTypeOk(arg EmailConfigGetToAttributeType) (ret EmailConfigGetToRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setEmailConfigGetToAttributeType(arg *EmailConfigGetToAttributeType, val EmailConfigGetToRetType) { + *arg = &val +} + +type EmailConfigGetToArgType = string +type EmailConfigGetToRetType = string + // EmailConfig struct for EmailConfig type EmailConfig struct { - AuthIdentity *string `json:"authIdentity,omitempty"` - AuthPassword *string `json:"authPassword,omitempty"` - AuthUsername *string `json:"authUsername,omitempty"` - From *string `json:"from,omitempty"` - SendResolved *bool `json:"sendResolved,omitempty"` - Smarthost *string `json:"smarthost,omitempty"` + AuthIdentity EmailConfigGetAuthIdentityAttributeType `json:"authIdentity,omitempty"` + AuthPassword EmailConfigGetAuthPasswordAttributeType `json:"authPassword,omitempty"` + AuthUsername EmailConfigGetAuthUsernameAttributeType `json:"authUsername,omitempty"` + From EmailConfigGetFromAttributeType `json:"from,omitempty"` + SendResolved EmailConfiggetSendResolvedAttributeType `json:"sendResolved,omitempty"` + Smarthost EmailConfigGetSmarthostAttributeType `json:"smarthost,omitempty"` // REQUIRED - To *string `json:"to"` + To EmailConfigGetToAttributeType `json:"to"` } type _EmailConfig EmailConfig @@ -35,11 +181,9 @@ type _EmailConfig EmailConfig // 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 { +func NewEmailConfig(to EmailConfigGetToArgType) *EmailConfig { this := EmailConfig{} - var sendResolved bool = false - this.SendResolved = &sendResolved - this.To = to + setEmailConfigGetToAttributeType(&this.To, to) return &this } @@ -54,242 +198,183 @@ func NewEmailConfigWithDefaults() *EmailConfig { } // 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 +func (o *EmailConfig) GetAuthIdentity() (res EmailConfigGetAuthIdentityRetType) { + res, _ = o.GetAuthIdentityOk() + return } // 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 +func (o *EmailConfig) GetAuthIdentityOk() (ret EmailConfigGetAuthIdentityRetType, ok bool) { + return getEmailConfigGetAuthIdentityAttributeTypeOk(o.AuthIdentity) } // 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 + _, ok := o.GetAuthIdentityOk() + return ok } // SetAuthIdentity gets a reference to the given string and assigns it to the AuthIdentity field. -func (o *EmailConfig) SetAuthIdentity(v *string) { - o.AuthIdentity = v +func (o *EmailConfig) SetAuthIdentity(v EmailConfigGetAuthIdentityRetType) { + setEmailConfigGetAuthIdentityAttributeType(&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 +func (o *EmailConfig) GetAuthPassword() (res EmailConfigGetAuthPasswordRetType) { + res, _ = o.GetAuthPasswordOk() + return } // 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 +func (o *EmailConfig) GetAuthPasswordOk() (ret EmailConfigGetAuthPasswordRetType, ok bool) { + return getEmailConfigGetAuthPasswordAttributeTypeOk(o.AuthPassword) } // 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 + _, ok := o.GetAuthPasswordOk() + return ok } // SetAuthPassword gets a reference to the given string and assigns it to the AuthPassword field. -func (o *EmailConfig) SetAuthPassword(v *string) { - o.AuthPassword = v +func (o *EmailConfig) SetAuthPassword(v EmailConfigGetAuthPasswordRetType) { + setEmailConfigGetAuthPasswordAttributeType(&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 +func (o *EmailConfig) GetAuthUsername() (res EmailConfigGetAuthUsernameRetType) { + res, _ = o.GetAuthUsernameOk() + return } // 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 +func (o *EmailConfig) GetAuthUsernameOk() (ret EmailConfigGetAuthUsernameRetType, ok bool) { + return getEmailConfigGetAuthUsernameAttributeTypeOk(o.AuthUsername) } // 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 + _, ok := o.GetAuthUsernameOk() + return ok } // SetAuthUsername gets a reference to the given string and assigns it to the AuthUsername field. -func (o *EmailConfig) SetAuthUsername(v *string) { - o.AuthUsername = v +func (o *EmailConfig) SetAuthUsername(v EmailConfigGetAuthUsernameRetType) { + setEmailConfigGetAuthUsernameAttributeType(&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 +func (o *EmailConfig) GetFrom() (res EmailConfigGetFromRetType) { + res, _ = o.GetFromOk() + return } // 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 +func (o *EmailConfig) GetFromOk() (ret EmailConfigGetFromRetType, ok bool) { + return getEmailConfigGetFromAttributeTypeOk(o.From) } // 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 + _, ok := o.GetFromOk() + return ok } // SetFrom gets a reference to the given string and assigns it to the From field. -func (o *EmailConfig) SetFrom(v *string) { - o.From = v +func (o *EmailConfig) SetFrom(v EmailConfigGetFromRetType) { + setEmailConfigGetFromAttributeType(&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 +func (o *EmailConfig) GetSendResolved() (res EmailConfiggetSendResolvedRetType) { + res, _ = o.GetSendResolvedOk() + return } // 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 +func (o *EmailConfig) GetSendResolvedOk() (ret EmailConfiggetSendResolvedRetType, ok bool) { + return getEmailConfiggetSendResolvedAttributeTypeOk(o.SendResolved) } // 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 + _, ok := o.GetSendResolvedOk() + return ok } // SetSendResolved gets a reference to the given bool and assigns it to the SendResolved field. -func (o *EmailConfig) SetSendResolved(v *bool) { - o.SendResolved = v +func (o *EmailConfig) SetSendResolved(v EmailConfiggetSendResolvedRetType) { + setEmailConfiggetSendResolvedAttributeType(&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 +func (o *EmailConfig) GetSmarthost() (res EmailConfigGetSmarthostRetType) { + res, _ = o.GetSmarthostOk() + return } // 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 +func (o *EmailConfig) GetSmarthostOk() (ret EmailConfigGetSmarthostRetType, ok bool) { + return getEmailConfigGetSmarthostAttributeTypeOk(o.Smarthost) } // 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 + _, ok := o.GetSmarthostOk() + return ok } // SetSmarthost gets a reference to the given string and assigns it to the Smarthost field. -func (o *EmailConfig) SetSmarthost(v *string) { - o.Smarthost = v +func (o *EmailConfig) SetSmarthost(v EmailConfigGetSmarthostRetType) { + setEmailConfigGetSmarthostAttributeType(&o.Smarthost, v) } // GetTo returns the To field value -func (o *EmailConfig) GetTo() *string { - if o == nil || IsNil(o.To) { - var ret *string - return ret - } - - return o.To +func (o *EmailConfig) GetTo() (ret EmailConfigGetToRetType) { + ret, _ = o.GetToOk() + return ret } // 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 +func (o *EmailConfig) GetToOk() (ret EmailConfigGetToRetType, ok bool) { + return getEmailConfigGetToAttributeTypeOk(o.To) } // SetTo sets field value -func (o *EmailConfig) SetTo(v *string) { - o.To = v +func (o *EmailConfig) SetTo(v EmailConfigGetToRetType) { + setEmailConfigGetToAttributeType(&o.To, v) } func (o EmailConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.AuthIdentity) { - toSerialize["authIdentity"] = o.AuthIdentity + if val, ok := getEmailConfigGetAuthIdentityAttributeTypeOk(o.AuthIdentity); ok { + toSerialize["AuthIdentity"] = val + } + if val, ok := getEmailConfigGetAuthPasswordAttributeTypeOk(o.AuthPassword); ok { + toSerialize["AuthPassword"] = val } - if !IsNil(o.AuthPassword) { - toSerialize["authPassword"] = o.AuthPassword + if val, ok := getEmailConfigGetAuthUsernameAttributeTypeOk(o.AuthUsername); ok { + toSerialize["AuthUsername"] = val } - if !IsNil(o.AuthUsername) { - toSerialize["authUsername"] = o.AuthUsername + if val, ok := getEmailConfigGetFromAttributeTypeOk(o.From); ok { + toSerialize["From"] = val } - if !IsNil(o.From) { - toSerialize["from"] = o.From + if val, ok := getEmailConfiggetSendResolvedAttributeTypeOk(o.SendResolved); ok { + toSerialize["SendResolved"] = val } - if !IsNil(o.SendResolved) { - toSerialize["sendResolved"] = o.SendResolved + if val, ok := getEmailConfigGetSmarthostAttributeTypeOk(o.Smarthost); ok { + toSerialize["Smarthost"] = val } - if !IsNil(o.Smarthost) { - toSerialize["smarthost"] = o.Smarthost + if val, ok := getEmailConfigGetToAttributeTypeOk(o.To); ok { + toSerialize["To"] = val } - toSerialize["to"] = o.To return toSerialize, nil } diff --git a/services/observability/model_error.go b/services/observability/model_error.go index 67bf7f51d..c6ea1e2e1 100644 --- a/services/observability/model_error.go +++ b/services/observability/model_error.go @@ -17,11 +17,52 @@ import ( // checks if the Error type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Error{} +/* + types and functions for errors +*/ + +// isArray +type ErrorGetErrorsAttributeType = *[]map[string]string +type ErrorGetErrorsArgType = []map[string]string +type ErrorGetErrorsRetType = []map[string]string + +func getErrorGetErrorsAttributeTypeOk(arg ErrorGetErrorsAttributeType) (ret ErrorGetErrorsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorGetErrorsAttributeType(arg *ErrorGetErrorsAttributeType, val ErrorGetErrorsRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ErrorGetMessageAttributeType = *string + +func getErrorGetMessageAttributeTypeOk(arg ErrorGetMessageAttributeType) (ret ErrorGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorGetMessageAttributeType(arg *ErrorGetMessageAttributeType, val ErrorGetMessageRetType) { + *arg = &val +} + +type ErrorGetMessageArgType = string +type ErrorGetMessageRetType = string + // Error struct for Error type Error struct { - Errors *[]map[string]string `json:"errors,omitempty"` + Errors ErrorGetErrorsAttributeType `json:"errors,omitempty"` // REQUIRED - Message *string `json:"message"` + Message ErrorGetMessageAttributeType `json:"message"` } type _Error Error @@ -30,9 +71,9 @@ type _Error Error // 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 { +func NewError(message ErrorGetMessageArgType) *Error { this := Error{} - this.Message = message + setErrorGetMessageAttributeType(&this.Message, message) return &this } @@ -45,67 +86,53 @@ func NewErrorWithDefaults() *Error { } // 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 +func (o *Error) GetErrors() (res ErrorGetErrorsRetType) { + res, _ = o.GetErrorsOk() + return } // 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 +func (o *Error) GetErrorsOk() (ret ErrorGetErrorsRetType, ok bool) { + return getErrorGetErrorsAttributeTypeOk(o.Errors) } // 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 + _, ok := o.GetErrorsOk() + return ok } // 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 +func (o *Error) SetErrors(v ErrorGetErrorsRetType) { + setErrorGetErrorsAttributeType(&o.Errors, v) } // GetMessage returns the Message field value -func (o *Error) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *Error) GetMessage() (ret ErrorGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *Error) GetMessageOk() (ret ErrorGetMessageRetType, ok bool) { + return getErrorGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *Error) SetMessage(v *string) { - o.Message = v +func (o *Error) SetMessage(v ErrorGetMessageRetType) { + setErrorGetMessageAttributeType(&o.Message, v) } func (o Error) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Errors) { - toSerialize["errors"] = o.Errors + if val, ok := getErrorGetErrorsAttributeTypeOk(o.Errors); ok { + toSerialize["Errors"] = val + } + if val, ok := getErrorGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val } - toSerialize["message"] = o.Message return toSerialize, nil } diff --git a/services/observability/model_get_alert_configs_response.go b/services/observability/model_get_alert_configs_response.go index e9678eec3..a9e81c1ec 100644 --- a/services/observability/model_get_alert_configs_response.go +++ b/services/observability/model_get_alert_configs_response.go @@ -17,12 +17,53 @@ import ( // checks if the GetAlertConfigsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetAlertConfigsResponse{} +/* + types and functions for data +*/ + +// isModel +type GetAlertConfigsResponseGetDataAttributeType = *Alert +type GetAlertConfigsResponseGetDataArgType = Alert +type GetAlertConfigsResponseGetDataRetType = Alert + +func getGetAlertConfigsResponseGetDataAttributeTypeOk(arg GetAlertConfigsResponseGetDataAttributeType) (ret GetAlertConfigsResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetAlertConfigsResponseGetDataAttributeType(arg *GetAlertConfigsResponseGetDataAttributeType, val GetAlertConfigsResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type GetAlertConfigsResponseGetMessageAttributeType = *string + +func getGetAlertConfigsResponseGetMessageAttributeTypeOk(arg GetAlertConfigsResponseGetMessageAttributeType) (ret GetAlertConfigsResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetAlertConfigsResponseGetMessageAttributeType(arg *GetAlertConfigsResponseGetMessageAttributeType, val GetAlertConfigsResponseGetMessageRetType) { + *arg = &val +} + +type GetAlertConfigsResponseGetMessageArgType = string +type GetAlertConfigsResponseGetMessageRetType = string + // GetAlertConfigsResponse struct for GetAlertConfigsResponse type GetAlertConfigsResponse struct { // REQUIRED - Data *Alert `json:"data"` + Data GetAlertConfigsResponseGetDataAttributeType `json:"data"` // REQUIRED - Message *string `json:"message"` + Message GetAlertConfigsResponseGetMessageAttributeType `json:"message"` } type _GetAlertConfigsResponse GetAlertConfigsResponse @@ -31,10 +72,10 @@ type _GetAlertConfigsResponse GetAlertConfigsResponse // 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 { +func NewGetAlertConfigsResponse(data GetAlertConfigsResponseGetDataArgType, message GetAlertConfigsResponseGetMessageArgType) *GetAlertConfigsResponse { this := GetAlertConfigsResponse{} - this.Data = data - this.Message = message + setGetAlertConfigsResponseGetDataAttributeType(&this.Data, data) + setGetAlertConfigsResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewGetAlertConfigsResponseWithDefaults() *GetAlertConfigsResponse { } // GetData returns the Data field value -func (o *GetAlertConfigsResponse) GetData() *Alert { - if o == nil || IsNil(o.Data) { - var ret *Alert - return ret - } - - return o.Data +func (o *GetAlertConfigsResponse) GetData() (ret GetAlertConfigsResponseGetDataRetType) { + ret, _ = o.GetDataOk() + return ret } // 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 +func (o *GetAlertConfigsResponse) GetDataOk() (ret GetAlertConfigsResponseGetDataRetType, ok bool) { + return getGetAlertConfigsResponseGetDataAttributeTypeOk(o.Data) } // SetData sets field value -func (o *GetAlertConfigsResponse) SetData(v *Alert) { - o.Data = v +func (o *GetAlertConfigsResponse) SetData(v GetAlertConfigsResponseGetDataRetType) { + setGetAlertConfigsResponseGetDataAttributeType(&o.Data, v) } // GetMessage returns the Message field value -func (o *GetAlertConfigsResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *GetAlertConfigsResponse) GetMessage() (ret GetAlertConfigsResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *GetAlertConfigsResponse) GetMessageOk() (ret GetAlertConfigsResponseGetMessageRetType, ok bool) { + return getGetAlertConfigsResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *GetAlertConfigsResponse) SetMessage(v *string) { - o.Message = v +func (o *GetAlertConfigsResponse) SetMessage(v GetAlertConfigsResponseGetMessageRetType) { + setGetAlertConfigsResponseGetMessageAttributeType(&o.Message, v) } func (o GetAlertConfigsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["data"] = o.Data - toSerialize["message"] = o.Message + if val, ok := getGetAlertConfigsResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getGetAlertConfigsResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_get_credentials_response.go b/services/observability/model_get_credentials_response.go index 41c02dfa6..1ce750756 100644 --- a/services/observability/model_get_credentials_response.go +++ b/services/observability/model_get_credentials_response.go @@ -17,15 +17,98 @@ import ( // checks if the GetCredentialsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetCredentialsResponse{} +/* + types and functions for credentialsInfo +*/ + +// isContainer +type GetCredentialsResponseGetCredentialsInfoAttributeType = *map[string]string +type GetCredentialsResponseGetCredentialsInfoArgType = map[string]string +type GetCredentialsResponseGetCredentialsInfoRetType = map[string]string + +func getGetCredentialsResponseGetCredentialsInfoAttributeTypeOk(arg GetCredentialsResponseGetCredentialsInfoAttributeType) (ret GetCredentialsResponseGetCredentialsInfoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetCredentialsResponseGetCredentialsInfoAttributeType(arg *GetCredentialsResponseGetCredentialsInfoAttributeType, val GetCredentialsResponseGetCredentialsInfoRetType) { + *arg = &val +} + +/* + types and functions for id +*/ + +// isNotNullableString +type GetCredentialsResponseGetIdAttributeType = *string + +func getGetCredentialsResponseGetIdAttributeTypeOk(arg GetCredentialsResponseGetIdAttributeType) (ret GetCredentialsResponseGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetCredentialsResponseGetIdAttributeType(arg *GetCredentialsResponseGetIdAttributeType, val GetCredentialsResponseGetIdRetType) { + *arg = &val +} + +type GetCredentialsResponseGetIdArgType = string +type GetCredentialsResponseGetIdRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type GetCredentialsResponseGetMessageAttributeType = *string + +func getGetCredentialsResponseGetMessageAttributeTypeOk(arg GetCredentialsResponseGetMessageAttributeType) (ret GetCredentialsResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetCredentialsResponseGetMessageAttributeType(arg *GetCredentialsResponseGetMessageAttributeType, val GetCredentialsResponseGetMessageRetType) { + *arg = &val +} + +type GetCredentialsResponseGetMessageArgType = string +type GetCredentialsResponseGetMessageRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type GetCredentialsResponseGetNameAttributeType = *string + +func getGetCredentialsResponseGetNameAttributeTypeOk(arg GetCredentialsResponseGetNameAttributeType) (ret GetCredentialsResponseGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetCredentialsResponseGetNameAttributeType(arg *GetCredentialsResponseGetNameAttributeType, val GetCredentialsResponseGetNameRetType) { + *arg = &val +} + +type GetCredentialsResponseGetNameArgType = string +type GetCredentialsResponseGetNameRetType = string + // GetCredentialsResponse struct for GetCredentialsResponse type GetCredentialsResponse struct { - CredentialsInfo *map[string]string `json:"credentialsInfo,omitempty"` + CredentialsInfo GetCredentialsResponseGetCredentialsInfoAttributeType `json:"credentialsInfo,omitempty"` // REQUIRED - Id *string `json:"id"` + Id GetCredentialsResponseGetIdAttributeType `json:"id"` // REQUIRED - Message *string `json:"message"` + Message GetCredentialsResponseGetMessageAttributeType `json:"message"` // REQUIRED - Name *string `json:"name"` + Name GetCredentialsResponseGetNameAttributeType `json:"name"` } type _GetCredentialsResponse GetCredentialsResponse @@ -34,11 +117,11 @@ type _GetCredentialsResponse GetCredentialsResponse // 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 { +func NewGetCredentialsResponse(id GetCredentialsResponseGetIdArgType, message GetCredentialsResponseGetMessageArgType, name GetCredentialsResponseGetNameArgType) *GetCredentialsResponse { this := GetCredentialsResponse{} - this.Id = id - this.Message = message - this.Name = name + setGetCredentialsResponseGetIdAttributeType(&this.Id, id) + setGetCredentialsResponseGetMessageAttributeType(&this.Message, message) + setGetCredentialsResponseGetNameAttributeType(&this.Name, name) return &this } @@ -51,117 +134,93 @@ func NewGetCredentialsResponseWithDefaults() *GetCredentialsResponse { } // 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 +func (o *GetCredentialsResponse) GetCredentialsInfo() (res GetCredentialsResponseGetCredentialsInfoRetType) { + res, _ = o.GetCredentialsInfoOk() + return } // 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 +func (o *GetCredentialsResponse) GetCredentialsInfoOk() (ret GetCredentialsResponseGetCredentialsInfoRetType, ok bool) { + return getGetCredentialsResponseGetCredentialsInfoAttributeTypeOk(o.CredentialsInfo) } // 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 + _, ok := o.GetCredentialsInfoOk() + return ok } // 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 +func (o *GetCredentialsResponse) SetCredentialsInfo(v GetCredentialsResponseGetCredentialsInfoRetType) { + setGetCredentialsResponseGetCredentialsInfoAttributeType(&o.CredentialsInfo, v) } // GetId returns the Id field value -func (o *GetCredentialsResponse) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *GetCredentialsResponse) GetId() (ret GetCredentialsResponseGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } // 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 +func (o *GetCredentialsResponse) GetIdOk() (ret GetCredentialsResponseGetIdRetType, ok bool) { + return getGetCredentialsResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *GetCredentialsResponse) SetId(v *string) { - o.Id = v +func (o *GetCredentialsResponse) SetId(v GetCredentialsResponseGetIdRetType) { + setGetCredentialsResponseGetIdAttributeType(&o.Id, v) } // GetMessage returns the Message field value -func (o *GetCredentialsResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *GetCredentialsResponse) GetMessage() (ret GetCredentialsResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *GetCredentialsResponse) GetMessageOk() (ret GetCredentialsResponseGetMessageRetType, ok bool) { + return getGetCredentialsResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *GetCredentialsResponse) SetMessage(v *string) { - o.Message = v +func (o *GetCredentialsResponse) SetMessage(v GetCredentialsResponseGetMessageRetType) { + setGetCredentialsResponseGetMessageAttributeType(&o.Message, v) } // GetName returns the Name field value -func (o *GetCredentialsResponse) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *GetCredentialsResponse) GetName() (ret GetCredentialsResponseGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // 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 +func (o *GetCredentialsResponse) GetNameOk() (ret GetCredentialsResponseGetNameRetType, ok bool) { + return getGetCredentialsResponseGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *GetCredentialsResponse) SetName(v *string) { - o.Name = v +func (o *GetCredentialsResponse) SetName(v GetCredentialsResponseGetNameRetType) { + setGetCredentialsResponseGetNameAttributeType(&o.Name, v) } func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CredentialsInfo) { - toSerialize["credentialsInfo"] = o.CredentialsInfo + if val, ok := getGetCredentialsResponseGetCredentialsInfoAttributeTypeOk(o.CredentialsInfo); ok { + toSerialize["CredentialsInfo"] = val + } + if val, ok := getGetCredentialsResponseGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getGetCredentialsResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getGetCredentialsResponseGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - toSerialize["id"] = o.Id - toSerialize["message"] = o.Message - toSerialize["name"] = o.Name return toSerialize, nil } diff --git a/services/observability/model_get_instance_response.go b/services/observability/model_get_instance_response.go index e83e78fec..eba3407cb 100644 --- a/services/observability/model_get_instance_response.go +++ b/services/observability/model_get_instance_response.go @@ -17,29 +17,302 @@ import ( // checks if the GetInstanceResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetInstanceResponse{} +/* + types and functions for dashboardUrl +*/ + +// isNotNullableString +type GetInstanceResponseGetDashboardUrlAttributeType = *string + +func getGetInstanceResponseGetDashboardUrlAttributeTypeOk(arg GetInstanceResponseGetDashboardUrlAttributeType) (ret GetInstanceResponseGetDashboardUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetDashboardUrlAttributeType(arg *GetInstanceResponseGetDashboardUrlAttributeType, val GetInstanceResponseGetDashboardUrlRetType) { + *arg = &val +} + +type GetInstanceResponseGetDashboardUrlArgType = string +type GetInstanceResponseGetDashboardUrlRetType = string + +/* + types and functions for error +*/ + +// isNullableString +type GetInstanceResponseGetErrorAttributeType = *NullableString + +func getGetInstanceResponseGetErrorAttributeTypeOk(arg GetInstanceResponseGetErrorAttributeType) (ret GetInstanceResponseGetErrorRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setGetInstanceResponseGetErrorAttributeType(arg *GetInstanceResponseGetErrorAttributeType, val GetInstanceResponseGetErrorRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type GetInstanceResponseGetErrorArgType = *string +type GetInstanceResponseGetErrorRetType = *string + +/* + types and functions for id +*/ + +// isNotNullableString +type GetInstanceResponseGetIdAttributeType = *string + +func getGetInstanceResponseGetIdAttributeTypeOk(arg GetInstanceResponseGetIdAttributeType) (ret GetInstanceResponseGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetIdAttributeType(arg *GetInstanceResponseGetIdAttributeType, val GetInstanceResponseGetIdRetType) { + *arg = &val +} + +type GetInstanceResponseGetIdArgType = string +type GetInstanceResponseGetIdRetType = string + +/* + types and functions for instance +*/ + +// isModel +type GetInstanceResponseGetInstanceAttributeType = *InstanceSensitiveData +type GetInstanceResponseGetInstanceArgType = InstanceSensitiveData +type GetInstanceResponseGetInstanceRetType = InstanceSensitiveData + +func getGetInstanceResponseGetInstanceAttributeTypeOk(arg GetInstanceResponseGetInstanceAttributeType) (ret GetInstanceResponseGetInstanceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetInstanceAttributeType(arg *GetInstanceResponseGetInstanceAttributeType, val GetInstanceResponseGetInstanceRetType) { + *arg = &val +} + +/* + types and functions for isUpdatable +*/ + +// isBoolean +type GetInstanceResponsegetIsUpdatableAttributeType = *bool +type GetInstanceResponsegetIsUpdatableArgType = bool +type GetInstanceResponsegetIsUpdatableRetType = bool + +func getGetInstanceResponsegetIsUpdatableAttributeTypeOk(arg GetInstanceResponsegetIsUpdatableAttributeType) (ret GetInstanceResponsegetIsUpdatableRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponsegetIsUpdatableAttributeType(arg *GetInstanceResponsegetIsUpdatableAttributeType, val GetInstanceResponsegetIsUpdatableRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type GetInstanceResponseGetMessageAttributeType = *string + +func getGetInstanceResponseGetMessageAttributeTypeOk(arg GetInstanceResponseGetMessageAttributeType) (ret GetInstanceResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetMessageAttributeType(arg *GetInstanceResponseGetMessageAttributeType, val GetInstanceResponseGetMessageRetType) { + *arg = &val +} + +type GetInstanceResponseGetMessageArgType = string +type GetInstanceResponseGetMessageRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type GetInstanceResponseGetNameAttributeType = *string + +func getGetInstanceResponseGetNameAttributeTypeOk(arg GetInstanceResponseGetNameAttributeType) (ret GetInstanceResponseGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetNameAttributeType(arg *GetInstanceResponseGetNameAttributeType, val GetInstanceResponseGetNameRetType) { + *arg = &val +} + +type GetInstanceResponseGetNameArgType = string +type GetInstanceResponseGetNameRetType = string + +/* + types and functions for parameters +*/ + +// isContainer +type GetInstanceResponseGetParametersAttributeType = *map[string]string +type GetInstanceResponseGetParametersArgType = map[string]string +type GetInstanceResponseGetParametersRetType = map[string]string + +func getGetInstanceResponseGetParametersAttributeTypeOk(arg GetInstanceResponseGetParametersAttributeType) (ret GetInstanceResponseGetParametersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetParametersAttributeType(arg *GetInstanceResponseGetParametersAttributeType, val GetInstanceResponseGetParametersRetType) { + *arg = &val +} + +/* + types and functions for planId +*/ + +// isNotNullableString +type GetInstanceResponseGetPlanIdAttributeType = *string + +func getGetInstanceResponseGetPlanIdAttributeTypeOk(arg GetInstanceResponseGetPlanIdAttributeType) (ret GetInstanceResponseGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetPlanIdAttributeType(arg *GetInstanceResponseGetPlanIdAttributeType, val GetInstanceResponseGetPlanIdRetType) { + *arg = &val +} + +type GetInstanceResponseGetPlanIdArgType = string +type GetInstanceResponseGetPlanIdRetType = string + +/* + types and functions for planName +*/ + +// isNotNullableString +type GetInstanceResponseGetPlanNameAttributeType = *string + +func getGetInstanceResponseGetPlanNameAttributeTypeOk(arg GetInstanceResponseGetPlanNameAttributeType) (ret GetInstanceResponseGetPlanNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetPlanNameAttributeType(arg *GetInstanceResponseGetPlanNameAttributeType, val GetInstanceResponseGetPlanNameRetType) { + *arg = &val +} + +type GetInstanceResponseGetPlanNameArgType = string +type GetInstanceResponseGetPlanNameRetType = string + +/* + types and functions for planSchema +*/ + +// isNotNullableString +type GetInstanceResponseGetPlanSchemaAttributeType = *string + +func getGetInstanceResponseGetPlanSchemaAttributeTypeOk(arg GetInstanceResponseGetPlanSchemaAttributeType) (ret GetInstanceResponseGetPlanSchemaRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetPlanSchemaAttributeType(arg *GetInstanceResponseGetPlanSchemaAttributeType, val GetInstanceResponseGetPlanSchemaRetType) { + *arg = &val +} + +type GetInstanceResponseGetPlanSchemaArgType = string +type GetInstanceResponseGetPlanSchemaRetType = string + +/* + types and functions for serviceName +*/ + +// isNotNullableString +type GetInstanceResponseGetServiceNameAttributeType = *string + +func getGetInstanceResponseGetServiceNameAttributeTypeOk(arg GetInstanceResponseGetServiceNameAttributeType) (ret GetInstanceResponseGetServiceNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetServiceNameAttributeType(arg *GetInstanceResponseGetServiceNameAttributeType, val GetInstanceResponseGetServiceNameRetType) { + *arg = &val +} + +type GetInstanceResponseGetServiceNameArgType = string +type GetInstanceResponseGetServiceNameRetType = string + +/* + types and functions for status +*/ + +// isEnumRef +type GetInstanceResponseGetStatusAttributeType = *string +type GetInstanceResponseGetStatusArgType = string +type GetInstanceResponseGetStatusRetType = string + +func getGetInstanceResponseGetStatusAttributeTypeOk(arg GetInstanceResponseGetStatusAttributeType) (ret GetInstanceResponseGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetInstanceResponseGetStatusAttributeType(arg *GetInstanceResponseGetStatusAttributeType, val GetInstanceResponseGetStatusRetType) { + *arg = &val +} + // GetInstanceResponse struct for GetInstanceResponse type GetInstanceResponse struct { // REQUIRED - DashboardUrl *string `json:"dashboardUrl"` - Error *NullableString `json:"error,omitempty"` + DashboardUrl GetInstanceResponseGetDashboardUrlAttributeType `json:"dashboardUrl"` + Error GetInstanceResponseGetErrorAttributeType `json:"error,omitempty"` // REQUIRED - Id *string `json:"id"` + Id GetInstanceResponseGetIdAttributeType `json:"id"` // REQUIRED - Instance *InstanceSensitiveData `json:"instance"` - IsUpdatable *bool `json:"isUpdatable,omitempty"` + Instance GetInstanceResponseGetInstanceAttributeType `json:"instance"` + IsUpdatable GetInstanceResponsegetIsUpdatableAttributeType `json:"isUpdatable,omitempty"` // REQUIRED - Message *string `json:"message"` - Name *string `json:"name,omitempty"` - Parameters *map[string]string `json:"parameters,omitempty"` + Message GetInstanceResponseGetMessageAttributeType `json:"message"` + Name GetInstanceResponseGetNameAttributeType `json:"name,omitempty"` + Parameters GetInstanceResponseGetParametersAttributeType `json:"parameters,omitempty"` // REQUIRED - PlanId *string `json:"planId"` + PlanId GetInstanceResponseGetPlanIdAttributeType `json:"planId"` // REQUIRED - PlanName *string `json:"planName"` - PlanSchema *string `json:"planSchema,omitempty"` + PlanName GetInstanceResponseGetPlanNameAttributeType `json:"planName"` + PlanSchema GetInstanceResponseGetPlanSchemaAttributeType `json:"planSchema,omitempty"` // REQUIRED - ServiceName *string `json:"serviceName"` + ServiceName GetInstanceResponseGetServiceNameAttributeType `json:"serviceName"` // REQUIRED - Status *string `json:"status"` + Status GetInstanceResponseGetStatusAttributeType `json:"status"` } type _GetInstanceResponse GetInstanceResponse @@ -48,20 +321,16 @@ type _GetInstanceResponse GetInstanceResponse // 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 { +func NewGetInstanceResponse(dashboardUrl GetInstanceResponseGetDashboardUrlArgType, id GetInstanceResponseGetIdArgType, instance GetInstanceResponseGetInstanceArgType, message GetInstanceResponseGetMessageArgType, planId GetInstanceResponseGetPlanIdArgType, planName GetInstanceResponseGetPlanNameArgType, serviceName GetInstanceResponseGetServiceNameArgType, status GetInstanceResponseGetStatusArgType) *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 + setGetInstanceResponseGetDashboardUrlAttributeType(&this.DashboardUrl, dashboardUrl) + setGetInstanceResponseGetIdAttributeType(&this.Id, id) + setGetInstanceResponseGetInstanceAttributeType(&this.Instance, instance) + setGetInstanceResponseGetMessageAttributeType(&this.Message, message) + setGetInstanceResponseGetPlanIdAttributeType(&this.PlanId, planId) + setGetInstanceResponseGetPlanNameAttributeType(&this.PlanName, planName) + setGetInstanceResponseGetServiceNameAttributeType(&this.ServiceName, serviceName) + setGetInstanceResponseGetStatusAttributeType(&this.Status, status) return &this } @@ -78,402 +347,308 @@ func NewGetInstanceResponseWithDefaults() *GetInstanceResponse { } // GetDashboardUrl returns the DashboardUrl field value -func (o *GetInstanceResponse) GetDashboardUrl() *string { - if o == nil || IsNil(o.DashboardUrl) { - var ret *string - return ret - } - - return o.DashboardUrl +func (o *GetInstanceResponse) GetDashboardUrl() (ret GetInstanceResponseGetDashboardUrlRetType) { + ret, _ = o.GetDashboardUrlOk() + return ret } // 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 +func (o *GetInstanceResponse) GetDashboardUrlOk() (ret GetInstanceResponseGetDashboardUrlRetType, ok bool) { + return getGetInstanceResponseGetDashboardUrlAttributeTypeOk(o.DashboardUrl) } // SetDashboardUrl sets field value -func (o *GetInstanceResponse) SetDashboardUrl(v *string) { - o.DashboardUrl = v +func (o *GetInstanceResponse) SetDashboardUrl(v GetInstanceResponseGetDashboardUrlRetType) { + setGetInstanceResponseGetDashboardUrlAttributeType(&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) || IsNil(o.Error.Get()) { - var ret *string - return ret - } - return o.Error.Get() +func (o *GetInstanceResponse) GetError() (res GetInstanceResponseGetErrorRetType) { + res, _ = o.GetErrorOk() + return } // 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 || IsNil(o.Error) { - return nil, false - } - return o.Error.Get(), o.Error.IsSet() +func (o *GetInstanceResponse) GetErrorOk() (ret GetInstanceResponseGetErrorRetType, ok bool) { + return getGetInstanceResponseGetErrorAttributeTypeOk(o.Error) } // HasError returns a boolean if a field has been set. func (o *GetInstanceResponse) HasError() bool { - if o != nil && !IsNil(o.Error) && o.Error.IsSet() { - return true - } - - return false + _, ok := o.GetErrorOk() + return ok } // SetError gets a reference to the given string and assigns it to the Error field. -func (o *GetInstanceResponse) SetError(v *string) { - if IsNil(o.Error) { - o.Error = new(NullableString) - } - o.Error.Set(v) +func (o *GetInstanceResponse) SetError(v GetInstanceResponseGetErrorRetType) { + setGetInstanceResponseGetErrorAttributeType(&o.Error, v) } // SetErrorNil sets the value for Error to be an explicit nil func (o *GetInstanceResponse) SetErrorNil() { - if IsNil(o.Error) { - o.Error = new(NullableString) - } - o.Error.Set(nil) + o.Error = nil } // UnsetError ensures that no value is present for Error, not even an explicit nil func (o *GetInstanceResponse) UnsetError() { - if IsNil(o.Error) { - o.Error = new(NullableString) - } - o.Error.Unset() + o.Error = nil } // GetId returns the Id field value -func (o *GetInstanceResponse) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *GetInstanceResponse) GetId() (ret GetInstanceResponseGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } // 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 +func (o *GetInstanceResponse) GetIdOk() (ret GetInstanceResponseGetIdRetType, ok bool) { + return getGetInstanceResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *GetInstanceResponse) SetId(v *string) { - o.Id = v +func (o *GetInstanceResponse) SetId(v GetInstanceResponseGetIdRetType) { + setGetInstanceResponseGetIdAttributeType(&o.Id, v) } // GetInstance returns the Instance field value -func (o *GetInstanceResponse) GetInstance() *InstanceSensitiveData { - if o == nil || IsNil(o.Instance) { - var ret *InstanceSensitiveData - return ret - } - - return o.Instance +func (o *GetInstanceResponse) GetInstance() (ret GetInstanceResponseGetInstanceRetType) { + ret, _ = o.GetInstanceOk() + return ret } // 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 +func (o *GetInstanceResponse) GetInstanceOk() (ret GetInstanceResponseGetInstanceRetType, ok bool) { + return getGetInstanceResponseGetInstanceAttributeTypeOk(o.Instance) } // SetInstance sets field value -func (o *GetInstanceResponse) SetInstance(v *InstanceSensitiveData) { - o.Instance = v +func (o *GetInstanceResponse) SetInstance(v GetInstanceResponseGetInstanceRetType) { + setGetInstanceResponseGetInstanceAttributeType(&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 +func (o *GetInstanceResponse) GetIsUpdatable() (res GetInstanceResponsegetIsUpdatableRetType) { + res, _ = o.GetIsUpdatableOk() + return } // 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 +func (o *GetInstanceResponse) GetIsUpdatableOk() (ret GetInstanceResponsegetIsUpdatableRetType, ok bool) { + return getGetInstanceResponsegetIsUpdatableAttributeTypeOk(o.IsUpdatable) } // 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 + _, ok := o.GetIsUpdatableOk() + return ok } // SetIsUpdatable gets a reference to the given bool and assigns it to the IsUpdatable field. -func (o *GetInstanceResponse) SetIsUpdatable(v *bool) { - o.IsUpdatable = v +func (o *GetInstanceResponse) SetIsUpdatable(v GetInstanceResponsegetIsUpdatableRetType) { + setGetInstanceResponsegetIsUpdatableAttributeType(&o.IsUpdatable, v) } // GetMessage returns the Message field value -func (o *GetInstanceResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *GetInstanceResponse) GetMessage() (ret GetInstanceResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *GetInstanceResponse) GetMessageOk() (ret GetInstanceResponseGetMessageRetType, ok bool) { + return getGetInstanceResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *GetInstanceResponse) SetMessage(v *string) { - o.Message = v +func (o *GetInstanceResponse) SetMessage(v GetInstanceResponseGetMessageRetType) { + setGetInstanceResponseGetMessageAttributeType(&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 +func (o *GetInstanceResponse) GetName() (res GetInstanceResponseGetNameRetType) { + res, _ = o.GetNameOk() + return } // 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 +func (o *GetInstanceResponse) GetNameOk() (ret GetInstanceResponseGetNameRetType, ok bool) { + return getGetInstanceResponseGetNameAttributeTypeOk(o.Name) } // 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 + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetInstanceResponse) SetName(v *string) { - o.Name = v +func (o *GetInstanceResponse) SetName(v GetInstanceResponseGetNameRetType) { + setGetInstanceResponseGetNameAttributeType(&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 +func (o *GetInstanceResponse) GetParameters() (res GetInstanceResponseGetParametersRetType) { + res, _ = o.GetParametersOk() + return } // 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 +func (o *GetInstanceResponse) GetParametersOk() (ret GetInstanceResponseGetParametersRetType, ok bool) { + return getGetInstanceResponseGetParametersAttributeTypeOk(o.Parameters) } // 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 + _, ok := o.GetParametersOk() + return ok } // 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 +func (o *GetInstanceResponse) SetParameters(v GetInstanceResponseGetParametersRetType) { + setGetInstanceResponseGetParametersAttributeType(&o.Parameters, v) } // GetPlanId returns the PlanId field value -func (o *GetInstanceResponse) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - - return o.PlanId +func (o *GetInstanceResponse) GetPlanId() (ret GetInstanceResponseGetPlanIdRetType) { + ret, _ = o.GetPlanIdOk() + return ret } // 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 +func (o *GetInstanceResponse) GetPlanIdOk() (ret GetInstanceResponseGetPlanIdRetType, ok bool) { + return getGetInstanceResponseGetPlanIdAttributeTypeOk(o.PlanId) } // SetPlanId sets field value -func (o *GetInstanceResponse) SetPlanId(v *string) { - o.PlanId = v +func (o *GetInstanceResponse) SetPlanId(v GetInstanceResponseGetPlanIdRetType) { + setGetInstanceResponseGetPlanIdAttributeType(&o.PlanId, v) } // GetPlanName returns the PlanName field value -func (o *GetInstanceResponse) GetPlanName() *string { - if o == nil || IsNil(o.PlanName) { - var ret *string - return ret - } - - return o.PlanName +func (o *GetInstanceResponse) GetPlanName() (ret GetInstanceResponseGetPlanNameRetType) { + ret, _ = o.GetPlanNameOk() + return ret } // 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 +func (o *GetInstanceResponse) GetPlanNameOk() (ret GetInstanceResponseGetPlanNameRetType, ok bool) { + return getGetInstanceResponseGetPlanNameAttributeTypeOk(o.PlanName) } // SetPlanName sets field value -func (o *GetInstanceResponse) SetPlanName(v *string) { - o.PlanName = v +func (o *GetInstanceResponse) SetPlanName(v GetInstanceResponseGetPlanNameRetType) { + setGetInstanceResponseGetPlanNameAttributeType(&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 +func (o *GetInstanceResponse) GetPlanSchema() (res GetInstanceResponseGetPlanSchemaRetType) { + res, _ = o.GetPlanSchemaOk() + return } // 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 +func (o *GetInstanceResponse) GetPlanSchemaOk() (ret GetInstanceResponseGetPlanSchemaRetType, ok bool) { + return getGetInstanceResponseGetPlanSchemaAttributeTypeOk(o.PlanSchema) } // 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 + _, ok := o.GetPlanSchemaOk() + return ok } // SetPlanSchema gets a reference to the given string and assigns it to the PlanSchema field. -func (o *GetInstanceResponse) SetPlanSchema(v *string) { - o.PlanSchema = v +func (o *GetInstanceResponse) SetPlanSchema(v GetInstanceResponseGetPlanSchemaRetType) { + setGetInstanceResponseGetPlanSchemaAttributeType(&o.PlanSchema, v) } // GetServiceName returns the ServiceName field value -func (o *GetInstanceResponse) GetServiceName() *string { - if o == nil || IsNil(o.ServiceName) { - var ret *string - return ret - } - - return o.ServiceName +func (o *GetInstanceResponse) GetServiceName() (ret GetInstanceResponseGetServiceNameRetType) { + ret, _ = o.GetServiceNameOk() + return ret } // 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 +func (o *GetInstanceResponse) GetServiceNameOk() (ret GetInstanceResponseGetServiceNameRetType, ok bool) { + return getGetInstanceResponseGetServiceNameAttributeTypeOk(o.ServiceName) } // SetServiceName sets field value -func (o *GetInstanceResponse) SetServiceName(v *string) { - o.ServiceName = v +func (o *GetInstanceResponse) SetServiceName(v GetInstanceResponseGetServiceNameRetType) { + setGetInstanceResponseGetServiceNameAttributeType(&o.ServiceName, v) } // GetStatus returns the Status field value -func (o *GetInstanceResponse) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - - return o.Status +func (o *GetInstanceResponse) GetStatus() (ret GetInstanceResponseGetStatusRetType) { + ret, _ = o.GetStatusOk() + return ret } // 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 +func (o *GetInstanceResponse) GetStatusOk() (ret GetInstanceResponseGetStatusRetType, ok bool) { + return getGetInstanceResponseGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value -func (o *GetInstanceResponse) SetStatus(v *string) { - o.Status = v +func (o *GetInstanceResponse) SetStatus(v GetInstanceResponseGetStatusRetType) { + setGetInstanceResponseGetStatusAttributeType(&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() + if val, ok := getGetInstanceResponseGetDashboardUrlAttributeTypeOk(o.DashboardUrl); ok { + toSerialize["DashboardUrl"] = val + } + if val, ok := getGetInstanceResponseGetErrorAttributeTypeOk(o.Error); ok { + toSerialize["Error"] = val + } + if val, ok := getGetInstanceResponseGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getGetInstanceResponseGetInstanceAttributeTypeOk(o.Instance); ok { + toSerialize["Instance"] = val + } + if val, ok := getGetInstanceResponsegetIsUpdatableAttributeTypeOk(o.IsUpdatable); ok { + toSerialize["IsUpdatable"] = val + } + if val, ok := getGetInstanceResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getGetInstanceResponseGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getGetInstanceResponseGetParametersAttributeTypeOk(o.Parameters); ok { + toSerialize["Parameters"] = val + } + if val, ok := getGetInstanceResponseGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val } - toSerialize["id"] = o.Id - toSerialize["instance"] = o.Instance - if !IsNil(o.IsUpdatable) { - toSerialize["isUpdatable"] = o.IsUpdatable + if val, ok := getGetInstanceResponseGetPlanNameAttributeTypeOk(o.PlanName); ok { + toSerialize["PlanName"] = val } - toSerialize["message"] = o.Message - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getGetInstanceResponseGetPlanSchemaAttributeTypeOk(o.PlanSchema); ok { + toSerialize["PlanSchema"] = val } - if !IsNil(o.Parameters) { - toSerialize["parameters"] = o.Parameters + if val, ok := getGetInstanceResponseGetServiceNameAttributeTypeOk(o.ServiceName); ok { + toSerialize["ServiceName"] = val } - toSerialize["planId"] = o.PlanId - toSerialize["planName"] = o.PlanName - if !IsNil(o.PlanSchema) { - toSerialize["planSchema"] = o.PlanSchema + if val, ok := getGetInstanceResponseGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val } - toSerialize["serviceName"] = o.ServiceName - toSerialize["status"] = o.Status return toSerialize, nil } diff --git a/services/observability/model_get_metrics_storage_retention_response.go b/services/observability/model_get_metrics_storage_retention_response.go index 9a7be62d5..cfd316f4a 100644 --- a/services/observability/model_get_metrics_storage_retention_response.go +++ b/services/observability/model_get_metrics_storage_retention_response.go @@ -17,16 +17,100 @@ import ( // checks if the GetMetricsStorageRetentionResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetMetricsStorageRetentionResponse{} +/* + types and functions for message +*/ + +// isNotNullableString +type GetMetricsStorageRetentionResponseGetMessageAttributeType = *string + +func getGetMetricsStorageRetentionResponseGetMessageAttributeTypeOk(arg GetMetricsStorageRetentionResponseGetMessageAttributeType) (ret GetMetricsStorageRetentionResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsStorageRetentionResponseGetMessageAttributeType(arg *GetMetricsStorageRetentionResponseGetMessageAttributeType, val GetMetricsStorageRetentionResponseGetMessageRetType) { + *arg = &val +} + +type GetMetricsStorageRetentionResponseGetMessageArgType = string +type GetMetricsStorageRetentionResponseGetMessageRetType = string + +/* + types and functions for metricsRetentionTime1h +*/ + +// isNotNullableString +type GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hAttributeType = *string + +func getGetMetricsStorageRetentionResponseGetMetricsRetentionTime1hAttributeTypeOk(arg GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hAttributeType) (ret GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsStorageRetentionResponseGetMetricsRetentionTime1hAttributeType(arg *GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hAttributeType, val GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hRetType) { + *arg = &val +} + +type GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hArgType = string +type GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hRetType = string + +/* + types and functions for metricsRetentionTime5m +*/ + +// isNotNullableString +type GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mAttributeType = *string + +func getGetMetricsStorageRetentionResponseGetMetricsRetentionTime5mAttributeTypeOk(arg GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mAttributeType) (ret GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsStorageRetentionResponseGetMetricsRetentionTime5mAttributeType(arg *GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mAttributeType, val GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mRetType) { + *arg = &val +} + +type GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mArgType = string +type GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mRetType = string + +/* + types and functions for metricsRetentionTimeRaw +*/ + +// isNotNullableString +type GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawAttributeType = *string + +func getGetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawAttributeTypeOk(arg GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawAttributeType) (ret GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawAttributeType(arg *GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawAttributeType, val GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawRetType) { + *arg = &val +} + +type GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawArgType = string +type GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawRetType = string + // GetMetricsStorageRetentionResponse struct for GetMetricsStorageRetentionResponse type GetMetricsStorageRetentionResponse struct { // REQUIRED - Message *string `json:"message"` + Message GetMetricsStorageRetentionResponseGetMessageAttributeType `json:"message"` // REQUIRED - MetricsRetentionTime1h *string `json:"metricsRetentionTime1h"` + MetricsRetentionTime1h GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hAttributeType `json:"metricsRetentionTime1h"` // REQUIRED - MetricsRetentionTime5m *string `json:"metricsRetentionTime5m"` + MetricsRetentionTime5m GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mAttributeType `json:"metricsRetentionTime5m"` // REQUIRED - MetricsRetentionTimeRaw *string `json:"metricsRetentionTimeRaw"` + MetricsRetentionTimeRaw GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawAttributeType `json:"metricsRetentionTimeRaw"` } type _GetMetricsStorageRetentionResponse GetMetricsStorageRetentionResponse @@ -35,12 +119,12 @@ type _GetMetricsStorageRetentionResponse GetMetricsStorageRetentionResponse // 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 { +func NewGetMetricsStorageRetentionResponse(message GetMetricsStorageRetentionResponseGetMessageArgType, metricsRetentionTime1h GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hArgType, metricsRetentionTime5m GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mArgType, metricsRetentionTimeRaw GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawArgType) *GetMetricsStorageRetentionResponse { this := GetMetricsStorageRetentionResponse{} - this.Message = message - this.MetricsRetentionTime1h = metricsRetentionTime1h - this.MetricsRetentionTime5m = metricsRetentionTime5m - this.MetricsRetentionTimeRaw = metricsRetentionTimeRaw + setGetMetricsStorageRetentionResponseGetMessageAttributeType(&this.Message, message) + setGetMetricsStorageRetentionResponseGetMetricsRetentionTime1hAttributeType(&this.MetricsRetentionTime1h, metricsRetentionTime1h) + setGetMetricsStorageRetentionResponseGetMetricsRetentionTime5mAttributeType(&this.MetricsRetentionTime5m, metricsRetentionTime5m) + setGetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawAttributeType(&this.MetricsRetentionTimeRaw, metricsRetentionTimeRaw) return &this } @@ -53,107 +137,87 @@ func NewGetMetricsStorageRetentionResponseWithDefaults() *GetMetricsStorageReten } // GetMessage returns the Message field value -func (o *GetMetricsStorageRetentionResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *GetMetricsStorageRetentionResponse) GetMessage() (ret GetMetricsStorageRetentionResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *GetMetricsStorageRetentionResponse) GetMessageOk() (ret GetMetricsStorageRetentionResponseGetMessageRetType, ok bool) { + return getGetMetricsStorageRetentionResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *GetMetricsStorageRetentionResponse) SetMessage(v *string) { - o.Message = v +func (o *GetMetricsStorageRetentionResponse) SetMessage(v GetMetricsStorageRetentionResponseGetMessageRetType) { + setGetMetricsStorageRetentionResponseGetMessageAttributeType(&o.Message, v) } // GetMetricsRetentionTime1h returns the MetricsRetentionTime1h field value -func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTime1h() *string { - if o == nil || IsNil(o.MetricsRetentionTime1h) { - var ret *string - return ret - } - - return o.MetricsRetentionTime1h +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTime1h() (ret GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hRetType) { + ret, _ = o.GetMetricsRetentionTime1hOk() + return ret } // 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 +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTime1hOk() (ret GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hRetType, ok bool) { + return getGetMetricsStorageRetentionResponseGetMetricsRetentionTime1hAttributeTypeOk(o.MetricsRetentionTime1h) } // SetMetricsRetentionTime1h sets field value -func (o *GetMetricsStorageRetentionResponse) SetMetricsRetentionTime1h(v *string) { - o.MetricsRetentionTime1h = v +func (o *GetMetricsStorageRetentionResponse) SetMetricsRetentionTime1h(v GetMetricsStorageRetentionResponseGetMetricsRetentionTime1hRetType) { + setGetMetricsStorageRetentionResponseGetMetricsRetentionTime1hAttributeType(&o.MetricsRetentionTime1h, v) } // GetMetricsRetentionTime5m returns the MetricsRetentionTime5m field value -func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTime5m() *string { - if o == nil || IsNil(o.MetricsRetentionTime5m) { - var ret *string - return ret - } - - return o.MetricsRetentionTime5m +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTime5m() (ret GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mRetType) { + ret, _ = o.GetMetricsRetentionTime5mOk() + return ret } // 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 +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTime5mOk() (ret GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mRetType, ok bool) { + return getGetMetricsStorageRetentionResponseGetMetricsRetentionTime5mAttributeTypeOk(o.MetricsRetentionTime5m) } // SetMetricsRetentionTime5m sets field value -func (o *GetMetricsStorageRetentionResponse) SetMetricsRetentionTime5m(v *string) { - o.MetricsRetentionTime5m = v +func (o *GetMetricsStorageRetentionResponse) SetMetricsRetentionTime5m(v GetMetricsStorageRetentionResponseGetMetricsRetentionTime5mRetType) { + setGetMetricsStorageRetentionResponseGetMetricsRetentionTime5mAttributeType(&o.MetricsRetentionTime5m, v) } // GetMetricsRetentionTimeRaw returns the MetricsRetentionTimeRaw field value -func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTimeRaw() *string { - if o == nil || IsNil(o.MetricsRetentionTimeRaw) { - var ret *string - return ret - } - - return o.MetricsRetentionTimeRaw +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTimeRaw() (ret GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawRetType) { + ret, _ = o.GetMetricsRetentionTimeRawOk() + return ret } // 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 +func (o *GetMetricsStorageRetentionResponse) GetMetricsRetentionTimeRawOk() (ret GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawRetType, ok bool) { + return getGetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawAttributeTypeOk(o.MetricsRetentionTimeRaw) } // SetMetricsRetentionTimeRaw sets field value -func (o *GetMetricsStorageRetentionResponse) SetMetricsRetentionTimeRaw(v *string) { - o.MetricsRetentionTimeRaw = v +func (o *GetMetricsStorageRetentionResponse) SetMetricsRetentionTimeRaw(v GetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawRetType) { + setGetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawAttributeType(&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 + if val, ok := getGetMetricsStorageRetentionResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getGetMetricsStorageRetentionResponseGetMetricsRetentionTime1hAttributeTypeOk(o.MetricsRetentionTime1h); ok { + toSerialize["MetricsRetentionTime1h"] = val + } + if val, ok := getGetMetricsStorageRetentionResponseGetMetricsRetentionTime5mAttributeTypeOk(o.MetricsRetentionTime5m); ok { + toSerialize["MetricsRetentionTime5m"] = val + } + if val, ok := getGetMetricsStorageRetentionResponseGetMetricsRetentionTimeRawAttributeTypeOk(o.MetricsRetentionTimeRaw); ok { + toSerialize["MetricsRetentionTimeRaw"] = val + } return toSerialize, nil } diff --git a/services/observability/model_get_scrape_config_response.go b/services/observability/model_get_scrape_config_response.go index 2b0ed5f9a..c9d27bab4 100644 --- a/services/observability/model_get_scrape_config_response.go +++ b/services/observability/model_get_scrape_config_response.go @@ -17,12 +17,53 @@ import ( // checks if the GetScrapeConfigResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetScrapeConfigResponse{} +/* + types and functions for data +*/ + +// isModel +type GetScrapeConfigResponseGetDataAttributeType = *Job +type GetScrapeConfigResponseGetDataArgType = Job +type GetScrapeConfigResponseGetDataRetType = Job + +func getGetScrapeConfigResponseGetDataAttributeTypeOk(arg GetScrapeConfigResponseGetDataAttributeType) (ret GetScrapeConfigResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetScrapeConfigResponseGetDataAttributeType(arg *GetScrapeConfigResponseGetDataAttributeType, val GetScrapeConfigResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type GetScrapeConfigResponseGetMessageAttributeType = *string + +func getGetScrapeConfigResponseGetMessageAttributeTypeOk(arg GetScrapeConfigResponseGetMessageAttributeType) (ret GetScrapeConfigResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetScrapeConfigResponseGetMessageAttributeType(arg *GetScrapeConfigResponseGetMessageAttributeType, val GetScrapeConfigResponseGetMessageRetType) { + *arg = &val +} + +type GetScrapeConfigResponseGetMessageArgType = string +type GetScrapeConfigResponseGetMessageRetType = string + // GetScrapeConfigResponse struct for GetScrapeConfigResponse type GetScrapeConfigResponse struct { // REQUIRED - Data *Job `json:"data"` + Data GetScrapeConfigResponseGetDataAttributeType `json:"data"` // REQUIRED - Message *string `json:"message"` + Message GetScrapeConfigResponseGetMessageAttributeType `json:"message"` } type _GetScrapeConfigResponse GetScrapeConfigResponse @@ -31,10 +72,10 @@ type _GetScrapeConfigResponse GetScrapeConfigResponse // 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 { +func NewGetScrapeConfigResponse(data GetScrapeConfigResponseGetDataArgType, message GetScrapeConfigResponseGetMessageArgType) *GetScrapeConfigResponse { this := GetScrapeConfigResponse{} - this.Data = data - this.Message = message + setGetScrapeConfigResponseGetDataAttributeType(&this.Data, data) + setGetScrapeConfigResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewGetScrapeConfigResponseWithDefaults() *GetScrapeConfigResponse { } // GetData returns the Data field value -func (o *GetScrapeConfigResponse) GetData() *Job { - if o == nil || IsNil(o.Data) { - var ret *Job - return ret - } - - return o.Data +func (o *GetScrapeConfigResponse) GetData() (ret GetScrapeConfigResponseGetDataRetType) { + ret, _ = o.GetDataOk() + return ret } // 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 +func (o *GetScrapeConfigResponse) GetDataOk() (ret GetScrapeConfigResponseGetDataRetType, ok bool) { + return getGetScrapeConfigResponseGetDataAttributeTypeOk(o.Data) } // SetData sets field value -func (o *GetScrapeConfigResponse) SetData(v *Job) { - o.Data = v +func (o *GetScrapeConfigResponse) SetData(v GetScrapeConfigResponseGetDataRetType) { + setGetScrapeConfigResponseGetDataAttributeType(&o.Data, v) } // GetMessage returns the Message field value -func (o *GetScrapeConfigResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *GetScrapeConfigResponse) GetMessage() (ret GetScrapeConfigResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *GetScrapeConfigResponse) GetMessageOk() (ret GetScrapeConfigResponseGetMessageRetType, ok bool) { + return getGetScrapeConfigResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *GetScrapeConfigResponse) SetMessage(v *string) { - o.Message = v +func (o *GetScrapeConfigResponse) SetMessage(v GetScrapeConfigResponseGetMessageRetType) { + setGetScrapeConfigResponseGetMessageAttributeType(&o.Message, v) } func (o GetScrapeConfigResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["data"] = o.Data - toSerialize["message"] = o.Message + if val, ok := getGetScrapeConfigResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getGetScrapeConfigResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_global.go b/services/observability/model_global.go index ca673ade2..8e84df8a2 100644 --- a/services/observability/model_global.go +++ b/services/observability/model_global.go @@ -17,16 +17,184 @@ import ( // checks if the Global type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Global{} +/* + types and functions for opsgenieApiKey +*/ + +// isNotNullableString +type GlobalGetOpsgenieApiKeyAttributeType = *string + +func getGlobalGetOpsgenieApiKeyAttributeTypeOk(arg GlobalGetOpsgenieApiKeyAttributeType) (ret GlobalGetOpsgenieApiKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGlobalGetOpsgenieApiKeyAttributeType(arg *GlobalGetOpsgenieApiKeyAttributeType, val GlobalGetOpsgenieApiKeyRetType) { + *arg = &val +} + +type GlobalGetOpsgenieApiKeyArgType = string +type GlobalGetOpsgenieApiKeyRetType = string + +/* + types and functions for opsgenieApiUrl +*/ + +// isNotNullableString +type GlobalGetOpsgenieApiUrlAttributeType = *string + +func getGlobalGetOpsgenieApiUrlAttributeTypeOk(arg GlobalGetOpsgenieApiUrlAttributeType) (ret GlobalGetOpsgenieApiUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGlobalGetOpsgenieApiUrlAttributeType(arg *GlobalGetOpsgenieApiUrlAttributeType, val GlobalGetOpsgenieApiUrlRetType) { + *arg = &val +} + +type GlobalGetOpsgenieApiUrlArgType = string +type GlobalGetOpsgenieApiUrlRetType = string + +/* + types and functions for resolveTimeout +*/ + +// isNotNullableString +type GlobalGetResolveTimeoutAttributeType = *string + +func getGlobalGetResolveTimeoutAttributeTypeOk(arg GlobalGetResolveTimeoutAttributeType) (ret GlobalGetResolveTimeoutRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGlobalGetResolveTimeoutAttributeType(arg *GlobalGetResolveTimeoutAttributeType, val GlobalGetResolveTimeoutRetType) { + *arg = &val +} + +type GlobalGetResolveTimeoutArgType = string +type GlobalGetResolveTimeoutRetType = string + +/* + types and functions for smtpAuthIdentity +*/ + +// isNotNullableString +type GlobalGetSmtpAuthIdentityAttributeType = *string + +func getGlobalGetSmtpAuthIdentityAttributeTypeOk(arg GlobalGetSmtpAuthIdentityAttributeType) (ret GlobalGetSmtpAuthIdentityRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGlobalGetSmtpAuthIdentityAttributeType(arg *GlobalGetSmtpAuthIdentityAttributeType, val GlobalGetSmtpAuthIdentityRetType) { + *arg = &val +} + +type GlobalGetSmtpAuthIdentityArgType = string +type GlobalGetSmtpAuthIdentityRetType = string + +/* + types and functions for smtpAuthPassword +*/ + +// isNotNullableString +type GlobalGetSmtpAuthPasswordAttributeType = *string + +func getGlobalGetSmtpAuthPasswordAttributeTypeOk(arg GlobalGetSmtpAuthPasswordAttributeType) (ret GlobalGetSmtpAuthPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGlobalGetSmtpAuthPasswordAttributeType(arg *GlobalGetSmtpAuthPasswordAttributeType, val GlobalGetSmtpAuthPasswordRetType) { + *arg = &val +} + +type GlobalGetSmtpAuthPasswordArgType = string +type GlobalGetSmtpAuthPasswordRetType = string + +/* + types and functions for smtpAuthUsername +*/ + +// isNotNullableString +type GlobalGetSmtpAuthUsernameAttributeType = *string + +func getGlobalGetSmtpAuthUsernameAttributeTypeOk(arg GlobalGetSmtpAuthUsernameAttributeType) (ret GlobalGetSmtpAuthUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGlobalGetSmtpAuthUsernameAttributeType(arg *GlobalGetSmtpAuthUsernameAttributeType, val GlobalGetSmtpAuthUsernameRetType) { + *arg = &val +} + +type GlobalGetSmtpAuthUsernameArgType = string +type GlobalGetSmtpAuthUsernameRetType = string + +/* + types and functions for smtpFrom +*/ + +// isNotNullableString +type GlobalGetSmtpFromAttributeType = *string + +func getGlobalGetSmtpFromAttributeTypeOk(arg GlobalGetSmtpFromAttributeType) (ret GlobalGetSmtpFromRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGlobalGetSmtpFromAttributeType(arg *GlobalGetSmtpFromAttributeType, val GlobalGetSmtpFromRetType) { + *arg = &val +} + +type GlobalGetSmtpFromArgType = string +type GlobalGetSmtpFromRetType = string + +/* + types and functions for smtpSmarthost +*/ + +// isNotNullableString +type GlobalGetSmtpSmarthostAttributeType = *string + +func getGlobalGetSmtpSmarthostAttributeTypeOk(arg GlobalGetSmtpSmarthostAttributeType) (ret GlobalGetSmtpSmarthostRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGlobalGetSmtpSmarthostAttributeType(arg *GlobalGetSmtpSmarthostAttributeType, val GlobalGetSmtpSmarthostRetType) { + *arg = &val +} + +type GlobalGetSmtpSmarthostArgType = string +type GlobalGetSmtpSmarthostRetType = string + // Global struct for Global type Global struct { - OpsgenieApiKey *string `json:"opsgenieApiKey,omitempty"` - OpsgenieApiUrl *string `json:"opsgenieApiUrl,omitempty"` - ResolveTimeout *string `json:"resolveTimeout,omitempty"` - SmtpAuthIdentity *string `json:"smtpAuthIdentity,omitempty"` - SmtpAuthPassword *string `json:"smtpAuthPassword,omitempty"` - SmtpAuthUsername *string `json:"smtpAuthUsername,omitempty"` - SmtpFrom *string `json:"smtpFrom,omitempty"` - SmtpSmarthost *string `json:"smtpSmarthost,omitempty"` + OpsgenieApiKey GlobalGetOpsgenieApiKeyAttributeType `json:"opsgenieApiKey,omitempty"` + OpsgenieApiUrl GlobalGetOpsgenieApiUrlAttributeType `json:"opsgenieApiUrl,omitempty"` + ResolveTimeout GlobalGetResolveTimeoutAttributeType `json:"resolveTimeout,omitempty"` + SmtpAuthIdentity GlobalGetSmtpAuthIdentityAttributeType `json:"smtpAuthIdentity,omitempty"` + SmtpAuthPassword GlobalGetSmtpAuthPasswordAttributeType `json:"smtpAuthPassword,omitempty"` + SmtpAuthUsername GlobalGetSmtpAuthUsernameAttributeType `json:"smtpAuthUsername,omitempty"` + SmtpFrom GlobalGetSmtpFromAttributeType `json:"smtpFrom,omitempty"` + SmtpSmarthost GlobalGetSmtpSmarthostAttributeType `json:"smtpSmarthost,omitempty"` } // NewGlobal instantiates a new Global object @@ -35,8 +203,6 @@ type Global struct { // will change when the set of required properties is changed func NewGlobal() *Global { this := Global{} - var resolveTimeout string = "5m" - this.ResolveTimeout = &resolveTimeout return &this } @@ -51,286 +217,214 @@ func NewGlobalWithDefaults() *Global { } // 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 +func (o *Global) GetOpsgenieApiKey() (res GlobalGetOpsgenieApiKeyRetType) { + res, _ = o.GetOpsgenieApiKeyOk() + return } // 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 +func (o *Global) GetOpsgenieApiKeyOk() (ret GlobalGetOpsgenieApiKeyRetType, ok bool) { + return getGlobalGetOpsgenieApiKeyAttributeTypeOk(o.OpsgenieApiKey) } // 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 + _, ok := o.GetOpsgenieApiKeyOk() + return ok } // SetOpsgenieApiKey gets a reference to the given string and assigns it to the OpsgenieApiKey field. -func (o *Global) SetOpsgenieApiKey(v *string) { - o.OpsgenieApiKey = v +func (o *Global) SetOpsgenieApiKey(v GlobalGetOpsgenieApiKeyRetType) { + setGlobalGetOpsgenieApiKeyAttributeType(&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 +func (o *Global) GetOpsgenieApiUrl() (res GlobalGetOpsgenieApiUrlRetType) { + res, _ = o.GetOpsgenieApiUrlOk() + return } // 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 +func (o *Global) GetOpsgenieApiUrlOk() (ret GlobalGetOpsgenieApiUrlRetType, ok bool) { + return getGlobalGetOpsgenieApiUrlAttributeTypeOk(o.OpsgenieApiUrl) } // 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 + _, ok := o.GetOpsgenieApiUrlOk() + return ok } // SetOpsgenieApiUrl gets a reference to the given string and assigns it to the OpsgenieApiUrl field. -func (o *Global) SetOpsgenieApiUrl(v *string) { - o.OpsgenieApiUrl = v +func (o *Global) SetOpsgenieApiUrl(v GlobalGetOpsgenieApiUrlRetType) { + setGlobalGetOpsgenieApiUrlAttributeType(&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 +func (o *Global) GetResolveTimeout() (res GlobalGetResolveTimeoutRetType) { + res, _ = o.GetResolveTimeoutOk() + return } // 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 +func (o *Global) GetResolveTimeoutOk() (ret GlobalGetResolveTimeoutRetType, ok bool) { + return getGlobalGetResolveTimeoutAttributeTypeOk(o.ResolveTimeout) } // 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 + _, ok := o.GetResolveTimeoutOk() + return ok } // SetResolveTimeout gets a reference to the given string and assigns it to the ResolveTimeout field. -func (o *Global) SetResolveTimeout(v *string) { - o.ResolveTimeout = v +func (o *Global) SetResolveTimeout(v GlobalGetResolveTimeoutRetType) { + setGlobalGetResolveTimeoutAttributeType(&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 +func (o *Global) GetSmtpAuthIdentity() (res GlobalGetSmtpAuthIdentityRetType) { + res, _ = o.GetSmtpAuthIdentityOk() + return } // 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 +func (o *Global) GetSmtpAuthIdentityOk() (ret GlobalGetSmtpAuthIdentityRetType, ok bool) { + return getGlobalGetSmtpAuthIdentityAttributeTypeOk(o.SmtpAuthIdentity) } // 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 + _, ok := o.GetSmtpAuthIdentityOk() + return ok } // SetSmtpAuthIdentity gets a reference to the given string and assigns it to the SmtpAuthIdentity field. -func (o *Global) SetSmtpAuthIdentity(v *string) { - o.SmtpAuthIdentity = v +func (o *Global) SetSmtpAuthIdentity(v GlobalGetSmtpAuthIdentityRetType) { + setGlobalGetSmtpAuthIdentityAttributeType(&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 +func (o *Global) GetSmtpAuthPassword() (res GlobalGetSmtpAuthPasswordRetType) { + res, _ = o.GetSmtpAuthPasswordOk() + return } // 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 +func (o *Global) GetSmtpAuthPasswordOk() (ret GlobalGetSmtpAuthPasswordRetType, ok bool) { + return getGlobalGetSmtpAuthPasswordAttributeTypeOk(o.SmtpAuthPassword) } // 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 + _, ok := o.GetSmtpAuthPasswordOk() + return ok } // SetSmtpAuthPassword gets a reference to the given string and assigns it to the SmtpAuthPassword field. -func (o *Global) SetSmtpAuthPassword(v *string) { - o.SmtpAuthPassword = v +func (o *Global) SetSmtpAuthPassword(v GlobalGetSmtpAuthPasswordRetType) { + setGlobalGetSmtpAuthPasswordAttributeType(&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 +func (o *Global) GetSmtpAuthUsername() (res GlobalGetSmtpAuthUsernameRetType) { + res, _ = o.GetSmtpAuthUsernameOk() + return } // 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 +func (o *Global) GetSmtpAuthUsernameOk() (ret GlobalGetSmtpAuthUsernameRetType, ok bool) { + return getGlobalGetSmtpAuthUsernameAttributeTypeOk(o.SmtpAuthUsername) } // 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 + _, ok := o.GetSmtpAuthUsernameOk() + return ok } // SetSmtpAuthUsername gets a reference to the given string and assigns it to the SmtpAuthUsername field. -func (o *Global) SetSmtpAuthUsername(v *string) { - o.SmtpAuthUsername = v +func (o *Global) SetSmtpAuthUsername(v GlobalGetSmtpAuthUsernameRetType) { + setGlobalGetSmtpAuthUsernameAttributeType(&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 +func (o *Global) GetSmtpFrom() (res GlobalGetSmtpFromRetType) { + res, _ = o.GetSmtpFromOk() + return } // 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 +func (o *Global) GetSmtpFromOk() (ret GlobalGetSmtpFromRetType, ok bool) { + return getGlobalGetSmtpFromAttributeTypeOk(o.SmtpFrom) } // 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 + _, ok := o.GetSmtpFromOk() + return ok } // SetSmtpFrom gets a reference to the given string and assigns it to the SmtpFrom field. -func (o *Global) SetSmtpFrom(v *string) { - o.SmtpFrom = v +func (o *Global) SetSmtpFrom(v GlobalGetSmtpFromRetType) { + setGlobalGetSmtpFromAttributeType(&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 +func (o *Global) GetSmtpSmarthost() (res GlobalGetSmtpSmarthostRetType) { + res, _ = o.GetSmtpSmarthostOk() + return } // 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 +func (o *Global) GetSmtpSmarthostOk() (ret GlobalGetSmtpSmarthostRetType, ok bool) { + return getGlobalGetSmtpSmarthostAttributeTypeOk(o.SmtpSmarthost) } // 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 + _, ok := o.GetSmtpSmarthostOk() + return ok } // 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) SetSmtpSmarthost(v GlobalGetSmtpSmarthostRetType) { + setGlobalGetSmtpSmarthostAttributeType(&o.SmtpSmarthost, v) } func (o Global) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.OpsgenieApiKey) { - toSerialize["opsgenieApiKey"] = o.OpsgenieApiKey + if val, ok := getGlobalGetOpsgenieApiKeyAttributeTypeOk(o.OpsgenieApiKey); ok { + toSerialize["OpsgenieApiKey"] = val } - if !IsNil(o.OpsgenieApiUrl) { - toSerialize["opsgenieApiUrl"] = o.OpsgenieApiUrl + if val, ok := getGlobalGetOpsgenieApiUrlAttributeTypeOk(o.OpsgenieApiUrl); ok { + toSerialize["OpsgenieApiUrl"] = val } - if !IsNil(o.ResolveTimeout) { - toSerialize["resolveTimeout"] = o.ResolveTimeout + if val, ok := getGlobalGetResolveTimeoutAttributeTypeOk(o.ResolveTimeout); ok { + toSerialize["ResolveTimeout"] = val } - if !IsNil(o.SmtpAuthIdentity) { - toSerialize["smtpAuthIdentity"] = o.SmtpAuthIdentity + if val, ok := getGlobalGetSmtpAuthIdentityAttributeTypeOk(o.SmtpAuthIdentity); ok { + toSerialize["SmtpAuthIdentity"] = val } - if !IsNil(o.SmtpAuthPassword) { - toSerialize["smtpAuthPassword"] = o.SmtpAuthPassword + if val, ok := getGlobalGetSmtpAuthPasswordAttributeTypeOk(o.SmtpAuthPassword); ok { + toSerialize["SmtpAuthPassword"] = val } - if !IsNil(o.SmtpAuthUsername) { - toSerialize["smtpAuthUsername"] = o.SmtpAuthUsername + if val, ok := getGlobalGetSmtpAuthUsernameAttributeTypeOk(o.SmtpAuthUsername); ok { + toSerialize["SmtpAuthUsername"] = val } - if !IsNil(o.SmtpFrom) { - toSerialize["smtpFrom"] = o.SmtpFrom + if val, ok := getGlobalGetSmtpFromAttributeTypeOk(o.SmtpFrom); ok { + toSerialize["SmtpFrom"] = val } - if !IsNil(o.SmtpSmarthost) { - toSerialize["smtpSmarthost"] = o.SmtpSmarthost + if val, ok := getGlobalGetSmtpSmarthostAttributeTypeOk(o.SmtpSmarthost); ok { + toSerialize["SmtpSmarthost"] = val } return toSerialize, nil } diff --git a/services/observability/model_grafana_configs.go b/services/observability/model_grafana_configs.go index ce8b4b2a1..a1a2c6971 100644 --- a/services/observability/model_grafana_configs.go +++ b/services/observability/model_grafana_configs.go @@ -17,13 +17,94 @@ import ( // checks if the GrafanaConfigs type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GrafanaConfigs{} +/* + types and functions for genericOauth +*/ + +// isModel +type GrafanaConfigsGetGenericOauthAttributeType = *GrafanaOauth +type GrafanaConfigsGetGenericOauthArgType = GrafanaOauth +type GrafanaConfigsGetGenericOauthRetType = GrafanaOauth + +func getGrafanaConfigsGetGenericOauthAttributeTypeOk(arg GrafanaConfigsGetGenericOauthAttributeType) (ret GrafanaConfigsGetGenericOauthRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaConfigsGetGenericOauthAttributeType(arg *GrafanaConfigsGetGenericOauthAttributeType, val GrafanaConfigsGetGenericOauthRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type GrafanaConfigsGetMessageAttributeType = *string + +func getGrafanaConfigsGetMessageAttributeTypeOk(arg GrafanaConfigsGetMessageAttributeType) (ret GrafanaConfigsGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaConfigsGetMessageAttributeType(arg *GrafanaConfigsGetMessageAttributeType, val GrafanaConfigsGetMessageRetType) { + *arg = &val +} + +type GrafanaConfigsGetMessageArgType = string +type GrafanaConfigsGetMessageRetType = string + +/* + types and functions for publicReadAccess +*/ + +// isBoolean +type GrafanaConfigsgetPublicReadAccessAttributeType = *bool +type GrafanaConfigsgetPublicReadAccessArgType = bool +type GrafanaConfigsgetPublicReadAccessRetType = bool + +func getGrafanaConfigsgetPublicReadAccessAttributeTypeOk(arg GrafanaConfigsgetPublicReadAccessAttributeType) (ret GrafanaConfigsgetPublicReadAccessRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaConfigsgetPublicReadAccessAttributeType(arg *GrafanaConfigsgetPublicReadAccessAttributeType, val GrafanaConfigsgetPublicReadAccessRetType) { + *arg = &val +} + +/* + types and functions for useStackitSso +*/ + +// isBoolean +type GrafanaConfigsgetUseStackitSsoAttributeType = *bool +type GrafanaConfigsgetUseStackitSsoArgType = bool +type GrafanaConfigsgetUseStackitSsoRetType = bool + +func getGrafanaConfigsgetUseStackitSsoAttributeTypeOk(arg GrafanaConfigsgetUseStackitSsoAttributeType) (ret GrafanaConfigsgetUseStackitSsoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaConfigsgetUseStackitSsoAttributeType(arg *GrafanaConfigsgetUseStackitSsoAttributeType, val GrafanaConfigsgetUseStackitSsoRetType) { + *arg = &val +} + // GrafanaConfigs struct for GrafanaConfigs type GrafanaConfigs struct { - GenericOauth *GrafanaOauth `json:"genericOauth,omitempty"` + GenericOauth GrafanaConfigsGetGenericOauthAttributeType `json:"genericOauth,omitempty"` // REQUIRED - Message *string `json:"message"` - PublicReadAccess *bool `json:"publicReadAccess,omitempty"` - UseStackitSso *bool `json:"useStackitSso,omitempty"` + Message GrafanaConfigsGetMessageAttributeType `json:"message"` + PublicReadAccess GrafanaConfigsgetPublicReadAccessAttributeType `json:"publicReadAccess,omitempty"` + UseStackitSso GrafanaConfigsgetUseStackitSsoAttributeType `json:"useStackitSso,omitempty"` } type _GrafanaConfigs GrafanaConfigs @@ -32,9 +113,9 @@ type _GrafanaConfigs GrafanaConfigs // 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 { +func NewGrafanaConfigs(message GrafanaConfigsGetMessageArgType) *GrafanaConfigs { this := GrafanaConfigs{} - this.Message = message + setGrafanaConfigsGetMessageAttributeType(&this.Message, message) return &this } @@ -47,136 +128,104 @@ func NewGrafanaConfigsWithDefaults() *GrafanaConfigs { } // 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 +func (o *GrafanaConfigs) GetGenericOauth() (res GrafanaConfigsGetGenericOauthRetType) { + res, _ = o.GetGenericOauthOk() + return } // 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 +func (o *GrafanaConfigs) GetGenericOauthOk() (ret GrafanaConfigsGetGenericOauthRetType, ok bool) { + return getGrafanaConfigsGetGenericOauthAttributeTypeOk(o.GenericOauth) } // 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 + _, ok := o.GetGenericOauthOk() + return ok } // SetGenericOauth gets a reference to the given GrafanaOauth and assigns it to the GenericOauth field. -func (o *GrafanaConfigs) SetGenericOauth(v *GrafanaOauth) { - o.GenericOauth = v +func (o *GrafanaConfigs) SetGenericOauth(v GrafanaConfigsGetGenericOauthRetType) { + setGrafanaConfigsGetGenericOauthAttributeType(&o.GenericOauth, v) } // GetMessage returns the Message field value -func (o *GrafanaConfigs) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *GrafanaConfigs) GetMessage() (ret GrafanaConfigsGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *GrafanaConfigs) GetMessageOk() (ret GrafanaConfigsGetMessageRetType, ok bool) { + return getGrafanaConfigsGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *GrafanaConfigs) SetMessage(v *string) { - o.Message = v +func (o *GrafanaConfigs) SetMessage(v GrafanaConfigsGetMessageRetType) { + setGrafanaConfigsGetMessageAttributeType(&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 +func (o *GrafanaConfigs) GetPublicReadAccess() (res GrafanaConfigsgetPublicReadAccessRetType) { + res, _ = o.GetPublicReadAccessOk() + return } // 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 +func (o *GrafanaConfigs) GetPublicReadAccessOk() (ret GrafanaConfigsgetPublicReadAccessRetType, ok bool) { + return getGrafanaConfigsgetPublicReadAccessAttributeTypeOk(o.PublicReadAccess) } // 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 + _, ok := o.GetPublicReadAccessOk() + return ok } // SetPublicReadAccess gets a reference to the given bool and assigns it to the PublicReadAccess field. -func (o *GrafanaConfigs) SetPublicReadAccess(v *bool) { - o.PublicReadAccess = v +func (o *GrafanaConfigs) SetPublicReadAccess(v GrafanaConfigsgetPublicReadAccessRetType) { + setGrafanaConfigsgetPublicReadAccessAttributeType(&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 +func (o *GrafanaConfigs) GetUseStackitSso() (res GrafanaConfigsgetUseStackitSsoRetType) { + res, _ = o.GetUseStackitSsoOk() + return } // 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 +func (o *GrafanaConfigs) GetUseStackitSsoOk() (ret GrafanaConfigsgetUseStackitSsoRetType, ok bool) { + return getGrafanaConfigsgetUseStackitSsoAttributeTypeOk(o.UseStackitSso) } // 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 + _, ok := o.GetUseStackitSsoOk() + return ok } // 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) SetUseStackitSso(v GrafanaConfigsgetUseStackitSsoRetType) { + setGrafanaConfigsgetUseStackitSsoAttributeType(&o.UseStackitSso, v) } func (o GrafanaConfigs) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.GenericOauth) { - toSerialize["genericOauth"] = o.GenericOauth + if val, ok := getGrafanaConfigsGetGenericOauthAttributeTypeOk(o.GenericOauth); ok { + toSerialize["GenericOauth"] = val + } + if val, ok := getGrafanaConfigsGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val } - toSerialize["message"] = o.Message - if !IsNil(o.PublicReadAccess) { - toSerialize["publicReadAccess"] = o.PublicReadAccess + if val, ok := getGrafanaConfigsgetPublicReadAccessAttributeTypeOk(o.PublicReadAccess); ok { + toSerialize["PublicReadAccess"] = val } - if !IsNil(o.UseStackitSso) { - toSerialize["useStackitSso"] = o.UseStackitSso + if val, ok := getGrafanaConfigsgetUseStackitSsoAttributeTypeOk(o.UseStackitSso); ok { + toSerialize["UseStackitSso"] = val } return toSerialize, nil } diff --git a/services/observability/model_grafana_oauth.go b/services/observability/model_grafana_oauth.go index b268d78f0..e828af2f3 100644 --- a/services/observability/model_grafana_oauth.go +++ b/services/observability/model_grafana_oauth.go @@ -17,26 +17,254 @@ import ( // checks if the GrafanaOauth type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GrafanaOauth{} +/* + types and functions for apiUrl +*/ + +// isNotNullableString +type GrafanaOauthGetApiUrlAttributeType = *string + +func getGrafanaOauthGetApiUrlAttributeTypeOk(arg GrafanaOauthGetApiUrlAttributeType) (ret GrafanaOauthGetApiUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthGetApiUrlAttributeType(arg *GrafanaOauthGetApiUrlAttributeType, val GrafanaOauthGetApiUrlRetType) { + *arg = &val +} + +type GrafanaOauthGetApiUrlArgType = string +type GrafanaOauthGetApiUrlRetType = string + +/* + types and functions for authUrl +*/ + +// isNotNullableString +type GrafanaOauthGetAuthUrlAttributeType = *string + +func getGrafanaOauthGetAuthUrlAttributeTypeOk(arg GrafanaOauthGetAuthUrlAttributeType) (ret GrafanaOauthGetAuthUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthGetAuthUrlAttributeType(arg *GrafanaOauthGetAuthUrlAttributeType, val GrafanaOauthGetAuthUrlRetType) { + *arg = &val +} + +type GrafanaOauthGetAuthUrlArgType = string +type GrafanaOauthGetAuthUrlRetType = string + +/* + types and functions for enabled +*/ + +// isBoolean +type GrafanaOauthgetEnabledAttributeType = *bool +type GrafanaOauthgetEnabledArgType = bool +type GrafanaOauthgetEnabledRetType = bool + +func getGrafanaOauthgetEnabledAttributeTypeOk(arg GrafanaOauthgetEnabledAttributeType) (ret GrafanaOauthgetEnabledRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthgetEnabledAttributeType(arg *GrafanaOauthgetEnabledAttributeType, val GrafanaOauthgetEnabledRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type GrafanaOauthGetNameAttributeType = *string + +func getGrafanaOauthGetNameAttributeTypeOk(arg GrafanaOauthGetNameAttributeType) (ret GrafanaOauthGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthGetNameAttributeType(arg *GrafanaOauthGetNameAttributeType, val GrafanaOauthGetNameRetType) { + *arg = &val +} + +type GrafanaOauthGetNameArgType = string +type GrafanaOauthGetNameRetType = string + +/* + types and functions for oauthClientId +*/ + +// isNotNullableString +type GrafanaOauthGetOauthClientIdAttributeType = *string + +func getGrafanaOauthGetOauthClientIdAttributeTypeOk(arg GrafanaOauthGetOauthClientIdAttributeType) (ret GrafanaOauthGetOauthClientIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthGetOauthClientIdAttributeType(arg *GrafanaOauthGetOauthClientIdAttributeType, val GrafanaOauthGetOauthClientIdRetType) { + *arg = &val +} + +type GrafanaOauthGetOauthClientIdArgType = string +type GrafanaOauthGetOauthClientIdRetType = string + +/* + types and functions for oauthClientSecret +*/ + +// isNotNullableString +type GrafanaOauthGetOauthClientSecretAttributeType = *string + +func getGrafanaOauthGetOauthClientSecretAttributeTypeOk(arg GrafanaOauthGetOauthClientSecretAttributeType) (ret GrafanaOauthGetOauthClientSecretRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthGetOauthClientSecretAttributeType(arg *GrafanaOauthGetOauthClientSecretAttributeType, val GrafanaOauthGetOauthClientSecretRetType) { + *arg = &val +} + +type GrafanaOauthGetOauthClientSecretArgType = string +type GrafanaOauthGetOauthClientSecretRetType = string + +/* + types and functions for roleAttributePath +*/ + +// isNotNullableString +type GrafanaOauthGetRoleAttributePathAttributeType = *string + +func getGrafanaOauthGetRoleAttributePathAttributeTypeOk(arg GrafanaOauthGetRoleAttributePathAttributeType) (ret GrafanaOauthGetRoleAttributePathRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthGetRoleAttributePathAttributeType(arg *GrafanaOauthGetRoleAttributePathAttributeType, val GrafanaOauthGetRoleAttributePathRetType) { + *arg = &val +} + +type GrafanaOauthGetRoleAttributePathArgType = string +type GrafanaOauthGetRoleAttributePathRetType = string + +/* + types and functions for roleAttributeStrict +*/ + +// isBoolean +type GrafanaOauthgetRoleAttributeStrictAttributeType = *bool +type GrafanaOauthgetRoleAttributeStrictArgType = bool +type GrafanaOauthgetRoleAttributeStrictRetType = bool + +func getGrafanaOauthgetRoleAttributeStrictAttributeTypeOk(arg GrafanaOauthgetRoleAttributeStrictAttributeType) (ret GrafanaOauthgetRoleAttributeStrictRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthgetRoleAttributeStrictAttributeType(arg *GrafanaOauthgetRoleAttributeStrictAttributeType, val GrafanaOauthgetRoleAttributeStrictRetType) { + *arg = &val +} + +/* + types and functions for scopes +*/ + +// isNotNullableString +type GrafanaOauthGetScopesAttributeType = *string + +func getGrafanaOauthGetScopesAttributeTypeOk(arg GrafanaOauthGetScopesAttributeType) (ret GrafanaOauthGetScopesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthGetScopesAttributeType(arg *GrafanaOauthGetScopesAttributeType, val GrafanaOauthGetScopesRetType) { + *arg = &val +} + +type GrafanaOauthGetScopesArgType = string +type GrafanaOauthGetScopesRetType = string + +/* + types and functions for tokenUrl +*/ + +// isNotNullableString +type GrafanaOauthGetTokenUrlAttributeType = *string + +func getGrafanaOauthGetTokenUrlAttributeTypeOk(arg GrafanaOauthGetTokenUrlAttributeType) (ret GrafanaOauthGetTokenUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthGetTokenUrlAttributeType(arg *GrafanaOauthGetTokenUrlAttributeType, val GrafanaOauthGetTokenUrlRetType) { + *arg = &val +} + +type GrafanaOauthGetTokenUrlArgType = string +type GrafanaOauthGetTokenUrlRetType = string + +/* + types and functions for usePkce +*/ + +// isBoolean +type GrafanaOauthgetUsePkceAttributeType = *bool +type GrafanaOauthgetUsePkceArgType = bool +type GrafanaOauthgetUsePkceRetType = bool + +func getGrafanaOauthgetUsePkceAttributeTypeOk(arg GrafanaOauthgetUsePkceAttributeType) (ret GrafanaOauthgetUsePkceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGrafanaOauthgetUsePkceAttributeType(arg *GrafanaOauthgetUsePkceAttributeType, val GrafanaOauthgetUsePkceRetType) { + *arg = &val +} + // GrafanaOauth struct for GrafanaOauth type GrafanaOauth struct { // REQUIRED - ApiUrl *string `json:"apiUrl"` + ApiUrl GrafanaOauthGetApiUrlAttributeType `json:"apiUrl"` // REQUIRED - AuthUrl *string `json:"authUrl"` + AuthUrl GrafanaOauthGetAuthUrlAttributeType `json:"authUrl"` // REQUIRED - Enabled *bool `json:"enabled"` - Name *string `json:"name,omitempty"` + Enabled GrafanaOauthgetEnabledAttributeType `json:"enabled"` + Name GrafanaOauthGetNameAttributeType `json:"name,omitempty"` // REQUIRED - OauthClientId *string `json:"oauthClientId"` + OauthClientId GrafanaOauthGetOauthClientIdAttributeType `json:"oauthClientId"` // REQUIRED - OauthClientSecret *string `json:"oauthClientSecret"` + OauthClientSecret GrafanaOauthGetOauthClientSecretAttributeType `json:"oauthClientSecret"` // REQUIRED - RoleAttributePath *string `json:"roleAttributePath"` - RoleAttributeStrict *bool `json:"roleAttributeStrict,omitempty"` - Scopes *string `json:"scopes,omitempty"` + RoleAttributePath GrafanaOauthGetRoleAttributePathAttributeType `json:"roleAttributePath"` + RoleAttributeStrict GrafanaOauthgetRoleAttributeStrictAttributeType `json:"roleAttributeStrict,omitempty"` + Scopes GrafanaOauthGetScopesAttributeType `json:"scopes,omitempty"` // REQUIRED - TokenUrl *string `json:"tokenUrl"` - UsePkce *bool `json:"usePkce,omitempty"` + TokenUrl GrafanaOauthGetTokenUrlAttributeType `json:"tokenUrl"` + UsePkce GrafanaOauthgetUsePkceAttributeType `json:"usePkce,omitempty"` } type _GrafanaOauth GrafanaOauth @@ -45,19 +273,15 @@ type _GrafanaOauth GrafanaOauth // 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 { +func NewGrafanaOauth(apiUrl GrafanaOauthGetApiUrlArgType, authUrl GrafanaOauthGetAuthUrlArgType, enabled GrafanaOauthgetEnabledArgType, oauthClientId GrafanaOauthGetOauthClientIdArgType, oauthClientSecret GrafanaOauthGetOauthClientSecretArgType, roleAttributePath GrafanaOauthGetRoleAttributePathArgType, tokenUrl GrafanaOauthGetTokenUrlArgType) *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 + setGrafanaOauthGetApiUrlAttributeType(&this.ApiUrl, apiUrl) + setGrafanaOauthGetAuthUrlAttributeType(&this.AuthUrl, authUrl) + setGrafanaOauthgetEnabledAttributeType(&this.Enabled, enabled) + setGrafanaOauthGetOauthClientIdAttributeType(&this.OauthClientId, oauthClientId) + setGrafanaOauthGetOauthClientSecretAttributeType(&this.OauthClientSecret, oauthClientSecret) + setGrafanaOauthGetRoleAttributePathAttributeType(&this.RoleAttributePath, roleAttributePath) + setGrafanaOauthGetTokenUrlAttributeType(&this.TokenUrl, tokenUrl) return &this } @@ -74,321 +298,250 @@ func NewGrafanaOauthWithDefaults() *GrafanaOauth { } // GetApiUrl returns the ApiUrl field value -func (o *GrafanaOauth) GetApiUrl() *string { - if o == nil || IsNil(o.ApiUrl) { - var ret *string - return ret - } - - return o.ApiUrl +func (o *GrafanaOauth) GetApiUrl() (ret GrafanaOauthGetApiUrlRetType) { + ret, _ = o.GetApiUrlOk() + return ret } // 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 +func (o *GrafanaOauth) GetApiUrlOk() (ret GrafanaOauthGetApiUrlRetType, ok bool) { + return getGrafanaOauthGetApiUrlAttributeTypeOk(o.ApiUrl) } // SetApiUrl sets field value -func (o *GrafanaOauth) SetApiUrl(v *string) { - o.ApiUrl = v +func (o *GrafanaOauth) SetApiUrl(v GrafanaOauthGetApiUrlRetType) { + setGrafanaOauthGetApiUrlAttributeType(&o.ApiUrl, v) } // GetAuthUrl returns the AuthUrl field value -func (o *GrafanaOauth) GetAuthUrl() *string { - if o == nil || IsNil(o.AuthUrl) { - var ret *string - return ret - } - - return o.AuthUrl +func (o *GrafanaOauth) GetAuthUrl() (ret GrafanaOauthGetAuthUrlRetType) { + ret, _ = o.GetAuthUrlOk() + return ret } // 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 +func (o *GrafanaOauth) GetAuthUrlOk() (ret GrafanaOauthGetAuthUrlRetType, ok bool) { + return getGrafanaOauthGetAuthUrlAttributeTypeOk(o.AuthUrl) } // SetAuthUrl sets field value -func (o *GrafanaOauth) SetAuthUrl(v *string) { - o.AuthUrl = v +func (o *GrafanaOauth) SetAuthUrl(v GrafanaOauthGetAuthUrlRetType) { + setGrafanaOauthGetAuthUrlAttributeType(&o.AuthUrl, v) } // GetEnabled returns the Enabled field value -func (o *GrafanaOauth) GetEnabled() *bool { - if o == nil || IsNil(o.Enabled) { - var ret *bool - return ret - } - - return o.Enabled +func (o *GrafanaOauth) GetEnabled() (ret GrafanaOauthgetEnabledRetType) { + ret, _ = o.GetEnabledOk() + return ret } // 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 +func (o *GrafanaOauth) GetEnabledOk() (ret GrafanaOauthgetEnabledRetType, ok bool) { + return getGrafanaOauthgetEnabledAttributeTypeOk(o.Enabled) } // SetEnabled sets field value -func (o *GrafanaOauth) SetEnabled(v *bool) { - o.Enabled = v +func (o *GrafanaOauth) SetEnabled(v GrafanaOauthgetEnabledRetType) { + setGrafanaOauthgetEnabledAttributeType(&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 +func (o *GrafanaOauth) GetName() (res GrafanaOauthGetNameRetType) { + res, _ = o.GetNameOk() + return } // 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 +func (o *GrafanaOauth) GetNameOk() (ret GrafanaOauthGetNameRetType, ok bool) { + return getGrafanaOauthGetNameAttributeTypeOk(o.Name) } // 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 + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *GrafanaOauth) SetName(v *string) { - o.Name = v +func (o *GrafanaOauth) SetName(v GrafanaOauthGetNameRetType) { + setGrafanaOauthGetNameAttributeType(&o.Name, v) } // GetOauthClientId returns the OauthClientId field value -func (o *GrafanaOauth) GetOauthClientId() *string { - if o == nil || IsNil(o.OauthClientId) { - var ret *string - return ret - } - - return o.OauthClientId +func (o *GrafanaOauth) GetOauthClientId() (ret GrafanaOauthGetOauthClientIdRetType) { + ret, _ = o.GetOauthClientIdOk() + return ret } // 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 +func (o *GrafanaOauth) GetOauthClientIdOk() (ret GrafanaOauthGetOauthClientIdRetType, ok bool) { + return getGrafanaOauthGetOauthClientIdAttributeTypeOk(o.OauthClientId) } // SetOauthClientId sets field value -func (o *GrafanaOauth) SetOauthClientId(v *string) { - o.OauthClientId = v +func (o *GrafanaOauth) SetOauthClientId(v GrafanaOauthGetOauthClientIdRetType) { + setGrafanaOauthGetOauthClientIdAttributeType(&o.OauthClientId, v) } // GetOauthClientSecret returns the OauthClientSecret field value -func (o *GrafanaOauth) GetOauthClientSecret() *string { - if o == nil || IsNil(o.OauthClientSecret) { - var ret *string - return ret - } - - return o.OauthClientSecret +func (o *GrafanaOauth) GetOauthClientSecret() (ret GrafanaOauthGetOauthClientSecretRetType) { + ret, _ = o.GetOauthClientSecretOk() + return ret } // 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 +func (o *GrafanaOauth) GetOauthClientSecretOk() (ret GrafanaOauthGetOauthClientSecretRetType, ok bool) { + return getGrafanaOauthGetOauthClientSecretAttributeTypeOk(o.OauthClientSecret) } // SetOauthClientSecret sets field value -func (o *GrafanaOauth) SetOauthClientSecret(v *string) { - o.OauthClientSecret = v +func (o *GrafanaOauth) SetOauthClientSecret(v GrafanaOauthGetOauthClientSecretRetType) { + setGrafanaOauthGetOauthClientSecretAttributeType(&o.OauthClientSecret, v) } // GetRoleAttributePath returns the RoleAttributePath field value -func (o *GrafanaOauth) GetRoleAttributePath() *string { - if o == nil || IsNil(o.RoleAttributePath) { - var ret *string - return ret - } - - return o.RoleAttributePath +func (o *GrafanaOauth) GetRoleAttributePath() (ret GrafanaOauthGetRoleAttributePathRetType) { + ret, _ = o.GetRoleAttributePathOk() + return ret } // 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 +func (o *GrafanaOauth) GetRoleAttributePathOk() (ret GrafanaOauthGetRoleAttributePathRetType, ok bool) { + return getGrafanaOauthGetRoleAttributePathAttributeTypeOk(o.RoleAttributePath) } // SetRoleAttributePath sets field value -func (o *GrafanaOauth) SetRoleAttributePath(v *string) { - o.RoleAttributePath = v +func (o *GrafanaOauth) SetRoleAttributePath(v GrafanaOauthGetRoleAttributePathRetType) { + setGrafanaOauthGetRoleAttributePathAttributeType(&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 +func (o *GrafanaOauth) GetRoleAttributeStrict() (res GrafanaOauthgetRoleAttributeStrictRetType) { + res, _ = o.GetRoleAttributeStrictOk() + return } // 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 +func (o *GrafanaOauth) GetRoleAttributeStrictOk() (ret GrafanaOauthgetRoleAttributeStrictRetType, ok bool) { + return getGrafanaOauthgetRoleAttributeStrictAttributeTypeOk(o.RoleAttributeStrict) } // 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 + _, ok := o.GetRoleAttributeStrictOk() + return ok } // SetRoleAttributeStrict gets a reference to the given bool and assigns it to the RoleAttributeStrict field. -func (o *GrafanaOauth) SetRoleAttributeStrict(v *bool) { - o.RoleAttributeStrict = v +func (o *GrafanaOauth) SetRoleAttributeStrict(v GrafanaOauthgetRoleAttributeStrictRetType) { + setGrafanaOauthgetRoleAttributeStrictAttributeType(&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 +func (o *GrafanaOauth) GetScopes() (res GrafanaOauthGetScopesRetType) { + res, _ = o.GetScopesOk() + return } // 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 +func (o *GrafanaOauth) GetScopesOk() (ret GrafanaOauthGetScopesRetType, ok bool) { + return getGrafanaOauthGetScopesAttributeTypeOk(o.Scopes) } // 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 + _, ok := o.GetScopesOk() + return ok } // SetScopes gets a reference to the given string and assigns it to the Scopes field. -func (o *GrafanaOauth) SetScopes(v *string) { - o.Scopes = v +func (o *GrafanaOauth) SetScopes(v GrafanaOauthGetScopesRetType) { + setGrafanaOauthGetScopesAttributeType(&o.Scopes, v) } // GetTokenUrl returns the TokenUrl field value -func (o *GrafanaOauth) GetTokenUrl() *string { - if o == nil || IsNil(o.TokenUrl) { - var ret *string - return ret - } - - return o.TokenUrl +func (o *GrafanaOauth) GetTokenUrl() (ret GrafanaOauthGetTokenUrlRetType) { + ret, _ = o.GetTokenUrlOk() + return ret } // 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 +func (o *GrafanaOauth) GetTokenUrlOk() (ret GrafanaOauthGetTokenUrlRetType, ok bool) { + return getGrafanaOauthGetTokenUrlAttributeTypeOk(o.TokenUrl) } // SetTokenUrl sets field value -func (o *GrafanaOauth) SetTokenUrl(v *string) { - o.TokenUrl = v +func (o *GrafanaOauth) SetTokenUrl(v GrafanaOauthGetTokenUrlRetType) { + setGrafanaOauthGetTokenUrlAttributeType(&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 +func (o *GrafanaOauth) GetUsePkce() (res GrafanaOauthgetUsePkceRetType) { + res, _ = o.GetUsePkceOk() + return } // 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 +func (o *GrafanaOauth) GetUsePkceOk() (ret GrafanaOauthgetUsePkceRetType, ok bool) { + return getGrafanaOauthgetUsePkceAttributeTypeOk(o.UsePkce) } // 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 + _, ok := o.GetUsePkceOk() + return ok } // 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) SetUsePkce(v GrafanaOauthgetUsePkceRetType) { + setGrafanaOauthgetUsePkceAttributeType(&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 + if val, ok := getGrafanaOauthGetApiUrlAttributeTypeOk(o.ApiUrl); ok { + toSerialize["ApiUrl"] = val + } + if val, ok := getGrafanaOauthGetAuthUrlAttributeTypeOk(o.AuthUrl); ok { + toSerialize["AuthUrl"] = val + } + if val, ok := getGrafanaOauthgetEnabledAttributeTypeOk(o.Enabled); ok { + toSerialize["Enabled"] = val + } + if val, ok := getGrafanaOauthGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getGrafanaOauthGetOauthClientIdAttributeTypeOk(o.OauthClientId); ok { + toSerialize["OauthClientId"] = val + } + if val, ok := getGrafanaOauthGetOauthClientSecretAttributeTypeOk(o.OauthClientSecret); ok { + toSerialize["OauthClientSecret"] = val + } + if val, ok := getGrafanaOauthGetRoleAttributePathAttributeTypeOk(o.RoleAttributePath); ok { + toSerialize["RoleAttributePath"] = val + } + if val, ok := getGrafanaOauthgetRoleAttributeStrictAttributeTypeOk(o.RoleAttributeStrict); ok { + toSerialize["RoleAttributeStrict"] = val } - toSerialize["oauthClientId"] = o.OauthClientId - toSerialize["oauthClientSecret"] = o.OauthClientSecret - toSerialize["roleAttributePath"] = o.RoleAttributePath - if !IsNil(o.RoleAttributeStrict) { - toSerialize["roleAttributeStrict"] = o.RoleAttributeStrict + if val, ok := getGrafanaOauthGetScopesAttributeTypeOk(o.Scopes); ok { + toSerialize["Scopes"] = val } - if !IsNil(o.Scopes) { - toSerialize["scopes"] = o.Scopes + if val, ok := getGrafanaOauthGetTokenUrlAttributeTypeOk(o.TokenUrl); ok { + toSerialize["TokenUrl"] = val } - toSerialize["tokenUrl"] = o.TokenUrl - if !IsNil(o.UsePkce) { - toSerialize["usePkce"] = o.UsePkce + if val, ok := getGrafanaOauthgetUsePkceAttributeTypeOk(o.UsePkce); ok { + toSerialize["UsePkce"] = val } return toSerialize, nil } diff --git a/services/observability/model_http_service_sd.go b/services/observability/model_http_service_sd.go index fb80fe3d1..7120cb475 100644 --- a/services/observability/model_http_service_sd.go +++ b/services/observability/model_http_service_sd.go @@ -17,14 +17,116 @@ import ( // checks if the HTTPServiceSD type satisfies the MappedNullable interface at compile time var _ MappedNullable = &HTTPServiceSD{} +/* + types and functions for basicAuth +*/ + +// isModel +type HTTPServiceSDGetBasicAuthAttributeType = *BasicAuth +type HTTPServiceSDGetBasicAuthArgType = BasicAuth +type HTTPServiceSDGetBasicAuthRetType = BasicAuth + +func getHTTPServiceSDGetBasicAuthAttributeTypeOk(arg HTTPServiceSDGetBasicAuthAttributeType) (ret HTTPServiceSDGetBasicAuthRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHTTPServiceSDGetBasicAuthAttributeType(arg *HTTPServiceSDGetBasicAuthAttributeType, val HTTPServiceSDGetBasicAuthRetType) { + *arg = &val +} + +/* + types and functions for oauth2 +*/ + +// isModel +type HTTPServiceSDGetOauth2AttributeType = *OAuth2 +type HTTPServiceSDGetOauth2ArgType = OAuth2 +type HTTPServiceSDGetOauth2RetType = OAuth2 + +func getHTTPServiceSDGetOauth2AttributeTypeOk(arg HTTPServiceSDGetOauth2AttributeType) (ret HTTPServiceSDGetOauth2RetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHTTPServiceSDGetOauth2AttributeType(arg *HTTPServiceSDGetOauth2AttributeType, val HTTPServiceSDGetOauth2RetType) { + *arg = &val +} + +/* + types and functions for refreshInterval +*/ + +// isNotNullableString +type HTTPServiceSDGetRefreshIntervalAttributeType = *string + +func getHTTPServiceSDGetRefreshIntervalAttributeTypeOk(arg HTTPServiceSDGetRefreshIntervalAttributeType) (ret HTTPServiceSDGetRefreshIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHTTPServiceSDGetRefreshIntervalAttributeType(arg *HTTPServiceSDGetRefreshIntervalAttributeType, val HTTPServiceSDGetRefreshIntervalRetType) { + *arg = &val +} + +type HTTPServiceSDGetRefreshIntervalArgType = string +type HTTPServiceSDGetRefreshIntervalRetType = string + +/* + types and functions for tlsConfig +*/ + +// isModel +type HTTPServiceSDGetTlsConfigAttributeType = *TLSConfig +type HTTPServiceSDGetTlsConfigArgType = TLSConfig +type HTTPServiceSDGetTlsConfigRetType = TLSConfig + +func getHTTPServiceSDGetTlsConfigAttributeTypeOk(arg HTTPServiceSDGetTlsConfigAttributeType) (ret HTTPServiceSDGetTlsConfigRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHTTPServiceSDGetTlsConfigAttributeType(arg *HTTPServiceSDGetTlsConfigAttributeType, val HTTPServiceSDGetTlsConfigRetType) { + *arg = &val +} + +/* + types and functions for url +*/ + +// isNotNullableString +type HTTPServiceSDGetUrlAttributeType = *string + +func getHTTPServiceSDGetUrlAttributeTypeOk(arg HTTPServiceSDGetUrlAttributeType) (ret HTTPServiceSDGetUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHTTPServiceSDGetUrlAttributeType(arg *HTTPServiceSDGetUrlAttributeType, val HTTPServiceSDGetUrlRetType) { + *arg = &val +} + +type HTTPServiceSDGetUrlArgType = string +type HTTPServiceSDGetUrlRetType = string + // HTTPServiceSD struct for HTTPServiceSD type HTTPServiceSD struct { - BasicAuth *BasicAuth `json:"basicAuth,omitempty"` - Oauth2 *OAuth2 `json:"oauth2,omitempty"` - RefreshInterval *string `json:"refreshInterval,omitempty"` - TlsConfig *TLSConfig `json:"tlsConfig,omitempty"` + BasicAuth HTTPServiceSDGetBasicAuthAttributeType `json:"basicAuth,omitempty"` + Oauth2 HTTPServiceSDGetOauth2AttributeType `json:"oauth2,omitempty"` + RefreshInterval HTTPServiceSDGetRefreshIntervalAttributeType `json:"refreshInterval,omitempty"` + TlsConfig HTTPServiceSDGetTlsConfigAttributeType `json:"tlsConfig,omitempty"` // REQUIRED - Url *string `json:"url"` + Url HTTPServiceSDGetUrlAttributeType `json:"url"` } type _HTTPServiceSD HTTPServiceSD @@ -33,11 +135,9 @@ type _HTTPServiceSD HTTPServiceSD // 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 { +func NewHTTPServiceSD(url HTTPServiceSDGetUrlArgType) *HTTPServiceSD { this := HTTPServiceSD{} - var refreshInterval string = "60s" - this.RefreshInterval = &refreshInterval - this.Url = url + setHTTPServiceSDGetUrlAttributeType(&this.Url, url) return &this } @@ -52,172 +152,131 @@ func NewHTTPServiceSDWithDefaults() *HTTPServiceSD { } // 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 +func (o *HTTPServiceSD) GetBasicAuth() (res HTTPServiceSDGetBasicAuthRetType) { + res, _ = o.GetBasicAuthOk() + return } // 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 +func (o *HTTPServiceSD) GetBasicAuthOk() (ret HTTPServiceSDGetBasicAuthRetType, ok bool) { + return getHTTPServiceSDGetBasicAuthAttributeTypeOk(o.BasicAuth) } // 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 + _, ok := o.GetBasicAuthOk() + return ok } // SetBasicAuth gets a reference to the given BasicAuth and assigns it to the BasicAuth field. -func (o *HTTPServiceSD) SetBasicAuth(v *BasicAuth) { - o.BasicAuth = v +func (o *HTTPServiceSD) SetBasicAuth(v HTTPServiceSDGetBasicAuthRetType) { + setHTTPServiceSDGetBasicAuthAttributeType(&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 +func (o *HTTPServiceSD) GetOauth2() (res HTTPServiceSDGetOauth2RetType) { + res, _ = o.GetOauth2Ok() + return } // 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 +func (o *HTTPServiceSD) GetOauth2Ok() (ret HTTPServiceSDGetOauth2RetType, ok bool) { + return getHTTPServiceSDGetOauth2AttributeTypeOk(o.Oauth2) } // 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 + _, ok := o.GetOauth2Ok() + return ok } // SetOauth2 gets a reference to the given OAuth2 and assigns it to the Oauth2 field. -func (o *HTTPServiceSD) SetOauth2(v *OAuth2) { - o.Oauth2 = v +func (o *HTTPServiceSD) SetOauth2(v HTTPServiceSDGetOauth2RetType) { + setHTTPServiceSDGetOauth2AttributeType(&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 +func (o *HTTPServiceSD) GetRefreshInterval() (res HTTPServiceSDGetRefreshIntervalRetType) { + res, _ = o.GetRefreshIntervalOk() + return } // 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 +func (o *HTTPServiceSD) GetRefreshIntervalOk() (ret HTTPServiceSDGetRefreshIntervalRetType, ok bool) { + return getHTTPServiceSDGetRefreshIntervalAttributeTypeOk(o.RefreshInterval) } // 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 + _, ok := o.GetRefreshIntervalOk() + return ok } // SetRefreshInterval gets a reference to the given string and assigns it to the RefreshInterval field. -func (o *HTTPServiceSD) SetRefreshInterval(v *string) { - o.RefreshInterval = v +func (o *HTTPServiceSD) SetRefreshInterval(v HTTPServiceSDGetRefreshIntervalRetType) { + setHTTPServiceSDGetRefreshIntervalAttributeType(&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 +func (o *HTTPServiceSD) GetTlsConfig() (res HTTPServiceSDGetTlsConfigRetType) { + res, _ = o.GetTlsConfigOk() + return } // 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 +func (o *HTTPServiceSD) GetTlsConfigOk() (ret HTTPServiceSDGetTlsConfigRetType, ok bool) { + return getHTTPServiceSDGetTlsConfigAttributeTypeOk(o.TlsConfig) } // 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 + _, ok := o.GetTlsConfigOk() + return ok } // SetTlsConfig gets a reference to the given TLSConfig and assigns it to the TlsConfig field. -func (o *HTTPServiceSD) SetTlsConfig(v *TLSConfig) { - o.TlsConfig = v +func (o *HTTPServiceSD) SetTlsConfig(v HTTPServiceSDGetTlsConfigRetType) { + setHTTPServiceSDGetTlsConfigAttributeType(&o.TlsConfig, v) } // GetUrl returns the Url field value -func (o *HTTPServiceSD) GetUrl() *string { - if o == nil || IsNil(o.Url) { - var ret *string - return ret - } - - return o.Url +func (o *HTTPServiceSD) GetUrl() (ret HTTPServiceSDGetUrlRetType) { + ret, _ = o.GetUrlOk() + return ret } // 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 +func (o *HTTPServiceSD) GetUrlOk() (ret HTTPServiceSDGetUrlRetType, ok bool) { + return getHTTPServiceSDGetUrlAttributeTypeOk(o.Url) } // SetUrl sets field value -func (o *HTTPServiceSD) SetUrl(v *string) { - o.Url = v +func (o *HTTPServiceSD) SetUrl(v HTTPServiceSDGetUrlRetType) { + setHTTPServiceSDGetUrlAttributeType(&o.Url, v) } func (o HTTPServiceSD) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.BasicAuth) { - toSerialize["basicAuth"] = o.BasicAuth + if val, ok := getHTTPServiceSDGetBasicAuthAttributeTypeOk(o.BasicAuth); ok { + toSerialize["BasicAuth"] = val + } + if val, ok := getHTTPServiceSDGetOauth2AttributeTypeOk(o.Oauth2); ok { + toSerialize["Oauth2"] = val } - if !IsNil(o.Oauth2) { - toSerialize["oauth2"] = o.Oauth2 + if val, ok := getHTTPServiceSDGetRefreshIntervalAttributeTypeOk(o.RefreshInterval); ok { + toSerialize["RefreshInterval"] = val } - if !IsNil(o.RefreshInterval) { - toSerialize["refreshInterval"] = o.RefreshInterval + if val, ok := getHTTPServiceSDGetTlsConfigAttributeTypeOk(o.TlsConfig); ok { + toSerialize["TlsConfig"] = val } - if !IsNil(o.TlsConfig) { - toSerialize["tlsConfig"] = o.TlsConfig + if val, ok := getHTTPServiceSDGetUrlAttributeTypeOk(o.Url); ok { + toSerialize["Url"] = val } - toSerialize["url"] = o.Url return toSerialize, nil } diff --git a/services/observability/model_inhibit_rules.go b/services/observability/model_inhibit_rules.go index 18e0c2a5a..4f53110cd 100644 --- a/services/observability/model_inhibit_rules.go +++ b/services/observability/model_inhibit_rules.go @@ -17,15 +17,155 @@ import ( // checks if the InhibitRules type satisfies the MappedNullable interface at compile time var _ MappedNullable = &InhibitRules{} +/* + types and functions for equal +*/ + +// isArray +type InhibitRulesGetEqualAttributeType = *[]string +type InhibitRulesGetEqualArgType = []string +type InhibitRulesGetEqualRetType = []string + +func getInhibitRulesGetEqualAttributeTypeOk(arg InhibitRulesGetEqualAttributeType) (ret InhibitRulesGetEqualRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInhibitRulesGetEqualAttributeType(arg *InhibitRulesGetEqualAttributeType, val InhibitRulesGetEqualRetType) { + *arg = &val +} + +/* + types and functions for sourceMatch +*/ + +// isContainer +type InhibitRulesGetSourceMatchAttributeType = *map[string]string +type InhibitRulesGetSourceMatchArgType = map[string]string +type InhibitRulesGetSourceMatchRetType = map[string]string + +func getInhibitRulesGetSourceMatchAttributeTypeOk(arg InhibitRulesGetSourceMatchAttributeType) (ret InhibitRulesGetSourceMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInhibitRulesGetSourceMatchAttributeType(arg *InhibitRulesGetSourceMatchAttributeType, val InhibitRulesGetSourceMatchRetType) { + *arg = &val +} + +/* + types and functions for sourceMatchRe +*/ + +// isContainer +type InhibitRulesGetSourceMatchReAttributeType = *map[string]string +type InhibitRulesGetSourceMatchReArgType = map[string]string +type InhibitRulesGetSourceMatchReRetType = map[string]string + +func getInhibitRulesGetSourceMatchReAttributeTypeOk(arg InhibitRulesGetSourceMatchReAttributeType) (ret InhibitRulesGetSourceMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInhibitRulesGetSourceMatchReAttributeType(arg *InhibitRulesGetSourceMatchReAttributeType, val InhibitRulesGetSourceMatchReRetType) { + *arg = &val +} + +/* + types and functions for sourceMatchers +*/ + +// isArray +type InhibitRulesGetSourceMatchersAttributeType = *[]string +type InhibitRulesGetSourceMatchersArgType = []string +type InhibitRulesGetSourceMatchersRetType = []string + +func getInhibitRulesGetSourceMatchersAttributeTypeOk(arg InhibitRulesGetSourceMatchersAttributeType) (ret InhibitRulesGetSourceMatchersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInhibitRulesGetSourceMatchersAttributeType(arg *InhibitRulesGetSourceMatchersAttributeType, val InhibitRulesGetSourceMatchersRetType) { + *arg = &val +} + +/* + types and functions for targetMatch +*/ + +// isContainer +type InhibitRulesGetTargetMatchAttributeType = *map[string]string +type InhibitRulesGetTargetMatchArgType = map[string]string +type InhibitRulesGetTargetMatchRetType = map[string]string + +func getInhibitRulesGetTargetMatchAttributeTypeOk(arg InhibitRulesGetTargetMatchAttributeType) (ret InhibitRulesGetTargetMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInhibitRulesGetTargetMatchAttributeType(arg *InhibitRulesGetTargetMatchAttributeType, val InhibitRulesGetTargetMatchRetType) { + *arg = &val +} + +/* + types and functions for targetMatchRe +*/ + +// isContainer +type InhibitRulesGetTargetMatchReAttributeType = *map[string]string +type InhibitRulesGetTargetMatchReArgType = map[string]string +type InhibitRulesGetTargetMatchReRetType = map[string]string + +func getInhibitRulesGetTargetMatchReAttributeTypeOk(arg InhibitRulesGetTargetMatchReAttributeType) (ret InhibitRulesGetTargetMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInhibitRulesGetTargetMatchReAttributeType(arg *InhibitRulesGetTargetMatchReAttributeType, val InhibitRulesGetTargetMatchReRetType) { + *arg = &val +} + +/* + types and functions for targetMatchers +*/ + +// isArray +type InhibitRulesGetTargetMatchersAttributeType = *[]string +type InhibitRulesGetTargetMatchersArgType = []string +type InhibitRulesGetTargetMatchersRetType = []string + +func getInhibitRulesGetTargetMatchersAttributeTypeOk(arg InhibitRulesGetTargetMatchersAttributeType) (ret InhibitRulesGetTargetMatchersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInhibitRulesGetTargetMatchersAttributeType(arg *InhibitRulesGetTargetMatchersAttributeType, val InhibitRulesGetTargetMatchersRetType) { + *arg = &val +} + // InhibitRules struct for InhibitRules type InhibitRules struct { - Equal *[]string `json:"equal,omitempty"` - SourceMatch *map[string]string `json:"sourceMatch,omitempty"` - SourceMatchRe *map[string]string `json:"sourceMatchRe,omitempty"` - SourceMatchers *[]string `json:"sourceMatchers,omitempty"` - TargetMatch *map[string]string `json:"targetMatch,omitempty"` - TargetMatchRe *map[string]string `json:"targetMatchRe,omitempty"` - TargetMatchers *[]string `json:"targetMatchers,omitempty"` + Equal InhibitRulesGetEqualAttributeType `json:"equal,omitempty"` + SourceMatch InhibitRulesGetSourceMatchAttributeType `json:"sourceMatch,omitempty"` + SourceMatchRe InhibitRulesGetSourceMatchReAttributeType `json:"sourceMatchRe,omitempty"` + SourceMatchers InhibitRulesGetSourceMatchersAttributeType `json:"sourceMatchers,omitempty"` + TargetMatch InhibitRulesGetTargetMatchAttributeType `json:"targetMatch,omitempty"` + TargetMatchRe InhibitRulesGetTargetMatchReAttributeType `json:"targetMatchRe,omitempty"` + TargetMatchers InhibitRulesGetTargetMatchersAttributeType `json:"targetMatchers,omitempty"` } // NewInhibitRules instantiates a new InhibitRules object @@ -46,251 +186,188 @@ func NewInhibitRulesWithDefaults() *InhibitRules { } // 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 +func (o *InhibitRules) GetEqual() (res InhibitRulesGetEqualRetType) { + res, _ = o.GetEqualOk() + return } // 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 +func (o *InhibitRules) GetEqualOk() (ret InhibitRulesGetEqualRetType, ok bool) { + return getInhibitRulesGetEqualAttributeTypeOk(o.Equal) } // 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 + _, ok := o.GetEqualOk() + return ok } // SetEqual gets a reference to the given []string and assigns it to the Equal field. -func (o *InhibitRules) SetEqual(v *[]string) { - o.Equal = v +func (o *InhibitRules) SetEqual(v InhibitRulesGetEqualRetType) { + setInhibitRulesGetEqualAttributeType(&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 +func (o *InhibitRules) GetSourceMatch() (res InhibitRulesGetSourceMatchRetType) { + res, _ = o.GetSourceMatchOk() + return } // 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 +func (o *InhibitRules) GetSourceMatchOk() (ret InhibitRulesGetSourceMatchRetType, ok bool) { + return getInhibitRulesGetSourceMatchAttributeTypeOk(o.SourceMatch) } // 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 + _, ok := o.GetSourceMatchOk() + return ok } // 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 +func (o *InhibitRules) SetSourceMatch(v InhibitRulesGetSourceMatchRetType) { + setInhibitRulesGetSourceMatchAttributeType(&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 +func (o *InhibitRules) GetSourceMatchRe() (res InhibitRulesGetSourceMatchReRetType) { + res, _ = o.GetSourceMatchReOk() + return } // 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 +func (o *InhibitRules) GetSourceMatchReOk() (ret InhibitRulesGetSourceMatchReRetType, ok bool) { + return getInhibitRulesGetSourceMatchReAttributeTypeOk(o.SourceMatchRe) } // 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 + _, ok := o.GetSourceMatchReOk() + return ok } // 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 +func (o *InhibitRules) SetSourceMatchRe(v InhibitRulesGetSourceMatchReRetType) { + setInhibitRulesGetSourceMatchReAttributeType(&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 +func (o *InhibitRules) GetSourceMatchers() (res InhibitRulesGetSourceMatchersRetType) { + res, _ = o.GetSourceMatchersOk() + return } // 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 +func (o *InhibitRules) GetSourceMatchersOk() (ret InhibitRulesGetSourceMatchersRetType, ok bool) { + return getInhibitRulesGetSourceMatchersAttributeTypeOk(o.SourceMatchers) } // 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 + _, ok := o.GetSourceMatchersOk() + return ok } // SetSourceMatchers gets a reference to the given []string and assigns it to the SourceMatchers field. -func (o *InhibitRules) SetSourceMatchers(v *[]string) { - o.SourceMatchers = v +func (o *InhibitRules) SetSourceMatchers(v InhibitRulesGetSourceMatchersRetType) { + setInhibitRulesGetSourceMatchersAttributeType(&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 +func (o *InhibitRules) GetTargetMatch() (res InhibitRulesGetTargetMatchRetType) { + res, _ = o.GetTargetMatchOk() + return } // 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 +func (o *InhibitRules) GetTargetMatchOk() (ret InhibitRulesGetTargetMatchRetType, ok bool) { + return getInhibitRulesGetTargetMatchAttributeTypeOk(o.TargetMatch) } // 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 + _, ok := o.GetTargetMatchOk() + return ok } // 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 +func (o *InhibitRules) SetTargetMatch(v InhibitRulesGetTargetMatchRetType) { + setInhibitRulesGetTargetMatchAttributeType(&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 +func (o *InhibitRules) GetTargetMatchRe() (res InhibitRulesGetTargetMatchReRetType) { + res, _ = o.GetTargetMatchReOk() + return } // 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 +func (o *InhibitRules) GetTargetMatchReOk() (ret InhibitRulesGetTargetMatchReRetType, ok bool) { + return getInhibitRulesGetTargetMatchReAttributeTypeOk(o.TargetMatchRe) } // 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 + _, ok := o.GetTargetMatchReOk() + return ok } // 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 +func (o *InhibitRules) SetTargetMatchRe(v InhibitRulesGetTargetMatchReRetType) { + setInhibitRulesGetTargetMatchReAttributeType(&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 +func (o *InhibitRules) GetTargetMatchers() (res InhibitRulesGetTargetMatchersRetType) { + res, _ = o.GetTargetMatchersOk() + return } // 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 +func (o *InhibitRules) GetTargetMatchersOk() (ret InhibitRulesGetTargetMatchersRetType, ok bool) { + return getInhibitRulesGetTargetMatchersAttributeTypeOk(o.TargetMatchers) } // 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 + _, ok := o.GetTargetMatchersOk() + return ok } // 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) SetTargetMatchers(v InhibitRulesGetTargetMatchersRetType) { + setInhibitRulesGetTargetMatchersAttributeType(&o.TargetMatchers, v) } func (o InhibitRules) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Equal) { - toSerialize["equal"] = o.Equal + if val, ok := getInhibitRulesGetEqualAttributeTypeOk(o.Equal); ok { + toSerialize["Equal"] = val } - if !IsNil(o.SourceMatch) { - toSerialize["sourceMatch"] = o.SourceMatch + if val, ok := getInhibitRulesGetSourceMatchAttributeTypeOk(o.SourceMatch); ok { + toSerialize["SourceMatch"] = val } - if !IsNil(o.SourceMatchRe) { - toSerialize["sourceMatchRe"] = o.SourceMatchRe + if val, ok := getInhibitRulesGetSourceMatchReAttributeTypeOk(o.SourceMatchRe); ok { + toSerialize["SourceMatchRe"] = val } - if !IsNil(o.SourceMatchers) { - toSerialize["sourceMatchers"] = o.SourceMatchers + if val, ok := getInhibitRulesGetSourceMatchersAttributeTypeOk(o.SourceMatchers); ok { + toSerialize["SourceMatchers"] = val } - if !IsNil(o.TargetMatch) { - toSerialize["targetMatch"] = o.TargetMatch + if val, ok := getInhibitRulesGetTargetMatchAttributeTypeOk(o.TargetMatch); ok { + toSerialize["TargetMatch"] = val } - if !IsNil(o.TargetMatchRe) { - toSerialize["targetMatchRe"] = o.TargetMatchRe + if val, ok := getInhibitRulesGetTargetMatchReAttributeTypeOk(o.TargetMatchRe); ok { + toSerialize["TargetMatchRe"] = val } - if !IsNil(o.TargetMatchers) { - toSerialize["targetMatchers"] = o.TargetMatchers + if val, ok := getInhibitRulesGetTargetMatchersAttributeTypeOk(o.TargetMatchers); ok { + toSerialize["TargetMatchers"] = val } return toSerialize, nil } diff --git a/services/observability/model_instance.go b/services/observability/model_instance.go index d2d353066..159f5a46e 100644 --- a/services/observability/model_instance.go +++ b/services/observability/model_instance.go @@ -17,26 +17,229 @@ import ( // checks if the Instance type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Instance{} +/* + types and functions for cluster +*/ + +// isNotNullableString +type InstanceGetClusterAttributeType = *string + +func getInstanceGetClusterAttributeTypeOk(arg InstanceGetClusterAttributeType) (ret InstanceGetClusterRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetClusterAttributeType(arg *InstanceGetClusterAttributeType, val InstanceGetClusterRetType) { + *arg = &val +} + +type InstanceGetClusterArgType = string +type InstanceGetClusterRetType = string + +/* + types and functions for grafanaPublicReadAccess +*/ + +// isBoolean +type InstancegetGrafanaPublicReadAccessAttributeType = *bool +type InstancegetGrafanaPublicReadAccessArgType = bool +type InstancegetGrafanaPublicReadAccessRetType = bool + +func getInstancegetGrafanaPublicReadAccessAttributeTypeOk(arg InstancegetGrafanaPublicReadAccessAttributeType) (ret InstancegetGrafanaPublicReadAccessRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstancegetGrafanaPublicReadAccessAttributeType(arg *InstancegetGrafanaPublicReadAccessAttributeType, val InstancegetGrafanaPublicReadAccessRetType) { + *arg = &val +} + +/* + types and functions for grafanaUseStackitSso +*/ + +// isBoolean +type InstancegetGrafanaUseStackitSsoAttributeType = *bool +type InstancegetGrafanaUseStackitSsoArgType = bool +type InstancegetGrafanaUseStackitSsoRetType = bool + +func getInstancegetGrafanaUseStackitSsoAttributeTypeOk(arg InstancegetGrafanaUseStackitSsoAttributeType) (ret InstancegetGrafanaUseStackitSsoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstancegetGrafanaUseStackitSsoAttributeType(arg *InstancegetGrafanaUseStackitSsoAttributeType, val InstancegetGrafanaUseStackitSsoRetType) { + *arg = &val +} + +/* + types and functions for instance +*/ + +// isNotNullableString +type InstanceGetInstanceAttributeType = *string + +func getInstanceGetInstanceAttributeTypeOk(arg InstanceGetInstanceAttributeType) (ret InstanceGetInstanceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetInstanceAttributeType(arg *InstanceGetInstanceAttributeType, val InstanceGetInstanceRetType) { + *arg = &val +} + +type InstanceGetInstanceArgType = string +type InstanceGetInstanceRetType = string + +/* + types and functions for metricsRetentionTime1h +*/ + +// isInteger +type InstanceGetMetricsRetentionTime1hAttributeType = *int64 +type InstanceGetMetricsRetentionTime1hArgType = int64 +type InstanceGetMetricsRetentionTime1hRetType = int64 + +func getInstanceGetMetricsRetentionTime1hAttributeTypeOk(arg InstanceGetMetricsRetentionTime1hAttributeType) (ret InstanceGetMetricsRetentionTime1hRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetMetricsRetentionTime1hAttributeType(arg *InstanceGetMetricsRetentionTime1hAttributeType, val InstanceGetMetricsRetentionTime1hRetType) { + *arg = &val +} + +/* + types and functions for metricsRetentionTime5m +*/ + +// isInteger +type InstanceGetMetricsRetentionTime5mAttributeType = *int64 +type InstanceGetMetricsRetentionTime5mArgType = int64 +type InstanceGetMetricsRetentionTime5mRetType = int64 + +func getInstanceGetMetricsRetentionTime5mAttributeTypeOk(arg InstanceGetMetricsRetentionTime5mAttributeType) (ret InstanceGetMetricsRetentionTime5mRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetMetricsRetentionTime5mAttributeType(arg *InstanceGetMetricsRetentionTime5mAttributeType, val InstanceGetMetricsRetentionTime5mRetType) { + *arg = &val +} + +/* + types and functions for metricsRetentionTimeRaw +*/ + +// isInteger +type InstanceGetMetricsRetentionTimeRawAttributeType = *int64 +type InstanceGetMetricsRetentionTimeRawArgType = int64 +type InstanceGetMetricsRetentionTimeRawRetType = int64 + +func getInstanceGetMetricsRetentionTimeRawAttributeTypeOk(arg InstanceGetMetricsRetentionTimeRawAttributeType) (ret InstanceGetMetricsRetentionTimeRawRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetMetricsRetentionTimeRawAttributeType(arg *InstanceGetMetricsRetentionTimeRawAttributeType, val InstanceGetMetricsRetentionTimeRawRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type InstanceGetNameAttributeType = *string + +func getInstanceGetNameAttributeTypeOk(arg InstanceGetNameAttributeType) (ret InstanceGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetNameAttributeType(arg *InstanceGetNameAttributeType, val InstanceGetNameRetType) { + *arg = &val +} + +type InstanceGetNameArgType = string +type InstanceGetNameRetType = string + +/* + types and functions for plan +*/ + +// isModel +type InstanceGetPlanAttributeType = *PlanModel +type InstanceGetPlanArgType = PlanModel +type InstanceGetPlanRetType = PlanModel + +func getInstanceGetPlanAttributeTypeOk(arg InstanceGetPlanAttributeType) (ret InstanceGetPlanRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetPlanAttributeType(arg *InstanceGetPlanAttributeType, val InstanceGetPlanRetType) { + *arg = &val +} + +/* + types and functions for state +*/ + +// isEnumRef +type InstanceGetStateAttributeType = *string +type InstanceGetStateArgType = string +type InstanceGetStateRetType = string + +func getInstanceGetStateAttributeTypeOk(arg InstanceGetStateAttributeType) (ret InstanceGetStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetStateAttributeType(arg *InstanceGetStateAttributeType, val InstanceGetStateRetType) { + *arg = &val +} + // Instance struct for Instance type Instance struct { // REQUIRED - Cluster *string `json:"cluster"` + Cluster InstanceGetClusterAttributeType `json:"cluster"` // REQUIRED - GrafanaPublicReadAccess *bool `json:"grafanaPublicReadAccess"` + GrafanaPublicReadAccess InstancegetGrafanaPublicReadAccessAttributeType `json:"grafanaPublicReadAccess"` // REQUIRED - GrafanaUseStackitSso *bool `json:"grafanaUseStackitSso"` + GrafanaUseStackitSso InstancegetGrafanaUseStackitSsoAttributeType `json:"grafanaUseStackitSso"` // REQUIRED - Instance *string `json:"instance"` + Instance InstanceGetInstanceAttributeType `json:"instance"` // REQUIRED - MetricsRetentionTime1h *int64 `json:"metricsRetentionTime1h"` + MetricsRetentionTime1h InstanceGetMetricsRetentionTime1hAttributeType `json:"metricsRetentionTime1h"` // REQUIRED - MetricsRetentionTime5m *int64 `json:"metricsRetentionTime5m"` + MetricsRetentionTime5m InstanceGetMetricsRetentionTime5mAttributeType `json:"metricsRetentionTime5m"` // REQUIRED - MetricsRetentionTimeRaw *int64 `json:"metricsRetentionTimeRaw"` - Name *string `json:"name,omitempty"` + MetricsRetentionTimeRaw InstanceGetMetricsRetentionTimeRawAttributeType `json:"metricsRetentionTimeRaw"` + Name InstanceGetNameAttributeType `json:"name,omitempty"` // REQUIRED - Plan *PlanModel `json:"plan"` - State *string `json:"state,omitempty"` + Plan InstanceGetPlanAttributeType `json:"plan"` + State InstanceGetStateAttributeType `json:"state,omitempty"` } type _Instance Instance @@ -45,16 +248,16 @@ type _Instance Instance // 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 { +func NewInstance(cluster InstanceGetClusterArgType, grafanaPublicReadAccess InstancegetGrafanaPublicReadAccessArgType, grafanaUseStackitSso InstancegetGrafanaUseStackitSsoArgType, instance InstanceGetInstanceArgType, metricsRetentionTime1h InstanceGetMetricsRetentionTime1hArgType, metricsRetentionTime5m InstanceGetMetricsRetentionTime5mArgType, metricsRetentionTimeRaw InstanceGetMetricsRetentionTimeRawArgType, plan InstanceGetPlanArgType) *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 + setInstanceGetClusterAttributeType(&this.Cluster, cluster) + setInstancegetGrafanaPublicReadAccessAttributeType(&this.GrafanaPublicReadAccess, grafanaPublicReadAccess) + setInstancegetGrafanaUseStackitSsoAttributeType(&this.GrafanaUseStackitSso, grafanaUseStackitSso) + setInstanceGetInstanceAttributeType(&this.Instance, instance) + setInstanceGetMetricsRetentionTime1hAttributeType(&this.MetricsRetentionTime1h, metricsRetentionTime1h) + setInstanceGetMetricsRetentionTime5mAttributeType(&this.MetricsRetentionTime5m, metricsRetentionTime5m) + setInstanceGetMetricsRetentionTimeRawAttributeType(&this.MetricsRetentionTimeRaw, metricsRetentionTimeRaw) + setInstanceGetPlanAttributeType(&this.Plan, plan) return &this } @@ -67,276 +270,218 @@ func NewInstanceWithDefaults() *Instance { } // GetCluster returns the Cluster field value -func (o *Instance) GetCluster() *string { - if o == nil || IsNil(o.Cluster) { - var ret *string - return ret - } - - return o.Cluster +func (o *Instance) GetCluster() (ret InstanceGetClusterRetType) { + ret, _ = o.GetClusterOk() + return ret } // 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 +func (o *Instance) GetClusterOk() (ret InstanceGetClusterRetType, ok bool) { + return getInstanceGetClusterAttributeTypeOk(o.Cluster) } // SetCluster sets field value -func (o *Instance) SetCluster(v *string) { - o.Cluster = v +func (o *Instance) SetCluster(v InstanceGetClusterRetType) { + setInstanceGetClusterAttributeType(&o.Cluster, v) } // GetGrafanaPublicReadAccess returns the GrafanaPublicReadAccess field value -func (o *Instance) GetGrafanaPublicReadAccess() *bool { - if o == nil || IsNil(o.GrafanaPublicReadAccess) { - var ret *bool - return ret - } - - return o.GrafanaPublicReadAccess +func (o *Instance) GetGrafanaPublicReadAccess() (ret InstancegetGrafanaPublicReadAccessRetType) { + ret, _ = o.GetGrafanaPublicReadAccessOk() + return ret } // 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 +func (o *Instance) GetGrafanaPublicReadAccessOk() (ret InstancegetGrafanaPublicReadAccessRetType, ok bool) { + return getInstancegetGrafanaPublicReadAccessAttributeTypeOk(o.GrafanaPublicReadAccess) } // SetGrafanaPublicReadAccess sets field value -func (o *Instance) SetGrafanaPublicReadAccess(v *bool) { - o.GrafanaPublicReadAccess = v +func (o *Instance) SetGrafanaPublicReadAccess(v InstancegetGrafanaPublicReadAccessRetType) { + setInstancegetGrafanaPublicReadAccessAttributeType(&o.GrafanaPublicReadAccess, v) } // GetGrafanaUseStackitSso returns the GrafanaUseStackitSso field value -func (o *Instance) GetGrafanaUseStackitSso() *bool { - if o == nil || IsNil(o.GrafanaUseStackitSso) { - var ret *bool - return ret - } - - return o.GrafanaUseStackitSso +func (o *Instance) GetGrafanaUseStackitSso() (ret InstancegetGrafanaUseStackitSsoRetType) { + ret, _ = o.GetGrafanaUseStackitSsoOk() + return ret } // 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 +func (o *Instance) GetGrafanaUseStackitSsoOk() (ret InstancegetGrafanaUseStackitSsoRetType, ok bool) { + return getInstancegetGrafanaUseStackitSsoAttributeTypeOk(o.GrafanaUseStackitSso) } // SetGrafanaUseStackitSso sets field value -func (o *Instance) SetGrafanaUseStackitSso(v *bool) { - o.GrafanaUseStackitSso = v +func (o *Instance) SetGrafanaUseStackitSso(v InstancegetGrafanaUseStackitSsoRetType) { + setInstancegetGrafanaUseStackitSsoAttributeType(&o.GrafanaUseStackitSso, v) } // GetInstance returns the Instance field value -func (o *Instance) GetInstance() *string { - if o == nil || IsNil(o.Instance) { - var ret *string - return ret - } - - return o.Instance +func (o *Instance) GetInstance() (ret InstanceGetInstanceRetType) { + ret, _ = o.GetInstanceOk() + return ret } // 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 +func (o *Instance) GetInstanceOk() (ret InstanceGetInstanceRetType, ok bool) { + return getInstanceGetInstanceAttributeTypeOk(o.Instance) } // SetInstance sets field value -func (o *Instance) SetInstance(v *string) { - o.Instance = v +func (o *Instance) SetInstance(v InstanceGetInstanceRetType) { + setInstanceGetInstanceAttributeType(&o.Instance, v) } // GetMetricsRetentionTime1h returns the MetricsRetentionTime1h field value -func (o *Instance) GetMetricsRetentionTime1h() *int64 { - if o == nil || IsNil(o.MetricsRetentionTime1h) { - var ret *int64 - return ret - } - - return o.MetricsRetentionTime1h +func (o *Instance) GetMetricsRetentionTime1h() (ret InstanceGetMetricsRetentionTime1hRetType) { + ret, _ = o.GetMetricsRetentionTime1hOk() + return ret } // 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 +func (o *Instance) GetMetricsRetentionTime1hOk() (ret InstanceGetMetricsRetentionTime1hRetType, ok bool) { + return getInstanceGetMetricsRetentionTime1hAttributeTypeOk(o.MetricsRetentionTime1h) } // SetMetricsRetentionTime1h sets field value -func (o *Instance) SetMetricsRetentionTime1h(v *int64) { - o.MetricsRetentionTime1h = v +func (o *Instance) SetMetricsRetentionTime1h(v InstanceGetMetricsRetentionTime1hRetType) { + setInstanceGetMetricsRetentionTime1hAttributeType(&o.MetricsRetentionTime1h, v) } // GetMetricsRetentionTime5m returns the MetricsRetentionTime5m field value -func (o *Instance) GetMetricsRetentionTime5m() *int64 { - if o == nil || IsNil(o.MetricsRetentionTime5m) { - var ret *int64 - return ret - } - - return o.MetricsRetentionTime5m +func (o *Instance) GetMetricsRetentionTime5m() (ret InstanceGetMetricsRetentionTime5mRetType) { + ret, _ = o.GetMetricsRetentionTime5mOk() + return ret } // 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 +func (o *Instance) GetMetricsRetentionTime5mOk() (ret InstanceGetMetricsRetentionTime5mRetType, ok bool) { + return getInstanceGetMetricsRetentionTime5mAttributeTypeOk(o.MetricsRetentionTime5m) } // SetMetricsRetentionTime5m sets field value -func (o *Instance) SetMetricsRetentionTime5m(v *int64) { - o.MetricsRetentionTime5m = v +func (o *Instance) SetMetricsRetentionTime5m(v InstanceGetMetricsRetentionTime5mRetType) { + setInstanceGetMetricsRetentionTime5mAttributeType(&o.MetricsRetentionTime5m, v) } // GetMetricsRetentionTimeRaw returns the MetricsRetentionTimeRaw field value -func (o *Instance) GetMetricsRetentionTimeRaw() *int64 { - if o == nil || IsNil(o.MetricsRetentionTimeRaw) { - var ret *int64 - return ret - } - - return o.MetricsRetentionTimeRaw +func (o *Instance) GetMetricsRetentionTimeRaw() (ret InstanceGetMetricsRetentionTimeRawRetType) { + ret, _ = o.GetMetricsRetentionTimeRawOk() + return ret } // 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 +func (o *Instance) GetMetricsRetentionTimeRawOk() (ret InstanceGetMetricsRetentionTimeRawRetType, ok bool) { + return getInstanceGetMetricsRetentionTimeRawAttributeTypeOk(o.MetricsRetentionTimeRaw) } // SetMetricsRetentionTimeRaw sets field value -func (o *Instance) SetMetricsRetentionTimeRaw(v *int64) { - o.MetricsRetentionTimeRaw = v +func (o *Instance) SetMetricsRetentionTimeRaw(v InstanceGetMetricsRetentionTimeRawRetType) { + setInstanceGetMetricsRetentionTimeRawAttributeType(&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 +func (o *Instance) GetName() (res InstanceGetNameRetType) { + res, _ = o.GetNameOk() + return } // 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 +func (o *Instance) GetNameOk() (ret InstanceGetNameRetType, ok bool) { + return getInstanceGetNameAttributeTypeOk(o.Name) } // 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 + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *Instance) SetName(v *string) { - o.Name = v +func (o *Instance) SetName(v InstanceGetNameRetType) { + setInstanceGetNameAttributeType(&o.Name, v) } // GetPlan returns the Plan field value -func (o *Instance) GetPlan() *PlanModel { - if o == nil || IsNil(o.Plan) { - var ret *PlanModel - return ret - } - - return o.Plan +func (o *Instance) GetPlan() (ret InstanceGetPlanRetType) { + ret, _ = o.GetPlanOk() + return ret } // 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 +func (o *Instance) GetPlanOk() (ret InstanceGetPlanRetType, ok bool) { + return getInstanceGetPlanAttributeTypeOk(o.Plan) } // SetPlan sets field value -func (o *Instance) SetPlan(v *PlanModel) { - o.Plan = v +func (o *Instance) SetPlan(v InstanceGetPlanRetType) { + setInstanceGetPlanAttributeType(&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 +func (o *Instance) GetState() (res InstanceGetStateRetType) { + res, _ = o.GetStateOk() + return } // 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 +func (o *Instance) GetStateOk() (ret InstanceGetStateRetType, ok bool) { + return getInstanceGetStateAttributeTypeOk(o.State) } // 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 + _, ok := o.GetStateOk() + return ok } // 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) SetState(v InstanceGetStateRetType) { + setInstanceGetStateAttributeType(&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 + if val, ok := getInstanceGetClusterAttributeTypeOk(o.Cluster); ok { + toSerialize["Cluster"] = val + } + if val, ok := getInstancegetGrafanaPublicReadAccessAttributeTypeOk(o.GrafanaPublicReadAccess); ok { + toSerialize["GrafanaPublicReadAccess"] = val + } + if val, ok := getInstancegetGrafanaUseStackitSsoAttributeTypeOk(o.GrafanaUseStackitSso); ok { + toSerialize["GrafanaUseStackitSso"] = val + } + if val, ok := getInstanceGetInstanceAttributeTypeOk(o.Instance); ok { + toSerialize["Instance"] = val + } + if val, ok := getInstanceGetMetricsRetentionTime1hAttributeTypeOk(o.MetricsRetentionTime1h); ok { + toSerialize["MetricsRetentionTime1h"] = val + } + if val, ok := getInstanceGetMetricsRetentionTime5mAttributeTypeOk(o.MetricsRetentionTime5m); ok { + toSerialize["MetricsRetentionTime5m"] = val + } + if val, ok := getInstanceGetMetricsRetentionTimeRawAttributeTypeOk(o.MetricsRetentionTimeRaw); ok { + toSerialize["MetricsRetentionTimeRaw"] = val + } + if val, ok := getInstanceGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getInstanceGetPlanAttributeTypeOk(o.Plan); ok { + toSerialize["Plan"] = val } - toSerialize["plan"] = o.Plan - if !IsNil(o.State) { - toSerialize["state"] = o.State + if val, ok := getInstanceGetStateAttributeTypeOk(o.State); ok { + toSerialize["State"] = val } return toSerialize, nil } diff --git a/services/observability/model_instance_response.go b/services/observability/model_instance_response.go index b7dae3720..cbe156f89 100644 --- a/services/observability/model_instance_response.go +++ b/services/observability/model_instance_response.go @@ -17,10 +17,31 @@ import ( // checks if the InstanceResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &InstanceResponse{} +/* + types and functions for message +*/ + +// isNotNullableString +type InstanceResponseGetMessageAttributeType = *string + +func getInstanceResponseGetMessageAttributeTypeOk(arg InstanceResponseGetMessageAttributeType) (ret InstanceResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceResponseGetMessageAttributeType(arg *InstanceResponseGetMessageAttributeType, val InstanceResponseGetMessageRetType) { + *arg = &val +} + +type InstanceResponseGetMessageArgType = string +type InstanceResponseGetMessageRetType = string + // InstanceResponse struct for InstanceResponse type InstanceResponse struct { // REQUIRED - Message *string `json:"message"` + Message InstanceResponseGetMessageAttributeType `json:"message"` } type _InstanceResponse InstanceResponse @@ -29,9 +50,9 @@ type _InstanceResponse InstanceResponse // 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 { +func NewInstanceResponse(message InstanceResponseGetMessageArgType) *InstanceResponse { this := InstanceResponse{} - this.Message = message + setInstanceResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -44,32 +65,27 @@ func NewInstanceResponseWithDefaults() *InstanceResponse { } // GetMessage returns the Message field value -func (o *InstanceResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *InstanceResponse) GetMessage() (ret InstanceResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *InstanceResponse) GetMessageOk() (ret InstanceResponseGetMessageRetType, ok bool) { + return getInstanceResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *InstanceResponse) SetMessage(v *string) { - o.Message = v +func (o *InstanceResponse) SetMessage(v InstanceResponseGetMessageRetType) { + setInstanceResponseGetMessageAttributeType(&o.Message, v) } func (o InstanceResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message + if val, ok := getInstanceResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_instance_sensitive_data.go b/services/observability/model_instance_sensitive_data.go index 695b353e2..6ef348739 100644 --- a/services/observability/model_instance_sensitive_data.go +++ b/services/observability/model_instance_sensitive_data.go @@ -17,53 +17,530 @@ import ( // checks if the InstanceSensitiveData type satisfies the MappedNullable interface at compile time var _ MappedNullable = &InstanceSensitiveData{} +/* + types and functions for alertingUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetAlertingUrlAttributeType = *string + +func getInstanceSensitiveDataGetAlertingUrlAttributeTypeOk(arg InstanceSensitiveDataGetAlertingUrlAttributeType) (ret InstanceSensitiveDataGetAlertingUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetAlertingUrlAttributeType(arg *InstanceSensitiveDataGetAlertingUrlAttributeType, val InstanceSensitiveDataGetAlertingUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetAlertingUrlArgType = string +type InstanceSensitiveDataGetAlertingUrlRetType = string + +/* + types and functions for cluster +*/ + +// isNotNullableString +type InstanceSensitiveDataGetClusterAttributeType = *string + +func getInstanceSensitiveDataGetClusterAttributeTypeOk(arg InstanceSensitiveDataGetClusterAttributeType) (ret InstanceSensitiveDataGetClusterRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetClusterAttributeType(arg *InstanceSensitiveDataGetClusterAttributeType, val InstanceSensitiveDataGetClusterRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetClusterArgType = string +type InstanceSensitiveDataGetClusterRetType = string + +/* + types and functions for dashboardUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetDashboardUrlAttributeType = *string + +func getInstanceSensitiveDataGetDashboardUrlAttributeTypeOk(arg InstanceSensitiveDataGetDashboardUrlAttributeType) (ret InstanceSensitiveDataGetDashboardUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetDashboardUrlAttributeType(arg *InstanceSensitiveDataGetDashboardUrlAttributeType, val InstanceSensitiveDataGetDashboardUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetDashboardUrlArgType = string +type InstanceSensitiveDataGetDashboardUrlRetType = string + +/* + types and functions for grafanaAdminPassword +*/ + +// isNotNullableString +type InstanceSensitiveDataGetGrafanaAdminPasswordAttributeType = *string + +func getInstanceSensitiveDataGetGrafanaAdminPasswordAttributeTypeOk(arg InstanceSensitiveDataGetGrafanaAdminPasswordAttributeType) (ret InstanceSensitiveDataGetGrafanaAdminPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetGrafanaAdminPasswordAttributeType(arg *InstanceSensitiveDataGetGrafanaAdminPasswordAttributeType, val InstanceSensitiveDataGetGrafanaAdminPasswordRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetGrafanaAdminPasswordArgType = string +type InstanceSensitiveDataGetGrafanaAdminPasswordRetType = string + +/* + types and functions for grafanaAdminUser +*/ + +// isNotNullableString +type InstanceSensitiveDataGetGrafanaAdminUserAttributeType = *string + +func getInstanceSensitiveDataGetGrafanaAdminUserAttributeTypeOk(arg InstanceSensitiveDataGetGrafanaAdminUserAttributeType) (ret InstanceSensitiveDataGetGrafanaAdminUserRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetGrafanaAdminUserAttributeType(arg *InstanceSensitiveDataGetGrafanaAdminUserAttributeType, val InstanceSensitiveDataGetGrafanaAdminUserRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetGrafanaAdminUserArgType = string +type InstanceSensitiveDataGetGrafanaAdminUserRetType = string + +/* + types and functions for grafanaPublicReadAccess +*/ + +// isBoolean +type InstanceSensitiveDatagetGrafanaPublicReadAccessAttributeType = *bool +type InstanceSensitiveDatagetGrafanaPublicReadAccessArgType = bool +type InstanceSensitiveDatagetGrafanaPublicReadAccessRetType = bool + +func getInstanceSensitiveDatagetGrafanaPublicReadAccessAttributeTypeOk(arg InstanceSensitiveDatagetGrafanaPublicReadAccessAttributeType) (ret InstanceSensitiveDatagetGrafanaPublicReadAccessRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDatagetGrafanaPublicReadAccessAttributeType(arg *InstanceSensitiveDatagetGrafanaPublicReadAccessAttributeType, val InstanceSensitiveDatagetGrafanaPublicReadAccessRetType) { + *arg = &val +} + +/* + types and functions for grafanaUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetGrafanaUrlAttributeType = *string + +func getInstanceSensitiveDataGetGrafanaUrlAttributeTypeOk(arg InstanceSensitiveDataGetGrafanaUrlAttributeType) (ret InstanceSensitiveDataGetGrafanaUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetGrafanaUrlAttributeType(arg *InstanceSensitiveDataGetGrafanaUrlAttributeType, val InstanceSensitiveDataGetGrafanaUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetGrafanaUrlArgType = string +type InstanceSensitiveDataGetGrafanaUrlRetType = string + +/* + types and functions for grafanaUseStackitSso +*/ + +// isBoolean +type InstanceSensitiveDatagetGrafanaUseStackitSsoAttributeType = *bool +type InstanceSensitiveDatagetGrafanaUseStackitSsoArgType = bool +type InstanceSensitiveDatagetGrafanaUseStackitSsoRetType = bool + +func getInstanceSensitiveDatagetGrafanaUseStackitSsoAttributeTypeOk(arg InstanceSensitiveDatagetGrafanaUseStackitSsoAttributeType) (ret InstanceSensitiveDatagetGrafanaUseStackitSsoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDatagetGrafanaUseStackitSsoAttributeType(arg *InstanceSensitiveDatagetGrafanaUseStackitSsoAttributeType, val InstanceSensitiveDatagetGrafanaUseStackitSsoRetType) { + *arg = &val +} + +/* + types and functions for instance +*/ + +// isNotNullableString +type InstanceSensitiveDataGetInstanceAttributeType = *string + +func getInstanceSensitiveDataGetInstanceAttributeTypeOk(arg InstanceSensitiveDataGetInstanceAttributeType) (ret InstanceSensitiveDataGetInstanceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetInstanceAttributeType(arg *InstanceSensitiveDataGetInstanceAttributeType, val InstanceSensitiveDataGetInstanceRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetInstanceArgType = string +type InstanceSensitiveDataGetInstanceRetType = string + +/* + types and functions for jaegerTracesUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetJaegerTracesUrlAttributeType = *string + +func getInstanceSensitiveDataGetJaegerTracesUrlAttributeTypeOk(arg InstanceSensitiveDataGetJaegerTracesUrlAttributeType) (ret InstanceSensitiveDataGetJaegerTracesUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetJaegerTracesUrlAttributeType(arg *InstanceSensitiveDataGetJaegerTracesUrlAttributeType, val InstanceSensitiveDataGetJaegerTracesUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetJaegerTracesUrlArgType = string +type InstanceSensitiveDataGetJaegerTracesUrlRetType = string + +/* + types and functions for jaegerUiUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetJaegerUiUrlAttributeType = *string + +func getInstanceSensitiveDataGetJaegerUiUrlAttributeTypeOk(arg InstanceSensitiveDataGetJaegerUiUrlAttributeType) (ret InstanceSensitiveDataGetJaegerUiUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetJaegerUiUrlAttributeType(arg *InstanceSensitiveDataGetJaegerUiUrlAttributeType, val InstanceSensitiveDataGetJaegerUiUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetJaegerUiUrlArgType = string +type InstanceSensitiveDataGetJaegerUiUrlRetType = string + +/* + types and functions for logsPushUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetLogsPushUrlAttributeType = *string + +func getInstanceSensitiveDataGetLogsPushUrlAttributeTypeOk(arg InstanceSensitiveDataGetLogsPushUrlAttributeType) (ret InstanceSensitiveDataGetLogsPushUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetLogsPushUrlAttributeType(arg *InstanceSensitiveDataGetLogsPushUrlAttributeType, val InstanceSensitiveDataGetLogsPushUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetLogsPushUrlArgType = string +type InstanceSensitiveDataGetLogsPushUrlRetType = string + +/* + types and functions for logsUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetLogsUrlAttributeType = *string + +func getInstanceSensitiveDataGetLogsUrlAttributeTypeOk(arg InstanceSensitiveDataGetLogsUrlAttributeType) (ret InstanceSensitiveDataGetLogsUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetLogsUrlAttributeType(arg *InstanceSensitiveDataGetLogsUrlAttributeType, val InstanceSensitiveDataGetLogsUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetLogsUrlArgType = string +type InstanceSensitiveDataGetLogsUrlRetType = string + +/* + types and functions for metricsRetentionTime1h +*/ + +// isInteger +type InstanceSensitiveDataGetMetricsRetentionTime1hAttributeType = *int64 +type InstanceSensitiveDataGetMetricsRetentionTime1hArgType = int64 +type InstanceSensitiveDataGetMetricsRetentionTime1hRetType = int64 + +func getInstanceSensitiveDataGetMetricsRetentionTime1hAttributeTypeOk(arg InstanceSensitiveDataGetMetricsRetentionTime1hAttributeType) (ret InstanceSensitiveDataGetMetricsRetentionTime1hRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetMetricsRetentionTime1hAttributeType(arg *InstanceSensitiveDataGetMetricsRetentionTime1hAttributeType, val InstanceSensitiveDataGetMetricsRetentionTime1hRetType) { + *arg = &val +} + +/* + types and functions for metricsRetentionTime5m +*/ + +// isInteger +type InstanceSensitiveDataGetMetricsRetentionTime5mAttributeType = *int64 +type InstanceSensitiveDataGetMetricsRetentionTime5mArgType = int64 +type InstanceSensitiveDataGetMetricsRetentionTime5mRetType = int64 + +func getInstanceSensitiveDataGetMetricsRetentionTime5mAttributeTypeOk(arg InstanceSensitiveDataGetMetricsRetentionTime5mAttributeType) (ret InstanceSensitiveDataGetMetricsRetentionTime5mRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetMetricsRetentionTime5mAttributeType(arg *InstanceSensitiveDataGetMetricsRetentionTime5mAttributeType, val InstanceSensitiveDataGetMetricsRetentionTime5mRetType) { + *arg = &val +} + +/* + types and functions for metricsRetentionTimeRaw +*/ + +// isInteger +type InstanceSensitiveDataGetMetricsRetentionTimeRawAttributeType = *int64 +type InstanceSensitiveDataGetMetricsRetentionTimeRawArgType = int64 +type InstanceSensitiveDataGetMetricsRetentionTimeRawRetType = int64 + +func getInstanceSensitiveDataGetMetricsRetentionTimeRawAttributeTypeOk(arg InstanceSensitiveDataGetMetricsRetentionTimeRawAttributeType) (ret InstanceSensitiveDataGetMetricsRetentionTimeRawRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetMetricsRetentionTimeRawAttributeType(arg *InstanceSensitiveDataGetMetricsRetentionTimeRawAttributeType, val InstanceSensitiveDataGetMetricsRetentionTimeRawRetType) { + *arg = &val +} + +/* + types and functions for metricsUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetMetricsUrlAttributeType = *string + +func getInstanceSensitiveDataGetMetricsUrlAttributeTypeOk(arg InstanceSensitiveDataGetMetricsUrlAttributeType) (ret InstanceSensitiveDataGetMetricsUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetMetricsUrlAttributeType(arg *InstanceSensitiveDataGetMetricsUrlAttributeType, val InstanceSensitiveDataGetMetricsUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetMetricsUrlArgType = string +type InstanceSensitiveDataGetMetricsUrlRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type InstanceSensitiveDataGetNameAttributeType = *string + +func getInstanceSensitiveDataGetNameAttributeTypeOk(arg InstanceSensitiveDataGetNameAttributeType) (ret InstanceSensitiveDataGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetNameAttributeType(arg *InstanceSensitiveDataGetNameAttributeType, val InstanceSensitiveDataGetNameRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetNameArgType = string +type InstanceSensitiveDataGetNameRetType = string + +/* + types and functions for otlpTracesUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetOtlpTracesUrlAttributeType = *string + +func getInstanceSensitiveDataGetOtlpTracesUrlAttributeTypeOk(arg InstanceSensitiveDataGetOtlpTracesUrlAttributeType) (ret InstanceSensitiveDataGetOtlpTracesUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetOtlpTracesUrlAttributeType(arg *InstanceSensitiveDataGetOtlpTracesUrlAttributeType, val InstanceSensitiveDataGetOtlpTracesUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetOtlpTracesUrlArgType = string +type InstanceSensitiveDataGetOtlpTracesUrlRetType = string + +/* + types and functions for plan +*/ + +// isModel +type InstanceSensitiveDataGetPlanAttributeType = *PlanModel +type InstanceSensitiveDataGetPlanArgType = PlanModel +type InstanceSensitiveDataGetPlanRetType = PlanModel + +func getInstanceSensitiveDataGetPlanAttributeTypeOk(arg InstanceSensitiveDataGetPlanAttributeType) (ret InstanceSensitiveDataGetPlanRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetPlanAttributeType(arg *InstanceSensitiveDataGetPlanAttributeType, val InstanceSensitiveDataGetPlanRetType) { + *arg = &val +} + +/* + types and functions for pushMetricsUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetPushMetricsUrlAttributeType = *string + +func getInstanceSensitiveDataGetPushMetricsUrlAttributeTypeOk(arg InstanceSensitiveDataGetPushMetricsUrlAttributeType) (ret InstanceSensitiveDataGetPushMetricsUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetPushMetricsUrlAttributeType(arg *InstanceSensitiveDataGetPushMetricsUrlAttributeType, val InstanceSensitiveDataGetPushMetricsUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetPushMetricsUrlArgType = string +type InstanceSensitiveDataGetPushMetricsUrlRetType = string + +/* + types and functions for targetsUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetTargetsUrlAttributeType = *string + +func getInstanceSensitiveDataGetTargetsUrlAttributeTypeOk(arg InstanceSensitiveDataGetTargetsUrlAttributeType) (ret InstanceSensitiveDataGetTargetsUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetTargetsUrlAttributeType(arg *InstanceSensitiveDataGetTargetsUrlAttributeType, val InstanceSensitiveDataGetTargetsUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetTargetsUrlArgType = string +type InstanceSensitiveDataGetTargetsUrlRetType = string + +/* + types and functions for zipkinSpansUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetZipkinSpansUrlAttributeType = *string + +func getInstanceSensitiveDataGetZipkinSpansUrlAttributeTypeOk(arg InstanceSensitiveDataGetZipkinSpansUrlAttributeType) (ret InstanceSensitiveDataGetZipkinSpansUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetZipkinSpansUrlAttributeType(arg *InstanceSensitiveDataGetZipkinSpansUrlAttributeType, val InstanceSensitiveDataGetZipkinSpansUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetZipkinSpansUrlArgType = string +type InstanceSensitiveDataGetZipkinSpansUrlRetType = string + // InstanceSensitiveData struct for InstanceSensitiveData type InstanceSensitiveData struct { // REQUIRED - AlertingUrl *string `json:"alertingUrl"` + AlertingUrl InstanceSensitiveDataGetAlertingUrlAttributeType `json:"alertingUrl"` // REQUIRED - Cluster *string `json:"cluster"` + Cluster InstanceSensitiveDataGetClusterAttributeType `json:"cluster"` // REQUIRED - DashboardUrl *string `json:"dashboardUrl"` + DashboardUrl InstanceSensitiveDataGetDashboardUrlAttributeType `json:"dashboardUrl"` // REQUIRED - GrafanaAdminPassword *string `json:"grafanaAdminPassword"` + GrafanaAdminPassword InstanceSensitiveDataGetGrafanaAdminPasswordAttributeType `json:"grafanaAdminPassword"` // REQUIRED - GrafanaAdminUser *string `json:"grafanaAdminUser"` + GrafanaAdminUser InstanceSensitiveDataGetGrafanaAdminUserAttributeType `json:"grafanaAdminUser"` // REQUIRED - GrafanaPublicReadAccess *bool `json:"grafanaPublicReadAccess"` + GrafanaPublicReadAccess InstanceSensitiveDatagetGrafanaPublicReadAccessAttributeType `json:"grafanaPublicReadAccess"` // REQUIRED - GrafanaUrl *string `json:"grafanaUrl"` + GrafanaUrl InstanceSensitiveDataGetGrafanaUrlAttributeType `json:"grafanaUrl"` // REQUIRED - GrafanaUseStackitSso *bool `json:"grafanaUseStackitSso"` + GrafanaUseStackitSso InstanceSensitiveDatagetGrafanaUseStackitSsoAttributeType `json:"grafanaUseStackitSso"` // REQUIRED - Instance *string `json:"instance"` + Instance InstanceSensitiveDataGetInstanceAttributeType `json:"instance"` // REQUIRED - JaegerTracesUrl *string `json:"jaegerTracesUrl"` + JaegerTracesUrl InstanceSensitiveDataGetJaegerTracesUrlAttributeType `json:"jaegerTracesUrl"` // REQUIRED - JaegerUiUrl *string `json:"jaegerUiUrl"` + JaegerUiUrl InstanceSensitiveDataGetJaegerUiUrlAttributeType `json:"jaegerUiUrl"` // REQUIRED - LogsPushUrl *string `json:"logsPushUrl"` + LogsPushUrl InstanceSensitiveDataGetLogsPushUrlAttributeType `json:"logsPushUrl"` // REQUIRED - LogsUrl *string `json:"logsUrl"` + LogsUrl InstanceSensitiveDataGetLogsUrlAttributeType `json:"logsUrl"` // REQUIRED - MetricsRetentionTime1h *int64 `json:"metricsRetentionTime1h"` + MetricsRetentionTime1h InstanceSensitiveDataGetMetricsRetentionTime1hAttributeType `json:"metricsRetentionTime1h"` // REQUIRED - MetricsRetentionTime5m *int64 `json:"metricsRetentionTime5m"` + MetricsRetentionTime5m InstanceSensitiveDataGetMetricsRetentionTime5mAttributeType `json:"metricsRetentionTime5m"` // REQUIRED - MetricsRetentionTimeRaw *int64 `json:"metricsRetentionTimeRaw"` + MetricsRetentionTimeRaw InstanceSensitiveDataGetMetricsRetentionTimeRawAttributeType `json:"metricsRetentionTimeRaw"` // REQUIRED - MetricsUrl *string `json:"metricsUrl"` - Name *string `json:"name,omitempty"` + MetricsUrl InstanceSensitiveDataGetMetricsUrlAttributeType `json:"metricsUrl"` + Name InstanceSensitiveDataGetNameAttributeType `json:"name,omitempty"` // REQUIRED - OtlpTracesUrl *string `json:"otlpTracesUrl"` + OtlpTracesUrl InstanceSensitiveDataGetOtlpTracesUrlAttributeType `json:"otlpTracesUrl"` // REQUIRED - Plan *PlanModel `json:"plan"` + Plan InstanceSensitiveDataGetPlanAttributeType `json:"plan"` // REQUIRED - PushMetricsUrl *string `json:"pushMetricsUrl"` + PushMetricsUrl InstanceSensitiveDataGetPushMetricsUrlAttributeType `json:"pushMetricsUrl"` // REQUIRED - TargetsUrl *string `json:"targetsUrl"` + TargetsUrl InstanceSensitiveDataGetTargetsUrlAttributeType `json:"targetsUrl"` // REQUIRED - ZipkinSpansUrl *string `json:"zipkinSpansUrl"` + ZipkinSpansUrl InstanceSensitiveDataGetZipkinSpansUrlAttributeType `json:"zipkinSpansUrl"` } type _InstanceSensitiveData InstanceSensitiveData @@ -72,32 +549,30 @@ type _InstanceSensitiveData InstanceSensitiveData // 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 { +func NewInstanceSensitiveData(alertingUrl InstanceSensitiveDataGetAlertingUrlArgType, cluster InstanceSensitiveDataGetClusterArgType, dashboardUrl InstanceSensitiveDataGetDashboardUrlArgType, grafanaAdminPassword InstanceSensitiveDataGetGrafanaAdminPasswordArgType, grafanaAdminUser InstanceSensitiveDataGetGrafanaAdminUserArgType, grafanaPublicReadAccess InstanceSensitiveDatagetGrafanaPublicReadAccessArgType, grafanaUrl InstanceSensitiveDataGetGrafanaUrlArgType, grafanaUseStackitSso InstanceSensitiveDatagetGrafanaUseStackitSsoArgType, instance InstanceSensitiveDataGetInstanceArgType, jaegerTracesUrl InstanceSensitiveDataGetJaegerTracesUrlArgType, jaegerUiUrl InstanceSensitiveDataGetJaegerUiUrlArgType, logsPushUrl InstanceSensitiveDataGetLogsPushUrlArgType, logsUrl InstanceSensitiveDataGetLogsUrlArgType, metricsRetentionTime1h InstanceSensitiveDataGetMetricsRetentionTime1hArgType, metricsRetentionTime5m InstanceSensitiveDataGetMetricsRetentionTime5mArgType, metricsRetentionTimeRaw InstanceSensitiveDataGetMetricsRetentionTimeRawArgType, metricsUrl InstanceSensitiveDataGetMetricsUrlArgType, otlpTracesUrl InstanceSensitiveDataGetOtlpTracesUrlArgType, plan InstanceSensitiveDataGetPlanArgType, pushMetricsUrl InstanceSensitiveDataGetPushMetricsUrlArgType, targetsUrl InstanceSensitiveDataGetTargetsUrlArgType, zipkinSpansUrl InstanceSensitiveDataGetZipkinSpansUrlArgType) *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 + setInstanceSensitiveDataGetAlertingUrlAttributeType(&this.AlertingUrl, alertingUrl) + setInstanceSensitiveDataGetClusterAttributeType(&this.Cluster, cluster) + setInstanceSensitiveDataGetDashboardUrlAttributeType(&this.DashboardUrl, dashboardUrl) + setInstanceSensitiveDataGetGrafanaAdminPasswordAttributeType(&this.GrafanaAdminPassword, grafanaAdminPassword) + setInstanceSensitiveDataGetGrafanaAdminUserAttributeType(&this.GrafanaAdminUser, grafanaAdminUser) + setInstanceSensitiveDatagetGrafanaPublicReadAccessAttributeType(&this.GrafanaPublicReadAccess, grafanaPublicReadAccess) + setInstanceSensitiveDataGetGrafanaUrlAttributeType(&this.GrafanaUrl, grafanaUrl) + setInstanceSensitiveDatagetGrafanaUseStackitSsoAttributeType(&this.GrafanaUseStackitSso, grafanaUseStackitSso) + setInstanceSensitiveDataGetInstanceAttributeType(&this.Instance, instance) + setInstanceSensitiveDataGetJaegerTracesUrlAttributeType(&this.JaegerTracesUrl, jaegerTracesUrl) + setInstanceSensitiveDataGetJaegerUiUrlAttributeType(&this.JaegerUiUrl, jaegerUiUrl) + setInstanceSensitiveDataGetLogsPushUrlAttributeType(&this.LogsPushUrl, logsPushUrl) + setInstanceSensitiveDataGetLogsUrlAttributeType(&this.LogsUrl, logsUrl) + setInstanceSensitiveDataGetMetricsRetentionTime1hAttributeType(&this.MetricsRetentionTime1h, metricsRetentionTime1h) + setInstanceSensitiveDataGetMetricsRetentionTime5mAttributeType(&this.MetricsRetentionTime5m, metricsRetentionTime5m) + setInstanceSensitiveDataGetMetricsRetentionTimeRawAttributeType(&this.MetricsRetentionTimeRaw, metricsRetentionTimeRaw) + setInstanceSensitiveDataGetMetricsUrlAttributeType(&this.MetricsUrl, metricsUrl) + setInstanceSensitiveDataGetOtlpTracesUrlAttributeType(&this.OtlpTracesUrl, otlpTracesUrl) + setInstanceSensitiveDataGetPlanAttributeType(&this.Plan, plan) + setInstanceSensitiveDataGetPushMetricsUrlAttributeType(&this.PushMetricsUrl, pushMetricsUrl) + setInstanceSensitiveDataGetTargetsUrlAttributeType(&this.TargetsUrl, targetsUrl) + setInstanceSensitiveDataGetZipkinSpansUrlAttributeType(&this.ZipkinSpansUrl, zipkinSpansUrl) return &this } @@ -112,592 +587,473 @@ func NewInstanceSensitiveDataWithDefaults() *InstanceSensitiveData { } // GetAlertingUrl returns the AlertingUrl field value -func (o *InstanceSensitiveData) GetAlertingUrl() *string { - if o == nil || IsNil(o.AlertingUrl) { - var ret *string - return ret - } - - return o.AlertingUrl +func (o *InstanceSensitiveData) GetAlertingUrl() (ret InstanceSensitiveDataGetAlertingUrlRetType) { + ret, _ = o.GetAlertingUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetAlertingUrlOk() (ret InstanceSensitiveDataGetAlertingUrlRetType, ok bool) { + return getInstanceSensitiveDataGetAlertingUrlAttributeTypeOk(o.AlertingUrl) } // SetAlertingUrl sets field value -func (o *InstanceSensitiveData) SetAlertingUrl(v *string) { - o.AlertingUrl = v +func (o *InstanceSensitiveData) SetAlertingUrl(v InstanceSensitiveDataGetAlertingUrlRetType) { + setInstanceSensitiveDataGetAlertingUrlAttributeType(&o.AlertingUrl, v) } // GetCluster returns the Cluster field value -func (o *InstanceSensitiveData) GetCluster() *string { - if o == nil || IsNil(o.Cluster) { - var ret *string - return ret - } - - return o.Cluster +func (o *InstanceSensitiveData) GetCluster() (ret InstanceSensitiveDataGetClusterRetType) { + ret, _ = o.GetClusterOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetClusterOk() (ret InstanceSensitiveDataGetClusterRetType, ok bool) { + return getInstanceSensitiveDataGetClusterAttributeTypeOk(o.Cluster) } // SetCluster sets field value -func (o *InstanceSensitiveData) SetCluster(v *string) { - o.Cluster = v +func (o *InstanceSensitiveData) SetCluster(v InstanceSensitiveDataGetClusterRetType) { + setInstanceSensitiveDataGetClusterAttributeType(&o.Cluster, v) } // GetDashboardUrl returns the DashboardUrl field value -func (o *InstanceSensitiveData) GetDashboardUrl() *string { - if o == nil || IsNil(o.DashboardUrl) { - var ret *string - return ret - } - - return o.DashboardUrl +func (o *InstanceSensitiveData) GetDashboardUrl() (ret InstanceSensitiveDataGetDashboardUrlRetType) { + ret, _ = o.GetDashboardUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetDashboardUrlOk() (ret InstanceSensitiveDataGetDashboardUrlRetType, ok bool) { + return getInstanceSensitiveDataGetDashboardUrlAttributeTypeOk(o.DashboardUrl) } // SetDashboardUrl sets field value -func (o *InstanceSensitiveData) SetDashboardUrl(v *string) { - o.DashboardUrl = v +func (o *InstanceSensitiveData) SetDashboardUrl(v InstanceSensitiveDataGetDashboardUrlRetType) { + setInstanceSensitiveDataGetDashboardUrlAttributeType(&o.DashboardUrl, v) } // GetGrafanaAdminPassword returns the GrafanaAdminPassword field value -func (o *InstanceSensitiveData) GetGrafanaAdminPassword() *string { - if o == nil || IsNil(o.GrafanaAdminPassword) { - var ret *string - return ret - } - - return o.GrafanaAdminPassword +func (o *InstanceSensitiveData) GetGrafanaAdminPassword() (ret InstanceSensitiveDataGetGrafanaAdminPasswordRetType) { + ret, _ = o.GetGrafanaAdminPasswordOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetGrafanaAdminPasswordOk() (ret InstanceSensitiveDataGetGrafanaAdminPasswordRetType, ok bool) { + return getInstanceSensitiveDataGetGrafanaAdminPasswordAttributeTypeOk(o.GrafanaAdminPassword) } // SetGrafanaAdminPassword sets field value -func (o *InstanceSensitiveData) SetGrafanaAdminPassword(v *string) { - o.GrafanaAdminPassword = v +func (o *InstanceSensitiveData) SetGrafanaAdminPassword(v InstanceSensitiveDataGetGrafanaAdminPasswordRetType) { + setInstanceSensitiveDataGetGrafanaAdminPasswordAttributeType(&o.GrafanaAdminPassword, v) } // GetGrafanaAdminUser returns the GrafanaAdminUser field value -func (o *InstanceSensitiveData) GetGrafanaAdminUser() *string { - if o == nil || IsNil(o.GrafanaAdminUser) { - var ret *string - return ret - } - - return o.GrafanaAdminUser +func (o *InstanceSensitiveData) GetGrafanaAdminUser() (ret InstanceSensitiveDataGetGrafanaAdminUserRetType) { + ret, _ = o.GetGrafanaAdminUserOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetGrafanaAdminUserOk() (ret InstanceSensitiveDataGetGrafanaAdminUserRetType, ok bool) { + return getInstanceSensitiveDataGetGrafanaAdminUserAttributeTypeOk(o.GrafanaAdminUser) } // SetGrafanaAdminUser sets field value -func (o *InstanceSensitiveData) SetGrafanaAdminUser(v *string) { - o.GrafanaAdminUser = v +func (o *InstanceSensitiveData) SetGrafanaAdminUser(v InstanceSensitiveDataGetGrafanaAdminUserRetType) { + setInstanceSensitiveDataGetGrafanaAdminUserAttributeType(&o.GrafanaAdminUser, v) } // GetGrafanaPublicReadAccess returns the GrafanaPublicReadAccess field value -func (o *InstanceSensitiveData) GetGrafanaPublicReadAccess() *bool { - if o == nil || IsNil(o.GrafanaPublicReadAccess) { - var ret *bool - return ret - } - - return o.GrafanaPublicReadAccess +func (o *InstanceSensitiveData) GetGrafanaPublicReadAccess() (ret InstanceSensitiveDatagetGrafanaPublicReadAccessRetType) { + ret, _ = o.GetGrafanaPublicReadAccessOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetGrafanaPublicReadAccessOk() (ret InstanceSensitiveDatagetGrafanaPublicReadAccessRetType, ok bool) { + return getInstanceSensitiveDatagetGrafanaPublicReadAccessAttributeTypeOk(o.GrafanaPublicReadAccess) } // SetGrafanaPublicReadAccess sets field value -func (o *InstanceSensitiveData) SetGrafanaPublicReadAccess(v *bool) { - o.GrafanaPublicReadAccess = v +func (o *InstanceSensitiveData) SetGrafanaPublicReadAccess(v InstanceSensitiveDatagetGrafanaPublicReadAccessRetType) { + setInstanceSensitiveDatagetGrafanaPublicReadAccessAttributeType(&o.GrafanaPublicReadAccess, v) } // GetGrafanaUrl returns the GrafanaUrl field value -func (o *InstanceSensitiveData) GetGrafanaUrl() *string { - if o == nil || IsNil(o.GrafanaUrl) { - var ret *string - return ret - } - - return o.GrafanaUrl +func (o *InstanceSensitiveData) GetGrafanaUrl() (ret InstanceSensitiveDataGetGrafanaUrlRetType) { + ret, _ = o.GetGrafanaUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetGrafanaUrlOk() (ret InstanceSensitiveDataGetGrafanaUrlRetType, ok bool) { + return getInstanceSensitiveDataGetGrafanaUrlAttributeTypeOk(o.GrafanaUrl) } // SetGrafanaUrl sets field value -func (o *InstanceSensitiveData) SetGrafanaUrl(v *string) { - o.GrafanaUrl = v +func (o *InstanceSensitiveData) SetGrafanaUrl(v InstanceSensitiveDataGetGrafanaUrlRetType) { + setInstanceSensitiveDataGetGrafanaUrlAttributeType(&o.GrafanaUrl, v) } // GetGrafanaUseStackitSso returns the GrafanaUseStackitSso field value -func (o *InstanceSensitiveData) GetGrafanaUseStackitSso() *bool { - if o == nil || IsNil(o.GrafanaUseStackitSso) { - var ret *bool - return ret - } - - return o.GrafanaUseStackitSso +func (o *InstanceSensitiveData) GetGrafanaUseStackitSso() (ret InstanceSensitiveDatagetGrafanaUseStackitSsoRetType) { + ret, _ = o.GetGrafanaUseStackitSsoOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetGrafanaUseStackitSsoOk() (ret InstanceSensitiveDatagetGrafanaUseStackitSsoRetType, ok bool) { + return getInstanceSensitiveDatagetGrafanaUseStackitSsoAttributeTypeOk(o.GrafanaUseStackitSso) } // SetGrafanaUseStackitSso sets field value -func (o *InstanceSensitiveData) SetGrafanaUseStackitSso(v *bool) { - o.GrafanaUseStackitSso = v +func (o *InstanceSensitiveData) SetGrafanaUseStackitSso(v InstanceSensitiveDatagetGrafanaUseStackitSsoRetType) { + setInstanceSensitiveDatagetGrafanaUseStackitSsoAttributeType(&o.GrafanaUseStackitSso, v) } // GetInstance returns the Instance field value -func (o *InstanceSensitiveData) GetInstance() *string { - if o == nil || IsNil(o.Instance) { - var ret *string - return ret - } - - return o.Instance +func (o *InstanceSensitiveData) GetInstance() (ret InstanceSensitiveDataGetInstanceRetType) { + ret, _ = o.GetInstanceOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetInstanceOk() (ret InstanceSensitiveDataGetInstanceRetType, ok bool) { + return getInstanceSensitiveDataGetInstanceAttributeTypeOk(o.Instance) } // SetInstance sets field value -func (o *InstanceSensitiveData) SetInstance(v *string) { - o.Instance = v +func (o *InstanceSensitiveData) SetInstance(v InstanceSensitiveDataGetInstanceRetType) { + setInstanceSensitiveDataGetInstanceAttributeType(&o.Instance, v) } // GetJaegerTracesUrl returns the JaegerTracesUrl field value -func (o *InstanceSensitiveData) GetJaegerTracesUrl() *string { - if o == nil || IsNil(o.JaegerTracesUrl) { - var ret *string - return ret - } - - return o.JaegerTracesUrl +func (o *InstanceSensitiveData) GetJaegerTracesUrl() (ret InstanceSensitiveDataGetJaegerTracesUrlRetType) { + ret, _ = o.GetJaegerTracesUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetJaegerTracesUrlOk() (ret InstanceSensitiveDataGetJaegerTracesUrlRetType, ok bool) { + return getInstanceSensitiveDataGetJaegerTracesUrlAttributeTypeOk(o.JaegerTracesUrl) } // SetJaegerTracesUrl sets field value -func (o *InstanceSensitiveData) SetJaegerTracesUrl(v *string) { - o.JaegerTracesUrl = v +func (o *InstanceSensitiveData) SetJaegerTracesUrl(v InstanceSensitiveDataGetJaegerTracesUrlRetType) { + setInstanceSensitiveDataGetJaegerTracesUrlAttributeType(&o.JaegerTracesUrl, v) } // GetJaegerUiUrl returns the JaegerUiUrl field value -func (o *InstanceSensitiveData) GetJaegerUiUrl() *string { - if o == nil || IsNil(o.JaegerUiUrl) { - var ret *string - return ret - } - - return o.JaegerUiUrl +func (o *InstanceSensitiveData) GetJaegerUiUrl() (ret InstanceSensitiveDataGetJaegerUiUrlRetType) { + ret, _ = o.GetJaegerUiUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetJaegerUiUrlOk() (ret InstanceSensitiveDataGetJaegerUiUrlRetType, ok bool) { + return getInstanceSensitiveDataGetJaegerUiUrlAttributeTypeOk(o.JaegerUiUrl) } // SetJaegerUiUrl sets field value -func (o *InstanceSensitiveData) SetJaegerUiUrl(v *string) { - o.JaegerUiUrl = v +func (o *InstanceSensitiveData) SetJaegerUiUrl(v InstanceSensitiveDataGetJaegerUiUrlRetType) { + setInstanceSensitiveDataGetJaegerUiUrlAttributeType(&o.JaegerUiUrl, v) } // GetLogsPushUrl returns the LogsPushUrl field value -func (o *InstanceSensitiveData) GetLogsPushUrl() *string { - if o == nil || IsNil(o.LogsPushUrl) { - var ret *string - return ret - } - - return o.LogsPushUrl +func (o *InstanceSensitiveData) GetLogsPushUrl() (ret InstanceSensitiveDataGetLogsPushUrlRetType) { + ret, _ = o.GetLogsPushUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetLogsPushUrlOk() (ret InstanceSensitiveDataGetLogsPushUrlRetType, ok bool) { + return getInstanceSensitiveDataGetLogsPushUrlAttributeTypeOk(o.LogsPushUrl) } // SetLogsPushUrl sets field value -func (o *InstanceSensitiveData) SetLogsPushUrl(v *string) { - o.LogsPushUrl = v +func (o *InstanceSensitiveData) SetLogsPushUrl(v InstanceSensitiveDataGetLogsPushUrlRetType) { + setInstanceSensitiveDataGetLogsPushUrlAttributeType(&o.LogsPushUrl, v) } // GetLogsUrl returns the LogsUrl field value -func (o *InstanceSensitiveData) GetLogsUrl() *string { - if o == nil || IsNil(o.LogsUrl) { - var ret *string - return ret - } - - return o.LogsUrl +func (o *InstanceSensitiveData) GetLogsUrl() (ret InstanceSensitiveDataGetLogsUrlRetType) { + ret, _ = o.GetLogsUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetLogsUrlOk() (ret InstanceSensitiveDataGetLogsUrlRetType, ok bool) { + return getInstanceSensitiveDataGetLogsUrlAttributeTypeOk(o.LogsUrl) } // SetLogsUrl sets field value -func (o *InstanceSensitiveData) SetLogsUrl(v *string) { - o.LogsUrl = v +func (o *InstanceSensitiveData) SetLogsUrl(v InstanceSensitiveDataGetLogsUrlRetType) { + setInstanceSensitiveDataGetLogsUrlAttributeType(&o.LogsUrl, v) } // GetMetricsRetentionTime1h returns the MetricsRetentionTime1h field value -func (o *InstanceSensitiveData) GetMetricsRetentionTime1h() *int64 { - if o == nil || IsNil(o.MetricsRetentionTime1h) { - var ret *int64 - return ret - } - - return o.MetricsRetentionTime1h +func (o *InstanceSensitiveData) GetMetricsRetentionTime1h() (ret InstanceSensitiveDataGetMetricsRetentionTime1hRetType) { + ret, _ = o.GetMetricsRetentionTime1hOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetMetricsRetentionTime1hOk() (ret InstanceSensitiveDataGetMetricsRetentionTime1hRetType, ok bool) { + return getInstanceSensitiveDataGetMetricsRetentionTime1hAttributeTypeOk(o.MetricsRetentionTime1h) } // SetMetricsRetentionTime1h sets field value -func (o *InstanceSensitiveData) SetMetricsRetentionTime1h(v *int64) { - o.MetricsRetentionTime1h = v +func (o *InstanceSensitiveData) SetMetricsRetentionTime1h(v InstanceSensitiveDataGetMetricsRetentionTime1hRetType) { + setInstanceSensitiveDataGetMetricsRetentionTime1hAttributeType(&o.MetricsRetentionTime1h, v) } // GetMetricsRetentionTime5m returns the MetricsRetentionTime5m field value -func (o *InstanceSensitiveData) GetMetricsRetentionTime5m() *int64 { - if o == nil || IsNil(o.MetricsRetentionTime5m) { - var ret *int64 - return ret - } - - return o.MetricsRetentionTime5m +func (o *InstanceSensitiveData) GetMetricsRetentionTime5m() (ret InstanceSensitiveDataGetMetricsRetentionTime5mRetType) { + ret, _ = o.GetMetricsRetentionTime5mOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetMetricsRetentionTime5mOk() (ret InstanceSensitiveDataGetMetricsRetentionTime5mRetType, ok bool) { + return getInstanceSensitiveDataGetMetricsRetentionTime5mAttributeTypeOk(o.MetricsRetentionTime5m) } // SetMetricsRetentionTime5m sets field value -func (o *InstanceSensitiveData) SetMetricsRetentionTime5m(v *int64) { - o.MetricsRetentionTime5m = v +func (o *InstanceSensitiveData) SetMetricsRetentionTime5m(v InstanceSensitiveDataGetMetricsRetentionTime5mRetType) { + setInstanceSensitiveDataGetMetricsRetentionTime5mAttributeType(&o.MetricsRetentionTime5m, v) } // GetMetricsRetentionTimeRaw returns the MetricsRetentionTimeRaw field value -func (o *InstanceSensitiveData) GetMetricsRetentionTimeRaw() *int64 { - if o == nil || IsNil(o.MetricsRetentionTimeRaw) { - var ret *int64 - return ret - } - - return o.MetricsRetentionTimeRaw +func (o *InstanceSensitiveData) GetMetricsRetentionTimeRaw() (ret InstanceSensitiveDataGetMetricsRetentionTimeRawRetType) { + ret, _ = o.GetMetricsRetentionTimeRawOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetMetricsRetentionTimeRawOk() (ret InstanceSensitiveDataGetMetricsRetentionTimeRawRetType, ok bool) { + return getInstanceSensitiveDataGetMetricsRetentionTimeRawAttributeTypeOk(o.MetricsRetentionTimeRaw) } // SetMetricsRetentionTimeRaw sets field value -func (o *InstanceSensitiveData) SetMetricsRetentionTimeRaw(v *int64) { - o.MetricsRetentionTimeRaw = v +func (o *InstanceSensitiveData) SetMetricsRetentionTimeRaw(v InstanceSensitiveDataGetMetricsRetentionTimeRawRetType) { + setInstanceSensitiveDataGetMetricsRetentionTimeRawAttributeType(&o.MetricsRetentionTimeRaw, v) } // GetMetricsUrl returns the MetricsUrl field value -func (o *InstanceSensitiveData) GetMetricsUrl() *string { - if o == nil || IsNil(o.MetricsUrl) { - var ret *string - return ret - } - - return o.MetricsUrl +func (o *InstanceSensitiveData) GetMetricsUrl() (ret InstanceSensitiveDataGetMetricsUrlRetType) { + ret, _ = o.GetMetricsUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetMetricsUrlOk() (ret InstanceSensitiveDataGetMetricsUrlRetType, ok bool) { + return getInstanceSensitiveDataGetMetricsUrlAttributeTypeOk(o.MetricsUrl) } // SetMetricsUrl sets field value -func (o *InstanceSensitiveData) SetMetricsUrl(v *string) { - o.MetricsUrl = v +func (o *InstanceSensitiveData) SetMetricsUrl(v InstanceSensitiveDataGetMetricsUrlRetType) { + setInstanceSensitiveDataGetMetricsUrlAttributeType(&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 +func (o *InstanceSensitiveData) GetName() (res InstanceSensitiveDataGetNameRetType) { + res, _ = o.GetNameOk() + return } // 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 +func (o *InstanceSensitiveData) GetNameOk() (ret InstanceSensitiveDataGetNameRetType, ok bool) { + return getInstanceSensitiveDataGetNameAttributeTypeOk(o.Name) } // 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 + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *InstanceSensitiveData) SetName(v *string) { - o.Name = v +func (o *InstanceSensitiveData) SetName(v InstanceSensitiveDataGetNameRetType) { + setInstanceSensitiveDataGetNameAttributeType(&o.Name, v) } // GetOtlpTracesUrl returns the OtlpTracesUrl field value -func (o *InstanceSensitiveData) GetOtlpTracesUrl() *string { - if o == nil || IsNil(o.OtlpTracesUrl) { - var ret *string - return ret - } - - return o.OtlpTracesUrl +func (o *InstanceSensitiveData) GetOtlpTracesUrl() (ret InstanceSensitiveDataGetOtlpTracesUrlRetType) { + ret, _ = o.GetOtlpTracesUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetOtlpTracesUrlOk() (ret InstanceSensitiveDataGetOtlpTracesUrlRetType, ok bool) { + return getInstanceSensitiveDataGetOtlpTracesUrlAttributeTypeOk(o.OtlpTracesUrl) } // SetOtlpTracesUrl sets field value -func (o *InstanceSensitiveData) SetOtlpTracesUrl(v *string) { - o.OtlpTracesUrl = v +func (o *InstanceSensitiveData) SetOtlpTracesUrl(v InstanceSensitiveDataGetOtlpTracesUrlRetType) { + setInstanceSensitiveDataGetOtlpTracesUrlAttributeType(&o.OtlpTracesUrl, v) } // GetPlan returns the Plan field value -func (o *InstanceSensitiveData) GetPlan() *PlanModel { - if o == nil || IsNil(o.Plan) { - var ret *PlanModel - return ret - } - - return o.Plan +func (o *InstanceSensitiveData) GetPlan() (ret InstanceSensitiveDataGetPlanRetType) { + ret, _ = o.GetPlanOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetPlanOk() (ret InstanceSensitiveDataGetPlanRetType, ok bool) { + return getInstanceSensitiveDataGetPlanAttributeTypeOk(o.Plan) } // SetPlan sets field value -func (o *InstanceSensitiveData) SetPlan(v *PlanModel) { - o.Plan = v +func (o *InstanceSensitiveData) SetPlan(v InstanceSensitiveDataGetPlanRetType) { + setInstanceSensitiveDataGetPlanAttributeType(&o.Plan, v) } // GetPushMetricsUrl returns the PushMetricsUrl field value -func (o *InstanceSensitiveData) GetPushMetricsUrl() *string { - if o == nil || IsNil(o.PushMetricsUrl) { - var ret *string - return ret - } - - return o.PushMetricsUrl +func (o *InstanceSensitiveData) GetPushMetricsUrl() (ret InstanceSensitiveDataGetPushMetricsUrlRetType) { + ret, _ = o.GetPushMetricsUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetPushMetricsUrlOk() (ret InstanceSensitiveDataGetPushMetricsUrlRetType, ok bool) { + return getInstanceSensitiveDataGetPushMetricsUrlAttributeTypeOk(o.PushMetricsUrl) } // SetPushMetricsUrl sets field value -func (o *InstanceSensitiveData) SetPushMetricsUrl(v *string) { - o.PushMetricsUrl = v +func (o *InstanceSensitiveData) SetPushMetricsUrl(v InstanceSensitiveDataGetPushMetricsUrlRetType) { + setInstanceSensitiveDataGetPushMetricsUrlAttributeType(&o.PushMetricsUrl, v) } // GetTargetsUrl returns the TargetsUrl field value -func (o *InstanceSensitiveData) GetTargetsUrl() *string { - if o == nil || IsNil(o.TargetsUrl) { - var ret *string - return ret - } - - return o.TargetsUrl +func (o *InstanceSensitiveData) GetTargetsUrl() (ret InstanceSensitiveDataGetTargetsUrlRetType) { + ret, _ = o.GetTargetsUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetTargetsUrlOk() (ret InstanceSensitiveDataGetTargetsUrlRetType, ok bool) { + return getInstanceSensitiveDataGetTargetsUrlAttributeTypeOk(o.TargetsUrl) } // SetTargetsUrl sets field value -func (o *InstanceSensitiveData) SetTargetsUrl(v *string) { - o.TargetsUrl = v +func (o *InstanceSensitiveData) SetTargetsUrl(v InstanceSensitiveDataGetTargetsUrlRetType) { + setInstanceSensitiveDataGetTargetsUrlAttributeType(&o.TargetsUrl, v) } // GetZipkinSpansUrl returns the ZipkinSpansUrl field value -func (o *InstanceSensitiveData) GetZipkinSpansUrl() *string { - if o == nil || IsNil(o.ZipkinSpansUrl) { - var ret *string - return ret - } - - return o.ZipkinSpansUrl +func (o *InstanceSensitiveData) GetZipkinSpansUrl() (ret InstanceSensitiveDataGetZipkinSpansUrlRetType) { + ret, _ = o.GetZipkinSpansUrlOk() + return ret } // 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 +func (o *InstanceSensitiveData) GetZipkinSpansUrlOk() (ret InstanceSensitiveDataGetZipkinSpansUrlRetType, ok bool) { + return getInstanceSensitiveDataGetZipkinSpansUrlAttributeTypeOk(o.ZipkinSpansUrl) } // SetZipkinSpansUrl sets field value -func (o *InstanceSensitiveData) SetZipkinSpansUrl(v *string) { - o.ZipkinSpansUrl = v +func (o *InstanceSensitiveData) SetZipkinSpansUrl(v InstanceSensitiveDataGetZipkinSpansUrlRetType) { + setInstanceSensitiveDataGetZipkinSpansUrlAttributeType(&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 + if val, ok := getInstanceSensitiveDataGetAlertingUrlAttributeTypeOk(o.AlertingUrl); ok { + toSerialize["AlertingUrl"] = val + } + if val, ok := getInstanceSensitiveDataGetClusterAttributeTypeOk(o.Cluster); ok { + toSerialize["Cluster"] = val + } + if val, ok := getInstanceSensitiveDataGetDashboardUrlAttributeTypeOk(o.DashboardUrl); ok { + toSerialize["DashboardUrl"] = val + } + if val, ok := getInstanceSensitiveDataGetGrafanaAdminPasswordAttributeTypeOk(o.GrafanaAdminPassword); ok { + toSerialize["GrafanaAdminPassword"] = val + } + if val, ok := getInstanceSensitiveDataGetGrafanaAdminUserAttributeTypeOk(o.GrafanaAdminUser); ok { + toSerialize["GrafanaAdminUser"] = val + } + if val, ok := getInstanceSensitiveDatagetGrafanaPublicReadAccessAttributeTypeOk(o.GrafanaPublicReadAccess); ok { + toSerialize["GrafanaPublicReadAccess"] = val + } + if val, ok := getInstanceSensitiveDataGetGrafanaUrlAttributeTypeOk(o.GrafanaUrl); ok { + toSerialize["GrafanaUrl"] = val + } + if val, ok := getInstanceSensitiveDatagetGrafanaUseStackitSsoAttributeTypeOk(o.GrafanaUseStackitSso); ok { + toSerialize["GrafanaUseStackitSso"] = val + } + if val, ok := getInstanceSensitiveDataGetInstanceAttributeTypeOk(o.Instance); ok { + toSerialize["Instance"] = val + } + if val, ok := getInstanceSensitiveDataGetJaegerTracesUrlAttributeTypeOk(o.JaegerTracesUrl); ok { + toSerialize["JaegerTracesUrl"] = val + } + if val, ok := getInstanceSensitiveDataGetJaegerUiUrlAttributeTypeOk(o.JaegerUiUrl); ok { + toSerialize["JaegerUiUrl"] = val + } + if val, ok := getInstanceSensitiveDataGetLogsPushUrlAttributeTypeOk(o.LogsPushUrl); ok { + toSerialize["LogsPushUrl"] = val + } + if val, ok := getInstanceSensitiveDataGetLogsUrlAttributeTypeOk(o.LogsUrl); ok { + toSerialize["LogsUrl"] = val + } + if val, ok := getInstanceSensitiveDataGetMetricsRetentionTime1hAttributeTypeOk(o.MetricsRetentionTime1h); ok { + toSerialize["MetricsRetentionTime1h"] = val + } + if val, ok := getInstanceSensitiveDataGetMetricsRetentionTime5mAttributeTypeOk(o.MetricsRetentionTime5m); ok { + toSerialize["MetricsRetentionTime5m"] = val + } + if val, ok := getInstanceSensitiveDataGetMetricsRetentionTimeRawAttributeTypeOk(o.MetricsRetentionTimeRaw); ok { + toSerialize["MetricsRetentionTimeRaw"] = val + } + if val, ok := getInstanceSensitiveDataGetMetricsUrlAttributeTypeOk(o.MetricsUrl); ok { + toSerialize["MetricsUrl"] = val + } + if val, ok := getInstanceSensitiveDataGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getInstanceSensitiveDataGetOtlpTracesUrlAttributeTypeOk(o.OtlpTracesUrl); ok { + toSerialize["OtlpTracesUrl"] = val + } + if val, ok := getInstanceSensitiveDataGetPlanAttributeTypeOk(o.Plan); ok { + toSerialize["Plan"] = val + } + if val, ok := getInstanceSensitiveDataGetPushMetricsUrlAttributeTypeOk(o.PushMetricsUrl); ok { + toSerialize["PushMetricsUrl"] = val + } + if val, ok := getInstanceSensitiveDataGetTargetsUrlAttributeTypeOk(o.TargetsUrl); ok { + toSerialize["TargetsUrl"] = val + } + if val, ok := getInstanceSensitiveDataGetZipkinSpansUrlAttributeTypeOk(o.ZipkinSpansUrl); ok { + toSerialize["ZipkinSpansUrl"] = val + } return toSerialize, nil } diff --git a/services/observability/model_job.go b/services/observability/model_job.go index fec7c904c..1396cdc46 100644 --- a/services/observability/model_job.go +++ b/services/observability/model_job.go @@ -17,28 +17,353 @@ import ( // checks if the Job type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Job{} +/* + types and functions for basicAuth +*/ + +// isModel +type JobGetBasicAuthAttributeType = *BasicAuth +type JobGetBasicAuthArgType = BasicAuth +type JobGetBasicAuthRetType = BasicAuth + +func getJobGetBasicAuthAttributeTypeOk(arg JobGetBasicAuthAttributeType) (ret JobGetBasicAuthRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetBasicAuthAttributeType(arg *JobGetBasicAuthAttributeType, val JobGetBasicAuthRetType) { + *arg = &val +} + +/* + types and functions for bearerToken +*/ + +// isNotNullableString +type JobGetBearerTokenAttributeType = *string + +func getJobGetBearerTokenAttributeTypeOk(arg JobGetBearerTokenAttributeType) (ret JobGetBearerTokenRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetBearerTokenAttributeType(arg *JobGetBearerTokenAttributeType, val JobGetBearerTokenRetType) { + *arg = &val +} + +type JobGetBearerTokenArgType = string +type JobGetBearerTokenRetType = string + +/* + types and functions for honorLabels +*/ + +// isBoolean +type JobgetHonorLabelsAttributeType = *bool +type JobgetHonorLabelsArgType = bool +type JobgetHonorLabelsRetType = bool + +func getJobgetHonorLabelsAttributeTypeOk(arg JobgetHonorLabelsAttributeType) (ret JobgetHonorLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobgetHonorLabelsAttributeType(arg *JobgetHonorLabelsAttributeType, val JobgetHonorLabelsRetType) { + *arg = &val +} + +/* + types and functions for honorTimeStamps +*/ + +// isBoolean +type JobgetHonorTimeStampsAttributeType = *bool +type JobgetHonorTimeStampsArgType = bool +type JobgetHonorTimeStampsRetType = bool + +func getJobgetHonorTimeStampsAttributeTypeOk(arg JobgetHonorTimeStampsAttributeType) (ret JobgetHonorTimeStampsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobgetHonorTimeStampsAttributeType(arg *JobgetHonorTimeStampsAttributeType, val JobgetHonorTimeStampsRetType) { + *arg = &val +} + +/* + types and functions for httpSdConfigs +*/ + +// isArray +type JobGetHttpSdConfigsAttributeType = *[]HTTPServiceSD +type JobGetHttpSdConfigsArgType = []HTTPServiceSD +type JobGetHttpSdConfigsRetType = []HTTPServiceSD + +func getJobGetHttpSdConfigsAttributeTypeOk(arg JobGetHttpSdConfigsAttributeType) (ret JobGetHttpSdConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetHttpSdConfigsAttributeType(arg *JobGetHttpSdConfigsAttributeType, val JobGetHttpSdConfigsRetType) { + *arg = &val +} + +/* + types and functions for jobName +*/ + +// isNotNullableString +type JobGetJobNameAttributeType = *string + +func getJobGetJobNameAttributeTypeOk(arg JobGetJobNameAttributeType) (ret JobGetJobNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetJobNameAttributeType(arg *JobGetJobNameAttributeType, val JobGetJobNameRetType) { + *arg = &val +} + +type JobGetJobNameArgType = string +type JobGetJobNameRetType = string + +/* + types and functions for metricsPath +*/ + +// isNotNullableString +type JobGetMetricsPathAttributeType = *string + +func getJobGetMetricsPathAttributeTypeOk(arg JobGetMetricsPathAttributeType) (ret JobGetMetricsPathRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetMetricsPathAttributeType(arg *JobGetMetricsPathAttributeType, val JobGetMetricsPathRetType) { + *arg = &val +} + +type JobGetMetricsPathArgType = string +type JobGetMetricsPathRetType = string + +/* + types and functions for metricsRelabelConfigs +*/ + +// isArray +type JobGetMetricsRelabelConfigsAttributeType = *[]MetricsRelabelConfig +type JobGetMetricsRelabelConfigsArgType = []MetricsRelabelConfig +type JobGetMetricsRelabelConfigsRetType = []MetricsRelabelConfig + +func getJobGetMetricsRelabelConfigsAttributeTypeOk(arg JobGetMetricsRelabelConfigsAttributeType) (ret JobGetMetricsRelabelConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetMetricsRelabelConfigsAttributeType(arg *JobGetMetricsRelabelConfigsAttributeType, val JobGetMetricsRelabelConfigsRetType) { + *arg = &val +} + +/* + types and functions for oauth2 +*/ + +// isModel +type JobGetOauth2AttributeType = *OAuth2 +type JobGetOauth2ArgType = OAuth2 +type JobGetOauth2RetType = OAuth2 + +func getJobGetOauth2AttributeTypeOk(arg JobGetOauth2AttributeType) (ret JobGetOauth2RetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetOauth2AttributeType(arg *JobGetOauth2AttributeType, val JobGetOauth2RetType) { + *arg = &val +} + +/* + types and functions for params +*/ + +// isContainer +type JobGetParamsAttributeType = *map[string][]string +type JobGetParamsArgType = map[string][]string +type JobGetParamsRetType = map[string][]string + +func getJobGetParamsAttributeTypeOk(arg JobGetParamsAttributeType) (ret JobGetParamsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetParamsAttributeType(arg *JobGetParamsAttributeType, val JobGetParamsRetType) { + *arg = &val +} + +/* + types and functions for sampleLimit +*/ + +// isInteger +type JobGetSampleLimitAttributeType = *int64 +type JobGetSampleLimitArgType = int64 +type JobGetSampleLimitRetType = int64 + +func getJobGetSampleLimitAttributeTypeOk(arg JobGetSampleLimitAttributeType) (ret JobGetSampleLimitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetSampleLimitAttributeType(arg *JobGetSampleLimitAttributeType, val JobGetSampleLimitRetType) { + *arg = &val +} + +/* + types and functions for scheme +*/ + +// isEnumRef +type JobGetSchemeAttributeType = *string +type JobGetSchemeArgType = string +type JobGetSchemeRetType = string + +func getJobGetSchemeAttributeTypeOk(arg JobGetSchemeAttributeType) (ret JobGetSchemeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetSchemeAttributeType(arg *JobGetSchemeAttributeType, val JobGetSchemeRetType) { + *arg = &val +} + +/* + types and functions for scrapeInterval +*/ + +// isNotNullableString +type JobGetScrapeIntervalAttributeType = *string + +func getJobGetScrapeIntervalAttributeTypeOk(arg JobGetScrapeIntervalAttributeType) (ret JobGetScrapeIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetScrapeIntervalAttributeType(arg *JobGetScrapeIntervalAttributeType, val JobGetScrapeIntervalRetType) { + *arg = &val +} + +type JobGetScrapeIntervalArgType = string +type JobGetScrapeIntervalRetType = string + +/* + types and functions for scrapeTimeout +*/ + +// isNotNullableString +type JobGetScrapeTimeoutAttributeType = *string + +func getJobGetScrapeTimeoutAttributeTypeOk(arg JobGetScrapeTimeoutAttributeType) (ret JobGetScrapeTimeoutRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetScrapeTimeoutAttributeType(arg *JobGetScrapeTimeoutAttributeType, val JobGetScrapeTimeoutRetType) { + *arg = &val +} + +type JobGetScrapeTimeoutArgType = string +type JobGetScrapeTimeoutRetType = string + +/* + types and functions for staticConfigs +*/ + +// isArray +type JobGetStaticConfigsAttributeType = *[]StaticConfigs +type JobGetStaticConfigsArgType = []StaticConfigs +type JobGetStaticConfigsRetType = []StaticConfigs + +func getJobGetStaticConfigsAttributeTypeOk(arg JobGetStaticConfigsAttributeType) (ret JobGetStaticConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetStaticConfigsAttributeType(arg *JobGetStaticConfigsAttributeType, val JobGetStaticConfigsRetType) { + *arg = &val +} + +/* + types and functions for tlsConfig +*/ + +// isModel +type JobGetTlsConfigAttributeType = *TLSConfig +type JobGetTlsConfigArgType = TLSConfig +type JobGetTlsConfigRetType = TLSConfig + +func getJobGetTlsConfigAttributeTypeOk(arg JobGetTlsConfigAttributeType) (ret JobGetTlsConfigRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setJobGetTlsConfigAttributeType(arg *JobGetTlsConfigAttributeType, val JobGetTlsConfigRetType) { + *arg = &val +} + // Job struct for Job type Job struct { - BasicAuth *BasicAuth `json:"basicAuth,omitempty"` - BearerToken *string `json:"bearerToken,omitempty"` - HonorLabels *bool `json:"honorLabels,omitempty"` - HonorTimeStamps *bool `json:"honorTimeStamps,omitempty"` - HttpSdConfigs *[]HTTPServiceSD `json:"httpSdConfigs,omitempty"` + BasicAuth JobGetBasicAuthAttributeType `json:"basicAuth,omitempty"` + BearerToken JobGetBearerTokenAttributeType `json:"bearerToken,omitempty"` + HonorLabels JobgetHonorLabelsAttributeType `json:"honorLabels,omitempty"` + HonorTimeStamps JobgetHonorTimeStampsAttributeType `json:"honorTimeStamps,omitempty"` + HttpSdConfigs JobGetHttpSdConfigsAttributeType `json:"httpSdConfigs,omitempty"` // REQUIRED - JobName *string `json:"jobName"` - MetricsPath *string `json:"metricsPath,omitempty"` - MetricsRelabelConfigs *[]MetricsRelabelConfig `json:"metricsRelabelConfigs,omitempty"` - Oauth2 *OAuth2 `json:"oauth2,omitempty"` - Params *map[string][]string `json:"params,omitempty"` - SampleLimit *int64 `json:"sampleLimit,omitempty"` - Scheme *string `json:"scheme,omitempty"` + JobName JobGetJobNameAttributeType `json:"jobName"` + MetricsPath JobGetMetricsPathAttributeType `json:"metricsPath,omitempty"` + MetricsRelabelConfigs JobGetMetricsRelabelConfigsAttributeType `json:"metricsRelabelConfigs,omitempty"` + Oauth2 JobGetOauth2AttributeType `json:"oauth2,omitempty"` + Params JobGetParamsAttributeType `json:"params,omitempty"` + SampleLimit JobGetSampleLimitAttributeType `json:"sampleLimit,omitempty"` + Scheme JobGetSchemeAttributeType `json:"scheme,omitempty"` // REQUIRED - ScrapeInterval *string `json:"scrapeInterval"` + ScrapeInterval JobGetScrapeIntervalAttributeType `json:"scrapeInterval"` // REQUIRED - ScrapeTimeout *string `json:"scrapeTimeout"` + ScrapeTimeout JobGetScrapeTimeoutAttributeType `json:"scrapeTimeout"` // REQUIRED - StaticConfigs *[]StaticConfigs `json:"staticConfigs"` - TlsConfig *TLSConfig `json:"tlsConfig,omitempty"` + StaticConfigs JobGetStaticConfigsAttributeType `json:"staticConfigs"` + TlsConfig JobGetTlsConfigAttributeType `json:"tlsConfig,omitempty"` } type _Job Job @@ -47,20 +372,12 @@ type _Job Job // 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 { +func NewJob(jobName JobGetJobNameArgType, scrapeInterval JobGetScrapeIntervalArgType, scrapeTimeout JobGetScrapeTimeoutArgType, staticConfigs JobGetStaticConfigsArgType) *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 + setJobGetJobNameAttributeType(&this.JobName, jobName) + setJobGetScrapeIntervalAttributeType(&this.ScrapeInterval, scrapeInterval) + setJobGetScrapeTimeoutAttributeType(&this.ScrapeTimeout, scrapeTimeout) + setJobGetStaticConfigsAttributeType(&this.StaticConfigs, staticConfigs) return &this } @@ -81,526 +398,398 @@ func NewJobWithDefaults() *Job { } // 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 +func (o *Job) GetBasicAuth() (res JobGetBasicAuthRetType) { + res, _ = o.GetBasicAuthOk() + return } // 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 +func (o *Job) GetBasicAuthOk() (ret JobGetBasicAuthRetType, ok bool) { + return getJobGetBasicAuthAttributeTypeOk(o.BasicAuth) } // 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 + _, ok := o.GetBasicAuthOk() + return ok } // SetBasicAuth gets a reference to the given BasicAuth and assigns it to the BasicAuth field. -func (o *Job) SetBasicAuth(v *BasicAuth) { - o.BasicAuth = v +func (o *Job) SetBasicAuth(v JobGetBasicAuthRetType) { + setJobGetBasicAuthAttributeType(&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 +func (o *Job) GetBearerToken() (res JobGetBearerTokenRetType) { + res, _ = o.GetBearerTokenOk() + return } // 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 +func (o *Job) GetBearerTokenOk() (ret JobGetBearerTokenRetType, ok bool) { + return getJobGetBearerTokenAttributeTypeOk(o.BearerToken) } // 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 + _, ok := o.GetBearerTokenOk() + return ok } // SetBearerToken gets a reference to the given string and assigns it to the BearerToken field. -func (o *Job) SetBearerToken(v *string) { - o.BearerToken = v +func (o *Job) SetBearerToken(v JobGetBearerTokenRetType) { + setJobGetBearerTokenAttributeType(&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 +func (o *Job) GetHonorLabels() (res JobgetHonorLabelsRetType) { + res, _ = o.GetHonorLabelsOk() + return } // 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 +func (o *Job) GetHonorLabelsOk() (ret JobgetHonorLabelsRetType, ok bool) { + return getJobgetHonorLabelsAttributeTypeOk(o.HonorLabels) } // 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 + _, ok := o.GetHonorLabelsOk() + return ok } // SetHonorLabels gets a reference to the given bool and assigns it to the HonorLabels field. -func (o *Job) SetHonorLabels(v *bool) { - o.HonorLabels = v +func (o *Job) SetHonorLabels(v JobgetHonorLabelsRetType) { + setJobgetHonorLabelsAttributeType(&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 +func (o *Job) GetHonorTimeStamps() (res JobgetHonorTimeStampsRetType) { + res, _ = o.GetHonorTimeStampsOk() + return } // 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 +func (o *Job) GetHonorTimeStampsOk() (ret JobgetHonorTimeStampsRetType, ok bool) { + return getJobgetHonorTimeStampsAttributeTypeOk(o.HonorTimeStamps) } // 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 + _, ok := o.GetHonorTimeStampsOk() + return ok } // SetHonorTimeStamps gets a reference to the given bool and assigns it to the HonorTimeStamps field. -func (o *Job) SetHonorTimeStamps(v *bool) { - o.HonorTimeStamps = v +func (o *Job) SetHonorTimeStamps(v JobgetHonorTimeStampsRetType) { + setJobgetHonorTimeStampsAttributeType(&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 +func (o *Job) GetHttpSdConfigs() (res JobGetHttpSdConfigsRetType) { + res, _ = o.GetHttpSdConfigsOk() + return } // 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 +func (o *Job) GetHttpSdConfigsOk() (ret JobGetHttpSdConfigsRetType, ok bool) { + return getJobGetHttpSdConfigsAttributeTypeOk(o.HttpSdConfigs) } // 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 + _, ok := o.GetHttpSdConfigsOk() + return ok } // SetHttpSdConfigs gets a reference to the given []HTTPServiceSD and assigns it to the HttpSdConfigs field. -func (o *Job) SetHttpSdConfigs(v *[]HTTPServiceSD) { - o.HttpSdConfigs = v +func (o *Job) SetHttpSdConfigs(v JobGetHttpSdConfigsRetType) { + setJobGetHttpSdConfigsAttributeType(&o.HttpSdConfigs, v) } // GetJobName returns the JobName field value -func (o *Job) GetJobName() *string { - if o == nil || IsNil(o.JobName) { - var ret *string - return ret - } - - return o.JobName +func (o *Job) GetJobName() (ret JobGetJobNameRetType) { + ret, _ = o.GetJobNameOk() + return ret } // 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 +func (o *Job) GetJobNameOk() (ret JobGetJobNameRetType, ok bool) { + return getJobGetJobNameAttributeTypeOk(o.JobName) } // SetJobName sets field value -func (o *Job) SetJobName(v *string) { - o.JobName = v +func (o *Job) SetJobName(v JobGetJobNameRetType) { + setJobGetJobNameAttributeType(&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 +func (o *Job) GetMetricsPath() (res JobGetMetricsPathRetType) { + res, _ = o.GetMetricsPathOk() + return } // 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 +func (o *Job) GetMetricsPathOk() (ret JobGetMetricsPathRetType, ok bool) { + return getJobGetMetricsPathAttributeTypeOk(o.MetricsPath) } // 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 + _, ok := o.GetMetricsPathOk() + return ok } // SetMetricsPath gets a reference to the given string and assigns it to the MetricsPath field. -func (o *Job) SetMetricsPath(v *string) { - o.MetricsPath = v +func (o *Job) SetMetricsPath(v JobGetMetricsPathRetType) { + setJobGetMetricsPathAttributeType(&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 +func (o *Job) GetMetricsRelabelConfigs() (res JobGetMetricsRelabelConfigsRetType) { + res, _ = o.GetMetricsRelabelConfigsOk() + return } // 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 +func (o *Job) GetMetricsRelabelConfigsOk() (ret JobGetMetricsRelabelConfigsRetType, ok bool) { + return getJobGetMetricsRelabelConfigsAttributeTypeOk(o.MetricsRelabelConfigs) } // 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 + _, ok := o.GetMetricsRelabelConfigsOk() + return ok } // SetMetricsRelabelConfigs gets a reference to the given []MetricsRelabelConfig and assigns it to the MetricsRelabelConfigs field. -func (o *Job) SetMetricsRelabelConfigs(v *[]MetricsRelabelConfig) { - o.MetricsRelabelConfigs = v +func (o *Job) SetMetricsRelabelConfigs(v JobGetMetricsRelabelConfigsRetType) { + setJobGetMetricsRelabelConfigsAttributeType(&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 +func (o *Job) GetOauth2() (res JobGetOauth2RetType) { + res, _ = o.GetOauth2Ok() + return } // 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 +func (o *Job) GetOauth2Ok() (ret JobGetOauth2RetType, ok bool) { + return getJobGetOauth2AttributeTypeOk(o.Oauth2) } // 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 + _, ok := o.GetOauth2Ok() + return ok } // SetOauth2 gets a reference to the given OAuth2 and assigns it to the Oauth2 field. -func (o *Job) SetOauth2(v *OAuth2) { - o.Oauth2 = v +func (o *Job) SetOauth2(v JobGetOauth2RetType) { + setJobGetOauth2AttributeType(&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 +func (o *Job) GetParams() (res JobGetParamsRetType) { + res, _ = o.GetParamsOk() + return } // 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 +func (o *Job) GetParamsOk() (ret JobGetParamsRetType, ok bool) { + return getJobGetParamsAttributeTypeOk(o.Params) } // 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 + _, ok := o.GetParamsOk() + return ok } // 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 +func (o *Job) SetParams(v JobGetParamsRetType) { + setJobGetParamsAttributeType(&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 +func (o *Job) GetSampleLimit() (res JobGetSampleLimitRetType) { + res, _ = o.GetSampleLimitOk() + return } // 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 +func (o *Job) GetSampleLimitOk() (ret JobGetSampleLimitRetType, ok bool) { + return getJobGetSampleLimitAttributeTypeOk(o.SampleLimit) } // 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 + _, ok := o.GetSampleLimitOk() + return ok } // SetSampleLimit gets a reference to the given int64 and assigns it to the SampleLimit field. -func (o *Job) SetSampleLimit(v *int64) { - o.SampleLimit = v +func (o *Job) SetSampleLimit(v JobGetSampleLimitRetType) { + setJobGetSampleLimitAttributeType(&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 +func (o *Job) GetScheme() (res JobGetSchemeRetType) { + res, _ = o.GetSchemeOk() + return } // 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 +func (o *Job) GetSchemeOk() (ret JobGetSchemeRetType, ok bool) { + return getJobGetSchemeAttributeTypeOk(o.Scheme) } // 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 + _, ok := o.GetSchemeOk() + return ok } // SetScheme gets a reference to the given string and assigns it to the Scheme field. -func (o *Job) SetScheme(v *string) { - o.Scheme = v +func (o *Job) SetScheme(v JobGetSchemeRetType) { + setJobGetSchemeAttributeType(&o.Scheme, v) } // GetScrapeInterval returns the ScrapeInterval field value -func (o *Job) GetScrapeInterval() *string { - if o == nil || IsNil(o.ScrapeInterval) { - var ret *string - return ret - } - - return o.ScrapeInterval +func (o *Job) GetScrapeInterval() (ret JobGetScrapeIntervalRetType) { + ret, _ = o.GetScrapeIntervalOk() + return ret } // 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 +func (o *Job) GetScrapeIntervalOk() (ret JobGetScrapeIntervalRetType, ok bool) { + return getJobGetScrapeIntervalAttributeTypeOk(o.ScrapeInterval) } // SetScrapeInterval sets field value -func (o *Job) SetScrapeInterval(v *string) { - o.ScrapeInterval = v +func (o *Job) SetScrapeInterval(v JobGetScrapeIntervalRetType) { + setJobGetScrapeIntervalAttributeType(&o.ScrapeInterval, v) } // GetScrapeTimeout returns the ScrapeTimeout field value -func (o *Job) GetScrapeTimeout() *string { - if o == nil || IsNil(o.ScrapeTimeout) { - var ret *string - return ret - } - - return o.ScrapeTimeout +func (o *Job) GetScrapeTimeout() (ret JobGetScrapeTimeoutRetType) { + ret, _ = o.GetScrapeTimeoutOk() + return ret } // 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 +func (o *Job) GetScrapeTimeoutOk() (ret JobGetScrapeTimeoutRetType, ok bool) { + return getJobGetScrapeTimeoutAttributeTypeOk(o.ScrapeTimeout) } // SetScrapeTimeout sets field value -func (o *Job) SetScrapeTimeout(v *string) { - o.ScrapeTimeout = v +func (o *Job) SetScrapeTimeout(v JobGetScrapeTimeoutRetType) { + setJobGetScrapeTimeoutAttributeType(&o.ScrapeTimeout, v) } // GetStaticConfigs returns the StaticConfigs field value -func (o *Job) GetStaticConfigs() *[]StaticConfigs { - if o == nil || IsNil(o.StaticConfigs) { - var ret *[]StaticConfigs - return ret - } - - return o.StaticConfigs +func (o *Job) GetStaticConfigs() (ret JobGetStaticConfigsRetType) { + ret, _ = o.GetStaticConfigsOk() + return ret } // 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 +func (o *Job) GetStaticConfigsOk() (ret JobGetStaticConfigsRetType, ok bool) { + return getJobGetStaticConfigsAttributeTypeOk(o.StaticConfigs) } // SetStaticConfigs sets field value -func (o *Job) SetStaticConfigs(v *[]StaticConfigs) { - o.StaticConfigs = v +func (o *Job) SetStaticConfigs(v JobGetStaticConfigsRetType) { + setJobGetStaticConfigsAttributeType(&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 +func (o *Job) GetTlsConfig() (res JobGetTlsConfigRetType) { + res, _ = o.GetTlsConfigOk() + return } // 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 +func (o *Job) GetTlsConfigOk() (ret JobGetTlsConfigRetType, ok bool) { + return getJobGetTlsConfigAttributeTypeOk(o.TlsConfig) } // 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 + _, ok := o.GetTlsConfigOk() + return ok } // 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) SetTlsConfig(v JobGetTlsConfigRetType) { + setJobGetTlsConfigAttributeType(&o.TlsConfig, v) } func (o Job) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.BasicAuth) { - toSerialize["basicAuth"] = o.BasicAuth + if val, ok := getJobGetBasicAuthAttributeTypeOk(o.BasicAuth); ok { + toSerialize["BasicAuth"] = val + } + if val, ok := getJobGetBearerTokenAttributeTypeOk(o.BearerToken); ok { + toSerialize["BearerToken"] = val + } + if val, ok := getJobgetHonorLabelsAttributeTypeOk(o.HonorLabels); ok { + toSerialize["HonorLabels"] = val + } + if val, ok := getJobgetHonorTimeStampsAttributeTypeOk(o.HonorTimeStamps); ok { + toSerialize["HonorTimeStamps"] = val + } + if val, ok := getJobGetHttpSdConfigsAttributeTypeOk(o.HttpSdConfigs); ok { + toSerialize["HttpSdConfigs"] = val } - if !IsNil(o.BearerToken) { - toSerialize["bearerToken"] = o.BearerToken + if val, ok := getJobGetJobNameAttributeTypeOk(o.JobName); ok { + toSerialize["JobName"] = val } - if !IsNil(o.HonorLabels) { - toSerialize["honorLabels"] = o.HonorLabels + if val, ok := getJobGetMetricsPathAttributeTypeOk(o.MetricsPath); ok { + toSerialize["MetricsPath"] = val } - if !IsNil(o.HonorTimeStamps) { - toSerialize["honorTimeStamps"] = o.HonorTimeStamps + if val, ok := getJobGetMetricsRelabelConfigsAttributeTypeOk(o.MetricsRelabelConfigs); ok { + toSerialize["MetricsRelabelConfigs"] = val } - if !IsNil(o.HttpSdConfigs) { - toSerialize["httpSdConfigs"] = o.HttpSdConfigs + if val, ok := getJobGetOauth2AttributeTypeOk(o.Oauth2); ok { + toSerialize["Oauth2"] = val } - toSerialize["jobName"] = o.JobName - if !IsNil(o.MetricsPath) { - toSerialize["metricsPath"] = o.MetricsPath + if val, ok := getJobGetParamsAttributeTypeOk(o.Params); ok { + toSerialize["Params"] = val } - if !IsNil(o.MetricsRelabelConfigs) { - toSerialize["metricsRelabelConfigs"] = o.MetricsRelabelConfigs + if val, ok := getJobGetSampleLimitAttributeTypeOk(o.SampleLimit); ok { + toSerialize["SampleLimit"] = val } - if !IsNil(o.Oauth2) { - toSerialize["oauth2"] = o.Oauth2 + if val, ok := getJobGetSchemeAttributeTypeOk(o.Scheme); ok { + toSerialize["Scheme"] = val } - if !IsNil(o.Params) { - toSerialize["params"] = o.Params + if val, ok := getJobGetScrapeIntervalAttributeTypeOk(o.ScrapeInterval); ok { + toSerialize["ScrapeInterval"] = val } - if !IsNil(o.SampleLimit) { - toSerialize["sampleLimit"] = o.SampleLimit + if val, ok := getJobGetScrapeTimeoutAttributeTypeOk(o.ScrapeTimeout); ok { + toSerialize["ScrapeTimeout"] = val } - if !IsNil(o.Scheme) { - toSerialize["scheme"] = o.Scheme + if val, ok := getJobGetStaticConfigsAttributeTypeOk(o.StaticConfigs); ok { + toSerialize["StaticConfigs"] = val } - toSerialize["scrapeInterval"] = o.ScrapeInterval - toSerialize["scrapeTimeout"] = o.ScrapeTimeout - toSerialize["staticConfigs"] = o.StaticConfigs - if !IsNil(o.TlsConfig) { - toSerialize["tlsConfig"] = o.TlsConfig + if val, ok := getJobGetTlsConfigAttributeTypeOk(o.TlsConfig); ok { + toSerialize["TlsConfig"] = val } return toSerialize, nil } diff --git a/services/observability/model_list_acl_response.go b/services/observability/model_list_acl_response.go index 4d0af3398..4991987e8 100644 --- a/services/observability/model_list_acl_response.go +++ b/services/observability/model_list_acl_response.go @@ -17,12 +17,53 @@ import ( // checks if the ListACLResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListACLResponse{} +/* + types and functions for acl +*/ + +// isArray +type ListACLResponseGetAclAttributeType = *[]string +type ListACLResponseGetAclArgType = []string +type ListACLResponseGetAclRetType = []string + +func getListACLResponseGetAclAttributeTypeOk(arg ListACLResponseGetAclAttributeType) (ret ListACLResponseGetAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListACLResponseGetAclAttributeType(arg *ListACLResponseGetAclAttributeType, val ListACLResponseGetAclRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ListACLResponseGetMessageAttributeType = *string + +func getListACLResponseGetMessageAttributeTypeOk(arg ListACLResponseGetMessageAttributeType) (ret ListACLResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListACLResponseGetMessageAttributeType(arg *ListACLResponseGetMessageAttributeType, val ListACLResponseGetMessageRetType) { + *arg = &val +} + +type ListACLResponseGetMessageArgType = string +type ListACLResponseGetMessageRetType = string + // ListACLResponse struct for ListACLResponse type ListACLResponse struct { // REQUIRED - Acl *[]string `json:"acl"` + Acl ListACLResponseGetAclAttributeType `json:"acl"` // REQUIRED - Message *string `json:"message"` + Message ListACLResponseGetMessageAttributeType `json:"message"` } type _ListACLResponse ListACLResponse @@ -31,10 +72,10 @@ type _ListACLResponse ListACLResponse // 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 { +func NewListACLResponse(acl ListACLResponseGetAclArgType, message ListACLResponseGetMessageArgType) *ListACLResponse { this := ListACLResponse{} - this.Acl = acl - this.Message = message + setListACLResponseGetAclAttributeType(&this.Acl, acl) + setListACLResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewListACLResponseWithDefaults() *ListACLResponse { } // GetAcl returns the Acl field value -func (o *ListACLResponse) GetAcl() *[]string { - if o == nil || IsNil(o.Acl) { - var ret *[]string - return ret - } - - return o.Acl +func (o *ListACLResponse) GetAcl() (ret ListACLResponseGetAclRetType) { + ret, _ = o.GetAclOk() + return ret } // 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 +func (o *ListACLResponse) GetAclOk() (ret ListACLResponseGetAclRetType, ok bool) { + return getListACLResponseGetAclAttributeTypeOk(o.Acl) } // SetAcl sets field value -func (o *ListACLResponse) SetAcl(v *[]string) { - o.Acl = v +func (o *ListACLResponse) SetAcl(v ListACLResponseGetAclRetType) { + setListACLResponseGetAclAttributeType(&o.Acl, v) } // GetMessage returns the Message field value -func (o *ListACLResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *ListACLResponse) GetMessage() (ret ListACLResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *ListACLResponse) GetMessageOk() (ret ListACLResponseGetMessageRetType, ok bool) { + return getListACLResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *ListACLResponse) SetMessage(v *string) { - o.Message = v +func (o *ListACLResponse) SetMessage(v ListACLResponseGetMessageRetType) { + setListACLResponseGetMessageAttributeType(&o.Message, v) } func (o ListACLResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["acl"] = o.Acl - toSerialize["message"] = o.Message + if val, ok := getListACLResponseGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val + } + if val, ok := getListACLResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_list_credentials_response.go b/services/observability/model_list_credentials_response.go index ee7c7f1a2..8d32bc202 100644 --- a/services/observability/model_list_credentials_response.go +++ b/services/observability/model_list_credentials_response.go @@ -17,12 +17,53 @@ import ( // checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListCredentialsResponse{} +/* + types and functions for credentials +*/ + +// isArray +type ListCredentialsResponseGetCredentialsAttributeType = *[]ServiceKeysList +type ListCredentialsResponseGetCredentialsArgType = []ServiceKeysList +type ListCredentialsResponseGetCredentialsRetType = []ServiceKeysList + +func getListCredentialsResponseGetCredentialsAttributeTypeOk(arg ListCredentialsResponseGetCredentialsAttributeType) (ret ListCredentialsResponseGetCredentialsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCredentialsResponseGetCredentialsAttributeType(arg *ListCredentialsResponseGetCredentialsAttributeType, val ListCredentialsResponseGetCredentialsRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ListCredentialsResponseGetMessageAttributeType = *string + +func getListCredentialsResponseGetMessageAttributeTypeOk(arg ListCredentialsResponseGetMessageAttributeType) (ret ListCredentialsResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCredentialsResponseGetMessageAttributeType(arg *ListCredentialsResponseGetMessageAttributeType, val ListCredentialsResponseGetMessageRetType) { + *arg = &val +} + +type ListCredentialsResponseGetMessageArgType = string +type ListCredentialsResponseGetMessageRetType = string + // ListCredentialsResponse struct for ListCredentialsResponse type ListCredentialsResponse struct { // REQUIRED - Credentials *[]ServiceKeysList `json:"credentials"` + Credentials ListCredentialsResponseGetCredentialsAttributeType `json:"credentials"` // REQUIRED - Message *string `json:"message"` + Message ListCredentialsResponseGetMessageAttributeType `json:"message"` } type _ListCredentialsResponse ListCredentialsResponse @@ -31,10 +72,10 @@ type _ListCredentialsResponse ListCredentialsResponse // 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 { +func NewListCredentialsResponse(credentials ListCredentialsResponseGetCredentialsArgType, message ListCredentialsResponseGetMessageArgType) *ListCredentialsResponse { this := ListCredentialsResponse{} - this.Credentials = credentials - this.Message = message + setListCredentialsResponseGetCredentialsAttributeType(&this.Credentials, credentials) + setListCredentialsResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewListCredentialsResponseWithDefaults() *ListCredentialsResponse { } // GetCredentials returns the Credentials field value -func (o *ListCredentialsResponse) GetCredentials() *[]ServiceKeysList { - if o == nil || IsNil(o.Credentials) { - var ret *[]ServiceKeysList - return ret - } - - return o.Credentials +func (o *ListCredentialsResponse) GetCredentials() (ret ListCredentialsResponseGetCredentialsRetType) { + ret, _ = o.GetCredentialsOk() + return ret } // 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 +func (o *ListCredentialsResponse) GetCredentialsOk() (ret ListCredentialsResponseGetCredentialsRetType, ok bool) { + return getListCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials) } // SetCredentials sets field value -func (o *ListCredentialsResponse) SetCredentials(v *[]ServiceKeysList) { - o.Credentials = v +func (o *ListCredentialsResponse) SetCredentials(v ListCredentialsResponseGetCredentialsRetType) { + setListCredentialsResponseGetCredentialsAttributeType(&o.Credentials, v) } // GetMessage returns the Message field value -func (o *ListCredentialsResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *ListCredentialsResponse) GetMessage() (ret ListCredentialsResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *ListCredentialsResponse) GetMessageOk() (ret ListCredentialsResponseGetMessageRetType, ok bool) { + return getListCredentialsResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *ListCredentialsResponse) SetMessage(v *string) { - o.Message = v +func (o *ListCredentialsResponse) SetMessage(v ListCredentialsResponseGetMessageRetType) { + setListCredentialsResponseGetMessageAttributeType(&o.Message, v) } func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["credentials"] = o.Credentials - toSerialize["message"] = o.Message + if val, ok := getListCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials); ok { + toSerialize["Credentials"] = val + } + if val, ok := getListCredentialsResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_list_instances_response.go b/services/observability/model_list_instances_response.go index 258d05e2e..1f9ae0940 100644 --- a/services/observability/model_list_instances_response.go +++ b/services/observability/model_list_instances_response.go @@ -17,12 +17,53 @@ import ( // checks if the ListInstancesResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListInstancesResponse{} +/* + types and functions for instances +*/ + +// isArray +type ListInstancesResponseGetInstancesAttributeType = *[]ProjectInstanceFull +type ListInstancesResponseGetInstancesArgType = []ProjectInstanceFull +type ListInstancesResponseGetInstancesRetType = []ProjectInstanceFull + +func getListInstancesResponseGetInstancesAttributeTypeOk(arg ListInstancesResponseGetInstancesAttributeType) (ret ListInstancesResponseGetInstancesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListInstancesResponseGetInstancesAttributeType(arg *ListInstancesResponseGetInstancesAttributeType, val ListInstancesResponseGetInstancesRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ListInstancesResponseGetMessageAttributeType = *string + +func getListInstancesResponseGetMessageAttributeTypeOk(arg ListInstancesResponseGetMessageAttributeType) (ret ListInstancesResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListInstancesResponseGetMessageAttributeType(arg *ListInstancesResponseGetMessageAttributeType, val ListInstancesResponseGetMessageRetType) { + *arg = &val +} + +type ListInstancesResponseGetMessageArgType = string +type ListInstancesResponseGetMessageRetType = string + // ListInstancesResponse struct for ListInstancesResponse type ListInstancesResponse struct { // REQUIRED - Instances *[]ProjectInstanceFull `json:"instances"` + Instances ListInstancesResponseGetInstancesAttributeType `json:"instances"` // REQUIRED - Message *string `json:"message"` + Message ListInstancesResponseGetMessageAttributeType `json:"message"` } type _ListInstancesResponse ListInstancesResponse @@ -31,10 +72,10 @@ type _ListInstancesResponse ListInstancesResponse // 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 { +func NewListInstancesResponse(instances ListInstancesResponseGetInstancesArgType, message ListInstancesResponseGetMessageArgType) *ListInstancesResponse { this := ListInstancesResponse{} - this.Instances = instances - this.Message = message + setListInstancesResponseGetInstancesAttributeType(&this.Instances, instances) + setListInstancesResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewListInstancesResponseWithDefaults() *ListInstancesResponse { } // GetInstances returns the Instances field value -func (o *ListInstancesResponse) GetInstances() *[]ProjectInstanceFull { - if o == nil || IsNil(o.Instances) { - var ret *[]ProjectInstanceFull - return ret - } - - return o.Instances +func (o *ListInstancesResponse) GetInstances() (ret ListInstancesResponseGetInstancesRetType) { + ret, _ = o.GetInstancesOk() + return ret } // 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 +func (o *ListInstancesResponse) GetInstancesOk() (ret ListInstancesResponseGetInstancesRetType, ok bool) { + return getListInstancesResponseGetInstancesAttributeTypeOk(o.Instances) } // SetInstances sets field value -func (o *ListInstancesResponse) SetInstances(v *[]ProjectInstanceFull) { - o.Instances = v +func (o *ListInstancesResponse) SetInstances(v ListInstancesResponseGetInstancesRetType) { + setListInstancesResponseGetInstancesAttributeType(&o.Instances, v) } // GetMessage returns the Message field value -func (o *ListInstancesResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *ListInstancesResponse) GetMessage() (ret ListInstancesResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *ListInstancesResponse) GetMessageOk() (ret ListInstancesResponseGetMessageRetType, ok bool) { + return getListInstancesResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *ListInstancesResponse) SetMessage(v *string) { - o.Message = v +func (o *ListInstancesResponse) SetMessage(v ListInstancesResponseGetMessageRetType) { + setListInstancesResponseGetMessageAttributeType(&o.Message, v) } func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["instances"] = o.Instances - toSerialize["message"] = o.Message + if val, ok := getListInstancesResponseGetInstancesAttributeTypeOk(o.Instances); ok { + toSerialize["Instances"] = val + } + if val, ok := getListInstancesResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_list_scrape_configs_response.go b/services/observability/model_list_scrape_configs_response.go index b084287eb..e59d9c417 100644 --- a/services/observability/model_list_scrape_configs_response.go +++ b/services/observability/model_list_scrape_configs_response.go @@ -17,12 +17,53 @@ import ( // checks if the ListScrapeConfigsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListScrapeConfigsResponse{} +/* + types and functions for data +*/ + +// isArray +type ListScrapeConfigsResponseGetDataAttributeType = *[]Job +type ListScrapeConfigsResponseGetDataArgType = []Job +type ListScrapeConfigsResponseGetDataRetType = []Job + +func getListScrapeConfigsResponseGetDataAttributeTypeOk(arg ListScrapeConfigsResponseGetDataAttributeType) (ret ListScrapeConfigsResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListScrapeConfigsResponseGetDataAttributeType(arg *ListScrapeConfigsResponseGetDataAttributeType, val ListScrapeConfigsResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ListScrapeConfigsResponseGetMessageAttributeType = *string + +func getListScrapeConfigsResponseGetMessageAttributeTypeOk(arg ListScrapeConfigsResponseGetMessageAttributeType) (ret ListScrapeConfigsResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListScrapeConfigsResponseGetMessageAttributeType(arg *ListScrapeConfigsResponseGetMessageAttributeType, val ListScrapeConfigsResponseGetMessageRetType) { + *arg = &val +} + +type ListScrapeConfigsResponseGetMessageArgType = string +type ListScrapeConfigsResponseGetMessageRetType = string + // ListScrapeConfigsResponse struct for ListScrapeConfigsResponse type ListScrapeConfigsResponse struct { // REQUIRED - Data *[]Job `json:"data"` + Data ListScrapeConfigsResponseGetDataAttributeType `json:"data"` // REQUIRED - Message *string `json:"message"` + Message ListScrapeConfigsResponseGetMessageAttributeType `json:"message"` } type _ListScrapeConfigsResponse ListScrapeConfigsResponse @@ -31,10 +72,10 @@ type _ListScrapeConfigsResponse ListScrapeConfigsResponse // 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 { +func NewListScrapeConfigsResponse(data ListScrapeConfigsResponseGetDataArgType, message ListScrapeConfigsResponseGetMessageArgType) *ListScrapeConfigsResponse { this := ListScrapeConfigsResponse{} - this.Data = data - this.Message = message + setListScrapeConfigsResponseGetDataAttributeType(&this.Data, data) + setListScrapeConfigsResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewListScrapeConfigsResponseWithDefaults() *ListScrapeConfigsResponse { } // GetData returns the Data field value -func (o *ListScrapeConfigsResponse) GetData() *[]Job { - if o == nil || IsNil(o.Data) { - var ret *[]Job - return ret - } - - return o.Data +func (o *ListScrapeConfigsResponse) GetData() (ret ListScrapeConfigsResponseGetDataRetType) { + ret, _ = o.GetDataOk() + return ret } // 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 +func (o *ListScrapeConfigsResponse) GetDataOk() (ret ListScrapeConfigsResponseGetDataRetType, ok bool) { + return getListScrapeConfigsResponseGetDataAttributeTypeOk(o.Data) } // SetData sets field value -func (o *ListScrapeConfigsResponse) SetData(v *[]Job) { - o.Data = v +func (o *ListScrapeConfigsResponse) SetData(v ListScrapeConfigsResponseGetDataRetType) { + setListScrapeConfigsResponseGetDataAttributeType(&o.Data, v) } // GetMessage returns the Message field value -func (o *ListScrapeConfigsResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *ListScrapeConfigsResponse) GetMessage() (ret ListScrapeConfigsResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *ListScrapeConfigsResponse) GetMessageOk() (ret ListScrapeConfigsResponseGetMessageRetType, ok bool) { + return getListScrapeConfigsResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *ListScrapeConfigsResponse) SetMessage(v *string) { - o.Message = v +func (o *ListScrapeConfigsResponse) SetMessage(v ListScrapeConfigsResponseGetMessageRetType) { + setListScrapeConfigsResponseGetMessageAttributeType(&o.Message, v) } func (o ListScrapeConfigsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["data"] = o.Data - toSerialize["message"] = o.Message + if val, ok := getListScrapeConfigsResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getListScrapeConfigsResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_message.go b/services/observability/model_message.go index 408404dae..476881e5d 100644 --- a/services/observability/model_message.go +++ b/services/observability/model_message.go @@ -17,10 +17,31 @@ import ( // checks if the Message type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Message{} +/* + types and functions for message +*/ + +// isNotNullableString +type MessageGetMessageAttributeType = *string + +func getMessageGetMessageAttributeTypeOk(arg MessageGetMessageAttributeType) (ret MessageGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMessageGetMessageAttributeType(arg *MessageGetMessageAttributeType, val MessageGetMessageRetType) { + *arg = &val +} + +type MessageGetMessageArgType = string +type MessageGetMessageRetType = string + // Message struct for Message type Message struct { // REQUIRED - Message *string `json:"message"` + Message MessageGetMessageAttributeType `json:"message"` } type _Message Message @@ -29,9 +50,9 @@ type _Message Message // 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 { +func NewMessage(message MessageGetMessageArgType) *Message { this := Message{} - this.Message = message + setMessageGetMessageAttributeType(&this.Message, message) return &this } @@ -44,32 +65,27 @@ func NewMessageWithDefaults() *Message { } // GetMessage returns the Message field value -func (o *Message) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *Message) GetMessage() (ret MessageGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *Message) GetMessageOk() (ret MessageGetMessageRetType, ok bool) { + return getMessageGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *Message) SetMessage(v *string) { - o.Message = v +func (o *Message) SetMessage(v MessageGetMessageRetType) { + setMessageGetMessageAttributeType(&o.Message, v) } func (o Message) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message + if val, ok := getMessageGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_metrics_relabel_config.go b/services/observability/model_metrics_relabel_config.go index 63a235d52..235465f1a 100644 --- a/services/observability/model_metrics_relabel_config.go +++ b/services/observability/model_metrics_relabel_config.go @@ -17,16 +17,160 @@ import ( // checks if the MetricsRelabelConfig type satisfies the MappedNullable interface at compile time var _ MappedNullable = &MetricsRelabelConfig{} +/* + types and functions for action +*/ + +// isEnumRef +type MetricsRelabelConfigGetActionAttributeType = *string +type MetricsRelabelConfigGetActionArgType = string +type MetricsRelabelConfigGetActionRetType = string + +func getMetricsRelabelConfigGetActionAttributeTypeOk(arg MetricsRelabelConfigGetActionAttributeType) (ret MetricsRelabelConfigGetActionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMetricsRelabelConfigGetActionAttributeType(arg *MetricsRelabelConfigGetActionAttributeType, val MetricsRelabelConfigGetActionRetType) { + *arg = &val +} + +/* + types and functions for modulus +*/ + +// isInteger +type MetricsRelabelConfigGetModulusAttributeType = *int64 +type MetricsRelabelConfigGetModulusArgType = int64 +type MetricsRelabelConfigGetModulusRetType = int64 + +func getMetricsRelabelConfigGetModulusAttributeTypeOk(arg MetricsRelabelConfigGetModulusAttributeType) (ret MetricsRelabelConfigGetModulusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMetricsRelabelConfigGetModulusAttributeType(arg *MetricsRelabelConfigGetModulusAttributeType, val MetricsRelabelConfigGetModulusRetType) { + *arg = &val +} + +/* + types and functions for regex +*/ + +// isNotNullableString +type MetricsRelabelConfigGetRegexAttributeType = *string + +func getMetricsRelabelConfigGetRegexAttributeTypeOk(arg MetricsRelabelConfigGetRegexAttributeType) (ret MetricsRelabelConfigGetRegexRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMetricsRelabelConfigGetRegexAttributeType(arg *MetricsRelabelConfigGetRegexAttributeType, val MetricsRelabelConfigGetRegexRetType) { + *arg = &val +} + +type MetricsRelabelConfigGetRegexArgType = string +type MetricsRelabelConfigGetRegexRetType = string + +/* + types and functions for replacement +*/ + +// isNotNullableString +type MetricsRelabelConfigGetReplacementAttributeType = *string + +func getMetricsRelabelConfigGetReplacementAttributeTypeOk(arg MetricsRelabelConfigGetReplacementAttributeType) (ret MetricsRelabelConfigGetReplacementRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMetricsRelabelConfigGetReplacementAttributeType(arg *MetricsRelabelConfigGetReplacementAttributeType, val MetricsRelabelConfigGetReplacementRetType) { + *arg = &val +} + +type MetricsRelabelConfigGetReplacementArgType = string +type MetricsRelabelConfigGetReplacementRetType = string + +/* + types and functions for separator +*/ + +// isNotNullableString +type MetricsRelabelConfigGetSeparatorAttributeType = *string + +func getMetricsRelabelConfigGetSeparatorAttributeTypeOk(arg MetricsRelabelConfigGetSeparatorAttributeType) (ret MetricsRelabelConfigGetSeparatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMetricsRelabelConfigGetSeparatorAttributeType(arg *MetricsRelabelConfigGetSeparatorAttributeType, val MetricsRelabelConfigGetSeparatorRetType) { + *arg = &val +} + +type MetricsRelabelConfigGetSeparatorArgType = string +type MetricsRelabelConfigGetSeparatorRetType = string + +/* + types and functions for sourceLabels +*/ + +// isArray +type MetricsRelabelConfigGetSourceLabelsAttributeType = *[]string +type MetricsRelabelConfigGetSourceLabelsArgType = []string +type MetricsRelabelConfigGetSourceLabelsRetType = []string + +func getMetricsRelabelConfigGetSourceLabelsAttributeTypeOk(arg MetricsRelabelConfigGetSourceLabelsAttributeType) (ret MetricsRelabelConfigGetSourceLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMetricsRelabelConfigGetSourceLabelsAttributeType(arg *MetricsRelabelConfigGetSourceLabelsAttributeType, val MetricsRelabelConfigGetSourceLabelsRetType) { + *arg = &val +} + +/* + types and functions for targetLabel +*/ + +// isNotNullableString +type MetricsRelabelConfigGetTargetLabelAttributeType = *string + +func getMetricsRelabelConfigGetTargetLabelAttributeTypeOk(arg MetricsRelabelConfigGetTargetLabelAttributeType) (ret MetricsRelabelConfigGetTargetLabelRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMetricsRelabelConfigGetTargetLabelAttributeType(arg *MetricsRelabelConfigGetTargetLabelAttributeType, val MetricsRelabelConfigGetTargetLabelRetType) { + *arg = &val +} + +type MetricsRelabelConfigGetTargetLabelArgType = string +type MetricsRelabelConfigGetTargetLabelRetType = string + // MetricsRelabelConfig struct for MetricsRelabelConfig type MetricsRelabelConfig struct { - Action *string `json:"action,omitempty"` - Modulus *int64 `json:"modulus,omitempty"` - Regex *string `json:"regex,omitempty"` - Replacement *string `json:"replacement,omitempty"` - Separator *string `json:"separator,omitempty"` + Action MetricsRelabelConfigGetActionAttributeType `json:"action,omitempty"` + Modulus MetricsRelabelConfigGetModulusAttributeType `json:"modulus,omitempty"` + Regex MetricsRelabelConfigGetRegexAttributeType `json:"regex,omitempty"` + Replacement MetricsRelabelConfigGetReplacementAttributeType `json:"replacement,omitempty"` + Separator MetricsRelabelConfigGetSeparatorAttributeType `json:"separator,omitempty"` // REQUIRED - SourceLabels *[]string `json:"sourceLabels"` - TargetLabel *string `json:"targetLabel,omitempty"` + SourceLabels MetricsRelabelConfigGetSourceLabelsAttributeType `json:"sourceLabels"` + TargetLabel MetricsRelabelConfigGetTargetLabelAttributeType `json:"targetLabel,omitempty"` } type _MetricsRelabelConfig MetricsRelabelConfig @@ -35,17 +179,9 @@ type _MetricsRelabelConfig MetricsRelabelConfig // 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 { +func NewMetricsRelabelConfig(sourceLabels MetricsRelabelConfigGetSourceLabelsArgType) *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 + setMetricsRelabelConfigGetSourceLabelsAttributeType(&this.SourceLabels, sourceLabels) return &this } @@ -66,241 +202,182 @@ func NewMetricsRelabelConfigWithDefaults() *MetricsRelabelConfig { } // 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 +func (o *MetricsRelabelConfig) GetAction() (res MetricsRelabelConfigGetActionRetType) { + res, _ = o.GetActionOk() + return } // 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 +func (o *MetricsRelabelConfig) GetActionOk() (ret MetricsRelabelConfigGetActionRetType, ok bool) { + return getMetricsRelabelConfigGetActionAttributeTypeOk(o.Action) } // 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 + _, ok := o.GetActionOk() + return ok } // SetAction gets a reference to the given string and assigns it to the Action field. -func (o *MetricsRelabelConfig) SetAction(v *string) { - o.Action = v +func (o *MetricsRelabelConfig) SetAction(v MetricsRelabelConfigGetActionRetType) { + setMetricsRelabelConfigGetActionAttributeType(&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 +func (o *MetricsRelabelConfig) GetModulus() (res MetricsRelabelConfigGetModulusRetType) { + res, _ = o.GetModulusOk() + return } // 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 +func (o *MetricsRelabelConfig) GetModulusOk() (ret MetricsRelabelConfigGetModulusRetType, ok bool) { + return getMetricsRelabelConfigGetModulusAttributeTypeOk(o.Modulus) } // 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 + _, ok := o.GetModulusOk() + return ok } // SetModulus gets a reference to the given int64 and assigns it to the Modulus field. -func (o *MetricsRelabelConfig) SetModulus(v *int64) { - o.Modulus = v +func (o *MetricsRelabelConfig) SetModulus(v MetricsRelabelConfigGetModulusRetType) { + setMetricsRelabelConfigGetModulusAttributeType(&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 +func (o *MetricsRelabelConfig) GetRegex() (res MetricsRelabelConfigGetRegexRetType) { + res, _ = o.GetRegexOk() + return } // 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 +func (o *MetricsRelabelConfig) GetRegexOk() (ret MetricsRelabelConfigGetRegexRetType, ok bool) { + return getMetricsRelabelConfigGetRegexAttributeTypeOk(o.Regex) } // 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 + _, ok := o.GetRegexOk() + return ok } // SetRegex gets a reference to the given string and assigns it to the Regex field. -func (o *MetricsRelabelConfig) SetRegex(v *string) { - o.Regex = v +func (o *MetricsRelabelConfig) SetRegex(v MetricsRelabelConfigGetRegexRetType) { + setMetricsRelabelConfigGetRegexAttributeType(&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 +func (o *MetricsRelabelConfig) GetReplacement() (res MetricsRelabelConfigGetReplacementRetType) { + res, _ = o.GetReplacementOk() + return } // 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 +func (o *MetricsRelabelConfig) GetReplacementOk() (ret MetricsRelabelConfigGetReplacementRetType, ok bool) { + return getMetricsRelabelConfigGetReplacementAttributeTypeOk(o.Replacement) } // 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 + _, ok := o.GetReplacementOk() + return ok } // SetReplacement gets a reference to the given string and assigns it to the Replacement field. -func (o *MetricsRelabelConfig) SetReplacement(v *string) { - o.Replacement = v +func (o *MetricsRelabelConfig) SetReplacement(v MetricsRelabelConfigGetReplacementRetType) { + setMetricsRelabelConfigGetReplacementAttributeType(&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 +func (o *MetricsRelabelConfig) GetSeparator() (res MetricsRelabelConfigGetSeparatorRetType) { + res, _ = o.GetSeparatorOk() + return } // 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 +func (o *MetricsRelabelConfig) GetSeparatorOk() (ret MetricsRelabelConfigGetSeparatorRetType, ok bool) { + return getMetricsRelabelConfigGetSeparatorAttributeTypeOk(o.Separator) } // 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 + _, ok := o.GetSeparatorOk() + return ok } // SetSeparator gets a reference to the given string and assigns it to the Separator field. -func (o *MetricsRelabelConfig) SetSeparator(v *string) { - o.Separator = v +func (o *MetricsRelabelConfig) SetSeparator(v MetricsRelabelConfigGetSeparatorRetType) { + setMetricsRelabelConfigGetSeparatorAttributeType(&o.Separator, v) } // GetSourceLabels returns the SourceLabels field value -func (o *MetricsRelabelConfig) GetSourceLabels() *[]string { - if o == nil || IsNil(o.SourceLabels) { - var ret *[]string - return ret - } - - return o.SourceLabels +func (o *MetricsRelabelConfig) GetSourceLabels() (ret MetricsRelabelConfigGetSourceLabelsRetType) { + ret, _ = o.GetSourceLabelsOk() + return ret } // 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 +func (o *MetricsRelabelConfig) GetSourceLabelsOk() (ret MetricsRelabelConfigGetSourceLabelsRetType, ok bool) { + return getMetricsRelabelConfigGetSourceLabelsAttributeTypeOk(o.SourceLabels) } // SetSourceLabels sets field value -func (o *MetricsRelabelConfig) SetSourceLabels(v *[]string) { - o.SourceLabels = v +func (o *MetricsRelabelConfig) SetSourceLabels(v MetricsRelabelConfigGetSourceLabelsRetType) { + setMetricsRelabelConfigGetSourceLabelsAttributeType(&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 +func (o *MetricsRelabelConfig) GetTargetLabel() (res MetricsRelabelConfigGetTargetLabelRetType) { + res, _ = o.GetTargetLabelOk() + return } // 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 +func (o *MetricsRelabelConfig) GetTargetLabelOk() (ret MetricsRelabelConfigGetTargetLabelRetType, ok bool) { + return getMetricsRelabelConfigGetTargetLabelAttributeTypeOk(o.TargetLabel) } // 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 + _, ok := o.GetTargetLabelOk() + return ok } // 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) SetTargetLabel(v MetricsRelabelConfigGetTargetLabelRetType) { + setMetricsRelabelConfigGetTargetLabelAttributeType(&o.TargetLabel, v) } func (o MetricsRelabelConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Action) { - toSerialize["action"] = o.Action + if val, ok := getMetricsRelabelConfigGetActionAttributeTypeOk(o.Action); ok { + toSerialize["Action"] = val + } + if val, ok := getMetricsRelabelConfigGetModulusAttributeTypeOk(o.Modulus); ok { + toSerialize["Modulus"] = val } - if !IsNil(o.Modulus) { - toSerialize["modulus"] = o.Modulus + if val, ok := getMetricsRelabelConfigGetRegexAttributeTypeOk(o.Regex); ok { + toSerialize["Regex"] = val } - if !IsNil(o.Regex) { - toSerialize["regex"] = o.Regex + if val, ok := getMetricsRelabelConfigGetReplacementAttributeTypeOk(o.Replacement); ok { + toSerialize["Replacement"] = val } - if !IsNil(o.Replacement) { - toSerialize["replacement"] = o.Replacement + if val, ok := getMetricsRelabelConfigGetSeparatorAttributeTypeOk(o.Separator); ok { + toSerialize["Separator"] = val } - if !IsNil(o.Separator) { - toSerialize["separator"] = o.Separator + if val, ok := getMetricsRelabelConfigGetSourceLabelsAttributeTypeOk(o.SourceLabels); ok { + toSerialize["SourceLabels"] = val } - toSerialize["sourceLabels"] = o.SourceLabels - if !IsNil(o.TargetLabel) { - toSerialize["targetLabel"] = o.TargetLabel + if val, ok := getMetricsRelabelConfigGetTargetLabelAttributeTypeOk(o.TargetLabel); ok { + toSerialize["TargetLabel"] = val } return toSerialize, nil } diff --git a/services/observability/model_o_auth2.go b/services/observability/model_o_auth2.go index 54142d5a1..4229a9319 100644 --- a/services/observability/model_o_auth2.go +++ b/services/observability/model_o_auth2.go @@ -17,16 +17,119 @@ import ( // checks if the OAuth2 type satisfies the MappedNullable interface at compile time var _ MappedNullable = &OAuth2{} +/* + types and functions for clientId +*/ + +// isNotNullableString +type OAuth2GetClientIdAttributeType = *string + +func getOAuth2GetClientIdAttributeTypeOk(arg OAuth2GetClientIdAttributeType) (ret OAuth2GetClientIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOAuth2GetClientIdAttributeType(arg *OAuth2GetClientIdAttributeType, val OAuth2GetClientIdRetType) { + *arg = &val +} + +type OAuth2GetClientIdArgType = string +type OAuth2GetClientIdRetType = string + +/* + types and functions for clientSecret +*/ + +// isNotNullableString +type OAuth2GetClientSecretAttributeType = *string + +func getOAuth2GetClientSecretAttributeTypeOk(arg OAuth2GetClientSecretAttributeType) (ret OAuth2GetClientSecretRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOAuth2GetClientSecretAttributeType(arg *OAuth2GetClientSecretAttributeType, val OAuth2GetClientSecretRetType) { + *arg = &val +} + +type OAuth2GetClientSecretArgType = string +type OAuth2GetClientSecretRetType = string + +/* + types and functions for scopes +*/ + +// isArray +type OAuth2GetScopesAttributeType = *[]string +type OAuth2GetScopesArgType = []string +type OAuth2GetScopesRetType = []string + +func getOAuth2GetScopesAttributeTypeOk(arg OAuth2GetScopesAttributeType) (ret OAuth2GetScopesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOAuth2GetScopesAttributeType(arg *OAuth2GetScopesAttributeType, val OAuth2GetScopesRetType) { + *arg = &val +} + +/* + types and functions for tlsConfig +*/ + +// isModel +type OAuth2GetTlsConfigAttributeType = *TLSConfig +type OAuth2GetTlsConfigArgType = TLSConfig +type OAuth2GetTlsConfigRetType = TLSConfig + +func getOAuth2GetTlsConfigAttributeTypeOk(arg OAuth2GetTlsConfigAttributeType) (ret OAuth2GetTlsConfigRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOAuth2GetTlsConfigAttributeType(arg *OAuth2GetTlsConfigAttributeType, val OAuth2GetTlsConfigRetType) { + *arg = &val +} + +/* + types and functions for tokenUrl +*/ + +// isNotNullableString +type OAuth2GetTokenUrlAttributeType = *string + +func getOAuth2GetTokenUrlAttributeTypeOk(arg OAuth2GetTokenUrlAttributeType) (ret OAuth2GetTokenUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOAuth2GetTokenUrlAttributeType(arg *OAuth2GetTokenUrlAttributeType, val OAuth2GetTokenUrlRetType) { + *arg = &val +} + +type OAuth2GetTokenUrlArgType = string +type OAuth2GetTokenUrlRetType = string + // OAuth2 struct for OAuth2 type OAuth2 struct { // REQUIRED - ClientId *string `json:"clientId"` + ClientId OAuth2GetClientIdAttributeType `json:"clientId"` // REQUIRED - ClientSecret *string `json:"clientSecret"` - Scopes *[]string `json:"scopes,omitempty"` - TlsConfig *TLSConfig `json:"tlsConfig,omitempty"` + ClientSecret OAuth2GetClientSecretAttributeType `json:"clientSecret"` + Scopes OAuth2GetScopesAttributeType `json:"scopes,omitempty"` + TlsConfig OAuth2GetTlsConfigAttributeType `json:"tlsConfig,omitempty"` // REQUIRED - TokenUrl *string `json:"tokenUrl"` + TokenUrl OAuth2GetTokenUrlAttributeType `json:"tokenUrl"` } type _OAuth2 OAuth2 @@ -35,11 +138,11 @@ type _OAuth2 OAuth2 // 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 { +func NewOAuth2(clientId OAuth2GetClientIdArgType, clientSecret OAuth2GetClientSecretArgType, tokenUrl OAuth2GetTokenUrlArgType) *OAuth2 { this := OAuth2{} - this.ClientId = clientId - this.ClientSecret = clientSecret - this.TokenUrl = tokenUrl + setOAuth2GetClientIdAttributeType(&this.ClientId, clientId) + setOAuth2GetClientSecretAttributeType(&this.ClientSecret, clientSecret) + setOAuth2GetTokenUrlAttributeType(&this.TokenUrl, tokenUrl) return &this } @@ -52,152 +155,119 @@ func NewOAuth2WithDefaults() *OAuth2 { } // GetClientId returns the ClientId field value -func (o *OAuth2) GetClientId() *string { - if o == nil || IsNil(o.ClientId) { - var ret *string - return ret - } - - return o.ClientId +func (o *OAuth2) GetClientId() (ret OAuth2GetClientIdRetType) { + ret, _ = o.GetClientIdOk() + return ret } // 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 +func (o *OAuth2) GetClientIdOk() (ret OAuth2GetClientIdRetType, ok bool) { + return getOAuth2GetClientIdAttributeTypeOk(o.ClientId) } // SetClientId sets field value -func (o *OAuth2) SetClientId(v *string) { - o.ClientId = v +func (o *OAuth2) SetClientId(v OAuth2GetClientIdRetType) { + setOAuth2GetClientIdAttributeType(&o.ClientId, v) } // GetClientSecret returns the ClientSecret field value -func (o *OAuth2) GetClientSecret() *string { - if o == nil || IsNil(o.ClientSecret) { - var ret *string - return ret - } - - return o.ClientSecret +func (o *OAuth2) GetClientSecret() (ret OAuth2GetClientSecretRetType) { + ret, _ = o.GetClientSecretOk() + return ret } // 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 +func (o *OAuth2) GetClientSecretOk() (ret OAuth2GetClientSecretRetType, ok bool) { + return getOAuth2GetClientSecretAttributeTypeOk(o.ClientSecret) } // SetClientSecret sets field value -func (o *OAuth2) SetClientSecret(v *string) { - o.ClientSecret = v +func (o *OAuth2) SetClientSecret(v OAuth2GetClientSecretRetType) { + setOAuth2GetClientSecretAttributeType(&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 +func (o *OAuth2) GetScopes() (res OAuth2GetScopesRetType) { + res, _ = o.GetScopesOk() + return } // 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 +func (o *OAuth2) GetScopesOk() (ret OAuth2GetScopesRetType, ok bool) { + return getOAuth2GetScopesAttributeTypeOk(o.Scopes) } // 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 + _, ok := o.GetScopesOk() + return ok } // SetScopes gets a reference to the given []string and assigns it to the Scopes field. -func (o *OAuth2) SetScopes(v *[]string) { - o.Scopes = v +func (o *OAuth2) SetScopes(v OAuth2GetScopesRetType) { + setOAuth2GetScopesAttributeType(&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 +func (o *OAuth2) GetTlsConfig() (res OAuth2GetTlsConfigRetType) { + res, _ = o.GetTlsConfigOk() + return } // 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 +func (o *OAuth2) GetTlsConfigOk() (ret OAuth2GetTlsConfigRetType, ok bool) { + return getOAuth2GetTlsConfigAttributeTypeOk(o.TlsConfig) } // 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 + _, ok := o.GetTlsConfigOk() + return ok } // SetTlsConfig gets a reference to the given TLSConfig and assigns it to the TlsConfig field. -func (o *OAuth2) SetTlsConfig(v *TLSConfig) { - o.TlsConfig = v +func (o *OAuth2) SetTlsConfig(v OAuth2GetTlsConfigRetType) { + setOAuth2GetTlsConfigAttributeType(&o.TlsConfig, v) } // GetTokenUrl returns the TokenUrl field value -func (o *OAuth2) GetTokenUrl() *string { - if o == nil || IsNil(o.TokenUrl) { - var ret *string - return ret - } - - return o.TokenUrl +func (o *OAuth2) GetTokenUrl() (ret OAuth2GetTokenUrlRetType) { + ret, _ = o.GetTokenUrlOk() + return ret } // 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 +func (o *OAuth2) GetTokenUrlOk() (ret OAuth2GetTokenUrlRetType, ok bool) { + return getOAuth2GetTokenUrlAttributeTypeOk(o.TokenUrl) } // SetTokenUrl sets field value -func (o *OAuth2) SetTokenUrl(v *string) { - o.TokenUrl = v +func (o *OAuth2) SetTokenUrl(v OAuth2GetTokenUrlRetType) { + setOAuth2GetTokenUrlAttributeType(&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 val, ok := getOAuth2GetClientIdAttributeTypeOk(o.ClientId); ok { + toSerialize["ClientId"] = val + } + if val, ok := getOAuth2GetClientSecretAttributeTypeOk(o.ClientSecret); ok { + toSerialize["ClientSecret"] = val + } + if val, ok := getOAuth2GetScopesAttributeTypeOk(o.Scopes); ok { + toSerialize["Scopes"] = val + } + if val, ok := getOAuth2GetTlsConfigAttributeTypeOk(o.TlsConfig); ok { + toSerialize["TlsConfig"] = val } - if !IsNil(o.TlsConfig) { - toSerialize["tlsConfig"] = o.TlsConfig + if val, ok := getOAuth2GetTokenUrlAttributeTypeOk(o.TokenUrl); ok { + toSerialize["TokenUrl"] = val } - toSerialize["tokenUrl"] = o.TokenUrl return toSerialize, nil } diff --git a/services/observability/model_opsgenie_config.go b/services/observability/model_opsgenie_config.go index ca8f7d2ab..c6d3c753f 100644 --- a/services/observability/model_opsgenie_config.go +++ b/services/observability/model_opsgenie_config.go @@ -17,13 +17,117 @@ import ( // checks if the OpsgenieConfig type satisfies the MappedNullable interface at compile time var _ MappedNullable = &OpsgenieConfig{} +/* + types and functions for apiKey +*/ + +// isNotNullableString +type OpsgenieConfigGetApiKeyAttributeType = *string + +func getOpsgenieConfigGetApiKeyAttributeTypeOk(arg OpsgenieConfigGetApiKeyAttributeType) (ret OpsgenieConfigGetApiKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOpsgenieConfigGetApiKeyAttributeType(arg *OpsgenieConfigGetApiKeyAttributeType, val OpsgenieConfigGetApiKeyRetType) { + *arg = &val +} + +type OpsgenieConfigGetApiKeyArgType = string +type OpsgenieConfigGetApiKeyRetType = string + +/* + types and functions for apiUrl +*/ + +// isNotNullableString +type OpsgenieConfigGetApiUrlAttributeType = *string + +func getOpsgenieConfigGetApiUrlAttributeTypeOk(arg OpsgenieConfigGetApiUrlAttributeType) (ret OpsgenieConfigGetApiUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOpsgenieConfigGetApiUrlAttributeType(arg *OpsgenieConfigGetApiUrlAttributeType, val OpsgenieConfigGetApiUrlRetType) { + *arg = &val +} + +type OpsgenieConfigGetApiUrlArgType = string +type OpsgenieConfigGetApiUrlRetType = string + +/* + types and functions for priority +*/ + +// isNotNullableString +type OpsgenieConfigGetPriorityAttributeType = *string + +func getOpsgenieConfigGetPriorityAttributeTypeOk(arg OpsgenieConfigGetPriorityAttributeType) (ret OpsgenieConfigGetPriorityRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOpsgenieConfigGetPriorityAttributeType(arg *OpsgenieConfigGetPriorityAttributeType, val OpsgenieConfigGetPriorityRetType) { + *arg = &val +} + +type OpsgenieConfigGetPriorityArgType = string +type OpsgenieConfigGetPriorityRetType = string + +/* + types and functions for sendResolved +*/ + +// isBoolean +type OpsgenieConfiggetSendResolvedAttributeType = *bool +type OpsgenieConfiggetSendResolvedArgType = bool +type OpsgenieConfiggetSendResolvedRetType = bool + +func getOpsgenieConfiggetSendResolvedAttributeTypeOk(arg OpsgenieConfiggetSendResolvedAttributeType) (ret OpsgenieConfiggetSendResolvedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOpsgenieConfiggetSendResolvedAttributeType(arg *OpsgenieConfiggetSendResolvedAttributeType, val OpsgenieConfiggetSendResolvedRetType) { + *arg = &val +} + +/* + types and functions for tags +*/ + +// isNotNullableString +type OpsgenieConfigGetTagsAttributeType = *string + +func getOpsgenieConfigGetTagsAttributeTypeOk(arg OpsgenieConfigGetTagsAttributeType) (ret OpsgenieConfigGetTagsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOpsgenieConfigGetTagsAttributeType(arg *OpsgenieConfigGetTagsAttributeType, val OpsgenieConfigGetTagsRetType) { + *arg = &val +} + +type OpsgenieConfigGetTagsArgType = string +type OpsgenieConfigGetTagsRetType = string + // OpsgenieConfig struct for OpsgenieConfig type OpsgenieConfig struct { - ApiKey *string `json:"apiKey,omitempty"` - ApiUrl *string `json:"apiUrl,omitempty"` - Priority *string `json:"priority,omitempty"` - SendResolved *bool `json:"sendResolved,omitempty"` - Tags *string `json:"tags,omitempty"` + ApiKey OpsgenieConfigGetApiKeyAttributeType `json:"apiKey,omitempty"` + ApiUrl OpsgenieConfigGetApiUrlAttributeType `json:"apiUrl,omitempty"` + Priority OpsgenieConfigGetPriorityAttributeType `json:"priority,omitempty"` + SendResolved OpsgenieConfiggetSendResolvedAttributeType `json:"sendResolved,omitempty"` + Tags OpsgenieConfigGetTagsAttributeType `json:"tags,omitempty"` } // NewOpsgenieConfig instantiates a new OpsgenieConfig object @@ -32,8 +136,6 @@ type OpsgenieConfig struct { // will change when the set of required properties is changed func NewOpsgenieConfig() *OpsgenieConfig { this := OpsgenieConfig{} - var sendResolved bool = true - this.SendResolved = &sendResolved return &this } @@ -48,181 +150,136 @@ func NewOpsgenieConfigWithDefaults() *OpsgenieConfig { } // 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 +func (o *OpsgenieConfig) GetApiKey() (res OpsgenieConfigGetApiKeyRetType) { + res, _ = o.GetApiKeyOk() + return } // 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 +func (o *OpsgenieConfig) GetApiKeyOk() (ret OpsgenieConfigGetApiKeyRetType, ok bool) { + return getOpsgenieConfigGetApiKeyAttributeTypeOk(o.ApiKey) } // 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 + _, ok := o.GetApiKeyOk() + return ok } // SetApiKey gets a reference to the given string and assigns it to the ApiKey field. -func (o *OpsgenieConfig) SetApiKey(v *string) { - o.ApiKey = v +func (o *OpsgenieConfig) SetApiKey(v OpsgenieConfigGetApiKeyRetType) { + setOpsgenieConfigGetApiKeyAttributeType(&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 +func (o *OpsgenieConfig) GetApiUrl() (res OpsgenieConfigGetApiUrlRetType) { + res, _ = o.GetApiUrlOk() + return } // 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 +func (o *OpsgenieConfig) GetApiUrlOk() (ret OpsgenieConfigGetApiUrlRetType, ok bool) { + return getOpsgenieConfigGetApiUrlAttributeTypeOk(o.ApiUrl) } // 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 + _, ok := o.GetApiUrlOk() + return ok } // SetApiUrl gets a reference to the given string and assigns it to the ApiUrl field. -func (o *OpsgenieConfig) SetApiUrl(v *string) { - o.ApiUrl = v +func (o *OpsgenieConfig) SetApiUrl(v OpsgenieConfigGetApiUrlRetType) { + setOpsgenieConfigGetApiUrlAttributeType(&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 +func (o *OpsgenieConfig) GetPriority() (res OpsgenieConfigGetPriorityRetType) { + res, _ = o.GetPriorityOk() + return } // 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 +func (o *OpsgenieConfig) GetPriorityOk() (ret OpsgenieConfigGetPriorityRetType, ok bool) { + return getOpsgenieConfigGetPriorityAttributeTypeOk(o.Priority) } // 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 + _, ok := o.GetPriorityOk() + return ok } // SetPriority gets a reference to the given string and assigns it to the Priority field. -func (o *OpsgenieConfig) SetPriority(v *string) { - o.Priority = v +func (o *OpsgenieConfig) SetPriority(v OpsgenieConfigGetPriorityRetType) { + setOpsgenieConfigGetPriorityAttributeType(&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 +func (o *OpsgenieConfig) GetSendResolved() (res OpsgenieConfiggetSendResolvedRetType) { + res, _ = o.GetSendResolvedOk() + return } // 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 +func (o *OpsgenieConfig) GetSendResolvedOk() (ret OpsgenieConfiggetSendResolvedRetType, ok bool) { + return getOpsgenieConfiggetSendResolvedAttributeTypeOk(o.SendResolved) } // 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 + _, ok := o.GetSendResolvedOk() + return ok } // SetSendResolved gets a reference to the given bool and assigns it to the SendResolved field. -func (o *OpsgenieConfig) SetSendResolved(v *bool) { - o.SendResolved = v +func (o *OpsgenieConfig) SetSendResolved(v OpsgenieConfiggetSendResolvedRetType) { + setOpsgenieConfiggetSendResolvedAttributeType(&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 +func (o *OpsgenieConfig) GetTags() (res OpsgenieConfigGetTagsRetType) { + res, _ = o.GetTagsOk() + return } // 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 +func (o *OpsgenieConfig) GetTagsOk() (ret OpsgenieConfigGetTagsRetType, ok bool) { + return getOpsgenieConfigGetTagsAttributeTypeOk(o.Tags) } // 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 + _, ok := o.GetTagsOk() + return ok } // 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) SetTags(v OpsgenieConfigGetTagsRetType) { + setOpsgenieConfigGetTagsAttributeType(&o.Tags, v) } func (o OpsgenieConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ApiKey) { - toSerialize["apiKey"] = o.ApiKey + if val, ok := getOpsgenieConfigGetApiKeyAttributeTypeOk(o.ApiKey); ok { + toSerialize["ApiKey"] = val } - if !IsNil(o.ApiUrl) { - toSerialize["apiUrl"] = o.ApiUrl + if val, ok := getOpsgenieConfigGetApiUrlAttributeTypeOk(o.ApiUrl); ok { + toSerialize["ApiUrl"] = val } - if !IsNil(o.Priority) { - toSerialize["priority"] = o.Priority + if val, ok := getOpsgenieConfigGetPriorityAttributeTypeOk(o.Priority); ok { + toSerialize["Priority"] = val } - if !IsNil(o.SendResolved) { - toSerialize["sendResolved"] = o.SendResolved + if val, ok := getOpsgenieConfiggetSendResolvedAttributeTypeOk(o.SendResolved); ok { + toSerialize["SendResolved"] = val } - if !IsNil(o.Tags) { - toSerialize["tags"] = o.Tags + if val, ok := getOpsgenieConfigGetTagsAttributeTypeOk(o.Tags); ok { + toSerialize["Tags"] = val } return toSerialize, nil } diff --git a/services/observability/model_permission_denied.go b/services/observability/model_permission_denied.go index ff34192fb..92314dfa8 100644 --- a/services/observability/model_permission_denied.go +++ b/services/observability/model_permission_denied.go @@ -17,10 +17,31 @@ import ( // checks if the PermissionDenied type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PermissionDenied{} +/* + types and functions for detail +*/ + +// isNotNullableString +type PermissionDeniedGetDetailAttributeType = *string + +func getPermissionDeniedGetDetailAttributeTypeOk(arg PermissionDeniedGetDetailAttributeType) (ret PermissionDeniedGetDetailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPermissionDeniedGetDetailAttributeType(arg *PermissionDeniedGetDetailAttributeType, val PermissionDeniedGetDetailRetType) { + *arg = &val +} + +type PermissionDeniedGetDetailArgType = string +type PermissionDeniedGetDetailRetType = string + // PermissionDenied struct for PermissionDenied type PermissionDenied struct { // REQUIRED - Detail *string `json:"detail"` + Detail PermissionDeniedGetDetailAttributeType `json:"detail"` } type _PermissionDenied PermissionDenied @@ -29,9 +50,9 @@ type _PermissionDenied PermissionDenied // 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 { +func NewPermissionDenied(detail PermissionDeniedGetDetailArgType) *PermissionDenied { this := PermissionDenied{} - this.Detail = detail + setPermissionDeniedGetDetailAttributeType(&this.Detail, detail) return &this } @@ -44,32 +65,27 @@ func NewPermissionDeniedWithDefaults() *PermissionDenied { } // GetDetail returns the Detail field value -func (o *PermissionDenied) GetDetail() *string { - if o == nil || IsNil(o.Detail) { - var ret *string - return ret - } - - return o.Detail +func (o *PermissionDenied) GetDetail() (ret PermissionDeniedGetDetailRetType) { + ret, _ = o.GetDetailOk() + return ret } // 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 +func (o *PermissionDenied) GetDetailOk() (ret PermissionDeniedGetDetailRetType, ok bool) { + return getPermissionDeniedGetDetailAttributeTypeOk(o.Detail) } // SetDetail sets field value -func (o *PermissionDenied) SetDetail(v *string) { - o.Detail = v +func (o *PermissionDenied) SetDetail(v PermissionDeniedGetDetailRetType) { + setPermissionDeniedGetDetailAttributeType(&o.Detail, v) } func (o PermissionDenied) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["detail"] = o.Detail + if val, ok := getPermissionDeniedGetDetailAttributeTypeOk(o.Detail); ok { + toSerialize["Detail"] = val + } return toSerialize, nil } diff --git a/services/observability/model_plan.go b/services/observability/model_plan.go index 26d0a6532..a8f1ccb3a 100644 --- a/services/observability/model_plan.go +++ b/services/observability/model_plan.go @@ -17,46 +17,491 @@ import ( // checks if the Plan type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Plan{} +/* + types and functions for alertMatchers +*/ + +// isInteger +type PlanGetAlertMatchersAttributeType = *int64 +type PlanGetAlertMatchersArgType = int64 +type PlanGetAlertMatchersRetType = int64 + +func getPlanGetAlertMatchersAttributeTypeOk(arg PlanGetAlertMatchersAttributeType) (ret PlanGetAlertMatchersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetAlertMatchersAttributeType(arg *PlanGetAlertMatchersAttributeType, val PlanGetAlertMatchersRetType) { + *arg = &val +} + +/* + types and functions for alertReceivers +*/ + +// isInteger +type PlanGetAlertReceiversAttributeType = *int64 +type PlanGetAlertReceiversArgType = int64 +type PlanGetAlertReceiversRetType = int64 + +func getPlanGetAlertReceiversAttributeTypeOk(arg PlanGetAlertReceiversAttributeType) (ret PlanGetAlertReceiversRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetAlertReceiversAttributeType(arg *PlanGetAlertReceiversAttributeType, val PlanGetAlertReceiversRetType) { + *arg = &val +} + +/* + types and functions for alertRules +*/ + +// isInteger +type PlanGetAlertRulesAttributeType = *int64 +type PlanGetAlertRulesArgType = int64 +type PlanGetAlertRulesRetType = int64 + +func getPlanGetAlertRulesAttributeTypeOk(arg PlanGetAlertRulesAttributeType) (ret PlanGetAlertRulesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetAlertRulesAttributeType(arg *PlanGetAlertRulesAttributeType, val PlanGetAlertRulesRetType) { + *arg = &val +} + +/* + types and functions for amount +*/ + +// isNumber +type PlanGetAmountAttributeType = *float64 +type PlanGetAmountArgType = float64 +type PlanGetAmountRetType = float64 + +func getPlanGetAmountAttributeTypeOk(arg PlanGetAmountAttributeType) (ret PlanGetAmountRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetAmountAttributeType(arg *PlanGetAmountAttributeType, val PlanGetAmountRetType) { + *arg = &val +} + +/* + types and functions for bucketSize +*/ + +// isInteger +type PlanGetBucketSizeAttributeType = *int64 +type PlanGetBucketSizeArgType = int64 +type PlanGetBucketSizeRetType = int64 + +func getPlanGetBucketSizeAttributeTypeOk(arg PlanGetBucketSizeAttributeType) (ret PlanGetBucketSizeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetBucketSizeAttributeType(arg *PlanGetBucketSizeAttributeType, val PlanGetBucketSizeRetType) { + *arg = &val +} + +/* + types and functions for description +*/ + +// isNotNullableString +type PlanGetDescriptionAttributeType = *string + +func getPlanGetDescriptionAttributeTypeOk(arg PlanGetDescriptionAttributeType) (ret PlanGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetDescriptionAttributeType(arg *PlanGetDescriptionAttributeType, val PlanGetDescriptionRetType) { + *arg = &val +} + +type PlanGetDescriptionArgType = string +type PlanGetDescriptionRetType = string + +/* + types and functions for grafanaGlobalDashboards +*/ + +// isInteger +type PlanGetGrafanaGlobalDashboardsAttributeType = *int64 +type PlanGetGrafanaGlobalDashboardsArgType = int64 +type PlanGetGrafanaGlobalDashboardsRetType = int64 + +func getPlanGetGrafanaGlobalDashboardsAttributeTypeOk(arg PlanGetGrafanaGlobalDashboardsAttributeType) (ret PlanGetGrafanaGlobalDashboardsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetGrafanaGlobalDashboardsAttributeType(arg *PlanGetGrafanaGlobalDashboardsAttributeType, val PlanGetGrafanaGlobalDashboardsRetType) { + *arg = &val +} + +/* + types and functions for grafanaGlobalOrgs +*/ + +// isInteger +type PlanGetGrafanaGlobalOrgsAttributeType = *int64 +type PlanGetGrafanaGlobalOrgsArgType = int64 +type PlanGetGrafanaGlobalOrgsRetType = int64 + +func getPlanGetGrafanaGlobalOrgsAttributeTypeOk(arg PlanGetGrafanaGlobalOrgsAttributeType) (ret PlanGetGrafanaGlobalOrgsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetGrafanaGlobalOrgsAttributeType(arg *PlanGetGrafanaGlobalOrgsAttributeType, val PlanGetGrafanaGlobalOrgsRetType) { + *arg = &val +} + +/* + types and functions for grafanaGlobalSessions +*/ + +// isInteger +type PlanGetGrafanaGlobalSessionsAttributeType = *int64 +type PlanGetGrafanaGlobalSessionsArgType = int64 +type PlanGetGrafanaGlobalSessionsRetType = int64 + +func getPlanGetGrafanaGlobalSessionsAttributeTypeOk(arg PlanGetGrafanaGlobalSessionsAttributeType) (ret PlanGetGrafanaGlobalSessionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetGrafanaGlobalSessionsAttributeType(arg *PlanGetGrafanaGlobalSessionsAttributeType, val PlanGetGrafanaGlobalSessionsRetType) { + *arg = &val +} + +/* + types and functions for grafanaGlobalUsers +*/ + +// isInteger +type PlanGetGrafanaGlobalUsersAttributeType = *int64 +type PlanGetGrafanaGlobalUsersArgType = int64 +type PlanGetGrafanaGlobalUsersRetType = int64 + +func getPlanGetGrafanaGlobalUsersAttributeTypeOk(arg PlanGetGrafanaGlobalUsersAttributeType) (ret PlanGetGrafanaGlobalUsersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetGrafanaGlobalUsersAttributeType(arg *PlanGetGrafanaGlobalUsersAttributeType, val PlanGetGrafanaGlobalUsersRetType) { + *arg = &val +} + +/* + types and functions for id +*/ + +// isNotNullableString +type PlanGetIdAttributeType = *string + +func getPlanGetIdAttributeTypeOk(arg PlanGetIdAttributeType) (ret PlanGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetIdAttributeType(arg *PlanGetIdAttributeType, val PlanGetIdRetType) { + *arg = &val +} + +type PlanGetIdArgType = string +type PlanGetIdRetType = string + +/* + types and functions for isFree +*/ + +// isBoolean +type PlangetIsFreeAttributeType = *bool +type PlangetIsFreeArgType = bool +type PlangetIsFreeRetType = bool + +func getPlangetIsFreeAttributeTypeOk(arg PlangetIsFreeAttributeType) (ret PlangetIsFreeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlangetIsFreeAttributeType(arg *PlangetIsFreeAttributeType, val PlangetIsFreeRetType) { + *arg = &val +} + +/* + types and functions for isPublic +*/ + +// isBoolean +type PlangetIsPublicAttributeType = *bool +type PlangetIsPublicArgType = bool +type PlangetIsPublicRetType = bool + +func getPlangetIsPublicAttributeTypeOk(arg PlangetIsPublicAttributeType) (ret PlangetIsPublicRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlangetIsPublicAttributeType(arg *PlangetIsPublicAttributeType, val PlangetIsPublicRetType) { + *arg = &val +} + +/* + types and functions for logsAlert +*/ + +// isInteger +type PlanGetLogsAlertAttributeType = *int64 +type PlanGetLogsAlertArgType = int64 +type PlanGetLogsAlertRetType = int64 + +func getPlanGetLogsAlertAttributeTypeOk(arg PlanGetLogsAlertAttributeType) (ret PlanGetLogsAlertRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetLogsAlertAttributeType(arg *PlanGetLogsAlertAttributeType, val PlanGetLogsAlertRetType) { + *arg = &val +} + +/* + types and functions for logsStorage +*/ + +// isInteger +type PlanGetLogsStorageAttributeType = *int64 +type PlanGetLogsStorageArgType = int64 +type PlanGetLogsStorageRetType = int64 + +func getPlanGetLogsStorageAttributeTypeOk(arg PlanGetLogsStorageAttributeType) (ret PlanGetLogsStorageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetLogsStorageAttributeType(arg *PlanGetLogsStorageAttributeType, val PlanGetLogsStorageRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type PlanGetNameAttributeType = *string + +func getPlanGetNameAttributeTypeOk(arg PlanGetNameAttributeType) (ret PlanGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetNameAttributeType(arg *PlanGetNameAttributeType, val PlanGetNameRetType) { + *arg = &val +} + +type PlanGetNameArgType = string +type PlanGetNameRetType = string + +/* + types and functions for planId +*/ + +// isNotNullableString +type PlanGetPlanIdAttributeType = *string + +func getPlanGetPlanIdAttributeTypeOk(arg PlanGetPlanIdAttributeType) (ret PlanGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetPlanIdAttributeType(arg *PlanGetPlanIdAttributeType, val PlanGetPlanIdRetType) { + *arg = &val +} + +type PlanGetPlanIdArgType = string +type PlanGetPlanIdRetType = string + +/* + types and functions for samplesPerScrape +*/ + +// isInteger +type PlanGetSamplesPerScrapeAttributeType = *int64 +type PlanGetSamplesPerScrapeArgType = int64 +type PlanGetSamplesPerScrapeRetType = int64 + +func getPlanGetSamplesPerScrapeAttributeTypeOk(arg PlanGetSamplesPerScrapeAttributeType) (ret PlanGetSamplesPerScrapeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetSamplesPerScrapeAttributeType(arg *PlanGetSamplesPerScrapeAttributeType, val PlanGetSamplesPerScrapeRetType) { + *arg = &val +} + +/* + types and functions for schema +*/ + +// isNotNullableString +type PlanGetSchemaAttributeType = *string + +func getPlanGetSchemaAttributeTypeOk(arg PlanGetSchemaAttributeType) (ret PlanGetSchemaRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetSchemaAttributeType(arg *PlanGetSchemaAttributeType, val PlanGetSchemaRetType) { + *arg = &val +} + +type PlanGetSchemaArgType = string +type PlanGetSchemaRetType = string + +/* + types and functions for targetNumber +*/ + +// isInteger +type PlanGetTargetNumberAttributeType = *int64 +type PlanGetTargetNumberArgType = int64 +type PlanGetTargetNumberRetType = int64 + +func getPlanGetTargetNumberAttributeTypeOk(arg PlanGetTargetNumberAttributeType) (ret PlanGetTargetNumberRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetTargetNumberAttributeType(arg *PlanGetTargetNumberAttributeType, val PlanGetTargetNumberRetType) { + *arg = &val +} + +/* + types and functions for totalMetricSamples +*/ + +// isInteger +type PlanGetTotalMetricSamplesAttributeType = *int64 +type PlanGetTotalMetricSamplesArgType = int64 +type PlanGetTotalMetricSamplesRetType = int64 + +func getPlanGetTotalMetricSamplesAttributeTypeOk(arg PlanGetTotalMetricSamplesAttributeType) (ret PlanGetTotalMetricSamplesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetTotalMetricSamplesAttributeType(arg *PlanGetTotalMetricSamplesAttributeType, val PlanGetTotalMetricSamplesRetType) { + *arg = &val +} + +/* + types and functions for tracesStorage +*/ + +// isInteger +type PlanGetTracesStorageAttributeType = *int64 +type PlanGetTracesStorageArgType = int64 +type PlanGetTracesStorageRetType = int64 + +func getPlanGetTracesStorageAttributeTypeOk(arg PlanGetTracesStorageAttributeType) (ret PlanGetTracesStorageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetTracesStorageAttributeType(arg *PlanGetTracesStorageAttributeType, val PlanGetTracesStorageRetType) { + *arg = &val +} + // Plan struct for Plan type Plan struct { // REQUIRED - AlertMatchers *int64 `json:"alertMatchers"` + AlertMatchers PlanGetAlertMatchersAttributeType `json:"alertMatchers"` // REQUIRED - AlertReceivers *int64 `json:"alertReceivers"` + AlertReceivers PlanGetAlertReceiversAttributeType `json:"alertReceivers"` // REQUIRED - AlertRules *int64 `json:"alertRules"` - Amount *float64 `json:"amount,omitempty"` + AlertRules PlanGetAlertRulesAttributeType `json:"alertRules"` + Amount PlanGetAmountAttributeType `json:"amount,omitempty"` // REQUIRED - BucketSize *int64 `json:"bucketSize"` - Description *string `json:"description,omitempty"` + BucketSize PlanGetBucketSizeAttributeType `json:"bucketSize"` + Description PlanGetDescriptionAttributeType `json:"description,omitempty"` // REQUIRED - GrafanaGlobalDashboards *int64 `json:"grafanaGlobalDashboards"` + GrafanaGlobalDashboards PlanGetGrafanaGlobalDashboardsAttributeType `json:"grafanaGlobalDashboards"` // REQUIRED - GrafanaGlobalOrgs *int64 `json:"grafanaGlobalOrgs"` + GrafanaGlobalOrgs PlanGetGrafanaGlobalOrgsAttributeType `json:"grafanaGlobalOrgs"` // REQUIRED - GrafanaGlobalSessions *int64 `json:"grafanaGlobalSessions"` + GrafanaGlobalSessions PlanGetGrafanaGlobalSessionsAttributeType `json:"grafanaGlobalSessions"` // REQUIRED - GrafanaGlobalUsers *int64 `json:"grafanaGlobalUsers"` + GrafanaGlobalUsers PlanGetGrafanaGlobalUsersAttributeType `json:"grafanaGlobalUsers"` // REQUIRED - Id *string `json:"id"` - IsFree *bool `json:"isFree,omitempty"` - IsPublic *bool `json:"isPublic,omitempty"` + Id PlanGetIdAttributeType `json:"id"` + IsFree PlangetIsFreeAttributeType `json:"isFree,omitempty"` + IsPublic PlangetIsPublicAttributeType `json:"isPublic,omitempty"` // REQUIRED - LogsAlert *int64 `json:"logsAlert"` + LogsAlert PlanGetLogsAlertAttributeType `json:"logsAlert"` // REQUIRED - LogsStorage *int64 `json:"logsStorage"` - Name *string `json:"name,omitempty"` + LogsStorage PlanGetLogsStorageAttributeType `json:"logsStorage"` + Name PlanGetNameAttributeType `json:"name,omitempty"` // REQUIRED - PlanId *string `json:"planId"` + PlanId PlanGetPlanIdAttributeType `json:"planId"` // REQUIRED - SamplesPerScrape *int64 `json:"samplesPerScrape"` - Schema *string `json:"schema,omitempty"` + SamplesPerScrape PlanGetSamplesPerScrapeAttributeType `json:"samplesPerScrape"` + Schema PlanGetSchemaAttributeType `json:"schema,omitempty"` // REQUIRED - TargetNumber *int64 `json:"targetNumber"` + TargetNumber PlanGetTargetNumberAttributeType `json:"targetNumber"` // REQUIRED - TotalMetricSamples *int64 `json:"totalMetricSamples"` + TotalMetricSamples PlanGetTotalMetricSamplesAttributeType `json:"totalMetricSamples"` // REQUIRED - TracesStorage *int64 `json:"tracesStorage"` + TracesStorage PlanGetTracesStorageAttributeType `json:"tracesStorage"` } type _Plan Plan @@ -65,30 +510,24 @@ type _Plan Plan // 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 { +func NewPlan(alertMatchers PlanGetAlertMatchersArgType, alertReceivers PlanGetAlertReceiversArgType, alertRules PlanGetAlertRulesArgType, bucketSize PlanGetBucketSizeArgType, grafanaGlobalDashboards PlanGetGrafanaGlobalDashboardsArgType, grafanaGlobalOrgs PlanGetGrafanaGlobalOrgsArgType, grafanaGlobalSessions PlanGetGrafanaGlobalSessionsArgType, grafanaGlobalUsers PlanGetGrafanaGlobalUsersArgType, id PlanGetIdArgType, logsAlert PlanGetLogsAlertArgType, logsStorage PlanGetLogsStorageArgType, planId PlanGetPlanIdArgType, samplesPerScrape PlanGetSamplesPerScrapeArgType, targetNumber PlanGetTargetNumberArgType, totalMetricSamples PlanGetTotalMetricSamplesArgType, tracesStorage PlanGetTracesStorageArgType) *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 + setPlanGetAlertMatchersAttributeType(&this.AlertMatchers, alertMatchers) + setPlanGetAlertReceiversAttributeType(&this.AlertReceivers, alertReceivers) + setPlanGetAlertRulesAttributeType(&this.AlertRules, alertRules) + setPlanGetBucketSizeAttributeType(&this.BucketSize, bucketSize) + setPlanGetGrafanaGlobalDashboardsAttributeType(&this.GrafanaGlobalDashboards, grafanaGlobalDashboards) + setPlanGetGrafanaGlobalOrgsAttributeType(&this.GrafanaGlobalOrgs, grafanaGlobalOrgs) + setPlanGetGrafanaGlobalSessionsAttributeType(&this.GrafanaGlobalSessions, grafanaGlobalSessions) + setPlanGetGrafanaGlobalUsersAttributeType(&this.GrafanaGlobalUsers, grafanaGlobalUsers) + setPlanGetIdAttributeType(&this.Id, id) + setPlanGetLogsAlertAttributeType(&this.LogsAlert, logsAlert) + setPlanGetLogsStorageAttributeType(&this.LogsStorage, logsStorage) + setPlanGetPlanIdAttributeType(&this.PlanId, planId) + setPlanGetSamplesPerScrapeAttributeType(&this.SamplesPerScrape, samplesPerScrape) + setPlanGetTargetNumberAttributeType(&this.TargetNumber, targetNumber) + setPlanGetTotalMetricSamplesAttributeType(&this.TotalMetricSamples, totalMetricSamples) + setPlanGetTracesStorageAttributeType(&this.TracesStorage, tracesStorage) return &this } @@ -107,617 +546,483 @@ func NewPlanWithDefaults() *Plan { } // GetAlertMatchers returns the AlertMatchers field value -func (o *Plan) GetAlertMatchers() *int64 { - if o == nil || IsNil(o.AlertMatchers) { - var ret *int64 - return ret - } - - return o.AlertMatchers +func (o *Plan) GetAlertMatchers() (ret PlanGetAlertMatchersRetType) { + ret, _ = o.GetAlertMatchersOk() + return ret } // 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 +func (o *Plan) GetAlertMatchersOk() (ret PlanGetAlertMatchersRetType, ok bool) { + return getPlanGetAlertMatchersAttributeTypeOk(o.AlertMatchers) } // SetAlertMatchers sets field value -func (o *Plan) SetAlertMatchers(v *int64) { - o.AlertMatchers = v +func (o *Plan) SetAlertMatchers(v PlanGetAlertMatchersRetType) { + setPlanGetAlertMatchersAttributeType(&o.AlertMatchers, v) } // GetAlertReceivers returns the AlertReceivers field value -func (o *Plan) GetAlertReceivers() *int64 { - if o == nil || IsNil(o.AlertReceivers) { - var ret *int64 - return ret - } - - return o.AlertReceivers +func (o *Plan) GetAlertReceivers() (ret PlanGetAlertReceiversRetType) { + ret, _ = o.GetAlertReceiversOk() + return ret } // 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 +func (o *Plan) GetAlertReceiversOk() (ret PlanGetAlertReceiversRetType, ok bool) { + return getPlanGetAlertReceiversAttributeTypeOk(o.AlertReceivers) } // SetAlertReceivers sets field value -func (o *Plan) SetAlertReceivers(v *int64) { - o.AlertReceivers = v +func (o *Plan) SetAlertReceivers(v PlanGetAlertReceiversRetType) { + setPlanGetAlertReceiversAttributeType(&o.AlertReceivers, v) } // GetAlertRules returns the AlertRules field value -func (o *Plan) GetAlertRules() *int64 { - if o == nil || IsNil(o.AlertRules) { - var ret *int64 - return ret - } - - return o.AlertRules +func (o *Plan) GetAlertRules() (ret PlanGetAlertRulesRetType) { + ret, _ = o.GetAlertRulesOk() + return ret } // 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 +func (o *Plan) GetAlertRulesOk() (ret PlanGetAlertRulesRetType, ok bool) { + return getPlanGetAlertRulesAttributeTypeOk(o.AlertRules) } // SetAlertRules sets field value -func (o *Plan) SetAlertRules(v *int64) { - o.AlertRules = v +func (o *Plan) SetAlertRules(v PlanGetAlertRulesRetType) { + setPlanGetAlertRulesAttributeType(&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 +func (o *Plan) GetAmount() (res PlanGetAmountRetType) { + res, _ = o.GetAmountOk() + return } // 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 +func (o *Plan) GetAmountOk() (ret PlanGetAmountRetType, ok bool) { + return getPlanGetAmountAttributeTypeOk(o.Amount) } // 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 + _, ok := o.GetAmountOk() + return ok } // SetAmount gets a reference to the given float64 and assigns it to the Amount field. -func (o *Plan) SetAmount(v *float64) { - o.Amount = v +func (o *Plan) SetAmount(v PlanGetAmountRetType) { + setPlanGetAmountAttributeType(&o.Amount, v) } // GetBucketSize returns the BucketSize field value -func (o *Plan) GetBucketSize() *int64 { - if o == nil || IsNil(o.BucketSize) { - var ret *int64 - return ret - } - - return o.BucketSize +func (o *Plan) GetBucketSize() (ret PlanGetBucketSizeRetType) { + ret, _ = o.GetBucketSizeOk() + return ret } // 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 +func (o *Plan) GetBucketSizeOk() (ret PlanGetBucketSizeRetType, ok bool) { + return getPlanGetBucketSizeAttributeTypeOk(o.BucketSize) } // SetBucketSize sets field value -func (o *Plan) SetBucketSize(v *int64) { - o.BucketSize = v +func (o *Plan) SetBucketSize(v PlanGetBucketSizeRetType) { + setPlanGetBucketSizeAttributeType(&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 +func (o *Plan) GetDescription() (res PlanGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } // 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 +func (o *Plan) GetDescriptionOk() (ret PlanGetDescriptionRetType, ok bool) { + return getPlanGetDescriptionAttributeTypeOk(o.Description) } // 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 + _, ok := o.GetDescriptionOk() + return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *Plan) SetDescription(v *string) { - o.Description = v +func (o *Plan) SetDescription(v PlanGetDescriptionRetType) { + setPlanGetDescriptionAttributeType(&o.Description, v) } // GetGrafanaGlobalDashboards returns the GrafanaGlobalDashboards field value -func (o *Plan) GetGrafanaGlobalDashboards() *int64 { - if o == nil || IsNil(o.GrafanaGlobalDashboards) { - var ret *int64 - return ret - } - - return o.GrafanaGlobalDashboards +func (o *Plan) GetGrafanaGlobalDashboards() (ret PlanGetGrafanaGlobalDashboardsRetType) { + ret, _ = o.GetGrafanaGlobalDashboardsOk() + return ret } // 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 +func (o *Plan) GetGrafanaGlobalDashboardsOk() (ret PlanGetGrafanaGlobalDashboardsRetType, ok bool) { + return getPlanGetGrafanaGlobalDashboardsAttributeTypeOk(o.GrafanaGlobalDashboards) } // SetGrafanaGlobalDashboards sets field value -func (o *Plan) SetGrafanaGlobalDashboards(v *int64) { - o.GrafanaGlobalDashboards = v +func (o *Plan) SetGrafanaGlobalDashboards(v PlanGetGrafanaGlobalDashboardsRetType) { + setPlanGetGrafanaGlobalDashboardsAttributeType(&o.GrafanaGlobalDashboards, v) } // GetGrafanaGlobalOrgs returns the GrafanaGlobalOrgs field value -func (o *Plan) GetGrafanaGlobalOrgs() *int64 { - if o == nil || IsNil(o.GrafanaGlobalOrgs) { - var ret *int64 - return ret - } - - return o.GrafanaGlobalOrgs +func (o *Plan) GetGrafanaGlobalOrgs() (ret PlanGetGrafanaGlobalOrgsRetType) { + ret, _ = o.GetGrafanaGlobalOrgsOk() + return ret } // 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 +func (o *Plan) GetGrafanaGlobalOrgsOk() (ret PlanGetGrafanaGlobalOrgsRetType, ok bool) { + return getPlanGetGrafanaGlobalOrgsAttributeTypeOk(o.GrafanaGlobalOrgs) } // SetGrafanaGlobalOrgs sets field value -func (o *Plan) SetGrafanaGlobalOrgs(v *int64) { - o.GrafanaGlobalOrgs = v +func (o *Plan) SetGrafanaGlobalOrgs(v PlanGetGrafanaGlobalOrgsRetType) { + setPlanGetGrafanaGlobalOrgsAttributeType(&o.GrafanaGlobalOrgs, v) } // GetGrafanaGlobalSessions returns the GrafanaGlobalSessions field value -func (o *Plan) GetGrafanaGlobalSessions() *int64 { - if o == nil || IsNil(o.GrafanaGlobalSessions) { - var ret *int64 - return ret - } - - return o.GrafanaGlobalSessions +func (o *Plan) GetGrafanaGlobalSessions() (ret PlanGetGrafanaGlobalSessionsRetType) { + ret, _ = o.GetGrafanaGlobalSessionsOk() + return ret } // 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 +func (o *Plan) GetGrafanaGlobalSessionsOk() (ret PlanGetGrafanaGlobalSessionsRetType, ok bool) { + return getPlanGetGrafanaGlobalSessionsAttributeTypeOk(o.GrafanaGlobalSessions) } // SetGrafanaGlobalSessions sets field value -func (o *Plan) SetGrafanaGlobalSessions(v *int64) { - o.GrafanaGlobalSessions = v +func (o *Plan) SetGrafanaGlobalSessions(v PlanGetGrafanaGlobalSessionsRetType) { + setPlanGetGrafanaGlobalSessionsAttributeType(&o.GrafanaGlobalSessions, v) } // GetGrafanaGlobalUsers returns the GrafanaGlobalUsers field value -func (o *Plan) GetGrafanaGlobalUsers() *int64 { - if o == nil || IsNil(o.GrafanaGlobalUsers) { - var ret *int64 - return ret - } - - return o.GrafanaGlobalUsers +func (o *Plan) GetGrafanaGlobalUsers() (ret PlanGetGrafanaGlobalUsersRetType) { + ret, _ = o.GetGrafanaGlobalUsersOk() + return ret } // 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 +func (o *Plan) GetGrafanaGlobalUsersOk() (ret PlanGetGrafanaGlobalUsersRetType, ok bool) { + return getPlanGetGrafanaGlobalUsersAttributeTypeOk(o.GrafanaGlobalUsers) } // SetGrafanaGlobalUsers sets field value -func (o *Plan) SetGrafanaGlobalUsers(v *int64) { - o.GrafanaGlobalUsers = v +func (o *Plan) SetGrafanaGlobalUsers(v PlanGetGrafanaGlobalUsersRetType) { + setPlanGetGrafanaGlobalUsersAttributeType(&o.GrafanaGlobalUsers, v) } // GetId returns the Id field value -func (o *Plan) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *Plan) GetId() (ret PlanGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } // 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 +func (o *Plan) GetIdOk() (ret PlanGetIdRetType, ok bool) { + return getPlanGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *Plan) SetId(v *string) { - o.Id = v +func (o *Plan) SetId(v PlanGetIdRetType) { + setPlanGetIdAttributeType(&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 +func (o *Plan) GetIsFree() (res PlangetIsFreeRetType) { + res, _ = o.GetIsFreeOk() + return } // 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 +func (o *Plan) GetIsFreeOk() (ret PlangetIsFreeRetType, ok bool) { + return getPlangetIsFreeAttributeTypeOk(o.IsFree) } // 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 + _, ok := o.GetIsFreeOk() + return ok } // SetIsFree gets a reference to the given bool and assigns it to the IsFree field. -func (o *Plan) SetIsFree(v *bool) { - o.IsFree = v +func (o *Plan) SetIsFree(v PlangetIsFreeRetType) { + setPlangetIsFreeAttributeType(&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 +func (o *Plan) GetIsPublic() (res PlangetIsPublicRetType) { + res, _ = o.GetIsPublicOk() + return } // 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 +func (o *Plan) GetIsPublicOk() (ret PlangetIsPublicRetType, ok bool) { + return getPlangetIsPublicAttributeTypeOk(o.IsPublic) } // 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 + _, ok := o.GetIsPublicOk() + return ok } // SetIsPublic gets a reference to the given bool and assigns it to the IsPublic field. -func (o *Plan) SetIsPublic(v *bool) { - o.IsPublic = v +func (o *Plan) SetIsPublic(v PlangetIsPublicRetType) { + setPlangetIsPublicAttributeType(&o.IsPublic, v) } // GetLogsAlert returns the LogsAlert field value -func (o *Plan) GetLogsAlert() *int64 { - if o == nil || IsNil(o.LogsAlert) { - var ret *int64 - return ret - } - - return o.LogsAlert +func (o *Plan) GetLogsAlert() (ret PlanGetLogsAlertRetType) { + ret, _ = o.GetLogsAlertOk() + return ret } // 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 +func (o *Plan) GetLogsAlertOk() (ret PlanGetLogsAlertRetType, ok bool) { + return getPlanGetLogsAlertAttributeTypeOk(o.LogsAlert) } // SetLogsAlert sets field value -func (o *Plan) SetLogsAlert(v *int64) { - o.LogsAlert = v +func (o *Plan) SetLogsAlert(v PlanGetLogsAlertRetType) { + setPlanGetLogsAlertAttributeType(&o.LogsAlert, v) } // GetLogsStorage returns the LogsStorage field value -func (o *Plan) GetLogsStorage() *int64 { - if o == nil || IsNil(o.LogsStorage) { - var ret *int64 - return ret - } - - return o.LogsStorage +func (o *Plan) GetLogsStorage() (ret PlanGetLogsStorageRetType) { + ret, _ = o.GetLogsStorageOk() + return ret } // 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 +func (o *Plan) GetLogsStorageOk() (ret PlanGetLogsStorageRetType, ok bool) { + return getPlanGetLogsStorageAttributeTypeOk(o.LogsStorage) } // SetLogsStorage sets field value -func (o *Plan) SetLogsStorage(v *int64) { - o.LogsStorage = v +func (o *Plan) SetLogsStorage(v PlanGetLogsStorageRetType) { + setPlanGetLogsStorageAttributeType(&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 +func (o *Plan) GetName() (res PlanGetNameRetType) { + res, _ = o.GetNameOk() + return } // 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 +func (o *Plan) GetNameOk() (ret PlanGetNameRetType, ok bool) { + return getPlanGetNameAttributeTypeOk(o.Name) } // 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 + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *Plan) SetName(v *string) { - o.Name = v +func (o *Plan) SetName(v PlanGetNameRetType) { + setPlanGetNameAttributeType(&o.Name, v) } // GetPlanId returns the PlanId field value -func (o *Plan) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - - return o.PlanId +func (o *Plan) GetPlanId() (ret PlanGetPlanIdRetType) { + ret, _ = o.GetPlanIdOk() + return ret } // 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 +func (o *Plan) GetPlanIdOk() (ret PlanGetPlanIdRetType, ok bool) { + return getPlanGetPlanIdAttributeTypeOk(o.PlanId) } // SetPlanId sets field value -func (o *Plan) SetPlanId(v *string) { - o.PlanId = v +func (o *Plan) SetPlanId(v PlanGetPlanIdRetType) { + setPlanGetPlanIdAttributeType(&o.PlanId, v) } // GetSamplesPerScrape returns the SamplesPerScrape field value -func (o *Plan) GetSamplesPerScrape() *int64 { - if o == nil || IsNil(o.SamplesPerScrape) { - var ret *int64 - return ret - } - - return o.SamplesPerScrape +func (o *Plan) GetSamplesPerScrape() (ret PlanGetSamplesPerScrapeRetType) { + ret, _ = o.GetSamplesPerScrapeOk() + return ret } // 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 +func (o *Plan) GetSamplesPerScrapeOk() (ret PlanGetSamplesPerScrapeRetType, ok bool) { + return getPlanGetSamplesPerScrapeAttributeTypeOk(o.SamplesPerScrape) } // SetSamplesPerScrape sets field value -func (o *Plan) SetSamplesPerScrape(v *int64) { - o.SamplesPerScrape = v +func (o *Plan) SetSamplesPerScrape(v PlanGetSamplesPerScrapeRetType) { + setPlanGetSamplesPerScrapeAttributeType(&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 +func (o *Plan) GetSchema() (res PlanGetSchemaRetType) { + res, _ = o.GetSchemaOk() + return } // 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 +func (o *Plan) GetSchemaOk() (ret PlanGetSchemaRetType, ok bool) { + return getPlanGetSchemaAttributeTypeOk(o.Schema) } // 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 + _, ok := o.GetSchemaOk() + return ok } // SetSchema gets a reference to the given string and assigns it to the Schema field. -func (o *Plan) SetSchema(v *string) { - o.Schema = v +func (o *Plan) SetSchema(v PlanGetSchemaRetType) { + setPlanGetSchemaAttributeType(&o.Schema, v) } // GetTargetNumber returns the TargetNumber field value -func (o *Plan) GetTargetNumber() *int64 { - if o == nil || IsNil(o.TargetNumber) { - var ret *int64 - return ret - } - - return o.TargetNumber +func (o *Plan) GetTargetNumber() (ret PlanGetTargetNumberRetType) { + ret, _ = o.GetTargetNumberOk() + return ret } // 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 +func (o *Plan) GetTargetNumberOk() (ret PlanGetTargetNumberRetType, ok bool) { + return getPlanGetTargetNumberAttributeTypeOk(o.TargetNumber) } // SetTargetNumber sets field value -func (o *Plan) SetTargetNumber(v *int64) { - o.TargetNumber = v +func (o *Plan) SetTargetNumber(v PlanGetTargetNumberRetType) { + setPlanGetTargetNumberAttributeType(&o.TargetNumber, v) } // GetTotalMetricSamples returns the TotalMetricSamples field value -func (o *Plan) GetTotalMetricSamples() *int64 { - if o == nil || IsNil(o.TotalMetricSamples) { - var ret *int64 - return ret - } - - return o.TotalMetricSamples +func (o *Plan) GetTotalMetricSamples() (ret PlanGetTotalMetricSamplesRetType) { + ret, _ = o.GetTotalMetricSamplesOk() + return ret } // 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 +func (o *Plan) GetTotalMetricSamplesOk() (ret PlanGetTotalMetricSamplesRetType, ok bool) { + return getPlanGetTotalMetricSamplesAttributeTypeOk(o.TotalMetricSamples) } // SetTotalMetricSamples sets field value -func (o *Plan) SetTotalMetricSamples(v *int64) { - o.TotalMetricSamples = v +func (o *Plan) SetTotalMetricSamples(v PlanGetTotalMetricSamplesRetType) { + setPlanGetTotalMetricSamplesAttributeType(&o.TotalMetricSamples, v) } // GetTracesStorage returns the TracesStorage field value -func (o *Plan) GetTracesStorage() *int64 { - if o == nil || IsNil(o.TracesStorage) { - var ret *int64 - return ret - } - - return o.TracesStorage +func (o *Plan) GetTracesStorage() (ret PlanGetTracesStorageRetType) { + ret, _ = o.GetTracesStorageOk() + return ret } // 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 +func (o *Plan) GetTracesStorageOk() (ret PlanGetTracesStorageRetType, ok bool) { + return getPlanGetTracesStorageAttributeTypeOk(o.TracesStorage) } // SetTracesStorage sets field value -func (o *Plan) SetTracesStorage(v *int64) { - o.TracesStorage = v +func (o *Plan) SetTracesStorage(v PlanGetTracesStorageRetType) { + setPlanGetTracesStorageAttributeType(&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 + if val, ok := getPlanGetAlertMatchersAttributeTypeOk(o.AlertMatchers); ok { + toSerialize["AlertMatchers"] = val + } + if val, ok := getPlanGetAlertReceiversAttributeTypeOk(o.AlertReceivers); ok { + toSerialize["AlertReceivers"] = val + } + if val, ok := getPlanGetAlertRulesAttributeTypeOk(o.AlertRules); ok { + toSerialize["AlertRules"] = val + } + if val, ok := getPlanGetAmountAttributeTypeOk(o.Amount); ok { + toSerialize["Amount"] = val + } + if val, ok := getPlanGetBucketSizeAttributeTypeOk(o.BucketSize); ok { + toSerialize["BucketSize"] = val + } + if val, ok := getPlanGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getPlanGetGrafanaGlobalDashboardsAttributeTypeOk(o.GrafanaGlobalDashboards); ok { + toSerialize["GrafanaGlobalDashboards"] = val + } + if val, ok := getPlanGetGrafanaGlobalOrgsAttributeTypeOk(o.GrafanaGlobalOrgs); ok { + toSerialize["GrafanaGlobalOrgs"] = val + } + if val, ok := getPlanGetGrafanaGlobalSessionsAttributeTypeOk(o.GrafanaGlobalSessions); ok { + toSerialize["GrafanaGlobalSessions"] = val + } + if val, ok := getPlanGetGrafanaGlobalUsersAttributeTypeOk(o.GrafanaGlobalUsers); ok { + toSerialize["GrafanaGlobalUsers"] = val + } + if val, ok := getPlanGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getPlangetIsFreeAttributeTypeOk(o.IsFree); ok { + toSerialize["IsFree"] = val + } + if val, ok := getPlangetIsPublicAttributeTypeOk(o.IsPublic); ok { + toSerialize["IsPublic"] = val + } + if val, ok := getPlanGetLogsAlertAttributeTypeOk(o.LogsAlert); ok { + toSerialize["LogsAlert"] = val + } + if val, ok := getPlanGetLogsStorageAttributeTypeOk(o.LogsStorage); ok { + toSerialize["LogsStorage"] = val + } + if val, ok := getPlanGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getPlanGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val + } + if val, ok := getPlanGetSamplesPerScrapeAttributeTypeOk(o.SamplesPerScrape); ok { + toSerialize["SamplesPerScrape"] = val + } + if val, ok := getPlanGetSchemaAttributeTypeOk(o.Schema); ok { + toSerialize["Schema"] = val + } + if val, ok := getPlanGetTargetNumberAttributeTypeOk(o.TargetNumber); ok { + toSerialize["TargetNumber"] = val + } + if val, ok := getPlanGetTotalMetricSamplesAttributeTypeOk(o.TotalMetricSamples); ok { + toSerialize["TotalMetricSamples"] = val + } + if val, ok := getPlanGetTracesStorageAttributeTypeOk(o.TracesStorage); ok { + toSerialize["TracesStorage"] = val + } return toSerialize, nil } diff --git a/services/observability/model_plan_model.go b/services/observability/model_plan_model.go index 29fef5e7c..b485e53f2 100644 --- a/services/observability/model_plan_model.go +++ b/services/observability/model_plan_model.go @@ -17,43 +17,427 @@ import ( // checks if the PlanModel type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PlanModel{} +/* + types and functions for alertMatchers +*/ + +// isInteger +type PlanModelGetAlertMatchersAttributeType = *int64 +type PlanModelGetAlertMatchersArgType = int64 +type PlanModelGetAlertMatchersRetType = int64 + +func getPlanModelGetAlertMatchersAttributeTypeOk(arg PlanModelGetAlertMatchersAttributeType) (ret PlanModelGetAlertMatchersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetAlertMatchersAttributeType(arg *PlanModelGetAlertMatchersAttributeType, val PlanModelGetAlertMatchersRetType) { + *arg = &val +} + +/* + types and functions for alertReceivers +*/ + +// isInteger +type PlanModelGetAlertReceiversAttributeType = *int64 +type PlanModelGetAlertReceiversArgType = int64 +type PlanModelGetAlertReceiversRetType = int64 + +func getPlanModelGetAlertReceiversAttributeTypeOk(arg PlanModelGetAlertReceiversAttributeType) (ret PlanModelGetAlertReceiversRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetAlertReceiversAttributeType(arg *PlanModelGetAlertReceiversAttributeType, val PlanModelGetAlertReceiversRetType) { + *arg = &val +} + +/* + types and functions for alertRules +*/ + +// isInteger +type PlanModelGetAlertRulesAttributeType = *int64 +type PlanModelGetAlertRulesArgType = int64 +type PlanModelGetAlertRulesRetType = int64 + +func getPlanModelGetAlertRulesAttributeTypeOk(arg PlanModelGetAlertRulesAttributeType) (ret PlanModelGetAlertRulesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetAlertRulesAttributeType(arg *PlanModelGetAlertRulesAttributeType, val PlanModelGetAlertRulesRetType) { + *arg = &val +} + +/* + types and functions for amount +*/ + +// isNumber +type PlanModelGetAmountAttributeType = *float64 +type PlanModelGetAmountArgType = float64 +type PlanModelGetAmountRetType = float64 + +func getPlanModelGetAmountAttributeTypeOk(arg PlanModelGetAmountAttributeType) (ret PlanModelGetAmountRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetAmountAttributeType(arg *PlanModelGetAmountAttributeType, val PlanModelGetAmountRetType) { + *arg = &val +} + +/* + types and functions for bucketSize +*/ + +// isInteger +type PlanModelGetBucketSizeAttributeType = *int64 +type PlanModelGetBucketSizeArgType = int64 +type PlanModelGetBucketSizeRetType = int64 + +func getPlanModelGetBucketSizeAttributeTypeOk(arg PlanModelGetBucketSizeAttributeType) (ret PlanModelGetBucketSizeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetBucketSizeAttributeType(arg *PlanModelGetBucketSizeAttributeType, val PlanModelGetBucketSizeRetType) { + *arg = &val +} + +/* + types and functions for description +*/ + +// isNotNullableString +type PlanModelGetDescriptionAttributeType = *string + +func getPlanModelGetDescriptionAttributeTypeOk(arg PlanModelGetDescriptionAttributeType) (ret PlanModelGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetDescriptionAttributeType(arg *PlanModelGetDescriptionAttributeType, val PlanModelGetDescriptionRetType) { + *arg = &val +} + +type PlanModelGetDescriptionArgType = string +type PlanModelGetDescriptionRetType = string + +/* + types and functions for grafanaGlobalDashboards +*/ + +// isInteger +type PlanModelGetGrafanaGlobalDashboardsAttributeType = *int64 +type PlanModelGetGrafanaGlobalDashboardsArgType = int64 +type PlanModelGetGrafanaGlobalDashboardsRetType = int64 + +func getPlanModelGetGrafanaGlobalDashboardsAttributeTypeOk(arg PlanModelGetGrafanaGlobalDashboardsAttributeType) (ret PlanModelGetGrafanaGlobalDashboardsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetGrafanaGlobalDashboardsAttributeType(arg *PlanModelGetGrafanaGlobalDashboardsAttributeType, val PlanModelGetGrafanaGlobalDashboardsRetType) { + *arg = &val +} + +/* + types and functions for grafanaGlobalOrgs +*/ + +// isInteger +type PlanModelGetGrafanaGlobalOrgsAttributeType = *int64 +type PlanModelGetGrafanaGlobalOrgsArgType = int64 +type PlanModelGetGrafanaGlobalOrgsRetType = int64 + +func getPlanModelGetGrafanaGlobalOrgsAttributeTypeOk(arg PlanModelGetGrafanaGlobalOrgsAttributeType) (ret PlanModelGetGrafanaGlobalOrgsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetGrafanaGlobalOrgsAttributeType(arg *PlanModelGetGrafanaGlobalOrgsAttributeType, val PlanModelGetGrafanaGlobalOrgsRetType) { + *arg = &val +} + +/* + types and functions for grafanaGlobalSessions +*/ + +// isInteger +type PlanModelGetGrafanaGlobalSessionsAttributeType = *int64 +type PlanModelGetGrafanaGlobalSessionsArgType = int64 +type PlanModelGetGrafanaGlobalSessionsRetType = int64 + +func getPlanModelGetGrafanaGlobalSessionsAttributeTypeOk(arg PlanModelGetGrafanaGlobalSessionsAttributeType) (ret PlanModelGetGrafanaGlobalSessionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetGrafanaGlobalSessionsAttributeType(arg *PlanModelGetGrafanaGlobalSessionsAttributeType, val PlanModelGetGrafanaGlobalSessionsRetType) { + *arg = &val +} + +/* + types and functions for grafanaGlobalUsers +*/ + +// isInteger +type PlanModelGetGrafanaGlobalUsersAttributeType = *int64 +type PlanModelGetGrafanaGlobalUsersArgType = int64 +type PlanModelGetGrafanaGlobalUsersRetType = int64 + +func getPlanModelGetGrafanaGlobalUsersAttributeTypeOk(arg PlanModelGetGrafanaGlobalUsersAttributeType) (ret PlanModelGetGrafanaGlobalUsersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetGrafanaGlobalUsersAttributeType(arg *PlanModelGetGrafanaGlobalUsersAttributeType, val PlanModelGetGrafanaGlobalUsersRetType) { + *arg = &val +} + +/* + types and functions for id +*/ + +// isNotNullableString +type PlanModelGetIdAttributeType = *string + +func getPlanModelGetIdAttributeTypeOk(arg PlanModelGetIdAttributeType) (ret PlanModelGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetIdAttributeType(arg *PlanModelGetIdAttributeType, val PlanModelGetIdRetType) { + *arg = &val +} + +type PlanModelGetIdArgType = string +type PlanModelGetIdRetType = string + +/* + types and functions for logsAlert +*/ + +// isInteger +type PlanModelGetLogsAlertAttributeType = *int64 +type PlanModelGetLogsAlertArgType = int64 +type PlanModelGetLogsAlertRetType = int64 + +func getPlanModelGetLogsAlertAttributeTypeOk(arg PlanModelGetLogsAlertAttributeType) (ret PlanModelGetLogsAlertRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetLogsAlertAttributeType(arg *PlanModelGetLogsAlertAttributeType, val PlanModelGetLogsAlertRetType) { + *arg = &val +} + +/* + types and functions for logsStorage +*/ + +// isInteger +type PlanModelGetLogsStorageAttributeType = *int64 +type PlanModelGetLogsStorageArgType = int64 +type PlanModelGetLogsStorageRetType = int64 + +func getPlanModelGetLogsStorageAttributeTypeOk(arg PlanModelGetLogsStorageAttributeType) (ret PlanModelGetLogsStorageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetLogsStorageAttributeType(arg *PlanModelGetLogsStorageAttributeType, val PlanModelGetLogsStorageRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type PlanModelGetNameAttributeType = *string + +func getPlanModelGetNameAttributeTypeOk(arg PlanModelGetNameAttributeType) (ret PlanModelGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetNameAttributeType(arg *PlanModelGetNameAttributeType, val PlanModelGetNameRetType) { + *arg = &val +} + +type PlanModelGetNameArgType = string +type PlanModelGetNameRetType = string + +/* + types and functions for planId +*/ + +// isNotNullableString +type PlanModelGetPlanIdAttributeType = *string + +func getPlanModelGetPlanIdAttributeTypeOk(arg PlanModelGetPlanIdAttributeType) (ret PlanModelGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetPlanIdAttributeType(arg *PlanModelGetPlanIdAttributeType, val PlanModelGetPlanIdRetType) { + *arg = &val +} + +type PlanModelGetPlanIdArgType = string +type PlanModelGetPlanIdRetType = string + +/* + types and functions for samplesPerScrape +*/ + +// isInteger +type PlanModelGetSamplesPerScrapeAttributeType = *int64 +type PlanModelGetSamplesPerScrapeArgType = int64 +type PlanModelGetSamplesPerScrapeRetType = int64 + +func getPlanModelGetSamplesPerScrapeAttributeTypeOk(arg PlanModelGetSamplesPerScrapeAttributeType) (ret PlanModelGetSamplesPerScrapeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetSamplesPerScrapeAttributeType(arg *PlanModelGetSamplesPerScrapeAttributeType, val PlanModelGetSamplesPerScrapeRetType) { + *arg = &val +} + +/* + types and functions for targetNumber +*/ + +// isInteger +type PlanModelGetTargetNumberAttributeType = *int64 +type PlanModelGetTargetNumberArgType = int64 +type PlanModelGetTargetNumberRetType = int64 + +func getPlanModelGetTargetNumberAttributeTypeOk(arg PlanModelGetTargetNumberAttributeType) (ret PlanModelGetTargetNumberRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetTargetNumberAttributeType(arg *PlanModelGetTargetNumberAttributeType, val PlanModelGetTargetNumberRetType) { + *arg = &val +} + +/* + types and functions for totalMetricSamples +*/ + +// isInteger +type PlanModelGetTotalMetricSamplesAttributeType = *int64 +type PlanModelGetTotalMetricSamplesArgType = int64 +type PlanModelGetTotalMetricSamplesRetType = int64 + +func getPlanModelGetTotalMetricSamplesAttributeTypeOk(arg PlanModelGetTotalMetricSamplesAttributeType) (ret PlanModelGetTotalMetricSamplesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetTotalMetricSamplesAttributeType(arg *PlanModelGetTotalMetricSamplesAttributeType, val PlanModelGetTotalMetricSamplesRetType) { + *arg = &val +} + +/* + types and functions for tracesStorage +*/ + +// isInteger +type PlanModelGetTracesStorageAttributeType = *int64 +type PlanModelGetTracesStorageArgType = int64 +type PlanModelGetTracesStorageRetType = int64 + +func getPlanModelGetTracesStorageAttributeTypeOk(arg PlanModelGetTracesStorageAttributeType) (ret PlanModelGetTracesStorageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanModelGetTracesStorageAttributeType(arg *PlanModelGetTracesStorageAttributeType, val PlanModelGetTracesStorageRetType) { + *arg = &val +} + // PlanModel struct for PlanModel type PlanModel struct { // REQUIRED - AlertMatchers *int64 `json:"alertMatchers"` + AlertMatchers PlanModelGetAlertMatchersAttributeType `json:"alertMatchers"` // REQUIRED - AlertReceivers *int64 `json:"alertReceivers"` + AlertReceivers PlanModelGetAlertReceiversAttributeType `json:"alertReceivers"` // REQUIRED - AlertRules *int64 `json:"alertRules"` - Amount *float64 `json:"amount,omitempty"` + AlertRules PlanModelGetAlertRulesAttributeType `json:"alertRules"` + Amount PlanModelGetAmountAttributeType `json:"amount,omitempty"` // REQUIRED - BucketSize *int64 `json:"bucketSize"` - Description *string `json:"description,omitempty"` + BucketSize PlanModelGetBucketSizeAttributeType `json:"bucketSize"` + Description PlanModelGetDescriptionAttributeType `json:"description,omitempty"` // REQUIRED - GrafanaGlobalDashboards *int64 `json:"grafanaGlobalDashboards"` + GrafanaGlobalDashboards PlanModelGetGrafanaGlobalDashboardsAttributeType `json:"grafanaGlobalDashboards"` // REQUIRED - GrafanaGlobalOrgs *int64 `json:"grafanaGlobalOrgs"` + GrafanaGlobalOrgs PlanModelGetGrafanaGlobalOrgsAttributeType `json:"grafanaGlobalOrgs"` // REQUIRED - GrafanaGlobalSessions *int64 `json:"grafanaGlobalSessions"` + GrafanaGlobalSessions PlanModelGetGrafanaGlobalSessionsAttributeType `json:"grafanaGlobalSessions"` // REQUIRED - GrafanaGlobalUsers *int64 `json:"grafanaGlobalUsers"` + GrafanaGlobalUsers PlanModelGetGrafanaGlobalUsersAttributeType `json:"grafanaGlobalUsers"` // REQUIRED - Id *string `json:"id"` + Id PlanModelGetIdAttributeType `json:"id"` // REQUIRED - LogsAlert *int64 `json:"logsAlert"` + LogsAlert PlanModelGetLogsAlertAttributeType `json:"logsAlert"` // REQUIRED - LogsStorage *int64 `json:"logsStorage"` - Name *string `json:"name,omitempty"` + LogsStorage PlanModelGetLogsStorageAttributeType `json:"logsStorage"` + Name PlanModelGetNameAttributeType `json:"name,omitempty"` // REQUIRED - PlanId *string `json:"planId"` + PlanId PlanModelGetPlanIdAttributeType `json:"planId"` // REQUIRED - SamplesPerScrape *int64 `json:"samplesPerScrape"` + SamplesPerScrape PlanModelGetSamplesPerScrapeAttributeType `json:"samplesPerScrape"` // REQUIRED - TargetNumber *int64 `json:"targetNumber"` + TargetNumber PlanModelGetTargetNumberAttributeType `json:"targetNumber"` // REQUIRED - TotalMetricSamples *int64 `json:"totalMetricSamples"` + TotalMetricSamples PlanModelGetTotalMetricSamplesAttributeType `json:"totalMetricSamples"` // REQUIRED - TracesStorage *int64 `json:"tracesStorage"` + TracesStorage PlanModelGetTracesStorageAttributeType `json:"tracesStorage"` } type _PlanModel PlanModel @@ -62,24 +446,24 @@ type _PlanModel PlanModel // 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 { +func NewPlanModel(alertMatchers PlanModelGetAlertMatchersArgType, alertReceivers PlanModelGetAlertReceiversArgType, alertRules PlanModelGetAlertRulesArgType, bucketSize PlanModelGetBucketSizeArgType, grafanaGlobalDashboards PlanModelGetGrafanaGlobalDashboardsArgType, grafanaGlobalOrgs PlanModelGetGrafanaGlobalOrgsArgType, grafanaGlobalSessions PlanModelGetGrafanaGlobalSessionsArgType, grafanaGlobalUsers PlanModelGetGrafanaGlobalUsersArgType, id PlanModelGetIdArgType, logsAlert PlanModelGetLogsAlertArgType, logsStorage PlanModelGetLogsStorageArgType, planId PlanModelGetPlanIdArgType, samplesPerScrape PlanModelGetSamplesPerScrapeArgType, targetNumber PlanModelGetTargetNumberArgType, totalMetricSamples PlanModelGetTotalMetricSamplesArgType, tracesStorage PlanModelGetTracesStorageArgType) *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 + setPlanModelGetAlertMatchersAttributeType(&this.AlertMatchers, alertMatchers) + setPlanModelGetAlertReceiversAttributeType(&this.AlertReceivers, alertReceivers) + setPlanModelGetAlertRulesAttributeType(&this.AlertRules, alertRules) + setPlanModelGetBucketSizeAttributeType(&this.BucketSize, bucketSize) + setPlanModelGetGrafanaGlobalDashboardsAttributeType(&this.GrafanaGlobalDashboards, grafanaGlobalDashboards) + setPlanModelGetGrafanaGlobalOrgsAttributeType(&this.GrafanaGlobalOrgs, grafanaGlobalOrgs) + setPlanModelGetGrafanaGlobalSessionsAttributeType(&this.GrafanaGlobalSessions, grafanaGlobalSessions) + setPlanModelGetGrafanaGlobalUsersAttributeType(&this.GrafanaGlobalUsers, grafanaGlobalUsers) + setPlanModelGetIdAttributeType(&this.Id, id) + setPlanModelGetLogsAlertAttributeType(&this.LogsAlert, logsAlert) + setPlanModelGetLogsStorageAttributeType(&this.LogsStorage, logsStorage) + setPlanModelGetPlanIdAttributeType(&this.PlanId, planId) + setPlanModelGetSamplesPerScrapeAttributeType(&this.SamplesPerScrape, samplesPerScrape) + setPlanModelGetTargetNumberAttributeType(&this.TargetNumber, targetNumber) + setPlanModelGetTotalMetricSamplesAttributeType(&this.TotalMetricSamples, totalMetricSamples) + setPlanModelGetTracesStorageAttributeType(&this.TracesStorage, tracesStorage) return &this } @@ -92,512 +476,405 @@ func NewPlanModelWithDefaults() *PlanModel { } // GetAlertMatchers returns the AlertMatchers field value -func (o *PlanModel) GetAlertMatchers() *int64 { - if o == nil || IsNil(o.AlertMatchers) { - var ret *int64 - return ret - } - - return o.AlertMatchers +func (o *PlanModel) GetAlertMatchers() (ret PlanModelGetAlertMatchersRetType) { + ret, _ = o.GetAlertMatchersOk() + return ret } // 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 +func (o *PlanModel) GetAlertMatchersOk() (ret PlanModelGetAlertMatchersRetType, ok bool) { + return getPlanModelGetAlertMatchersAttributeTypeOk(o.AlertMatchers) } // SetAlertMatchers sets field value -func (o *PlanModel) SetAlertMatchers(v *int64) { - o.AlertMatchers = v +func (o *PlanModel) SetAlertMatchers(v PlanModelGetAlertMatchersRetType) { + setPlanModelGetAlertMatchersAttributeType(&o.AlertMatchers, v) } // GetAlertReceivers returns the AlertReceivers field value -func (o *PlanModel) GetAlertReceivers() *int64 { - if o == nil || IsNil(o.AlertReceivers) { - var ret *int64 - return ret - } - - return o.AlertReceivers +func (o *PlanModel) GetAlertReceivers() (ret PlanModelGetAlertReceiversRetType) { + ret, _ = o.GetAlertReceiversOk() + return ret } // 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 +func (o *PlanModel) GetAlertReceiversOk() (ret PlanModelGetAlertReceiversRetType, ok bool) { + return getPlanModelGetAlertReceiversAttributeTypeOk(o.AlertReceivers) } // SetAlertReceivers sets field value -func (o *PlanModel) SetAlertReceivers(v *int64) { - o.AlertReceivers = v +func (o *PlanModel) SetAlertReceivers(v PlanModelGetAlertReceiversRetType) { + setPlanModelGetAlertReceiversAttributeType(&o.AlertReceivers, v) } // GetAlertRules returns the AlertRules field value -func (o *PlanModel) GetAlertRules() *int64 { - if o == nil || IsNil(o.AlertRules) { - var ret *int64 - return ret - } - - return o.AlertRules +func (o *PlanModel) GetAlertRules() (ret PlanModelGetAlertRulesRetType) { + ret, _ = o.GetAlertRulesOk() + return ret } // 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 +func (o *PlanModel) GetAlertRulesOk() (ret PlanModelGetAlertRulesRetType, ok bool) { + return getPlanModelGetAlertRulesAttributeTypeOk(o.AlertRules) } // SetAlertRules sets field value -func (o *PlanModel) SetAlertRules(v *int64) { - o.AlertRules = v +func (o *PlanModel) SetAlertRules(v PlanModelGetAlertRulesRetType) { + setPlanModelGetAlertRulesAttributeType(&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 +func (o *PlanModel) GetAmount() (res PlanModelGetAmountRetType) { + res, _ = o.GetAmountOk() + return } // 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 +func (o *PlanModel) GetAmountOk() (ret PlanModelGetAmountRetType, ok bool) { + return getPlanModelGetAmountAttributeTypeOk(o.Amount) } // 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 + _, ok := o.GetAmountOk() + return ok } // SetAmount gets a reference to the given float64 and assigns it to the Amount field. -func (o *PlanModel) SetAmount(v *float64) { - o.Amount = v +func (o *PlanModel) SetAmount(v PlanModelGetAmountRetType) { + setPlanModelGetAmountAttributeType(&o.Amount, v) } // GetBucketSize returns the BucketSize field value -func (o *PlanModel) GetBucketSize() *int64 { - if o == nil || IsNil(o.BucketSize) { - var ret *int64 - return ret - } - - return o.BucketSize +func (o *PlanModel) GetBucketSize() (ret PlanModelGetBucketSizeRetType) { + ret, _ = o.GetBucketSizeOk() + return ret } // 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 +func (o *PlanModel) GetBucketSizeOk() (ret PlanModelGetBucketSizeRetType, ok bool) { + return getPlanModelGetBucketSizeAttributeTypeOk(o.BucketSize) } // SetBucketSize sets field value -func (o *PlanModel) SetBucketSize(v *int64) { - o.BucketSize = v +func (o *PlanModel) SetBucketSize(v PlanModelGetBucketSizeRetType) { + setPlanModelGetBucketSizeAttributeType(&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 +func (o *PlanModel) GetDescription() (res PlanModelGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } // 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 +func (o *PlanModel) GetDescriptionOk() (ret PlanModelGetDescriptionRetType, ok bool) { + return getPlanModelGetDescriptionAttributeTypeOk(o.Description) } // 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 + _, ok := o.GetDescriptionOk() + return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PlanModel) SetDescription(v *string) { - o.Description = v +func (o *PlanModel) SetDescription(v PlanModelGetDescriptionRetType) { + setPlanModelGetDescriptionAttributeType(&o.Description, v) } // GetGrafanaGlobalDashboards returns the GrafanaGlobalDashboards field value -func (o *PlanModel) GetGrafanaGlobalDashboards() *int64 { - if o == nil || IsNil(o.GrafanaGlobalDashboards) { - var ret *int64 - return ret - } - - return o.GrafanaGlobalDashboards +func (o *PlanModel) GetGrafanaGlobalDashboards() (ret PlanModelGetGrafanaGlobalDashboardsRetType) { + ret, _ = o.GetGrafanaGlobalDashboardsOk() + return ret } // 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 +func (o *PlanModel) GetGrafanaGlobalDashboardsOk() (ret PlanModelGetGrafanaGlobalDashboardsRetType, ok bool) { + return getPlanModelGetGrafanaGlobalDashboardsAttributeTypeOk(o.GrafanaGlobalDashboards) } // SetGrafanaGlobalDashboards sets field value -func (o *PlanModel) SetGrafanaGlobalDashboards(v *int64) { - o.GrafanaGlobalDashboards = v +func (o *PlanModel) SetGrafanaGlobalDashboards(v PlanModelGetGrafanaGlobalDashboardsRetType) { + setPlanModelGetGrafanaGlobalDashboardsAttributeType(&o.GrafanaGlobalDashboards, v) } // GetGrafanaGlobalOrgs returns the GrafanaGlobalOrgs field value -func (o *PlanModel) GetGrafanaGlobalOrgs() *int64 { - if o == nil || IsNil(o.GrafanaGlobalOrgs) { - var ret *int64 - return ret - } - - return o.GrafanaGlobalOrgs +func (o *PlanModel) GetGrafanaGlobalOrgs() (ret PlanModelGetGrafanaGlobalOrgsRetType) { + ret, _ = o.GetGrafanaGlobalOrgsOk() + return ret } // 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 +func (o *PlanModel) GetGrafanaGlobalOrgsOk() (ret PlanModelGetGrafanaGlobalOrgsRetType, ok bool) { + return getPlanModelGetGrafanaGlobalOrgsAttributeTypeOk(o.GrafanaGlobalOrgs) } // SetGrafanaGlobalOrgs sets field value -func (o *PlanModel) SetGrafanaGlobalOrgs(v *int64) { - o.GrafanaGlobalOrgs = v +func (o *PlanModel) SetGrafanaGlobalOrgs(v PlanModelGetGrafanaGlobalOrgsRetType) { + setPlanModelGetGrafanaGlobalOrgsAttributeType(&o.GrafanaGlobalOrgs, v) } // GetGrafanaGlobalSessions returns the GrafanaGlobalSessions field value -func (o *PlanModel) GetGrafanaGlobalSessions() *int64 { - if o == nil || IsNil(o.GrafanaGlobalSessions) { - var ret *int64 - return ret - } - - return o.GrafanaGlobalSessions +func (o *PlanModel) GetGrafanaGlobalSessions() (ret PlanModelGetGrafanaGlobalSessionsRetType) { + ret, _ = o.GetGrafanaGlobalSessionsOk() + return ret } // 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 +func (o *PlanModel) GetGrafanaGlobalSessionsOk() (ret PlanModelGetGrafanaGlobalSessionsRetType, ok bool) { + return getPlanModelGetGrafanaGlobalSessionsAttributeTypeOk(o.GrafanaGlobalSessions) } // SetGrafanaGlobalSessions sets field value -func (o *PlanModel) SetGrafanaGlobalSessions(v *int64) { - o.GrafanaGlobalSessions = v +func (o *PlanModel) SetGrafanaGlobalSessions(v PlanModelGetGrafanaGlobalSessionsRetType) { + setPlanModelGetGrafanaGlobalSessionsAttributeType(&o.GrafanaGlobalSessions, v) } // GetGrafanaGlobalUsers returns the GrafanaGlobalUsers field value -func (o *PlanModel) GetGrafanaGlobalUsers() *int64 { - if o == nil || IsNil(o.GrafanaGlobalUsers) { - var ret *int64 - return ret - } - - return o.GrafanaGlobalUsers +func (o *PlanModel) GetGrafanaGlobalUsers() (ret PlanModelGetGrafanaGlobalUsersRetType) { + ret, _ = o.GetGrafanaGlobalUsersOk() + return ret } // 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 +func (o *PlanModel) GetGrafanaGlobalUsersOk() (ret PlanModelGetGrafanaGlobalUsersRetType, ok bool) { + return getPlanModelGetGrafanaGlobalUsersAttributeTypeOk(o.GrafanaGlobalUsers) } // SetGrafanaGlobalUsers sets field value -func (o *PlanModel) SetGrafanaGlobalUsers(v *int64) { - o.GrafanaGlobalUsers = v +func (o *PlanModel) SetGrafanaGlobalUsers(v PlanModelGetGrafanaGlobalUsersRetType) { + setPlanModelGetGrafanaGlobalUsersAttributeType(&o.GrafanaGlobalUsers, v) } // GetId returns the Id field value -func (o *PlanModel) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *PlanModel) GetId() (ret PlanModelGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } // 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 +func (o *PlanModel) GetIdOk() (ret PlanModelGetIdRetType, ok bool) { + return getPlanModelGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *PlanModel) SetId(v *string) { - o.Id = v +func (o *PlanModel) SetId(v PlanModelGetIdRetType) { + setPlanModelGetIdAttributeType(&o.Id, v) } // GetLogsAlert returns the LogsAlert field value -func (o *PlanModel) GetLogsAlert() *int64 { - if o == nil || IsNil(o.LogsAlert) { - var ret *int64 - return ret - } - - return o.LogsAlert +func (o *PlanModel) GetLogsAlert() (ret PlanModelGetLogsAlertRetType) { + ret, _ = o.GetLogsAlertOk() + return ret } // 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 +func (o *PlanModel) GetLogsAlertOk() (ret PlanModelGetLogsAlertRetType, ok bool) { + return getPlanModelGetLogsAlertAttributeTypeOk(o.LogsAlert) } // SetLogsAlert sets field value -func (o *PlanModel) SetLogsAlert(v *int64) { - o.LogsAlert = v +func (o *PlanModel) SetLogsAlert(v PlanModelGetLogsAlertRetType) { + setPlanModelGetLogsAlertAttributeType(&o.LogsAlert, v) } // GetLogsStorage returns the LogsStorage field value -func (o *PlanModel) GetLogsStorage() *int64 { - if o == nil || IsNil(o.LogsStorage) { - var ret *int64 - return ret - } - - return o.LogsStorage +func (o *PlanModel) GetLogsStorage() (ret PlanModelGetLogsStorageRetType) { + ret, _ = o.GetLogsStorageOk() + return ret } // 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 +func (o *PlanModel) GetLogsStorageOk() (ret PlanModelGetLogsStorageRetType, ok bool) { + return getPlanModelGetLogsStorageAttributeTypeOk(o.LogsStorage) } // SetLogsStorage sets field value -func (o *PlanModel) SetLogsStorage(v *int64) { - o.LogsStorage = v +func (o *PlanModel) SetLogsStorage(v PlanModelGetLogsStorageRetType) { + setPlanModelGetLogsStorageAttributeType(&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 +func (o *PlanModel) GetName() (res PlanModelGetNameRetType) { + res, _ = o.GetNameOk() + return } // 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 +func (o *PlanModel) GetNameOk() (ret PlanModelGetNameRetType, ok bool) { + return getPlanModelGetNameAttributeTypeOk(o.Name) } // 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 + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *PlanModel) SetName(v *string) { - o.Name = v +func (o *PlanModel) SetName(v PlanModelGetNameRetType) { + setPlanModelGetNameAttributeType(&o.Name, v) } // GetPlanId returns the PlanId field value -func (o *PlanModel) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - - return o.PlanId +func (o *PlanModel) GetPlanId() (ret PlanModelGetPlanIdRetType) { + ret, _ = o.GetPlanIdOk() + return ret } // 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 +func (o *PlanModel) GetPlanIdOk() (ret PlanModelGetPlanIdRetType, ok bool) { + return getPlanModelGetPlanIdAttributeTypeOk(o.PlanId) } // SetPlanId sets field value -func (o *PlanModel) SetPlanId(v *string) { - o.PlanId = v +func (o *PlanModel) SetPlanId(v PlanModelGetPlanIdRetType) { + setPlanModelGetPlanIdAttributeType(&o.PlanId, v) } // GetSamplesPerScrape returns the SamplesPerScrape field value -func (o *PlanModel) GetSamplesPerScrape() *int64 { - if o == nil || IsNil(o.SamplesPerScrape) { - var ret *int64 - return ret - } - - return o.SamplesPerScrape +func (o *PlanModel) GetSamplesPerScrape() (ret PlanModelGetSamplesPerScrapeRetType) { + ret, _ = o.GetSamplesPerScrapeOk() + return ret } // 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 +func (o *PlanModel) GetSamplesPerScrapeOk() (ret PlanModelGetSamplesPerScrapeRetType, ok bool) { + return getPlanModelGetSamplesPerScrapeAttributeTypeOk(o.SamplesPerScrape) } // SetSamplesPerScrape sets field value -func (o *PlanModel) SetSamplesPerScrape(v *int64) { - o.SamplesPerScrape = v +func (o *PlanModel) SetSamplesPerScrape(v PlanModelGetSamplesPerScrapeRetType) { + setPlanModelGetSamplesPerScrapeAttributeType(&o.SamplesPerScrape, v) } // GetTargetNumber returns the TargetNumber field value -func (o *PlanModel) GetTargetNumber() *int64 { - if o == nil || IsNil(o.TargetNumber) { - var ret *int64 - return ret - } - - return o.TargetNumber +func (o *PlanModel) GetTargetNumber() (ret PlanModelGetTargetNumberRetType) { + ret, _ = o.GetTargetNumberOk() + return ret } // 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 +func (o *PlanModel) GetTargetNumberOk() (ret PlanModelGetTargetNumberRetType, ok bool) { + return getPlanModelGetTargetNumberAttributeTypeOk(o.TargetNumber) } // SetTargetNumber sets field value -func (o *PlanModel) SetTargetNumber(v *int64) { - o.TargetNumber = v +func (o *PlanModel) SetTargetNumber(v PlanModelGetTargetNumberRetType) { + setPlanModelGetTargetNumberAttributeType(&o.TargetNumber, v) } // GetTotalMetricSamples returns the TotalMetricSamples field value -func (o *PlanModel) GetTotalMetricSamples() *int64 { - if o == nil || IsNil(o.TotalMetricSamples) { - var ret *int64 - return ret - } - - return o.TotalMetricSamples +func (o *PlanModel) GetTotalMetricSamples() (ret PlanModelGetTotalMetricSamplesRetType) { + ret, _ = o.GetTotalMetricSamplesOk() + return ret } // 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 +func (o *PlanModel) GetTotalMetricSamplesOk() (ret PlanModelGetTotalMetricSamplesRetType, ok bool) { + return getPlanModelGetTotalMetricSamplesAttributeTypeOk(o.TotalMetricSamples) } // SetTotalMetricSamples sets field value -func (o *PlanModel) SetTotalMetricSamples(v *int64) { - o.TotalMetricSamples = v +func (o *PlanModel) SetTotalMetricSamples(v PlanModelGetTotalMetricSamplesRetType) { + setPlanModelGetTotalMetricSamplesAttributeType(&o.TotalMetricSamples, v) } // GetTracesStorage returns the TracesStorage field value -func (o *PlanModel) GetTracesStorage() *int64 { - if o == nil || IsNil(o.TracesStorage) { - var ret *int64 - return ret - } - - return o.TracesStorage +func (o *PlanModel) GetTracesStorage() (ret PlanModelGetTracesStorageRetType) { + ret, _ = o.GetTracesStorageOk() + return ret } // 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 +func (o *PlanModel) GetTracesStorageOk() (ret PlanModelGetTracesStorageRetType, ok bool) { + return getPlanModelGetTracesStorageAttributeTypeOk(o.TracesStorage) } // SetTracesStorage sets field value -func (o *PlanModel) SetTracesStorage(v *int64) { - o.TracesStorage = v +func (o *PlanModel) SetTracesStorage(v PlanModelGetTracesStorageRetType) { + setPlanModelGetTracesStorageAttributeType(&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 + if val, ok := getPlanModelGetAlertMatchersAttributeTypeOk(o.AlertMatchers); ok { + toSerialize["AlertMatchers"] = val + } + if val, ok := getPlanModelGetAlertReceiversAttributeTypeOk(o.AlertReceivers); ok { + toSerialize["AlertReceivers"] = val + } + if val, ok := getPlanModelGetAlertRulesAttributeTypeOk(o.AlertRules); ok { + toSerialize["AlertRules"] = val + } + if val, ok := getPlanModelGetAmountAttributeTypeOk(o.Amount); ok { + toSerialize["Amount"] = val + } + if val, ok := getPlanModelGetBucketSizeAttributeTypeOk(o.BucketSize); ok { + toSerialize["BucketSize"] = val + } + if val, ok := getPlanModelGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getPlanModelGetGrafanaGlobalDashboardsAttributeTypeOk(o.GrafanaGlobalDashboards); ok { + toSerialize["GrafanaGlobalDashboards"] = val + } + if val, ok := getPlanModelGetGrafanaGlobalOrgsAttributeTypeOk(o.GrafanaGlobalOrgs); ok { + toSerialize["GrafanaGlobalOrgs"] = val + } + if val, ok := getPlanModelGetGrafanaGlobalSessionsAttributeTypeOk(o.GrafanaGlobalSessions); ok { + toSerialize["GrafanaGlobalSessions"] = val + } + if val, ok := getPlanModelGetGrafanaGlobalUsersAttributeTypeOk(o.GrafanaGlobalUsers); ok { + toSerialize["GrafanaGlobalUsers"] = val + } + if val, ok := getPlanModelGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getPlanModelGetLogsAlertAttributeTypeOk(o.LogsAlert); ok { + toSerialize["LogsAlert"] = val + } + if val, ok := getPlanModelGetLogsStorageAttributeTypeOk(o.LogsStorage); ok { + toSerialize["LogsStorage"] = val + } + if val, ok := getPlanModelGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getPlanModelGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val + } + if val, ok := getPlanModelGetSamplesPerScrapeAttributeTypeOk(o.SamplesPerScrape); ok { + toSerialize["SamplesPerScrape"] = val + } + if val, ok := getPlanModelGetTargetNumberAttributeTypeOk(o.TargetNumber); ok { + toSerialize["TargetNumber"] = val + } + if val, ok := getPlanModelGetTotalMetricSamplesAttributeTypeOk(o.TotalMetricSamples); ok { + toSerialize["TotalMetricSamples"] = val + } + if val, ok := getPlanModelGetTracesStorageAttributeTypeOk(o.TracesStorage); ok { + toSerialize["TracesStorage"] = val + } return toSerialize, nil } diff --git a/services/observability/model_plans_response.go b/services/observability/model_plans_response.go index 076fb663e..d81b43f95 100644 --- a/services/observability/model_plans_response.go +++ b/services/observability/model_plans_response.go @@ -17,12 +17,53 @@ import ( // checks if the PlansResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PlansResponse{} +/* + types and functions for message +*/ + +// isNotNullableString +type PlansResponseGetMessageAttributeType = *string + +func getPlansResponseGetMessageAttributeTypeOk(arg PlansResponseGetMessageAttributeType) (ret PlansResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlansResponseGetMessageAttributeType(arg *PlansResponseGetMessageAttributeType, val PlansResponseGetMessageRetType) { + *arg = &val +} + +type PlansResponseGetMessageArgType = string +type PlansResponseGetMessageRetType = string + +/* + types and functions for plans +*/ + +// isArray +type PlansResponseGetPlansAttributeType = *[]Plan +type PlansResponseGetPlansArgType = []Plan +type PlansResponseGetPlansRetType = []Plan + +func getPlansResponseGetPlansAttributeTypeOk(arg PlansResponseGetPlansAttributeType) (ret PlansResponseGetPlansRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlansResponseGetPlansAttributeType(arg *PlansResponseGetPlansAttributeType, val PlansResponseGetPlansRetType) { + *arg = &val +} + // PlansResponse struct for PlansResponse type PlansResponse struct { // REQUIRED - Message *string `json:"message"` + Message PlansResponseGetMessageAttributeType `json:"message"` // REQUIRED - Plans *[]Plan `json:"plans"` + Plans PlansResponseGetPlansAttributeType `json:"plans"` } type _PlansResponse PlansResponse @@ -31,10 +72,10 @@ type _PlansResponse PlansResponse // 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 { +func NewPlansResponse(message PlansResponseGetMessageArgType, plans PlansResponseGetPlansArgType) *PlansResponse { this := PlansResponse{} - this.Message = message - this.Plans = plans + setPlansResponseGetMessageAttributeType(&this.Message, message) + setPlansResponseGetPlansAttributeType(&this.Plans, plans) return &this } @@ -47,57 +88,47 @@ func NewPlansResponseWithDefaults() *PlansResponse { } // GetMessage returns the Message field value -func (o *PlansResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *PlansResponse) GetMessage() (ret PlansResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *PlansResponse) GetMessageOk() (ret PlansResponseGetMessageRetType, ok bool) { + return getPlansResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *PlansResponse) SetMessage(v *string) { - o.Message = v +func (o *PlansResponse) SetMessage(v PlansResponseGetMessageRetType) { + setPlansResponseGetMessageAttributeType(&o.Message, v) } // GetPlans returns the Plans field value -func (o *PlansResponse) GetPlans() *[]Plan { - if o == nil || IsNil(o.Plans) { - var ret *[]Plan - return ret - } - - return o.Plans +func (o *PlansResponse) GetPlans() (ret PlansResponseGetPlansRetType) { + ret, _ = o.GetPlansOk() + return ret } // 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 +func (o *PlansResponse) GetPlansOk() (ret PlansResponseGetPlansRetType, ok bool) { + return getPlansResponseGetPlansAttributeTypeOk(o.Plans) } // SetPlans sets field value -func (o *PlansResponse) SetPlans(v *[]Plan) { - o.Plans = v +func (o *PlansResponse) SetPlans(v PlansResponseGetPlansRetType) { + setPlansResponseGetPlansAttributeType(&o.Plans, v) } func (o PlansResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["plans"] = o.Plans + if val, ok := getPlansResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getPlansResponseGetPlansAttributeTypeOk(o.Plans); ok { + toSerialize["Plans"] = val + } return toSerialize, nil } diff --git a/services/observability/model_project_instance_full.go b/services/observability/model_project_instance_full.go index 952cca613..c8b417187 100644 --- a/services/observability/model_project_instance_full.go +++ b/services/observability/model_project_instance_full.go @@ -17,20 +17,170 @@ import ( // checks if the ProjectInstanceFull type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ProjectInstanceFull{} +/* + types and functions for error +*/ + +// isNullableString +type ProjectInstanceFullGetErrorAttributeType = *NullableString + +func getProjectInstanceFullGetErrorAttributeTypeOk(arg ProjectInstanceFullGetErrorAttributeType) (ret ProjectInstanceFullGetErrorRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setProjectInstanceFullGetErrorAttributeType(arg *ProjectInstanceFullGetErrorAttributeType, val ProjectInstanceFullGetErrorRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type ProjectInstanceFullGetErrorArgType = *string +type ProjectInstanceFullGetErrorRetType = *string + +/* + types and functions for id +*/ + +// isNotNullableString +type ProjectInstanceFullGetIdAttributeType = *string + +func getProjectInstanceFullGetIdAttributeTypeOk(arg ProjectInstanceFullGetIdAttributeType) (ret ProjectInstanceFullGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setProjectInstanceFullGetIdAttributeType(arg *ProjectInstanceFullGetIdAttributeType, val ProjectInstanceFullGetIdRetType) { + *arg = &val +} + +type ProjectInstanceFullGetIdArgType = string +type ProjectInstanceFullGetIdRetType = string + +/* + types and functions for instance +*/ + +// isNotNullableString +type ProjectInstanceFullGetInstanceAttributeType = *string + +func getProjectInstanceFullGetInstanceAttributeTypeOk(arg ProjectInstanceFullGetInstanceAttributeType) (ret ProjectInstanceFullGetInstanceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setProjectInstanceFullGetInstanceAttributeType(arg *ProjectInstanceFullGetInstanceAttributeType, val ProjectInstanceFullGetInstanceRetType) { + *arg = &val +} + +type ProjectInstanceFullGetInstanceArgType = string +type ProjectInstanceFullGetInstanceRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type ProjectInstanceFullGetNameAttributeType = *string + +func getProjectInstanceFullGetNameAttributeTypeOk(arg ProjectInstanceFullGetNameAttributeType) (ret ProjectInstanceFullGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setProjectInstanceFullGetNameAttributeType(arg *ProjectInstanceFullGetNameAttributeType, val ProjectInstanceFullGetNameRetType) { + *arg = &val +} + +type ProjectInstanceFullGetNameArgType = string +type ProjectInstanceFullGetNameRetType = string + +/* + types and functions for planName +*/ + +// isNotNullableString +type ProjectInstanceFullGetPlanNameAttributeType = *string + +func getProjectInstanceFullGetPlanNameAttributeTypeOk(arg ProjectInstanceFullGetPlanNameAttributeType) (ret ProjectInstanceFullGetPlanNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setProjectInstanceFullGetPlanNameAttributeType(arg *ProjectInstanceFullGetPlanNameAttributeType, val ProjectInstanceFullGetPlanNameRetType) { + *arg = &val +} + +type ProjectInstanceFullGetPlanNameArgType = string +type ProjectInstanceFullGetPlanNameRetType = string + +/* + types and functions for serviceName +*/ + +// isNotNullableString +type ProjectInstanceFullGetServiceNameAttributeType = *string + +func getProjectInstanceFullGetServiceNameAttributeTypeOk(arg ProjectInstanceFullGetServiceNameAttributeType) (ret ProjectInstanceFullGetServiceNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setProjectInstanceFullGetServiceNameAttributeType(arg *ProjectInstanceFullGetServiceNameAttributeType, val ProjectInstanceFullGetServiceNameRetType) { + *arg = &val +} + +type ProjectInstanceFullGetServiceNameArgType = string +type ProjectInstanceFullGetServiceNameRetType = string + +/* + types and functions for status +*/ + +// isEnumRef +type ProjectInstanceFullGetStatusAttributeType = *string +type ProjectInstanceFullGetStatusArgType = string +type ProjectInstanceFullGetStatusRetType = string + +func getProjectInstanceFullGetStatusAttributeTypeOk(arg ProjectInstanceFullGetStatusAttributeType) (ret ProjectInstanceFullGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setProjectInstanceFullGetStatusAttributeType(arg *ProjectInstanceFullGetStatusAttributeType, val ProjectInstanceFullGetStatusRetType) { + *arg = &val +} + // ProjectInstanceFull struct for ProjectInstanceFull type ProjectInstanceFull struct { - Error *NullableString `json:"error,omitempty"` + Error ProjectInstanceFullGetErrorAttributeType `json:"error,omitempty"` // REQUIRED - Id *string `json:"id"` + Id ProjectInstanceFullGetIdAttributeType `json:"id"` // REQUIRED - Instance *string `json:"instance"` - Name *string `json:"name,omitempty"` + Instance ProjectInstanceFullGetInstanceAttributeType `json:"instance"` + Name ProjectInstanceFullGetNameAttributeType `json:"name,omitempty"` // REQUIRED - PlanName *string `json:"planName"` + PlanName ProjectInstanceFullGetPlanNameAttributeType `json:"planName"` // REQUIRED - ServiceName *string `json:"serviceName"` + ServiceName ProjectInstanceFullGetServiceNameAttributeType `json:"serviceName"` // REQUIRED - Status *string `json:"status"` + Status ProjectInstanceFullGetStatusAttributeType `json:"status"` } type _ProjectInstanceFull ProjectInstanceFull @@ -39,13 +189,13 @@ type _ProjectInstanceFull ProjectInstanceFull // 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 { +func NewProjectInstanceFull(id ProjectInstanceFullGetIdArgType, instance ProjectInstanceFullGetInstanceArgType, planName ProjectInstanceFullGetPlanNameArgType, serviceName ProjectInstanceFullGetServiceNameArgType, status ProjectInstanceFullGetStatusArgType) *ProjectInstanceFull { this := ProjectInstanceFull{} - this.Id = id - this.Instance = instance - this.PlanName = planName - this.ServiceName = serviceName - this.Status = status + setProjectInstanceFullGetIdAttributeType(&this.Id, id) + setProjectInstanceFullGetInstanceAttributeType(&this.Instance, instance) + setProjectInstanceFullGetPlanNameAttributeType(&this.PlanName, planName) + setProjectInstanceFullGetServiceNameAttributeType(&this.ServiceName, serviceName) + setProjectInstanceFullGetStatusAttributeType(&this.Status, status) return &this } @@ -58,222 +208,170 @@ func NewProjectInstanceFullWithDefaults() *ProjectInstanceFull { } // 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) || IsNil(o.Error.Get()) { - var ret *string - return ret - } - return o.Error.Get() +func (o *ProjectInstanceFull) GetError() (res ProjectInstanceFullGetErrorRetType) { + res, _ = o.GetErrorOk() + return } // 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 || IsNil(o.Error) { - return nil, false - } - return o.Error.Get(), o.Error.IsSet() +func (o *ProjectInstanceFull) GetErrorOk() (ret ProjectInstanceFullGetErrorRetType, ok bool) { + return getProjectInstanceFullGetErrorAttributeTypeOk(o.Error) } // HasError returns a boolean if a field has been set. func (o *ProjectInstanceFull) HasError() bool { - if o != nil && !IsNil(o.Error) && o.Error.IsSet() { - return true - } - - return false + _, ok := o.GetErrorOk() + return ok } // SetError gets a reference to the given string and assigns it to the Error field. -func (o *ProjectInstanceFull) SetError(v *string) { - if IsNil(o.Error) { - o.Error = new(NullableString) - } - o.Error.Set(v) +func (o *ProjectInstanceFull) SetError(v ProjectInstanceFullGetErrorRetType) { + setProjectInstanceFullGetErrorAttributeType(&o.Error, v) } // SetErrorNil sets the value for Error to be an explicit nil func (o *ProjectInstanceFull) SetErrorNil() { - if IsNil(o.Error) { - o.Error = new(NullableString) - } - o.Error.Set(nil) + o.Error = nil } // UnsetError ensures that no value is present for Error, not even an explicit nil func (o *ProjectInstanceFull) UnsetError() { - if IsNil(o.Error) { - o.Error = new(NullableString) - } - o.Error.Unset() + o.Error = nil } // GetId returns the Id field value -func (o *ProjectInstanceFull) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *ProjectInstanceFull) GetId() (ret ProjectInstanceFullGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } // 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 +func (o *ProjectInstanceFull) GetIdOk() (ret ProjectInstanceFullGetIdRetType, ok bool) { + return getProjectInstanceFullGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *ProjectInstanceFull) SetId(v *string) { - o.Id = v +func (o *ProjectInstanceFull) SetId(v ProjectInstanceFullGetIdRetType) { + setProjectInstanceFullGetIdAttributeType(&o.Id, v) } // GetInstance returns the Instance field value -func (o *ProjectInstanceFull) GetInstance() *string { - if o == nil || IsNil(o.Instance) { - var ret *string - return ret - } - - return o.Instance +func (o *ProjectInstanceFull) GetInstance() (ret ProjectInstanceFullGetInstanceRetType) { + ret, _ = o.GetInstanceOk() + return ret } // 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 +func (o *ProjectInstanceFull) GetInstanceOk() (ret ProjectInstanceFullGetInstanceRetType, ok bool) { + return getProjectInstanceFullGetInstanceAttributeTypeOk(o.Instance) } // SetInstance sets field value -func (o *ProjectInstanceFull) SetInstance(v *string) { - o.Instance = v +func (o *ProjectInstanceFull) SetInstance(v ProjectInstanceFullGetInstanceRetType) { + setProjectInstanceFullGetInstanceAttributeType(&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 +func (o *ProjectInstanceFull) GetName() (res ProjectInstanceFullGetNameRetType) { + res, _ = o.GetNameOk() + return } // 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 +func (o *ProjectInstanceFull) GetNameOk() (ret ProjectInstanceFullGetNameRetType, ok bool) { + return getProjectInstanceFullGetNameAttributeTypeOk(o.Name) } // 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 + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *ProjectInstanceFull) SetName(v *string) { - o.Name = v +func (o *ProjectInstanceFull) SetName(v ProjectInstanceFullGetNameRetType) { + setProjectInstanceFullGetNameAttributeType(&o.Name, v) } // GetPlanName returns the PlanName field value -func (o *ProjectInstanceFull) GetPlanName() *string { - if o == nil || IsNil(o.PlanName) { - var ret *string - return ret - } - - return o.PlanName +func (o *ProjectInstanceFull) GetPlanName() (ret ProjectInstanceFullGetPlanNameRetType) { + ret, _ = o.GetPlanNameOk() + return ret } // 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 +func (o *ProjectInstanceFull) GetPlanNameOk() (ret ProjectInstanceFullGetPlanNameRetType, ok bool) { + return getProjectInstanceFullGetPlanNameAttributeTypeOk(o.PlanName) } // SetPlanName sets field value -func (o *ProjectInstanceFull) SetPlanName(v *string) { - o.PlanName = v +func (o *ProjectInstanceFull) SetPlanName(v ProjectInstanceFullGetPlanNameRetType) { + setProjectInstanceFullGetPlanNameAttributeType(&o.PlanName, v) } // GetServiceName returns the ServiceName field value -func (o *ProjectInstanceFull) GetServiceName() *string { - if o == nil || IsNil(o.ServiceName) { - var ret *string - return ret - } - - return o.ServiceName +func (o *ProjectInstanceFull) GetServiceName() (ret ProjectInstanceFullGetServiceNameRetType) { + ret, _ = o.GetServiceNameOk() + return ret } // 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 +func (o *ProjectInstanceFull) GetServiceNameOk() (ret ProjectInstanceFullGetServiceNameRetType, ok bool) { + return getProjectInstanceFullGetServiceNameAttributeTypeOk(o.ServiceName) } // SetServiceName sets field value -func (o *ProjectInstanceFull) SetServiceName(v *string) { - o.ServiceName = v +func (o *ProjectInstanceFull) SetServiceName(v ProjectInstanceFullGetServiceNameRetType) { + setProjectInstanceFullGetServiceNameAttributeType(&o.ServiceName, v) } // GetStatus returns the Status field value -func (o *ProjectInstanceFull) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - - return o.Status +func (o *ProjectInstanceFull) GetStatus() (ret ProjectInstanceFullGetStatusRetType) { + ret, _ = o.GetStatusOk() + return ret } // 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 +func (o *ProjectInstanceFull) GetStatusOk() (ret ProjectInstanceFullGetStatusRetType, ok bool) { + return getProjectInstanceFullGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value -func (o *ProjectInstanceFull) SetStatus(v *string) { - o.Status = v +func (o *ProjectInstanceFull) SetStatus(v ProjectInstanceFullGetStatusRetType) { + setProjectInstanceFullGetStatusAttributeType(&o.Status, v) } func (o ProjectInstanceFull) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Error.IsSet() { - toSerialize["error"] = o.Error.Get() + if val, ok := getProjectInstanceFullGetErrorAttributeTypeOk(o.Error); ok { + toSerialize["Error"] = val + } + if val, ok := getProjectInstanceFullGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getProjectInstanceFullGetInstanceAttributeTypeOk(o.Instance); ok { + toSerialize["Instance"] = val + } + if val, ok := getProjectInstanceFullGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getProjectInstanceFullGetPlanNameAttributeTypeOk(o.PlanName); ok { + toSerialize["PlanName"] = val + } + if val, ok := getProjectInstanceFullGetServiceNameAttributeTypeOk(o.ServiceName); ok { + toSerialize["ServiceName"] = val } - toSerialize["id"] = o.Id - toSerialize["instance"] = o.Instance - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getProjectInstanceFullGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val } - toSerialize["planName"] = o.PlanName - toSerialize["serviceName"] = o.ServiceName - toSerialize["status"] = o.Status return toSerialize, nil } diff --git a/services/observability/model_receiver.go b/services/observability/model_receiver.go index 9d07f0b9c..87e9c54cb 100644 --- a/services/observability/model_receiver.go +++ b/services/observability/model_receiver.go @@ -17,12 +17,53 @@ import ( // checks if the Receiver type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Receiver{} +/* + types and functions for data +*/ + +// isModel +type ReceiverGetDataAttributeType = *Receivers +type ReceiverGetDataArgType = Receivers +type ReceiverGetDataRetType = Receivers + +func getReceiverGetDataAttributeTypeOk(arg ReceiverGetDataAttributeType) (ret ReceiverGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setReceiverGetDataAttributeType(arg *ReceiverGetDataAttributeType, val ReceiverGetDataRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ReceiverGetMessageAttributeType = *string + +func getReceiverGetMessageAttributeTypeOk(arg ReceiverGetMessageAttributeType) (ret ReceiverGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setReceiverGetMessageAttributeType(arg *ReceiverGetMessageAttributeType, val ReceiverGetMessageRetType) { + *arg = &val +} + +type ReceiverGetMessageArgType = string +type ReceiverGetMessageRetType = string + // Receiver struct for Receiver type Receiver struct { // REQUIRED - Data *Receivers `json:"data"` + Data ReceiverGetDataAttributeType `json:"data"` // REQUIRED - Message *string `json:"message"` + Message ReceiverGetMessageAttributeType `json:"message"` } type _Receiver Receiver @@ -31,10 +72,10 @@ type _Receiver Receiver // 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 { +func NewReceiver(data ReceiverGetDataArgType, message ReceiverGetMessageArgType) *Receiver { this := Receiver{} - this.Data = data - this.Message = message + setReceiverGetDataAttributeType(&this.Data, data) + setReceiverGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewReceiverWithDefaults() *Receiver { } // GetData returns the Data field value -func (o *Receiver) GetData() *Receivers { - if o == nil || IsNil(o.Data) { - var ret *Receivers - return ret - } - - return o.Data +func (o *Receiver) GetData() (ret ReceiverGetDataRetType) { + ret, _ = o.GetDataOk() + return ret } // 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 +func (o *Receiver) GetDataOk() (ret ReceiverGetDataRetType, ok bool) { + return getReceiverGetDataAttributeTypeOk(o.Data) } // SetData sets field value -func (o *Receiver) SetData(v *Receivers) { - o.Data = v +func (o *Receiver) SetData(v ReceiverGetDataRetType) { + setReceiverGetDataAttributeType(&o.Data, v) } // GetMessage returns the Message field value -func (o *Receiver) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *Receiver) GetMessage() (ret ReceiverGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *Receiver) GetMessageOk() (ret ReceiverGetMessageRetType, ok bool) { + return getReceiverGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *Receiver) SetMessage(v *string) { - o.Message = v +func (o *Receiver) SetMessage(v ReceiverGetMessageRetType) { + setReceiverGetMessageAttributeType(&o.Message, v) } func (o Receiver) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["data"] = o.Data - toSerialize["message"] = o.Message + if val, ok := getReceiverGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getReceiverGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_receivers.go b/services/observability/model_receivers.go index f7804655b..ee407d6fb 100644 --- a/services/observability/model_receivers.go +++ b/services/observability/model_receivers.go @@ -17,13 +17,94 @@ import ( // checks if the Receivers type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Receivers{} +/* + types and functions for emailConfigs +*/ + +// isArray +type ReceiversGetEmailConfigsAttributeType = *[]EmailConfig +type ReceiversGetEmailConfigsArgType = []EmailConfig +type ReceiversGetEmailConfigsRetType = []EmailConfig + +func getReceiversGetEmailConfigsAttributeTypeOk(arg ReceiversGetEmailConfigsAttributeType) (ret ReceiversGetEmailConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setReceiversGetEmailConfigsAttributeType(arg *ReceiversGetEmailConfigsAttributeType, val ReceiversGetEmailConfigsRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type ReceiversGetNameAttributeType = *string + +func getReceiversGetNameAttributeTypeOk(arg ReceiversGetNameAttributeType) (ret ReceiversGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setReceiversGetNameAttributeType(arg *ReceiversGetNameAttributeType, val ReceiversGetNameRetType) { + *arg = &val +} + +type ReceiversGetNameArgType = string +type ReceiversGetNameRetType = string + +/* + types and functions for opsgenieConfigs +*/ + +// isArray +type ReceiversGetOpsgenieConfigsAttributeType = *[]OpsgenieConfig +type ReceiversGetOpsgenieConfigsArgType = []OpsgenieConfig +type ReceiversGetOpsgenieConfigsRetType = []OpsgenieConfig + +func getReceiversGetOpsgenieConfigsAttributeTypeOk(arg ReceiversGetOpsgenieConfigsAttributeType) (ret ReceiversGetOpsgenieConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setReceiversGetOpsgenieConfigsAttributeType(arg *ReceiversGetOpsgenieConfigsAttributeType, val ReceiversGetOpsgenieConfigsRetType) { + *arg = &val +} + +/* + types and functions for webHookConfigs +*/ + +// isArray +type ReceiversGetWebHookConfigsAttributeType = *[]WebHook +type ReceiversGetWebHookConfigsArgType = []WebHook +type ReceiversGetWebHookConfigsRetType = []WebHook + +func getReceiversGetWebHookConfigsAttributeTypeOk(arg ReceiversGetWebHookConfigsAttributeType) (ret ReceiversGetWebHookConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setReceiversGetWebHookConfigsAttributeType(arg *ReceiversGetWebHookConfigsAttributeType, val ReceiversGetWebHookConfigsRetType) { + *arg = &val +} + // Receivers struct for Receivers type Receivers struct { - EmailConfigs *[]EmailConfig `json:"emailConfigs,omitempty"` + EmailConfigs ReceiversGetEmailConfigsAttributeType `json:"emailConfigs,omitempty"` // REQUIRED - Name *string `json:"name"` - OpsgenieConfigs *[]OpsgenieConfig `json:"opsgenieConfigs,omitempty"` - WebHookConfigs *[]WebHook `json:"webHookConfigs,omitempty"` + Name ReceiversGetNameAttributeType `json:"name"` + OpsgenieConfigs ReceiversGetOpsgenieConfigsAttributeType `json:"opsgenieConfigs,omitempty"` + WebHookConfigs ReceiversGetWebHookConfigsAttributeType `json:"webHookConfigs,omitempty"` } type _Receivers Receivers @@ -32,9 +113,9 @@ type _Receivers Receivers // 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 { +func NewReceivers(name ReceiversGetNameArgType) *Receivers { this := Receivers{} - this.Name = name + setReceiversGetNameAttributeType(&this.Name, name) return &this } @@ -47,136 +128,104 @@ func NewReceiversWithDefaults() *Receivers { } // 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 +func (o *Receivers) GetEmailConfigs() (res ReceiversGetEmailConfigsRetType) { + res, _ = o.GetEmailConfigsOk() + return } // 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 +func (o *Receivers) GetEmailConfigsOk() (ret ReceiversGetEmailConfigsRetType, ok bool) { + return getReceiversGetEmailConfigsAttributeTypeOk(o.EmailConfigs) } // 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 + _, ok := o.GetEmailConfigsOk() + return ok } // SetEmailConfigs gets a reference to the given []EmailConfig and assigns it to the EmailConfigs field. -func (o *Receivers) SetEmailConfigs(v *[]EmailConfig) { - o.EmailConfigs = v +func (o *Receivers) SetEmailConfigs(v ReceiversGetEmailConfigsRetType) { + setReceiversGetEmailConfigsAttributeType(&o.EmailConfigs, v) } // GetName returns the Name field value -func (o *Receivers) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *Receivers) GetName() (ret ReceiversGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // 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 +func (o *Receivers) GetNameOk() (ret ReceiversGetNameRetType, ok bool) { + return getReceiversGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *Receivers) SetName(v *string) { - o.Name = v +func (o *Receivers) SetName(v ReceiversGetNameRetType) { + setReceiversGetNameAttributeType(&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 +func (o *Receivers) GetOpsgenieConfigs() (res ReceiversGetOpsgenieConfigsRetType) { + res, _ = o.GetOpsgenieConfigsOk() + return } // 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 +func (o *Receivers) GetOpsgenieConfigsOk() (ret ReceiversGetOpsgenieConfigsRetType, ok bool) { + return getReceiversGetOpsgenieConfigsAttributeTypeOk(o.OpsgenieConfigs) } // 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 + _, ok := o.GetOpsgenieConfigsOk() + return ok } // SetOpsgenieConfigs gets a reference to the given []OpsgenieConfig and assigns it to the OpsgenieConfigs field. -func (o *Receivers) SetOpsgenieConfigs(v *[]OpsgenieConfig) { - o.OpsgenieConfigs = v +func (o *Receivers) SetOpsgenieConfigs(v ReceiversGetOpsgenieConfigsRetType) { + setReceiversGetOpsgenieConfigsAttributeType(&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 +func (o *Receivers) GetWebHookConfigs() (res ReceiversGetWebHookConfigsRetType) { + res, _ = o.GetWebHookConfigsOk() + return } // 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 +func (o *Receivers) GetWebHookConfigsOk() (ret ReceiversGetWebHookConfigsRetType, ok bool) { + return getReceiversGetWebHookConfigsAttributeTypeOk(o.WebHookConfigs) } // 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 + _, ok := o.GetWebHookConfigsOk() + return ok } // 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) SetWebHookConfigs(v ReceiversGetWebHookConfigsRetType) { + setReceiversGetWebHookConfigsAttributeType(&o.WebHookConfigs, v) } func (o Receivers) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.EmailConfigs) { - toSerialize["emailConfigs"] = o.EmailConfigs + if val, ok := getReceiversGetEmailConfigsAttributeTypeOk(o.EmailConfigs); ok { + toSerialize["EmailConfigs"] = val + } + if val, ok := getReceiversGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - toSerialize["name"] = o.Name - if !IsNil(o.OpsgenieConfigs) { - toSerialize["opsgenieConfigs"] = o.OpsgenieConfigs + if val, ok := getReceiversGetOpsgenieConfigsAttributeTypeOk(o.OpsgenieConfigs); ok { + toSerialize["OpsgenieConfigs"] = val } - if !IsNil(o.WebHookConfigs) { - toSerialize["webHookConfigs"] = o.WebHookConfigs + if val, ok := getReceiversGetWebHookConfigsAttributeTypeOk(o.WebHookConfigs); ok { + toSerialize["WebHookConfigs"] = val } return toSerialize, nil } diff --git a/services/observability/model_route.go b/services/observability/model_route.go index e790a42db..61a304f48 100644 --- a/services/observability/model_route.go +++ b/services/observability/model_route.go @@ -17,18 +17,202 @@ import ( // checks if the Route type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Route{} +/* + types and functions for continue +*/ + +// isBoolean +type RoutegetContinueAttributeType = *bool +type RoutegetContinueArgType = bool +type RoutegetContinueRetType = bool + +func getRoutegetContinueAttributeTypeOk(arg RoutegetContinueAttributeType) (ret RoutegetContinueRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRoutegetContinueAttributeType(arg *RoutegetContinueAttributeType, val RoutegetContinueRetType) { + *arg = &val +} + +/* + types and functions for groupBy +*/ + +// isArray +type RouteGetGroupByAttributeType = *[]string +type RouteGetGroupByArgType = []string +type RouteGetGroupByRetType = []string + +func getRouteGetGroupByAttributeTypeOk(arg RouteGetGroupByAttributeType) (ret RouteGetGroupByRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteGetGroupByAttributeType(arg *RouteGetGroupByAttributeType, val RouteGetGroupByRetType) { + *arg = &val +} + +/* + types and functions for groupInterval +*/ + +// isNotNullableString +type RouteGetGroupIntervalAttributeType = *string + +func getRouteGetGroupIntervalAttributeTypeOk(arg RouteGetGroupIntervalAttributeType) (ret RouteGetGroupIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteGetGroupIntervalAttributeType(arg *RouteGetGroupIntervalAttributeType, val RouteGetGroupIntervalRetType) { + *arg = &val +} + +type RouteGetGroupIntervalArgType = string +type RouteGetGroupIntervalRetType = string + +/* + types and functions for groupWait +*/ + +// isNotNullableString +type RouteGetGroupWaitAttributeType = *string + +func getRouteGetGroupWaitAttributeTypeOk(arg RouteGetGroupWaitAttributeType) (ret RouteGetGroupWaitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteGetGroupWaitAttributeType(arg *RouteGetGroupWaitAttributeType, val RouteGetGroupWaitRetType) { + *arg = &val +} + +type RouteGetGroupWaitArgType = string +type RouteGetGroupWaitRetType = string + +/* + types and functions for match +*/ + +// isContainer +type RouteGetMatchAttributeType = *map[string]string +type RouteGetMatchArgType = map[string]string +type RouteGetMatchRetType = map[string]string + +func getRouteGetMatchAttributeTypeOk(arg RouteGetMatchAttributeType) (ret RouteGetMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteGetMatchAttributeType(arg *RouteGetMatchAttributeType, val RouteGetMatchRetType) { + *arg = &val +} + +/* + types and functions for matchRe +*/ + +// isContainer +type RouteGetMatchReAttributeType = *map[string]string +type RouteGetMatchReArgType = map[string]string +type RouteGetMatchReRetType = map[string]string + +func getRouteGetMatchReAttributeTypeOk(arg RouteGetMatchReAttributeType) (ret RouteGetMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteGetMatchReAttributeType(arg *RouteGetMatchReAttributeType, val RouteGetMatchReRetType) { + *arg = &val +} + +/* + types and functions for receiver +*/ + +// isNotNullableString +type RouteGetReceiverAttributeType = *string + +func getRouteGetReceiverAttributeTypeOk(arg RouteGetReceiverAttributeType) (ret RouteGetReceiverRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteGetReceiverAttributeType(arg *RouteGetReceiverAttributeType, val RouteGetReceiverRetType) { + *arg = &val +} + +type RouteGetReceiverArgType = string +type RouteGetReceiverRetType = string + +/* + types and functions for repeatInterval +*/ + +// isNotNullableString +type RouteGetRepeatIntervalAttributeType = *string + +func getRouteGetRepeatIntervalAttributeTypeOk(arg RouteGetRepeatIntervalAttributeType) (ret RouteGetRepeatIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteGetRepeatIntervalAttributeType(arg *RouteGetRepeatIntervalAttributeType, val RouteGetRepeatIntervalRetType) { + *arg = &val +} + +type RouteGetRepeatIntervalArgType = string +type RouteGetRepeatIntervalRetType = string + +/* + types and functions for routes +*/ + +// isArray +type RouteGetRoutesAttributeType = *[]RouteSerializer +type RouteGetRoutesArgType = []RouteSerializer +type RouteGetRoutesRetType = []RouteSerializer + +func getRouteGetRoutesAttributeTypeOk(arg RouteGetRoutesAttributeType) (ret RouteGetRoutesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteGetRoutesAttributeType(arg *RouteGetRoutesAttributeType, val RouteGetRoutesRetType) { + *arg = &val +} + // Route struct for Route type Route struct { - Continue *bool `json:"continue,omitempty"` - GroupBy *[]string `json:"groupBy,omitempty"` - GroupInterval *string `json:"groupInterval,omitempty"` - GroupWait *string `json:"groupWait,omitempty"` - Match *map[string]string `json:"match,omitempty"` - MatchRe *map[string]string `json:"matchRe,omitempty"` + Continue RoutegetContinueAttributeType `json:"continue,omitempty"` + GroupBy RouteGetGroupByAttributeType `json:"groupBy,omitempty"` + GroupInterval RouteGetGroupIntervalAttributeType `json:"groupInterval,omitempty"` + GroupWait RouteGetGroupWaitAttributeType `json:"groupWait,omitempty"` + Match RouteGetMatchAttributeType `json:"match,omitempty"` + MatchRe RouteGetMatchReAttributeType `json:"matchRe,omitempty"` // REQUIRED - Receiver *string `json:"receiver"` - RepeatInterval *string `json:"repeatInterval,omitempty"` - Routes *[]RouteSerializer `json:"routes,omitempty"` + Receiver RouteGetReceiverAttributeType `json:"receiver"` + RepeatInterval RouteGetRepeatIntervalAttributeType `json:"repeatInterval,omitempty"` + Routes RouteGetRoutesAttributeType `json:"routes,omitempty"` } type _Route Route @@ -37,17 +221,9 @@ type _Route Route // 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 { +func NewRoute(receiver RouteGetReceiverArgType) *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 + setRouteGetReceiverAttributeType(&this.Receiver, receiver) return &this } @@ -68,311 +244,234 @@ func NewRouteWithDefaults() *Route { } // 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 +func (o *Route) GetContinue() (res RoutegetContinueRetType) { + res, _ = o.GetContinueOk() + return } // GetContinueOk returns a tuple with the Continue field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Route) GetContinueOk() (*bool, bool) { - if o == nil || IsNil(o.Continue) { - return nil, false - } - return o.Continue, true +func (o *Route) GetContinueOk() (ret RoutegetContinueRetType, ok bool) { + return getRoutegetContinueAttributeTypeOk(o.Continue) } // 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 + _, ok := o.GetContinueOk() + return ok } // SetContinue gets a reference to the given bool and assigns it to the Continue field. -func (o *Route) SetContinue(v *bool) { - o.Continue = v +func (o *Route) SetContinue(v RoutegetContinueRetType) { + setRoutegetContinueAttributeType(&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 +func (o *Route) GetGroupBy() (res RouteGetGroupByRetType) { + res, _ = o.GetGroupByOk() + return } // GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Route) GetGroupByOk() (*[]string, bool) { - if o == nil || IsNil(o.GroupBy) { - return nil, false - } - return o.GroupBy, true +func (o *Route) GetGroupByOk() (ret RouteGetGroupByRetType, ok bool) { + return getRouteGetGroupByAttributeTypeOk(o.GroupBy) } // 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 + _, ok := o.GetGroupByOk() + return ok } // SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. -func (o *Route) SetGroupBy(v *[]string) { - o.GroupBy = v +func (o *Route) SetGroupBy(v RouteGetGroupByRetType) { + setRouteGetGroupByAttributeType(&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 +func (o *Route) GetGroupInterval() (res RouteGetGroupIntervalRetType) { + res, _ = o.GetGroupIntervalOk() + return } // GetGroupIntervalOk returns a tuple with the GroupInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Route) GetGroupIntervalOk() (*string, bool) { - if o == nil || IsNil(o.GroupInterval) { - return nil, false - } - return o.GroupInterval, true +func (o *Route) GetGroupIntervalOk() (ret RouteGetGroupIntervalRetType, ok bool) { + return getRouteGetGroupIntervalAttributeTypeOk(o.GroupInterval) } // 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 + _, ok := o.GetGroupIntervalOk() + return ok } // SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. -func (o *Route) SetGroupInterval(v *string) { - o.GroupInterval = v +func (o *Route) SetGroupInterval(v RouteGetGroupIntervalRetType) { + setRouteGetGroupIntervalAttributeType(&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 +func (o *Route) GetGroupWait() (res RouteGetGroupWaitRetType) { + res, _ = o.GetGroupWaitOk() + return } // GetGroupWaitOk returns a tuple with the GroupWait field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Route) GetGroupWaitOk() (*string, bool) { - if o == nil || IsNil(o.GroupWait) { - return nil, false - } - return o.GroupWait, true +func (o *Route) GetGroupWaitOk() (ret RouteGetGroupWaitRetType, ok bool) { + return getRouteGetGroupWaitAttributeTypeOk(o.GroupWait) } // 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 + _, ok := o.GetGroupWaitOk() + return ok } // SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. -func (o *Route) SetGroupWait(v *string) { - o.GroupWait = v +func (o *Route) SetGroupWait(v RouteGetGroupWaitRetType) { + setRouteGetGroupWaitAttributeType(&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 +func (o *Route) GetMatch() (res RouteGetMatchRetType) { + res, _ = o.GetMatchOk() + return } // GetMatchOk returns a tuple with the Match field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Route) GetMatchOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Match) { - return nil, false - } - return o.Match, true +func (o *Route) GetMatchOk() (ret RouteGetMatchRetType, ok bool) { + return getRouteGetMatchAttributeTypeOk(o.Match) } // 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 + _, ok := o.GetMatchOk() + return ok } // 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 +func (o *Route) SetMatch(v RouteGetMatchRetType) { + setRouteGetMatchAttributeType(&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 +func (o *Route) GetMatchRe() (res RouteGetMatchReRetType) { + res, _ = o.GetMatchReOk() + return } // GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Route) GetMatchReOk() (*map[string]string, bool) { - if o == nil || IsNil(o.MatchRe) { - return nil, false - } - return o.MatchRe, true +func (o *Route) GetMatchReOk() (ret RouteGetMatchReRetType, ok bool) { + return getRouteGetMatchReAttributeTypeOk(o.MatchRe) } // 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 + _, ok := o.GetMatchReOk() + return ok } // 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 +func (o *Route) SetMatchRe(v RouteGetMatchReRetType) { + setRouteGetMatchReAttributeType(&o.MatchRe, v) } // GetReceiver returns the Receiver field value -func (o *Route) GetReceiver() *string { - if o == nil || IsNil(o.Receiver) { - var ret *string - return ret - } - - return o.Receiver +func (o *Route) GetReceiver() (ret RouteGetReceiverRetType) { + ret, _ = o.GetReceiverOk() + return ret } // 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 +func (o *Route) GetReceiverOk() (ret RouteGetReceiverRetType, ok bool) { + return getRouteGetReceiverAttributeTypeOk(o.Receiver) } // SetReceiver sets field value -func (o *Route) SetReceiver(v *string) { - o.Receiver = v +func (o *Route) SetReceiver(v RouteGetReceiverRetType) { + setRouteGetReceiverAttributeType(&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 +func (o *Route) GetRepeatInterval() (res RouteGetRepeatIntervalRetType) { + res, _ = o.GetRepeatIntervalOk() + return } // GetRepeatIntervalOk returns a tuple with the RepeatInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Route) GetRepeatIntervalOk() (*string, bool) { - if o == nil || IsNil(o.RepeatInterval) { - return nil, false - } - return o.RepeatInterval, true +func (o *Route) GetRepeatIntervalOk() (ret RouteGetRepeatIntervalRetType, ok bool) { + return getRouteGetRepeatIntervalAttributeTypeOk(o.RepeatInterval) } // 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 + _, ok := o.GetRepeatIntervalOk() + return ok } // SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. -func (o *Route) SetRepeatInterval(v *string) { - o.RepeatInterval = v +func (o *Route) SetRepeatInterval(v RouteGetRepeatIntervalRetType) { + setRouteGetRepeatIntervalAttributeType(&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 +func (o *Route) GetRoutes() (res RouteGetRoutesRetType) { + res, _ = o.GetRoutesOk() + return } // GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Route) GetRoutesOk() (*[]RouteSerializer, bool) { - if o == nil || IsNil(o.Routes) { - return nil, false - } - return o.Routes, true +func (o *Route) GetRoutesOk() (ret RouteGetRoutesRetType, ok bool) { + return getRouteGetRoutesAttributeTypeOk(o.Routes) } // 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 + _, ok := o.GetRoutesOk() + return ok } // 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) SetRoutes(v RouteGetRoutesRetType) { + setRouteGetRoutesAttributeType(&o.Routes, v) } func (o Route) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Continue) { - toSerialize["continue"] = o.Continue + if val, ok := getRoutegetContinueAttributeTypeOk(o.Continue); ok { + toSerialize["Continue"] = val + } + if val, ok := getRouteGetGroupByAttributeTypeOk(o.GroupBy); ok { + toSerialize["GroupBy"] = val } - if !IsNil(o.GroupBy) { - toSerialize["groupBy"] = o.GroupBy + if val, ok := getRouteGetGroupIntervalAttributeTypeOk(o.GroupInterval); ok { + toSerialize["GroupInterval"] = val } - if !IsNil(o.GroupInterval) { - toSerialize["groupInterval"] = o.GroupInterval + if val, ok := getRouteGetGroupWaitAttributeTypeOk(o.GroupWait); ok { + toSerialize["GroupWait"] = val } - if !IsNil(o.GroupWait) { - toSerialize["groupWait"] = o.GroupWait + if val, ok := getRouteGetMatchAttributeTypeOk(o.Match); ok { + toSerialize["Match"] = val } - if !IsNil(o.Match) { - toSerialize["match"] = o.Match + if val, ok := getRouteGetMatchReAttributeTypeOk(o.MatchRe); ok { + toSerialize["MatchRe"] = val } - if !IsNil(o.MatchRe) { - toSerialize["matchRe"] = o.MatchRe + if val, ok := getRouteGetReceiverAttributeTypeOk(o.Receiver); ok { + toSerialize["Receiver"] = val } - toSerialize["receiver"] = o.Receiver - if !IsNil(o.RepeatInterval) { - toSerialize["repeatInterval"] = o.RepeatInterval + if val, ok := getRouteGetRepeatIntervalAttributeTypeOk(o.RepeatInterval); ok { + toSerialize["RepeatInterval"] = val } - if !IsNil(o.Routes) { - toSerialize["routes"] = o.Routes + if val, ok := getRouteGetRoutesAttributeTypeOk(o.Routes); ok { + toSerialize["Routes"] = val } return toSerialize, nil } diff --git a/services/observability/model_route_serializer.go b/services/observability/model_route_serializer.go index 21c5bb14f..b3aecbe9a 100644 --- a/services/observability/model_route_serializer.go +++ b/services/observability/model_route_serializer.go @@ -17,19 +17,223 @@ import ( // checks if the RouteSerializer type satisfies the MappedNullable interface at compile time var _ MappedNullable = &RouteSerializer{} +/* + types and functions for continue +*/ + +// isBoolean +type RouteSerializergetContinueAttributeType = *bool +type RouteSerializergetContinueArgType = bool +type RouteSerializergetContinueRetType = bool + +func getRouteSerializergetContinueAttributeTypeOk(arg RouteSerializergetContinueAttributeType) (ret RouteSerializergetContinueRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteSerializergetContinueAttributeType(arg *RouteSerializergetContinueAttributeType, val RouteSerializergetContinueRetType) { + *arg = &val +} + +/* + types and functions for groupBy +*/ + +// isArray +type RouteSerializerGetGroupByAttributeType = *[]string +type RouteSerializerGetGroupByArgType = []string +type RouteSerializerGetGroupByRetType = []string + +func getRouteSerializerGetGroupByAttributeTypeOk(arg RouteSerializerGetGroupByAttributeType) (ret RouteSerializerGetGroupByRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteSerializerGetGroupByAttributeType(arg *RouteSerializerGetGroupByAttributeType, val RouteSerializerGetGroupByRetType) { + *arg = &val +} + +/* + types and functions for groupInterval +*/ + +// isNotNullableString +type RouteSerializerGetGroupIntervalAttributeType = *string + +func getRouteSerializerGetGroupIntervalAttributeTypeOk(arg RouteSerializerGetGroupIntervalAttributeType) (ret RouteSerializerGetGroupIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteSerializerGetGroupIntervalAttributeType(arg *RouteSerializerGetGroupIntervalAttributeType, val RouteSerializerGetGroupIntervalRetType) { + *arg = &val +} + +type RouteSerializerGetGroupIntervalArgType = string +type RouteSerializerGetGroupIntervalRetType = string + +/* + types and functions for groupWait +*/ + +// isNotNullableString +type RouteSerializerGetGroupWaitAttributeType = *string + +func getRouteSerializerGetGroupWaitAttributeTypeOk(arg RouteSerializerGetGroupWaitAttributeType) (ret RouteSerializerGetGroupWaitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteSerializerGetGroupWaitAttributeType(arg *RouteSerializerGetGroupWaitAttributeType, val RouteSerializerGetGroupWaitRetType) { + *arg = &val +} + +type RouteSerializerGetGroupWaitArgType = string +type RouteSerializerGetGroupWaitRetType = string + +/* + types and functions for match +*/ + +// isContainer +type RouteSerializerGetMatchAttributeType = *map[string]string +type RouteSerializerGetMatchArgType = map[string]string +type RouteSerializerGetMatchRetType = map[string]string + +func getRouteSerializerGetMatchAttributeTypeOk(arg RouteSerializerGetMatchAttributeType) (ret RouteSerializerGetMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteSerializerGetMatchAttributeType(arg *RouteSerializerGetMatchAttributeType, val RouteSerializerGetMatchRetType) { + *arg = &val +} + +/* + types and functions for matchRe +*/ + +// isContainer +type RouteSerializerGetMatchReAttributeType = *map[string]string +type RouteSerializerGetMatchReArgType = map[string]string +type RouteSerializerGetMatchReRetType = map[string]string + +func getRouteSerializerGetMatchReAttributeTypeOk(arg RouteSerializerGetMatchReAttributeType) (ret RouteSerializerGetMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteSerializerGetMatchReAttributeType(arg *RouteSerializerGetMatchReAttributeType, val RouteSerializerGetMatchReRetType) { + *arg = &val +} + +/* + types and functions for matchers +*/ + +// isArray +type RouteSerializerGetMatchersAttributeType = *[]string +type RouteSerializerGetMatchersArgType = []string +type RouteSerializerGetMatchersRetType = []string + +func getRouteSerializerGetMatchersAttributeTypeOk(arg RouteSerializerGetMatchersAttributeType) (ret RouteSerializerGetMatchersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteSerializerGetMatchersAttributeType(arg *RouteSerializerGetMatchersAttributeType, val RouteSerializerGetMatchersRetType) { + *arg = &val +} + +/* + types and functions for receiver +*/ + +// isNotNullableString +type RouteSerializerGetReceiverAttributeType = *string + +func getRouteSerializerGetReceiverAttributeTypeOk(arg RouteSerializerGetReceiverAttributeType) (ret RouteSerializerGetReceiverRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteSerializerGetReceiverAttributeType(arg *RouteSerializerGetReceiverAttributeType, val RouteSerializerGetReceiverRetType) { + *arg = &val +} + +type RouteSerializerGetReceiverArgType = string +type RouteSerializerGetReceiverRetType = string + +/* + types and functions for repeatInterval +*/ + +// isNotNullableString +type RouteSerializerGetRepeatIntervalAttributeType = *string + +func getRouteSerializerGetRepeatIntervalAttributeTypeOk(arg RouteSerializerGetRepeatIntervalAttributeType) (ret RouteSerializerGetRepeatIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteSerializerGetRepeatIntervalAttributeType(arg *RouteSerializerGetRepeatIntervalAttributeType, val RouteSerializerGetRepeatIntervalRetType) { + *arg = &val +} + +type RouteSerializerGetRepeatIntervalArgType = string +type RouteSerializerGetRepeatIntervalRetType = string + +/* + types and functions for routes +*/ + +// isArray +type RouteSerializerGetRoutesAttributeType = *[]map[string]string +type RouteSerializerGetRoutesArgType = []map[string]string +type RouteSerializerGetRoutesRetType = []map[string]string + +func getRouteSerializerGetRoutesAttributeTypeOk(arg RouteSerializerGetRoutesAttributeType) (ret RouteSerializerGetRoutesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRouteSerializerGetRoutesAttributeType(arg *RouteSerializerGetRoutesAttributeType, val RouteSerializerGetRoutesRetType) { + *arg = &val +} + // RouteSerializer struct for RouteSerializer type RouteSerializer struct { - Continue *bool `json:"continue,omitempty"` - GroupBy *[]string `json:"groupBy,omitempty"` - GroupInterval *string `json:"groupInterval,omitempty"` - GroupWait *string `json:"groupWait,omitempty"` - Match *map[string]string `json:"match,omitempty"` - MatchRe *map[string]string `json:"matchRe,omitempty"` - Matchers *[]string `json:"matchers,omitempty"` + Continue RouteSerializergetContinueAttributeType `json:"continue,omitempty"` + GroupBy RouteSerializerGetGroupByAttributeType `json:"groupBy,omitempty"` + GroupInterval RouteSerializerGetGroupIntervalAttributeType `json:"groupInterval,omitempty"` + GroupWait RouteSerializerGetGroupWaitAttributeType `json:"groupWait,omitempty"` + Match RouteSerializerGetMatchAttributeType `json:"match,omitempty"` + MatchRe RouteSerializerGetMatchReAttributeType `json:"matchRe,omitempty"` + Matchers RouteSerializerGetMatchersAttributeType `json:"matchers,omitempty"` // REQUIRED - Receiver *string `json:"receiver"` - RepeatInterval *string `json:"repeatInterval,omitempty"` - Routes *[]map[string]string `json:"routes,omitempty"` + Receiver RouteSerializerGetReceiverAttributeType `json:"receiver"` + RepeatInterval RouteSerializerGetRepeatIntervalAttributeType `json:"repeatInterval,omitempty"` + Routes RouteSerializerGetRoutesAttributeType `json:"routes,omitempty"` } type _RouteSerializer RouteSerializer @@ -38,17 +242,9 @@ type _RouteSerializer RouteSerializer // 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 { +func NewRouteSerializer(receiver RouteSerializerGetReceiverArgType) *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 + setRouteSerializerGetReceiverAttributeType(&this.Receiver, receiver) return &this } @@ -69,346 +265,260 @@ func NewRouteSerializerWithDefaults() *RouteSerializer { } // 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 +func (o *RouteSerializer) GetContinue() (res RouteSerializergetContinueRetType) { + res, _ = o.GetContinueOk() + return } // GetContinueOk returns a tuple with the Continue field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RouteSerializer) GetContinueOk() (*bool, bool) { - if o == nil || IsNil(o.Continue) { - return nil, false - } - return o.Continue, true +func (o *RouteSerializer) GetContinueOk() (ret RouteSerializergetContinueRetType, ok bool) { + return getRouteSerializergetContinueAttributeTypeOk(o.Continue) } // 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 + _, ok := o.GetContinueOk() + return ok } // SetContinue gets a reference to the given bool and assigns it to the Continue field. -func (o *RouteSerializer) SetContinue(v *bool) { - o.Continue = v +func (o *RouteSerializer) SetContinue(v RouteSerializergetContinueRetType) { + setRouteSerializergetContinueAttributeType(&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 +func (o *RouteSerializer) GetGroupBy() (res RouteSerializerGetGroupByRetType) { + res, _ = o.GetGroupByOk() + return } // GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RouteSerializer) GetGroupByOk() (*[]string, bool) { - if o == nil || IsNil(o.GroupBy) { - return nil, false - } - return o.GroupBy, true +func (o *RouteSerializer) GetGroupByOk() (ret RouteSerializerGetGroupByRetType, ok bool) { + return getRouteSerializerGetGroupByAttributeTypeOk(o.GroupBy) } // 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 + _, ok := o.GetGroupByOk() + return ok } // SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. -func (o *RouteSerializer) SetGroupBy(v *[]string) { - o.GroupBy = v +func (o *RouteSerializer) SetGroupBy(v RouteSerializerGetGroupByRetType) { + setRouteSerializerGetGroupByAttributeType(&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 +func (o *RouteSerializer) GetGroupInterval() (res RouteSerializerGetGroupIntervalRetType) { + res, _ = o.GetGroupIntervalOk() + return } // GetGroupIntervalOk returns a tuple with the GroupInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RouteSerializer) GetGroupIntervalOk() (*string, bool) { - if o == nil || IsNil(o.GroupInterval) { - return nil, false - } - return o.GroupInterval, true +func (o *RouteSerializer) GetGroupIntervalOk() (ret RouteSerializerGetGroupIntervalRetType, ok bool) { + return getRouteSerializerGetGroupIntervalAttributeTypeOk(o.GroupInterval) } // 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 + _, ok := o.GetGroupIntervalOk() + return ok } // SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. -func (o *RouteSerializer) SetGroupInterval(v *string) { - o.GroupInterval = v +func (o *RouteSerializer) SetGroupInterval(v RouteSerializerGetGroupIntervalRetType) { + setRouteSerializerGetGroupIntervalAttributeType(&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 +func (o *RouteSerializer) GetGroupWait() (res RouteSerializerGetGroupWaitRetType) { + res, _ = o.GetGroupWaitOk() + return } // GetGroupWaitOk returns a tuple with the GroupWait field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RouteSerializer) GetGroupWaitOk() (*string, bool) { - if o == nil || IsNil(o.GroupWait) { - return nil, false - } - return o.GroupWait, true +func (o *RouteSerializer) GetGroupWaitOk() (ret RouteSerializerGetGroupWaitRetType, ok bool) { + return getRouteSerializerGetGroupWaitAttributeTypeOk(o.GroupWait) } // 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 + _, ok := o.GetGroupWaitOk() + return ok } // SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. -func (o *RouteSerializer) SetGroupWait(v *string) { - o.GroupWait = v +func (o *RouteSerializer) SetGroupWait(v RouteSerializerGetGroupWaitRetType) { + setRouteSerializerGetGroupWaitAttributeType(&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 +func (o *RouteSerializer) GetMatch() (res RouteSerializerGetMatchRetType) { + res, _ = o.GetMatchOk() + return } // GetMatchOk returns a tuple with the Match field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RouteSerializer) GetMatchOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Match) { - return nil, false - } - return o.Match, true +func (o *RouteSerializer) GetMatchOk() (ret RouteSerializerGetMatchRetType, ok bool) { + return getRouteSerializerGetMatchAttributeTypeOk(o.Match) } // 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 + _, ok := o.GetMatchOk() + return ok } // 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 +func (o *RouteSerializer) SetMatch(v RouteSerializerGetMatchRetType) { + setRouteSerializerGetMatchAttributeType(&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 +func (o *RouteSerializer) GetMatchRe() (res RouteSerializerGetMatchReRetType) { + res, _ = o.GetMatchReOk() + return } // GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RouteSerializer) GetMatchReOk() (*map[string]string, bool) { - if o == nil || IsNil(o.MatchRe) { - return nil, false - } - return o.MatchRe, true +func (o *RouteSerializer) GetMatchReOk() (ret RouteSerializerGetMatchReRetType, ok bool) { + return getRouteSerializerGetMatchReAttributeTypeOk(o.MatchRe) } // 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 + _, ok := o.GetMatchReOk() + return ok } // 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 +func (o *RouteSerializer) SetMatchRe(v RouteSerializerGetMatchReRetType) { + setRouteSerializerGetMatchReAttributeType(&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 +func (o *RouteSerializer) GetMatchers() (res RouteSerializerGetMatchersRetType) { + res, _ = o.GetMatchersOk() + return } // GetMatchersOk returns a tuple with the Matchers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RouteSerializer) GetMatchersOk() (*[]string, bool) { - if o == nil || IsNil(o.Matchers) { - return nil, false - } - return o.Matchers, true +func (o *RouteSerializer) GetMatchersOk() (ret RouteSerializerGetMatchersRetType, ok bool) { + return getRouteSerializerGetMatchersAttributeTypeOk(o.Matchers) } // 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 + _, ok := o.GetMatchersOk() + return ok } // SetMatchers gets a reference to the given []string and assigns it to the Matchers field. -func (o *RouteSerializer) SetMatchers(v *[]string) { - o.Matchers = v +func (o *RouteSerializer) SetMatchers(v RouteSerializerGetMatchersRetType) { + setRouteSerializerGetMatchersAttributeType(&o.Matchers, v) } // GetReceiver returns the Receiver field value -func (o *RouteSerializer) GetReceiver() *string { - if o == nil || IsNil(o.Receiver) { - var ret *string - return ret - } - - return o.Receiver +func (o *RouteSerializer) GetReceiver() (ret RouteSerializerGetReceiverRetType) { + ret, _ = o.GetReceiverOk() + return ret } // 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 +func (o *RouteSerializer) GetReceiverOk() (ret RouteSerializerGetReceiverRetType, ok bool) { + return getRouteSerializerGetReceiverAttributeTypeOk(o.Receiver) } // SetReceiver sets field value -func (o *RouteSerializer) SetReceiver(v *string) { - o.Receiver = v +func (o *RouteSerializer) SetReceiver(v RouteSerializerGetReceiverRetType) { + setRouteSerializerGetReceiverAttributeType(&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 +func (o *RouteSerializer) GetRepeatInterval() (res RouteSerializerGetRepeatIntervalRetType) { + res, _ = o.GetRepeatIntervalOk() + return } // GetRepeatIntervalOk returns a tuple with the RepeatInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RouteSerializer) GetRepeatIntervalOk() (*string, bool) { - if o == nil || IsNil(o.RepeatInterval) { - return nil, false - } - return o.RepeatInterval, true +func (o *RouteSerializer) GetRepeatIntervalOk() (ret RouteSerializerGetRepeatIntervalRetType, ok bool) { + return getRouteSerializerGetRepeatIntervalAttributeTypeOk(o.RepeatInterval) } // 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 + _, ok := o.GetRepeatIntervalOk() + return ok } // SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. -func (o *RouteSerializer) SetRepeatInterval(v *string) { - o.RepeatInterval = v +func (o *RouteSerializer) SetRepeatInterval(v RouteSerializerGetRepeatIntervalRetType) { + setRouteSerializerGetRepeatIntervalAttributeType(&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 +func (o *RouteSerializer) GetRoutes() (res RouteSerializerGetRoutesRetType) { + res, _ = o.GetRoutesOk() + return } // GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RouteSerializer) GetRoutesOk() (*[]map[string]string, bool) { - if o == nil || IsNil(o.Routes) { - return nil, false - } - return o.Routes, true +func (o *RouteSerializer) GetRoutesOk() (ret RouteSerializerGetRoutesRetType, ok bool) { + return getRouteSerializerGetRoutesAttributeTypeOk(o.Routes) } // 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 + _, ok := o.GetRoutesOk() + return ok } // 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) SetRoutes(v RouteSerializerGetRoutesRetType) { + setRouteSerializerGetRoutesAttributeType(&o.Routes, v) } func (o RouteSerializer) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Continue) { - toSerialize["continue"] = o.Continue + if val, ok := getRouteSerializergetContinueAttributeTypeOk(o.Continue); ok { + toSerialize["Continue"] = val + } + if val, ok := getRouteSerializerGetGroupByAttributeTypeOk(o.GroupBy); ok { + toSerialize["GroupBy"] = val } - if !IsNil(o.GroupBy) { - toSerialize["groupBy"] = o.GroupBy + if val, ok := getRouteSerializerGetGroupIntervalAttributeTypeOk(o.GroupInterval); ok { + toSerialize["GroupInterval"] = val } - if !IsNil(o.GroupInterval) { - toSerialize["groupInterval"] = o.GroupInterval + if val, ok := getRouteSerializerGetGroupWaitAttributeTypeOk(o.GroupWait); ok { + toSerialize["GroupWait"] = val } - if !IsNil(o.GroupWait) { - toSerialize["groupWait"] = o.GroupWait + if val, ok := getRouteSerializerGetMatchAttributeTypeOk(o.Match); ok { + toSerialize["Match"] = val } - if !IsNil(o.Match) { - toSerialize["match"] = o.Match + if val, ok := getRouteSerializerGetMatchReAttributeTypeOk(o.MatchRe); ok { + toSerialize["MatchRe"] = val } - if !IsNil(o.MatchRe) { - toSerialize["matchRe"] = o.MatchRe + if val, ok := getRouteSerializerGetMatchersAttributeTypeOk(o.Matchers); ok { + toSerialize["Matchers"] = val } - if !IsNil(o.Matchers) { - toSerialize["matchers"] = o.Matchers + if val, ok := getRouteSerializerGetReceiverAttributeTypeOk(o.Receiver); ok { + toSerialize["Receiver"] = val } - toSerialize["receiver"] = o.Receiver - if !IsNil(o.RepeatInterval) { - toSerialize["repeatInterval"] = o.RepeatInterval + if val, ok := getRouteSerializerGetRepeatIntervalAttributeTypeOk(o.RepeatInterval); ok { + toSerialize["RepeatInterval"] = val } - if !IsNil(o.Routes) { - toSerialize["routes"] = o.Routes + if val, ok := getRouteSerializerGetRoutesAttributeTypeOk(o.Routes); ok { + toSerialize["Routes"] = val } return toSerialize, nil } diff --git a/services/observability/model_scrape_configs_response.go b/services/observability/model_scrape_configs_response.go index b58fa3a37..bf6eb7794 100644 --- a/services/observability/model_scrape_configs_response.go +++ b/services/observability/model_scrape_configs_response.go @@ -17,12 +17,53 @@ import ( // checks if the ScrapeConfigsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ScrapeConfigsResponse{} +/* + types and functions for data +*/ + +// isArray +type ScrapeConfigsResponseGetDataAttributeType = *[]Job +type ScrapeConfigsResponseGetDataArgType = []Job +type ScrapeConfigsResponseGetDataRetType = []Job + +func getScrapeConfigsResponseGetDataAttributeTypeOk(arg ScrapeConfigsResponseGetDataAttributeType) (ret ScrapeConfigsResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setScrapeConfigsResponseGetDataAttributeType(arg *ScrapeConfigsResponseGetDataAttributeType, val ScrapeConfigsResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ScrapeConfigsResponseGetMessageAttributeType = *string + +func getScrapeConfigsResponseGetMessageAttributeTypeOk(arg ScrapeConfigsResponseGetMessageAttributeType) (ret ScrapeConfigsResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setScrapeConfigsResponseGetMessageAttributeType(arg *ScrapeConfigsResponseGetMessageAttributeType, val ScrapeConfigsResponseGetMessageRetType) { + *arg = &val +} + +type ScrapeConfigsResponseGetMessageArgType = string +type ScrapeConfigsResponseGetMessageRetType = string + // ScrapeConfigsResponse struct for ScrapeConfigsResponse type ScrapeConfigsResponse struct { // REQUIRED - Data *[]Job `json:"data"` + Data ScrapeConfigsResponseGetDataAttributeType `json:"data"` // REQUIRED - Message *string `json:"message"` + Message ScrapeConfigsResponseGetMessageAttributeType `json:"message"` } type _ScrapeConfigsResponse ScrapeConfigsResponse @@ -31,10 +72,10 @@ type _ScrapeConfigsResponse ScrapeConfigsResponse // 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 { +func NewScrapeConfigsResponse(data ScrapeConfigsResponseGetDataArgType, message ScrapeConfigsResponseGetMessageArgType) *ScrapeConfigsResponse { this := ScrapeConfigsResponse{} - this.Data = data - this.Message = message + setScrapeConfigsResponseGetDataAttributeType(&this.Data, data) + setScrapeConfigsResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewScrapeConfigsResponseWithDefaults() *ScrapeConfigsResponse { } // GetData returns the Data field value -func (o *ScrapeConfigsResponse) GetData() *[]Job { - if o == nil || IsNil(o.Data) { - var ret *[]Job - return ret - } - - return o.Data +func (o *ScrapeConfigsResponse) GetData() (ret ScrapeConfigsResponseGetDataRetType) { + ret, _ = o.GetDataOk() + return ret } // 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 +func (o *ScrapeConfigsResponse) GetDataOk() (ret ScrapeConfigsResponseGetDataRetType, ok bool) { + return getScrapeConfigsResponseGetDataAttributeTypeOk(o.Data) } // SetData sets field value -func (o *ScrapeConfigsResponse) SetData(v *[]Job) { - o.Data = v +func (o *ScrapeConfigsResponse) SetData(v ScrapeConfigsResponseGetDataRetType) { + setScrapeConfigsResponseGetDataAttributeType(&o.Data, v) } // GetMessage returns the Message field value -func (o *ScrapeConfigsResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *ScrapeConfigsResponse) GetMessage() (ret ScrapeConfigsResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *ScrapeConfigsResponse) GetMessageOk() (ret ScrapeConfigsResponseGetMessageRetType, ok bool) { + return getScrapeConfigsResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *ScrapeConfigsResponse) SetMessage(v *string) { - o.Message = v +func (o *ScrapeConfigsResponse) SetMessage(v ScrapeConfigsResponseGetMessageRetType) { + setScrapeConfigsResponseGetMessageAttributeType(&o.Message, v) } func (o ScrapeConfigsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["data"] = o.Data - toSerialize["message"] = o.Message + if val, ok := getScrapeConfigsResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getScrapeConfigsResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/observability/model_service_keys_list.go b/services/observability/model_service_keys_list.go index 423be80cb..dc98af379 100644 --- a/services/observability/model_service_keys_list.go +++ b/services/observability/model_service_keys_list.go @@ -17,13 +17,75 @@ import ( // checks if the ServiceKeysList type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ServiceKeysList{} +/* + types and functions for credentialsInfo +*/ + +// isContainer +type ServiceKeysListGetCredentialsInfoAttributeType = *map[string]string +type ServiceKeysListGetCredentialsInfoArgType = map[string]string +type ServiceKeysListGetCredentialsInfoRetType = map[string]string + +func getServiceKeysListGetCredentialsInfoAttributeTypeOk(arg ServiceKeysListGetCredentialsInfoAttributeType) (ret ServiceKeysListGetCredentialsInfoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setServiceKeysListGetCredentialsInfoAttributeType(arg *ServiceKeysListGetCredentialsInfoAttributeType, val ServiceKeysListGetCredentialsInfoRetType) { + *arg = &val +} + +/* + types and functions for id +*/ + +// isNotNullableString +type ServiceKeysListGetIdAttributeType = *string + +func getServiceKeysListGetIdAttributeTypeOk(arg ServiceKeysListGetIdAttributeType) (ret ServiceKeysListGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setServiceKeysListGetIdAttributeType(arg *ServiceKeysListGetIdAttributeType, val ServiceKeysListGetIdRetType) { + *arg = &val +} + +type ServiceKeysListGetIdArgType = string +type ServiceKeysListGetIdRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type ServiceKeysListGetNameAttributeType = *string + +func getServiceKeysListGetNameAttributeTypeOk(arg ServiceKeysListGetNameAttributeType) (ret ServiceKeysListGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setServiceKeysListGetNameAttributeType(arg *ServiceKeysListGetNameAttributeType, val ServiceKeysListGetNameRetType) { + *arg = &val +} + +type ServiceKeysListGetNameArgType = string +type ServiceKeysListGetNameRetType = string + // ServiceKeysList struct for ServiceKeysList type ServiceKeysList struct { - CredentialsInfo *map[string]string `json:"credentialsInfo,omitempty"` + CredentialsInfo ServiceKeysListGetCredentialsInfoAttributeType `json:"credentialsInfo,omitempty"` // REQUIRED - Id *string `json:"id"` + Id ServiceKeysListGetIdAttributeType `json:"id"` // REQUIRED - Name *string `json:"name"` + Name ServiceKeysListGetNameAttributeType `json:"name"` } type _ServiceKeysList ServiceKeysList @@ -32,10 +94,10 @@ type _ServiceKeysList ServiceKeysList // 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 { +func NewServiceKeysList(id ServiceKeysListGetIdArgType, name ServiceKeysListGetNameArgType) *ServiceKeysList { this := ServiceKeysList{} - this.Id = id - this.Name = name + setServiceKeysListGetIdAttributeType(&this.Id, id) + setServiceKeysListGetNameAttributeType(&this.Name, name) return &this } @@ -48,92 +110,73 @@ func NewServiceKeysListWithDefaults() *ServiceKeysList { } // 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 +func (o *ServiceKeysList) GetCredentialsInfo() (res ServiceKeysListGetCredentialsInfoRetType) { + res, _ = o.GetCredentialsInfoOk() + return } // 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 +func (o *ServiceKeysList) GetCredentialsInfoOk() (ret ServiceKeysListGetCredentialsInfoRetType, ok bool) { + return getServiceKeysListGetCredentialsInfoAttributeTypeOk(o.CredentialsInfo) } // 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 + _, ok := o.GetCredentialsInfoOk() + return ok } // 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 +func (o *ServiceKeysList) SetCredentialsInfo(v ServiceKeysListGetCredentialsInfoRetType) { + setServiceKeysListGetCredentialsInfoAttributeType(&o.CredentialsInfo, v) } // GetId returns the Id field value -func (o *ServiceKeysList) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *ServiceKeysList) GetId() (ret ServiceKeysListGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } // 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 +func (o *ServiceKeysList) GetIdOk() (ret ServiceKeysListGetIdRetType, ok bool) { + return getServiceKeysListGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *ServiceKeysList) SetId(v *string) { - o.Id = v +func (o *ServiceKeysList) SetId(v ServiceKeysListGetIdRetType) { + setServiceKeysListGetIdAttributeType(&o.Id, v) } // GetName returns the Name field value -func (o *ServiceKeysList) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *ServiceKeysList) GetName() (ret ServiceKeysListGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // 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 +func (o *ServiceKeysList) GetNameOk() (ret ServiceKeysListGetNameRetType, ok bool) { + return getServiceKeysListGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *ServiceKeysList) SetName(v *string) { - o.Name = v +func (o *ServiceKeysList) SetName(v ServiceKeysListGetNameRetType) { + setServiceKeysListGetNameAttributeType(&o.Name, v) } func (o ServiceKeysList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CredentialsInfo) { - toSerialize["credentialsInfo"] = o.CredentialsInfo + if val, ok := getServiceKeysListGetCredentialsInfoAttributeTypeOk(o.CredentialsInfo); ok { + toSerialize["CredentialsInfo"] = val + } + if val, ok := getServiceKeysListGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getServiceKeysListGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - toSerialize["id"] = o.Id - toSerialize["name"] = o.Name return toSerialize, nil } diff --git a/services/observability/model_static_configs.go b/services/observability/model_static_configs.go index 0264a913b..94844ef91 100644 --- a/services/observability/model_static_configs.go +++ b/services/observability/model_static_configs.go @@ -17,11 +17,51 @@ import ( // checks if the StaticConfigs type satisfies the MappedNullable interface at compile time var _ MappedNullable = &StaticConfigs{} +/* + types and functions for labels +*/ + +// isContainer +type StaticConfigsGetLabelsAttributeType = *map[string]string +type StaticConfigsGetLabelsArgType = map[string]string +type StaticConfigsGetLabelsRetType = map[string]string + +func getStaticConfigsGetLabelsAttributeTypeOk(arg StaticConfigsGetLabelsAttributeType) (ret StaticConfigsGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setStaticConfigsGetLabelsAttributeType(arg *StaticConfigsGetLabelsAttributeType, val StaticConfigsGetLabelsRetType) { + *arg = &val +} + +/* + types and functions for targets +*/ + +// isArray +type StaticConfigsGetTargetsAttributeType = *[]string +type StaticConfigsGetTargetsArgType = []string +type StaticConfigsGetTargetsRetType = []string + +func getStaticConfigsGetTargetsAttributeTypeOk(arg StaticConfigsGetTargetsAttributeType) (ret StaticConfigsGetTargetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setStaticConfigsGetTargetsAttributeType(arg *StaticConfigsGetTargetsAttributeType, val StaticConfigsGetTargetsRetType) { + *arg = &val +} + // StaticConfigs struct for StaticConfigs type StaticConfigs struct { - Labels *map[string]string `json:"labels,omitempty"` + Labels StaticConfigsGetLabelsAttributeType `json:"labels,omitempty"` // REQUIRED - Targets *[]string `json:"targets"` + Targets StaticConfigsGetTargetsAttributeType `json:"targets"` } type _StaticConfigs StaticConfigs @@ -30,9 +70,9 @@ type _StaticConfigs StaticConfigs // 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 { +func NewStaticConfigs(targets StaticConfigsGetTargetsArgType) *StaticConfigs { this := StaticConfigs{} - this.Targets = targets + setStaticConfigsGetTargetsAttributeType(&this.Targets, targets) return &this } @@ -45,67 +85,53 @@ func NewStaticConfigsWithDefaults() *StaticConfigs { } // 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 +func (o *StaticConfigs) GetLabels() (res StaticConfigsGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return } // 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 +func (o *StaticConfigs) GetLabelsOk() (ret StaticConfigsGetLabelsRetType, ok bool) { + return getStaticConfigsGetLabelsAttributeTypeOk(o.Labels) } // 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 + _, ok := o.GetLabelsOk() + return ok } // 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 +func (o *StaticConfigs) SetLabels(v StaticConfigsGetLabelsRetType) { + setStaticConfigsGetLabelsAttributeType(&o.Labels, v) } // GetTargets returns the Targets field value -func (o *StaticConfigs) GetTargets() *[]string { - if o == nil || IsNil(o.Targets) { - var ret *[]string - return ret - } - - return o.Targets +func (o *StaticConfigs) GetTargets() (ret StaticConfigsGetTargetsRetType) { + ret, _ = o.GetTargetsOk() + return ret } // 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 +func (o *StaticConfigs) GetTargetsOk() (ret StaticConfigsGetTargetsRetType, ok bool) { + return getStaticConfigsGetTargetsAttributeTypeOk(o.Targets) } // SetTargets sets field value -func (o *StaticConfigs) SetTargets(v *[]string) { - o.Targets = v +func (o *StaticConfigs) SetTargets(v StaticConfigsGetTargetsRetType) { + setStaticConfigsGetTargetsAttributeType(&o.Targets, v) } func (o StaticConfigs) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels + if val, ok := getStaticConfigsGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } + if val, ok := getStaticConfigsGetTargetsAttributeTypeOk(o.Targets); ok { + toSerialize["Targets"] = val } - toSerialize["targets"] = o.Targets return toSerialize, nil } diff --git a/services/observability/model_tls_config.go b/services/observability/model_tls_config.go index ff47b7e6f..caac22b8c 100644 --- a/services/observability/model_tls_config.go +++ b/services/observability/model_tls_config.go @@ -17,9 +17,29 @@ import ( // checks if the TLSConfig type satisfies the MappedNullable interface at compile time var _ MappedNullable = &TLSConfig{} +/* + types and functions for insecureSkipVerify +*/ + +// isBoolean +type TLSConfiggetInsecureSkipVerifyAttributeType = *bool +type TLSConfiggetInsecureSkipVerifyArgType = bool +type TLSConfiggetInsecureSkipVerifyRetType = bool + +func getTLSConfiggetInsecureSkipVerifyAttributeTypeOk(arg TLSConfiggetInsecureSkipVerifyAttributeType) (ret TLSConfiggetInsecureSkipVerifyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setTLSConfiggetInsecureSkipVerifyAttributeType(arg *TLSConfiggetInsecureSkipVerifyAttributeType, val TLSConfiggetInsecureSkipVerifyRetType) { + *arg = &val +} + // TLSConfig struct for TLSConfig type TLSConfig struct { - InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"` + InsecureSkipVerify TLSConfiggetInsecureSkipVerifyAttributeType `json:"insecureSkipVerify,omitempty"` } // NewTLSConfig instantiates a new TLSConfig object @@ -28,8 +48,6 @@ type TLSConfig struct { // will change when the set of required properties is changed func NewTLSConfig() *TLSConfig { this := TLSConfig{} - var insecureSkipVerify bool = false - this.InsecureSkipVerify = &insecureSkipVerify return &this } @@ -44,41 +62,32 @@ func NewTLSConfigWithDefaults() *TLSConfig { } // 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 +func (o *TLSConfig) GetInsecureSkipVerify() (res TLSConfiggetInsecureSkipVerifyRetType) { + res, _ = o.GetInsecureSkipVerifyOk() + return } // 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 +func (o *TLSConfig) GetInsecureSkipVerifyOk() (ret TLSConfiggetInsecureSkipVerifyRetType, ok bool) { + return getTLSConfiggetInsecureSkipVerifyAttributeTypeOk(o.InsecureSkipVerify) } // 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 + _, ok := o.GetInsecureSkipVerifyOk() + return ok } // 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) SetInsecureSkipVerify(v TLSConfiggetInsecureSkipVerifyRetType) { + setTLSConfiggetInsecureSkipVerifyAttributeType(&o.InsecureSkipVerify, v) } func (o TLSConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.InsecureSkipVerify) { - toSerialize["insecureSkipVerify"] = o.InsecureSkipVerify + if val, ok := getTLSConfiggetInsecureSkipVerifyAttributeTypeOk(o.InsecureSkipVerify); ok { + toSerialize["InsecureSkipVerify"] = val } return toSerialize, nil } diff --git a/services/observability/model_update_acl_payload.go b/services/observability/model_update_acl_payload.go index 68975d0c4..84863b4cd 100644 --- a/services/observability/model_update_acl_payload.go +++ b/services/observability/model_update_acl_payload.go @@ -17,11 +17,31 @@ import ( // checks if the UpdateACLPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateACLPayload{} +/* + types and functions for acl +*/ + +// isArray +type UpdateACLPayloadGetAclAttributeType = *[]string +type UpdateACLPayloadGetAclArgType = []string +type UpdateACLPayloadGetAclRetType = []string + +func getUpdateACLPayloadGetAclAttributeTypeOk(arg UpdateACLPayloadGetAclAttributeType) (ret UpdateACLPayloadGetAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateACLPayloadGetAclAttributeType(arg *UpdateACLPayloadGetAclAttributeType, val UpdateACLPayloadGetAclRetType) { + *arg = &val +} + // UpdateACLPayload List of cidr. Send empty string to remove acl. type UpdateACLPayload struct { // list of cidr // REQUIRED - Acl *[]string `json:"acl"` + Acl UpdateACLPayloadGetAclAttributeType `json:"acl"` } type _UpdateACLPayload UpdateACLPayload @@ -30,9 +50,9 @@ type _UpdateACLPayload UpdateACLPayload // 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 { +func NewUpdateACLPayload(acl UpdateACLPayloadGetAclArgType) *UpdateACLPayload { this := UpdateACLPayload{} - this.Acl = acl + setUpdateACLPayloadGetAclAttributeType(&this.Acl, acl) return &this } @@ -45,32 +65,27 @@ func NewUpdateACLPayloadWithDefaults() *UpdateACLPayload { } // GetAcl returns the Acl field value -func (o *UpdateACLPayload) GetAcl() *[]string { - if o == nil || IsNil(o.Acl) { - var ret *[]string - return ret - } - - return o.Acl +func (o *UpdateACLPayload) GetAcl() (ret UpdateACLPayloadGetAclRetType) { + ret, _ = o.GetAclOk() + return ret } // 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 +func (o *UpdateACLPayload) GetAclOk() (ret UpdateACLPayloadGetAclRetType, ok bool) { + return getUpdateACLPayloadGetAclAttributeTypeOk(o.Acl) } // SetAcl sets field value -func (o *UpdateACLPayload) SetAcl(v *[]string) { - o.Acl = v +func (o *UpdateACLPayload) SetAcl(v UpdateACLPayloadGetAclRetType) { + setUpdateACLPayloadGetAclAttributeType(&o.Acl, v) } func (o UpdateACLPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["acl"] = o.Acl + if val, ok := getUpdateACLPayloadGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val + } return toSerialize, nil } diff --git a/services/observability/model_update_alert_config_receiver_payload.go b/services/observability/model_update_alert_config_receiver_payload.go index 05eb1c26e..9e75855d3 100644 --- a/services/observability/model_update_alert_config_receiver_payload.go +++ b/services/observability/model_update_alert_config_receiver_payload.go @@ -17,16 +17,97 @@ import ( // checks if the UpdateAlertConfigReceiverPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateAlertConfigReceiverPayload{} +/* + types and functions for emailConfigs +*/ + +// isArray +type UpdateAlertConfigReceiverPayloadGetEmailConfigsAttributeType = *[]CreateAlertConfigReceiverPayloadEmailConfigsInner +type UpdateAlertConfigReceiverPayloadGetEmailConfigsArgType = []CreateAlertConfigReceiverPayloadEmailConfigsInner +type UpdateAlertConfigReceiverPayloadGetEmailConfigsRetType = []CreateAlertConfigReceiverPayloadEmailConfigsInner + +func getUpdateAlertConfigReceiverPayloadGetEmailConfigsAttributeTypeOk(arg UpdateAlertConfigReceiverPayloadGetEmailConfigsAttributeType) (ret UpdateAlertConfigReceiverPayloadGetEmailConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigReceiverPayloadGetEmailConfigsAttributeType(arg *UpdateAlertConfigReceiverPayloadGetEmailConfigsAttributeType, val UpdateAlertConfigReceiverPayloadGetEmailConfigsRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type UpdateAlertConfigReceiverPayloadGetNameAttributeType = *string + +func getUpdateAlertConfigReceiverPayloadGetNameAttributeTypeOk(arg UpdateAlertConfigReceiverPayloadGetNameAttributeType) (ret UpdateAlertConfigReceiverPayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigReceiverPayloadGetNameAttributeType(arg *UpdateAlertConfigReceiverPayloadGetNameAttributeType, val UpdateAlertConfigReceiverPayloadGetNameRetType) { + *arg = &val +} + +type UpdateAlertConfigReceiverPayloadGetNameArgType = string +type UpdateAlertConfigReceiverPayloadGetNameRetType = string + +/* + types and functions for opsgenieConfigs +*/ + +// isArray +type UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType = *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner +type UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsArgType = []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner +type UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType = []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner + +func getUpdateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeTypeOk(arg UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType) (ret UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType(arg *UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType, val UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType) { + *arg = &val +} + +/* + types and functions for webHookConfigs +*/ + +// isArray +type UpdateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType = *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner +type UpdateAlertConfigReceiverPayloadGetWebHookConfigsArgType = []CreateAlertConfigReceiverPayloadWebHookConfigsInner +type UpdateAlertConfigReceiverPayloadGetWebHookConfigsRetType = []CreateAlertConfigReceiverPayloadWebHookConfigsInner + +func getUpdateAlertConfigReceiverPayloadGetWebHookConfigsAttributeTypeOk(arg UpdateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType) (ret UpdateAlertConfigReceiverPayloadGetWebHookConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType(arg *UpdateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType, val UpdateAlertConfigReceiverPayloadGetWebHookConfigsRetType) { + *arg = &val +} + // UpdateAlertConfigReceiverPayload Receivers type UpdateAlertConfigReceiverPayload struct { // Email configurations - EmailConfigs *[]CreateAlertConfigReceiverPayloadEmailConfigsInner `json:"emailConfigs,omitempty"` + EmailConfigs UpdateAlertConfigReceiverPayloadGetEmailConfigsAttributeType `json:"emailConfigs,omitempty"` // `Additional Validators:` * must be unique * should only include the characters: a-zA-Z0-9- // REQUIRED - Name *string `json:"name"` + Name UpdateAlertConfigReceiverPayloadGetNameAttributeType `json:"name"` // Configuration for ops genie. - OpsgenieConfigs *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner `json:"opsgenieConfigs,omitempty"` - WebHookConfigs *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner `json:"webHookConfigs,omitempty"` + OpsgenieConfigs UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType `json:"opsgenieConfigs,omitempty"` + WebHookConfigs UpdateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType `json:"webHookConfigs,omitempty"` } type _UpdateAlertConfigReceiverPayload UpdateAlertConfigReceiverPayload @@ -35,9 +116,9 @@ type _UpdateAlertConfigReceiverPayload UpdateAlertConfigReceiverPayload // 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 { +func NewUpdateAlertConfigReceiverPayload(name UpdateAlertConfigReceiverPayloadGetNameArgType) *UpdateAlertConfigReceiverPayload { this := UpdateAlertConfigReceiverPayload{} - this.Name = name + setUpdateAlertConfigReceiverPayloadGetNameAttributeType(&this.Name, name) return &this } @@ -50,136 +131,104 @@ func NewUpdateAlertConfigReceiverPayloadWithDefaults() *UpdateAlertConfigReceive } // 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 +func (o *UpdateAlertConfigReceiverPayload) GetEmailConfigs() (res UpdateAlertConfigReceiverPayloadGetEmailConfigsRetType) { + res, _ = o.GetEmailConfigsOk() + return } // 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 +func (o *UpdateAlertConfigReceiverPayload) GetEmailConfigsOk() (ret UpdateAlertConfigReceiverPayloadGetEmailConfigsRetType, ok bool) { + return getUpdateAlertConfigReceiverPayloadGetEmailConfigsAttributeTypeOk(o.EmailConfigs) } // 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 + _, ok := o.GetEmailConfigsOk() + return ok } // SetEmailConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadEmailConfigsInner and assigns it to the EmailConfigs field. -func (o *UpdateAlertConfigReceiverPayload) SetEmailConfigs(v *[]CreateAlertConfigReceiverPayloadEmailConfigsInner) { - o.EmailConfigs = v +func (o *UpdateAlertConfigReceiverPayload) SetEmailConfigs(v UpdateAlertConfigReceiverPayloadGetEmailConfigsRetType) { + setUpdateAlertConfigReceiverPayloadGetEmailConfigsAttributeType(&o.EmailConfigs, v) } // GetName returns the Name field value -func (o *UpdateAlertConfigReceiverPayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *UpdateAlertConfigReceiverPayload) GetName() (ret UpdateAlertConfigReceiverPayloadGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // 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 +func (o *UpdateAlertConfigReceiverPayload) GetNameOk() (ret UpdateAlertConfigReceiverPayloadGetNameRetType, ok bool) { + return getUpdateAlertConfigReceiverPayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *UpdateAlertConfigReceiverPayload) SetName(v *string) { - o.Name = v +func (o *UpdateAlertConfigReceiverPayload) SetName(v UpdateAlertConfigReceiverPayloadGetNameRetType) { + setUpdateAlertConfigReceiverPayloadGetNameAttributeType(&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 +func (o *UpdateAlertConfigReceiverPayload) GetOpsgenieConfigs() (res UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType) { + res, _ = o.GetOpsgenieConfigsOk() + return } // 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 +func (o *UpdateAlertConfigReceiverPayload) GetOpsgenieConfigsOk() (ret UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType, ok bool) { + return getUpdateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeTypeOk(o.OpsgenieConfigs) } // 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 + _, ok := o.GetOpsgenieConfigsOk() + return ok } // SetOpsgenieConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner and assigns it to the OpsgenieConfigs field. -func (o *UpdateAlertConfigReceiverPayload) SetOpsgenieConfigs(v *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) { - o.OpsgenieConfigs = v +func (o *UpdateAlertConfigReceiverPayload) SetOpsgenieConfigs(v UpdateAlertConfigReceiverPayloadGetOpsgenieConfigsRetType) { + setUpdateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeType(&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 +func (o *UpdateAlertConfigReceiverPayload) GetWebHookConfigs() (res UpdateAlertConfigReceiverPayloadGetWebHookConfigsRetType) { + res, _ = o.GetWebHookConfigsOk() + return } // 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 +func (o *UpdateAlertConfigReceiverPayload) GetWebHookConfigsOk() (ret UpdateAlertConfigReceiverPayloadGetWebHookConfigsRetType, ok bool) { + return getUpdateAlertConfigReceiverPayloadGetWebHookConfigsAttributeTypeOk(o.WebHookConfigs) } // 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 + _, ok := o.GetWebHookConfigsOk() + return ok } // 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) SetWebHookConfigs(v UpdateAlertConfigReceiverPayloadGetWebHookConfigsRetType) { + setUpdateAlertConfigReceiverPayloadGetWebHookConfigsAttributeType(&o.WebHookConfigs, v) } func (o UpdateAlertConfigReceiverPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.EmailConfigs) { - toSerialize["emailConfigs"] = o.EmailConfigs + if val, ok := getUpdateAlertConfigReceiverPayloadGetEmailConfigsAttributeTypeOk(o.EmailConfigs); ok { + toSerialize["EmailConfigs"] = val + } + if val, ok := getUpdateAlertConfigReceiverPayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - toSerialize["name"] = o.Name - if !IsNil(o.OpsgenieConfigs) { - toSerialize["opsgenieConfigs"] = o.OpsgenieConfigs + if val, ok := getUpdateAlertConfigReceiverPayloadGetOpsgenieConfigsAttributeTypeOk(o.OpsgenieConfigs); ok { + toSerialize["OpsgenieConfigs"] = val } - if !IsNil(o.WebHookConfigs) { - toSerialize["webHookConfigs"] = o.WebHookConfigs + if val, ok := getUpdateAlertConfigReceiverPayloadGetWebHookConfigsAttributeTypeOk(o.WebHookConfigs); ok { + toSerialize["WebHookConfigs"] = val } return toSerialize, nil } diff --git a/services/observability/model_update_alert_config_route_payload.go b/services/observability/model_update_alert_config_route_payload.go index 901e36f57..4973320ad 100644 --- a/services/observability/model_update_alert_config_route_payload.go +++ b/services/observability/model_update_alert_config_route_payload.go @@ -17,27 +17,211 @@ import ( // checks if the UpdateAlertConfigRoutePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateAlertConfigRoutePayload{} +/* + types and functions for groupBy +*/ + +// isArray +type UpdateAlertConfigRoutePayloadGetGroupByAttributeType = *[]string +type UpdateAlertConfigRoutePayloadGetGroupByArgType = []string +type UpdateAlertConfigRoutePayloadGetGroupByRetType = []string + +func getUpdateAlertConfigRoutePayloadGetGroupByAttributeTypeOk(arg UpdateAlertConfigRoutePayloadGetGroupByAttributeType) (ret UpdateAlertConfigRoutePayloadGetGroupByRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigRoutePayloadGetGroupByAttributeType(arg *UpdateAlertConfigRoutePayloadGetGroupByAttributeType, val UpdateAlertConfigRoutePayloadGetGroupByRetType) { + *arg = &val +} + +/* + types and functions for groupInterval +*/ + +// isNotNullableString +type UpdateAlertConfigRoutePayloadGetGroupIntervalAttributeType = *string + +func getUpdateAlertConfigRoutePayloadGetGroupIntervalAttributeTypeOk(arg UpdateAlertConfigRoutePayloadGetGroupIntervalAttributeType) (ret UpdateAlertConfigRoutePayloadGetGroupIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigRoutePayloadGetGroupIntervalAttributeType(arg *UpdateAlertConfigRoutePayloadGetGroupIntervalAttributeType, val UpdateAlertConfigRoutePayloadGetGroupIntervalRetType) { + *arg = &val +} + +type UpdateAlertConfigRoutePayloadGetGroupIntervalArgType = string +type UpdateAlertConfigRoutePayloadGetGroupIntervalRetType = string + +/* + types and functions for groupWait +*/ + +// isNotNullableString +type UpdateAlertConfigRoutePayloadGetGroupWaitAttributeType = *string + +func getUpdateAlertConfigRoutePayloadGetGroupWaitAttributeTypeOk(arg UpdateAlertConfigRoutePayloadGetGroupWaitAttributeType) (ret UpdateAlertConfigRoutePayloadGetGroupWaitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigRoutePayloadGetGroupWaitAttributeType(arg *UpdateAlertConfigRoutePayloadGetGroupWaitAttributeType, val UpdateAlertConfigRoutePayloadGetGroupWaitRetType) { + *arg = &val +} + +type UpdateAlertConfigRoutePayloadGetGroupWaitArgType = string +type UpdateAlertConfigRoutePayloadGetGroupWaitRetType = string + +/* + types and functions for match +*/ + +// isFreeform +type UpdateAlertConfigRoutePayloadGetMatchAttributeType = *map[string]interface{} +type UpdateAlertConfigRoutePayloadGetMatchArgType = map[string]interface{} +type UpdateAlertConfigRoutePayloadGetMatchRetType = map[string]interface{} + +func getUpdateAlertConfigRoutePayloadGetMatchAttributeTypeOk(arg UpdateAlertConfigRoutePayloadGetMatchAttributeType) (ret UpdateAlertConfigRoutePayloadGetMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigRoutePayloadGetMatchAttributeType(arg *UpdateAlertConfigRoutePayloadGetMatchAttributeType, val UpdateAlertConfigRoutePayloadGetMatchRetType) { + *arg = &val +} + +/* + types and functions for matchRe +*/ + +// isFreeform +type UpdateAlertConfigRoutePayloadGetMatchReAttributeType = *map[string]interface{} +type UpdateAlertConfigRoutePayloadGetMatchReArgType = map[string]interface{} +type UpdateAlertConfigRoutePayloadGetMatchReRetType = map[string]interface{} + +func getUpdateAlertConfigRoutePayloadGetMatchReAttributeTypeOk(arg UpdateAlertConfigRoutePayloadGetMatchReAttributeType) (ret UpdateAlertConfigRoutePayloadGetMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigRoutePayloadGetMatchReAttributeType(arg *UpdateAlertConfigRoutePayloadGetMatchReAttributeType, val UpdateAlertConfigRoutePayloadGetMatchReRetType) { + *arg = &val +} + +/* + types and functions for matchers +*/ + +// isArray +type UpdateAlertConfigRoutePayloadGetMatchersAttributeType = *[]string +type UpdateAlertConfigRoutePayloadGetMatchersArgType = []string +type UpdateAlertConfigRoutePayloadGetMatchersRetType = []string + +func getUpdateAlertConfigRoutePayloadGetMatchersAttributeTypeOk(arg UpdateAlertConfigRoutePayloadGetMatchersAttributeType) (ret UpdateAlertConfigRoutePayloadGetMatchersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigRoutePayloadGetMatchersAttributeType(arg *UpdateAlertConfigRoutePayloadGetMatchersAttributeType, val UpdateAlertConfigRoutePayloadGetMatchersRetType) { + *arg = &val +} + +/* + types and functions for receiver +*/ + +// isNotNullableString +type UpdateAlertConfigRoutePayloadGetReceiverAttributeType = *string + +func getUpdateAlertConfigRoutePayloadGetReceiverAttributeTypeOk(arg UpdateAlertConfigRoutePayloadGetReceiverAttributeType) (ret UpdateAlertConfigRoutePayloadGetReceiverRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigRoutePayloadGetReceiverAttributeType(arg *UpdateAlertConfigRoutePayloadGetReceiverAttributeType, val UpdateAlertConfigRoutePayloadGetReceiverRetType) { + *arg = &val +} + +type UpdateAlertConfigRoutePayloadGetReceiverArgType = string +type UpdateAlertConfigRoutePayloadGetReceiverRetType = string + +/* + types and functions for repeatInterval +*/ + +// isNotNullableString +type UpdateAlertConfigRoutePayloadGetRepeatIntervalAttributeType = *string + +func getUpdateAlertConfigRoutePayloadGetRepeatIntervalAttributeTypeOk(arg UpdateAlertConfigRoutePayloadGetRepeatIntervalAttributeType) (ret UpdateAlertConfigRoutePayloadGetRepeatIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigRoutePayloadGetRepeatIntervalAttributeType(arg *UpdateAlertConfigRoutePayloadGetRepeatIntervalAttributeType, val UpdateAlertConfigRoutePayloadGetRepeatIntervalRetType) { + *arg = &val +} + +type UpdateAlertConfigRoutePayloadGetRepeatIntervalArgType = string +type UpdateAlertConfigRoutePayloadGetRepeatIntervalRetType = string + +/* + types and functions for routes +*/ + +// isArray +type UpdateAlertConfigRoutePayloadGetRoutesAttributeType = *[]CreateAlertConfigRoutePayloadRoutesInner +type UpdateAlertConfigRoutePayloadGetRoutesArgType = []CreateAlertConfigRoutePayloadRoutesInner +type UpdateAlertConfigRoutePayloadGetRoutesRetType = []CreateAlertConfigRoutePayloadRoutesInner + +func getUpdateAlertConfigRoutePayloadGetRoutesAttributeTypeOk(arg UpdateAlertConfigRoutePayloadGetRoutesAttributeType) (ret UpdateAlertConfigRoutePayloadGetRoutesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigRoutePayloadGetRoutesAttributeType(arg *UpdateAlertConfigRoutePayloadGetRoutesAttributeType, val UpdateAlertConfigRoutePayloadGetRoutesRetType) { + *arg = &val +} + // 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. - GroupBy *[]string `json:"groupBy,omitempty"` + GroupBy UpdateAlertConfigRoutePayloadGetGroupByAttributeType `json:"groupBy,omitempty"` // How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.) `Additional Validators:` * must be a valid time format - GroupInterval *string `json:"groupInterval,omitempty"` + GroupInterval UpdateAlertConfigRoutePayloadGetGroupIntervalAttributeType `json:"groupInterval,omitempty"` // How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.) `Additional Validators:` * must be a valid time format - GroupWait *string `json:"groupWait,omitempty"` + GroupWait UpdateAlertConfigRoutePayloadGetGroupWaitAttributeType `json:"groupWait,omitempty"` // map of key:value. A set of equality matchers an alert has to fulfill to match the node. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters * key and values should only include the characters: a-zA-Z0-9_./@&?:- - Match *map[string]interface{} `json:"match,omitempty"` + Match UpdateAlertConfigRoutePayloadGetMatchAttributeType `json:"match,omitempty"` // map of key:value. A set of regex-matchers an alert has to fulfill to match the node. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters - MatchRe *map[string]interface{} `json:"matchRe,omitempty"` + MatchRe UpdateAlertConfigRoutePayloadGetMatchReAttributeType `json:"matchRe,omitempty"` // A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens: * A valid Prometheus label name. * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors. * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters - Matchers *[]string `json:"matchers,omitempty"` + Matchers UpdateAlertConfigRoutePayloadGetMatchersAttributeType `json:"matchers,omitempty"` // Receiver that should be one item of receivers `Additional Validators:` * must be a in name of receivers // REQUIRED - Receiver *string `json:"receiver"` + Receiver UpdateAlertConfigRoutePayloadGetReceiverAttributeType `json:"receiver"` // How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more). `Additional Validators:` * must be a valid time format - RepeatInterval *string `json:"repeatInterval,omitempty"` + RepeatInterval UpdateAlertConfigRoutePayloadGetRepeatIntervalAttributeType `json:"repeatInterval,omitempty"` // Zero or more child routes. - Routes *[]CreateAlertConfigRoutePayloadRoutesInner `json:"routes,omitempty"` + Routes UpdateAlertConfigRoutePayloadGetRoutesAttributeType `json:"routes,omitempty"` } type _UpdateAlertConfigRoutePayload UpdateAlertConfigRoutePayload @@ -46,15 +230,9 @@ type _UpdateAlertConfigRoutePayload UpdateAlertConfigRoutePayload // 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 { +func NewUpdateAlertConfigRoutePayload(receiver UpdateAlertConfigRoutePayloadGetReceiverArgType) *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 + setUpdateAlertConfigRoutePayloadGetReceiverAttributeType(&this.Receiver, receiver) return &this } @@ -73,311 +251,234 @@ func NewUpdateAlertConfigRoutePayloadWithDefaults() *UpdateAlertConfigRoutePaylo } // 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 +func (o *UpdateAlertConfigRoutePayload) GetGroupBy() (res UpdateAlertConfigRoutePayloadGetGroupByRetType) { + res, _ = o.GetGroupByOk() + return } // GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigRoutePayload) GetGroupByOk() (*[]string, bool) { - if o == nil || IsNil(o.GroupBy) { - return nil, false - } - return o.GroupBy, true +func (o *UpdateAlertConfigRoutePayload) GetGroupByOk() (ret UpdateAlertConfigRoutePayloadGetGroupByRetType, ok bool) { + return getUpdateAlertConfigRoutePayloadGetGroupByAttributeTypeOk(o.GroupBy) } // 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 + _, ok := o.GetGroupByOk() + return ok } // SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. -func (o *UpdateAlertConfigRoutePayload) SetGroupBy(v *[]string) { - o.GroupBy = v +func (o *UpdateAlertConfigRoutePayload) SetGroupBy(v UpdateAlertConfigRoutePayloadGetGroupByRetType) { + setUpdateAlertConfigRoutePayloadGetGroupByAttributeType(&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 +func (o *UpdateAlertConfigRoutePayload) GetGroupInterval() (res UpdateAlertConfigRoutePayloadGetGroupIntervalRetType) { + res, _ = o.GetGroupIntervalOk() + return } // GetGroupIntervalOk returns a tuple with the GroupInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigRoutePayload) GetGroupIntervalOk() (*string, bool) { - if o == nil || IsNil(o.GroupInterval) { - return nil, false - } - return o.GroupInterval, true +func (o *UpdateAlertConfigRoutePayload) GetGroupIntervalOk() (ret UpdateAlertConfigRoutePayloadGetGroupIntervalRetType, ok bool) { + return getUpdateAlertConfigRoutePayloadGetGroupIntervalAttributeTypeOk(o.GroupInterval) } // 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 + _, ok := o.GetGroupIntervalOk() + return ok } // SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. -func (o *UpdateAlertConfigRoutePayload) SetGroupInterval(v *string) { - o.GroupInterval = v +func (o *UpdateAlertConfigRoutePayload) SetGroupInterval(v UpdateAlertConfigRoutePayloadGetGroupIntervalRetType) { + setUpdateAlertConfigRoutePayloadGetGroupIntervalAttributeType(&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 +func (o *UpdateAlertConfigRoutePayload) GetGroupWait() (res UpdateAlertConfigRoutePayloadGetGroupWaitRetType) { + res, _ = o.GetGroupWaitOk() + return } // GetGroupWaitOk returns a tuple with the GroupWait field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigRoutePayload) GetGroupWaitOk() (*string, bool) { - if o == nil || IsNil(o.GroupWait) { - return nil, false - } - return o.GroupWait, true +func (o *UpdateAlertConfigRoutePayload) GetGroupWaitOk() (ret UpdateAlertConfigRoutePayloadGetGroupWaitRetType, ok bool) { + return getUpdateAlertConfigRoutePayloadGetGroupWaitAttributeTypeOk(o.GroupWait) } // 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 + _, ok := o.GetGroupWaitOk() + return ok } // SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. -func (o *UpdateAlertConfigRoutePayload) SetGroupWait(v *string) { - o.GroupWait = v +func (o *UpdateAlertConfigRoutePayload) SetGroupWait(v UpdateAlertConfigRoutePayloadGetGroupWaitRetType) { + setUpdateAlertConfigRoutePayloadGetGroupWaitAttributeType(&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 +func (o *UpdateAlertConfigRoutePayload) GetMatch() (res UpdateAlertConfigRoutePayloadGetMatchRetType) { + res, _ = o.GetMatchOk() + return } // GetMatchOk returns a tuple with the Match field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigRoutePayload) GetMatchOk() (*map[string]interface{}, bool) { - if o == nil || IsNil(o.Match) { - return &map[string]interface{}{}, false - } - return o.Match, true +func (o *UpdateAlertConfigRoutePayload) GetMatchOk() (ret UpdateAlertConfigRoutePayloadGetMatchRetType, ok bool) { + return getUpdateAlertConfigRoutePayloadGetMatchAttributeTypeOk(o.Match) } // 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 + _, ok := o.GetMatchOk() + return ok } // 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 +func (o *UpdateAlertConfigRoutePayload) SetMatch(v UpdateAlertConfigRoutePayloadGetMatchRetType) { + setUpdateAlertConfigRoutePayloadGetMatchAttributeType(&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 +func (o *UpdateAlertConfigRoutePayload) GetMatchRe() (res UpdateAlertConfigRoutePayloadGetMatchReRetType) { + res, _ = o.GetMatchReOk() + return } // GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigRoutePayload) GetMatchReOk() (*map[string]interface{}, bool) { - if o == nil || IsNil(o.MatchRe) { - return &map[string]interface{}{}, false - } - return o.MatchRe, true +func (o *UpdateAlertConfigRoutePayload) GetMatchReOk() (ret UpdateAlertConfigRoutePayloadGetMatchReRetType, ok bool) { + return getUpdateAlertConfigRoutePayloadGetMatchReAttributeTypeOk(o.MatchRe) } // 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 + _, ok := o.GetMatchReOk() + return ok } // 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 +func (o *UpdateAlertConfigRoutePayload) SetMatchRe(v UpdateAlertConfigRoutePayloadGetMatchReRetType) { + setUpdateAlertConfigRoutePayloadGetMatchReAttributeType(&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 +func (o *UpdateAlertConfigRoutePayload) GetMatchers() (res UpdateAlertConfigRoutePayloadGetMatchersRetType) { + res, _ = o.GetMatchersOk() + return } // GetMatchersOk returns a tuple with the Matchers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigRoutePayload) GetMatchersOk() (*[]string, bool) { - if o == nil || IsNil(o.Matchers) { - return nil, false - } - return o.Matchers, true +func (o *UpdateAlertConfigRoutePayload) GetMatchersOk() (ret UpdateAlertConfigRoutePayloadGetMatchersRetType, ok bool) { + return getUpdateAlertConfigRoutePayloadGetMatchersAttributeTypeOk(o.Matchers) } // 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 + _, ok := o.GetMatchersOk() + return ok } // SetMatchers gets a reference to the given []string and assigns it to the Matchers field. -func (o *UpdateAlertConfigRoutePayload) SetMatchers(v *[]string) { - o.Matchers = v +func (o *UpdateAlertConfigRoutePayload) SetMatchers(v UpdateAlertConfigRoutePayloadGetMatchersRetType) { + setUpdateAlertConfigRoutePayloadGetMatchersAttributeType(&o.Matchers, v) } // GetReceiver returns the Receiver field value -func (o *UpdateAlertConfigRoutePayload) GetReceiver() *string { - if o == nil || IsNil(o.Receiver) { - var ret *string - return ret - } - - return o.Receiver +func (o *UpdateAlertConfigRoutePayload) GetReceiver() (ret UpdateAlertConfigRoutePayloadGetReceiverRetType) { + ret, _ = o.GetReceiverOk() + return ret } // 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 +func (o *UpdateAlertConfigRoutePayload) GetReceiverOk() (ret UpdateAlertConfigRoutePayloadGetReceiverRetType, ok bool) { + return getUpdateAlertConfigRoutePayloadGetReceiverAttributeTypeOk(o.Receiver) } // SetReceiver sets field value -func (o *UpdateAlertConfigRoutePayload) SetReceiver(v *string) { - o.Receiver = v +func (o *UpdateAlertConfigRoutePayload) SetReceiver(v UpdateAlertConfigRoutePayloadGetReceiverRetType) { + setUpdateAlertConfigRoutePayloadGetReceiverAttributeType(&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 +func (o *UpdateAlertConfigRoutePayload) GetRepeatInterval() (res UpdateAlertConfigRoutePayloadGetRepeatIntervalRetType) { + res, _ = o.GetRepeatIntervalOk() + return } // GetRepeatIntervalOk returns a tuple with the RepeatInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigRoutePayload) GetRepeatIntervalOk() (*string, bool) { - if o == nil || IsNil(o.RepeatInterval) { - return nil, false - } - return o.RepeatInterval, true +func (o *UpdateAlertConfigRoutePayload) GetRepeatIntervalOk() (ret UpdateAlertConfigRoutePayloadGetRepeatIntervalRetType, ok bool) { + return getUpdateAlertConfigRoutePayloadGetRepeatIntervalAttributeTypeOk(o.RepeatInterval) } // 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 + _, ok := o.GetRepeatIntervalOk() + return ok } // SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. -func (o *UpdateAlertConfigRoutePayload) SetRepeatInterval(v *string) { - o.RepeatInterval = v +func (o *UpdateAlertConfigRoutePayload) SetRepeatInterval(v UpdateAlertConfigRoutePayloadGetRepeatIntervalRetType) { + setUpdateAlertConfigRoutePayloadGetRepeatIntervalAttributeType(&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 +func (o *UpdateAlertConfigRoutePayload) GetRoutes() (res UpdateAlertConfigRoutePayloadGetRoutesRetType) { + res, _ = o.GetRoutesOk() + return } // GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigRoutePayload) GetRoutesOk() (*[]CreateAlertConfigRoutePayloadRoutesInner, bool) { - if o == nil || IsNil(o.Routes) { - return nil, false - } - return o.Routes, true +func (o *UpdateAlertConfigRoutePayload) GetRoutesOk() (ret UpdateAlertConfigRoutePayloadGetRoutesRetType, ok bool) { + return getUpdateAlertConfigRoutePayloadGetRoutesAttributeTypeOk(o.Routes) } // 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 + _, ok := o.GetRoutesOk() + return ok } // 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) SetRoutes(v UpdateAlertConfigRoutePayloadGetRoutesRetType) { + setUpdateAlertConfigRoutePayloadGetRoutesAttributeType(&o.Routes, v) } func (o UpdateAlertConfigRoutePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.GroupBy) { - toSerialize["groupBy"] = o.GroupBy + if val, ok := getUpdateAlertConfigRoutePayloadGetGroupByAttributeTypeOk(o.GroupBy); ok { + toSerialize["GroupBy"] = val + } + if val, ok := getUpdateAlertConfigRoutePayloadGetGroupIntervalAttributeTypeOk(o.GroupInterval); ok { + toSerialize["GroupInterval"] = val } - if !IsNil(o.GroupInterval) { - toSerialize["groupInterval"] = o.GroupInterval + if val, ok := getUpdateAlertConfigRoutePayloadGetGroupWaitAttributeTypeOk(o.GroupWait); ok { + toSerialize["GroupWait"] = val } - if !IsNil(o.GroupWait) { - toSerialize["groupWait"] = o.GroupWait + if val, ok := getUpdateAlertConfigRoutePayloadGetMatchAttributeTypeOk(o.Match); ok { + toSerialize["Match"] = val } - if !IsNil(o.Match) { - toSerialize["match"] = o.Match + if val, ok := getUpdateAlertConfigRoutePayloadGetMatchReAttributeTypeOk(o.MatchRe); ok { + toSerialize["MatchRe"] = val } - if !IsNil(o.MatchRe) { - toSerialize["matchRe"] = o.MatchRe + if val, ok := getUpdateAlertConfigRoutePayloadGetMatchersAttributeTypeOk(o.Matchers); ok { + toSerialize["Matchers"] = val } - if !IsNil(o.Matchers) { - toSerialize["matchers"] = o.Matchers + if val, ok := getUpdateAlertConfigRoutePayloadGetReceiverAttributeTypeOk(o.Receiver); ok { + toSerialize["Receiver"] = val } - toSerialize["receiver"] = o.Receiver - if !IsNil(o.RepeatInterval) { - toSerialize["repeatInterval"] = o.RepeatInterval + if val, ok := getUpdateAlertConfigRoutePayloadGetRepeatIntervalAttributeTypeOk(o.RepeatInterval); ok { + toSerialize["RepeatInterval"] = val } - if !IsNil(o.Routes) { - toSerialize["routes"] = o.Routes + if val, ok := getUpdateAlertConfigRoutePayloadGetRoutesAttributeTypeOk(o.Routes); ok { + toSerialize["Routes"] = val } return toSerialize, nil } diff --git a/services/observability/model_update_alert_configs_payload.go b/services/observability/model_update_alert_configs_payload.go index 2ec65a676..92b6d72f3 100644 --- a/services/observability/model_update_alert_configs_payload.go +++ b/services/observability/model_update_alert_configs_payload.go @@ -17,15 +17,95 @@ import ( // checks if the UpdateAlertConfigsPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateAlertConfigsPayload{} +/* + types and functions for global +*/ + +// isModel +type UpdateAlertConfigsPayloadGetGlobalAttributeType = *UpdateAlertConfigsPayloadGlobal +type UpdateAlertConfigsPayloadGetGlobalArgType = UpdateAlertConfigsPayloadGlobal +type UpdateAlertConfigsPayloadGetGlobalRetType = UpdateAlertConfigsPayloadGlobal + +func getUpdateAlertConfigsPayloadGetGlobalAttributeTypeOk(arg UpdateAlertConfigsPayloadGetGlobalAttributeType) (ret UpdateAlertConfigsPayloadGetGlobalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGetGlobalAttributeType(arg *UpdateAlertConfigsPayloadGetGlobalAttributeType, val UpdateAlertConfigsPayloadGetGlobalRetType) { + *arg = &val +} + +/* + types and functions for inhibitRules +*/ + +// isModel +type UpdateAlertConfigsPayloadGetInhibitRulesAttributeType = *UpdateAlertConfigsPayloadInhibitRules +type UpdateAlertConfigsPayloadGetInhibitRulesArgType = UpdateAlertConfigsPayloadInhibitRules +type UpdateAlertConfigsPayloadGetInhibitRulesRetType = UpdateAlertConfigsPayloadInhibitRules + +func getUpdateAlertConfigsPayloadGetInhibitRulesAttributeTypeOk(arg UpdateAlertConfigsPayloadGetInhibitRulesAttributeType) (ret UpdateAlertConfigsPayloadGetInhibitRulesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGetInhibitRulesAttributeType(arg *UpdateAlertConfigsPayloadGetInhibitRulesAttributeType, val UpdateAlertConfigsPayloadGetInhibitRulesRetType) { + *arg = &val +} + +/* + types and functions for receivers +*/ + +// isArray +type UpdateAlertConfigsPayloadGetReceiversAttributeType = *[]UpdateAlertConfigsPayloadReceiversInner +type UpdateAlertConfigsPayloadGetReceiversArgType = []UpdateAlertConfigsPayloadReceiversInner +type UpdateAlertConfigsPayloadGetReceiversRetType = []UpdateAlertConfigsPayloadReceiversInner + +func getUpdateAlertConfigsPayloadGetReceiversAttributeTypeOk(arg UpdateAlertConfigsPayloadGetReceiversAttributeType) (ret UpdateAlertConfigsPayloadGetReceiversRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGetReceiversAttributeType(arg *UpdateAlertConfigsPayloadGetReceiversAttributeType, val UpdateAlertConfigsPayloadGetReceiversRetType) { + *arg = &val +} + +/* + types and functions for route +*/ + +// isModel +type UpdateAlertConfigsPayloadGetRouteAttributeType = *UpdateAlertConfigsPayloadRoute +type UpdateAlertConfigsPayloadGetRouteArgType = UpdateAlertConfigsPayloadRoute +type UpdateAlertConfigsPayloadGetRouteRetType = UpdateAlertConfigsPayloadRoute + +func getUpdateAlertConfigsPayloadGetRouteAttributeTypeOk(arg UpdateAlertConfigsPayloadGetRouteAttributeType) (ret UpdateAlertConfigsPayloadGetRouteRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGetRouteAttributeType(arg *UpdateAlertConfigsPayloadGetRouteAttributeType, val UpdateAlertConfigsPayloadGetRouteRetType) { + *arg = &val +} + // UpdateAlertConfigsPayload Alert config type UpdateAlertConfigsPayload struct { - Global *UpdateAlertConfigsPayloadGlobal `json:"global,omitempty"` - InhibitRules *UpdateAlertConfigsPayloadInhibitRules `json:"inhibitRules,omitempty"` + Global UpdateAlertConfigsPayloadGetGlobalAttributeType `json:"global,omitempty"` + InhibitRules UpdateAlertConfigsPayloadGetInhibitRulesAttributeType `json:"inhibitRules,omitempty"` // A list of notification receivers. // REQUIRED - Receivers *[]UpdateAlertConfigsPayloadReceiversInner `json:"receivers"` + Receivers UpdateAlertConfigsPayloadGetReceiversAttributeType `json:"receivers"` // REQUIRED - Route *UpdateAlertConfigsPayloadRoute `json:"route"` + Route UpdateAlertConfigsPayloadGetRouteAttributeType `json:"route"` } type _UpdateAlertConfigsPayload UpdateAlertConfigsPayload @@ -34,10 +114,10 @@ type _UpdateAlertConfigsPayload UpdateAlertConfigsPayload // 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 { +func NewUpdateAlertConfigsPayload(receivers UpdateAlertConfigsPayloadGetReceiversArgType, route UpdateAlertConfigsPayloadGetRouteArgType) *UpdateAlertConfigsPayload { this := UpdateAlertConfigsPayload{} - this.Receivers = receivers - this.Route = route + setUpdateAlertConfigsPayloadGetReceiversAttributeType(&this.Receivers, receivers) + setUpdateAlertConfigsPayloadGetRouteAttributeType(&this.Route, route) return &this } @@ -50,127 +130,99 @@ func NewUpdateAlertConfigsPayloadWithDefaults() *UpdateAlertConfigsPayload { } // 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 +func (o *UpdateAlertConfigsPayload) GetGlobal() (res UpdateAlertConfigsPayloadGetGlobalRetType) { + res, _ = o.GetGlobalOk() + return } // 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 +func (o *UpdateAlertConfigsPayload) GetGlobalOk() (ret UpdateAlertConfigsPayloadGetGlobalRetType, ok bool) { + return getUpdateAlertConfigsPayloadGetGlobalAttributeTypeOk(o.Global) } // 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 + _, ok := o.GetGlobalOk() + return ok } // SetGlobal gets a reference to the given UpdateAlertConfigsPayloadGlobal and assigns it to the Global field. -func (o *UpdateAlertConfigsPayload) SetGlobal(v *UpdateAlertConfigsPayloadGlobal) { - o.Global = v +func (o *UpdateAlertConfigsPayload) SetGlobal(v UpdateAlertConfigsPayloadGetGlobalRetType) { + setUpdateAlertConfigsPayloadGetGlobalAttributeType(&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 +func (o *UpdateAlertConfigsPayload) GetInhibitRules() (res UpdateAlertConfigsPayloadGetInhibitRulesRetType) { + res, _ = o.GetInhibitRulesOk() + return } // 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 +func (o *UpdateAlertConfigsPayload) GetInhibitRulesOk() (ret UpdateAlertConfigsPayloadGetInhibitRulesRetType, ok bool) { + return getUpdateAlertConfigsPayloadGetInhibitRulesAttributeTypeOk(o.InhibitRules) } // 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 + _, ok := o.GetInhibitRulesOk() + return ok } // SetInhibitRules gets a reference to the given UpdateAlertConfigsPayloadInhibitRules and assigns it to the InhibitRules field. -func (o *UpdateAlertConfigsPayload) SetInhibitRules(v *UpdateAlertConfigsPayloadInhibitRules) { - o.InhibitRules = v +func (o *UpdateAlertConfigsPayload) SetInhibitRules(v UpdateAlertConfigsPayloadGetInhibitRulesRetType) { + setUpdateAlertConfigsPayloadGetInhibitRulesAttributeType(&o.InhibitRules, v) } // GetReceivers returns the Receivers field value -func (o *UpdateAlertConfigsPayload) GetReceivers() *[]UpdateAlertConfigsPayloadReceiversInner { - if o == nil || IsNil(o.Receivers) { - var ret *[]UpdateAlertConfigsPayloadReceiversInner - return ret - } - - return o.Receivers +func (o *UpdateAlertConfigsPayload) GetReceivers() (ret UpdateAlertConfigsPayloadGetReceiversRetType) { + ret, _ = o.GetReceiversOk() + return ret } // 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 +func (o *UpdateAlertConfigsPayload) GetReceiversOk() (ret UpdateAlertConfigsPayloadGetReceiversRetType, ok bool) { + return getUpdateAlertConfigsPayloadGetReceiversAttributeTypeOk(o.Receivers) } // SetReceivers sets field value -func (o *UpdateAlertConfigsPayload) SetReceivers(v *[]UpdateAlertConfigsPayloadReceiversInner) { - o.Receivers = v +func (o *UpdateAlertConfigsPayload) SetReceivers(v UpdateAlertConfigsPayloadGetReceiversRetType) { + setUpdateAlertConfigsPayloadGetReceiversAttributeType(&o.Receivers, v) } // GetRoute returns the Route field value -func (o *UpdateAlertConfigsPayload) GetRoute() *UpdateAlertConfigsPayloadRoute { - if o == nil || IsNil(o.Route) { - var ret *UpdateAlertConfigsPayloadRoute - return ret - } - - return o.Route +func (o *UpdateAlertConfigsPayload) GetRoute() (ret UpdateAlertConfigsPayloadGetRouteRetType) { + ret, _ = o.GetRouteOk() + return ret } // 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 +func (o *UpdateAlertConfigsPayload) GetRouteOk() (ret UpdateAlertConfigsPayloadGetRouteRetType, ok bool) { + return getUpdateAlertConfigsPayloadGetRouteAttributeTypeOk(o.Route) } // SetRoute sets field value -func (o *UpdateAlertConfigsPayload) SetRoute(v *UpdateAlertConfigsPayloadRoute) { - o.Route = v +func (o *UpdateAlertConfigsPayload) SetRoute(v UpdateAlertConfigsPayloadGetRouteRetType) { + setUpdateAlertConfigsPayloadGetRouteAttributeType(&o.Route, v) } func (o UpdateAlertConfigsPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Global) { - toSerialize["global"] = o.Global + if val, ok := getUpdateAlertConfigsPayloadGetGlobalAttributeTypeOk(o.Global); ok { + toSerialize["Global"] = val + } + if val, ok := getUpdateAlertConfigsPayloadGetInhibitRulesAttributeTypeOk(o.InhibitRules); ok { + toSerialize["InhibitRules"] = val + } + if val, ok := getUpdateAlertConfigsPayloadGetReceiversAttributeTypeOk(o.Receivers); ok { + toSerialize["Receivers"] = val } - if !IsNil(o.InhibitRules) { - toSerialize["inhibitRules"] = o.InhibitRules + if val, ok := getUpdateAlertConfigsPayloadGetRouteAttributeTypeOk(o.Route); ok { + toSerialize["Route"] = val } - toSerialize["receivers"] = o.Receivers - toSerialize["route"] = o.Route return toSerialize, nil } diff --git a/services/observability/model_update_alert_configs_payload_global.go b/services/observability/model_update_alert_configs_payload_global.go index b2d135b4c..0d52b99dd 100644 --- a/services/observability/model_update_alert_configs_payload_global.go +++ b/services/observability/model_update_alert_configs_payload_global.go @@ -17,24 +17,192 @@ import ( // checks if the UpdateAlertConfigsPayloadGlobal type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateAlertConfigsPayloadGlobal{} +/* + types and functions for opsgenieApiKey +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyAttributeType = *string + +func getUpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyAttributeTypeOk(arg UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyAttributeType) (ret UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyAttributeType(arg *UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyAttributeType, val UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyArgType = string +type UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyRetType = string + +/* + types and functions for opsgenieApiUrl +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlAttributeType = *string + +func getUpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlAttributeTypeOk(arg UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlAttributeType) (ret UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlAttributeType(arg *UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlAttributeType, val UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlArgType = string +type UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlRetType = string + +/* + types and functions for resolveTimeout +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadGlobalGetResolveTimeoutAttributeType = *string + +func getUpdateAlertConfigsPayloadGlobalGetResolveTimeoutAttributeTypeOk(arg UpdateAlertConfigsPayloadGlobalGetResolveTimeoutAttributeType) (ret UpdateAlertConfigsPayloadGlobalGetResolveTimeoutRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGlobalGetResolveTimeoutAttributeType(arg *UpdateAlertConfigsPayloadGlobalGetResolveTimeoutAttributeType, val UpdateAlertConfigsPayloadGlobalGetResolveTimeoutRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadGlobalGetResolveTimeoutArgType = string +type UpdateAlertConfigsPayloadGlobalGetResolveTimeoutRetType = string + +/* + types and functions for smtpAuthIdentity +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityAttributeType = *string + +func getUpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityAttributeTypeOk(arg UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityAttributeType) (ret UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityAttributeType(arg *UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityAttributeType, val UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityArgType = string +type UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityRetType = string + +/* + types and functions for smtpAuthPassword +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordAttributeType = *string + +func getUpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordAttributeTypeOk(arg UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordAttributeType) (ret UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordAttributeType(arg *UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordAttributeType, val UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordArgType = string +type UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordRetType = string + +/* + types and functions for smtpAuthUsername +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameAttributeType = *string + +func getUpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameAttributeTypeOk(arg UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameAttributeType) (ret UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameAttributeType(arg *UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameAttributeType, val UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameArgType = string +type UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameRetType = string + +/* + types and functions for smtpFrom +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadGlobalGetSmtpFromAttributeType = *string + +func getUpdateAlertConfigsPayloadGlobalGetSmtpFromAttributeTypeOk(arg UpdateAlertConfigsPayloadGlobalGetSmtpFromAttributeType) (ret UpdateAlertConfigsPayloadGlobalGetSmtpFromRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGlobalGetSmtpFromAttributeType(arg *UpdateAlertConfigsPayloadGlobalGetSmtpFromAttributeType, val UpdateAlertConfigsPayloadGlobalGetSmtpFromRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadGlobalGetSmtpFromArgType = string +type UpdateAlertConfigsPayloadGlobalGetSmtpFromRetType = string + +/* + types and functions for smtpSmarthost +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostAttributeType = *string + +func getUpdateAlertConfigsPayloadGlobalGetSmtpSmarthostAttributeTypeOk(arg UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostAttributeType) (ret UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadGlobalGetSmtpSmarthostAttributeType(arg *UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostAttributeType, val UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostArgType = string +type UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostRetType = string + // 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- - OpsgenieApiKey *string `json:"opsgenieApiKey,omitempty"` + OpsgenieApiKey UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyAttributeType `json:"opsgenieApiKey,omitempty"` // Opsgenie api url `Additional Validators:` * must be a syntactically valid url address - OpsgenieApiUrl *string `json:"opsgenieApiUrl,omitempty"` + OpsgenieApiUrl UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlAttributeType `json:"opsgenieApiUrl,omitempty"` // ResolveTimeout is the default value used by alertmanager if the alert does not include EndsAt, after this time passes it can declare the alert as resolved if it has not been updated. This has no impact on alerts from Prometheus, as they always include EndsAt. `Additional Validators:` * must be a valid time format - ResolveTimeout *string `json:"resolveTimeout,omitempty"` + ResolveTimeout UpdateAlertConfigsPayloadGlobalGetResolveTimeoutAttributeType `json:"resolveTimeout,omitempty"` // Auth identity. `Additional Validators:` * must be a syntactically valid email address - SmtpAuthIdentity *string `json:"smtpAuthIdentity,omitempty"` + SmtpAuthIdentity UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityAttributeType `json:"smtpAuthIdentity,omitempty"` // SMTP Auth using LOGIN and PLAIN. - SmtpAuthPassword *string `json:"smtpAuthPassword,omitempty"` + SmtpAuthPassword UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordAttributeType `json:"smtpAuthPassword,omitempty"` // SMTP Auth using CRAM-MD5, LOGIN and PLAIN. If empty, Alertmanager doesn't authenticate to the SMTP server. - SmtpAuthUsername *string `json:"smtpAuthUsername,omitempty"` + SmtpAuthUsername UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameAttributeType `json:"smtpAuthUsername,omitempty"` // The default SMTP From header field. `Additional Validators:` * must be a syntactically valid email address - SmtpFrom *string `json:"smtpFrom,omitempty"` + SmtpFrom UpdateAlertConfigsPayloadGlobalGetSmtpFromAttributeType `json:"smtpFrom,omitempty"` // 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"` + SmtpSmarthost UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostAttributeType `json:"smtpSmarthost,omitempty"` } // NewUpdateAlertConfigsPayloadGlobal instantiates a new UpdateAlertConfigsPayloadGlobal object @@ -43,8 +211,6 @@ type UpdateAlertConfigsPayloadGlobal struct { // will change when the set of required properties is changed func NewUpdateAlertConfigsPayloadGlobal() *UpdateAlertConfigsPayloadGlobal { this := UpdateAlertConfigsPayloadGlobal{} - var resolveTimeout string = "5m" - this.ResolveTimeout = &resolveTimeout return &this } @@ -59,286 +225,214 @@ func NewUpdateAlertConfigsPayloadGlobalWithDefaults() *UpdateAlertConfigsPayload } // 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 +func (o *UpdateAlertConfigsPayloadGlobal) GetOpsgenieApiKey() (res UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyRetType) { + res, _ = o.GetOpsgenieApiKeyOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadGlobal) GetOpsgenieApiKeyOk() (ret UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyRetType, ok bool) { + return getUpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyAttributeTypeOk(o.OpsgenieApiKey) } // 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 + _, ok := o.GetOpsgenieApiKeyOk() + return ok } // SetOpsgenieApiKey gets a reference to the given string and assigns it to the OpsgenieApiKey field. -func (o *UpdateAlertConfigsPayloadGlobal) SetOpsgenieApiKey(v *string) { - o.OpsgenieApiKey = v +func (o *UpdateAlertConfigsPayloadGlobal) SetOpsgenieApiKey(v UpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyRetType) { + setUpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyAttributeType(&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 +func (o *UpdateAlertConfigsPayloadGlobal) GetOpsgenieApiUrl() (res UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlRetType) { + res, _ = o.GetOpsgenieApiUrlOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadGlobal) GetOpsgenieApiUrlOk() (ret UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlRetType, ok bool) { + return getUpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlAttributeTypeOk(o.OpsgenieApiUrl) } // 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 + _, ok := o.GetOpsgenieApiUrlOk() + return ok } // SetOpsgenieApiUrl gets a reference to the given string and assigns it to the OpsgenieApiUrl field. -func (o *UpdateAlertConfigsPayloadGlobal) SetOpsgenieApiUrl(v *string) { - o.OpsgenieApiUrl = v +func (o *UpdateAlertConfigsPayloadGlobal) SetOpsgenieApiUrl(v UpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlRetType) { + setUpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlAttributeType(&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 +func (o *UpdateAlertConfigsPayloadGlobal) GetResolveTimeout() (res UpdateAlertConfigsPayloadGlobalGetResolveTimeoutRetType) { + res, _ = o.GetResolveTimeoutOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadGlobal) GetResolveTimeoutOk() (ret UpdateAlertConfigsPayloadGlobalGetResolveTimeoutRetType, ok bool) { + return getUpdateAlertConfigsPayloadGlobalGetResolveTimeoutAttributeTypeOk(o.ResolveTimeout) } // 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 + _, ok := o.GetResolveTimeoutOk() + return ok } // SetResolveTimeout gets a reference to the given string and assigns it to the ResolveTimeout field. -func (o *UpdateAlertConfigsPayloadGlobal) SetResolveTimeout(v *string) { - o.ResolveTimeout = v +func (o *UpdateAlertConfigsPayloadGlobal) SetResolveTimeout(v UpdateAlertConfigsPayloadGlobalGetResolveTimeoutRetType) { + setUpdateAlertConfigsPayloadGlobalGetResolveTimeoutAttributeType(&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 +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthIdentity() (res UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityRetType) { + res, _ = o.GetSmtpAuthIdentityOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthIdentityOk() (ret UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityRetType, ok bool) { + return getUpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityAttributeTypeOk(o.SmtpAuthIdentity) } // 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 + _, ok := o.GetSmtpAuthIdentityOk() + return ok } // SetSmtpAuthIdentity gets a reference to the given string and assigns it to the SmtpAuthIdentity field. -func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpAuthIdentity(v *string) { - o.SmtpAuthIdentity = v +func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpAuthIdentity(v UpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityRetType) { + setUpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityAttributeType(&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 +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthPassword() (res UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordRetType) { + res, _ = o.GetSmtpAuthPasswordOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthPasswordOk() (ret UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordRetType, ok bool) { + return getUpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordAttributeTypeOk(o.SmtpAuthPassword) } // 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 + _, ok := o.GetSmtpAuthPasswordOk() + return ok } // SetSmtpAuthPassword gets a reference to the given string and assigns it to the SmtpAuthPassword field. -func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpAuthPassword(v *string) { - o.SmtpAuthPassword = v +func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpAuthPassword(v UpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordRetType) { + setUpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordAttributeType(&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 +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthUsername() (res UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameRetType) { + res, _ = o.GetSmtpAuthUsernameOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpAuthUsernameOk() (ret UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameRetType, ok bool) { + return getUpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameAttributeTypeOk(o.SmtpAuthUsername) } // 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 + _, ok := o.GetSmtpAuthUsernameOk() + return ok } // SetSmtpAuthUsername gets a reference to the given string and assigns it to the SmtpAuthUsername field. -func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpAuthUsername(v *string) { - o.SmtpAuthUsername = v +func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpAuthUsername(v UpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameRetType) { + setUpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameAttributeType(&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 +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpFrom() (res UpdateAlertConfigsPayloadGlobalGetSmtpFromRetType) { + res, _ = o.GetSmtpFromOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpFromOk() (ret UpdateAlertConfigsPayloadGlobalGetSmtpFromRetType, ok bool) { + return getUpdateAlertConfigsPayloadGlobalGetSmtpFromAttributeTypeOk(o.SmtpFrom) } // 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 + _, ok := o.GetSmtpFromOk() + return ok } // SetSmtpFrom gets a reference to the given string and assigns it to the SmtpFrom field. -func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpFrom(v *string) { - o.SmtpFrom = v +func (o *UpdateAlertConfigsPayloadGlobal) SetSmtpFrom(v UpdateAlertConfigsPayloadGlobalGetSmtpFromRetType) { + setUpdateAlertConfigsPayloadGlobalGetSmtpFromAttributeType(&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 +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpSmarthost() (res UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostRetType) { + res, _ = o.GetSmtpSmarthostOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadGlobal) GetSmtpSmarthostOk() (ret UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostRetType, ok bool) { + return getUpdateAlertConfigsPayloadGlobalGetSmtpSmarthostAttributeTypeOk(o.SmtpSmarthost) } // 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 + _, ok := o.GetSmtpSmarthostOk() + return ok } // 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) SetSmtpSmarthost(v UpdateAlertConfigsPayloadGlobalGetSmtpSmarthostRetType) { + setUpdateAlertConfigsPayloadGlobalGetSmtpSmarthostAttributeType(&o.SmtpSmarthost, v) } func (o UpdateAlertConfigsPayloadGlobal) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.OpsgenieApiKey) { - toSerialize["opsgenieApiKey"] = o.OpsgenieApiKey + if val, ok := getUpdateAlertConfigsPayloadGlobalGetOpsgenieApiKeyAttributeTypeOk(o.OpsgenieApiKey); ok { + toSerialize["OpsgenieApiKey"] = val } - if !IsNil(o.OpsgenieApiUrl) { - toSerialize["opsgenieApiUrl"] = o.OpsgenieApiUrl + if val, ok := getUpdateAlertConfigsPayloadGlobalGetOpsgenieApiUrlAttributeTypeOk(o.OpsgenieApiUrl); ok { + toSerialize["OpsgenieApiUrl"] = val } - if !IsNil(o.ResolveTimeout) { - toSerialize["resolveTimeout"] = o.ResolveTimeout + if val, ok := getUpdateAlertConfigsPayloadGlobalGetResolveTimeoutAttributeTypeOk(o.ResolveTimeout); ok { + toSerialize["ResolveTimeout"] = val } - if !IsNil(o.SmtpAuthIdentity) { - toSerialize["smtpAuthIdentity"] = o.SmtpAuthIdentity + if val, ok := getUpdateAlertConfigsPayloadGlobalGetSmtpAuthIdentityAttributeTypeOk(o.SmtpAuthIdentity); ok { + toSerialize["SmtpAuthIdentity"] = val } - if !IsNil(o.SmtpAuthPassword) { - toSerialize["smtpAuthPassword"] = o.SmtpAuthPassword + if val, ok := getUpdateAlertConfigsPayloadGlobalGetSmtpAuthPasswordAttributeTypeOk(o.SmtpAuthPassword); ok { + toSerialize["SmtpAuthPassword"] = val } - if !IsNil(o.SmtpAuthUsername) { - toSerialize["smtpAuthUsername"] = o.SmtpAuthUsername + if val, ok := getUpdateAlertConfigsPayloadGlobalGetSmtpAuthUsernameAttributeTypeOk(o.SmtpAuthUsername); ok { + toSerialize["SmtpAuthUsername"] = val } - if !IsNil(o.SmtpFrom) { - toSerialize["smtpFrom"] = o.SmtpFrom + if val, ok := getUpdateAlertConfigsPayloadGlobalGetSmtpFromAttributeTypeOk(o.SmtpFrom); ok { + toSerialize["SmtpFrom"] = val } - if !IsNil(o.SmtpSmarthost) { - toSerialize["smtpSmarthost"] = o.SmtpSmarthost + if val, ok := getUpdateAlertConfigsPayloadGlobalGetSmtpSmarthostAttributeTypeOk(o.SmtpSmarthost); ok { + toSerialize["SmtpSmarthost"] = val } return toSerialize, nil } 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 2bebf6514..d6df16641 100644 --- a/services/observability/model_update_alert_configs_payload_inhibit_rules.go +++ b/services/observability/model_update_alert_configs_payload_inhibit_rules.go @@ -17,18 +17,118 @@ import ( // checks if the UpdateAlertConfigsPayloadInhibitRules type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateAlertConfigsPayloadInhibitRules{} +/* + types and functions for equal +*/ + +// isArray +type UpdateAlertConfigsPayloadInhibitRulesGetEqualAttributeType = *[]string +type UpdateAlertConfigsPayloadInhibitRulesGetEqualArgType = []string +type UpdateAlertConfigsPayloadInhibitRulesGetEqualRetType = []string + +func getUpdateAlertConfigsPayloadInhibitRulesGetEqualAttributeTypeOk(arg UpdateAlertConfigsPayloadInhibitRulesGetEqualAttributeType) (ret UpdateAlertConfigsPayloadInhibitRulesGetEqualRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadInhibitRulesGetEqualAttributeType(arg *UpdateAlertConfigsPayloadInhibitRulesGetEqualAttributeType, val UpdateAlertConfigsPayloadInhibitRulesGetEqualRetType) { + *arg = &val +} + +/* + types and functions for sourceMatch +*/ + +// isFreeform +type UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchAttributeType = *map[string]interface{} +type UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchArgType = map[string]interface{} +type UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchRetType = map[string]interface{} + +func getUpdateAlertConfigsPayloadInhibitRulesGetSourceMatchAttributeTypeOk(arg UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchAttributeType) (ret UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadInhibitRulesGetSourceMatchAttributeType(arg *UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchAttributeType, val UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchRetType) { + *arg = &val +} + +/* + types and functions for sourceMatchRe +*/ + +// isFreeform +type UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReAttributeType = *map[string]interface{} +type UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReArgType = map[string]interface{} +type UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReRetType = map[string]interface{} + +func getUpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReAttributeTypeOk(arg UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReAttributeType) (ret UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReAttributeType(arg *UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReAttributeType, val UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReRetType) { + *arg = &val +} + +/* + types and functions for targetMatch +*/ + +// isFreeform +type UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchAttributeType = *map[string]interface{} +type UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchArgType = map[string]interface{} +type UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchRetType = map[string]interface{} + +func getUpdateAlertConfigsPayloadInhibitRulesGetTargetMatchAttributeTypeOk(arg UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchAttributeType) (ret UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadInhibitRulesGetTargetMatchAttributeType(arg *UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchAttributeType, val UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchRetType) { + *arg = &val +} + +/* + types and functions for targetMatchRe +*/ + +// isFreeform +type UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReAttributeType = *map[string]interface{} +type UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReArgType = map[string]interface{} +type UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReRetType = map[string]interface{} + +func getUpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReAttributeTypeOk(arg UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReAttributeType) (ret UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReAttributeType(arg *UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReAttributeType, val UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReRetType) { + *arg = &val +} + // 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_./@&?:- - Equal *[]string `json:"equal,omitempty"` + Equal UpdateAlertConfigsPayloadInhibitRulesGetEqualAttributeType `json:"equal,omitempty"` // map of key:value. Matchers for which one or more alerts have to exist for the inhibition to take effect. `Additional Validators:` * should not contain more than 5 keys * each key and value should not have more than 200 characters * each key and value should only include the characters: a-zA-Z0-9_./@&?:- - SourceMatch *map[string]interface{} `json:"sourceMatch,omitempty"` + SourceMatch UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchAttributeType `json:"sourceMatch,omitempty"` // map of key:value. Regex match `Additional Validators:` * should not contain more than 5 keys * each key and value should not have more than 200 characters - SourceMatchRe *map[string]interface{} `json:"sourceMatchRe,omitempty"` + SourceMatchRe UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReAttributeType `json:"sourceMatchRe,omitempty"` // map of key:value. Matchers that have to be fulfilled in the alerts to be muted. `Additional Validators:` * should not contain more than 5 keys * each key and value should not have more than 200 characters * each key and value should only include the characters: a-zA-Z0-9_./@&?:- - TargetMatch *map[string]interface{} `json:"targetMatch,omitempty"` + TargetMatch UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchAttributeType `json:"targetMatch,omitempty"` // 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"` + TargetMatchRe UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReAttributeType `json:"targetMatchRe,omitempty"` } // NewUpdateAlertConfigsPayloadInhibitRules instantiates a new UpdateAlertConfigsPayloadInhibitRules object @@ -49,181 +149,136 @@ func NewUpdateAlertConfigsPayloadInhibitRulesWithDefaults() *UpdateAlertConfigsP } // 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 +func (o *UpdateAlertConfigsPayloadInhibitRules) GetEqual() (res UpdateAlertConfigsPayloadInhibitRulesGetEqualRetType) { + res, _ = o.GetEqualOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadInhibitRules) GetEqualOk() (ret UpdateAlertConfigsPayloadInhibitRulesGetEqualRetType, ok bool) { + return getUpdateAlertConfigsPayloadInhibitRulesGetEqualAttributeTypeOk(o.Equal) } // 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 + _, ok := o.GetEqualOk() + return ok } // SetEqual gets a reference to the given []string and assigns it to the Equal field. -func (o *UpdateAlertConfigsPayloadInhibitRules) SetEqual(v *[]string) { - o.Equal = v +func (o *UpdateAlertConfigsPayloadInhibitRules) SetEqual(v UpdateAlertConfigsPayloadInhibitRulesGetEqualRetType) { + setUpdateAlertConfigsPayloadInhibitRulesGetEqualAttributeType(&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 +func (o *UpdateAlertConfigsPayloadInhibitRules) GetSourceMatch() (res UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchRetType) { + res, _ = o.GetSourceMatchOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadInhibitRules) GetSourceMatchOk() (ret UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchRetType, ok bool) { + return getUpdateAlertConfigsPayloadInhibitRulesGetSourceMatchAttributeTypeOk(o.SourceMatch) } // 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 + _, ok := o.GetSourceMatchOk() + return ok } // 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 +func (o *UpdateAlertConfigsPayloadInhibitRules) SetSourceMatch(v UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchRetType) { + setUpdateAlertConfigsPayloadInhibitRulesGetSourceMatchAttributeType(&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 +func (o *UpdateAlertConfigsPayloadInhibitRules) GetSourceMatchRe() (res UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReRetType) { + res, _ = o.GetSourceMatchReOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadInhibitRules) GetSourceMatchReOk() (ret UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReRetType, ok bool) { + return getUpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReAttributeTypeOk(o.SourceMatchRe) } // 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 + _, ok := o.GetSourceMatchReOk() + return ok } // 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 +func (o *UpdateAlertConfigsPayloadInhibitRules) SetSourceMatchRe(v UpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReRetType) { + setUpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReAttributeType(&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 +func (o *UpdateAlertConfigsPayloadInhibitRules) GetTargetMatch() (res UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchRetType) { + res, _ = o.GetTargetMatchOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadInhibitRules) GetTargetMatchOk() (ret UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchRetType, ok bool) { + return getUpdateAlertConfigsPayloadInhibitRulesGetTargetMatchAttributeTypeOk(o.TargetMatch) } // 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 + _, ok := o.GetTargetMatchOk() + return ok } // 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 +func (o *UpdateAlertConfigsPayloadInhibitRules) SetTargetMatch(v UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchRetType) { + setUpdateAlertConfigsPayloadInhibitRulesGetTargetMatchAttributeType(&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 +func (o *UpdateAlertConfigsPayloadInhibitRules) GetTargetMatchRe() (res UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReRetType) { + res, _ = o.GetTargetMatchReOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadInhibitRules) GetTargetMatchReOk() (ret UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReRetType, ok bool) { + return getUpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReAttributeTypeOk(o.TargetMatchRe) } // 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 + _, ok := o.GetTargetMatchReOk() + return ok } // 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) SetTargetMatchRe(v UpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReRetType) { + setUpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReAttributeType(&o.TargetMatchRe, v) } func (o UpdateAlertConfigsPayloadInhibitRules) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Equal) { - toSerialize["equal"] = o.Equal + if val, ok := getUpdateAlertConfigsPayloadInhibitRulesGetEqualAttributeTypeOk(o.Equal); ok { + toSerialize["Equal"] = val } - if !IsNil(o.SourceMatch) { - toSerialize["sourceMatch"] = o.SourceMatch + if val, ok := getUpdateAlertConfigsPayloadInhibitRulesGetSourceMatchAttributeTypeOk(o.SourceMatch); ok { + toSerialize["SourceMatch"] = val } - if !IsNil(o.SourceMatchRe) { - toSerialize["sourceMatchRe"] = o.SourceMatchRe + if val, ok := getUpdateAlertConfigsPayloadInhibitRulesGetSourceMatchReAttributeTypeOk(o.SourceMatchRe); ok { + toSerialize["SourceMatchRe"] = val } - if !IsNil(o.TargetMatch) { - toSerialize["targetMatch"] = o.TargetMatch + if val, ok := getUpdateAlertConfigsPayloadInhibitRulesGetTargetMatchAttributeTypeOk(o.TargetMatch); ok { + toSerialize["TargetMatch"] = val } - if !IsNil(o.TargetMatchRe) { - toSerialize["targetMatchRe"] = o.TargetMatchRe + if val, ok := getUpdateAlertConfigsPayloadInhibitRulesGetTargetMatchReAttributeTypeOk(o.TargetMatchRe); ok { + toSerialize["TargetMatchRe"] = val } return toSerialize, nil } 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 28fda4149..a6b6b2584 100644 --- a/services/observability/model_update_alert_configs_payload_receivers_inner.go +++ b/services/observability/model_update_alert_configs_payload_receivers_inner.go @@ -17,16 +17,97 @@ import ( // checks if the UpdateAlertConfigsPayloadReceiversInner type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateAlertConfigsPayloadReceiversInner{} +/* + types and functions for emailConfigs +*/ + +// isArray +type UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsAttributeType = *[]CreateAlertConfigReceiverPayloadEmailConfigsInner +type UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsArgType = []CreateAlertConfigReceiverPayloadEmailConfigsInner +type UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsRetType = []CreateAlertConfigReceiverPayloadEmailConfigsInner + +func getUpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsAttributeTypeOk(arg UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsAttributeType) (ret UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsAttributeType(arg *UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsAttributeType, val UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadReceiversInnerGetNameAttributeType = *string + +func getUpdateAlertConfigsPayloadReceiversInnerGetNameAttributeTypeOk(arg UpdateAlertConfigsPayloadReceiversInnerGetNameAttributeType) (ret UpdateAlertConfigsPayloadReceiversInnerGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadReceiversInnerGetNameAttributeType(arg *UpdateAlertConfigsPayloadReceiversInnerGetNameAttributeType, val UpdateAlertConfigsPayloadReceiversInnerGetNameRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadReceiversInnerGetNameArgType = string +type UpdateAlertConfigsPayloadReceiversInnerGetNameRetType = string + +/* + types and functions for opsgenieConfigs +*/ + +// isArray +type UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsAttributeType = *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner +type UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsArgType = []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner +type UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsRetType = []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner + +func getUpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsAttributeTypeOk(arg UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsAttributeType) (ret UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsAttributeType(arg *UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsAttributeType, val UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsRetType) { + *arg = &val +} + +/* + types and functions for webHookConfigs +*/ + +// isArray +type UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsAttributeType = *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner +type UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsArgType = []CreateAlertConfigReceiverPayloadWebHookConfigsInner +type UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsRetType = []CreateAlertConfigReceiverPayloadWebHookConfigsInner + +func getUpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsAttributeTypeOk(arg UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsAttributeType) (ret UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsAttributeType(arg *UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsAttributeType, val UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsRetType) { + *arg = &val +} + // UpdateAlertConfigsPayloadReceiversInner Receivers type UpdateAlertConfigsPayloadReceiversInner struct { // Email configurations - EmailConfigs *[]CreateAlertConfigReceiverPayloadEmailConfigsInner `json:"emailConfigs,omitempty"` + EmailConfigs UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsAttributeType `json:"emailConfigs,omitempty"` // `Additional Validators:` * must be unique * should only include the characters: a-zA-Z0-9- // REQUIRED - Name *string `json:"name"` + Name UpdateAlertConfigsPayloadReceiversInnerGetNameAttributeType `json:"name"` // Configuration for ops genie. - OpsgenieConfigs *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner `json:"opsgenieConfigs,omitempty"` - WebHookConfigs *[]CreateAlertConfigReceiverPayloadWebHookConfigsInner `json:"webHookConfigs,omitempty"` + OpsgenieConfigs UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsAttributeType `json:"opsgenieConfigs,omitempty"` + WebHookConfigs UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsAttributeType `json:"webHookConfigs,omitempty"` } type _UpdateAlertConfigsPayloadReceiversInner UpdateAlertConfigsPayloadReceiversInner @@ -35,9 +116,9 @@ type _UpdateAlertConfigsPayloadReceiversInner UpdateAlertConfigsPayloadReceivers // 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 { +func NewUpdateAlertConfigsPayloadReceiversInner(name UpdateAlertConfigsPayloadReceiversInnerGetNameArgType) *UpdateAlertConfigsPayloadReceiversInner { this := UpdateAlertConfigsPayloadReceiversInner{} - this.Name = name + setUpdateAlertConfigsPayloadReceiversInnerGetNameAttributeType(&this.Name, name) return &this } @@ -50,136 +131,104 @@ func NewUpdateAlertConfigsPayloadReceiversInnerWithDefaults() *UpdateAlertConfig } // 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 +func (o *UpdateAlertConfigsPayloadReceiversInner) GetEmailConfigs() (res UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsRetType) { + res, _ = o.GetEmailConfigsOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadReceiversInner) GetEmailConfigsOk() (ret UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsRetType, ok bool) { + return getUpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsAttributeTypeOk(o.EmailConfigs) } // 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 + _, ok := o.GetEmailConfigsOk() + return ok } // SetEmailConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadEmailConfigsInner and assigns it to the EmailConfigs field. -func (o *UpdateAlertConfigsPayloadReceiversInner) SetEmailConfigs(v *[]CreateAlertConfigReceiverPayloadEmailConfigsInner) { - o.EmailConfigs = v +func (o *UpdateAlertConfigsPayloadReceiversInner) SetEmailConfigs(v UpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsRetType) { + setUpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsAttributeType(&o.EmailConfigs, v) } // GetName returns the Name field value -func (o *UpdateAlertConfigsPayloadReceiversInner) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *UpdateAlertConfigsPayloadReceiversInner) GetName() (ret UpdateAlertConfigsPayloadReceiversInnerGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // 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 +func (o *UpdateAlertConfigsPayloadReceiversInner) GetNameOk() (ret UpdateAlertConfigsPayloadReceiversInnerGetNameRetType, ok bool) { + return getUpdateAlertConfigsPayloadReceiversInnerGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *UpdateAlertConfigsPayloadReceiversInner) SetName(v *string) { - o.Name = v +func (o *UpdateAlertConfigsPayloadReceiversInner) SetName(v UpdateAlertConfigsPayloadReceiversInnerGetNameRetType) { + setUpdateAlertConfigsPayloadReceiversInnerGetNameAttributeType(&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 +func (o *UpdateAlertConfigsPayloadReceiversInner) GetOpsgenieConfigs() (res UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsRetType) { + res, _ = o.GetOpsgenieConfigsOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadReceiversInner) GetOpsgenieConfigsOk() (ret UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsRetType, ok bool) { + return getUpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsAttributeTypeOk(o.OpsgenieConfigs) } // 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 + _, ok := o.GetOpsgenieConfigsOk() + return ok } // SetOpsgenieConfigs gets a reference to the given []CreateAlertConfigReceiverPayloadOpsgenieConfigsInner and assigns it to the OpsgenieConfigs field. -func (o *UpdateAlertConfigsPayloadReceiversInner) SetOpsgenieConfigs(v *[]CreateAlertConfigReceiverPayloadOpsgenieConfigsInner) { - o.OpsgenieConfigs = v +func (o *UpdateAlertConfigsPayloadReceiversInner) SetOpsgenieConfigs(v UpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsRetType) { + setUpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsAttributeType(&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 +func (o *UpdateAlertConfigsPayloadReceiversInner) GetWebHookConfigs() (res UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsRetType) { + res, _ = o.GetWebHookConfigsOk() + return } // 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 +func (o *UpdateAlertConfigsPayloadReceiversInner) GetWebHookConfigsOk() (ret UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsRetType, ok bool) { + return getUpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsAttributeTypeOk(o.WebHookConfigs) } // 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 + _, ok := o.GetWebHookConfigsOk() + return ok } // 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) SetWebHookConfigs(v UpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsRetType) { + setUpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsAttributeType(&o.WebHookConfigs, v) } func (o UpdateAlertConfigsPayloadReceiversInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.EmailConfigs) { - toSerialize["emailConfigs"] = o.EmailConfigs + if val, ok := getUpdateAlertConfigsPayloadReceiversInnerGetEmailConfigsAttributeTypeOk(o.EmailConfigs); ok { + toSerialize["EmailConfigs"] = val + } + if val, ok := getUpdateAlertConfigsPayloadReceiversInnerGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - toSerialize["name"] = o.Name - if !IsNil(o.OpsgenieConfigs) { - toSerialize["opsgenieConfigs"] = o.OpsgenieConfigs + if val, ok := getUpdateAlertConfigsPayloadReceiversInnerGetOpsgenieConfigsAttributeTypeOk(o.OpsgenieConfigs); ok { + toSerialize["OpsgenieConfigs"] = val } - if !IsNil(o.WebHookConfigs) { - toSerialize["webHookConfigs"] = o.WebHookConfigs + if val, ok := getUpdateAlertConfigsPayloadReceiversInnerGetWebHookConfigsAttributeTypeOk(o.WebHookConfigs); ok { + toSerialize["WebHookConfigs"] = val } return toSerialize, nil } diff --git a/services/observability/model_update_alert_configs_payload_route.go b/services/observability/model_update_alert_configs_payload_route.go index 86da108cc..aa4da3a92 100644 --- a/services/observability/model_update_alert_configs_payload_route.go +++ b/services/observability/model_update_alert_configs_payload_route.go @@ -17,27 +17,211 @@ import ( // checks if the UpdateAlertConfigsPayloadRoute type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateAlertConfigsPayloadRoute{} +/* + types and functions for groupBy +*/ + +// isArray +type UpdateAlertConfigsPayloadRouteGetGroupByAttributeType = *[]string +type UpdateAlertConfigsPayloadRouteGetGroupByArgType = []string +type UpdateAlertConfigsPayloadRouteGetGroupByRetType = []string + +func getUpdateAlertConfigsPayloadRouteGetGroupByAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetGroupByAttributeType) (ret UpdateAlertConfigsPayloadRouteGetGroupByRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteGetGroupByAttributeType(arg *UpdateAlertConfigsPayloadRouteGetGroupByAttributeType, val UpdateAlertConfigsPayloadRouteGetGroupByRetType) { + *arg = &val +} + +/* + types and functions for groupInterval +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadRouteGetGroupIntervalAttributeType = *string + +func getUpdateAlertConfigsPayloadRouteGetGroupIntervalAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetGroupIntervalAttributeType) (ret UpdateAlertConfigsPayloadRouteGetGroupIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteGetGroupIntervalAttributeType(arg *UpdateAlertConfigsPayloadRouteGetGroupIntervalAttributeType, val UpdateAlertConfigsPayloadRouteGetGroupIntervalRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadRouteGetGroupIntervalArgType = string +type UpdateAlertConfigsPayloadRouteGetGroupIntervalRetType = string + +/* + types and functions for groupWait +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadRouteGetGroupWaitAttributeType = *string + +func getUpdateAlertConfigsPayloadRouteGetGroupWaitAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetGroupWaitAttributeType) (ret UpdateAlertConfigsPayloadRouteGetGroupWaitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteGetGroupWaitAttributeType(arg *UpdateAlertConfigsPayloadRouteGetGroupWaitAttributeType, val UpdateAlertConfigsPayloadRouteGetGroupWaitRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadRouteGetGroupWaitArgType = string +type UpdateAlertConfigsPayloadRouteGetGroupWaitRetType = string + +/* + types and functions for match +*/ + +// isFreeform +type UpdateAlertConfigsPayloadRouteGetMatchAttributeType = *map[string]interface{} +type UpdateAlertConfigsPayloadRouteGetMatchArgType = map[string]interface{} +type UpdateAlertConfigsPayloadRouteGetMatchRetType = map[string]interface{} + +func getUpdateAlertConfigsPayloadRouteGetMatchAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetMatchAttributeType) (ret UpdateAlertConfigsPayloadRouteGetMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteGetMatchAttributeType(arg *UpdateAlertConfigsPayloadRouteGetMatchAttributeType, val UpdateAlertConfigsPayloadRouteGetMatchRetType) { + *arg = &val +} + +/* + types and functions for matchRe +*/ + +// isFreeform +type UpdateAlertConfigsPayloadRouteGetMatchReAttributeType = *map[string]interface{} +type UpdateAlertConfigsPayloadRouteGetMatchReArgType = map[string]interface{} +type UpdateAlertConfigsPayloadRouteGetMatchReRetType = map[string]interface{} + +func getUpdateAlertConfigsPayloadRouteGetMatchReAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetMatchReAttributeType) (ret UpdateAlertConfigsPayloadRouteGetMatchReRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteGetMatchReAttributeType(arg *UpdateAlertConfigsPayloadRouteGetMatchReAttributeType, val UpdateAlertConfigsPayloadRouteGetMatchReRetType) { + *arg = &val +} + +/* + types and functions for matchers +*/ + +// isArray +type UpdateAlertConfigsPayloadRouteGetMatchersAttributeType = *[]string +type UpdateAlertConfigsPayloadRouteGetMatchersArgType = []string +type UpdateAlertConfigsPayloadRouteGetMatchersRetType = []string + +func getUpdateAlertConfigsPayloadRouteGetMatchersAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetMatchersAttributeType) (ret UpdateAlertConfigsPayloadRouteGetMatchersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteGetMatchersAttributeType(arg *UpdateAlertConfigsPayloadRouteGetMatchersAttributeType, val UpdateAlertConfigsPayloadRouteGetMatchersRetType) { + *arg = &val +} + +/* + types and functions for receiver +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadRouteGetReceiverAttributeType = *string + +func getUpdateAlertConfigsPayloadRouteGetReceiverAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetReceiverAttributeType) (ret UpdateAlertConfigsPayloadRouteGetReceiverRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteGetReceiverAttributeType(arg *UpdateAlertConfigsPayloadRouteGetReceiverAttributeType, val UpdateAlertConfigsPayloadRouteGetReceiverRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadRouteGetReceiverArgType = string +type UpdateAlertConfigsPayloadRouteGetReceiverRetType = string + +/* + types and functions for repeatInterval +*/ + +// isNotNullableString +type UpdateAlertConfigsPayloadRouteGetRepeatIntervalAttributeType = *string + +func getUpdateAlertConfigsPayloadRouteGetRepeatIntervalAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetRepeatIntervalAttributeType) (ret UpdateAlertConfigsPayloadRouteGetRepeatIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteGetRepeatIntervalAttributeType(arg *UpdateAlertConfigsPayloadRouteGetRepeatIntervalAttributeType, val UpdateAlertConfigsPayloadRouteGetRepeatIntervalRetType) { + *arg = &val +} + +type UpdateAlertConfigsPayloadRouteGetRepeatIntervalArgType = string +type UpdateAlertConfigsPayloadRouteGetRepeatIntervalRetType = string + +/* + types and functions for routes +*/ + +// isArray +type UpdateAlertConfigsPayloadRouteGetRoutesAttributeType = *[]CreateAlertConfigRoutePayloadRoutesInner +type UpdateAlertConfigsPayloadRouteGetRoutesArgType = []CreateAlertConfigRoutePayloadRoutesInner +type UpdateAlertConfigsPayloadRouteGetRoutesRetType = []CreateAlertConfigRoutePayloadRoutesInner + +func getUpdateAlertConfigsPayloadRouteGetRoutesAttributeTypeOk(arg UpdateAlertConfigsPayloadRouteGetRoutesAttributeType) (ret UpdateAlertConfigsPayloadRouteGetRoutesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsPayloadRouteGetRoutesAttributeType(arg *UpdateAlertConfigsPayloadRouteGetRoutesAttributeType, val UpdateAlertConfigsPayloadRouteGetRoutesRetType) { + *arg = &val +} + // 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. - GroupBy *[]string `json:"groupBy,omitempty"` + GroupBy UpdateAlertConfigsPayloadRouteGetGroupByAttributeType `json:"groupBy,omitempty"` // How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.) `Additional Validators:` * must be a valid time format - GroupInterval *string `json:"groupInterval,omitempty"` + GroupInterval UpdateAlertConfigsPayloadRouteGetGroupIntervalAttributeType `json:"groupInterval,omitempty"` // How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.) `Additional Validators:` * must be a valid time format - GroupWait *string `json:"groupWait,omitempty"` + GroupWait UpdateAlertConfigsPayloadRouteGetGroupWaitAttributeType `json:"groupWait,omitempty"` // map of key:value. A set of equality matchers an alert has to fulfill to match the node. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters * key and values should only include the characters: a-zA-Z0-9_./@&?:- - Match *map[string]interface{} `json:"match,omitempty"` + Match UpdateAlertConfigsPayloadRouteGetMatchAttributeType `json:"match,omitempty"` // map of key:value. A set of regex-matchers an alert has to fulfill to match the node. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters - MatchRe *map[string]interface{} `json:"matchRe,omitempty"` + MatchRe UpdateAlertConfigsPayloadRouteGetMatchReAttributeType `json:"matchRe,omitempty"` // A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens: * A valid Prometheus label name. * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors. * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters - Matchers *[]string `json:"matchers,omitempty"` + Matchers UpdateAlertConfigsPayloadRouteGetMatchersAttributeType `json:"matchers,omitempty"` // Receiver that should be one item of receivers `Additional Validators:` * must be a in name of receivers // REQUIRED - Receiver *string `json:"receiver"` + Receiver UpdateAlertConfigsPayloadRouteGetReceiverAttributeType `json:"receiver"` // How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more). `Additional Validators:` * must be a valid time format - RepeatInterval *string `json:"repeatInterval,omitempty"` + RepeatInterval UpdateAlertConfigsPayloadRouteGetRepeatIntervalAttributeType `json:"repeatInterval,omitempty"` // Zero or more child routes. - Routes *[]CreateAlertConfigRoutePayloadRoutesInner `json:"routes,omitempty"` + Routes UpdateAlertConfigsPayloadRouteGetRoutesAttributeType `json:"routes,omitempty"` } type _UpdateAlertConfigsPayloadRoute UpdateAlertConfigsPayloadRoute @@ -46,15 +230,9 @@ type _UpdateAlertConfigsPayloadRoute UpdateAlertConfigsPayloadRoute // 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 { +func NewUpdateAlertConfigsPayloadRoute(receiver UpdateAlertConfigsPayloadRouteGetReceiverArgType) *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 + setUpdateAlertConfigsPayloadRouteGetReceiverAttributeType(&this.Receiver, receiver) return &this } @@ -73,311 +251,234 @@ func NewUpdateAlertConfigsPayloadRouteWithDefaults() *UpdateAlertConfigsPayloadR } // 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 +func (o *UpdateAlertConfigsPayloadRoute) GetGroupBy() (res UpdateAlertConfigsPayloadRouteGetGroupByRetType) { + res, _ = o.GetGroupByOk() + return } // GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigsPayloadRoute) GetGroupByOk() (*[]string, bool) { - if o == nil || IsNil(o.GroupBy) { - return nil, false - } - return o.GroupBy, true +func (o *UpdateAlertConfigsPayloadRoute) GetGroupByOk() (ret UpdateAlertConfigsPayloadRouteGetGroupByRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteGetGroupByAttributeTypeOk(o.GroupBy) } // 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 + _, ok := o.GetGroupByOk() + return ok } // SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. -func (o *UpdateAlertConfigsPayloadRoute) SetGroupBy(v *[]string) { - o.GroupBy = v +func (o *UpdateAlertConfigsPayloadRoute) SetGroupBy(v UpdateAlertConfigsPayloadRouteGetGroupByRetType) { + setUpdateAlertConfigsPayloadRouteGetGroupByAttributeType(&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 +func (o *UpdateAlertConfigsPayloadRoute) GetGroupInterval() (res UpdateAlertConfigsPayloadRouteGetGroupIntervalRetType) { + res, _ = o.GetGroupIntervalOk() + return } // GetGroupIntervalOk returns a tuple with the GroupInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigsPayloadRoute) GetGroupIntervalOk() (*string, bool) { - if o == nil || IsNil(o.GroupInterval) { - return nil, false - } - return o.GroupInterval, true +func (o *UpdateAlertConfigsPayloadRoute) GetGroupIntervalOk() (ret UpdateAlertConfigsPayloadRouteGetGroupIntervalRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteGetGroupIntervalAttributeTypeOk(o.GroupInterval) } // 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 + _, ok := o.GetGroupIntervalOk() + return ok } // SetGroupInterval gets a reference to the given string and assigns it to the GroupInterval field. -func (o *UpdateAlertConfigsPayloadRoute) SetGroupInterval(v *string) { - o.GroupInterval = v +func (o *UpdateAlertConfigsPayloadRoute) SetGroupInterval(v UpdateAlertConfigsPayloadRouteGetGroupIntervalRetType) { + setUpdateAlertConfigsPayloadRouteGetGroupIntervalAttributeType(&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 +func (o *UpdateAlertConfigsPayloadRoute) GetGroupWait() (res UpdateAlertConfigsPayloadRouteGetGroupWaitRetType) { + res, _ = o.GetGroupWaitOk() + return } // GetGroupWaitOk returns a tuple with the GroupWait field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigsPayloadRoute) GetGroupWaitOk() (*string, bool) { - if o == nil || IsNil(o.GroupWait) { - return nil, false - } - return o.GroupWait, true +func (o *UpdateAlertConfigsPayloadRoute) GetGroupWaitOk() (ret UpdateAlertConfigsPayloadRouteGetGroupWaitRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteGetGroupWaitAttributeTypeOk(o.GroupWait) } // 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 + _, ok := o.GetGroupWaitOk() + return ok } // SetGroupWait gets a reference to the given string and assigns it to the GroupWait field. -func (o *UpdateAlertConfigsPayloadRoute) SetGroupWait(v *string) { - o.GroupWait = v +func (o *UpdateAlertConfigsPayloadRoute) SetGroupWait(v UpdateAlertConfigsPayloadRouteGetGroupWaitRetType) { + setUpdateAlertConfigsPayloadRouteGetGroupWaitAttributeType(&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 +func (o *UpdateAlertConfigsPayloadRoute) GetMatch() (res UpdateAlertConfigsPayloadRouteGetMatchRetType) { + res, _ = o.GetMatchOk() + return } // GetMatchOk returns a tuple with the Match field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigsPayloadRoute) GetMatchOk() (*map[string]interface{}, bool) { - if o == nil || IsNil(o.Match) { - return &map[string]interface{}{}, false - } - return o.Match, true +func (o *UpdateAlertConfigsPayloadRoute) GetMatchOk() (ret UpdateAlertConfigsPayloadRouteGetMatchRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteGetMatchAttributeTypeOk(o.Match) } // 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 + _, ok := o.GetMatchOk() + return ok } // 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 +func (o *UpdateAlertConfigsPayloadRoute) SetMatch(v UpdateAlertConfigsPayloadRouteGetMatchRetType) { + setUpdateAlertConfigsPayloadRouteGetMatchAttributeType(&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 +func (o *UpdateAlertConfigsPayloadRoute) GetMatchRe() (res UpdateAlertConfigsPayloadRouteGetMatchReRetType) { + res, _ = o.GetMatchReOk() + return } // GetMatchReOk returns a tuple with the MatchRe field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigsPayloadRoute) GetMatchReOk() (*map[string]interface{}, bool) { - if o == nil || IsNil(o.MatchRe) { - return &map[string]interface{}{}, false - } - return o.MatchRe, true +func (o *UpdateAlertConfigsPayloadRoute) GetMatchReOk() (ret UpdateAlertConfigsPayloadRouteGetMatchReRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteGetMatchReAttributeTypeOk(o.MatchRe) } // 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 + _, ok := o.GetMatchReOk() + return ok } // 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 +func (o *UpdateAlertConfigsPayloadRoute) SetMatchRe(v UpdateAlertConfigsPayloadRouteGetMatchReRetType) { + setUpdateAlertConfigsPayloadRouteGetMatchReAttributeType(&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 +func (o *UpdateAlertConfigsPayloadRoute) GetMatchers() (res UpdateAlertConfigsPayloadRouteGetMatchersRetType) { + res, _ = o.GetMatchersOk() + return } // GetMatchersOk returns a tuple with the Matchers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigsPayloadRoute) GetMatchersOk() (*[]string, bool) { - if o == nil || IsNil(o.Matchers) { - return nil, false - } - return o.Matchers, true +func (o *UpdateAlertConfigsPayloadRoute) GetMatchersOk() (ret UpdateAlertConfigsPayloadRouteGetMatchersRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteGetMatchersAttributeTypeOk(o.Matchers) } // HasMatchers returns a boolean if a field has been set. func (o *UpdateAlertConfigsPayloadRoute) HasMatchers() bool { - if o != nil && !IsNil(o.Matchers) { - return true - } - - return false + _, ok := o.GetMatchersOk() + return ok } // SetMatchers gets a reference to the given []string and assigns it to the Matchers field. -func (o *UpdateAlertConfigsPayloadRoute) SetMatchers(v *[]string) { - o.Matchers = v +func (o *UpdateAlertConfigsPayloadRoute) SetMatchers(v UpdateAlertConfigsPayloadRouteGetMatchersRetType) { + setUpdateAlertConfigsPayloadRouteGetMatchersAttributeType(&o.Matchers, v) } // GetReceiver returns the Receiver field value -func (o *UpdateAlertConfigsPayloadRoute) GetReceiver() *string { - if o == nil || IsNil(o.Receiver) { - var ret *string - return ret - } - - return o.Receiver +func (o *UpdateAlertConfigsPayloadRoute) GetReceiver() (ret UpdateAlertConfigsPayloadRouteGetReceiverRetType) { + ret, _ = o.GetReceiverOk() + return ret } // 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 +func (o *UpdateAlertConfigsPayloadRoute) GetReceiverOk() (ret UpdateAlertConfigsPayloadRouteGetReceiverRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteGetReceiverAttributeTypeOk(o.Receiver) } // SetReceiver sets field value -func (o *UpdateAlertConfigsPayloadRoute) SetReceiver(v *string) { - o.Receiver = v +func (o *UpdateAlertConfigsPayloadRoute) SetReceiver(v UpdateAlertConfigsPayloadRouteGetReceiverRetType) { + setUpdateAlertConfigsPayloadRouteGetReceiverAttributeType(&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 +func (o *UpdateAlertConfigsPayloadRoute) GetRepeatInterval() (res UpdateAlertConfigsPayloadRouteGetRepeatIntervalRetType) { + res, _ = o.GetRepeatIntervalOk() + return } // GetRepeatIntervalOk returns a tuple with the RepeatInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigsPayloadRoute) GetRepeatIntervalOk() (*string, bool) { - if o == nil || IsNil(o.RepeatInterval) { - return nil, false - } - return o.RepeatInterval, true +func (o *UpdateAlertConfigsPayloadRoute) GetRepeatIntervalOk() (ret UpdateAlertConfigsPayloadRouteGetRepeatIntervalRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteGetRepeatIntervalAttributeTypeOk(o.RepeatInterval) } // 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 + _, ok := o.GetRepeatIntervalOk() + return ok } // SetRepeatInterval gets a reference to the given string and assigns it to the RepeatInterval field. -func (o *UpdateAlertConfigsPayloadRoute) SetRepeatInterval(v *string) { - o.RepeatInterval = v +func (o *UpdateAlertConfigsPayloadRoute) SetRepeatInterval(v UpdateAlertConfigsPayloadRouteGetRepeatIntervalRetType) { + setUpdateAlertConfigsPayloadRouteGetRepeatIntervalAttributeType(&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 +func (o *UpdateAlertConfigsPayloadRoute) GetRoutes() (res UpdateAlertConfigsPayloadRouteGetRoutesRetType) { + res, _ = o.GetRoutesOk() + return } // GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateAlertConfigsPayloadRoute) GetRoutesOk() (*[]CreateAlertConfigRoutePayloadRoutesInner, bool) { - if o == nil || IsNil(o.Routes) { - return nil, false - } - return o.Routes, true +func (o *UpdateAlertConfigsPayloadRoute) GetRoutesOk() (ret UpdateAlertConfigsPayloadRouteGetRoutesRetType, ok bool) { + return getUpdateAlertConfigsPayloadRouteGetRoutesAttributeTypeOk(o.Routes) } // 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 + _, ok := o.GetRoutesOk() + return ok } // 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) SetRoutes(v UpdateAlertConfigsPayloadRouteGetRoutesRetType) { + setUpdateAlertConfigsPayloadRouteGetRoutesAttributeType(&o.Routes, v) } func (o UpdateAlertConfigsPayloadRoute) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.GroupBy) { - toSerialize["groupBy"] = o.GroupBy + if val, ok := getUpdateAlertConfigsPayloadRouteGetGroupByAttributeTypeOk(o.GroupBy); ok { + toSerialize["GroupBy"] = val + } + if val, ok := getUpdateAlertConfigsPayloadRouteGetGroupIntervalAttributeTypeOk(o.GroupInterval); ok { + toSerialize["GroupInterval"] = val } - if !IsNil(o.GroupInterval) { - toSerialize["groupInterval"] = o.GroupInterval + if val, ok := getUpdateAlertConfigsPayloadRouteGetGroupWaitAttributeTypeOk(o.GroupWait); ok { + toSerialize["GroupWait"] = val } - if !IsNil(o.GroupWait) { - toSerialize["groupWait"] = o.GroupWait + if val, ok := getUpdateAlertConfigsPayloadRouteGetMatchAttributeTypeOk(o.Match); ok { + toSerialize["Match"] = val } - if !IsNil(o.Match) { - toSerialize["match"] = o.Match + if val, ok := getUpdateAlertConfigsPayloadRouteGetMatchReAttributeTypeOk(o.MatchRe); ok { + toSerialize["MatchRe"] = val } - if !IsNil(o.MatchRe) { - toSerialize["matchRe"] = o.MatchRe + if val, ok := getUpdateAlertConfigsPayloadRouteGetMatchersAttributeTypeOk(o.Matchers); ok { + toSerialize["Matchers"] = val } - if !IsNil(o.Matchers) { - toSerialize["matchers"] = o.Matchers + if val, ok := getUpdateAlertConfigsPayloadRouteGetReceiverAttributeTypeOk(o.Receiver); ok { + toSerialize["Receiver"] = val } - toSerialize["receiver"] = o.Receiver - if !IsNil(o.RepeatInterval) { - toSerialize["repeatInterval"] = o.RepeatInterval + if val, ok := getUpdateAlertConfigsPayloadRouteGetRepeatIntervalAttributeTypeOk(o.RepeatInterval); ok { + toSerialize["RepeatInterval"] = val } - if !IsNil(o.Routes) { - toSerialize["routes"] = o.Routes + if val, ok := getUpdateAlertConfigsPayloadRouteGetRoutesAttributeTypeOk(o.Routes); ok { + toSerialize["Routes"] = val } return toSerialize, nil } diff --git a/services/observability/model_update_alert_configs_response.go b/services/observability/model_update_alert_configs_response.go index 0f38bff72..b2f08a4be 100644 --- a/services/observability/model_update_alert_configs_response.go +++ b/services/observability/model_update_alert_configs_response.go @@ -17,12 +17,53 @@ import ( // checks if the UpdateAlertConfigsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateAlertConfigsResponse{} +/* + types and functions for data +*/ + +// isModel +type UpdateAlertConfigsResponseGetDataAttributeType = *Alert +type UpdateAlertConfigsResponseGetDataArgType = Alert +type UpdateAlertConfigsResponseGetDataRetType = Alert + +func getUpdateAlertConfigsResponseGetDataAttributeTypeOk(arg UpdateAlertConfigsResponseGetDataAttributeType) (ret UpdateAlertConfigsResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsResponseGetDataAttributeType(arg *UpdateAlertConfigsResponseGetDataAttributeType, val UpdateAlertConfigsResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type UpdateAlertConfigsResponseGetMessageAttributeType = *string + +func getUpdateAlertConfigsResponseGetMessageAttributeTypeOk(arg UpdateAlertConfigsResponseGetMessageAttributeType) (ret UpdateAlertConfigsResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateAlertConfigsResponseGetMessageAttributeType(arg *UpdateAlertConfigsResponseGetMessageAttributeType, val UpdateAlertConfigsResponseGetMessageRetType) { + *arg = &val +} + +type UpdateAlertConfigsResponseGetMessageArgType = string +type UpdateAlertConfigsResponseGetMessageRetType = string + // UpdateAlertConfigsResponse struct for UpdateAlertConfigsResponse type UpdateAlertConfigsResponse struct { // REQUIRED - Data *Alert `json:"data"` + Data UpdateAlertConfigsResponseGetDataAttributeType `json:"data"` // REQUIRED - Message *string `json:"message"` + Message UpdateAlertConfigsResponseGetMessageAttributeType `json:"message"` } type _UpdateAlertConfigsResponse UpdateAlertConfigsResponse @@ -31,10 +72,10 @@ type _UpdateAlertConfigsResponse UpdateAlertConfigsResponse // 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 { +func NewUpdateAlertConfigsResponse(data UpdateAlertConfigsResponseGetDataArgType, message UpdateAlertConfigsResponseGetMessageArgType) *UpdateAlertConfigsResponse { this := UpdateAlertConfigsResponse{} - this.Data = data - this.Message = message + setUpdateAlertConfigsResponseGetDataAttributeType(&this.Data, data) + setUpdateAlertConfigsResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewUpdateAlertConfigsResponseWithDefaults() *UpdateAlertConfigsResponse { } // GetData returns the Data field value -func (o *UpdateAlertConfigsResponse) GetData() *Alert { - if o == nil || IsNil(o.Data) { - var ret *Alert - return ret - } - - return o.Data +func (o *UpdateAlertConfigsResponse) GetData() (ret UpdateAlertConfigsResponseGetDataRetType) { + ret, _ = o.GetDataOk() + return ret } // 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 +func (o *UpdateAlertConfigsResponse) GetDataOk() (ret UpdateAlertConfigsResponseGetDataRetType, ok bool) { + return getUpdateAlertConfigsResponseGetDataAttributeTypeOk(o.Data) } // SetData sets field value -func (o *UpdateAlertConfigsResponse) SetData(v *Alert) { - o.Data = v +func (o *UpdateAlertConfigsResponse) SetData(v UpdateAlertConfigsResponseGetDataRetType) { + setUpdateAlertConfigsResponseGetDataAttributeType(&o.Data, v) } // GetMessage returns the Message field value -func (o *UpdateAlertConfigsResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *UpdateAlertConfigsResponse) GetMessage() (ret UpdateAlertConfigsResponseGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } // 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 +func (o *UpdateAlertConfigsResponse) GetMessageOk() (ret UpdateAlertConfigsResponseGetMessageRetType, ok bool) { + return getUpdateAlertConfigsResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *UpdateAlertConfigsResponse) SetMessage(v *string) { - o.Message = v +func (o *UpdateAlertConfigsResponse) SetMessage(v UpdateAlertConfigsResponseGetMessageRetType) { + setUpdateAlertConfigsResponseGetMessageAttributeType(&o.Message, v) } func (o UpdateAlertConfigsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["data"] = o.Data - toSerialize["message"] = o.Message + if val, ok := getUpdateAlertConfigsResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getUpdateAlertConfigsResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } 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 d4bc5aee8..456c5fe36 100644 --- a/services/observability/model_update_credentials_remote_write_config_payload.go +++ b/services/observability/model_update_credentials_remote_write_config_payload.go @@ -17,10 +17,30 @@ import ( // checks if the UpdateCredentialsRemoteWriteConfigPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateCredentialsRemoteWriteConfigPayload{} +/* + types and functions for maxLimit +*/ + +// isNumber +type UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitAttributeType = *float64 +type UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitArgType = float64 +type UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitRetType = float64 + +func getUpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitAttributeTypeOk(arg UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitAttributeType) (ret UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitAttributeType(arg *UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitAttributeType, val UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitRetType) { + *arg = &val +} + // 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"` + MaxLimit UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitAttributeType `json:"maxLimit,omitempty"` } // NewUpdateCredentialsRemoteWriteConfigPayload instantiates a new UpdateCredentialsRemoteWriteConfigPayload object @@ -41,41 +61,32 @@ func NewUpdateCredentialsRemoteWriteConfigPayloadWithDefaults() *UpdateCredentia } // 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 +func (o *UpdateCredentialsRemoteWriteConfigPayload) GetMaxLimit() (res UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitRetType) { + res, _ = o.GetMaxLimitOk() + return } // 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 +func (o *UpdateCredentialsRemoteWriteConfigPayload) GetMaxLimitOk() (ret UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitRetType, ok bool) { + return getUpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitAttributeTypeOk(o.MaxLimit) } // 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 + _, ok := o.GetMaxLimitOk() + return ok } // 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) SetMaxLimit(v UpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitRetType) { + setUpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitAttributeType(&o.MaxLimit, v) } func (o UpdateCredentialsRemoteWriteConfigPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.MaxLimit) { - toSerialize["maxLimit"] = o.MaxLimit + if val, ok := getUpdateCredentialsRemoteWriteConfigPayloadGetMaxLimitAttributeTypeOk(o.MaxLimit); ok { + toSerialize["MaxLimit"] = val } return toSerialize, nil } diff --git a/services/observability/model_update_grafana_configs_payload.go b/services/observability/model_update_grafana_configs_payload.go index 33c90e16f..41fb72fae 100644 --- a/services/observability/model_update_grafana_configs_payload.go +++ b/services/observability/model_update_grafana_configs_payload.go @@ -17,13 +17,73 @@ import ( // checks if the UpdateGrafanaConfigsPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateGrafanaConfigsPayload{} +/* + types and functions for genericOauth +*/ + +// isModel +type UpdateGrafanaConfigsPayloadGetGenericOauthAttributeType = *UpdateGrafanaConfigsPayloadGenericOauth +type UpdateGrafanaConfigsPayloadGetGenericOauthArgType = UpdateGrafanaConfigsPayloadGenericOauth +type UpdateGrafanaConfigsPayloadGetGenericOauthRetType = UpdateGrafanaConfigsPayloadGenericOauth + +func getUpdateGrafanaConfigsPayloadGetGenericOauthAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGetGenericOauthAttributeType) (ret UpdateGrafanaConfigsPayloadGetGenericOauthRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGetGenericOauthAttributeType(arg *UpdateGrafanaConfigsPayloadGetGenericOauthAttributeType, val UpdateGrafanaConfigsPayloadGetGenericOauthRetType) { + *arg = &val +} + +/* + types and functions for publicReadAccess +*/ + +// isBoolean +type UpdateGrafanaConfigsPayloadgetPublicReadAccessAttributeType = *bool +type UpdateGrafanaConfigsPayloadgetPublicReadAccessArgType = bool +type UpdateGrafanaConfigsPayloadgetPublicReadAccessRetType = bool + +func getUpdateGrafanaConfigsPayloadgetPublicReadAccessAttributeTypeOk(arg UpdateGrafanaConfigsPayloadgetPublicReadAccessAttributeType) (ret UpdateGrafanaConfigsPayloadgetPublicReadAccessRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadgetPublicReadAccessAttributeType(arg *UpdateGrafanaConfigsPayloadgetPublicReadAccessAttributeType, val UpdateGrafanaConfigsPayloadgetPublicReadAccessRetType) { + *arg = &val +} + +/* + types and functions for useStackitSso +*/ + +// isBoolean +type UpdateGrafanaConfigsPayloadgetUseStackitSsoAttributeType = *bool +type UpdateGrafanaConfigsPayloadgetUseStackitSsoArgType = bool +type UpdateGrafanaConfigsPayloadgetUseStackitSsoRetType = bool + +func getUpdateGrafanaConfigsPayloadgetUseStackitSsoAttributeTypeOk(arg UpdateGrafanaConfigsPayloadgetUseStackitSsoAttributeType) (ret UpdateGrafanaConfigsPayloadgetUseStackitSsoRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadgetUseStackitSsoAttributeType(arg *UpdateGrafanaConfigsPayloadgetUseStackitSsoAttributeType, val UpdateGrafanaConfigsPayloadgetUseStackitSsoRetType) { + *arg = &val +} + // 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"` + GenericOauth UpdateGrafanaConfigsPayloadGetGenericOauthAttributeType `json:"genericOauth,omitempty"` // If it's true, anyone can access the Grafana dashboards without logging in. If it is wrong, a login is required. - PublicReadAccess *bool `json:"publicReadAccess,omitempty"` + PublicReadAccess UpdateGrafanaConfigsPayloadgetPublicReadAccessAttributeType `json:"publicReadAccess,omitempty"` // If it's true, it overwrites the current genericOauth config and configures STACKIT SSO for this instance. - UseStackitSso *bool `json:"useStackitSso,omitempty"` + UseStackitSso UpdateGrafanaConfigsPayloadgetUseStackitSsoAttributeType `json:"useStackitSso,omitempty"` } // NewUpdateGrafanaConfigsPayload instantiates a new UpdateGrafanaConfigsPayload object @@ -44,111 +104,84 @@ func NewUpdateGrafanaConfigsPayloadWithDefaults() *UpdateGrafanaConfigsPayload { } // 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 +func (o *UpdateGrafanaConfigsPayload) GetGenericOauth() (res UpdateGrafanaConfigsPayloadGetGenericOauthRetType) { + res, _ = o.GetGenericOauthOk() + return } // 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 +func (o *UpdateGrafanaConfigsPayload) GetGenericOauthOk() (ret UpdateGrafanaConfigsPayloadGetGenericOauthRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGetGenericOauthAttributeTypeOk(o.GenericOauth) } // 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 + _, ok := o.GetGenericOauthOk() + return ok } // SetGenericOauth gets a reference to the given UpdateGrafanaConfigsPayloadGenericOauth and assigns it to the GenericOauth field. -func (o *UpdateGrafanaConfigsPayload) SetGenericOauth(v *UpdateGrafanaConfigsPayloadGenericOauth) { - o.GenericOauth = v +func (o *UpdateGrafanaConfigsPayload) SetGenericOauth(v UpdateGrafanaConfigsPayloadGetGenericOauthRetType) { + setUpdateGrafanaConfigsPayloadGetGenericOauthAttributeType(&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 +func (o *UpdateGrafanaConfigsPayload) GetPublicReadAccess() (res UpdateGrafanaConfigsPayloadgetPublicReadAccessRetType) { + res, _ = o.GetPublicReadAccessOk() + return } // 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 +func (o *UpdateGrafanaConfigsPayload) GetPublicReadAccessOk() (ret UpdateGrafanaConfigsPayloadgetPublicReadAccessRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadgetPublicReadAccessAttributeTypeOk(o.PublicReadAccess) } // 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 + _, ok := o.GetPublicReadAccessOk() + return ok } // SetPublicReadAccess gets a reference to the given bool and assigns it to the PublicReadAccess field. -func (o *UpdateGrafanaConfigsPayload) SetPublicReadAccess(v *bool) { - o.PublicReadAccess = v +func (o *UpdateGrafanaConfigsPayload) SetPublicReadAccess(v UpdateGrafanaConfigsPayloadgetPublicReadAccessRetType) { + setUpdateGrafanaConfigsPayloadgetPublicReadAccessAttributeType(&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 +func (o *UpdateGrafanaConfigsPayload) GetUseStackitSso() (res UpdateGrafanaConfigsPayloadgetUseStackitSsoRetType) { + res, _ = o.GetUseStackitSsoOk() + return } // 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 +func (o *UpdateGrafanaConfigsPayload) GetUseStackitSsoOk() (ret UpdateGrafanaConfigsPayloadgetUseStackitSsoRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadgetUseStackitSsoAttributeTypeOk(o.UseStackitSso) } // 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 + _, ok := o.GetUseStackitSsoOk() + return ok } // 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) SetUseStackitSso(v UpdateGrafanaConfigsPayloadgetUseStackitSsoRetType) { + setUpdateGrafanaConfigsPayloadgetUseStackitSsoAttributeType(&o.UseStackitSso, v) } func (o UpdateGrafanaConfigsPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.GenericOauth) { - toSerialize["genericOauth"] = o.GenericOauth + if val, ok := getUpdateGrafanaConfigsPayloadGetGenericOauthAttributeTypeOk(o.GenericOauth); ok { + toSerialize["GenericOauth"] = val } - if !IsNil(o.PublicReadAccess) { - toSerialize["publicReadAccess"] = o.PublicReadAccess + if val, ok := getUpdateGrafanaConfigsPayloadgetPublicReadAccessAttributeTypeOk(o.PublicReadAccess); ok { + toSerialize["PublicReadAccess"] = val } - if !IsNil(o.UseStackitSso) { - toSerialize["useStackitSso"] = o.UseStackitSso + if val, ok := getUpdateGrafanaConfigsPayloadgetUseStackitSsoAttributeTypeOk(o.UseStackitSso); ok { + toSerialize["UseStackitSso"] = val } return toSerialize, nil } 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 3a7794774..3bd8fe661 100644 --- a/services/observability/model_update_grafana_configs_payload_generic_oauth.go +++ b/services/observability/model_update_grafana_configs_payload_generic_oauth.go @@ -17,37 +17,265 @@ import ( // checks if the UpdateGrafanaConfigsPayloadGenericOauth type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateGrafanaConfigsPayloadGenericOauth{} +/* + types and functions for apiUrl +*/ + +// isNotNullableString +type UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlAttributeType = *string + +func getUpdateGrafanaConfigsPayloadGenericOauthGetApiUrlAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthGetApiUrlAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlRetType) { + *arg = &val +} + +type UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlArgType = string +type UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlRetType = string + +/* + types and functions for authUrl +*/ + +// isNotNullableString +type UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlAttributeType = *string + +func getUpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlRetType) { + *arg = &val +} + +type UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlArgType = string +type UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlRetType = string + +/* + types and functions for enabled +*/ + +// isBoolean +type UpdateGrafanaConfigsPayloadGenericOauthgetEnabledAttributeType = *bool +type UpdateGrafanaConfigsPayloadGenericOauthgetEnabledArgType = bool +type UpdateGrafanaConfigsPayloadGenericOauthgetEnabledRetType = bool + +func getUpdateGrafanaConfigsPayloadGenericOauthgetEnabledAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthgetEnabledAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthgetEnabledRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthgetEnabledAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthgetEnabledAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthgetEnabledRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type UpdateGrafanaConfigsPayloadGenericOauthGetNameAttributeType = *string + +func getUpdateGrafanaConfigsPayloadGenericOauthGetNameAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthGetNameAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthGetNameAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthGetNameAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthGetNameRetType) { + *arg = &val +} + +type UpdateGrafanaConfigsPayloadGenericOauthGetNameArgType = string +type UpdateGrafanaConfigsPayloadGenericOauthGetNameRetType = string + +/* + types and functions for oauthClientId +*/ + +// isNotNullableString +type UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdAttributeType = *string + +func getUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdRetType) { + *arg = &val +} + +type UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdArgType = string +type UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdRetType = string + +/* + types and functions for oauthClientSecret +*/ + +// isNotNullableString +type UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretAttributeType = *string + +func getUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretRetType) { + *arg = &val +} + +type UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretArgType = string +type UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretRetType = string + +/* + types and functions for roleAttributePath +*/ + +// isNotNullableString +type UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathAttributeType = *string + +func getUpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathRetType) { + *arg = &val +} + +type UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathArgType = string +type UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathRetType = string + +/* + types and functions for roleAttributeStrict +*/ + +// isBoolean +type UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictAttributeType = *bool +type UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictArgType = bool +type UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictRetType = bool + +func getUpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictRetType) { + *arg = &val +} + +/* + types and functions for scopes +*/ + +// isNotNullableString +type UpdateGrafanaConfigsPayloadGenericOauthGetScopesAttributeType = *string + +func getUpdateGrafanaConfigsPayloadGenericOauthGetScopesAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthGetScopesAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthGetScopesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthGetScopesAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthGetScopesAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthGetScopesRetType) { + *arg = &val +} + +type UpdateGrafanaConfigsPayloadGenericOauthGetScopesArgType = string +type UpdateGrafanaConfigsPayloadGenericOauthGetScopesRetType = string + +/* + types and functions for tokenUrl +*/ + +// isNotNullableString +type UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlAttributeType = *string + +func getUpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlRetType) { + *arg = &val +} + +type UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlArgType = string +type UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlRetType = string + +/* + types and functions for usePkce +*/ + +// isBoolean +type UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceAttributeType = *bool +type UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceArgType = bool +type UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceRetType = bool + +func getUpdateGrafanaConfigsPayloadGenericOauthgetUsePkceAttributeTypeOk(arg UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceAttributeType) (ret UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateGrafanaConfigsPayloadGenericOauthgetUsePkceAttributeType(arg *UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceAttributeType, val UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceRetType) { + *arg = &val +} + // UpdateGrafanaConfigsPayloadGenericOauth struct for UpdateGrafanaConfigsPayloadGenericOauth type UpdateGrafanaConfigsPayloadGenericOauth struct { // Set api_url to the resource that returns OpenID UserInfo compatible information. // REQUIRED - ApiUrl *string `json:"apiUrl"` + ApiUrl UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlAttributeType `json:"apiUrl"` // Authentication endpoint of idp. // REQUIRED - AuthUrl *string `json:"authUrl"` + AuthUrl UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlAttributeType `json:"authUrl"` // enable or disable generic oauth login // REQUIRED - Enabled *bool `json:"enabled"` + Enabled UpdateGrafanaConfigsPayloadGenericOauthgetEnabledAttributeType `json:"enabled"` // Display name for the oAuth provider - Name *string `json:"name,omitempty"` + Name UpdateGrafanaConfigsPayloadGenericOauthGetNameAttributeType `json:"name,omitempty"` // Oauth client id for auth endpoint. // REQUIRED - OauthClientId *string `json:"oauthClientId"` + OauthClientId UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdAttributeType `json:"oauthClientId"` // Oauth client secret for auth endpoint. // REQUIRED - OauthClientSecret *string `json:"oauthClientSecret"` + OauthClientSecret UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretAttributeType `json:"oauthClientSecret"` // Grafana checks for the presence of a role using the JMESPath specified via the role_attribute_path configuration option. The JMESPath is applied to the id_token first. If there is no match, then the UserInfo endpoint specified via the api_url configuration option is tried next. The result after evaluation of the role_attribute_path JMESPath expression should be a valid Grafana role, for example, Viewer, Editor or Admin For example: contains(roles[\\*], 'grafana-admin') && 'Admin' || contains(roles[\\*], 'grafana-editor') && 'Editor' || contains(roles[\\*], 'grafana-viewer') && 'Viewer' // REQUIRED - RoleAttributePath *string `json:"roleAttributePath"` + RoleAttributePath UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathAttributeType `json:"roleAttributePath"` // If therole_attribute_path property does not return a role, then the user is assigned the Viewer role by default. You can disable the role assignment by setting role_attribute_strict = true. It denies user access if no role or an invalid role is returned. - RoleAttributeStrict *bool `json:"roleAttributeStrict,omitempty"` + RoleAttributeStrict UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictAttributeType `json:"roleAttributeStrict,omitempty"` // Space seperated list of scopes of the token - Scopes *string `json:"scopes,omitempty"` + Scopes UpdateGrafanaConfigsPayloadGenericOauthGetScopesAttributeType `json:"scopes,omitempty"` // Token endpoint of the idp. // REQUIRED - TokenUrl *string `json:"tokenUrl"` + TokenUrl UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlAttributeType `json:"tokenUrl"` // enable or disable Proof Key for Code Exchange - UsePkce *bool `json:"usePkce,omitempty"` + UsePkce UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceAttributeType `json:"usePkce,omitempty"` } type _UpdateGrafanaConfigsPayloadGenericOauth UpdateGrafanaConfigsPayloadGenericOauth @@ -56,19 +284,15 @@ type _UpdateGrafanaConfigsPayloadGenericOauth UpdateGrafanaConfigsPayloadGeneric // 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 { +func NewUpdateGrafanaConfigsPayloadGenericOauth(apiUrl UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlArgType, authUrl UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlArgType, enabled UpdateGrafanaConfigsPayloadGenericOauthgetEnabledArgType, oauthClientId UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdArgType, oauthClientSecret UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretArgType, roleAttributePath UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathArgType, tokenUrl UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlArgType) *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 + setUpdateGrafanaConfigsPayloadGenericOauthGetApiUrlAttributeType(&this.ApiUrl, apiUrl) + setUpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlAttributeType(&this.AuthUrl, authUrl) + setUpdateGrafanaConfigsPayloadGenericOauthgetEnabledAttributeType(&this.Enabled, enabled) + setUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdAttributeType(&this.OauthClientId, oauthClientId) + setUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretAttributeType(&this.OauthClientSecret, oauthClientSecret) + setUpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathAttributeType(&this.RoleAttributePath, roleAttributePath) + setUpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlAttributeType(&this.TokenUrl, tokenUrl) return &this } @@ -85,321 +309,250 @@ func NewUpdateGrafanaConfigsPayloadGenericOauthWithDefaults() *UpdateGrafanaConf } // GetApiUrl returns the ApiUrl field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetApiUrl() *string { - if o == nil || IsNil(o.ApiUrl) { - var ret *string - return ret - } - - return o.ApiUrl +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetApiUrl() (ret UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlRetType) { + ret, _ = o.GetApiUrlOk() + return ret } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetApiUrlOk() (ret UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthGetApiUrlAttributeTypeOk(o.ApiUrl) } // SetApiUrl sets field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetApiUrl(v *string) { - o.ApiUrl = v +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetApiUrl(v UpdateGrafanaConfigsPayloadGenericOauthGetApiUrlRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthGetApiUrlAttributeType(&o.ApiUrl, v) } // GetAuthUrl returns the AuthUrl field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetAuthUrl() *string { - if o == nil || IsNil(o.AuthUrl) { - var ret *string - return ret - } - - return o.AuthUrl +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetAuthUrl() (ret UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlRetType) { + ret, _ = o.GetAuthUrlOk() + return ret } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetAuthUrlOk() (ret UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlAttributeTypeOk(o.AuthUrl) } // SetAuthUrl sets field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetAuthUrl(v *string) { - o.AuthUrl = v +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetAuthUrl(v UpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlAttributeType(&o.AuthUrl, v) } // GetEnabled returns the Enabled field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetEnabled() *bool { - if o == nil || IsNil(o.Enabled) { - var ret *bool - return ret - } - - return o.Enabled +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetEnabled() (ret UpdateGrafanaConfigsPayloadGenericOauthgetEnabledRetType) { + ret, _ = o.GetEnabledOk() + return ret } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetEnabledOk() (ret UpdateGrafanaConfigsPayloadGenericOauthgetEnabledRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthgetEnabledAttributeTypeOk(o.Enabled) } // SetEnabled sets field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetEnabled(v *bool) { - o.Enabled = v +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetEnabled(v UpdateGrafanaConfigsPayloadGenericOauthgetEnabledRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthgetEnabledAttributeType(&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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetName() (res UpdateGrafanaConfigsPayloadGenericOauthGetNameRetType) { + res, _ = o.GetNameOk() + return } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetNameOk() (ret UpdateGrafanaConfigsPayloadGenericOauthGetNameRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthGetNameAttributeTypeOk(o.Name) } // 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 + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetName(v *string) { - o.Name = v +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetName(v UpdateGrafanaConfigsPayloadGenericOauthGetNameRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthGetNameAttributeType(&o.Name, v) } // GetOauthClientId returns the OauthClientId field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetOauthClientId() *string { - if o == nil || IsNil(o.OauthClientId) { - var ret *string - return ret - } - - return o.OauthClientId +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetOauthClientId() (ret UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdRetType) { + ret, _ = o.GetOauthClientIdOk() + return ret } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetOauthClientIdOk() (ret UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdAttributeTypeOk(o.OauthClientId) } // SetOauthClientId sets field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetOauthClientId(v *string) { - o.OauthClientId = v +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetOauthClientId(v UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdAttributeType(&o.OauthClientId, v) } // GetOauthClientSecret returns the OauthClientSecret field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetOauthClientSecret() *string { - if o == nil || IsNil(o.OauthClientSecret) { - var ret *string - return ret - } - - return o.OauthClientSecret +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetOauthClientSecret() (ret UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretRetType) { + ret, _ = o.GetOauthClientSecretOk() + return ret } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetOauthClientSecretOk() (ret UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretAttributeTypeOk(o.OauthClientSecret) } // SetOauthClientSecret sets field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetOauthClientSecret(v *string) { - o.OauthClientSecret = v +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetOauthClientSecret(v UpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretAttributeType(&o.OauthClientSecret, v) } // GetRoleAttributePath returns the RoleAttributePath field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetRoleAttributePath() *string { - if o == nil || IsNil(o.RoleAttributePath) { - var ret *string - return ret - } - - return o.RoleAttributePath +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetRoleAttributePath() (ret UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathRetType) { + ret, _ = o.GetRoleAttributePathOk() + return ret } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetRoleAttributePathOk() (ret UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathAttributeTypeOk(o.RoleAttributePath) } // SetRoleAttributePath sets field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetRoleAttributePath(v *string) { - o.RoleAttributePath = v +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetRoleAttributePath(v UpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathAttributeType(&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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetRoleAttributeStrict() (res UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictRetType) { + res, _ = o.GetRoleAttributeStrictOk() + return } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetRoleAttributeStrictOk() (ret UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictAttributeTypeOk(o.RoleAttributeStrict) } // 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 + _, ok := o.GetRoleAttributeStrictOk() + return ok } // SetRoleAttributeStrict gets a reference to the given bool and assigns it to the RoleAttributeStrict field. -func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetRoleAttributeStrict(v *bool) { - o.RoleAttributeStrict = v +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetRoleAttributeStrict(v UpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictAttributeType(&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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetScopes() (res UpdateGrafanaConfigsPayloadGenericOauthGetScopesRetType) { + res, _ = o.GetScopesOk() + return } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetScopesOk() (ret UpdateGrafanaConfigsPayloadGenericOauthGetScopesRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthGetScopesAttributeTypeOk(o.Scopes) } // 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 + _, ok := o.GetScopesOk() + return ok } // SetScopes gets a reference to the given string and assigns it to the Scopes field. -func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetScopes(v *string) { - o.Scopes = v +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetScopes(v UpdateGrafanaConfigsPayloadGenericOauthGetScopesRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthGetScopesAttributeType(&o.Scopes, v) } // GetTokenUrl returns the TokenUrl field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetTokenUrl() *string { - if o == nil || IsNil(o.TokenUrl) { - var ret *string - return ret - } - - return o.TokenUrl +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetTokenUrl() (ret UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlRetType) { + ret, _ = o.GetTokenUrlOk() + return ret } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetTokenUrlOk() (ret UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlAttributeTypeOk(o.TokenUrl) } // SetTokenUrl sets field value -func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetTokenUrl(v *string) { - o.TokenUrl = v +func (o *UpdateGrafanaConfigsPayloadGenericOauth) SetTokenUrl(v UpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlAttributeType(&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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetUsePkce() (res UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceRetType) { + res, _ = o.GetUsePkceOk() + return } // 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 +func (o *UpdateGrafanaConfigsPayloadGenericOauth) GetUsePkceOk() (ret UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceRetType, ok bool) { + return getUpdateGrafanaConfigsPayloadGenericOauthgetUsePkceAttributeTypeOk(o.UsePkce) } // 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 + _, ok := o.GetUsePkceOk() + return ok } // 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) SetUsePkce(v UpdateGrafanaConfigsPayloadGenericOauthgetUsePkceRetType) { + setUpdateGrafanaConfigsPayloadGenericOauthgetUsePkceAttributeType(&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 + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthGetApiUrlAttributeTypeOk(o.ApiUrl); ok { + toSerialize["ApiUrl"] = val + } + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthGetAuthUrlAttributeTypeOk(o.AuthUrl); ok { + toSerialize["AuthUrl"] = val + } + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthgetEnabledAttributeTypeOk(o.Enabled); ok { + toSerialize["Enabled"] = val + } + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientIdAttributeTypeOk(o.OauthClientId); ok { + toSerialize["OauthClientId"] = val + } + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthGetOauthClientSecretAttributeTypeOk(o.OauthClientSecret); ok { + toSerialize["OauthClientSecret"] = val + } + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthGetRoleAttributePathAttributeTypeOk(o.RoleAttributePath); ok { + toSerialize["RoleAttributePath"] = val + } + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthgetRoleAttributeStrictAttributeTypeOk(o.RoleAttributeStrict); ok { + toSerialize["RoleAttributeStrict"] = val } - toSerialize["oauthClientId"] = o.OauthClientId - toSerialize["oauthClientSecret"] = o.OauthClientSecret - toSerialize["roleAttributePath"] = o.RoleAttributePath - if !IsNil(o.RoleAttributeStrict) { - toSerialize["roleAttributeStrict"] = o.RoleAttributeStrict + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthGetScopesAttributeTypeOk(o.Scopes); ok { + toSerialize["Scopes"] = val } - if !IsNil(o.Scopes) { - toSerialize["scopes"] = o.Scopes + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthGetTokenUrlAttributeTypeOk(o.TokenUrl); ok { + toSerialize["TokenUrl"] = val } - toSerialize["tokenUrl"] = o.TokenUrl - if !IsNil(o.UsePkce) { - toSerialize["usePkce"] = o.UsePkce + if val, ok := getUpdateGrafanaConfigsPayloadGenericOauthgetUsePkceAttributeTypeOk(o.UsePkce); ok { + toSerialize["UsePkce"] = val } return toSerialize, nil } diff --git a/services/observability/model_update_instance_payload.go b/services/observability/model_update_instance_payload.go index 598d1290d..25f5d9654 100644 --- a/services/observability/model_update_instance_payload.go +++ b/services/observability/model_update_instance_payload.go @@ -17,15 +17,77 @@ import ( // checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateInstancePayload{} +/* + types and functions for name +*/ + +// isNotNullableString +type UpdateInstancePayloadGetNameAttributeType = *string + +func getUpdateInstancePayloadGetNameAttributeTypeOk(arg UpdateInstancePayloadGetNameAttributeType) (ret UpdateInstancePayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateInstancePayloadGetNameAttributeType(arg *UpdateInstancePayloadGetNameAttributeType, val UpdateInstancePayloadGetNameRetType) { + *arg = &val +} + +type UpdateInstancePayloadGetNameArgType = string +type UpdateInstancePayloadGetNameRetType = string + +/* + types and functions for parameter +*/ + +// isFreeform +type UpdateInstancePayloadGetParameterAttributeType = *map[string]interface{} +type UpdateInstancePayloadGetParameterArgType = map[string]interface{} +type UpdateInstancePayloadGetParameterRetType = map[string]interface{} + +func getUpdateInstancePayloadGetParameterAttributeTypeOk(arg UpdateInstancePayloadGetParameterAttributeType) (ret UpdateInstancePayloadGetParameterRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateInstancePayloadGetParameterAttributeType(arg *UpdateInstancePayloadGetParameterAttributeType, val UpdateInstancePayloadGetParameterRetType) { + *arg = &val +} + +/* + types and functions for planId +*/ + +// isNotNullableString +type UpdateInstancePayloadGetPlanIdAttributeType = *string + +func getUpdateInstancePayloadGetPlanIdAttributeTypeOk(arg UpdateInstancePayloadGetPlanIdAttributeType) (ret UpdateInstancePayloadGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateInstancePayloadGetPlanIdAttributeType(arg *UpdateInstancePayloadGetPlanIdAttributeType, val UpdateInstancePayloadGetPlanIdRetType) { + *arg = &val +} + +type UpdateInstancePayloadGetPlanIdArgType = string +type UpdateInstancePayloadGetPlanIdRetType = string + // UpdateInstancePayload Create update instance body. type UpdateInstancePayload struct { // Name of the service - Name *string `json:"name,omitempty"` + Name UpdateInstancePayloadGetNameAttributeType `json:"name,omitempty"` // additional parameters - Parameter *map[string]interface{} `json:"parameter,omitempty"` + Parameter UpdateInstancePayloadGetParameterAttributeType `json:"parameter,omitempty"` // uuid of the plan to create/update // REQUIRED - PlanId *string `json:"planId"` + PlanId UpdateInstancePayloadGetPlanIdAttributeType `json:"planId"` } type _UpdateInstancePayload UpdateInstancePayload @@ -34,9 +96,9 @@ type _UpdateInstancePayload UpdateInstancePayload // 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 { +func NewUpdateInstancePayload(planId UpdateInstancePayloadGetPlanIdArgType) *UpdateInstancePayload { this := UpdateInstancePayload{} - this.PlanId = planId + setUpdateInstancePayloadGetPlanIdAttributeType(&this.PlanId, planId) return &this } @@ -49,102 +111,79 @@ func NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { } // 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 +func (o *UpdateInstancePayload) GetName() (res UpdateInstancePayloadGetNameRetType) { + res, _ = o.GetNameOk() + return } // 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 +func (o *UpdateInstancePayload) GetNameOk() (ret UpdateInstancePayloadGetNameRetType, ok bool) { + return getUpdateInstancePayloadGetNameAttributeTypeOk(o.Name) } // 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 + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *UpdateInstancePayload) SetName(v *string) { - o.Name = v +func (o *UpdateInstancePayload) SetName(v UpdateInstancePayloadGetNameRetType) { + setUpdateInstancePayloadGetNameAttributeType(&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 +func (o *UpdateInstancePayload) GetParameter() (res UpdateInstancePayloadGetParameterRetType) { + res, _ = o.GetParameterOk() + return } // 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 +func (o *UpdateInstancePayload) GetParameterOk() (ret UpdateInstancePayloadGetParameterRetType, ok bool) { + return getUpdateInstancePayloadGetParameterAttributeTypeOk(o.Parameter) } // 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 + _, ok := o.GetParameterOk() + return ok } // 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 +func (o *UpdateInstancePayload) SetParameter(v UpdateInstancePayloadGetParameterRetType) { + setUpdateInstancePayloadGetParameterAttributeType(&o.Parameter, v) } // GetPlanId returns the PlanId field value -func (o *UpdateInstancePayload) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - - return o.PlanId +func (o *UpdateInstancePayload) GetPlanId() (ret UpdateInstancePayloadGetPlanIdRetType) { + ret, _ = o.GetPlanIdOk() + return ret } // 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 +func (o *UpdateInstancePayload) GetPlanIdOk() (ret UpdateInstancePayloadGetPlanIdRetType, ok bool) { + return getUpdateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId) } // SetPlanId sets field value -func (o *UpdateInstancePayload) SetPlanId(v *string) { - o.PlanId = v +func (o *UpdateInstancePayload) SetPlanId(v UpdateInstancePayloadGetPlanIdRetType) { + setUpdateInstancePayloadGetPlanIdAttributeType(&o.PlanId, v) } func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getUpdateInstancePayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getUpdateInstancePayloadGetParameterAttributeTypeOk(o.Parameter); ok { + toSerialize["Parameter"] = val } - if !IsNil(o.Parameter) { - toSerialize["parameter"] = o.Parameter + if val, ok := getUpdateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val } - toSerialize["planId"] = o.PlanId return toSerialize, nil } diff --git a/services/observability/model_update_metrics_storage_retention_payload.go b/services/observability/model_update_metrics_storage_retention_payload.go index 002fd8504..ccb486f43 100644 --- a/services/observability/model_update_metrics_storage_retention_payload.go +++ b/services/observability/model_update_metrics_storage_retention_payload.go @@ -17,17 +17,80 @@ import ( // checks if the UpdateMetricsStorageRetentionPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateMetricsStorageRetentionPayload{} +/* + types and functions for metricsRetentionTime1h +*/ + +// isNotNullableString +type UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hAttributeType = *string + +func getUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hAttributeTypeOk(arg UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hAttributeType) (ret UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hAttributeType(arg *UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hAttributeType, val UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hRetType) { + *arg = &val +} + +type UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hArgType = string +type UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hRetType = string + +/* + types and functions for metricsRetentionTime5m +*/ + +// isNotNullableString +type UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mAttributeType = *string + +func getUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mAttributeTypeOk(arg UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mAttributeType) (ret UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mAttributeType(arg *UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mAttributeType, val UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mRetType) { + *arg = &val +} + +type UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mArgType = string +type UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mRetType = string + +/* + types and functions for metricsRetentionTimeRaw +*/ + +// isNotNullableString +type UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawAttributeType = *string + +func getUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawAttributeTypeOk(arg UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawAttributeType) (ret UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawAttributeType(arg *UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawAttributeType, val UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawRetType) { + *arg = &val +} + +type UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawArgType = string +type UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawRetType = string + // 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 // REQUIRED - MetricsRetentionTime1h *string `json:"metricsRetentionTime1h"` + MetricsRetentionTime1h UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hAttributeType `json:"metricsRetentionTime1h"` // Retention time of longtime storage of 5m sampled data. After that time the data will be down sampled to 1h. `Additional Validators:` * Should be a valid time string * Should not be bigger than metricsRetentionTimeRaw // REQUIRED - MetricsRetentionTime5m *string `json:"metricsRetentionTime5m"` + MetricsRetentionTime5m UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mAttributeType `json:"metricsRetentionTime5m"` // Retention time of longtime storage of raw sampled data. After that time the data will be down sampled to 5m. Keep in mind, that the initial goal of downsampling is not saving disk or object storage space. In fact, downsampling doesn't save you any space but instead, it adds 2 more blocks for each raw block which are only slightly smaller or relatively similar size to raw block. This is done by internal downsampling implementation which to be mathematically correct holds various aggregations. This means that downsampling can increase the size of your storage a bit (~3x), if you choose to store all resolutions (recommended). The goal of downsampling is to provide an opportunity to get fast results for range queries of big time intervals like months or years. `Additional Validators:` * Should be a valid time string * Should not be bigger than 13 months // REQUIRED - MetricsRetentionTimeRaw *string `json:"metricsRetentionTimeRaw"` + MetricsRetentionTimeRaw UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawAttributeType `json:"metricsRetentionTimeRaw"` } type _UpdateMetricsStorageRetentionPayload UpdateMetricsStorageRetentionPayload @@ -36,11 +99,11 @@ type _UpdateMetricsStorageRetentionPayload UpdateMetricsStorageRetentionPayload // 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 { +func NewUpdateMetricsStorageRetentionPayload(metricsRetentionTime1h UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hArgType, metricsRetentionTime5m UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mArgType, metricsRetentionTimeRaw UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawArgType) *UpdateMetricsStorageRetentionPayload { this := UpdateMetricsStorageRetentionPayload{} - this.MetricsRetentionTime1h = metricsRetentionTime1h - this.MetricsRetentionTime5m = metricsRetentionTime5m - this.MetricsRetentionTimeRaw = metricsRetentionTimeRaw + setUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hAttributeType(&this.MetricsRetentionTime1h, metricsRetentionTime1h) + setUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mAttributeType(&this.MetricsRetentionTime5m, metricsRetentionTime5m) + setUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawAttributeType(&this.MetricsRetentionTimeRaw, metricsRetentionTimeRaw) return &this } @@ -53,82 +116,67 @@ func NewUpdateMetricsStorageRetentionPayloadWithDefaults() *UpdateMetricsStorage } // GetMetricsRetentionTime1h returns the MetricsRetentionTime1h field value -func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTime1h() *string { - if o == nil || IsNil(o.MetricsRetentionTime1h) { - var ret *string - return ret - } - - return o.MetricsRetentionTime1h +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTime1h() (ret UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hRetType) { + ret, _ = o.GetMetricsRetentionTime1hOk() + return ret } // 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 +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTime1hOk() (ret UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hRetType, ok bool) { + return getUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hAttributeTypeOk(o.MetricsRetentionTime1h) } // SetMetricsRetentionTime1h sets field value -func (o *UpdateMetricsStorageRetentionPayload) SetMetricsRetentionTime1h(v *string) { - o.MetricsRetentionTime1h = v +func (o *UpdateMetricsStorageRetentionPayload) SetMetricsRetentionTime1h(v UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hRetType) { + setUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hAttributeType(&o.MetricsRetentionTime1h, v) } // GetMetricsRetentionTime5m returns the MetricsRetentionTime5m field value -func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTime5m() *string { - if o == nil || IsNil(o.MetricsRetentionTime5m) { - var ret *string - return ret - } - - return o.MetricsRetentionTime5m +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTime5m() (ret UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mRetType) { + ret, _ = o.GetMetricsRetentionTime5mOk() + return ret } // 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 +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTime5mOk() (ret UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mRetType, ok bool) { + return getUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mAttributeTypeOk(o.MetricsRetentionTime5m) } // SetMetricsRetentionTime5m sets field value -func (o *UpdateMetricsStorageRetentionPayload) SetMetricsRetentionTime5m(v *string) { - o.MetricsRetentionTime5m = v +func (o *UpdateMetricsStorageRetentionPayload) SetMetricsRetentionTime5m(v UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mRetType) { + setUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mAttributeType(&o.MetricsRetentionTime5m, v) } // GetMetricsRetentionTimeRaw returns the MetricsRetentionTimeRaw field value -func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTimeRaw() *string { - if o == nil || IsNil(o.MetricsRetentionTimeRaw) { - var ret *string - return ret - } - - return o.MetricsRetentionTimeRaw +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTimeRaw() (ret UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawRetType) { + ret, _ = o.GetMetricsRetentionTimeRawOk() + return ret } // 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 +func (o *UpdateMetricsStorageRetentionPayload) GetMetricsRetentionTimeRawOk() (ret UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawRetType, ok bool) { + return getUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawAttributeTypeOk(o.MetricsRetentionTimeRaw) } // SetMetricsRetentionTimeRaw sets field value -func (o *UpdateMetricsStorageRetentionPayload) SetMetricsRetentionTimeRaw(v *string) { - o.MetricsRetentionTimeRaw = v +func (o *UpdateMetricsStorageRetentionPayload) SetMetricsRetentionTimeRaw(v UpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawRetType) { + setUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawAttributeType(&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 + if val, ok := getUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime1hAttributeTypeOk(o.MetricsRetentionTime1h); ok { + toSerialize["MetricsRetentionTime1h"] = val + } + if val, ok := getUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTime5mAttributeTypeOk(o.MetricsRetentionTime5m); ok { + toSerialize["MetricsRetentionTime5m"] = val + } + if val, ok := getUpdateMetricsStorageRetentionPayloadGetMetricsRetentionTimeRawAttributeTypeOk(o.MetricsRetentionTimeRaw); ok { + toSerialize["MetricsRetentionTimeRaw"] = val + } return toSerialize, nil } diff --git a/services/observability/model_update_scrape_config_payload.go b/services/observability/model_update_scrape_config_payload.go index 438a5e0e4..e0c90c187 100644 --- a/services/observability/model_update_scrape_config_payload.go +++ b/services/observability/model_update_scrape_config_payload.go @@ -17,37 +17,301 @@ import ( // checks if the UpdateScrapeConfigPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateScrapeConfigPayload{} +/* + types and functions for basicAuth +*/ + +// isModel +type UpdateScrapeConfigPayloadGetBasicAuthAttributeType = *CreateScrapeConfigPayloadBasicAuth +type UpdateScrapeConfigPayloadGetBasicAuthArgType = CreateScrapeConfigPayloadBasicAuth +type UpdateScrapeConfigPayloadGetBasicAuthRetType = CreateScrapeConfigPayloadBasicAuth + +func getUpdateScrapeConfigPayloadGetBasicAuthAttributeTypeOk(arg UpdateScrapeConfigPayloadGetBasicAuthAttributeType) (ret UpdateScrapeConfigPayloadGetBasicAuthRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetBasicAuthAttributeType(arg *UpdateScrapeConfigPayloadGetBasicAuthAttributeType, val UpdateScrapeConfigPayloadGetBasicAuthRetType) { + *arg = &val +} + +/* + types and functions for bearerToken +*/ + +// isNotNullableString +type UpdateScrapeConfigPayloadGetBearerTokenAttributeType = *string + +func getUpdateScrapeConfigPayloadGetBearerTokenAttributeTypeOk(arg UpdateScrapeConfigPayloadGetBearerTokenAttributeType) (ret UpdateScrapeConfigPayloadGetBearerTokenRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetBearerTokenAttributeType(arg *UpdateScrapeConfigPayloadGetBearerTokenAttributeType, val UpdateScrapeConfigPayloadGetBearerTokenRetType) { + *arg = &val +} + +type UpdateScrapeConfigPayloadGetBearerTokenArgType = string +type UpdateScrapeConfigPayloadGetBearerTokenRetType = string + +/* + types and functions for honorLabels +*/ + +// isBoolean +type UpdateScrapeConfigPayloadgetHonorLabelsAttributeType = *bool +type UpdateScrapeConfigPayloadgetHonorLabelsArgType = bool +type UpdateScrapeConfigPayloadgetHonorLabelsRetType = bool + +func getUpdateScrapeConfigPayloadgetHonorLabelsAttributeTypeOk(arg UpdateScrapeConfigPayloadgetHonorLabelsAttributeType) (ret UpdateScrapeConfigPayloadgetHonorLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadgetHonorLabelsAttributeType(arg *UpdateScrapeConfigPayloadgetHonorLabelsAttributeType, val UpdateScrapeConfigPayloadgetHonorLabelsRetType) { + *arg = &val +} + +/* + types and functions for honorTimeStamps +*/ + +// isBoolean +type UpdateScrapeConfigPayloadgetHonorTimeStampsAttributeType = *bool +type UpdateScrapeConfigPayloadgetHonorTimeStampsArgType = bool +type UpdateScrapeConfigPayloadgetHonorTimeStampsRetType = bool + +func getUpdateScrapeConfigPayloadgetHonorTimeStampsAttributeTypeOk(arg UpdateScrapeConfigPayloadgetHonorTimeStampsAttributeType) (ret UpdateScrapeConfigPayloadgetHonorTimeStampsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadgetHonorTimeStampsAttributeType(arg *UpdateScrapeConfigPayloadgetHonorTimeStampsAttributeType, val UpdateScrapeConfigPayloadgetHonorTimeStampsRetType) { + *arg = &val +} + +/* + types and functions for metricsPath +*/ + +// isNotNullableString +type UpdateScrapeConfigPayloadGetMetricsPathAttributeType = *string + +func getUpdateScrapeConfigPayloadGetMetricsPathAttributeTypeOk(arg UpdateScrapeConfigPayloadGetMetricsPathAttributeType) (ret UpdateScrapeConfigPayloadGetMetricsPathRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetMetricsPathAttributeType(arg *UpdateScrapeConfigPayloadGetMetricsPathAttributeType, val UpdateScrapeConfigPayloadGetMetricsPathRetType) { + *arg = &val +} + +type UpdateScrapeConfigPayloadGetMetricsPathArgType = string +type UpdateScrapeConfigPayloadGetMetricsPathRetType = string + +/* + types and functions for metricsRelabelConfigs +*/ + +// isArray +type UpdateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType = *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner +type UpdateScrapeConfigPayloadGetMetricsRelabelConfigsArgType = []CreateScrapeConfigPayloadMetricsRelabelConfigsInner +type UpdateScrapeConfigPayloadGetMetricsRelabelConfigsRetType = []CreateScrapeConfigPayloadMetricsRelabelConfigsInner + +func getUpdateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeTypeOk(arg UpdateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType) (ret UpdateScrapeConfigPayloadGetMetricsRelabelConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType(arg *UpdateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType, val UpdateScrapeConfigPayloadGetMetricsRelabelConfigsRetType) { + *arg = &val +} + +/* + types and functions for params +*/ + +// isFreeform +type UpdateScrapeConfigPayloadGetParamsAttributeType = *map[string]interface{} +type UpdateScrapeConfigPayloadGetParamsArgType = map[string]interface{} +type UpdateScrapeConfigPayloadGetParamsRetType = map[string]interface{} + +func getUpdateScrapeConfigPayloadGetParamsAttributeTypeOk(arg UpdateScrapeConfigPayloadGetParamsAttributeType) (ret UpdateScrapeConfigPayloadGetParamsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetParamsAttributeType(arg *UpdateScrapeConfigPayloadGetParamsAttributeType, val UpdateScrapeConfigPayloadGetParamsRetType) { + *arg = &val +} + +/* + types and functions for sampleLimit +*/ + +// isNumber +type UpdateScrapeConfigPayloadGetSampleLimitAttributeType = *float64 +type UpdateScrapeConfigPayloadGetSampleLimitArgType = float64 +type UpdateScrapeConfigPayloadGetSampleLimitRetType = float64 + +func getUpdateScrapeConfigPayloadGetSampleLimitAttributeTypeOk(arg UpdateScrapeConfigPayloadGetSampleLimitAttributeType) (ret UpdateScrapeConfigPayloadGetSampleLimitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetSampleLimitAttributeType(arg *UpdateScrapeConfigPayloadGetSampleLimitAttributeType, val UpdateScrapeConfigPayloadGetSampleLimitRetType) { + *arg = &val +} + +/* + types and functions for scheme +*/ + +// isEnumRef +type UpdateScrapeConfigPayloadGetSchemeAttributeType = *string +type UpdateScrapeConfigPayloadGetSchemeArgType = string +type UpdateScrapeConfigPayloadGetSchemeRetType = string + +func getUpdateScrapeConfigPayloadGetSchemeAttributeTypeOk(arg UpdateScrapeConfigPayloadGetSchemeAttributeType) (ret UpdateScrapeConfigPayloadGetSchemeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetSchemeAttributeType(arg *UpdateScrapeConfigPayloadGetSchemeAttributeType, val UpdateScrapeConfigPayloadGetSchemeRetType) { + *arg = &val +} + +/* + types and functions for scrapeInterval +*/ + +// isNotNullableString +type UpdateScrapeConfigPayloadGetScrapeIntervalAttributeType = *string + +func getUpdateScrapeConfigPayloadGetScrapeIntervalAttributeTypeOk(arg UpdateScrapeConfigPayloadGetScrapeIntervalAttributeType) (ret UpdateScrapeConfigPayloadGetScrapeIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetScrapeIntervalAttributeType(arg *UpdateScrapeConfigPayloadGetScrapeIntervalAttributeType, val UpdateScrapeConfigPayloadGetScrapeIntervalRetType) { + *arg = &val +} + +type UpdateScrapeConfigPayloadGetScrapeIntervalArgType = string +type UpdateScrapeConfigPayloadGetScrapeIntervalRetType = string + +/* + types and functions for scrapeTimeout +*/ + +// isNotNullableString +type UpdateScrapeConfigPayloadGetScrapeTimeoutAttributeType = *string + +func getUpdateScrapeConfigPayloadGetScrapeTimeoutAttributeTypeOk(arg UpdateScrapeConfigPayloadGetScrapeTimeoutAttributeType) (ret UpdateScrapeConfigPayloadGetScrapeTimeoutRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetScrapeTimeoutAttributeType(arg *UpdateScrapeConfigPayloadGetScrapeTimeoutAttributeType, val UpdateScrapeConfigPayloadGetScrapeTimeoutRetType) { + *arg = &val +} + +type UpdateScrapeConfigPayloadGetScrapeTimeoutArgType = string +type UpdateScrapeConfigPayloadGetScrapeTimeoutRetType = string + +/* + types and functions for staticConfigs +*/ + +// isArray +type UpdateScrapeConfigPayloadGetStaticConfigsAttributeType = *[]UpdateScrapeConfigPayloadStaticConfigsInner +type UpdateScrapeConfigPayloadGetStaticConfigsArgType = []UpdateScrapeConfigPayloadStaticConfigsInner +type UpdateScrapeConfigPayloadGetStaticConfigsRetType = []UpdateScrapeConfigPayloadStaticConfigsInner + +func getUpdateScrapeConfigPayloadGetStaticConfigsAttributeTypeOk(arg UpdateScrapeConfigPayloadGetStaticConfigsAttributeType) (ret UpdateScrapeConfigPayloadGetStaticConfigsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetStaticConfigsAttributeType(arg *UpdateScrapeConfigPayloadGetStaticConfigsAttributeType, val UpdateScrapeConfigPayloadGetStaticConfigsRetType) { + *arg = &val +} + +/* + types and functions for tlsConfig +*/ + +// isModel +type UpdateScrapeConfigPayloadGetTlsConfigAttributeType = *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig +type UpdateScrapeConfigPayloadGetTlsConfigArgType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig +type UpdateScrapeConfigPayloadGetTlsConfigRetType = CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig + +func getUpdateScrapeConfigPayloadGetTlsConfigAttributeTypeOk(arg UpdateScrapeConfigPayloadGetTlsConfigAttributeType) (ret UpdateScrapeConfigPayloadGetTlsConfigRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadGetTlsConfigAttributeType(arg *UpdateScrapeConfigPayloadGetTlsConfigAttributeType, val UpdateScrapeConfigPayloadGetTlsConfigRetType) { + *arg = &val +} + // UpdateScrapeConfigPayload struct for UpdateScrapeConfigPayload type UpdateScrapeConfigPayload struct { - BasicAuth *CreateScrapeConfigPayloadBasicAuth `json:"basicAuth,omitempty"` + BasicAuth UpdateScrapeConfigPayloadGetBasicAuthAttributeType `json:"basicAuth,omitempty"` // Sets the 'Authorization' header on every scrape request with the configured bearer token. It is mutually exclusive with 'bearer_token_file'. `Additional Validators:` * needs to be a valid bearer token * if bearerToken is in the body no other authentication method should be in the body - BearerToken *string `json:"bearerToken,omitempty"` + BearerToken UpdateScrapeConfigPayloadGetBearerTokenAttributeType `json:"bearerToken,omitempty"` // Note that any globally configured 'external_labels' are unaffected by this setting. In communication with external systems, they are always applied only when a time series does not have a given label yet and are ignored otherwise. - HonorLabels *bool `json:"honorLabels,omitempty"` + HonorLabels UpdateScrapeConfigPayloadgetHonorLabelsAttributeType `json:"honorLabels,omitempty"` // honor_timestamps controls whether Prometheus respects the timestamps present in scraped data. If honor_timestamps is set to 'true', the timestamps of the metrics exposed by the target will be used. - HonorTimeStamps *bool `json:"honorTimeStamps,omitempty"` + HonorTimeStamps UpdateScrapeConfigPayloadgetHonorTimeStampsAttributeType `json:"honorTimeStamps,omitempty"` // The HTTP resource path on which to fetch metrics from targets. E.g. /metrics // REQUIRED - MetricsPath *string `json:"metricsPath"` + MetricsPath UpdateScrapeConfigPayloadGetMetricsPathAttributeType `json:"metricsPath"` // List of metric relabel configurations - MetricsRelabelConfigs *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner `json:"metricsRelabelConfigs,omitempty"` + MetricsRelabelConfigs UpdateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType `json:"metricsRelabelConfigs,omitempty"` // Optional http params `Additional Validators:` * should not contain more than 5 keys * each key and value should not have more than 200 characters - Params *map[string]interface{} `json:"params,omitempty"` + Params UpdateScrapeConfigPayloadGetParamsAttributeType `json:"params,omitempty"` // Per-scrape limit on number of scraped samples that will be accepted. If more than this number of samples are present after metric relabeling the entire scrape will be treated as failed. The total limit depends on the service plan target limits * samples - SampleLimit *float64 `json:"sampleLimit,omitempty"` + SampleLimit UpdateScrapeConfigPayloadGetSampleLimitAttributeType `json:"sampleLimit,omitempty"` // Configures the protocol scheme used for requests. https or http // REQUIRED - Scheme *string `json:"scheme"` + Scheme UpdateScrapeConfigPayloadGetSchemeAttributeType `json:"scheme"` // How frequently to scrape targets from this job. E.g. 5m `Additional Validators:` * must be a valid time format* must be >= 60s // REQUIRED - ScrapeInterval *string `json:"scrapeInterval"` + ScrapeInterval UpdateScrapeConfigPayloadGetScrapeIntervalAttributeType `json:"scrapeInterval"` // Per-scrape timeout when scraping this job. `Additional Validators:` * must be a valid time format* must be smaller than scrapeInterval // REQUIRED - ScrapeTimeout *string `json:"scrapeTimeout"` + ScrapeTimeout UpdateScrapeConfigPayloadGetScrapeTimeoutAttributeType `json:"scrapeTimeout"` // A list of scrape configurations. // REQUIRED - StaticConfigs *[]UpdateScrapeConfigPayloadStaticConfigsInner `json:"staticConfigs"` - TlsConfig *CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig `json:"tlsConfig,omitempty"` + StaticConfigs UpdateScrapeConfigPayloadGetStaticConfigsAttributeType `json:"staticConfigs"` + TlsConfig UpdateScrapeConfigPayloadGetTlsConfigAttributeType `json:"tlsConfig,omitempty"` } type _UpdateScrapeConfigPayload UpdateScrapeConfigPayload @@ -56,17 +320,13 @@ type _UpdateScrapeConfigPayload UpdateScrapeConfigPayload // 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 { +func NewUpdateScrapeConfigPayload(metricsPath UpdateScrapeConfigPayloadGetMetricsPathArgType, scheme UpdateScrapeConfigPayloadGetSchemeArgType, scrapeInterval UpdateScrapeConfigPayloadGetScrapeIntervalArgType, scrapeTimeout UpdateScrapeConfigPayloadGetScrapeTimeoutArgType, staticConfigs UpdateScrapeConfigPayloadGetStaticConfigsArgType) *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 + setUpdateScrapeConfigPayloadGetMetricsPathAttributeType(&this.MetricsPath, metricsPath) + setUpdateScrapeConfigPayloadGetSchemeAttributeType(&this.Scheme, scheme) + setUpdateScrapeConfigPayloadGetScrapeIntervalAttributeType(&this.ScrapeInterval, scrapeInterval) + setUpdateScrapeConfigPayloadGetScrapeTimeoutAttributeType(&this.ScrapeTimeout, scrapeTimeout) + setUpdateScrapeConfigPayloadGetStaticConfigsAttributeType(&this.StaticConfigs, staticConfigs) return &this } @@ -85,411 +345,314 @@ func NewUpdateScrapeConfigPayloadWithDefaults() *UpdateScrapeConfigPayload { } // 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 +func (o *UpdateScrapeConfigPayload) GetBasicAuth() (res UpdateScrapeConfigPayloadGetBasicAuthRetType) { + res, _ = o.GetBasicAuthOk() + return } // 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 +func (o *UpdateScrapeConfigPayload) GetBasicAuthOk() (ret UpdateScrapeConfigPayloadGetBasicAuthRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetBasicAuthAttributeTypeOk(o.BasicAuth) } // 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 + _, ok := o.GetBasicAuthOk() + return ok } // SetBasicAuth gets a reference to the given CreateScrapeConfigPayloadBasicAuth and assigns it to the BasicAuth field. -func (o *UpdateScrapeConfigPayload) SetBasicAuth(v *CreateScrapeConfigPayloadBasicAuth) { - o.BasicAuth = v +func (o *UpdateScrapeConfigPayload) SetBasicAuth(v UpdateScrapeConfigPayloadGetBasicAuthRetType) { + setUpdateScrapeConfigPayloadGetBasicAuthAttributeType(&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 +func (o *UpdateScrapeConfigPayload) GetBearerToken() (res UpdateScrapeConfigPayloadGetBearerTokenRetType) { + res, _ = o.GetBearerTokenOk() + return } // 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 +func (o *UpdateScrapeConfigPayload) GetBearerTokenOk() (ret UpdateScrapeConfigPayloadGetBearerTokenRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetBearerTokenAttributeTypeOk(o.BearerToken) } // 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 + _, ok := o.GetBearerTokenOk() + return ok } // SetBearerToken gets a reference to the given string and assigns it to the BearerToken field. -func (o *UpdateScrapeConfigPayload) SetBearerToken(v *string) { - o.BearerToken = v +func (o *UpdateScrapeConfigPayload) SetBearerToken(v UpdateScrapeConfigPayloadGetBearerTokenRetType) { + setUpdateScrapeConfigPayloadGetBearerTokenAttributeType(&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 +func (o *UpdateScrapeConfigPayload) GetHonorLabels() (res UpdateScrapeConfigPayloadgetHonorLabelsRetType) { + res, _ = o.GetHonorLabelsOk() + return } // 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 +func (o *UpdateScrapeConfigPayload) GetHonorLabelsOk() (ret UpdateScrapeConfigPayloadgetHonorLabelsRetType, ok bool) { + return getUpdateScrapeConfigPayloadgetHonorLabelsAttributeTypeOk(o.HonorLabels) } // 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 + _, ok := o.GetHonorLabelsOk() + return ok } // SetHonorLabels gets a reference to the given bool and assigns it to the HonorLabels field. -func (o *UpdateScrapeConfigPayload) SetHonorLabels(v *bool) { - o.HonorLabels = v +func (o *UpdateScrapeConfigPayload) SetHonorLabels(v UpdateScrapeConfigPayloadgetHonorLabelsRetType) { + setUpdateScrapeConfigPayloadgetHonorLabelsAttributeType(&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 +func (o *UpdateScrapeConfigPayload) GetHonorTimeStamps() (res UpdateScrapeConfigPayloadgetHonorTimeStampsRetType) { + res, _ = o.GetHonorTimeStampsOk() + return } // 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 +func (o *UpdateScrapeConfigPayload) GetHonorTimeStampsOk() (ret UpdateScrapeConfigPayloadgetHonorTimeStampsRetType, ok bool) { + return getUpdateScrapeConfigPayloadgetHonorTimeStampsAttributeTypeOk(o.HonorTimeStamps) } // 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 + _, ok := o.GetHonorTimeStampsOk() + return ok } // SetHonorTimeStamps gets a reference to the given bool and assigns it to the HonorTimeStamps field. -func (o *UpdateScrapeConfigPayload) SetHonorTimeStamps(v *bool) { - o.HonorTimeStamps = v +func (o *UpdateScrapeConfigPayload) SetHonorTimeStamps(v UpdateScrapeConfigPayloadgetHonorTimeStampsRetType) { + setUpdateScrapeConfigPayloadgetHonorTimeStampsAttributeType(&o.HonorTimeStamps, v) } // GetMetricsPath returns the MetricsPath field value -func (o *UpdateScrapeConfigPayload) GetMetricsPath() *string { - if o == nil || IsNil(o.MetricsPath) { - var ret *string - return ret - } - - return o.MetricsPath +func (o *UpdateScrapeConfigPayload) GetMetricsPath() (ret UpdateScrapeConfigPayloadGetMetricsPathRetType) { + ret, _ = o.GetMetricsPathOk() + return ret } // 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 +func (o *UpdateScrapeConfigPayload) GetMetricsPathOk() (ret UpdateScrapeConfigPayloadGetMetricsPathRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetMetricsPathAttributeTypeOk(o.MetricsPath) } // SetMetricsPath sets field value -func (o *UpdateScrapeConfigPayload) SetMetricsPath(v *string) { - o.MetricsPath = v +func (o *UpdateScrapeConfigPayload) SetMetricsPath(v UpdateScrapeConfigPayloadGetMetricsPathRetType) { + setUpdateScrapeConfigPayloadGetMetricsPathAttributeType(&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 +func (o *UpdateScrapeConfigPayload) GetMetricsRelabelConfigs() (res UpdateScrapeConfigPayloadGetMetricsRelabelConfigsRetType) { + res, _ = o.GetMetricsRelabelConfigsOk() + return } // 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 +func (o *UpdateScrapeConfigPayload) GetMetricsRelabelConfigsOk() (ret UpdateScrapeConfigPayloadGetMetricsRelabelConfigsRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeTypeOk(o.MetricsRelabelConfigs) } // 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 + _, ok := o.GetMetricsRelabelConfigsOk() + return ok } // SetMetricsRelabelConfigs gets a reference to the given []CreateScrapeConfigPayloadMetricsRelabelConfigsInner and assigns it to the MetricsRelabelConfigs field. -func (o *UpdateScrapeConfigPayload) SetMetricsRelabelConfigs(v *[]CreateScrapeConfigPayloadMetricsRelabelConfigsInner) { - o.MetricsRelabelConfigs = v +func (o *UpdateScrapeConfigPayload) SetMetricsRelabelConfigs(v UpdateScrapeConfigPayloadGetMetricsRelabelConfigsRetType) { + setUpdateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeType(&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 +func (o *UpdateScrapeConfigPayload) GetParams() (res UpdateScrapeConfigPayloadGetParamsRetType) { + res, _ = o.GetParamsOk() + return } // 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 +func (o *UpdateScrapeConfigPayload) GetParamsOk() (ret UpdateScrapeConfigPayloadGetParamsRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetParamsAttributeTypeOk(o.Params) } // 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 + _, ok := o.GetParamsOk() + return ok } // 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 +func (o *UpdateScrapeConfigPayload) SetParams(v UpdateScrapeConfigPayloadGetParamsRetType) { + setUpdateScrapeConfigPayloadGetParamsAttributeType(&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 +func (o *UpdateScrapeConfigPayload) GetSampleLimit() (res UpdateScrapeConfigPayloadGetSampleLimitRetType) { + res, _ = o.GetSampleLimitOk() + return } // 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 +func (o *UpdateScrapeConfigPayload) GetSampleLimitOk() (ret UpdateScrapeConfigPayloadGetSampleLimitRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetSampleLimitAttributeTypeOk(o.SampleLimit) } // 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 + _, ok := o.GetSampleLimitOk() + return ok } // SetSampleLimit gets a reference to the given float64 and assigns it to the SampleLimit field. -func (o *UpdateScrapeConfigPayload) SetSampleLimit(v *float64) { - o.SampleLimit = v +func (o *UpdateScrapeConfigPayload) SetSampleLimit(v UpdateScrapeConfigPayloadGetSampleLimitRetType) { + setUpdateScrapeConfigPayloadGetSampleLimitAttributeType(&o.SampleLimit, v) } // GetScheme returns the Scheme field value -func (o *UpdateScrapeConfigPayload) GetScheme() *string { - if o == nil || IsNil(o.Scheme) { - var ret *string - return ret - } - - return o.Scheme +func (o *UpdateScrapeConfigPayload) GetScheme() (ret UpdateScrapeConfigPayloadGetSchemeRetType) { + ret, _ = o.GetSchemeOk() + return ret } // 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 +func (o *UpdateScrapeConfigPayload) GetSchemeOk() (ret UpdateScrapeConfigPayloadGetSchemeRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetSchemeAttributeTypeOk(o.Scheme) } // SetScheme sets field value -func (o *UpdateScrapeConfigPayload) SetScheme(v *string) { - o.Scheme = v +func (o *UpdateScrapeConfigPayload) SetScheme(v UpdateScrapeConfigPayloadGetSchemeRetType) { + setUpdateScrapeConfigPayloadGetSchemeAttributeType(&o.Scheme, v) } // GetScrapeInterval returns the ScrapeInterval field value -func (o *UpdateScrapeConfigPayload) GetScrapeInterval() *string { - if o == nil || IsNil(o.ScrapeInterval) { - var ret *string - return ret - } - - return o.ScrapeInterval +func (o *UpdateScrapeConfigPayload) GetScrapeInterval() (ret UpdateScrapeConfigPayloadGetScrapeIntervalRetType) { + ret, _ = o.GetScrapeIntervalOk() + return ret } // 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 +func (o *UpdateScrapeConfigPayload) GetScrapeIntervalOk() (ret UpdateScrapeConfigPayloadGetScrapeIntervalRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetScrapeIntervalAttributeTypeOk(o.ScrapeInterval) } // SetScrapeInterval sets field value -func (o *UpdateScrapeConfigPayload) SetScrapeInterval(v *string) { - o.ScrapeInterval = v +func (o *UpdateScrapeConfigPayload) SetScrapeInterval(v UpdateScrapeConfigPayloadGetScrapeIntervalRetType) { + setUpdateScrapeConfigPayloadGetScrapeIntervalAttributeType(&o.ScrapeInterval, v) } // GetScrapeTimeout returns the ScrapeTimeout field value -func (o *UpdateScrapeConfigPayload) GetScrapeTimeout() *string { - if o == nil || IsNil(o.ScrapeTimeout) { - var ret *string - return ret - } - - return o.ScrapeTimeout +func (o *UpdateScrapeConfigPayload) GetScrapeTimeout() (ret UpdateScrapeConfigPayloadGetScrapeTimeoutRetType) { + ret, _ = o.GetScrapeTimeoutOk() + return ret } // 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 +func (o *UpdateScrapeConfigPayload) GetScrapeTimeoutOk() (ret UpdateScrapeConfigPayloadGetScrapeTimeoutRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetScrapeTimeoutAttributeTypeOk(o.ScrapeTimeout) } // SetScrapeTimeout sets field value -func (o *UpdateScrapeConfigPayload) SetScrapeTimeout(v *string) { - o.ScrapeTimeout = v +func (o *UpdateScrapeConfigPayload) SetScrapeTimeout(v UpdateScrapeConfigPayloadGetScrapeTimeoutRetType) { + setUpdateScrapeConfigPayloadGetScrapeTimeoutAttributeType(&o.ScrapeTimeout, v) } // GetStaticConfigs returns the StaticConfigs field value -func (o *UpdateScrapeConfigPayload) GetStaticConfigs() *[]UpdateScrapeConfigPayloadStaticConfigsInner { - if o == nil || IsNil(o.StaticConfigs) { - var ret *[]UpdateScrapeConfigPayloadStaticConfigsInner - return ret - } - - return o.StaticConfigs +func (o *UpdateScrapeConfigPayload) GetStaticConfigs() (ret UpdateScrapeConfigPayloadGetStaticConfigsRetType) { + ret, _ = o.GetStaticConfigsOk() + return ret } // 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 +func (o *UpdateScrapeConfigPayload) GetStaticConfigsOk() (ret UpdateScrapeConfigPayloadGetStaticConfigsRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetStaticConfigsAttributeTypeOk(o.StaticConfigs) } // SetStaticConfigs sets field value -func (o *UpdateScrapeConfigPayload) SetStaticConfigs(v *[]UpdateScrapeConfigPayloadStaticConfigsInner) { - o.StaticConfigs = v +func (o *UpdateScrapeConfigPayload) SetStaticConfigs(v UpdateScrapeConfigPayloadGetStaticConfigsRetType) { + setUpdateScrapeConfigPayloadGetStaticConfigsAttributeType(&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 +func (o *UpdateScrapeConfigPayload) GetTlsConfig() (res UpdateScrapeConfigPayloadGetTlsConfigRetType) { + res, _ = o.GetTlsConfigOk() + return } // 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 +func (o *UpdateScrapeConfigPayload) GetTlsConfigOk() (ret UpdateScrapeConfigPayloadGetTlsConfigRetType, ok bool) { + return getUpdateScrapeConfigPayloadGetTlsConfigAttributeTypeOk(o.TlsConfig) } // 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 + _, ok := o.GetTlsConfigOk() + return ok } // 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) SetTlsConfig(v UpdateScrapeConfigPayloadGetTlsConfigRetType) { + setUpdateScrapeConfigPayloadGetTlsConfigAttributeType(&o.TlsConfig, v) } func (o UpdateScrapeConfigPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.BasicAuth) { - toSerialize["basicAuth"] = o.BasicAuth + if val, ok := getUpdateScrapeConfigPayloadGetBasicAuthAttributeTypeOk(o.BasicAuth); ok { + toSerialize["BasicAuth"] = val + } + if val, ok := getUpdateScrapeConfigPayloadGetBearerTokenAttributeTypeOk(o.BearerToken); ok { + toSerialize["BearerToken"] = val + } + if val, ok := getUpdateScrapeConfigPayloadgetHonorLabelsAttributeTypeOk(o.HonorLabels); ok { + toSerialize["HonorLabels"] = val + } + if val, ok := getUpdateScrapeConfigPayloadgetHonorTimeStampsAttributeTypeOk(o.HonorTimeStamps); ok { + toSerialize["HonorTimeStamps"] = val + } + if val, ok := getUpdateScrapeConfigPayloadGetMetricsPathAttributeTypeOk(o.MetricsPath); ok { + toSerialize["MetricsPath"] = val + } + if val, ok := getUpdateScrapeConfigPayloadGetMetricsRelabelConfigsAttributeTypeOk(o.MetricsRelabelConfigs); ok { + toSerialize["MetricsRelabelConfigs"] = val } - if !IsNil(o.BearerToken) { - toSerialize["bearerToken"] = o.BearerToken + if val, ok := getUpdateScrapeConfigPayloadGetParamsAttributeTypeOk(o.Params); ok { + toSerialize["Params"] = val } - if !IsNil(o.HonorLabels) { - toSerialize["honorLabels"] = o.HonorLabels + if val, ok := getUpdateScrapeConfigPayloadGetSampleLimitAttributeTypeOk(o.SampleLimit); ok { + toSerialize["SampleLimit"] = val } - if !IsNil(o.HonorTimeStamps) { - toSerialize["honorTimeStamps"] = o.HonorTimeStamps + if val, ok := getUpdateScrapeConfigPayloadGetSchemeAttributeTypeOk(o.Scheme); ok { + toSerialize["Scheme"] = val } - toSerialize["metricsPath"] = o.MetricsPath - if !IsNil(o.MetricsRelabelConfigs) { - toSerialize["metricsRelabelConfigs"] = o.MetricsRelabelConfigs + if val, ok := getUpdateScrapeConfigPayloadGetScrapeIntervalAttributeTypeOk(o.ScrapeInterval); ok { + toSerialize["ScrapeInterval"] = val } - if !IsNil(o.Params) { - toSerialize["params"] = o.Params + if val, ok := getUpdateScrapeConfigPayloadGetScrapeTimeoutAttributeTypeOk(o.ScrapeTimeout); ok { + toSerialize["ScrapeTimeout"] = val } - if !IsNil(o.SampleLimit) { - toSerialize["sampleLimit"] = o.SampleLimit + if val, ok := getUpdateScrapeConfigPayloadGetStaticConfigsAttributeTypeOk(o.StaticConfigs); ok { + toSerialize["StaticConfigs"] = val } - toSerialize["scheme"] = o.Scheme - toSerialize["scrapeInterval"] = o.ScrapeInterval - toSerialize["scrapeTimeout"] = o.ScrapeTimeout - toSerialize["staticConfigs"] = o.StaticConfigs - if !IsNil(o.TlsConfig) { - toSerialize["tlsConfig"] = o.TlsConfig + if val, ok := getUpdateScrapeConfigPayloadGetTlsConfigAttributeTypeOk(o.TlsConfig); ok { + toSerialize["TlsConfig"] = val } return toSerialize, nil } 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 969fb1847..7ea3d679d 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 @@ -17,13 +17,53 @@ import ( // checks if the UpdateScrapeConfigPayloadStaticConfigsInner type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateScrapeConfigPayloadStaticConfigsInner{} +/* + types and functions for labels +*/ + +// isFreeform +type UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType = *map[string]interface{} +type UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsArgType = map[string]interface{} +type UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType = map[string]interface{} + +func getUpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeTypeOk(arg UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType) (ret UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType(arg *UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType, val UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType) { + *arg = &val +} + +/* + types and functions for targets +*/ + +// isArray +type UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType = *[]string +type UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsArgType = []string +type UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType = []string + +func getUpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeTypeOk(arg UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType) (ret UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType(arg *UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType, val UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType) { + *arg = &val +} + // 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 - Labels *map[string]interface{} `json:"labels,omitempty"` + Labels UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType `json:"labels,omitempty"` // The targets specified by the static config. // REQUIRED - Targets *[]string `json:"targets"` + Targets UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType `json:"targets"` } type _UpdateScrapeConfigPayloadStaticConfigsInner UpdateScrapeConfigPayloadStaticConfigsInner @@ -32,9 +72,9 @@ type _UpdateScrapeConfigPayloadStaticConfigsInner UpdateScrapeConfigPayloadStati // 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 { +func NewUpdateScrapeConfigPayloadStaticConfigsInner(targets UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsArgType) *UpdateScrapeConfigPayloadStaticConfigsInner { this := UpdateScrapeConfigPayloadStaticConfigsInner{} - this.Targets = targets + setUpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType(&this.Targets, targets) return &this } @@ -47,67 +87,53 @@ func NewUpdateScrapeConfigPayloadStaticConfigsInnerWithDefaults() *UpdateScrapeC } // 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 +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) GetLabels() (res UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return } // 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 +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) GetLabelsOk() (ret UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType, ok bool) { + return getUpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeTypeOk(o.Labels) } // 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 + _, ok := o.GetLabelsOk() + return ok } // 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 +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) SetLabels(v UpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsRetType) { + setUpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeType(&o.Labels, v) } // GetTargets returns the Targets field value -func (o *UpdateScrapeConfigPayloadStaticConfigsInner) GetTargets() *[]string { - if o == nil || IsNil(o.Targets) { - var ret *[]string - return ret - } - - return o.Targets +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) GetTargets() (ret UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType) { + ret, _ = o.GetTargetsOk() + return ret } // 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 +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) GetTargetsOk() (ret UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType, ok bool) { + return getUpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeTypeOk(o.Targets) } // SetTargets sets field value -func (o *UpdateScrapeConfigPayloadStaticConfigsInner) SetTargets(v *[]string) { - o.Targets = v +func (o *UpdateScrapeConfigPayloadStaticConfigsInner) SetTargets(v UpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsRetType) { + setUpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeType(&o.Targets, v) } func (o UpdateScrapeConfigPayloadStaticConfigsInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels + if val, ok := getUpdateScrapeConfigPayloadStaticConfigsInnerGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } + if val, ok := getUpdateScrapeConfigPayloadStaticConfigsInnerGetTargetsAttributeTypeOk(o.Targets); ok { + toSerialize["Targets"] = val } - toSerialize["targets"] = o.Targets return toSerialize, nil } diff --git a/services/observability/model_web_hook.go b/services/observability/model_web_hook.go index b71926961..b1d7b67c3 100644 --- a/services/observability/model_web_hook.go +++ b/services/observability/model_web_hook.go @@ -17,12 +17,73 @@ import ( // checks if the WebHook type satisfies the MappedNullable interface at compile time var _ MappedNullable = &WebHook{} +/* + types and functions for msTeams +*/ + +// isBoolean +type WebHookgetMsTeamsAttributeType = *bool +type WebHookgetMsTeamsArgType = bool +type WebHookgetMsTeamsRetType = bool + +func getWebHookgetMsTeamsAttributeTypeOk(arg WebHookgetMsTeamsAttributeType) (ret WebHookgetMsTeamsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWebHookgetMsTeamsAttributeType(arg *WebHookgetMsTeamsAttributeType, val WebHookgetMsTeamsRetType) { + *arg = &val +} + +/* + types and functions for sendResolved +*/ + +// isBoolean +type WebHookgetSendResolvedAttributeType = *bool +type WebHookgetSendResolvedArgType = bool +type WebHookgetSendResolvedRetType = bool + +func getWebHookgetSendResolvedAttributeTypeOk(arg WebHookgetSendResolvedAttributeType) (ret WebHookgetSendResolvedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWebHookgetSendResolvedAttributeType(arg *WebHookgetSendResolvedAttributeType, val WebHookgetSendResolvedRetType) { + *arg = &val +} + +/* + types and functions for url +*/ + +// isNotNullableString +type WebHookGetUrlAttributeType = *string + +func getWebHookGetUrlAttributeTypeOk(arg WebHookGetUrlAttributeType) (ret WebHookGetUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWebHookGetUrlAttributeType(arg *WebHookGetUrlAttributeType, val WebHookGetUrlRetType) { + *arg = &val +} + +type WebHookGetUrlArgType = string +type WebHookGetUrlRetType = string + // WebHook struct for WebHook type WebHook struct { - MsTeams *bool `json:"msTeams,omitempty"` - SendResolved *bool `json:"sendResolved,omitempty"` + MsTeams WebHookgetMsTeamsAttributeType `json:"msTeams,omitempty"` + SendResolved WebHookgetSendResolvedAttributeType `json:"sendResolved,omitempty"` // REQUIRED - Url *string `json:"url"` + Url WebHookGetUrlAttributeType `json:"url"` } type _WebHook WebHook @@ -31,13 +92,9 @@ type _WebHook WebHook // 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 { +func NewWebHook(url WebHookGetUrlArgType) *WebHook { this := WebHook{} - var msTeams bool = false - this.MsTeams = &msTeams - var sendResolved bool = true - this.SendResolved = &sendResolved - this.Url = url + setWebHookGetUrlAttributeType(&this.Url, url) return &this } @@ -54,102 +111,79 @@ func NewWebHookWithDefaults() *WebHook { } // 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 +func (o *WebHook) GetMsTeams() (res WebHookgetMsTeamsRetType) { + res, _ = o.GetMsTeamsOk() + return } // 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 +func (o *WebHook) GetMsTeamsOk() (ret WebHookgetMsTeamsRetType, ok bool) { + return getWebHookgetMsTeamsAttributeTypeOk(o.MsTeams) } // 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 + _, ok := o.GetMsTeamsOk() + return ok } // SetMsTeams gets a reference to the given bool and assigns it to the MsTeams field. -func (o *WebHook) SetMsTeams(v *bool) { - o.MsTeams = v +func (o *WebHook) SetMsTeams(v WebHookgetMsTeamsRetType) { + setWebHookgetMsTeamsAttributeType(&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 +func (o *WebHook) GetSendResolved() (res WebHookgetSendResolvedRetType) { + res, _ = o.GetSendResolvedOk() + return } // 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 +func (o *WebHook) GetSendResolvedOk() (ret WebHookgetSendResolvedRetType, ok bool) { + return getWebHookgetSendResolvedAttributeTypeOk(o.SendResolved) } // 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 + _, ok := o.GetSendResolvedOk() + return ok } // SetSendResolved gets a reference to the given bool and assigns it to the SendResolved field. -func (o *WebHook) SetSendResolved(v *bool) { - o.SendResolved = v +func (o *WebHook) SetSendResolved(v WebHookgetSendResolvedRetType) { + setWebHookgetSendResolvedAttributeType(&o.SendResolved, v) } // GetUrl returns the Url field value -func (o *WebHook) GetUrl() *string { - if o == nil || IsNil(o.Url) { - var ret *string - return ret - } - - return o.Url +func (o *WebHook) GetUrl() (ret WebHookGetUrlRetType) { + ret, _ = o.GetUrlOk() + return ret } // 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 +func (o *WebHook) GetUrlOk() (ret WebHookGetUrlRetType, ok bool) { + return getWebHookGetUrlAttributeTypeOk(o.Url) } // SetUrl sets field value -func (o *WebHook) SetUrl(v *string) { - o.Url = v +func (o *WebHook) SetUrl(v WebHookGetUrlRetType) { + setWebHookGetUrlAttributeType(&o.Url, v) } func (o WebHook) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.MsTeams) { - toSerialize["msTeams"] = o.MsTeams + if val, ok := getWebHookgetMsTeamsAttributeTypeOk(o.MsTeams); ok { + toSerialize["MsTeams"] = val + } + if val, ok := getWebHookgetSendResolvedAttributeTypeOk(o.SendResolved); ok { + toSerialize["SendResolved"] = val } - if !IsNil(o.SendResolved) { - toSerialize["sendResolved"] = o.SendResolved + if val, ok := getWebHookGetUrlAttributeTypeOk(o.Url); ok { + toSerialize["Url"] = val } - toSerialize["url"] = o.Url return toSerialize, nil } diff --git a/services/observability/utils.go b/services/observability/utils.go index 503faf030..6b589c9b5 100644 --- a/services/observability/utils.go +++ b/services/observability/utils.go @@ -40,6 +40,29 @@ func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. func PtrTime(v time.Time) *time.Time { return &v } +type NullableValue[T any] struct { + value *T + isSet bool +} + +func (v NullableValue[T]) Get() *T { + return v.value +} + +func (v *NullableValue[T]) Set(val *T) { + v.value = val + v.isSet = true +} + +func (v NullableValue[T]) IsSet() bool { + return v.isSet +} + +func (v *NullableValue[T]) Unset() { + v.value = nil + v.isSet = false +} + type NullableBool struct { value *bool isSet bool @@ -333,6 +356,9 @@ func IsNil(i interface{}) bool { if i == nil { return true } + if t, ok := i.(interface{ IsSet() bool }); ok { + return !t.IsSet() + } switch reflect.TypeOf(i).Kind() { case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: return reflect.ValueOf(i).IsNil()