diff --git a/services/logme/api_default_test.go b/services/logme/api_default_test.go index 3a1ba9715..1d55d9b3e 100644 --- a/services/logme/api_default_test.go +++ b/services/logme/api_default_test.go @@ -24,14 +24,14 @@ import ( func Test_logme_DefaultApiService(t *testing.T) { t.Run("Test DefaultApiService CreateBackup", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/backups" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/backups" 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 := []CreateBackupResponseItem{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -65,28 +65,28 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.CreateBackup(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 CreateCredentials", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/credentials" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/credentials" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -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 := CredentialsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -120,26 +120,26 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - instanceId := "instanceId" + projectId := projectIdValue + instanceId := instanceIdValue resp, reqErr := apiClient.CreateCredentials(context.Background(), projectId, instanceId).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) @@ -173,7 +173,7 @@ func Test_logme_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() @@ -181,22 +181,22 @@ func Test_logme_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 DeleteCredentials", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{credentialsId}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{credentialsId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) credentialsIdValue := "credentialsId" - path = strings.Replace(path, "{"+"credentialsId"+"}", url.PathEscape(ParameterValueToString(credentialsIdValue, "credentialsId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsId"+"}", url.PathEscape(ParameterValueToString(credentialsIdValue, "credentialsId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { }) testServer := httptest.NewServer(testDefaultApiServeMux) defer testServer.Close() @@ -227,9 +227,9 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - instanceId := "instanceId" - credentialsId := "credentialsId" + projectId := projectIdValue + instanceId := instanceIdValue + credentialsId := credentialsIdValue reqErr := apiClient.DeleteCredentials(context.Background(), projectId, instanceId, credentialsId).Execute() @@ -239,14 +239,14 @@ func Test_logme_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService DeleteInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { }) testServer := httptest.NewServer(testDefaultApiServeMux) defer testServer.Close() @@ -277,8 +277,8 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - instanceId := "instanceId" + projectId := projectIdValue + instanceId := instanceIdValue reqErr := apiClient.DeleteInstance(context.Background(), projectId, instanceId).Execute() @@ -288,16 +288,16 @@ func Test_logme_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService DownloadBackup", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/backups/{backupId}/download" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/backups/{backupId}/download" backupIdValue := int32(123) - path = strings.Replace(path, "{"+"backupId"+"}", url.PathEscape(ParameterValueToString(backupIdValue, "backupId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"backupId"+"}", url.PathEscape(ParameterValueToString(backupIdValue, "backupId")), -1) 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) { w.Header().Add("Content-Type", "application/octet-stream") binaryData := []byte{0x42, 0x69} // Example binary data w.Write(binaryData) @@ -331,31 +331,31 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - backupId := int32(123) - instanceId := "instanceId" - projectId := "projectId" + backupId := backupIdValue + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.DownloadBackup(context.Background(), backupId, 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/{credentialsId}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/credentials/{credentialsId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) credentialsIdValue := "credentialsId" - path = strings.Replace(path, "{"+"credentialsId"+"}", url.PathEscape(ParameterValueToString(credentialsIdValue, "credentialsId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsId"+"}", url.PathEscape(ParameterValueToString(credentialsIdValue, "credentialsId")), -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 := CredentialsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -389,29 +389,29 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - instanceId := "instanceId" - credentialsId := "credentialsId" + projectId := projectIdValue + instanceId := instanceIdValue + credentialsId := credentialsIdValue resp, reqErr := apiClient.GetCredentials(context.Background(), projectId, instanceId, credentialsId).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}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -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 := Instance{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -445,28 +445,28 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - instanceId := "instanceId" + projectId := projectIdValue + instanceId := instanceIdValue resp, reqErr := apiClient.GetInstance(context.Background(), projectId, instanceId).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 GetMetrics", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/metrics" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/metrics" 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 := GetMetricsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -500,28 +500,28 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.GetMetrics(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 ListBackups", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/backups" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/backups" 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 := ListBackupsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -555,28 +555,28 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.ListBackups(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" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -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) @@ -610,26 +610,26 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - instanceId := "instanceId" + projectId := projectIdValue + instanceId := instanceIdValue resp, reqErr := apiClient.ListCredentials(context.Background(), projectId, instanceId).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) @@ -663,25 +663,25 @@ func Test_logme_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 ListOfferings", func(t *testing.T) { - path := "/v1/projects/{projectId}/offerings" + _apiUrlPath := "/v1/projects/{projectId}/offerings" 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 := ListOfferingsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -715,27 +715,27 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.ListOfferings(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 ListRestores", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/restores" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/restores" 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 := ListRestoresResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -769,28 +769,28 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.ListRestores(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 PartialUpdateInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId" - path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { }) testServer := httptest.NewServer(testDefaultApiServeMux) defer testServer.Close() @@ -821,8 +821,8 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - instanceId := "instanceId" + projectId := projectIdValue + instanceId := instanceIdValue partialUpdateInstancePayload := PartialUpdateInstancePayload{} reqErr := apiClient.PartialUpdateInstance(context.Background(), projectId, instanceId).PartialUpdateInstancePayload(partialUpdateInstancePayload).Execute() @@ -833,14 +833,14 @@ func Test_logme_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService TriggerRecreate", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/recreate" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/recreate" 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 := CreateInstanceResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -874,28 +874,28 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.TriggerRecreate(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 TriggerRestart", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/restart" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/restart" 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 := CreateInstanceResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -929,30 +929,30 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue resp, reqErr := apiClient.TriggerRestart(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 TriggerRestore", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/backups/{backupId}/restore" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/backups/{backupId}/restore" 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) backupIdValue := int32(123) - path = strings.Replace(path, "{"+"backupId"+"}", url.PathEscape(ParameterValueToString(backupIdValue, "backupId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"backupId"+"}", url.PathEscape(ParameterValueToString(backupIdValue, "backupId")), -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 := TriggerRestoreResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -986,29 +986,29 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" - backupId := int32(123) + instanceId := instanceIdValue + projectId := projectIdValue + backupId := backupIdValue resp, reqErr := apiClient.TriggerRestore(context.Background(), instanceId, projectId, backupId).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 UpdateBackupsConfig", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/backups-config" + _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/backups-config" 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 := UpdateBackupsConfigResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1042,8 +1042,8 @@ func Test_logme_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - instanceId := "instanceId" - projectId := "projectId" + instanceId := instanceIdValue + projectId := projectIdValue updateBackupsConfigPayload := UpdateBackupsConfigPayload{} resp, reqErr := apiClient.UpdateBackupsConfig(context.Background(), instanceId, projectId).UpdateBackupsConfigPayload(updateBackupsConfigPayload).Execute() @@ -1051,7 +1051,7 @@ func Test_logme_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/logme/model_backup.go b/services/logme/model_backup.go index 27049ff32..ed1bcba1a 100644 --- a/services/logme/model_backup.go +++ b/services/logme/model_backup.go @@ -17,17 +17,140 @@ import ( // checks if the Backup type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Backup{} +/* + types and functions for downloadable +*/ + +// isBoolean +type BackupgetDownloadableAttributeType = *bool +type BackupgetDownloadableArgType = bool +type BackupgetDownloadableRetType = bool + +func getBackupgetDownloadableAttributeTypeOk(arg BackupgetDownloadableAttributeType) (ret BackupgetDownloadableRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBackupgetDownloadableAttributeType(arg *BackupgetDownloadableAttributeType, val BackupgetDownloadableRetType) { + *arg = &val +} + +/* + types and functions for finished_at +*/ + +// isNotNullableString +type BackupGetFinishedAtAttributeType = *string + +func getBackupGetFinishedAtAttributeTypeOk(arg BackupGetFinishedAtAttributeType) (ret BackupGetFinishedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBackupGetFinishedAtAttributeType(arg *BackupGetFinishedAtAttributeType, val BackupGetFinishedAtRetType) { + *arg = &val +} + +type BackupGetFinishedAtArgType = string +type BackupGetFinishedAtRetType = string + +/* + types and functions for id +*/ + +// isInteger +type BackupGetIdAttributeType = *int64 +type BackupGetIdArgType = int64 +type BackupGetIdRetType = int64 + +func getBackupGetIdAttributeTypeOk(arg BackupGetIdAttributeType) (ret BackupGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBackupGetIdAttributeType(arg *BackupGetIdAttributeType, val BackupGetIdRetType) { + *arg = &val +} + +/* + types and functions for size +*/ + +// isInteger +type BackupGetSizeAttributeType = *int64 +type BackupGetSizeArgType = int64 +type BackupGetSizeRetType = int64 + +func getBackupGetSizeAttributeTypeOk(arg BackupGetSizeAttributeType) (ret BackupGetSizeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBackupGetSizeAttributeType(arg *BackupGetSizeAttributeType, val BackupGetSizeRetType) { + *arg = &val +} + +/* + types and functions for status +*/ + +// isNotNullableString +type BackupGetStatusAttributeType = *string + +func getBackupGetStatusAttributeTypeOk(arg BackupGetStatusAttributeType) (ret BackupGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBackupGetStatusAttributeType(arg *BackupGetStatusAttributeType, val BackupGetStatusRetType) { + *arg = &val +} + +type BackupGetStatusArgType = string +type BackupGetStatusRetType = string + +/* + types and functions for triggered_at +*/ + +// isNotNullableString +type BackupGetTriggeredAtAttributeType = *string + +func getBackupGetTriggeredAtAttributeTypeOk(arg BackupGetTriggeredAtAttributeType) (ret BackupGetTriggeredAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBackupGetTriggeredAtAttributeType(arg *BackupGetTriggeredAtAttributeType, val BackupGetTriggeredAtRetType) { + *arg = &val +} + +type BackupGetTriggeredAtArgType = string +type BackupGetTriggeredAtRetType = string + // Backup struct for Backup type Backup struct { - Downloadable *bool `json:"downloadable,omitempty"` + Downloadable BackupgetDownloadableAttributeType `json:"downloadable,omitempty"` // REQUIRED - FinishedAt *string `json:"finished_at"` + FinishedAt BackupGetFinishedAtAttributeType `json:"finished_at"` // REQUIRED - Id *int64 `json:"id"` - Size *int64 `json:"size,omitempty"` + Id BackupGetIdAttributeType `json:"id"` + Size BackupGetSizeAttributeType `json:"size,omitempty"` // REQUIRED - Status *string `json:"status"` - TriggeredAt *string `json:"triggered_at,omitempty"` + Status BackupGetStatusAttributeType `json:"status"` + TriggeredAt BackupGetTriggeredAtAttributeType `json:"triggered_at,omitempty"` } type _Backup Backup @@ -36,11 +159,11 @@ type _Backup Backup // 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 NewBackup(finishedAt *string, id *int64, status *string) *Backup { +func NewBackup(finishedAt BackupGetFinishedAtArgType, id BackupGetIdArgType, status BackupGetStatusArgType) *Backup { this := Backup{} - this.FinishedAt = finishedAt - this.Id = id - this.Status = status + setBackupGetFinishedAtAttributeType(&this.FinishedAt, finishedAt) + setBackupGetIdAttributeType(&this.Id, id) + setBackupGetStatusAttributeType(&this.Status, status) return &this } @@ -53,186 +176,144 @@ func NewBackupWithDefaults() *Backup { } // GetDownloadable returns the Downloadable field value if set, zero value otherwise. -func (o *Backup) GetDownloadable() *bool { - if o == nil || IsNil(o.Downloadable) { - var ret *bool - return ret - } - return o.Downloadable +func (o *Backup) GetDownloadable() (res BackupgetDownloadableRetType) { + res, _ = o.GetDownloadableOk() + return } // GetDownloadableOk returns a tuple with the Downloadable field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Backup) GetDownloadableOk() (*bool, bool) { - if o == nil || IsNil(o.Downloadable) { - return nil, false - } - return o.Downloadable, true +func (o *Backup) GetDownloadableOk() (ret BackupgetDownloadableRetType, ok bool) { + return getBackupgetDownloadableAttributeTypeOk(o.Downloadable) } // HasDownloadable returns a boolean if a field has been set. func (o *Backup) HasDownloadable() bool { - if o != nil && !IsNil(o.Downloadable) { - return true - } - - return false + _, ok := o.GetDownloadableOk() + return ok } // SetDownloadable gets a reference to the given bool and assigns it to the Downloadable field. -func (o *Backup) SetDownloadable(v *bool) { - o.Downloadable = v +func (o *Backup) SetDownloadable(v BackupgetDownloadableRetType) { + setBackupgetDownloadableAttributeType(&o.Downloadable, v) } // GetFinishedAt returns the FinishedAt field value -func (o *Backup) GetFinishedAt() *string { - if o == nil || IsNil(o.FinishedAt) { - var ret *string - return ret - } - - return o.FinishedAt +func (o *Backup) GetFinishedAt() (ret BackupGetFinishedAtRetType) { + ret, _ = o.GetFinishedAtOk() + return ret } // GetFinishedAtOk returns a tuple with the FinishedAt field value // and a boolean to check if the value has been set. -func (o *Backup) GetFinishedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FinishedAt, true +func (o *Backup) GetFinishedAtOk() (ret BackupGetFinishedAtRetType, ok bool) { + return getBackupGetFinishedAtAttributeTypeOk(o.FinishedAt) } // SetFinishedAt sets field value -func (o *Backup) SetFinishedAt(v *string) { - o.FinishedAt = v +func (o *Backup) SetFinishedAt(v BackupGetFinishedAtRetType) { + setBackupGetFinishedAtAttributeType(&o.FinishedAt, v) } // GetId returns the Id field value -func (o *Backup) GetId() *int64 { - if o == nil || IsNil(o.Id) { - var ret *int64 - return ret - } - - return o.Id +func (o *Backup) GetId() (ret BackupGetIdRetType) { + 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 *Backup) GetIdOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Id, true +func (o *Backup) GetIdOk() (ret BackupGetIdRetType, ok bool) { + return getBackupGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *Backup) SetId(v *int64) { - o.Id = v +func (o *Backup) SetId(v BackupGetIdRetType) { + setBackupGetIdAttributeType(&o.Id, v) } // GetSize returns the Size field value if set, zero value otherwise. -func (o *Backup) GetSize() *int64 { - if o == nil || IsNil(o.Size) { - var ret *int64 - return ret - } - return o.Size +func (o *Backup) GetSize() (res BackupGetSizeRetType) { + res, _ = o.GetSizeOk() + return } // GetSizeOk returns a tuple with the Size field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Backup) GetSizeOk() (*int64, bool) { - if o == nil || IsNil(o.Size) { - return nil, false - } - return o.Size, true +func (o *Backup) GetSizeOk() (ret BackupGetSizeRetType, ok bool) { + return getBackupGetSizeAttributeTypeOk(o.Size) } // HasSize returns a boolean if a field has been set. func (o *Backup) HasSize() bool { - if o != nil && !IsNil(o.Size) { - return true - } - - return false + _, ok := o.GetSizeOk() + return ok } // SetSize gets a reference to the given int64 and assigns it to the Size field. -func (o *Backup) SetSize(v *int64) { - o.Size = v +func (o *Backup) SetSize(v BackupGetSizeRetType) { + setBackupGetSizeAttributeType(&o.Size, v) } // GetStatus returns the Status field value -func (o *Backup) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - - return o.Status +func (o *Backup) GetStatus() (ret BackupGetStatusRetType) { + 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 *Backup) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Status, true +func (o *Backup) GetStatusOk() (ret BackupGetStatusRetType, ok bool) { + return getBackupGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value -func (o *Backup) SetStatus(v *string) { - o.Status = v +func (o *Backup) SetStatus(v BackupGetStatusRetType) { + setBackupGetStatusAttributeType(&o.Status, v) } // GetTriggeredAt returns the TriggeredAt field value if set, zero value otherwise. -func (o *Backup) GetTriggeredAt() *string { - if o == nil || IsNil(o.TriggeredAt) { - var ret *string - return ret - } - return o.TriggeredAt +func (o *Backup) GetTriggeredAt() (res BackupGetTriggeredAtRetType) { + res, _ = o.GetTriggeredAtOk() + return } // GetTriggeredAtOk returns a tuple with the TriggeredAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Backup) GetTriggeredAtOk() (*string, bool) { - if o == nil || IsNil(o.TriggeredAt) { - return nil, false - } - return o.TriggeredAt, true +func (o *Backup) GetTriggeredAtOk() (ret BackupGetTriggeredAtRetType, ok bool) { + return getBackupGetTriggeredAtAttributeTypeOk(o.TriggeredAt) } // HasTriggeredAt returns a boolean if a field has been set. func (o *Backup) HasTriggeredAt() bool { - if o != nil && !IsNil(o.TriggeredAt) { - return true - } - - return false + _, ok := o.GetTriggeredAtOk() + return ok } // SetTriggeredAt gets a reference to the given string and assigns it to the TriggeredAt field. -func (o *Backup) SetTriggeredAt(v *string) { - o.TriggeredAt = v +func (o *Backup) SetTriggeredAt(v BackupGetTriggeredAtRetType) { + setBackupGetTriggeredAtAttributeType(&o.TriggeredAt, v) } func (o Backup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Downloadable) { - toSerialize["downloadable"] = o.Downloadable + if val, ok := getBackupgetDownloadableAttributeTypeOk(o.Downloadable); ok { + toSerialize["Downloadable"] = val + } + if val, ok := getBackupGetFinishedAtAttributeTypeOk(o.FinishedAt); ok { + toSerialize["FinishedAt"] = val + } + if val, ok := getBackupGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getBackupGetSizeAttributeTypeOk(o.Size); ok { + toSerialize["Size"] = val } - toSerialize["finished_at"] = o.FinishedAt - toSerialize["id"] = o.Id - if !IsNil(o.Size) { - toSerialize["size"] = o.Size + if val, ok := getBackupGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val } - toSerialize["status"] = o.Status - if !IsNil(o.TriggeredAt) { - toSerialize["triggered_at"] = o.TriggeredAt + if val, ok := getBackupGetTriggeredAtAttributeTypeOk(o.TriggeredAt); ok { + toSerialize["TriggeredAt"] = val } return toSerialize, nil } diff --git a/services/logme/model_create_backup_response_item.go b/services/logme/model_create_backup_response_item.go index fc22b5795..0bc91e800 100644 --- a/services/logme/model_create_backup_response_item.go +++ b/services/logme/model_create_backup_response_item.go @@ -17,12 +17,53 @@ import ( // checks if the CreateBackupResponseItem type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateBackupResponseItem{} +/* + types and functions for id +*/ + +// isInteger +type CreateBackupResponseItemGetIdAttributeType = *int64 +type CreateBackupResponseItemGetIdArgType = int64 +type CreateBackupResponseItemGetIdRetType = int64 + +func getCreateBackupResponseItemGetIdAttributeTypeOk(arg CreateBackupResponseItemGetIdAttributeType) (ret CreateBackupResponseItemGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateBackupResponseItemGetIdAttributeType(arg *CreateBackupResponseItemGetIdAttributeType, val CreateBackupResponseItemGetIdRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type CreateBackupResponseItemGetMessageAttributeType = *string + +func getCreateBackupResponseItemGetMessageAttributeTypeOk(arg CreateBackupResponseItemGetMessageAttributeType) (ret CreateBackupResponseItemGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateBackupResponseItemGetMessageAttributeType(arg *CreateBackupResponseItemGetMessageAttributeType, val CreateBackupResponseItemGetMessageRetType) { + *arg = &val +} + +type CreateBackupResponseItemGetMessageArgType = string +type CreateBackupResponseItemGetMessageRetType = string + // CreateBackupResponseItem struct for CreateBackupResponseItem type CreateBackupResponseItem struct { // REQUIRED - Id *int64 `json:"id"` + Id CreateBackupResponseItemGetIdAttributeType `json:"id"` // REQUIRED - Message *string `json:"message"` + Message CreateBackupResponseItemGetMessageAttributeType `json:"message"` } type _CreateBackupResponseItem CreateBackupResponseItem @@ -31,10 +72,10 @@ type _CreateBackupResponseItem CreateBackupResponseItem // 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 NewCreateBackupResponseItem(id *int64, message *string) *CreateBackupResponseItem { +func NewCreateBackupResponseItem(id CreateBackupResponseItemGetIdArgType, message CreateBackupResponseItemGetMessageArgType) *CreateBackupResponseItem { this := CreateBackupResponseItem{} - this.Id = id - this.Message = message + setCreateBackupResponseItemGetIdAttributeType(&this.Id, id) + setCreateBackupResponseItemGetMessageAttributeType(&this.Message, message) return &this } @@ -47,57 +88,47 @@ func NewCreateBackupResponseItemWithDefaults() *CreateBackupResponseItem { } // GetId returns the Id field value -func (o *CreateBackupResponseItem) GetId() *int64 { - if o == nil || IsNil(o.Id) { - var ret *int64 - return ret - } - - return o.Id +func (o *CreateBackupResponseItem) GetId() (ret CreateBackupResponseItemGetIdRetType) { + 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 *CreateBackupResponseItem) GetIdOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Id, true +func (o *CreateBackupResponseItem) GetIdOk() (ret CreateBackupResponseItemGetIdRetType, ok bool) { + return getCreateBackupResponseItemGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *CreateBackupResponseItem) SetId(v *int64) { - o.Id = v +func (o *CreateBackupResponseItem) SetId(v CreateBackupResponseItemGetIdRetType) { + setCreateBackupResponseItemGetIdAttributeType(&o.Id, v) } // GetMessage returns the Message field value -func (o *CreateBackupResponseItem) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *CreateBackupResponseItem) GetMessage() (ret CreateBackupResponseItemGetMessageRetType) { + 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 *CreateBackupResponseItem) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Message, true +func (o *CreateBackupResponseItem) GetMessageOk() (ret CreateBackupResponseItemGetMessageRetType, ok bool) { + return getCreateBackupResponseItemGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *CreateBackupResponseItem) SetMessage(v *string) { - o.Message = v +func (o *CreateBackupResponseItem) SetMessage(v CreateBackupResponseItemGetMessageRetType) { + setCreateBackupResponseItemGetMessageAttributeType(&o.Message, v) } func (o CreateBackupResponseItem) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["message"] = o.Message + if val, ok := getCreateBackupResponseItemGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getCreateBackupResponseItemGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/logme/model_create_instance_payload.go b/services/logme/model_create_instance_payload.go index 9e9f8d708..a21c040a8 100644 --- a/services/logme/model_create_instance_payload.go +++ b/services/logme/model_create_instance_payload.go @@ -17,13 +17,75 @@ import ( // checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateInstancePayload{} +/* + types and functions for instanceName +*/ + +// isNotNullableString +type CreateInstancePayloadGetInstanceNameAttributeType = *string + +func getCreateInstancePayloadGetInstanceNameAttributeTypeOk(arg CreateInstancePayloadGetInstanceNameAttributeType) (ret CreateInstancePayloadGetInstanceNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstancePayloadGetInstanceNameAttributeType(arg *CreateInstancePayloadGetInstanceNameAttributeType, val CreateInstancePayloadGetInstanceNameRetType) { + *arg = &val +} + +type CreateInstancePayloadGetInstanceNameArgType = string +type CreateInstancePayloadGetInstanceNameRetType = string + +/* + types and functions for parameters +*/ + +// isModel +type CreateInstancePayloadGetParametersAttributeType = *InstanceParameters +type CreateInstancePayloadGetParametersArgType = InstanceParameters +type CreateInstancePayloadGetParametersRetType = InstanceParameters + +func getCreateInstancePayloadGetParametersAttributeTypeOk(arg CreateInstancePayloadGetParametersAttributeType) (ret CreateInstancePayloadGetParametersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstancePayloadGetParametersAttributeType(arg *CreateInstancePayloadGetParametersAttributeType, val CreateInstancePayloadGetParametersRetType) { + *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 struct for CreateInstancePayload type CreateInstancePayload struct { // REQUIRED - InstanceName *string `json:"instanceName"` - Parameters *InstanceParameters `json:"parameters,omitempty"` + InstanceName CreateInstancePayloadGetInstanceNameAttributeType `json:"instanceName"` + Parameters CreateInstancePayloadGetParametersAttributeType `json:"parameters,omitempty"` // REQUIRED - PlanId *string `json:"planId"` + PlanId CreateInstancePayloadGetPlanIdAttributeType `json:"planId"` } type _CreateInstancePayload CreateInstancePayload @@ -32,10 +94,10 @@ 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(instanceName *string, planId *string) *CreateInstancePayload { +func NewCreateInstancePayload(instanceName CreateInstancePayloadGetInstanceNameArgType, planId CreateInstancePayloadGetPlanIdArgType) *CreateInstancePayload { this := CreateInstancePayload{} - this.InstanceName = instanceName - this.PlanId = planId + setCreateInstancePayloadGetInstanceNameAttributeType(&this.InstanceName, instanceName) + setCreateInstancePayloadGetPlanIdAttributeType(&this.PlanId, planId) return &this } @@ -48,92 +110,73 @@ func NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { } // GetInstanceName returns the InstanceName field value -func (o *CreateInstancePayload) GetInstanceName() *string { - if o == nil || IsNil(o.InstanceName) { - var ret *string - return ret - } - - return o.InstanceName +func (o *CreateInstancePayload) GetInstanceName() (ret CreateInstancePayloadGetInstanceNameRetType) { + ret, _ = o.GetInstanceNameOk() + return ret } // GetInstanceNameOk returns a tuple with the InstanceName field value // and a boolean to check if the value has been set. -func (o *CreateInstancePayload) GetInstanceNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.InstanceName, true +func (o *CreateInstancePayload) GetInstanceNameOk() (ret CreateInstancePayloadGetInstanceNameRetType, ok bool) { + return getCreateInstancePayloadGetInstanceNameAttributeTypeOk(o.InstanceName) } // SetInstanceName sets field value -func (o *CreateInstancePayload) SetInstanceName(v *string) { - o.InstanceName = v +func (o *CreateInstancePayload) SetInstanceName(v CreateInstancePayloadGetInstanceNameRetType) { + setCreateInstancePayloadGetInstanceNameAttributeType(&o.InstanceName, v) } // GetParameters returns the Parameters field value if set, zero value otherwise. -func (o *CreateInstancePayload) GetParameters() *InstanceParameters { - if o == nil || IsNil(o.Parameters) { - var ret *InstanceParameters - return ret - } - return o.Parameters +func (o *CreateInstancePayload) GetParameters() (res CreateInstancePayloadGetParametersRetType) { + 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 *CreateInstancePayload) GetParametersOk() (*InstanceParameters, bool) { - if o == nil || IsNil(o.Parameters) { - return nil, false - } - return o.Parameters, true +func (o *CreateInstancePayload) GetParametersOk() (ret CreateInstancePayloadGetParametersRetType, ok bool) { + return getCreateInstancePayloadGetParametersAttributeTypeOk(o.Parameters) } // HasParameters returns a boolean if a field has been set. func (o *CreateInstancePayload) HasParameters() bool { - if o != nil && !IsNil(o.Parameters) { - return true - } - - return false + _, ok := o.GetParametersOk() + return ok } // SetParameters gets a reference to the given InstanceParameters and assigns it to the Parameters field. -func (o *CreateInstancePayload) SetParameters(v *InstanceParameters) { - o.Parameters = v +func (o *CreateInstancePayload) SetParameters(v CreateInstancePayloadGetParametersRetType) { + setCreateInstancePayloadGetParametersAttributeType(&o.Parameters, 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{}{} - toSerialize["instanceName"] = o.InstanceName - if !IsNil(o.Parameters) { - toSerialize["parameters"] = o.Parameters + if val, ok := getCreateInstancePayloadGetInstanceNameAttributeTypeOk(o.InstanceName); ok { + toSerialize["InstanceName"] = val + } + if val, ok := getCreateInstancePayloadGetParametersAttributeTypeOk(o.Parameters); ok { + toSerialize["Parameters"] = val + } + if val, ok := getCreateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val } - toSerialize["planId"] = o.PlanId return toSerialize, nil } diff --git a/services/logme/model_create_instance_response.go b/services/logme/model_create_instance_response.go index 591125322..7e229a57c 100644 --- a/services/logme/model_create_instance_response.go +++ b/services/logme/model_create_instance_response.go @@ -17,10 +17,31 @@ import ( // checks if the CreateInstanceResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateInstanceResponse{} +/* + 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 + // CreateInstanceResponse struct for CreateInstanceResponse type CreateInstanceResponse struct { // REQUIRED - InstanceId *string `json:"instanceId"` + InstanceId CreateInstanceResponseGetInstanceIdAttributeType `json:"instanceId"` } type _CreateInstanceResponse CreateInstanceResponse @@ -29,9 +50,9 @@ 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(instanceId *string) *CreateInstanceResponse { +func NewCreateInstanceResponse(instanceId CreateInstanceResponseGetInstanceIdArgType) *CreateInstanceResponse { this := CreateInstanceResponse{} - this.InstanceId = instanceId + setCreateInstanceResponseGetInstanceIdAttributeType(&this.InstanceId, instanceId) return &this } @@ -44,32 +65,27 @@ func NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { } // 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) } func (o CreateInstanceResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["instanceId"] = o.InstanceId + if val, ok := getCreateInstanceResponseGetInstanceIdAttributeTypeOk(o.InstanceId); ok { + toSerialize["InstanceId"] = val + } return toSerialize, nil } diff --git a/services/logme/model_credentials.go b/services/logme/model_credentials.go index 0929d36c9..d039bfcb7 100644 --- a/services/logme/model_credentials.go +++ b/services/logme/model_credentials.go @@ -17,18 +17,143 @@ import ( // checks if the Credentials type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Credentials{} +/* + types and functions for host +*/ + +// isNotNullableString +type CredentialsGetHostAttributeType = *string + +func getCredentialsGetHostAttributeTypeOk(arg CredentialsGetHostAttributeType) (ret CredentialsGetHostRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsGetHostAttributeType(arg *CredentialsGetHostAttributeType, val CredentialsGetHostRetType) { + *arg = &val +} + +type CredentialsGetHostArgType = string +type CredentialsGetHostRetType = string + +/* + 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 port +*/ + +// isInteger +type CredentialsGetPortAttributeType = *int64 +type CredentialsGetPortArgType = int64 +type CredentialsGetPortRetType = int64 + +func getCredentialsGetPortAttributeTypeOk(arg CredentialsGetPortAttributeType) (ret CredentialsGetPortRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsGetPortAttributeType(arg *CredentialsGetPortAttributeType, val CredentialsGetPortRetType) { + *arg = &val +} + +/* + types and functions for syslog_drain_url +*/ + +// isNotNullableString +type CredentialsGetSyslogDrainUrlAttributeType = *string + +func getCredentialsGetSyslogDrainUrlAttributeTypeOk(arg CredentialsGetSyslogDrainUrlAttributeType) (ret CredentialsGetSyslogDrainUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsGetSyslogDrainUrlAttributeType(arg *CredentialsGetSyslogDrainUrlAttributeType, val CredentialsGetSyslogDrainUrlRetType) { + *arg = &val +} + +type CredentialsGetSyslogDrainUrlArgType = string +type CredentialsGetSyslogDrainUrlRetType = string + +/* + types and functions for uri +*/ + +// isNotNullableString +type CredentialsGetUriAttributeType = *string + +func getCredentialsGetUriAttributeTypeOk(arg CredentialsGetUriAttributeType) (ret CredentialsGetUriRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsGetUriAttributeType(arg *CredentialsGetUriAttributeType, val CredentialsGetUriRetType) { + *arg = &val +} + +type CredentialsGetUriArgType = string +type CredentialsGetUriRetType = 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 - Host *string `json:"host"` + Host CredentialsGetHostAttributeType `json:"host"` // REQUIRED - Password *string `json:"password"` + Password CredentialsGetPasswordAttributeType `json:"password"` // Can be cast to int32 without loss of precision. - Port *int64 `json:"port,omitempty"` - SyslogDrainUrl *string `json:"syslog_drain_url,omitempty"` - Uri *string `json:"uri,omitempty"` + Port CredentialsGetPortAttributeType `json:"port,omitempty"` + SyslogDrainUrl CredentialsGetSyslogDrainUrlAttributeType `json:"syslog_drain_url,omitempty"` + Uri CredentialsGetUriAttributeType `json:"uri,omitempty"` // REQUIRED - Username *string `json:"username"` + Username CredentialsGetUsernameAttributeType `json:"username"` } type _Credentials Credentials @@ -37,11 +162,11 @@ 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(host *string, password *string, username *string) *Credentials { +func NewCredentials(host CredentialsGetHostArgType, password CredentialsGetPasswordArgType, username CredentialsGetUsernameArgType) *Credentials { this := Credentials{} - this.Host = host - this.Password = password - this.Username = username + setCredentialsGetHostAttributeType(&this.Host, host) + setCredentialsGetPasswordAttributeType(&this.Password, password) + setCredentialsGetUsernameAttributeType(&this.Username, username) return &this } @@ -54,187 +179,145 @@ func NewCredentialsWithDefaults() *Credentials { } // GetHost returns the Host field value -func (o *Credentials) GetHost() *string { - if o == nil || IsNil(o.Host) { - var ret *string - return ret - } - - return o.Host +func (o *Credentials) GetHost() (ret CredentialsGetHostRetType) { + ret, _ = o.GetHostOk() + return ret } // GetHostOk returns a tuple with the Host field value // and a boolean to check if the value has been set. -func (o *Credentials) GetHostOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Host, true +func (o *Credentials) GetHostOk() (ret CredentialsGetHostRetType, ok bool) { + return getCredentialsGetHostAttributeTypeOk(o.Host) } // SetHost sets field value -func (o *Credentials) SetHost(v *string) { - o.Host = v +func (o *Credentials) SetHost(v CredentialsGetHostRetType) { + setCredentialsGetHostAttributeType(&o.Host, v) } // 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) } // GetPort returns the Port field value if set, zero value otherwise. -func (o *Credentials) GetPort() *int64 { - if o == nil || IsNil(o.Port) { - var ret *int64 - return ret - } - return o.Port +func (o *Credentials) GetPort() (res CredentialsGetPortRetType) { + res, _ = o.GetPortOk() + return } // GetPortOk returns a tuple with the Port field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Credentials) GetPortOk() (*int64, bool) { - if o == nil || IsNil(o.Port) { - return nil, false - } - return o.Port, true +func (o *Credentials) GetPortOk() (ret CredentialsGetPortRetType, ok bool) { + return getCredentialsGetPortAttributeTypeOk(o.Port) } // HasPort returns a boolean if a field has been set. func (o *Credentials) HasPort() bool { - if o != nil && !IsNil(o.Port) { - return true - } - - return false + _, ok := o.GetPortOk() + return ok } // SetPort gets a reference to the given int64 and assigns it to the Port field. -func (o *Credentials) SetPort(v *int64) { - o.Port = v +func (o *Credentials) SetPort(v CredentialsGetPortRetType) { + setCredentialsGetPortAttributeType(&o.Port, v) } // GetSyslogDrainUrl returns the SyslogDrainUrl field value if set, zero value otherwise. -func (o *Credentials) GetSyslogDrainUrl() *string { - if o == nil || IsNil(o.SyslogDrainUrl) { - var ret *string - return ret - } - return o.SyslogDrainUrl +func (o *Credentials) GetSyslogDrainUrl() (res CredentialsGetSyslogDrainUrlRetType) { + res, _ = o.GetSyslogDrainUrlOk() + return } // GetSyslogDrainUrlOk returns a tuple with the SyslogDrainUrl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Credentials) GetSyslogDrainUrlOk() (*string, bool) { - if o == nil || IsNil(o.SyslogDrainUrl) { - return nil, false - } - return o.SyslogDrainUrl, true +func (o *Credentials) GetSyslogDrainUrlOk() (ret CredentialsGetSyslogDrainUrlRetType, ok bool) { + return getCredentialsGetSyslogDrainUrlAttributeTypeOk(o.SyslogDrainUrl) } // HasSyslogDrainUrl returns a boolean if a field has been set. func (o *Credentials) HasSyslogDrainUrl() bool { - if o != nil && !IsNil(o.SyslogDrainUrl) { - return true - } - - return false + _, ok := o.GetSyslogDrainUrlOk() + return ok } // SetSyslogDrainUrl gets a reference to the given string and assigns it to the SyslogDrainUrl field. -func (o *Credentials) SetSyslogDrainUrl(v *string) { - o.SyslogDrainUrl = v +func (o *Credentials) SetSyslogDrainUrl(v CredentialsGetSyslogDrainUrlRetType) { + setCredentialsGetSyslogDrainUrlAttributeType(&o.SyslogDrainUrl, v) } // GetUri returns the Uri field value if set, zero value otherwise. -func (o *Credentials) GetUri() *string { - if o == nil || IsNil(o.Uri) { - var ret *string - return ret - } - return o.Uri +func (o *Credentials) GetUri() (res CredentialsGetUriRetType) { + res, _ = o.GetUriOk() + return } // GetUriOk returns a tuple with the Uri field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Credentials) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { - return nil, false - } - return o.Uri, true +func (o *Credentials) GetUriOk() (ret CredentialsGetUriRetType, ok bool) { + return getCredentialsGetUriAttributeTypeOk(o.Uri) } // HasUri returns a boolean if a field has been set. func (o *Credentials) HasUri() bool { - if o != nil && !IsNil(o.Uri) { - return true - } - - return false + _, ok := o.GetUriOk() + return ok } // SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *Credentials) SetUri(v *string) { - o.Uri = v +func (o *Credentials) SetUri(v CredentialsGetUriRetType) { + setCredentialsGetUriAttributeType(&o.Uri, 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["host"] = o.Host - toSerialize["password"] = o.Password - if !IsNil(o.Port) { - toSerialize["port"] = o.Port + if val, ok := getCredentialsGetHostAttributeTypeOk(o.Host); ok { + toSerialize["Host"] = val + } + if val, ok := getCredentialsGetPasswordAttributeTypeOk(o.Password); ok { + toSerialize["Password"] = val + } + if val, ok := getCredentialsGetPortAttributeTypeOk(o.Port); ok { + toSerialize["Port"] = val + } + if val, ok := getCredentialsGetSyslogDrainUrlAttributeTypeOk(o.SyslogDrainUrl); ok { + toSerialize["SyslogDrainUrl"] = val } - if !IsNil(o.SyslogDrainUrl) { - toSerialize["syslog_drain_url"] = o.SyslogDrainUrl + if val, ok := getCredentialsGetUriAttributeTypeOk(o.Uri); ok { + toSerialize["Uri"] = val } - if !IsNil(o.Uri) { - toSerialize["uri"] = o.Uri + if val, ok := getCredentialsGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val } - toSerialize["username"] = o.Username return toSerialize, nil } diff --git a/services/logme/model_credentials_list_item.go b/services/logme/model_credentials_list_item.go index f00b286b8..54e40046b 100644 --- a/services/logme/model_credentials_list_item.go +++ b/services/logme/model_credentials_list_item.go @@ -17,10 +17,31 @@ import ( // checks if the CredentialsListItem type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CredentialsListItem{} +/* + types and functions for id +*/ + +// isNotNullableString +type CredentialsListItemGetIdAttributeType = *string + +func getCredentialsListItemGetIdAttributeTypeOk(arg CredentialsListItemGetIdAttributeType) (ret CredentialsListItemGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsListItemGetIdAttributeType(arg *CredentialsListItemGetIdAttributeType, val CredentialsListItemGetIdRetType) { + *arg = &val +} + +type CredentialsListItemGetIdArgType = string +type CredentialsListItemGetIdRetType = string + // CredentialsListItem struct for CredentialsListItem type CredentialsListItem struct { // REQUIRED - Id *string `json:"id"` + Id CredentialsListItemGetIdAttributeType `json:"id"` } type _CredentialsListItem CredentialsListItem @@ -29,9 +50,9 @@ type _CredentialsListItem CredentialsListItem // 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 NewCredentialsListItem(id *string) *CredentialsListItem { +func NewCredentialsListItem(id CredentialsListItemGetIdArgType) *CredentialsListItem { this := CredentialsListItem{} - this.Id = id + setCredentialsListItemGetIdAttributeType(&this.Id, id) return &this } @@ -44,32 +65,27 @@ func NewCredentialsListItemWithDefaults() *CredentialsListItem { } // GetId returns the Id field value -func (o *CredentialsListItem) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *CredentialsListItem) GetId() (ret CredentialsListItemGetIdRetType) { + 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 *CredentialsListItem) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true +func (o *CredentialsListItem) GetIdOk() (ret CredentialsListItemGetIdRetType, ok bool) { + return getCredentialsListItemGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *CredentialsListItem) SetId(v *string) { - o.Id = v +func (o *CredentialsListItem) SetId(v CredentialsListItemGetIdRetType) { + setCredentialsListItemGetIdAttributeType(&o.Id, v) } func (o CredentialsListItem) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id + if val, ok := getCredentialsListItemGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } return toSerialize, nil } diff --git a/services/logme/model_credentials_response.go b/services/logme/model_credentials_response.go index 8856498b1..b7d48e025 100644 --- a/services/logme/model_credentials_response.go +++ b/services/logme/model_credentials_response.go @@ -17,13 +17,75 @@ import ( // checks if the CredentialsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CredentialsResponse{} +/* + types and functions for id +*/ + +// isNotNullableString +type CredentialsResponseGetIdAttributeType = *string + +func getCredentialsResponseGetIdAttributeTypeOk(arg CredentialsResponseGetIdAttributeType) (ret CredentialsResponseGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsResponseGetIdAttributeType(arg *CredentialsResponseGetIdAttributeType, val CredentialsResponseGetIdRetType) { + *arg = &val +} + +type CredentialsResponseGetIdArgType = string +type CredentialsResponseGetIdRetType = string + +/* + types and functions for raw +*/ + +// isModel +type CredentialsResponseGetRawAttributeType = *RawCredentials +type CredentialsResponseGetRawArgType = RawCredentials +type CredentialsResponseGetRawRetType = RawCredentials + +func getCredentialsResponseGetRawAttributeTypeOk(arg CredentialsResponseGetRawAttributeType) (ret CredentialsResponseGetRawRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsResponseGetRawAttributeType(arg *CredentialsResponseGetRawAttributeType, val CredentialsResponseGetRawRetType) { + *arg = &val +} + +/* + types and functions for uri +*/ + +// isNotNullableString +type CredentialsResponseGetUriAttributeType = *string + +func getCredentialsResponseGetUriAttributeTypeOk(arg CredentialsResponseGetUriAttributeType) (ret CredentialsResponseGetUriRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsResponseGetUriAttributeType(arg *CredentialsResponseGetUriAttributeType, val CredentialsResponseGetUriRetType) { + *arg = &val +} + +type CredentialsResponseGetUriArgType = string +type CredentialsResponseGetUriRetType = string + // CredentialsResponse struct for CredentialsResponse type CredentialsResponse struct { // REQUIRED - Id *string `json:"id"` - Raw *RawCredentials `json:"raw,omitempty"` + Id CredentialsResponseGetIdAttributeType `json:"id"` + Raw CredentialsResponseGetRawAttributeType `json:"raw,omitempty"` // REQUIRED - Uri *string `json:"uri"` + Uri CredentialsResponseGetUriAttributeType `json:"uri"` } type _CredentialsResponse CredentialsResponse @@ -32,10 +94,10 @@ type _CredentialsResponse CredentialsResponse // 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 NewCredentialsResponse(id *string, uri *string) *CredentialsResponse { +func NewCredentialsResponse(id CredentialsResponseGetIdArgType, uri CredentialsResponseGetUriArgType) *CredentialsResponse { this := CredentialsResponse{} - this.Id = id - this.Uri = uri + setCredentialsResponseGetIdAttributeType(&this.Id, id) + setCredentialsResponseGetUriAttributeType(&this.Uri, uri) return &this } @@ -48,92 +110,73 @@ func NewCredentialsResponseWithDefaults() *CredentialsResponse { } // GetId returns the Id field value -func (o *CredentialsResponse) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *CredentialsResponse) GetId() (ret CredentialsResponseGetIdRetType) { + 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 *CredentialsResponse) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true +func (o *CredentialsResponse) GetIdOk() (ret CredentialsResponseGetIdRetType, ok bool) { + return getCredentialsResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *CredentialsResponse) SetId(v *string) { - o.Id = v +func (o *CredentialsResponse) SetId(v CredentialsResponseGetIdRetType) { + setCredentialsResponseGetIdAttributeType(&o.Id, v) } // GetRaw returns the Raw field value if set, zero value otherwise. -func (o *CredentialsResponse) GetRaw() *RawCredentials { - if o == nil || IsNil(o.Raw) { - var ret *RawCredentials - return ret - } - return o.Raw +func (o *CredentialsResponse) GetRaw() (res CredentialsResponseGetRawRetType) { + res, _ = o.GetRawOk() + return } // GetRawOk returns a tuple with the Raw field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetRawOk() (*RawCredentials, bool) { - if o == nil || IsNil(o.Raw) { - return nil, false - } - return o.Raw, true +func (o *CredentialsResponse) GetRawOk() (ret CredentialsResponseGetRawRetType, ok bool) { + return getCredentialsResponseGetRawAttributeTypeOk(o.Raw) } // HasRaw returns a boolean if a field has been set. func (o *CredentialsResponse) HasRaw() bool { - if o != nil && !IsNil(o.Raw) { - return true - } - - return false + _, ok := o.GetRawOk() + return ok } // SetRaw gets a reference to the given RawCredentials and assigns it to the Raw field. -func (o *CredentialsResponse) SetRaw(v *RawCredentials) { - o.Raw = v +func (o *CredentialsResponse) SetRaw(v CredentialsResponseGetRawRetType) { + setCredentialsResponseGetRawAttributeType(&o.Raw, v) } // GetUri returns the Uri field value -func (o *CredentialsResponse) GetUri() *string { - if o == nil || IsNil(o.Uri) { - var ret *string - return ret - } - - return o.Uri +func (o *CredentialsResponse) GetUri() (ret CredentialsResponseGetUriRetType) { + ret, _ = o.GetUriOk() + return ret } // GetUriOk returns a tuple with the Uri field value // and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetUriOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Uri, true +func (o *CredentialsResponse) GetUriOk() (ret CredentialsResponseGetUriRetType, ok bool) { + return getCredentialsResponseGetUriAttributeTypeOk(o.Uri) } // SetUri sets field value -func (o *CredentialsResponse) SetUri(v *string) { - o.Uri = v +func (o *CredentialsResponse) SetUri(v CredentialsResponseGetUriRetType) { + setCredentialsResponseGetUriAttributeType(&o.Uri, v) } func (o CredentialsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - if !IsNil(o.Raw) { - toSerialize["raw"] = o.Raw + if val, ok := getCredentialsResponseGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getCredentialsResponseGetRawAttributeTypeOk(o.Raw); ok { + toSerialize["Raw"] = val + } + if val, ok := getCredentialsResponseGetUriAttributeTypeOk(o.Uri); ok { + toSerialize["Uri"] = val } - toSerialize["uri"] = o.Uri return toSerialize, nil } diff --git a/services/logme/model_error.go b/services/logme/model_error.go index 328b3ce38..076682054 100644 --- a/services/logme/model_error.go +++ b/services/logme/model_error.go @@ -17,12 +17,54 @@ import ( // checks if the Error type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Error{} +/* + types and functions for description +*/ + +// isNotNullableString +type ErrorGetDescriptionAttributeType = *string + +func getErrorGetDescriptionAttributeTypeOk(arg ErrorGetDescriptionAttributeType) (ret ErrorGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorGetDescriptionAttributeType(arg *ErrorGetDescriptionAttributeType, val ErrorGetDescriptionRetType) { + *arg = &val +} + +type ErrorGetDescriptionArgType = string +type ErrorGetDescriptionRetType = string + +/* + types and functions for error +*/ + +// isNotNullableString +type ErrorGetErrorAttributeType = *string + +func getErrorGetErrorAttributeTypeOk(arg ErrorGetErrorAttributeType) (ret ErrorGetErrorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorGetErrorAttributeType(arg *ErrorGetErrorAttributeType, val ErrorGetErrorRetType) { + *arg = &val +} + +type ErrorGetErrorArgType = string +type ErrorGetErrorRetType = string + // Error struct for Error type Error struct { // REQUIRED - Description *string `json:"description"` + Description ErrorGetDescriptionAttributeType `json:"description"` // REQUIRED - Error *string `json:"error"` + Error ErrorGetErrorAttributeType `json:"error"` } type _Error Error @@ -31,10 +73,10 @@ 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(description *string, error_ *string) *Error { +func NewError(description ErrorGetDescriptionArgType, error_ ErrorGetErrorArgType) *Error { this := Error{} - this.Description = description - this.Error = error_ + setErrorGetDescriptionAttributeType(&this.Description, description) + setErrorGetErrorAttributeType(&this.Error, error_) return &this } @@ -47,57 +89,47 @@ func NewErrorWithDefaults() *Error { } // GetDescription returns the Description field value -func (o *Error) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - - return o.Description +func (o *Error) GetDescription() (ret ErrorGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *Error) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description, true +func (o *Error) GetDescriptionOk() (ret ErrorGetDescriptionRetType, ok bool) { + return getErrorGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value -func (o *Error) SetDescription(v *string) { - o.Description = v +func (o *Error) SetDescription(v ErrorGetDescriptionRetType) { + setErrorGetDescriptionAttributeType(&o.Description, v) } // GetError returns the Error field value -func (o *Error) GetError() *string { - if o == nil || IsNil(o.Error) { - var ret *string - return ret - } - - return o.Error +func (o *Error) GetError() (ret ErrorGetErrorRetType) { + ret, _ = o.GetErrorOk() + return ret } // GetErrorOk returns a tuple with the Error field value // and a boolean to check if the value has been set. -func (o *Error) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Error, true +func (o *Error) GetErrorOk() (ret ErrorGetErrorRetType, ok bool) { + return getErrorGetErrorAttributeTypeOk(o.Error) } // SetError sets field value -func (o *Error) SetError(v *string) { - o.Error = v +func (o *Error) SetError(v ErrorGetErrorRetType) { + setErrorGetErrorAttributeType(&o.Error, v) } func (o Error) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["description"] = o.Description - toSerialize["error"] = o.Error + if val, ok := getErrorGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getErrorGetErrorAttributeTypeOk(o.Error); ok { + toSerialize["Error"] = val + } return toSerialize, nil } diff --git a/services/logme/model_get_metrics_response.go b/services/logme/model_get_metrics_response.go index 0bfe43d2a..ce1eee990 100644 --- a/services/logme/model_get_metrics_response.go +++ b/services/logme/model_get_metrics_response.go @@ -17,53 +17,534 @@ import ( // checks if the GetMetricsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetMetricsResponse{} +/* + types and functions for cpuIdleTime +*/ + +// isLong +type GetMetricsResponseGetCpuIdleTimeAttributeType = *int64 +type GetMetricsResponseGetCpuIdleTimeArgType = int64 +type GetMetricsResponseGetCpuIdleTimeRetType = int64 + +func getGetMetricsResponseGetCpuIdleTimeAttributeTypeOk(arg GetMetricsResponseGetCpuIdleTimeAttributeType) (ret GetMetricsResponseGetCpuIdleTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetCpuIdleTimeAttributeType(arg *GetMetricsResponseGetCpuIdleTimeAttributeType, val GetMetricsResponseGetCpuIdleTimeRetType) { + *arg = &val +} + +/* + types and functions for cpuLoadPercent +*/ + +// isNumber +type GetMetricsResponseGetCpuLoadPercentAttributeType = *float64 +type GetMetricsResponseGetCpuLoadPercentArgType = float64 +type GetMetricsResponseGetCpuLoadPercentRetType = float64 + +func getGetMetricsResponseGetCpuLoadPercentAttributeTypeOk(arg GetMetricsResponseGetCpuLoadPercentAttributeType) (ret GetMetricsResponseGetCpuLoadPercentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetCpuLoadPercentAttributeType(arg *GetMetricsResponseGetCpuLoadPercentAttributeType, val GetMetricsResponseGetCpuLoadPercentRetType) { + *arg = &val +} + +/* + types and functions for cpuSystemTime +*/ + +// isLong +type GetMetricsResponseGetCpuSystemTimeAttributeType = *int64 +type GetMetricsResponseGetCpuSystemTimeArgType = int64 +type GetMetricsResponseGetCpuSystemTimeRetType = int64 + +func getGetMetricsResponseGetCpuSystemTimeAttributeTypeOk(arg GetMetricsResponseGetCpuSystemTimeAttributeType) (ret GetMetricsResponseGetCpuSystemTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetCpuSystemTimeAttributeType(arg *GetMetricsResponseGetCpuSystemTimeAttributeType, val GetMetricsResponseGetCpuSystemTimeRetType) { + *arg = &val +} + +/* + types and functions for cpuUserTime +*/ + +// isLong +type GetMetricsResponseGetCpuUserTimeAttributeType = *int64 +type GetMetricsResponseGetCpuUserTimeArgType = int64 +type GetMetricsResponseGetCpuUserTimeRetType = int64 + +func getGetMetricsResponseGetCpuUserTimeAttributeTypeOk(arg GetMetricsResponseGetCpuUserTimeAttributeType) (ret GetMetricsResponseGetCpuUserTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetCpuUserTimeAttributeType(arg *GetMetricsResponseGetCpuUserTimeAttributeType, val GetMetricsResponseGetCpuUserTimeRetType) { + *arg = &val +} + +/* + types and functions for diskEphemeralTotal +*/ + +// isLong +type GetMetricsResponseGetDiskEphemeralTotalAttributeType = *int64 +type GetMetricsResponseGetDiskEphemeralTotalArgType = int64 +type GetMetricsResponseGetDiskEphemeralTotalRetType = int64 + +func getGetMetricsResponseGetDiskEphemeralTotalAttributeTypeOk(arg GetMetricsResponseGetDiskEphemeralTotalAttributeType) (ret GetMetricsResponseGetDiskEphemeralTotalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetDiskEphemeralTotalAttributeType(arg *GetMetricsResponseGetDiskEphemeralTotalAttributeType, val GetMetricsResponseGetDiskEphemeralTotalRetType) { + *arg = &val +} + +/* + types and functions for diskEphemeralUsed +*/ + +// isLong +type GetMetricsResponseGetDiskEphemeralUsedAttributeType = *int64 +type GetMetricsResponseGetDiskEphemeralUsedArgType = int64 +type GetMetricsResponseGetDiskEphemeralUsedRetType = int64 + +func getGetMetricsResponseGetDiskEphemeralUsedAttributeTypeOk(arg GetMetricsResponseGetDiskEphemeralUsedAttributeType) (ret GetMetricsResponseGetDiskEphemeralUsedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetDiskEphemeralUsedAttributeType(arg *GetMetricsResponseGetDiskEphemeralUsedAttributeType, val GetMetricsResponseGetDiskEphemeralUsedRetType) { + *arg = &val +} + +/* + types and functions for diskPersistentTotal +*/ + +// isLong +type GetMetricsResponseGetDiskPersistentTotalAttributeType = *int64 +type GetMetricsResponseGetDiskPersistentTotalArgType = int64 +type GetMetricsResponseGetDiskPersistentTotalRetType = int64 + +func getGetMetricsResponseGetDiskPersistentTotalAttributeTypeOk(arg GetMetricsResponseGetDiskPersistentTotalAttributeType) (ret GetMetricsResponseGetDiskPersistentTotalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetDiskPersistentTotalAttributeType(arg *GetMetricsResponseGetDiskPersistentTotalAttributeType, val GetMetricsResponseGetDiskPersistentTotalRetType) { + *arg = &val +} + +/* + types and functions for diskPersistentUsed +*/ + +// isLong +type GetMetricsResponseGetDiskPersistentUsedAttributeType = *int64 +type GetMetricsResponseGetDiskPersistentUsedArgType = int64 +type GetMetricsResponseGetDiskPersistentUsedRetType = int64 + +func getGetMetricsResponseGetDiskPersistentUsedAttributeTypeOk(arg GetMetricsResponseGetDiskPersistentUsedAttributeType) (ret GetMetricsResponseGetDiskPersistentUsedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetDiskPersistentUsedAttributeType(arg *GetMetricsResponseGetDiskPersistentUsedAttributeType, val GetMetricsResponseGetDiskPersistentUsedRetType) { + *arg = &val +} + +/* + types and functions for load1 +*/ + +// isNumber +type GetMetricsResponseGetLoad1AttributeType = *float64 +type GetMetricsResponseGetLoad1ArgType = float64 +type GetMetricsResponseGetLoad1RetType = float64 + +func getGetMetricsResponseGetLoad1AttributeTypeOk(arg GetMetricsResponseGetLoad1AttributeType) (ret GetMetricsResponseGetLoad1RetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetLoad1AttributeType(arg *GetMetricsResponseGetLoad1AttributeType, val GetMetricsResponseGetLoad1RetType) { + *arg = &val +} + +/* + types and functions for load15 +*/ + +// isNumber +type GetMetricsResponseGetLoad15AttributeType = *float64 +type GetMetricsResponseGetLoad15ArgType = float64 +type GetMetricsResponseGetLoad15RetType = float64 + +func getGetMetricsResponseGetLoad15AttributeTypeOk(arg GetMetricsResponseGetLoad15AttributeType) (ret GetMetricsResponseGetLoad15RetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetLoad15AttributeType(arg *GetMetricsResponseGetLoad15AttributeType, val GetMetricsResponseGetLoad15RetType) { + *arg = &val +} + +/* + types and functions for load5 +*/ + +// isNumber +type GetMetricsResponseGetLoad5AttributeType = *float64 +type GetMetricsResponseGetLoad5ArgType = float64 +type GetMetricsResponseGetLoad5RetType = float64 + +func getGetMetricsResponseGetLoad5AttributeTypeOk(arg GetMetricsResponseGetLoad5AttributeType) (ret GetMetricsResponseGetLoad5RetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetLoad5AttributeType(arg *GetMetricsResponseGetLoad5AttributeType, val GetMetricsResponseGetLoad5RetType) { + *arg = &val +} + +/* + types and functions for memoryTotal +*/ + +// isLong +type GetMetricsResponseGetMemoryTotalAttributeType = *int64 +type GetMetricsResponseGetMemoryTotalArgType = int64 +type GetMetricsResponseGetMemoryTotalRetType = int64 + +func getGetMetricsResponseGetMemoryTotalAttributeTypeOk(arg GetMetricsResponseGetMemoryTotalAttributeType) (ret GetMetricsResponseGetMemoryTotalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetMemoryTotalAttributeType(arg *GetMetricsResponseGetMemoryTotalAttributeType, val GetMetricsResponseGetMemoryTotalRetType) { + *arg = &val +} + +/* + types and functions for memoryUsed +*/ + +// isLong +type GetMetricsResponseGetMemoryUsedAttributeType = *int64 +type GetMetricsResponseGetMemoryUsedArgType = int64 +type GetMetricsResponseGetMemoryUsedRetType = int64 + +func getGetMetricsResponseGetMemoryUsedAttributeTypeOk(arg GetMetricsResponseGetMemoryUsedAttributeType) (ret GetMetricsResponseGetMemoryUsedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetMemoryUsedAttributeType(arg *GetMetricsResponseGetMemoryUsedAttributeType, val GetMetricsResponseGetMemoryUsedRetType) { + *arg = &val +} + +/* + types and functions for opensearchDashboardURL +*/ + +// isNotNullableString +type GetMetricsResponseGetOpensearchDashboardURLAttributeType = *string + +func getGetMetricsResponseGetOpensearchDashboardURLAttributeTypeOk(arg GetMetricsResponseGetOpensearchDashboardURLAttributeType) (ret GetMetricsResponseGetOpensearchDashboardURLRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetOpensearchDashboardURLAttributeType(arg *GetMetricsResponseGetOpensearchDashboardURLAttributeType, val GetMetricsResponseGetOpensearchDashboardURLRetType) { + *arg = &val +} + +type GetMetricsResponseGetOpensearchDashboardURLArgType = string +type GetMetricsResponseGetOpensearchDashboardURLRetType = string + +/* + types and functions for parachuteDiskEphemeralActivated +*/ + +// isBoolean +type GetMetricsResponsegetParachuteDiskEphemeralActivatedAttributeType = *bool +type GetMetricsResponsegetParachuteDiskEphemeralActivatedArgType = bool +type GetMetricsResponsegetParachuteDiskEphemeralActivatedRetType = bool + +func getGetMetricsResponsegetParachuteDiskEphemeralActivatedAttributeTypeOk(arg GetMetricsResponsegetParachuteDiskEphemeralActivatedAttributeType) (ret GetMetricsResponsegetParachuteDiskEphemeralActivatedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponsegetParachuteDiskEphemeralActivatedAttributeType(arg *GetMetricsResponsegetParachuteDiskEphemeralActivatedAttributeType, val GetMetricsResponsegetParachuteDiskEphemeralActivatedRetType) { + *arg = &val +} + +/* + types and functions for parachuteDiskEphemeralTotal +*/ + +// isLong +type GetMetricsResponseGetParachuteDiskEphemeralTotalAttributeType = *int64 +type GetMetricsResponseGetParachuteDiskEphemeralTotalArgType = int64 +type GetMetricsResponseGetParachuteDiskEphemeralTotalRetType = int64 + +func getGetMetricsResponseGetParachuteDiskEphemeralTotalAttributeTypeOk(arg GetMetricsResponseGetParachuteDiskEphemeralTotalAttributeType) (ret GetMetricsResponseGetParachuteDiskEphemeralTotalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetParachuteDiskEphemeralTotalAttributeType(arg *GetMetricsResponseGetParachuteDiskEphemeralTotalAttributeType, val GetMetricsResponseGetParachuteDiskEphemeralTotalRetType) { + *arg = &val +} + +/* + types and functions for parachuteDiskEphemeralUsed +*/ + +// isLong +type GetMetricsResponseGetParachuteDiskEphemeralUsedAttributeType = *int64 +type GetMetricsResponseGetParachuteDiskEphemeralUsedArgType = int64 +type GetMetricsResponseGetParachuteDiskEphemeralUsedRetType = int64 + +func getGetMetricsResponseGetParachuteDiskEphemeralUsedAttributeTypeOk(arg GetMetricsResponseGetParachuteDiskEphemeralUsedAttributeType) (ret GetMetricsResponseGetParachuteDiskEphemeralUsedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetParachuteDiskEphemeralUsedAttributeType(arg *GetMetricsResponseGetParachuteDiskEphemeralUsedAttributeType, val GetMetricsResponseGetParachuteDiskEphemeralUsedRetType) { + *arg = &val +} + +/* + types and functions for parachuteDiskEphemeralUsedPercent +*/ + +// isLong +type GetMetricsResponseGetParachuteDiskEphemeralUsedPercentAttributeType = *int64 +type GetMetricsResponseGetParachuteDiskEphemeralUsedPercentArgType = int64 +type GetMetricsResponseGetParachuteDiskEphemeralUsedPercentRetType = int64 + +func getGetMetricsResponseGetParachuteDiskEphemeralUsedPercentAttributeTypeOk(arg GetMetricsResponseGetParachuteDiskEphemeralUsedPercentAttributeType) (ret GetMetricsResponseGetParachuteDiskEphemeralUsedPercentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetParachuteDiskEphemeralUsedPercentAttributeType(arg *GetMetricsResponseGetParachuteDiskEphemeralUsedPercentAttributeType, val GetMetricsResponseGetParachuteDiskEphemeralUsedPercentRetType) { + *arg = &val +} + +/* + types and functions for parachuteDiskEphemeralUsedThreshold +*/ + +// isLong +type GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdAttributeType = *int64 +type GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdArgType = int64 +type GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdRetType = int64 + +func getGetMetricsResponseGetParachuteDiskEphemeralUsedThresholdAttributeTypeOk(arg GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdAttributeType) (ret GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetParachuteDiskEphemeralUsedThresholdAttributeType(arg *GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdAttributeType, val GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdRetType) { + *arg = &val +} + +/* + types and functions for parachuteDiskPersistentActivated +*/ + +// isBoolean +type GetMetricsResponsegetParachuteDiskPersistentActivatedAttributeType = *bool +type GetMetricsResponsegetParachuteDiskPersistentActivatedArgType = bool +type GetMetricsResponsegetParachuteDiskPersistentActivatedRetType = bool + +func getGetMetricsResponsegetParachuteDiskPersistentActivatedAttributeTypeOk(arg GetMetricsResponsegetParachuteDiskPersistentActivatedAttributeType) (ret GetMetricsResponsegetParachuteDiskPersistentActivatedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponsegetParachuteDiskPersistentActivatedAttributeType(arg *GetMetricsResponsegetParachuteDiskPersistentActivatedAttributeType, val GetMetricsResponsegetParachuteDiskPersistentActivatedRetType) { + *arg = &val +} + +/* + types and functions for parachuteDiskPersistentTotal +*/ + +// isLong +type GetMetricsResponseGetParachuteDiskPersistentTotalAttributeType = *int64 +type GetMetricsResponseGetParachuteDiskPersistentTotalArgType = int64 +type GetMetricsResponseGetParachuteDiskPersistentTotalRetType = int64 + +func getGetMetricsResponseGetParachuteDiskPersistentTotalAttributeTypeOk(arg GetMetricsResponseGetParachuteDiskPersistentTotalAttributeType) (ret GetMetricsResponseGetParachuteDiskPersistentTotalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetParachuteDiskPersistentTotalAttributeType(arg *GetMetricsResponseGetParachuteDiskPersistentTotalAttributeType, val GetMetricsResponseGetParachuteDiskPersistentTotalRetType) { + *arg = &val +} + +/* + types and functions for parachuteDiskPersistentUsed +*/ + +// isLong +type GetMetricsResponseGetParachuteDiskPersistentUsedAttributeType = *int64 +type GetMetricsResponseGetParachuteDiskPersistentUsedArgType = int64 +type GetMetricsResponseGetParachuteDiskPersistentUsedRetType = int64 + +func getGetMetricsResponseGetParachuteDiskPersistentUsedAttributeTypeOk(arg GetMetricsResponseGetParachuteDiskPersistentUsedAttributeType) (ret GetMetricsResponseGetParachuteDiskPersistentUsedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetParachuteDiskPersistentUsedAttributeType(arg *GetMetricsResponseGetParachuteDiskPersistentUsedAttributeType, val GetMetricsResponseGetParachuteDiskPersistentUsedRetType) { + *arg = &val +} + +/* + types and functions for parachuteDiskPersistentUsedPercent +*/ + +// isLong +type GetMetricsResponseGetParachuteDiskPersistentUsedPercentAttributeType = *int64 +type GetMetricsResponseGetParachuteDiskPersistentUsedPercentArgType = int64 +type GetMetricsResponseGetParachuteDiskPersistentUsedPercentRetType = int64 + +func getGetMetricsResponseGetParachuteDiskPersistentUsedPercentAttributeTypeOk(arg GetMetricsResponseGetParachuteDiskPersistentUsedPercentAttributeType) (ret GetMetricsResponseGetParachuteDiskPersistentUsedPercentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetParachuteDiskPersistentUsedPercentAttributeType(arg *GetMetricsResponseGetParachuteDiskPersistentUsedPercentAttributeType, val GetMetricsResponseGetParachuteDiskPersistentUsedPercentRetType) { + *arg = &val +} + +/* + types and functions for parachuteDiskPersistentUsedThreshold +*/ + +// isLong +type GetMetricsResponseGetParachuteDiskPersistentUsedThresholdAttributeType = *int64 +type GetMetricsResponseGetParachuteDiskPersistentUsedThresholdArgType = int64 +type GetMetricsResponseGetParachuteDiskPersistentUsedThresholdRetType = int64 + +func getGetMetricsResponseGetParachuteDiskPersistentUsedThresholdAttributeTypeOk(arg GetMetricsResponseGetParachuteDiskPersistentUsedThresholdAttributeType) (ret GetMetricsResponseGetParachuteDiskPersistentUsedThresholdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetMetricsResponseGetParachuteDiskPersistentUsedThresholdAttributeType(arg *GetMetricsResponseGetParachuteDiskPersistentUsedThresholdAttributeType, val GetMetricsResponseGetParachuteDiskPersistentUsedThresholdRetType) { + *arg = &val +} + // GetMetricsResponse struct for GetMetricsResponse type GetMetricsResponse struct { - CpuIdleTime *int64 `json:"cpuIdleTime,omitempty"` + CpuIdleTime GetMetricsResponseGetCpuIdleTimeAttributeType `json:"cpuIdleTime,omitempty"` // REQUIRED - CpuLoadPercent *float64 `json:"cpuLoadPercent"` - CpuSystemTime *int64 `json:"cpuSystemTime,omitempty"` - CpuUserTime *int64 `json:"cpuUserTime,omitempty"` + CpuLoadPercent GetMetricsResponseGetCpuLoadPercentAttributeType `json:"cpuLoadPercent"` + CpuSystemTime GetMetricsResponseGetCpuSystemTimeAttributeType `json:"cpuSystemTime,omitempty"` + CpuUserTime GetMetricsResponseGetCpuUserTimeAttributeType `json:"cpuUserTime,omitempty"` // REQUIRED - DiskEphemeralTotal *int64 `json:"diskEphemeralTotal"` + DiskEphemeralTotal GetMetricsResponseGetDiskEphemeralTotalAttributeType `json:"diskEphemeralTotal"` // REQUIRED - DiskEphemeralUsed *int64 `json:"diskEphemeralUsed"` + DiskEphemeralUsed GetMetricsResponseGetDiskEphemeralUsedAttributeType `json:"diskEphemeralUsed"` // REQUIRED - DiskPersistentTotal *int64 `json:"diskPersistentTotal"` + DiskPersistentTotal GetMetricsResponseGetDiskPersistentTotalAttributeType `json:"diskPersistentTotal"` // REQUIRED - DiskPersistentUsed *int64 `json:"diskPersistentUsed"` + DiskPersistentUsed GetMetricsResponseGetDiskPersistentUsedAttributeType `json:"diskPersistentUsed"` // REQUIRED - Load1 *float64 `json:"load1"` + Load1 GetMetricsResponseGetLoad1AttributeType `json:"load1"` // REQUIRED - Load15 *float64 `json:"load15"` + Load15 GetMetricsResponseGetLoad15AttributeType `json:"load15"` // REQUIRED - Load5 *float64 `json:"load5"` + Load5 GetMetricsResponseGetLoad5AttributeType `json:"load5"` // REQUIRED - MemoryTotal *int64 `json:"memoryTotal"` + MemoryTotal GetMetricsResponseGetMemoryTotalAttributeType `json:"memoryTotal"` // REQUIRED - MemoryUsed *int64 `json:"memoryUsed"` + MemoryUsed GetMetricsResponseGetMemoryUsedAttributeType `json:"memoryUsed"` // REQUIRED - OpensearchDashboardURL *string `json:"opensearchDashboardURL"` + OpensearchDashboardURL GetMetricsResponseGetOpensearchDashboardURLAttributeType `json:"opensearchDashboardURL"` // REQUIRED - ParachuteDiskEphemeralActivated *bool `json:"parachuteDiskEphemeralActivated"` + ParachuteDiskEphemeralActivated GetMetricsResponsegetParachuteDiskEphemeralActivatedAttributeType `json:"parachuteDiskEphemeralActivated"` // REQUIRED - ParachuteDiskEphemeralTotal *int64 `json:"parachuteDiskEphemeralTotal"` + ParachuteDiskEphemeralTotal GetMetricsResponseGetParachuteDiskEphemeralTotalAttributeType `json:"parachuteDiskEphemeralTotal"` // REQUIRED - ParachuteDiskEphemeralUsed *int64 `json:"parachuteDiskEphemeralUsed"` + ParachuteDiskEphemeralUsed GetMetricsResponseGetParachuteDiskEphemeralUsedAttributeType `json:"parachuteDiskEphemeralUsed"` // REQUIRED - ParachuteDiskEphemeralUsedPercent *int64 `json:"parachuteDiskEphemeralUsedPercent"` + ParachuteDiskEphemeralUsedPercent GetMetricsResponseGetParachuteDiskEphemeralUsedPercentAttributeType `json:"parachuteDiskEphemeralUsedPercent"` // REQUIRED - ParachuteDiskEphemeralUsedThreshold *int64 `json:"parachuteDiskEphemeralUsedThreshold"` + ParachuteDiskEphemeralUsedThreshold GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdAttributeType `json:"parachuteDiskEphemeralUsedThreshold"` // REQUIRED - ParachuteDiskPersistentActivated *bool `json:"parachuteDiskPersistentActivated"` + ParachuteDiskPersistentActivated GetMetricsResponsegetParachuteDiskPersistentActivatedAttributeType `json:"parachuteDiskPersistentActivated"` // REQUIRED - ParachuteDiskPersistentTotal *int64 `json:"parachuteDiskPersistentTotal"` + ParachuteDiskPersistentTotal GetMetricsResponseGetParachuteDiskPersistentTotalAttributeType `json:"parachuteDiskPersistentTotal"` // REQUIRED - ParachuteDiskPersistentUsed *int64 `json:"parachuteDiskPersistentUsed"` + ParachuteDiskPersistentUsed GetMetricsResponseGetParachuteDiskPersistentUsedAttributeType `json:"parachuteDiskPersistentUsed"` // REQUIRED - ParachuteDiskPersistentUsedPercent *int64 `json:"parachuteDiskPersistentUsedPercent"` + ParachuteDiskPersistentUsedPercent GetMetricsResponseGetParachuteDiskPersistentUsedPercentAttributeType `json:"parachuteDiskPersistentUsedPercent"` // REQUIRED - ParachuteDiskPersistentUsedThreshold *int64 `json:"parachuteDiskPersistentUsedThreshold"` + ParachuteDiskPersistentUsedThreshold GetMetricsResponseGetParachuteDiskPersistentUsedThresholdAttributeType `json:"parachuteDiskPersistentUsedThreshold"` } type _GetMetricsResponse GetMetricsResponse @@ -72,29 +553,29 @@ type _GetMetricsResponse GetMetricsResponse // 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 NewGetMetricsResponse(cpuLoadPercent *float64, diskEphemeralTotal *int64, diskEphemeralUsed *int64, diskPersistentTotal *int64, diskPersistentUsed *int64, load1 *float64, load15 *float64, load5 *float64, memoryTotal *int64, memoryUsed *int64, opensearchDashboardURL *string, parachuteDiskEphemeralActivated *bool, parachuteDiskEphemeralTotal *int64, parachuteDiskEphemeralUsed *int64, parachuteDiskEphemeralUsedPercent *int64, parachuteDiskEphemeralUsedThreshold *int64, parachuteDiskPersistentActivated *bool, parachuteDiskPersistentTotal *int64, parachuteDiskPersistentUsed *int64, parachuteDiskPersistentUsedPercent *int64, parachuteDiskPersistentUsedThreshold *int64) *GetMetricsResponse { +func NewGetMetricsResponse(cpuLoadPercent GetMetricsResponseGetCpuLoadPercentArgType, diskEphemeralTotal GetMetricsResponseGetDiskEphemeralTotalArgType, diskEphemeralUsed GetMetricsResponseGetDiskEphemeralUsedArgType, diskPersistentTotal GetMetricsResponseGetDiskPersistentTotalArgType, diskPersistentUsed GetMetricsResponseGetDiskPersistentUsedArgType, load1 GetMetricsResponseGetLoad1ArgType, load15 GetMetricsResponseGetLoad15ArgType, load5 GetMetricsResponseGetLoad5ArgType, memoryTotal GetMetricsResponseGetMemoryTotalArgType, memoryUsed GetMetricsResponseGetMemoryUsedArgType, opensearchDashboardURL GetMetricsResponseGetOpensearchDashboardURLArgType, parachuteDiskEphemeralActivated GetMetricsResponsegetParachuteDiskEphemeralActivatedArgType, parachuteDiskEphemeralTotal GetMetricsResponseGetParachuteDiskEphemeralTotalArgType, parachuteDiskEphemeralUsed GetMetricsResponseGetParachuteDiskEphemeralUsedArgType, parachuteDiskEphemeralUsedPercent GetMetricsResponseGetParachuteDiskEphemeralUsedPercentArgType, parachuteDiskEphemeralUsedThreshold GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdArgType, parachuteDiskPersistentActivated GetMetricsResponsegetParachuteDiskPersistentActivatedArgType, parachuteDiskPersistentTotal GetMetricsResponseGetParachuteDiskPersistentTotalArgType, parachuteDiskPersistentUsed GetMetricsResponseGetParachuteDiskPersistentUsedArgType, parachuteDiskPersistentUsedPercent GetMetricsResponseGetParachuteDiskPersistentUsedPercentArgType, parachuteDiskPersistentUsedThreshold GetMetricsResponseGetParachuteDiskPersistentUsedThresholdArgType) *GetMetricsResponse { this := GetMetricsResponse{} - this.CpuLoadPercent = cpuLoadPercent - this.DiskEphemeralTotal = diskEphemeralTotal - this.DiskEphemeralUsed = diskEphemeralUsed - this.DiskPersistentTotal = diskPersistentTotal - this.DiskPersistentUsed = diskPersistentUsed - this.Load1 = load1 - this.Load15 = load15 - this.Load5 = load5 - this.MemoryTotal = memoryTotal - this.MemoryUsed = memoryUsed - this.OpensearchDashboardURL = opensearchDashboardURL - this.ParachuteDiskEphemeralActivated = parachuteDiskEphemeralActivated - this.ParachuteDiskEphemeralTotal = parachuteDiskEphemeralTotal - this.ParachuteDiskEphemeralUsed = parachuteDiskEphemeralUsed - this.ParachuteDiskEphemeralUsedPercent = parachuteDiskEphemeralUsedPercent - this.ParachuteDiskEphemeralUsedThreshold = parachuteDiskEphemeralUsedThreshold - this.ParachuteDiskPersistentActivated = parachuteDiskPersistentActivated - this.ParachuteDiskPersistentTotal = parachuteDiskPersistentTotal - this.ParachuteDiskPersistentUsed = parachuteDiskPersistentUsed - this.ParachuteDiskPersistentUsedPercent = parachuteDiskPersistentUsedPercent - this.ParachuteDiskPersistentUsedThreshold = parachuteDiskPersistentUsedThreshold + setGetMetricsResponseGetCpuLoadPercentAttributeType(&this.CpuLoadPercent, cpuLoadPercent) + setGetMetricsResponseGetDiskEphemeralTotalAttributeType(&this.DiskEphemeralTotal, diskEphemeralTotal) + setGetMetricsResponseGetDiskEphemeralUsedAttributeType(&this.DiskEphemeralUsed, diskEphemeralUsed) + setGetMetricsResponseGetDiskPersistentTotalAttributeType(&this.DiskPersistentTotal, diskPersistentTotal) + setGetMetricsResponseGetDiskPersistentUsedAttributeType(&this.DiskPersistentUsed, diskPersistentUsed) + setGetMetricsResponseGetLoad1AttributeType(&this.Load1, load1) + setGetMetricsResponseGetLoad15AttributeType(&this.Load15, load15) + setGetMetricsResponseGetLoad5AttributeType(&this.Load5, load5) + setGetMetricsResponseGetMemoryTotalAttributeType(&this.MemoryTotal, memoryTotal) + setGetMetricsResponseGetMemoryUsedAttributeType(&this.MemoryUsed, memoryUsed) + setGetMetricsResponseGetOpensearchDashboardURLAttributeType(&this.OpensearchDashboardURL, opensearchDashboardURL) + setGetMetricsResponsegetParachuteDiskEphemeralActivatedAttributeType(&this.ParachuteDiskEphemeralActivated, parachuteDiskEphemeralActivated) + setGetMetricsResponseGetParachuteDiskEphemeralTotalAttributeType(&this.ParachuteDiskEphemeralTotal, parachuteDiskEphemeralTotal) + setGetMetricsResponseGetParachuteDiskEphemeralUsedAttributeType(&this.ParachuteDiskEphemeralUsed, parachuteDiskEphemeralUsed) + setGetMetricsResponseGetParachuteDiskEphemeralUsedPercentAttributeType(&this.ParachuteDiskEphemeralUsedPercent, parachuteDiskEphemeralUsedPercent) + setGetMetricsResponseGetParachuteDiskEphemeralUsedThresholdAttributeType(&this.ParachuteDiskEphemeralUsedThreshold, parachuteDiskEphemeralUsedThreshold) + setGetMetricsResponsegetParachuteDiskPersistentActivatedAttributeType(&this.ParachuteDiskPersistentActivated, parachuteDiskPersistentActivated) + setGetMetricsResponseGetParachuteDiskPersistentTotalAttributeType(&this.ParachuteDiskPersistentTotal, parachuteDiskPersistentTotal) + setGetMetricsResponseGetParachuteDiskPersistentUsedAttributeType(&this.ParachuteDiskPersistentUsed, parachuteDiskPersistentUsed) + setGetMetricsResponseGetParachuteDiskPersistentUsedPercentAttributeType(&this.ParachuteDiskPersistentUsedPercent, parachuteDiskPersistentUsedPercent) + setGetMetricsResponseGetParachuteDiskPersistentUsedThresholdAttributeType(&this.ParachuteDiskPersistentUsedThreshold, parachuteDiskPersistentUsedThreshold) return &this } @@ -107,637 +588,505 @@ func NewGetMetricsResponseWithDefaults() *GetMetricsResponse { } // GetCpuIdleTime returns the CpuIdleTime field value if set, zero value otherwise. -func (o *GetMetricsResponse) GetCpuIdleTime() *int64 { - if o == nil || IsNil(o.CpuIdleTime) { - var ret *int64 - return ret - } - return o.CpuIdleTime +func (o *GetMetricsResponse) GetCpuIdleTime() (res GetMetricsResponseGetCpuIdleTimeRetType) { + res, _ = o.GetCpuIdleTimeOk() + return } // GetCpuIdleTimeOk returns a tuple with the CpuIdleTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetCpuIdleTimeOk() (*int64, bool) { - if o == nil || IsNil(o.CpuIdleTime) { - return nil, false - } - return o.CpuIdleTime, true +func (o *GetMetricsResponse) GetCpuIdleTimeOk() (ret GetMetricsResponseGetCpuIdleTimeRetType, ok bool) { + return getGetMetricsResponseGetCpuIdleTimeAttributeTypeOk(o.CpuIdleTime) } // HasCpuIdleTime returns a boolean if a field has been set. func (o *GetMetricsResponse) HasCpuIdleTime() bool { - if o != nil && !IsNil(o.CpuIdleTime) { - return true - } - - return false + _, ok := o.GetCpuIdleTimeOk() + return ok } // SetCpuIdleTime gets a reference to the given int64 and assigns it to the CpuIdleTime field. -func (o *GetMetricsResponse) SetCpuIdleTime(v *int64) { - o.CpuIdleTime = v +func (o *GetMetricsResponse) SetCpuIdleTime(v GetMetricsResponseGetCpuIdleTimeRetType) { + setGetMetricsResponseGetCpuIdleTimeAttributeType(&o.CpuIdleTime, v) } // GetCpuLoadPercent returns the CpuLoadPercent field value -func (o *GetMetricsResponse) GetCpuLoadPercent() *float64 { - if o == nil || IsNil(o.CpuLoadPercent) { - var ret *float64 - return ret - } - - return o.CpuLoadPercent +func (o *GetMetricsResponse) GetCpuLoadPercent() (ret GetMetricsResponseGetCpuLoadPercentRetType) { + ret, _ = o.GetCpuLoadPercentOk() + return ret } // GetCpuLoadPercentOk returns a tuple with the CpuLoadPercent field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetCpuLoadPercentOk() (*float64, bool) { - if o == nil { - return nil, false - } - return o.CpuLoadPercent, true +func (o *GetMetricsResponse) GetCpuLoadPercentOk() (ret GetMetricsResponseGetCpuLoadPercentRetType, ok bool) { + return getGetMetricsResponseGetCpuLoadPercentAttributeTypeOk(o.CpuLoadPercent) } // SetCpuLoadPercent sets field value -func (o *GetMetricsResponse) SetCpuLoadPercent(v *float64) { - o.CpuLoadPercent = v +func (o *GetMetricsResponse) SetCpuLoadPercent(v GetMetricsResponseGetCpuLoadPercentRetType) { + setGetMetricsResponseGetCpuLoadPercentAttributeType(&o.CpuLoadPercent, v) } // GetCpuSystemTime returns the CpuSystemTime field value if set, zero value otherwise. -func (o *GetMetricsResponse) GetCpuSystemTime() *int64 { - if o == nil || IsNil(o.CpuSystemTime) { - var ret *int64 - return ret - } - return o.CpuSystemTime +func (o *GetMetricsResponse) GetCpuSystemTime() (res GetMetricsResponseGetCpuSystemTimeRetType) { + res, _ = o.GetCpuSystemTimeOk() + return } // GetCpuSystemTimeOk returns a tuple with the CpuSystemTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetCpuSystemTimeOk() (*int64, bool) { - if o == nil || IsNil(o.CpuSystemTime) { - return nil, false - } - return o.CpuSystemTime, true +func (o *GetMetricsResponse) GetCpuSystemTimeOk() (ret GetMetricsResponseGetCpuSystemTimeRetType, ok bool) { + return getGetMetricsResponseGetCpuSystemTimeAttributeTypeOk(o.CpuSystemTime) } // HasCpuSystemTime returns a boolean if a field has been set. func (o *GetMetricsResponse) HasCpuSystemTime() bool { - if o != nil && !IsNil(o.CpuSystemTime) { - return true - } - - return false + _, ok := o.GetCpuSystemTimeOk() + return ok } // SetCpuSystemTime gets a reference to the given int64 and assigns it to the CpuSystemTime field. -func (o *GetMetricsResponse) SetCpuSystemTime(v *int64) { - o.CpuSystemTime = v +func (o *GetMetricsResponse) SetCpuSystemTime(v GetMetricsResponseGetCpuSystemTimeRetType) { + setGetMetricsResponseGetCpuSystemTimeAttributeType(&o.CpuSystemTime, v) } // GetCpuUserTime returns the CpuUserTime field value if set, zero value otherwise. -func (o *GetMetricsResponse) GetCpuUserTime() *int64 { - if o == nil || IsNil(o.CpuUserTime) { - var ret *int64 - return ret - } - return o.CpuUserTime +func (o *GetMetricsResponse) GetCpuUserTime() (res GetMetricsResponseGetCpuUserTimeRetType) { + res, _ = o.GetCpuUserTimeOk() + return } // GetCpuUserTimeOk returns a tuple with the CpuUserTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetCpuUserTimeOk() (*int64, bool) { - if o == nil || IsNil(o.CpuUserTime) { - return nil, false - } - return o.CpuUserTime, true +func (o *GetMetricsResponse) GetCpuUserTimeOk() (ret GetMetricsResponseGetCpuUserTimeRetType, ok bool) { + return getGetMetricsResponseGetCpuUserTimeAttributeTypeOk(o.CpuUserTime) } // HasCpuUserTime returns a boolean if a field has been set. func (o *GetMetricsResponse) HasCpuUserTime() bool { - if o != nil && !IsNil(o.CpuUserTime) { - return true - } - - return false + _, ok := o.GetCpuUserTimeOk() + return ok } // SetCpuUserTime gets a reference to the given int64 and assigns it to the CpuUserTime field. -func (o *GetMetricsResponse) SetCpuUserTime(v *int64) { - o.CpuUserTime = v +func (o *GetMetricsResponse) SetCpuUserTime(v GetMetricsResponseGetCpuUserTimeRetType) { + setGetMetricsResponseGetCpuUserTimeAttributeType(&o.CpuUserTime, v) } // GetDiskEphemeralTotal returns the DiskEphemeralTotal field value -func (o *GetMetricsResponse) GetDiskEphemeralTotal() *int64 { - if o == nil || IsNil(o.DiskEphemeralTotal) { - var ret *int64 - return ret - } - - return o.DiskEphemeralTotal +func (o *GetMetricsResponse) GetDiskEphemeralTotal() (ret GetMetricsResponseGetDiskEphemeralTotalRetType) { + ret, _ = o.GetDiskEphemeralTotalOk() + return ret } // GetDiskEphemeralTotalOk returns a tuple with the DiskEphemeralTotal field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetDiskEphemeralTotalOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.DiskEphemeralTotal, true +func (o *GetMetricsResponse) GetDiskEphemeralTotalOk() (ret GetMetricsResponseGetDiskEphemeralTotalRetType, ok bool) { + return getGetMetricsResponseGetDiskEphemeralTotalAttributeTypeOk(o.DiskEphemeralTotal) } // SetDiskEphemeralTotal sets field value -func (o *GetMetricsResponse) SetDiskEphemeralTotal(v *int64) { - o.DiskEphemeralTotal = v +func (o *GetMetricsResponse) SetDiskEphemeralTotal(v GetMetricsResponseGetDiskEphemeralTotalRetType) { + setGetMetricsResponseGetDiskEphemeralTotalAttributeType(&o.DiskEphemeralTotal, v) } // GetDiskEphemeralUsed returns the DiskEphemeralUsed field value -func (o *GetMetricsResponse) GetDiskEphemeralUsed() *int64 { - if o == nil || IsNil(o.DiskEphemeralUsed) { - var ret *int64 - return ret - } - - return o.DiskEphemeralUsed +func (o *GetMetricsResponse) GetDiskEphemeralUsed() (ret GetMetricsResponseGetDiskEphemeralUsedRetType) { + ret, _ = o.GetDiskEphemeralUsedOk() + return ret } // GetDiskEphemeralUsedOk returns a tuple with the DiskEphemeralUsed field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetDiskEphemeralUsedOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.DiskEphemeralUsed, true +func (o *GetMetricsResponse) GetDiskEphemeralUsedOk() (ret GetMetricsResponseGetDiskEphemeralUsedRetType, ok bool) { + return getGetMetricsResponseGetDiskEphemeralUsedAttributeTypeOk(o.DiskEphemeralUsed) } // SetDiskEphemeralUsed sets field value -func (o *GetMetricsResponse) SetDiskEphemeralUsed(v *int64) { - o.DiskEphemeralUsed = v +func (o *GetMetricsResponse) SetDiskEphemeralUsed(v GetMetricsResponseGetDiskEphemeralUsedRetType) { + setGetMetricsResponseGetDiskEphemeralUsedAttributeType(&o.DiskEphemeralUsed, v) } // GetDiskPersistentTotal returns the DiskPersistentTotal field value -func (o *GetMetricsResponse) GetDiskPersistentTotal() *int64 { - if o == nil || IsNil(o.DiskPersistentTotal) { - var ret *int64 - return ret - } - - return o.DiskPersistentTotal +func (o *GetMetricsResponse) GetDiskPersistentTotal() (ret GetMetricsResponseGetDiskPersistentTotalRetType) { + ret, _ = o.GetDiskPersistentTotalOk() + return ret } // GetDiskPersistentTotalOk returns a tuple with the DiskPersistentTotal field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetDiskPersistentTotalOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.DiskPersistentTotal, true +func (o *GetMetricsResponse) GetDiskPersistentTotalOk() (ret GetMetricsResponseGetDiskPersistentTotalRetType, ok bool) { + return getGetMetricsResponseGetDiskPersistentTotalAttributeTypeOk(o.DiskPersistentTotal) } // SetDiskPersistentTotal sets field value -func (o *GetMetricsResponse) SetDiskPersistentTotal(v *int64) { - o.DiskPersistentTotal = v +func (o *GetMetricsResponse) SetDiskPersistentTotal(v GetMetricsResponseGetDiskPersistentTotalRetType) { + setGetMetricsResponseGetDiskPersistentTotalAttributeType(&o.DiskPersistentTotal, v) } // GetDiskPersistentUsed returns the DiskPersistentUsed field value -func (o *GetMetricsResponse) GetDiskPersistentUsed() *int64 { - if o == nil || IsNil(o.DiskPersistentUsed) { - var ret *int64 - return ret - } - - return o.DiskPersistentUsed +func (o *GetMetricsResponse) GetDiskPersistentUsed() (ret GetMetricsResponseGetDiskPersistentUsedRetType) { + ret, _ = o.GetDiskPersistentUsedOk() + return ret } // GetDiskPersistentUsedOk returns a tuple with the DiskPersistentUsed field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetDiskPersistentUsedOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.DiskPersistentUsed, true +func (o *GetMetricsResponse) GetDiskPersistentUsedOk() (ret GetMetricsResponseGetDiskPersistentUsedRetType, ok bool) { + return getGetMetricsResponseGetDiskPersistentUsedAttributeTypeOk(o.DiskPersistentUsed) } // SetDiskPersistentUsed sets field value -func (o *GetMetricsResponse) SetDiskPersistentUsed(v *int64) { - o.DiskPersistentUsed = v +func (o *GetMetricsResponse) SetDiskPersistentUsed(v GetMetricsResponseGetDiskPersistentUsedRetType) { + setGetMetricsResponseGetDiskPersistentUsedAttributeType(&o.DiskPersistentUsed, v) } // GetLoad1 returns the Load1 field value -func (o *GetMetricsResponse) GetLoad1() *float64 { - if o == nil || IsNil(o.Load1) { - var ret *float64 - return ret - } - - return o.Load1 +func (o *GetMetricsResponse) GetLoad1() (ret GetMetricsResponseGetLoad1RetType) { + ret, _ = o.GetLoad1Ok() + return ret } // GetLoad1Ok returns a tuple with the Load1 field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetLoad1Ok() (*float64, bool) { - if o == nil { - return nil, false - } - return o.Load1, true +func (o *GetMetricsResponse) GetLoad1Ok() (ret GetMetricsResponseGetLoad1RetType, ok bool) { + return getGetMetricsResponseGetLoad1AttributeTypeOk(o.Load1) } // SetLoad1 sets field value -func (o *GetMetricsResponse) SetLoad1(v *float64) { - o.Load1 = v +func (o *GetMetricsResponse) SetLoad1(v GetMetricsResponseGetLoad1RetType) { + setGetMetricsResponseGetLoad1AttributeType(&o.Load1, v) } // GetLoad15 returns the Load15 field value -func (o *GetMetricsResponse) GetLoad15() *float64 { - if o == nil || IsNil(o.Load15) { - var ret *float64 - return ret - } - - return o.Load15 +func (o *GetMetricsResponse) GetLoad15() (ret GetMetricsResponseGetLoad15RetType) { + ret, _ = o.GetLoad15Ok() + return ret } // GetLoad15Ok returns a tuple with the Load15 field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetLoad15Ok() (*float64, bool) { - if o == nil { - return nil, false - } - return o.Load15, true +func (o *GetMetricsResponse) GetLoad15Ok() (ret GetMetricsResponseGetLoad15RetType, ok bool) { + return getGetMetricsResponseGetLoad15AttributeTypeOk(o.Load15) } // SetLoad15 sets field value -func (o *GetMetricsResponse) SetLoad15(v *float64) { - o.Load15 = v +func (o *GetMetricsResponse) SetLoad15(v GetMetricsResponseGetLoad15RetType) { + setGetMetricsResponseGetLoad15AttributeType(&o.Load15, v) } // GetLoad5 returns the Load5 field value -func (o *GetMetricsResponse) GetLoad5() *float64 { - if o == nil || IsNil(o.Load5) { - var ret *float64 - return ret - } - - return o.Load5 +func (o *GetMetricsResponse) GetLoad5() (ret GetMetricsResponseGetLoad5RetType) { + ret, _ = o.GetLoad5Ok() + return ret } // GetLoad5Ok returns a tuple with the Load5 field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetLoad5Ok() (*float64, bool) { - if o == nil { - return nil, false - } - return o.Load5, true +func (o *GetMetricsResponse) GetLoad5Ok() (ret GetMetricsResponseGetLoad5RetType, ok bool) { + return getGetMetricsResponseGetLoad5AttributeTypeOk(o.Load5) } // SetLoad5 sets field value -func (o *GetMetricsResponse) SetLoad5(v *float64) { - o.Load5 = v +func (o *GetMetricsResponse) SetLoad5(v GetMetricsResponseGetLoad5RetType) { + setGetMetricsResponseGetLoad5AttributeType(&o.Load5, v) } // GetMemoryTotal returns the MemoryTotal field value -func (o *GetMetricsResponse) GetMemoryTotal() *int64 { - if o == nil || IsNil(o.MemoryTotal) { - var ret *int64 - return ret - } - - return o.MemoryTotal +func (o *GetMetricsResponse) GetMemoryTotal() (ret GetMetricsResponseGetMemoryTotalRetType) { + ret, _ = o.GetMemoryTotalOk() + return ret } // GetMemoryTotalOk returns a tuple with the MemoryTotal field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetMemoryTotalOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.MemoryTotal, true +func (o *GetMetricsResponse) GetMemoryTotalOk() (ret GetMetricsResponseGetMemoryTotalRetType, ok bool) { + return getGetMetricsResponseGetMemoryTotalAttributeTypeOk(o.MemoryTotal) } // SetMemoryTotal sets field value -func (o *GetMetricsResponse) SetMemoryTotal(v *int64) { - o.MemoryTotal = v +func (o *GetMetricsResponse) SetMemoryTotal(v GetMetricsResponseGetMemoryTotalRetType) { + setGetMetricsResponseGetMemoryTotalAttributeType(&o.MemoryTotal, v) } // GetMemoryUsed returns the MemoryUsed field value -func (o *GetMetricsResponse) GetMemoryUsed() *int64 { - if o == nil || IsNil(o.MemoryUsed) { - var ret *int64 - return ret - } - - return o.MemoryUsed +func (o *GetMetricsResponse) GetMemoryUsed() (ret GetMetricsResponseGetMemoryUsedRetType) { + ret, _ = o.GetMemoryUsedOk() + return ret } // GetMemoryUsedOk returns a tuple with the MemoryUsed field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetMemoryUsedOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.MemoryUsed, true +func (o *GetMetricsResponse) GetMemoryUsedOk() (ret GetMetricsResponseGetMemoryUsedRetType, ok bool) { + return getGetMetricsResponseGetMemoryUsedAttributeTypeOk(o.MemoryUsed) } // SetMemoryUsed sets field value -func (o *GetMetricsResponse) SetMemoryUsed(v *int64) { - o.MemoryUsed = v +func (o *GetMetricsResponse) SetMemoryUsed(v GetMetricsResponseGetMemoryUsedRetType) { + setGetMetricsResponseGetMemoryUsedAttributeType(&o.MemoryUsed, v) } // GetOpensearchDashboardURL returns the OpensearchDashboardURL field value -func (o *GetMetricsResponse) GetOpensearchDashboardURL() *string { - if o == nil || IsNil(o.OpensearchDashboardURL) { - var ret *string - return ret - } - - return o.OpensearchDashboardURL +func (o *GetMetricsResponse) GetOpensearchDashboardURL() (ret GetMetricsResponseGetOpensearchDashboardURLRetType) { + ret, _ = o.GetOpensearchDashboardURLOk() + return ret } // GetOpensearchDashboardURLOk returns a tuple with the OpensearchDashboardURL field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetOpensearchDashboardURLOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.OpensearchDashboardURL, true +func (o *GetMetricsResponse) GetOpensearchDashboardURLOk() (ret GetMetricsResponseGetOpensearchDashboardURLRetType, ok bool) { + return getGetMetricsResponseGetOpensearchDashboardURLAttributeTypeOk(o.OpensearchDashboardURL) } // SetOpensearchDashboardURL sets field value -func (o *GetMetricsResponse) SetOpensearchDashboardURL(v *string) { - o.OpensearchDashboardURL = v +func (o *GetMetricsResponse) SetOpensearchDashboardURL(v GetMetricsResponseGetOpensearchDashboardURLRetType) { + setGetMetricsResponseGetOpensearchDashboardURLAttributeType(&o.OpensearchDashboardURL, v) } // GetParachuteDiskEphemeralActivated returns the ParachuteDiskEphemeralActivated field value -func (o *GetMetricsResponse) GetParachuteDiskEphemeralActivated() *bool { - if o == nil || IsNil(o.ParachuteDiskEphemeralActivated) { - var ret *bool - return ret - } - - return o.ParachuteDiskEphemeralActivated +func (o *GetMetricsResponse) GetParachuteDiskEphemeralActivated() (ret GetMetricsResponsegetParachuteDiskEphemeralActivatedRetType) { + ret, _ = o.GetParachuteDiskEphemeralActivatedOk() + return ret } // GetParachuteDiskEphemeralActivatedOk returns a tuple with the ParachuteDiskEphemeralActivated field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetParachuteDiskEphemeralActivatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.ParachuteDiskEphemeralActivated, true +func (o *GetMetricsResponse) GetParachuteDiskEphemeralActivatedOk() (ret GetMetricsResponsegetParachuteDiskEphemeralActivatedRetType, ok bool) { + return getGetMetricsResponsegetParachuteDiskEphemeralActivatedAttributeTypeOk(o.ParachuteDiskEphemeralActivated) } // SetParachuteDiskEphemeralActivated sets field value -func (o *GetMetricsResponse) SetParachuteDiskEphemeralActivated(v *bool) { - o.ParachuteDiskEphemeralActivated = v +func (o *GetMetricsResponse) SetParachuteDiskEphemeralActivated(v GetMetricsResponsegetParachuteDiskEphemeralActivatedRetType) { + setGetMetricsResponsegetParachuteDiskEphemeralActivatedAttributeType(&o.ParachuteDiskEphemeralActivated, v) } // GetParachuteDiskEphemeralTotal returns the ParachuteDiskEphemeralTotal field value -func (o *GetMetricsResponse) GetParachuteDiskEphemeralTotal() *int64 { - if o == nil || IsNil(o.ParachuteDiskEphemeralTotal) { - var ret *int64 - return ret - } - - return o.ParachuteDiskEphemeralTotal +func (o *GetMetricsResponse) GetParachuteDiskEphemeralTotal() (ret GetMetricsResponseGetParachuteDiskEphemeralTotalRetType) { + ret, _ = o.GetParachuteDiskEphemeralTotalOk() + return ret } // GetParachuteDiskEphemeralTotalOk returns a tuple with the ParachuteDiskEphemeralTotal field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetParachuteDiskEphemeralTotalOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ParachuteDiskEphemeralTotal, true +func (o *GetMetricsResponse) GetParachuteDiskEphemeralTotalOk() (ret GetMetricsResponseGetParachuteDiskEphemeralTotalRetType, ok bool) { + return getGetMetricsResponseGetParachuteDiskEphemeralTotalAttributeTypeOk(o.ParachuteDiskEphemeralTotal) } // SetParachuteDiskEphemeralTotal sets field value -func (o *GetMetricsResponse) SetParachuteDiskEphemeralTotal(v *int64) { - o.ParachuteDiskEphemeralTotal = v +func (o *GetMetricsResponse) SetParachuteDiskEphemeralTotal(v GetMetricsResponseGetParachuteDiskEphemeralTotalRetType) { + setGetMetricsResponseGetParachuteDiskEphemeralTotalAttributeType(&o.ParachuteDiskEphemeralTotal, v) } // GetParachuteDiskEphemeralUsed returns the ParachuteDiskEphemeralUsed field value -func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsed() *int64 { - if o == nil || IsNil(o.ParachuteDiskEphemeralUsed) { - var ret *int64 - return ret - } - - return o.ParachuteDiskEphemeralUsed +func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsed() (ret GetMetricsResponseGetParachuteDiskEphemeralUsedRetType) { + ret, _ = o.GetParachuteDiskEphemeralUsedOk() + return ret } // GetParachuteDiskEphemeralUsedOk returns a tuple with the ParachuteDiskEphemeralUsed field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsedOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ParachuteDiskEphemeralUsed, true +func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsedOk() (ret GetMetricsResponseGetParachuteDiskEphemeralUsedRetType, ok bool) { + return getGetMetricsResponseGetParachuteDiskEphemeralUsedAttributeTypeOk(o.ParachuteDiskEphemeralUsed) } // SetParachuteDiskEphemeralUsed sets field value -func (o *GetMetricsResponse) SetParachuteDiskEphemeralUsed(v *int64) { - o.ParachuteDiskEphemeralUsed = v +func (o *GetMetricsResponse) SetParachuteDiskEphemeralUsed(v GetMetricsResponseGetParachuteDiskEphemeralUsedRetType) { + setGetMetricsResponseGetParachuteDiskEphemeralUsedAttributeType(&o.ParachuteDiskEphemeralUsed, v) } // GetParachuteDiskEphemeralUsedPercent returns the ParachuteDiskEphemeralUsedPercent field value -func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsedPercent() *int64 { - if o == nil || IsNil(o.ParachuteDiskEphemeralUsedPercent) { - var ret *int64 - return ret - } - - return o.ParachuteDiskEphemeralUsedPercent +func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsedPercent() (ret GetMetricsResponseGetParachuteDiskEphemeralUsedPercentRetType) { + ret, _ = o.GetParachuteDiskEphemeralUsedPercentOk() + return ret } // GetParachuteDiskEphemeralUsedPercentOk returns a tuple with the ParachuteDiskEphemeralUsedPercent field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsedPercentOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ParachuteDiskEphemeralUsedPercent, true +func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsedPercentOk() (ret GetMetricsResponseGetParachuteDiskEphemeralUsedPercentRetType, ok bool) { + return getGetMetricsResponseGetParachuteDiskEphemeralUsedPercentAttributeTypeOk(o.ParachuteDiskEphemeralUsedPercent) } // SetParachuteDiskEphemeralUsedPercent sets field value -func (o *GetMetricsResponse) SetParachuteDiskEphemeralUsedPercent(v *int64) { - o.ParachuteDiskEphemeralUsedPercent = v +func (o *GetMetricsResponse) SetParachuteDiskEphemeralUsedPercent(v GetMetricsResponseGetParachuteDiskEphemeralUsedPercentRetType) { + setGetMetricsResponseGetParachuteDiskEphemeralUsedPercentAttributeType(&o.ParachuteDiskEphemeralUsedPercent, v) } // GetParachuteDiskEphemeralUsedThreshold returns the ParachuteDiskEphemeralUsedThreshold field value -func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsedThreshold() *int64 { - if o == nil || IsNil(o.ParachuteDiskEphemeralUsedThreshold) { - var ret *int64 - return ret - } - - return o.ParachuteDiskEphemeralUsedThreshold +func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsedThreshold() (ret GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdRetType) { + ret, _ = o.GetParachuteDiskEphemeralUsedThresholdOk() + return ret } // GetParachuteDiskEphemeralUsedThresholdOk returns a tuple with the ParachuteDiskEphemeralUsedThreshold field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsedThresholdOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ParachuteDiskEphemeralUsedThreshold, true +func (o *GetMetricsResponse) GetParachuteDiskEphemeralUsedThresholdOk() (ret GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdRetType, ok bool) { + return getGetMetricsResponseGetParachuteDiskEphemeralUsedThresholdAttributeTypeOk(o.ParachuteDiskEphemeralUsedThreshold) } // SetParachuteDiskEphemeralUsedThreshold sets field value -func (o *GetMetricsResponse) SetParachuteDiskEphemeralUsedThreshold(v *int64) { - o.ParachuteDiskEphemeralUsedThreshold = v +func (o *GetMetricsResponse) SetParachuteDiskEphemeralUsedThreshold(v GetMetricsResponseGetParachuteDiskEphemeralUsedThresholdRetType) { + setGetMetricsResponseGetParachuteDiskEphemeralUsedThresholdAttributeType(&o.ParachuteDiskEphemeralUsedThreshold, v) } // GetParachuteDiskPersistentActivated returns the ParachuteDiskPersistentActivated field value -func (o *GetMetricsResponse) GetParachuteDiskPersistentActivated() *bool { - if o == nil || IsNil(o.ParachuteDiskPersistentActivated) { - var ret *bool - return ret - } - - return o.ParachuteDiskPersistentActivated +func (o *GetMetricsResponse) GetParachuteDiskPersistentActivated() (ret GetMetricsResponsegetParachuteDiskPersistentActivatedRetType) { + ret, _ = o.GetParachuteDiskPersistentActivatedOk() + return ret } // GetParachuteDiskPersistentActivatedOk returns a tuple with the ParachuteDiskPersistentActivated field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetParachuteDiskPersistentActivatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.ParachuteDiskPersistentActivated, true +func (o *GetMetricsResponse) GetParachuteDiskPersistentActivatedOk() (ret GetMetricsResponsegetParachuteDiskPersistentActivatedRetType, ok bool) { + return getGetMetricsResponsegetParachuteDiskPersistentActivatedAttributeTypeOk(o.ParachuteDiskPersistentActivated) } // SetParachuteDiskPersistentActivated sets field value -func (o *GetMetricsResponse) SetParachuteDiskPersistentActivated(v *bool) { - o.ParachuteDiskPersistentActivated = v +func (o *GetMetricsResponse) SetParachuteDiskPersistentActivated(v GetMetricsResponsegetParachuteDiskPersistentActivatedRetType) { + setGetMetricsResponsegetParachuteDiskPersistentActivatedAttributeType(&o.ParachuteDiskPersistentActivated, v) } // GetParachuteDiskPersistentTotal returns the ParachuteDiskPersistentTotal field value -func (o *GetMetricsResponse) GetParachuteDiskPersistentTotal() *int64 { - if o == nil || IsNil(o.ParachuteDiskPersistentTotal) { - var ret *int64 - return ret - } - - return o.ParachuteDiskPersistentTotal +func (o *GetMetricsResponse) GetParachuteDiskPersistentTotal() (ret GetMetricsResponseGetParachuteDiskPersistentTotalRetType) { + ret, _ = o.GetParachuteDiskPersistentTotalOk() + return ret } // GetParachuteDiskPersistentTotalOk returns a tuple with the ParachuteDiskPersistentTotal field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetParachuteDiskPersistentTotalOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ParachuteDiskPersistentTotal, true +func (o *GetMetricsResponse) GetParachuteDiskPersistentTotalOk() (ret GetMetricsResponseGetParachuteDiskPersistentTotalRetType, ok bool) { + return getGetMetricsResponseGetParachuteDiskPersistentTotalAttributeTypeOk(o.ParachuteDiskPersistentTotal) } // SetParachuteDiskPersistentTotal sets field value -func (o *GetMetricsResponse) SetParachuteDiskPersistentTotal(v *int64) { - o.ParachuteDiskPersistentTotal = v +func (o *GetMetricsResponse) SetParachuteDiskPersistentTotal(v GetMetricsResponseGetParachuteDiskPersistentTotalRetType) { + setGetMetricsResponseGetParachuteDiskPersistentTotalAttributeType(&o.ParachuteDiskPersistentTotal, v) } // GetParachuteDiskPersistentUsed returns the ParachuteDiskPersistentUsed field value -func (o *GetMetricsResponse) GetParachuteDiskPersistentUsed() *int64 { - if o == nil || IsNil(o.ParachuteDiskPersistentUsed) { - var ret *int64 - return ret - } - - return o.ParachuteDiskPersistentUsed +func (o *GetMetricsResponse) GetParachuteDiskPersistentUsed() (ret GetMetricsResponseGetParachuteDiskPersistentUsedRetType) { + ret, _ = o.GetParachuteDiskPersistentUsedOk() + return ret } // GetParachuteDiskPersistentUsedOk returns a tuple with the ParachuteDiskPersistentUsed field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetParachuteDiskPersistentUsedOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ParachuteDiskPersistentUsed, true +func (o *GetMetricsResponse) GetParachuteDiskPersistentUsedOk() (ret GetMetricsResponseGetParachuteDiskPersistentUsedRetType, ok bool) { + return getGetMetricsResponseGetParachuteDiskPersistentUsedAttributeTypeOk(o.ParachuteDiskPersistentUsed) } // SetParachuteDiskPersistentUsed sets field value -func (o *GetMetricsResponse) SetParachuteDiskPersistentUsed(v *int64) { - o.ParachuteDiskPersistentUsed = v +func (o *GetMetricsResponse) SetParachuteDiskPersistentUsed(v GetMetricsResponseGetParachuteDiskPersistentUsedRetType) { + setGetMetricsResponseGetParachuteDiskPersistentUsedAttributeType(&o.ParachuteDiskPersistentUsed, v) } // GetParachuteDiskPersistentUsedPercent returns the ParachuteDiskPersistentUsedPercent field value -func (o *GetMetricsResponse) GetParachuteDiskPersistentUsedPercent() *int64 { - if o == nil || IsNil(o.ParachuteDiskPersistentUsedPercent) { - var ret *int64 - return ret - } - - return o.ParachuteDiskPersistentUsedPercent +func (o *GetMetricsResponse) GetParachuteDiskPersistentUsedPercent() (ret GetMetricsResponseGetParachuteDiskPersistentUsedPercentRetType) { + ret, _ = o.GetParachuteDiskPersistentUsedPercentOk() + return ret } // GetParachuteDiskPersistentUsedPercentOk returns a tuple with the ParachuteDiskPersistentUsedPercent field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetParachuteDiskPersistentUsedPercentOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ParachuteDiskPersistentUsedPercent, true +func (o *GetMetricsResponse) GetParachuteDiskPersistentUsedPercentOk() (ret GetMetricsResponseGetParachuteDiskPersistentUsedPercentRetType, ok bool) { + return getGetMetricsResponseGetParachuteDiskPersistentUsedPercentAttributeTypeOk(o.ParachuteDiskPersistentUsedPercent) } // SetParachuteDiskPersistentUsedPercent sets field value -func (o *GetMetricsResponse) SetParachuteDiskPersistentUsedPercent(v *int64) { - o.ParachuteDiskPersistentUsedPercent = v +func (o *GetMetricsResponse) SetParachuteDiskPersistentUsedPercent(v GetMetricsResponseGetParachuteDiskPersistentUsedPercentRetType) { + setGetMetricsResponseGetParachuteDiskPersistentUsedPercentAttributeType(&o.ParachuteDiskPersistentUsedPercent, v) } // GetParachuteDiskPersistentUsedThreshold returns the ParachuteDiskPersistentUsedThreshold field value -func (o *GetMetricsResponse) GetParachuteDiskPersistentUsedThreshold() *int64 { - if o == nil || IsNil(o.ParachuteDiskPersistentUsedThreshold) { - var ret *int64 - return ret - } - - return o.ParachuteDiskPersistentUsedThreshold +func (o *GetMetricsResponse) GetParachuteDiskPersistentUsedThreshold() (ret GetMetricsResponseGetParachuteDiskPersistentUsedThresholdRetType) { + ret, _ = o.GetParachuteDiskPersistentUsedThresholdOk() + return ret } // GetParachuteDiskPersistentUsedThresholdOk returns a tuple with the ParachuteDiskPersistentUsedThreshold field value // and a boolean to check if the value has been set. -func (o *GetMetricsResponse) GetParachuteDiskPersistentUsedThresholdOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ParachuteDiskPersistentUsedThreshold, true +func (o *GetMetricsResponse) GetParachuteDiskPersistentUsedThresholdOk() (ret GetMetricsResponseGetParachuteDiskPersistentUsedThresholdRetType, ok bool) { + return getGetMetricsResponseGetParachuteDiskPersistentUsedThresholdAttributeTypeOk(o.ParachuteDiskPersistentUsedThreshold) } // SetParachuteDiskPersistentUsedThreshold sets field value -func (o *GetMetricsResponse) SetParachuteDiskPersistentUsedThreshold(v *int64) { - o.ParachuteDiskPersistentUsedThreshold = v +func (o *GetMetricsResponse) SetParachuteDiskPersistentUsedThreshold(v GetMetricsResponseGetParachuteDiskPersistentUsedThresholdRetType) { + setGetMetricsResponseGetParachuteDiskPersistentUsedThresholdAttributeType(&o.ParachuteDiskPersistentUsedThreshold, v) } func (o GetMetricsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CpuIdleTime) { - toSerialize["cpuIdleTime"] = o.CpuIdleTime - } - toSerialize["cpuLoadPercent"] = o.CpuLoadPercent - if !IsNil(o.CpuSystemTime) { - toSerialize["cpuSystemTime"] = o.CpuSystemTime - } - if !IsNil(o.CpuUserTime) { - toSerialize["cpuUserTime"] = o.CpuUserTime - } - toSerialize["diskEphemeralTotal"] = o.DiskEphemeralTotal - toSerialize["diskEphemeralUsed"] = o.DiskEphemeralUsed - toSerialize["diskPersistentTotal"] = o.DiskPersistentTotal - toSerialize["diskPersistentUsed"] = o.DiskPersistentUsed - toSerialize["load1"] = o.Load1 - toSerialize["load15"] = o.Load15 - toSerialize["load5"] = o.Load5 - toSerialize["memoryTotal"] = o.MemoryTotal - toSerialize["memoryUsed"] = o.MemoryUsed - toSerialize["opensearchDashboardURL"] = o.OpensearchDashboardURL - toSerialize["parachuteDiskEphemeralActivated"] = o.ParachuteDiskEphemeralActivated - toSerialize["parachuteDiskEphemeralTotal"] = o.ParachuteDiskEphemeralTotal - toSerialize["parachuteDiskEphemeralUsed"] = o.ParachuteDiskEphemeralUsed - toSerialize["parachuteDiskEphemeralUsedPercent"] = o.ParachuteDiskEphemeralUsedPercent - toSerialize["parachuteDiskEphemeralUsedThreshold"] = o.ParachuteDiskEphemeralUsedThreshold - toSerialize["parachuteDiskPersistentActivated"] = o.ParachuteDiskPersistentActivated - toSerialize["parachuteDiskPersistentTotal"] = o.ParachuteDiskPersistentTotal - toSerialize["parachuteDiskPersistentUsed"] = o.ParachuteDiskPersistentUsed - toSerialize["parachuteDiskPersistentUsedPercent"] = o.ParachuteDiskPersistentUsedPercent - toSerialize["parachuteDiskPersistentUsedThreshold"] = o.ParachuteDiskPersistentUsedThreshold + if val, ok := getGetMetricsResponseGetCpuIdleTimeAttributeTypeOk(o.CpuIdleTime); ok { + toSerialize["CpuIdleTime"] = val + } + if val, ok := getGetMetricsResponseGetCpuLoadPercentAttributeTypeOk(o.CpuLoadPercent); ok { + toSerialize["CpuLoadPercent"] = val + } + if val, ok := getGetMetricsResponseGetCpuSystemTimeAttributeTypeOk(o.CpuSystemTime); ok { + toSerialize["CpuSystemTime"] = val + } + if val, ok := getGetMetricsResponseGetCpuUserTimeAttributeTypeOk(o.CpuUserTime); ok { + toSerialize["CpuUserTime"] = val + } + if val, ok := getGetMetricsResponseGetDiskEphemeralTotalAttributeTypeOk(o.DiskEphemeralTotal); ok { + toSerialize["DiskEphemeralTotal"] = val + } + if val, ok := getGetMetricsResponseGetDiskEphemeralUsedAttributeTypeOk(o.DiskEphemeralUsed); ok { + toSerialize["DiskEphemeralUsed"] = val + } + if val, ok := getGetMetricsResponseGetDiskPersistentTotalAttributeTypeOk(o.DiskPersistentTotal); ok { + toSerialize["DiskPersistentTotal"] = val + } + if val, ok := getGetMetricsResponseGetDiskPersistentUsedAttributeTypeOk(o.DiskPersistentUsed); ok { + toSerialize["DiskPersistentUsed"] = val + } + if val, ok := getGetMetricsResponseGetLoad1AttributeTypeOk(o.Load1); ok { + toSerialize["Load1"] = val + } + if val, ok := getGetMetricsResponseGetLoad15AttributeTypeOk(o.Load15); ok { + toSerialize["Load15"] = val + } + if val, ok := getGetMetricsResponseGetLoad5AttributeTypeOk(o.Load5); ok { + toSerialize["Load5"] = val + } + if val, ok := getGetMetricsResponseGetMemoryTotalAttributeTypeOk(o.MemoryTotal); ok { + toSerialize["MemoryTotal"] = val + } + if val, ok := getGetMetricsResponseGetMemoryUsedAttributeTypeOk(o.MemoryUsed); ok { + toSerialize["MemoryUsed"] = val + } + if val, ok := getGetMetricsResponseGetOpensearchDashboardURLAttributeTypeOk(o.OpensearchDashboardURL); ok { + toSerialize["OpensearchDashboardURL"] = val + } + if val, ok := getGetMetricsResponsegetParachuteDiskEphemeralActivatedAttributeTypeOk(o.ParachuteDiskEphemeralActivated); ok { + toSerialize["ParachuteDiskEphemeralActivated"] = val + } + if val, ok := getGetMetricsResponseGetParachuteDiskEphemeralTotalAttributeTypeOk(o.ParachuteDiskEphemeralTotal); ok { + toSerialize["ParachuteDiskEphemeralTotal"] = val + } + if val, ok := getGetMetricsResponseGetParachuteDiskEphemeralUsedAttributeTypeOk(o.ParachuteDiskEphemeralUsed); ok { + toSerialize["ParachuteDiskEphemeralUsed"] = val + } + if val, ok := getGetMetricsResponseGetParachuteDiskEphemeralUsedPercentAttributeTypeOk(o.ParachuteDiskEphemeralUsedPercent); ok { + toSerialize["ParachuteDiskEphemeralUsedPercent"] = val + } + if val, ok := getGetMetricsResponseGetParachuteDiskEphemeralUsedThresholdAttributeTypeOk(o.ParachuteDiskEphemeralUsedThreshold); ok { + toSerialize["ParachuteDiskEphemeralUsedThreshold"] = val + } + if val, ok := getGetMetricsResponsegetParachuteDiskPersistentActivatedAttributeTypeOk(o.ParachuteDiskPersistentActivated); ok { + toSerialize["ParachuteDiskPersistentActivated"] = val + } + if val, ok := getGetMetricsResponseGetParachuteDiskPersistentTotalAttributeTypeOk(o.ParachuteDiskPersistentTotal); ok { + toSerialize["ParachuteDiskPersistentTotal"] = val + } + if val, ok := getGetMetricsResponseGetParachuteDiskPersistentUsedAttributeTypeOk(o.ParachuteDiskPersistentUsed); ok { + toSerialize["ParachuteDiskPersistentUsed"] = val + } + if val, ok := getGetMetricsResponseGetParachuteDiskPersistentUsedPercentAttributeTypeOk(o.ParachuteDiskPersistentUsedPercent); ok { + toSerialize["ParachuteDiskPersistentUsedPercent"] = val + } + if val, ok := getGetMetricsResponseGetParachuteDiskPersistentUsedThresholdAttributeTypeOk(o.ParachuteDiskPersistentUsedThreshold); ok { + toSerialize["ParachuteDiskPersistentUsedThreshold"] = val + } return toSerialize, nil } diff --git a/services/logme/model_instance.go b/services/logme/model_instance.go index 563a38325..9dcb93e1f 100644 --- a/services/logme/model_instance.go +++ b/services/logme/model_instance.go @@ -17,35 +17,326 @@ import ( // checks if the Instance type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Instance{} +/* + types and functions for cfGuid +*/ + +// isNotNullableString +type InstanceGetCfGuidAttributeType = *string + +func getInstanceGetCfGuidAttributeTypeOk(arg InstanceGetCfGuidAttributeType) (ret InstanceGetCfGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetCfGuidAttributeType(arg *InstanceGetCfGuidAttributeType, val InstanceGetCfGuidRetType) { + *arg = &val +} + +type InstanceGetCfGuidArgType = string +type InstanceGetCfGuidRetType = string + +/* + types and functions for cfOrganizationGuid +*/ + +// isNotNullableString +type InstanceGetCfOrganizationGuidAttributeType = *string + +func getInstanceGetCfOrganizationGuidAttributeTypeOk(arg InstanceGetCfOrganizationGuidAttributeType) (ret InstanceGetCfOrganizationGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetCfOrganizationGuidAttributeType(arg *InstanceGetCfOrganizationGuidAttributeType, val InstanceGetCfOrganizationGuidRetType) { + *arg = &val +} + +type InstanceGetCfOrganizationGuidArgType = string +type InstanceGetCfOrganizationGuidRetType = string + +/* + types and functions for cfSpaceGuid +*/ + +// isNotNullableString +type InstanceGetCfSpaceGuidAttributeType = *string + +func getInstanceGetCfSpaceGuidAttributeTypeOk(arg InstanceGetCfSpaceGuidAttributeType) (ret InstanceGetCfSpaceGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetCfSpaceGuidAttributeType(arg *InstanceGetCfSpaceGuidAttributeType, val InstanceGetCfSpaceGuidRetType) { + *arg = &val +} + +type InstanceGetCfSpaceGuidArgType = string +type InstanceGetCfSpaceGuidRetType = string + +/* + types and functions for dashboardUrl +*/ + +// isNotNullableString +type InstanceGetDashboardUrlAttributeType = *string + +func getInstanceGetDashboardUrlAttributeTypeOk(arg InstanceGetDashboardUrlAttributeType) (ret InstanceGetDashboardUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetDashboardUrlAttributeType(arg *InstanceGetDashboardUrlAttributeType, val InstanceGetDashboardUrlRetType) { + *arg = &val +} + +type InstanceGetDashboardUrlArgType = string +type InstanceGetDashboardUrlRetType = string + +/* + types and functions for imageUrl +*/ + +// isNotNullableString +type InstanceGetImageUrlAttributeType = *string + +func getInstanceGetImageUrlAttributeTypeOk(arg InstanceGetImageUrlAttributeType) (ret InstanceGetImageUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetImageUrlAttributeType(arg *InstanceGetImageUrlAttributeType, val InstanceGetImageUrlRetType) { + *arg = &val +} + +type InstanceGetImageUrlArgType = string +type InstanceGetImageUrlRetType = string + +/* + types and functions for instanceId +*/ + +// isNotNullableString +type InstanceGetInstanceIdAttributeType = *string + +func getInstanceGetInstanceIdAttributeTypeOk(arg InstanceGetInstanceIdAttributeType) (ret InstanceGetInstanceIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetInstanceIdAttributeType(arg *InstanceGetInstanceIdAttributeType, val InstanceGetInstanceIdRetType) { + *arg = &val +} + +type InstanceGetInstanceIdArgType = string +type InstanceGetInstanceIdRetType = string + +/* + types and functions for lastOperation +*/ + +// isModel +type InstanceGetLastOperationAttributeType = *InstanceLastOperation +type InstanceGetLastOperationArgType = InstanceLastOperation +type InstanceGetLastOperationRetType = InstanceLastOperation + +func getInstanceGetLastOperationAttributeTypeOk(arg InstanceGetLastOperationAttributeType) (ret InstanceGetLastOperationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetLastOperationAttributeType(arg *InstanceGetLastOperationAttributeType, val InstanceGetLastOperationRetType) { + *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 offeringName +*/ + +// isNotNullableString +type InstanceGetOfferingNameAttributeType = *string + +func getInstanceGetOfferingNameAttributeTypeOk(arg InstanceGetOfferingNameAttributeType) (ret InstanceGetOfferingNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetOfferingNameAttributeType(arg *InstanceGetOfferingNameAttributeType, val InstanceGetOfferingNameRetType) { + *arg = &val +} + +type InstanceGetOfferingNameArgType = string +type InstanceGetOfferingNameRetType = string + +/* + types and functions for offeringVersion +*/ + +// isNotNullableString +type InstanceGetOfferingVersionAttributeType = *string + +func getInstanceGetOfferingVersionAttributeTypeOk(arg InstanceGetOfferingVersionAttributeType) (ret InstanceGetOfferingVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetOfferingVersionAttributeType(arg *InstanceGetOfferingVersionAttributeType, val InstanceGetOfferingVersionRetType) { + *arg = &val +} + +type InstanceGetOfferingVersionArgType = string +type InstanceGetOfferingVersionRetType = string + +/* + types and functions for parameters +*/ + +// isFreeform +type InstanceGetParametersAttributeType = *map[string]interface{} +type InstanceGetParametersArgType = map[string]interface{} +type InstanceGetParametersRetType = map[string]interface{} + +func getInstanceGetParametersAttributeTypeOk(arg InstanceGetParametersAttributeType) (ret InstanceGetParametersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetParametersAttributeType(arg *InstanceGetParametersAttributeType, val InstanceGetParametersRetType) { + *arg = &val +} + +/* + types and functions for planId +*/ + +// isNotNullableString +type InstanceGetPlanIdAttributeType = *string + +func getInstanceGetPlanIdAttributeTypeOk(arg InstanceGetPlanIdAttributeType) (ret InstanceGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetPlanIdAttributeType(arg *InstanceGetPlanIdAttributeType, val InstanceGetPlanIdRetType) { + *arg = &val +} + +type InstanceGetPlanIdArgType = string +type InstanceGetPlanIdRetType = string + +/* + types and functions for planName +*/ + +// isNotNullableString +type InstanceGetPlanNameAttributeType = *string + +func getInstanceGetPlanNameAttributeTypeOk(arg InstanceGetPlanNameAttributeType) (ret InstanceGetPlanNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetPlanNameAttributeType(arg *InstanceGetPlanNameAttributeType, val InstanceGetPlanNameRetType) { + *arg = &val +} + +type InstanceGetPlanNameArgType = string +type InstanceGetPlanNameRetType = string + +/* + types and functions for status +*/ + +// isEnumRef +type InstanceGetStatusAttributeType = *string +type InstanceGetStatusArgType = string +type InstanceGetStatusRetType = string + +func getInstanceGetStatusAttributeTypeOk(arg InstanceGetStatusAttributeType) (ret InstanceGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceGetStatusAttributeType(arg *InstanceGetStatusAttributeType, val InstanceGetStatusRetType) { + *arg = &val +} + // Instance struct for Instance type Instance struct { // REQUIRED - CfGuid *string `json:"cfGuid"` + CfGuid InstanceGetCfGuidAttributeType `json:"cfGuid"` // REQUIRED - CfOrganizationGuid *string `json:"cfOrganizationGuid"` + CfOrganizationGuid InstanceGetCfOrganizationGuidAttributeType `json:"cfOrganizationGuid"` // REQUIRED - CfSpaceGuid *string `json:"cfSpaceGuid"` + CfSpaceGuid InstanceGetCfSpaceGuidAttributeType `json:"cfSpaceGuid"` // REQUIRED - DashboardUrl *string `json:"dashboardUrl"` + DashboardUrl InstanceGetDashboardUrlAttributeType `json:"dashboardUrl"` // REQUIRED - ImageUrl *string `json:"imageUrl"` - InstanceId *string `json:"instanceId,omitempty"` + ImageUrl InstanceGetImageUrlAttributeType `json:"imageUrl"` + InstanceId InstanceGetInstanceIdAttributeType `json:"instanceId,omitempty"` // REQUIRED - LastOperation *InstanceLastOperation `json:"lastOperation"` + LastOperation InstanceGetLastOperationAttributeType `json:"lastOperation"` // REQUIRED - Name *string `json:"name"` + Name InstanceGetNameAttributeType `json:"name"` // Deprecated: Check the GitHub changelog for alternatives // REQUIRED - OfferingName *string `json:"offeringName"` + OfferingName InstanceGetOfferingNameAttributeType `json:"offeringName"` // REQUIRED - OfferingVersion *string `json:"offeringVersion"` + OfferingVersion InstanceGetOfferingVersionAttributeType `json:"offeringVersion"` // REQUIRED - Parameters *map[string]interface{} `json:"parameters"` + Parameters InstanceGetParametersAttributeType `json:"parameters"` // REQUIRED - PlanId *string `json:"planId"` + PlanId InstanceGetPlanIdAttributeType `json:"planId"` // REQUIRED - PlanName *string `json:"planName"` - Status *string `json:"status,omitempty"` + PlanName InstanceGetPlanNameAttributeType `json:"planName"` + Status InstanceGetStatusAttributeType `json:"status,omitempty"` } type _Instance Instance @@ -54,20 +345,20 @@ 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(cfGuid *string, cfOrganizationGuid *string, cfSpaceGuid *string, dashboardUrl *string, imageUrl *string, lastOperation *InstanceLastOperation, name *string, offeringName *string, offeringVersion *string, parameters *map[string]interface{}, planId *string, planName *string) *Instance { +func NewInstance(cfGuid InstanceGetCfGuidArgType, cfOrganizationGuid InstanceGetCfOrganizationGuidArgType, cfSpaceGuid InstanceGetCfSpaceGuidArgType, dashboardUrl InstanceGetDashboardUrlArgType, imageUrl InstanceGetImageUrlArgType, lastOperation InstanceGetLastOperationArgType, name InstanceGetNameArgType, offeringName InstanceGetOfferingNameArgType, offeringVersion InstanceGetOfferingVersionArgType, parameters InstanceGetParametersArgType, planId InstanceGetPlanIdArgType, planName InstanceGetPlanNameArgType) *Instance { this := Instance{} - this.CfGuid = cfGuid - this.CfOrganizationGuid = cfOrganizationGuid - this.CfSpaceGuid = cfSpaceGuid - this.DashboardUrl = dashboardUrl - this.ImageUrl = imageUrl - this.LastOperation = lastOperation - this.Name = name - this.OfferingName = offeringName - this.OfferingVersion = offeringVersion - this.Parameters = parameters - this.PlanId = planId - this.PlanName = planName + setInstanceGetCfGuidAttributeType(&this.CfGuid, cfGuid) + setInstanceGetCfOrganizationGuidAttributeType(&this.CfOrganizationGuid, cfOrganizationGuid) + setInstanceGetCfSpaceGuidAttributeType(&this.CfSpaceGuid, cfSpaceGuid) + setInstanceGetDashboardUrlAttributeType(&this.DashboardUrl, dashboardUrl) + setInstanceGetImageUrlAttributeType(&this.ImageUrl, imageUrl) + setInstanceGetLastOperationAttributeType(&this.LastOperation, lastOperation) + setInstanceGetNameAttributeType(&this.Name, name) + setInstanceGetOfferingNameAttributeType(&this.OfferingName, offeringName) + setInstanceGetOfferingVersionAttributeType(&this.OfferingVersion, offeringVersion) + setInstanceGetParametersAttributeType(&this.Parameters, parameters) + setInstanceGetPlanIdAttributeType(&this.PlanId, planId) + setInstanceGetPlanNameAttributeType(&this.PlanName, planName) return &this } @@ -80,379 +371,301 @@ func NewInstanceWithDefaults() *Instance { } // GetCfGuid returns the CfGuid field value -func (o *Instance) GetCfGuid() *string { - if o == nil || IsNil(o.CfGuid) { - var ret *string - return ret - } - - return o.CfGuid +func (o *Instance) GetCfGuid() (ret InstanceGetCfGuidRetType) { + ret, _ = o.GetCfGuidOk() + return ret } // GetCfGuidOk returns a tuple with the CfGuid field value // and a boolean to check if the value has been set. -func (o *Instance) GetCfGuidOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CfGuid, true +func (o *Instance) GetCfGuidOk() (ret InstanceGetCfGuidRetType, ok bool) { + return getInstanceGetCfGuidAttributeTypeOk(o.CfGuid) } // SetCfGuid sets field value -func (o *Instance) SetCfGuid(v *string) { - o.CfGuid = v +func (o *Instance) SetCfGuid(v InstanceGetCfGuidRetType) { + setInstanceGetCfGuidAttributeType(&o.CfGuid, v) } // GetCfOrganizationGuid returns the CfOrganizationGuid field value -func (o *Instance) GetCfOrganizationGuid() *string { - if o == nil || IsNil(o.CfOrganizationGuid) { - var ret *string - return ret - } - - return o.CfOrganizationGuid +func (o *Instance) GetCfOrganizationGuid() (ret InstanceGetCfOrganizationGuidRetType) { + ret, _ = o.GetCfOrganizationGuidOk() + return ret } // GetCfOrganizationGuidOk returns a tuple with the CfOrganizationGuid field value // and a boolean to check if the value has been set. -func (o *Instance) GetCfOrganizationGuidOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CfOrganizationGuid, true +func (o *Instance) GetCfOrganizationGuidOk() (ret InstanceGetCfOrganizationGuidRetType, ok bool) { + return getInstanceGetCfOrganizationGuidAttributeTypeOk(o.CfOrganizationGuid) } // SetCfOrganizationGuid sets field value -func (o *Instance) SetCfOrganizationGuid(v *string) { - o.CfOrganizationGuid = v +func (o *Instance) SetCfOrganizationGuid(v InstanceGetCfOrganizationGuidRetType) { + setInstanceGetCfOrganizationGuidAttributeType(&o.CfOrganizationGuid, v) } // GetCfSpaceGuid returns the CfSpaceGuid field value -func (o *Instance) GetCfSpaceGuid() *string { - if o == nil || IsNil(o.CfSpaceGuid) { - var ret *string - return ret - } - - return o.CfSpaceGuid +func (o *Instance) GetCfSpaceGuid() (ret InstanceGetCfSpaceGuidRetType) { + ret, _ = o.GetCfSpaceGuidOk() + return ret } // GetCfSpaceGuidOk returns a tuple with the CfSpaceGuid field value // and a boolean to check if the value has been set. -func (o *Instance) GetCfSpaceGuidOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CfSpaceGuid, true +func (o *Instance) GetCfSpaceGuidOk() (ret InstanceGetCfSpaceGuidRetType, ok bool) { + return getInstanceGetCfSpaceGuidAttributeTypeOk(o.CfSpaceGuid) } // SetCfSpaceGuid sets field value -func (o *Instance) SetCfSpaceGuid(v *string) { - o.CfSpaceGuid = v +func (o *Instance) SetCfSpaceGuid(v InstanceGetCfSpaceGuidRetType) { + setInstanceGetCfSpaceGuidAttributeType(&o.CfSpaceGuid, v) } // GetDashboardUrl returns the DashboardUrl field value -func (o *Instance) GetDashboardUrl() *string { - if o == nil || IsNil(o.DashboardUrl) { - var ret *string - return ret - } - - return o.DashboardUrl +func (o *Instance) GetDashboardUrl() (ret InstanceGetDashboardUrlRetType) { + 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 *Instance) GetDashboardUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DashboardUrl, true +func (o *Instance) GetDashboardUrlOk() (ret InstanceGetDashboardUrlRetType, ok bool) { + return getInstanceGetDashboardUrlAttributeTypeOk(o.DashboardUrl) } // SetDashboardUrl sets field value -func (o *Instance) SetDashboardUrl(v *string) { - o.DashboardUrl = v +func (o *Instance) SetDashboardUrl(v InstanceGetDashboardUrlRetType) { + setInstanceGetDashboardUrlAttributeType(&o.DashboardUrl, v) } // GetImageUrl returns the ImageUrl field value -func (o *Instance) GetImageUrl() *string { - if o == nil || IsNil(o.ImageUrl) { - var ret *string - return ret - } - - return o.ImageUrl +func (o *Instance) GetImageUrl() (ret InstanceGetImageUrlRetType) { + ret, _ = o.GetImageUrlOk() + return ret } // GetImageUrlOk returns a tuple with the ImageUrl field value // and a boolean to check if the value has been set. -func (o *Instance) GetImageUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ImageUrl, true +func (o *Instance) GetImageUrlOk() (ret InstanceGetImageUrlRetType, ok bool) { + return getInstanceGetImageUrlAttributeTypeOk(o.ImageUrl) } // SetImageUrl sets field value -func (o *Instance) SetImageUrl(v *string) { - o.ImageUrl = v +func (o *Instance) SetImageUrl(v InstanceGetImageUrlRetType) { + setInstanceGetImageUrlAttributeType(&o.ImageUrl, v) } // GetInstanceId returns the InstanceId field value if set, zero value otherwise. -func (o *Instance) GetInstanceId() *string { - if o == nil || IsNil(o.InstanceId) { - var ret *string - return ret - } - return o.InstanceId +func (o *Instance) GetInstanceId() (res InstanceGetInstanceIdRetType) { + res, _ = o.GetInstanceIdOk() + return } // GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Instance) GetInstanceIdOk() (*string, bool) { - if o == nil || IsNil(o.InstanceId) { - return nil, false - } - return o.InstanceId, true +func (o *Instance) GetInstanceIdOk() (ret InstanceGetInstanceIdRetType, ok bool) { + return getInstanceGetInstanceIdAttributeTypeOk(o.InstanceId) } // HasInstanceId returns a boolean if a field has been set. func (o *Instance) HasInstanceId() bool { - if o != nil && !IsNil(o.InstanceId) { - return true - } - - return false + _, ok := o.GetInstanceIdOk() + return ok } // SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. -func (o *Instance) SetInstanceId(v *string) { - o.InstanceId = v +func (o *Instance) SetInstanceId(v InstanceGetInstanceIdRetType) { + setInstanceGetInstanceIdAttributeType(&o.InstanceId, v) } // GetLastOperation returns the LastOperation field value -func (o *Instance) GetLastOperation() *InstanceLastOperation { - if o == nil || IsNil(o.LastOperation) { - var ret *InstanceLastOperation - return ret - } - - return o.LastOperation +func (o *Instance) GetLastOperation() (ret InstanceGetLastOperationRetType) { + ret, _ = o.GetLastOperationOk() + return ret } // GetLastOperationOk returns a tuple with the LastOperation field value // and a boolean to check if the value has been set. -func (o *Instance) GetLastOperationOk() (*InstanceLastOperation, bool) { - if o == nil { - return nil, false - } - return o.LastOperation, true +func (o *Instance) GetLastOperationOk() (ret InstanceGetLastOperationRetType, ok bool) { + return getInstanceGetLastOperationAttributeTypeOk(o.LastOperation) } // SetLastOperation sets field value -func (o *Instance) SetLastOperation(v *InstanceLastOperation) { - o.LastOperation = v +func (o *Instance) SetLastOperation(v InstanceGetLastOperationRetType) { + setInstanceGetLastOperationAttributeType(&o.LastOperation, v) } // GetName returns the Name field value -func (o *Instance) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *Instance) GetName() (ret InstanceGetNameRetType) { + 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 *Instance) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *Instance) GetNameOk() (ret InstanceGetNameRetType, ok bool) { + return getInstanceGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *Instance) SetName(v *string) { - o.Name = v +func (o *Instance) SetName(v InstanceGetNameRetType) { + setInstanceGetNameAttributeType(&o.Name, v) } // GetOfferingName returns the OfferingName field value // Deprecated -func (o *Instance) GetOfferingName() *string { - if o == nil || IsNil(o.OfferingName) { - var ret *string - return ret - } - - return o.OfferingName +func (o *Instance) GetOfferingName() (ret InstanceGetOfferingNameRetType) { + ret, _ = o.GetOfferingNameOk() + return ret } // GetOfferingNameOk returns a tuple with the OfferingName field value // and a boolean to check if the value has been set. // Deprecated -func (o *Instance) GetOfferingNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.OfferingName, true +func (o *Instance) GetOfferingNameOk() (ret InstanceGetOfferingNameRetType, ok bool) { + return getInstanceGetOfferingNameAttributeTypeOk(o.OfferingName) } // SetOfferingName sets field value // Deprecated -func (o *Instance) SetOfferingName(v *string) { - o.OfferingName = v +func (o *Instance) SetOfferingName(v InstanceGetOfferingNameRetType) { + setInstanceGetOfferingNameAttributeType(&o.OfferingName, v) } // GetOfferingVersion returns the OfferingVersion field value -func (o *Instance) GetOfferingVersion() *string { - if o == nil || IsNil(o.OfferingVersion) { - var ret *string - return ret - } - - return o.OfferingVersion +func (o *Instance) GetOfferingVersion() (ret InstanceGetOfferingVersionRetType) { + ret, _ = o.GetOfferingVersionOk() + return ret } // GetOfferingVersionOk returns a tuple with the OfferingVersion field value // and a boolean to check if the value has been set. -func (o *Instance) GetOfferingVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.OfferingVersion, true +func (o *Instance) GetOfferingVersionOk() (ret InstanceGetOfferingVersionRetType, ok bool) { + return getInstanceGetOfferingVersionAttributeTypeOk(o.OfferingVersion) } // SetOfferingVersion sets field value -func (o *Instance) SetOfferingVersion(v *string) { - o.OfferingVersion = v +func (o *Instance) SetOfferingVersion(v InstanceGetOfferingVersionRetType) { + setInstanceGetOfferingVersionAttributeType(&o.OfferingVersion, v) } // GetParameters returns the Parameters field value -func (o *Instance) GetParameters() *map[string]interface{} { - if o == nil || IsNil(o.Parameters) { - var ret *map[string]interface{} - return ret - } - - return o.Parameters +func (o *Instance) GetParameters() (ret InstanceGetParametersRetType) { + ret, _ = o.GetParametersOk() + return ret } // GetParametersOk returns a tuple with the Parameters field value // and a boolean to check if the value has been set. -func (o *Instance) GetParametersOk() (*map[string]interface{}, bool) { - if o == nil { - return &map[string]interface{}{}, false - } - return o.Parameters, true +func (o *Instance) GetParametersOk() (ret InstanceGetParametersRetType, ok bool) { + return getInstanceGetParametersAttributeTypeOk(o.Parameters) } // SetParameters sets field value -func (o *Instance) SetParameters(v *map[string]interface{}) { - o.Parameters = v +func (o *Instance) SetParameters(v InstanceGetParametersRetType) { + setInstanceGetParametersAttributeType(&o.Parameters, v) } // GetPlanId returns the PlanId field value -func (o *Instance) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - - return o.PlanId +func (o *Instance) GetPlanId() (ret InstanceGetPlanIdRetType) { + 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 *Instance) GetPlanIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PlanId, true +func (o *Instance) GetPlanIdOk() (ret InstanceGetPlanIdRetType, ok bool) { + return getInstanceGetPlanIdAttributeTypeOk(o.PlanId) } // SetPlanId sets field value -func (o *Instance) SetPlanId(v *string) { - o.PlanId = v +func (o *Instance) SetPlanId(v InstanceGetPlanIdRetType) { + setInstanceGetPlanIdAttributeType(&o.PlanId, v) } // GetPlanName returns the PlanName field value -func (o *Instance) GetPlanName() *string { - if o == nil || IsNil(o.PlanName) { - var ret *string - return ret - } - - return o.PlanName +func (o *Instance) GetPlanName() (ret InstanceGetPlanNameRetType) { + 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 *Instance) GetPlanNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PlanName, true +func (o *Instance) GetPlanNameOk() (ret InstanceGetPlanNameRetType, ok bool) { + return getInstanceGetPlanNameAttributeTypeOk(o.PlanName) } // SetPlanName sets field value -func (o *Instance) SetPlanName(v *string) { - o.PlanName = v +func (o *Instance) SetPlanName(v InstanceGetPlanNameRetType) { + setInstanceGetPlanNameAttributeType(&o.PlanName, v) } // GetStatus returns the Status field value if set, zero value otherwise. -func (o *Instance) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - return o.Status +func (o *Instance) GetStatus() (res InstanceGetStatusRetType) { + res, _ = o.GetStatusOk() + return } // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Instance) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true +func (o *Instance) GetStatusOk() (ret InstanceGetStatusRetType, ok bool) { + return getInstanceGetStatusAttributeTypeOk(o.Status) } // HasStatus returns a boolean if a field has been set. func (o *Instance) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false + _, ok := o.GetStatusOk() + return ok } // SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *Instance) SetStatus(v *string) { - o.Status = v +func (o *Instance) SetStatus(v InstanceGetStatusRetType) { + setInstanceGetStatusAttributeType(&o.Status, v) } func (o Instance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["cfGuid"] = o.CfGuid - toSerialize["cfOrganizationGuid"] = o.CfOrganizationGuid - toSerialize["cfSpaceGuid"] = o.CfSpaceGuid - toSerialize["dashboardUrl"] = o.DashboardUrl - toSerialize["imageUrl"] = o.ImageUrl - if !IsNil(o.InstanceId) { - toSerialize["instanceId"] = o.InstanceId + if val, ok := getInstanceGetCfGuidAttributeTypeOk(o.CfGuid); ok { + toSerialize["CfGuid"] = val + } + if val, ok := getInstanceGetCfOrganizationGuidAttributeTypeOk(o.CfOrganizationGuid); ok { + toSerialize["CfOrganizationGuid"] = val + } + if val, ok := getInstanceGetCfSpaceGuidAttributeTypeOk(o.CfSpaceGuid); ok { + toSerialize["CfSpaceGuid"] = val + } + if val, ok := getInstanceGetDashboardUrlAttributeTypeOk(o.DashboardUrl); ok { + toSerialize["DashboardUrl"] = val + } + if val, ok := getInstanceGetImageUrlAttributeTypeOk(o.ImageUrl); ok { + toSerialize["ImageUrl"] = val + } + if val, ok := getInstanceGetInstanceIdAttributeTypeOk(o.InstanceId); ok { + toSerialize["InstanceId"] = val + } + if val, ok := getInstanceGetLastOperationAttributeTypeOk(o.LastOperation); ok { + toSerialize["LastOperation"] = val + } + if val, ok := getInstanceGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getInstanceGetOfferingNameAttributeTypeOk(o.OfferingName); ok { + toSerialize["OfferingName"] = val + } + if val, ok := getInstanceGetOfferingVersionAttributeTypeOk(o.OfferingVersion); ok { + toSerialize["OfferingVersion"] = val + } + if val, ok := getInstanceGetParametersAttributeTypeOk(o.Parameters); ok { + toSerialize["Parameters"] = val + } + if val, ok := getInstanceGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val + } + if val, ok := getInstanceGetPlanNameAttributeTypeOk(o.PlanName); ok { + toSerialize["PlanName"] = val } - toSerialize["lastOperation"] = o.LastOperation - toSerialize["name"] = o.Name - toSerialize["offeringName"] = o.OfferingName - toSerialize["offeringVersion"] = o.OfferingVersion - toSerialize["parameters"] = o.Parameters - toSerialize["planId"] = o.PlanId - toSerialize["planName"] = o.PlanName - if !IsNil(o.Status) { - toSerialize["status"] = o.Status + if val, ok := getInstanceGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val } return toSerialize, nil } diff --git a/services/logme/model_instance_last_operation.go b/services/logme/model_instance_last_operation.go index 0c3c35bca..82df13a78 100644 --- a/services/logme/model_instance_last_operation.go +++ b/services/logme/model_instance_last_operation.go @@ -17,14 +17,75 @@ import ( // checks if the InstanceLastOperation type satisfies the MappedNullable interface at compile time var _ MappedNullable = &InstanceLastOperation{} +/* + types and functions for description +*/ + +// isNotNullableString +type InstanceLastOperationGetDescriptionAttributeType = *string + +func getInstanceLastOperationGetDescriptionAttributeTypeOk(arg InstanceLastOperationGetDescriptionAttributeType) (ret InstanceLastOperationGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceLastOperationGetDescriptionAttributeType(arg *InstanceLastOperationGetDescriptionAttributeType, val InstanceLastOperationGetDescriptionRetType) { + *arg = &val +} + +type InstanceLastOperationGetDescriptionArgType = string +type InstanceLastOperationGetDescriptionRetType = string + +/* + types and functions for state +*/ + +// isEnumRef +type InstanceLastOperationGetStateAttributeType = *string +type InstanceLastOperationGetStateArgType = string +type InstanceLastOperationGetStateRetType = string + +func getInstanceLastOperationGetStateAttributeTypeOk(arg InstanceLastOperationGetStateAttributeType) (ret InstanceLastOperationGetStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceLastOperationGetStateAttributeType(arg *InstanceLastOperationGetStateAttributeType, val InstanceLastOperationGetStateRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type InstanceLastOperationGetTypeAttributeType = *string +type InstanceLastOperationGetTypeArgType = string +type InstanceLastOperationGetTypeRetType = string + +func getInstanceLastOperationGetTypeAttributeTypeOk(arg InstanceLastOperationGetTypeAttributeType) (ret InstanceLastOperationGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceLastOperationGetTypeAttributeType(arg *InstanceLastOperationGetTypeAttributeType, val InstanceLastOperationGetTypeRetType) { + *arg = &val +} + // InstanceLastOperation struct for InstanceLastOperation type InstanceLastOperation struct { // REQUIRED - Description *string `json:"description"` + Description InstanceLastOperationGetDescriptionAttributeType `json:"description"` // REQUIRED - State *string `json:"state"` + State InstanceLastOperationGetStateAttributeType `json:"state"` // REQUIRED - Type *string `json:"type"` + Type InstanceLastOperationGetTypeAttributeType `json:"type"` } type _InstanceLastOperation InstanceLastOperation @@ -33,11 +94,11 @@ type _InstanceLastOperation InstanceLastOperation // 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 NewInstanceLastOperation(description *string, state *string, type_ *string) *InstanceLastOperation { +func NewInstanceLastOperation(description InstanceLastOperationGetDescriptionArgType, state InstanceLastOperationGetStateArgType, type_ InstanceLastOperationGetTypeArgType) *InstanceLastOperation { this := InstanceLastOperation{} - this.Description = description - this.State = state - this.Type = type_ + setInstanceLastOperationGetDescriptionAttributeType(&this.Description, description) + setInstanceLastOperationGetStateAttributeType(&this.State, state) + setInstanceLastOperationGetTypeAttributeType(&this.Type, type_) return &this } @@ -50,82 +111,67 @@ func NewInstanceLastOperationWithDefaults() *InstanceLastOperation { } // GetDescription returns the Description field value -func (o *InstanceLastOperation) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - - return o.Description +func (o *InstanceLastOperation) GetDescription() (ret InstanceLastOperationGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *InstanceLastOperation) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description, true +func (o *InstanceLastOperation) GetDescriptionOk() (ret InstanceLastOperationGetDescriptionRetType, ok bool) { + return getInstanceLastOperationGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value -func (o *InstanceLastOperation) SetDescription(v *string) { - o.Description = v +func (o *InstanceLastOperation) SetDescription(v InstanceLastOperationGetDescriptionRetType) { + setInstanceLastOperationGetDescriptionAttributeType(&o.Description, v) } // GetState returns the State field value -func (o *InstanceLastOperation) GetState() *string { - if o == nil || IsNil(o.State) { - var ret *string - return ret - } - - return o.State +func (o *InstanceLastOperation) GetState() (ret InstanceLastOperationGetStateRetType) { + ret, _ = o.GetStateOk() + return ret } // GetStateOk returns a tuple with the State field value // and a boolean to check if the value has been set. -func (o *InstanceLastOperation) GetStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.State, true +func (o *InstanceLastOperation) GetStateOk() (ret InstanceLastOperationGetStateRetType, ok bool) { + return getInstanceLastOperationGetStateAttributeTypeOk(o.State) } // SetState sets field value -func (o *InstanceLastOperation) SetState(v *string) { - o.State = v +func (o *InstanceLastOperation) SetState(v InstanceLastOperationGetStateRetType) { + setInstanceLastOperationGetStateAttributeType(&o.State, v) } // GetType returns the Type field value -func (o *InstanceLastOperation) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - - return o.Type +func (o *InstanceLastOperation) GetType() (ret InstanceLastOperationGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *InstanceLastOperation) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true +func (o *InstanceLastOperation) GetTypeOk() (ret InstanceLastOperationGetTypeRetType, ok bool) { + return getInstanceLastOperationGetTypeAttributeTypeOk(o.Type) } // SetType sets field value -func (o *InstanceLastOperation) SetType(v *string) { - o.Type = v +func (o *InstanceLastOperation) SetType(v InstanceLastOperationGetTypeRetType) { + setInstanceLastOperationGetTypeAttributeType(&o.Type, v) } func (o InstanceLastOperation) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["description"] = o.Description - toSerialize["state"] = o.State - toSerialize["type"] = o.Type + if val, ok := getInstanceLastOperationGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getInstanceLastOperationGetStateAttributeTypeOk(o.State); ok { + toSerialize["State"] = val + } + if val, ok := getInstanceLastOperationGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } return toSerialize, nil } diff --git a/services/logme/model_instance_parameters.go b/services/logme/model_instance_parameters.go index c89b1b6f2..b33d25003 100644 --- a/services/logme/model_instance_parameters.go +++ b/services/logme/model_instance_parameters.go @@ -17,47 +17,516 @@ import ( // checks if the InstanceParameters type satisfies the MappedNullable interface at compile time var _ MappedNullable = &InstanceParameters{} +/* + types and functions for enable_monitoring +*/ + +// isBoolean +type InstanceParametersgetEnableMonitoringAttributeType = *bool +type InstanceParametersgetEnableMonitoringArgType = bool +type InstanceParametersgetEnableMonitoringRetType = bool + +func getInstanceParametersgetEnableMonitoringAttributeTypeOk(arg InstanceParametersgetEnableMonitoringAttributeType) (ret InstanceParametersgetEnableMonitoringRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersgetEnableMonitoringAttributeType(arg *InstanceParametersgetEnableMonitoringAttributeType, val InstanceParametersgetEnableMonitoringRetType) { + *arg = &val +} + +/* + types and functions for fluentd-tcp +*/ + +// isInteger +type InstanceParametersGetFluentdTcpAttributeType = *int64 +type InstanceParametersGetFluentdTcpArgType = int64 +type InstanceParametersGetFluentdTcpRetType = int64 + +func getInstanceParametersGetFluentdTcpAttributeTypeOk(arg InstanceParametersGetFluentdTcpAttributeType) (ret InstanceParametersGetFluentdTcpRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetFluentdTcpAttributeType(arg *InstanceParametersGetFluentdTcpAttributeType, val InstanceParametersGetFluentdTcpRetType) { + *arg = &val +} + +/* + types and functions for fluentd-tls +*/ + +// isInteger +type InstanceParametersGetFluentdTlsAttributeType = *int64 +type InstanceParametersGetFluentdTlsArgType = int64 +type InstanceParametersGetFluentdTlsRetType = int64 + +func getInstanceParametersGetFluentdTlsAttributeTypeOk(arg InstanceParametersGetFluentdTlsAttributeType) (ret InstanceParametersGetFluentdTlsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetFluentdTlsAttributeType(arg *InstanceParametersGetFluentdTlsAttributeType, val InstanceParametersGetFluentdTlsRetType) { + *arg = &val +} + +/* + types and functions for fluentd-tls-ciphers +*/ + +// isNotNullableString +type InstanceParametersGetFluentdTlsCiphersAttributeType = *string + +func getInstanceParametersGetFluentdTlsCiphersAttributeTypeOk(arg InstanceParametersGetFluentdTlsCiphersAttributeType) (ret InstanceParametersGetFluentdTlsCiphersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetFluentdTlsCiphersAttributeType(arg *InstanceParametersGetFluentdTlsCiphersAttributeType, val InstanceParametersGetFluentdTlsCiphersRetType) { + *arg = &val +} + +type InstanceParametersGetFluentdTlsCiphersArgType = string +type InstanceParametersGetFluentdTlsCiphersRetType = string + +/* + types and functions for fluentd-tls-max-version +*/ + +// isNotNullableString +type InstanceParametersGetFluentdTlsMaxVersionAttributeType = *string + +func getInstanceParametersGetFluentdTlsMaxVersionAttributeTypeOk(arg InstanceParametersGetFluentdTlsMaxVersionAttributeType) (ret InstanceParametersGetFluentdTlsMaxVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetFluentdTlsMaxVersionAttributeType(arg *InstanceParametersGetFluentdTlsMaxVersionAttributeType, val InstanceParametersGetFluentdTlsMaxVersionRetType) { + *arg = &val +} + +type InstanceParametersGetFluentdTlsMaxVersionArgType = string +type InstanceParametersGetFluentdTlsMaxVersionRetType = string + +/* + types and functions for fluentd-tls-min-version +*/ + +// isNotNullableString +type InstanceParametersGetFluentdTlsMinVersionAttributeType = *string + +func getInstanceParametersGetFluentdTlsMinVersionAttributeTypeOk(arg InstanceParametersGetFluentdTlsMinVersionAttributeType) (ret InstanceParametersGetFluentdTlsMinVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetFluentdTlsMinVersionAttributeType(arg *InstanceParametersGetFluentdTlsMinVersionAttributeType, val InstanceParametersGetFluentdTlsMinVersionRetType) { + *arg = &val +} + +type InstanceParametersGetFluentdTlsMinVersionArgType = string +type InstanceParametersGetFluentdTlsMinVersionRetType = string + +/* + types and functions for fluentd-tls-version +*/ + +// isNotNullableString +type InstanceParametersGetFluentdTlsVersionAttributeType = *string + +func getInstanceParametersGetFluentdTlsVersionAttributeTypeOk(arg InstanceParametersGetFluentdTlsVersionAttributeType) (ret InstanceParametersGetFluentdTlsVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetFluentdTlsVersionAttributeType(arg *InstanceParametersGetFluentdTlsVersionAttributeType, val InstanceParametersGetFluentdTlsVersionRetType) { + *arg = &val +} + +type InstanceParametersGetFluentdTlsVersionArgType = string +type InstanceParametersGetFluentdTlsVersionRetType = string + +/* + types and functions for fluentd-udp +*/ + +// isInteger +type InstanceParametersGetFluentdUdpAttributeType = *int64 +type InstanceParametersGetFluentdUdpArgType = int64 +type InstanceParametersGetFluentdUdpRetType = int64 + +func getInstanceParametersGetFluentdUdpAttributeTypeOk(arg InstanceParametersGetFluentdUdpAttributeType) (ret InstanceParametersGetFluentdUdpRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetFluentdUdpAttributeType(arg *InstanceParametersGetFluentdUdpAttributeType, val InstanceParametersGetFluentdUdpRetType) { + *arg = &val +} + +/* + types and functions for graphite +*/ + +// isNotNullableString +type InstanceParametersGetGraphiteAttributeType = *string + +func getInstanceParametersGetGraphiteAttributeTypeOk(arg InstanceParametersGetGraphiteAttributeType) (ret InstanceParametersGetGraphiteRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetGraphiteAttributeType(arg *InstanceParametersGetGraphiteAttributeType, val InstanceParametersGetGraphiteRetType) { + *arg = &val +} + +type InstanceParametersGetGraphiteArgType = string +type InstanceParametersGetGraphiteRetType = string + +/* + types and functions for groks +*/ + +// isArray +type InstanceParametersGetGroksAttributeType = *[]InstanceParametersGroksInner +type InstanceParametersGetGroksArgType = []InstanceParametersGroksInner +type InstanceParametersGetGroksRetType = []InstanceParametersGroksInner + +func getInstanceParametersGetGroksAttributeTypeOk(arg InstanceParametersGetGroksAttributeType) (ret InstanceParametersGetGroksRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetGroksAttributeType(arg *InstanceParametersGetGroksAttributeType, val InstanceParametersGetGroksRetType) { + *arg = &val +} + +/* + types and functions for ism_deletion_after +*/ + +// isNotNullableString +type InstanceParametersGetIsmDeletionAfterAttributeType = *string + +func getInstanceParametersGetIsmDeletionAfterAttributeTypeOk(arg InstanceParametersGetIsmDeletionAfterAttributeType) (ret InstanceParametersGetIsmDeletionAfterRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetIsmDeletionAfterAttributeType(arg *InstanceParametersGetIsmDeletionAfterAttributeType, val InstanceParametersGetIsmDeletionAfterRetType) { + *arg = &val +} + +type InstanceParametersGetIsmDeletionAfterArgType = string +type InstanceParametersGetIsmDeletionAfterRetType = string + +/* + types and functions for ism_jitter +*/ + +// isNumber +type InstanceParametersGetIsmJitterAttributeType = *float64 +type InstanceParametersGetIsmJitterArgType = float64 +type InstanceParametersGetIsmJitterRetType = float64 + +func getInstanceParametersGetIsmJitterAttributeTypeOk(arg InstanceParametersGetIsmJitterAttributeType) (ret InstanceParametersGetIsmJitterRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetIsmJitterAttributeType(arg *InstanceParametersGetIsmJitterAttributeType, val InstanceParametersGetIsmJitterRetType) { + *arg = &val +} + +/* + types and functions for ism_job_interval +*/ + +// isInteger +type InstanceParametersGetIsmJobIntervalAttributeType = *int64 +type InstanceParametersGetIsmJobIntervalArgType = int64 +type InstanceParametersGetIsmJobIntervalRetType = int64 + +func getInstanceParametersGetIsmJobIntervalAttributeTypeOk(arg InstanceParametersGetIsmJobIntervalAttributeType) (ret InstanceParametersGetIsmJobIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetIsmJobIntervalAttributeType(arg *InstanceParametersGetIsmJobIntervalAttributeType, val InstanceParametersGetIsmJobIntervalRetType) { + *arg = &val +} + +/* + types and functions for java_heapspace +*/ + +// isInteger +type InstanceParametersGetJavaHeapspaceAttributeType = *int64 +type InstanceParametersGetJavaHeapspaceArgType = int64 +type InstanceParametersGetJavaHeapspaceRetType = int64 + +func getInstanceParametersGetJavaHeapspaceAttributeTypeOk(arg InstanceParametersGetJavaHeapspaceAttributeType) (ret InstanceParametersGetJavaHeapspaceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetJavaHeapspaceAttributeType(arg *InstanceParametersGetJavaHeapspaceAttributeType, val InstanceParametersGetJavaHeapspaceRetType) { + *arg = &val +} + +/* + types and functions for java_maxmetaspace +*/ + +// isInteger +type InstanceParametersGetJavaMaxmetaspaceAttributeType = *int64 +type InstanceParametersGetJavaMaxmetaspaceArgType = int64 +type InstanceParametersGetJavaMaxmetaspaceRetType = int64 + +func getInstanceParametersGetJavaMaxmetaspaceAttributeTypeOk(arg InstanceParametersGetJavaMaxmetaspaceAttributeType) (ret InstanceParametersGetJavaMaxmetaspaceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetJavaMaxmetaspaceAttributeType(arg *InstanceParametersGetJavaMaxmetaspaceAttributeType, val InstanceParametersGetJavaMaxmetaspaceRetType) { + *arg = &val +} + +/* + types and functions for max_disk_threshold +*/ + +// isInteger +type InstanceParametersGetMaxDiskThresholdAttributeType = *int64 +type InstanceParametersGetMaxDiskThresholdArgType = int64 +type InstanceParametersGetMaxDiskThresholdRetType = int64 + +func getInstanceParametersGetMaxDiskThresholdAttributeTypeOk(arg InstanceParametersGetMaxDiskThresholdAttributeType) (ret InstanceParametersGetMaxDiskThresholdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetMaxDiskThresholdAttributeType(arg *InstanceParametersGetMaxDiskThresholdAttributeType, val InstanceParametersGetMaxDiskThresholdRetType) { + *arg = &val +} + +/* + types and functions for metrics_frequency +*/ + +// isInteger +type InstanceParametersGetMetricsFrequencyAttributeType = *int64 +type InstanceParametersGetMetricsFrequencyArgType = int64 +type InstanceParametersGetMetricsFrequencyRetType = int64 + +func getInstanceParametersGetMetricsFrequencyAttributeTypeOk(arg InstanceParametersGetMetricsFrequencyAttributeType) (ret InstanceParametersGetMetricsFrequencyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetMetricsFrequencyAttributeType(arg *InstanceParametersGetMetricsFrequencyAttributeType, val InstanceParametersGetMetricsFrequencyRetType) { + *arg = &val +} + +/* + types and functions for metrics_prefix +*/ + +// isNotNullableString +type InstanceParametersGetMetricsPrefixAttributeType = *string + +func getInstanceParametersGetMetricsPrefixAttributeTypeOk(arg InstanceParametersGetMetricsPrefixAttributeType) (ret InstanceParametersGetMetricsPrefixRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetMetricsPrefixAttributeType(arg *InstanceParametersGetMetricsPrefixAttributeType, val InstanceParametersGetMetricsPrefixRetType) { + *arg = &val +} + +type InstanceParametersGetMetricsPrefixArgType = string +type InstanceParametersGetMetricsPrefixRetType = string + +/* + types and functions for monitoring_instance_id +*/ + +// isNotNullableString +type InstanceParametersGetMonitoringInstanceIdAttributeType = *string + +func getInstanceParametersGetMonitoringInstanceIdAttributeTypeOk(arg InstanceParametersGetMonitoringInstanceIdAttributeType) (ret InstanceParametersGetMonitoringInstanceIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetMonitoringInstanceIdAttributeType(arg *InstanceParametersGetMonitoringInstanceIdAttributeType, val InstanceParametersGetMonitoringInstanceIdRetType) { + *arg = &val +} + +type InstanceParametersGetMonitoringInstanceIdArgType = string +type InstanceParametersGetMonitoringInstanceIdRetType = string + +/* + types and functions for opensearch-tls-ciphers +*/ + +// isArray +type InstanceParametersGetOpensearchTlsCiphersAttributeType = *[]string +type InstanceParametersGetOpensearchTlsCiphersArgType = []string +type InstanceParametersGetOpensearchTlsCiphersRetType = []string + +func getInstanceParametersGetOpensearchTlsCiphersAttributeTypeOk(arg InstanceParametersGetOpensearchTlsCiphersAttributeType) (ret InstanceParametersGetOpensearchTlsCiphersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetOpensearchTlsCiphersAttributeType(arg *InstanceParametersGetOpensearchTlsCiphersAttributeType, val InstanceParametersGetOpensearchTlsCiphersRetType) { + *arg = &val +} + +/* + types and functions for opensearch-tls-protocols +*/ + +// isArray +type InstanceParametersGetOpensearchTlsProtocolsAttributeType = *[]string +type InstanceParametersGetOpensearchTlsProtocolsArgType = []string +type InstanceParametersGetOpensearchTlsProtocolsRetType = []string + +func getInstanceParametersGetOpensearchTlsProtocolsAttributeTypeOk(arg InstanceParametersGetOpensearchTlsProtocolsAttributeType) (ret InstanceParametersGetOpensearchTlsProtocolsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetOpensearchTlsProtocolsAttributeType(arg *InstanceParametersGetOpensearchTlsProtocolsAttributeType, val InstanceParametersGetOpensearchTlsProtocolsRetType) { + *arg = &val +} + +/* + types and functions for sgw_acl +*/ + +// isNotNullableString +type InstanceParametersGetSgwAclAttributeType = *string + +func getInstanceParametersGetSgwAclAttributeTypeOk(arg InstanceParametersGetSgwAclAttributeType) (ret InstanceParametersGetSgwAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetSgwAclAttributeType(arg *InstanceParametersGetSgwAclAttributeType, val InstanceParametersGetSgwAclRetType) { + *arg = &val +} + +type InstanceParametersGetSgwAclArgType = string +type InstanceParametersGetSgwAclRetType = string + +/* + types and functions for syslog +*/ + +// isArray +type InstanceParametersGetSyslogAttributeType = *[]string +type InstanceParametersGetSyslogArgType = []string +type InstanceParametersGetSyslogRetType = []string + +func getInstanceParametersGetSyslogAttributeTypeOk(arg InstanceParametersGetSyslogAttributeType) (ret InstanceParametersGetSyslogRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGetSyslogAttributeType(arg *InstanceParametersGetSyslogAttributeType, val InstanceParametersGetSyslogRetType) { + *arg = &val +} + // InstanceParameters struct for InstanceParameters type InstanceParameters struct { - EnableMonitoring *bool `json:"enable_monitoring,omitempty"` + EnableMonitoring InstanceParametersgetEnableMonitoringAttributeType `json:"enable_monitoring,omitempty"` // Can be cast to int32 without loss of precision. - FluentdTcp *int64 `json:"fluentd-tcp,omitempty"` + FluentdTcp InstanceParametersGetFluentdTcpAttributeType `json:"fluentd-tcp,omitempty"` // Can be cast to int32 without loss of precision. - FluentdTls *int64 `json:"fluentd-tls,omitempty"` - FluentdTlsCiphers *string `json:"fluentd-tls-ciphers,omitempty"` - FluentdTlsMaxVersion *string `json:"fluentd-tls-max-version,omitempty"` - FluentdTlsMinVersion *string `json:"fluentd-tls-min-version,omitempty"` - FluentdTlsVersion *string `json:"fluentd-tls-version,omitempty"` + FluentdTls InstanceParametersGetFluentdTlsAttributeType `json:"fluentd-tls,omitempty"` + FluentdTlsCiphers InstanceParametersGetFluentdTlsCiphersAttributeType `json:"fluentd-tls-ciphers,omitempty"` + FluentdTlsMaxVersion InstanceParametersGetFluentdTlsMaxVersionAttributeType `json:"fluentd-tls-max-version,omitempty"` + FluentdTlsMinVersion InstanceParametersGetFluentdTlsMinVersionAttributeType `json:"fluentd-tls-min-version,omitempty"` + FluentdTlsVersion InstanceParametersGetFluentdTlsVersionAttributeType `json:"fluentd-tls-version,omitempty"` // Can be cast to int32 without loss of precision. - FluentdUdp *int64 `json:"fluentd-udp,omitempty"` + FluentdUdp InstanceParametersGetFluentdUdpAttributeType `json:"fluentd-udp,omitempty"` // If you want to monitor your service with Graphite, you can set the custom parameter graphite. It expects the host and port where the Graphite metrics should be sent to. - Graphite *string `json:"graphite,omitempty"` - Groks *[]InstanceParametersGroksInner `json:"groks,omitempty"` + Graphite InstanceParametersGetGraphiteAttributeType `json:"graphite,omitempty"` + Groks InstanceParametersGetGroksAttributeType `json:"groks,omitempty"` // Combination of an integer and a timerange when an index will be considered 'd' and can be deleted from OpenSearch. Possible values for the timerange are s, m, h and d. - IsmDeletionAfter *string `json:"ism_deletion_after,omitempty"` - IsmJitter *float64 `json:"ism_jitter,omitempty"` + IsmDeletionAfter InstanceParametersGetIsmDeletionAfterAttributeType `json:"ism_deletion_after,omitempty"` + IsmJitter InstanceParametersGetIsmJitterAttributeType `json:"ism_jitter,omitempty"` // Can be cast to int32 without loss of precision. - IsmJobInterval *int64 `json:"ism_job_interval,omitempty"` + IsmJobInterval InstanceParametersGetIsmJobIntervalAttributeType `json:"ism_job_interval,omitempty"` // Default: not set, 46% of available memory will be used. The amount of memory (in MB) allocated as heap by the JVM for OpenSearch. // Can be cast to int32 without loss of precision. - JavaHeapspace *int64 `json:"java_heapspace,omitempty"` + JavaHeapspace InstanceParametersGetJavaHeapspaceAttributeType `json:"java_heapspace,omitempty"` // The amount of memory (in MB) used by the JVM to store metadata for OpenSearch. // Can be cast to int32 without loss of precision. - JavaMaxmetaspace *int64 `json:"java_maxmetaspace,omitempty"` + JavaMaxmetaspace InstanceParametersGetJavaMaxmetaspaceAttributeType `json:"java_maxmetaspace,omitempty"` // This component monitors ephemeral and persistent disk usage. If one of these disk usages reaches the default configured threshold of 80%, the a9s Parachute stops all processes on that node. // Can be cast to int32 without loss of precision. - MaxDiskThreshold *int64 `json:"max_disk_threshold,omitempty"` + MaxDiskThreshold InstanceParametersGetMaxDiskThresholdAttributeType `json:"max_disk_threshold,omitempty"` // Frequency of metrics being emitted in seconds // Can be cast to int32 without loss of precision. - MetricsFrequency *int64 `json:"metrics_frequency,omitempty"` + MetricsFrequency InstanceParametersGetMetricsFrequencyAttributeType `json:"metrics_frequency,omitempty"` // Depending on your graphite provider, you might need to prefix the metrics with a certain value, like an API key for example. - MetricsPrefix *string `json:"metrics_prefix,omitempty"` - MonitoringInstanceId *string `json:"monitoring_instance_id,omitempty"` - OpensearchTlsCiphers *[]string `json:"opensearch-tls-ciphers,omitempty"` - OpensearchTlsProtocols *[]string `json:"opensearch-tls-protocols,omitempty"` + MetricsPrefix InstanceParametersGetMetricsPrefixAttributeType `json:"metrics_prefix,omitempty"` + MonitoringInstanceId InstanceParametersGetMonitoringInstanceIdAttributeType `json:"monitoring_instance_id,omitempty"` + OpensearchTlsCiphers InstanceParametersGetOpensearchTlsCiphersAttributeType `json:"opensearch-tls-ciphers,omitempty"` + OpensearchTlsProtocols InstanceParametersGetOpensearchTlsProtocolsAttributeType `json:"opensearch-tls-protocols,omitempty"` // Comma separated list of IP networks in CIDR notation which are allowed to access this instance. - SgwAcl *string `json:"sgw_acl,omitempty"` - Syslog *[]string `json:"syslog,omitempty"` + SgwAcl InstanceParametersGetSgwAclAttributeType `json:"sgw_acl,omitempty"` + Syslog InstanceParametersGetSyslogAttributeType `json:"syslog,omitempty"` } // NewInstanceParameters instantiates a new InstanceParameters object @@ -66,26 +535,6 @@ type InstanceParameters struct { // will change when the set of required properties is changed func NewInstanceParameters() *InstanceParameters { this := InstanceParameters{} - var enableMonitoring bool = false - this.EnableMonitoring = &enableMonitoring - var fluentdTcp int64 = 0 - this.FluentdTcp = &fluentdTcp - var fluentdTls int64 = 6514 - this.FluentdTls = &fluentdTls - var fluentdUdp int64 = 514 - this.FluentdUdp = &fluentdUdp - var ismDeletionAfter string = "30d" - this.IsmDeletionAfter = &ismDeletionAfter - var ismJitter float64 = 0.6 - this.IsmJitter = &ismJitter - var ismJobInterval int64 = 5 - this.IsmJobInterval = &ismJobInterval - var javaMaxmetaspace int64 = 512 - this.JavaMaxmetaspace = &javaMaxmetaspace - var maxDiskThreshold int64 = 80 - this.MaxDiskThreshold = &maxDiskThreshold - var metricsFrequency int64 = 10 - this.MetricsFrequency = &metricsFrequency return &this } @@ -118,811 +567,604 @@ func NewInstanceParametersWithDefaults() *InstanceParameters { } // GetEnableMonitoring returns the EnableMonitoring field value if set, zero value otherwise. -func (o *InstanceParameters) GetEnableMonitoring() *bool { - if o == nil || IsNil(o.EnableMonitoring) { - var ret *bool - return ret - } - return o.EnableMonitoring +func (o *InstanceParameters) GetEnableMonitoring() (res InstanceParametersgetEnableMonitoringRetType) { + res, _ = o.GetEnableMonitoringOk() + return } // GetEnableMonitoringOk returns a tuple with the EnableMonitoring field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetEnableMonitoringOk() (*bool, bool) { - if o == nil || IsNil(o.EnableMonitoring) { - return nil, false - } - return o.EnableMonitoring, true +func (o *InstanceParameters) GetEnableMonitoringOk() (ret InstanceParametersgetEnableMonitoringRetType, ok bool) { + return getInstanceParametersgetEnableMonitoringAttributeTypeOk(o.EnableMonitoring) } // HasEnableMonitoring returns a boolean if a field has been set. func (o *InstanceParameters) HasEnableMonitoring() bool { - if o != nil && !IsNil(o.EnableMonitoring) { - return true - } - - return false + _, ok := o.GetEnableMonitoringOk() + return ok } // SetEnableMonitoring gets a reference to the given bool and assigns it to the EnableMonitoring field. -func (o *InstanceParameters) SetEnableMonitoring(v *bool) { - o.EnableMonitoring = v +func (o *InstanceParameters) SetEnableMonitoring(v InstanceParametersgetEnableMonitoringRetType) { + setInstanceParametersgetEnableMonitoringAttributeType(&o.EnableMonitoring, v) } // GetFluentdTcp returns the FluentdTcp field value if set, zero value otherwise. -func (o *InstanceParameters) GetFluentdTcp() *int64 { - if o == nil || IsNil(o.FluentdTcp) { - var ret *int64 - return ret - } - return o.FluentdTcp +func (o *InstanceParameters) GetFluentdTcp() (res InstanceParametersGetFluentdTcpRetType) { + res, _ = o.GetFluentdTcpOk() + return } // GetFluentdTcpOk returns a tuple with the FluentdTcp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetFluentdTcpOk() (*int64, bool) { - if o == nil || IsNil(o.FluentdTcp) { - return nil, false - } - return o.FluentdTcp, true +func (o *InstanceParameters) GetFluentdTcpOk() (ret InstanceParametersGetFluentdTcpRetType, ok bool) { + return getInstanceParametersGetFluentdTcpAttributeTypeOk(o.FluentdTcp) } // HasFluentdTcp returns a boolean if a field has been set. func (o *InstanceParameters) HasFluentdTcp() bool { - if o != nil && !IsNil(o.FluentdTcp) { - return true - } - - return false + _, ok := o.GetFluentdTcpOk() + return ok } // SetFluentdTcp gets a reference to the given int64 and assigns it to the FluentdTcp field. -func (o *InstanceParameters) SetFluentdTcp(v *int64) { - o.FluentdTcp = v +func (o *InstanceParameters) SetFluentdTcp(v InstanceParametersGetFluentdTcpRetType) { + setInstanceParametersGetFluentdTcpAttributeType(&o.FluentdTcp, v) } // GetFluentdTls returns the FluentdTls field value if set, zero value otherwise. -func (o *InstanceParameters) GetFluentdTls() *int64 { - if o == nil || IsNil(o.FluentdTls) { - var ret *int64 - return ret - } - return o.FluentdTls +func (o *InstanceParameters) GetFluentdTls() (res InstanceParametersGetFluentdTlsRetType) { + res, _ = o.GetFluentdTlsOk() + return } // GetFluentdTlsOk returns a tuple with the FluentdTls field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetFluentdTlsOk() (*int64, bool) { - if o == nil || IsNil(o.FluentdTls) { - return nil, false - } - return o.FluentdTls, true +func (o *InstanceParameters) GetFluentdTlsOk() (ret InstanceParametersGetFluentdTlsRetType, ok bool) { + return getInstanceParametersGetFluentdTlsAttributeTypeOk(o.FluentdTls) } // HasFluentdTls returns a boolean if a field has been set. func (o *InstanceParameters) HasFluentdTls() bool { - if o != nil && !IsNil(o.FluentdTls) { - return true - } - - return false + _, ok := o.GetFluentdTlsOk() + return ok } // SetFluentdTls gets a reference to the given int64 and assigns it to the FluentdTls field. -func (o *InstanceParameters) SetFluentdTls(v *int64) { - o.FluentdTls = v +func (o *InstanceParameters) SetFluentdTls(v InstanceParametersGetFluentdTlsRetType) { + setInstanceParametersGetFluentdTlsAttributeType(&o.FluentdTls, v) } // GetFluentdTlsCiphers returns the FluentdTlsCiphers field value if set, zero value otherwise. -func (o *InstanceParameters) GetFluentdTlsCiphers() *string { - if o == nil || IsNil(o.FluentdTlsCiphers) { - var ret *string - return ret - } - return o.FluentdTlsCiphers +func (o *InstanceParameters) GetFluentdTlsCiphers() (res InstanceParametersGetFluentdTlsCiphersRetType) { + res, _ = o.GetFluentdTlsCiphersOk() + return } // GetFluentdTlsCiphersOk returns a tuple with the FluentdTlsCiphers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetFluentdTlsCiphersOk() (*string, bool) { - if o == nil || IsNil(o.FluentdTlsCiphers) { - return nil, false - } - return o.FluentdTlsCiphers, true +func (o *InstanceParameters) GetFluentdTlsCiphersOk() (ret InstanceParametersGetFluentdTlsCiphersRetType, ok bool) { + return getInstanceParametersGetFluentdTlsCiphersAttributeTypeOk(o.FluentdTlsCiphers) } // HasFluentdTlsCiphers returns a boolean if a field has been set. func (o *InstanceParameters) HasFluentdTlsCiphers() bool { - if o != nil && !IsNil(o.FluentdTlsCiphers) { - return true - } - - return false + _, ok := o.GetFluentdTlsCiphersOk() + return ok } // SetFluentdTlsCiphers gets a reference to the given string and assigns it to the FluentdTlsCiphers field. -func (o *InstanceParameters) SetFluentdTlsCiphers(v *string) { - o.FluentdTlsCiphers = v +func (o *InstanceParameters) SetFluentdTlsCiphers(v InstanceParametersGetFluentdTlsCiphersRetType) { + setInstanceParametersGetFluentdTlsCiphersAttributeType(&o.FluentdTlsCiphers, v) } // GetFluentdTlsMaxVersion returns the FluentdTlsMaxVersion field value if set, zero value otherwise. -func (o *InstanceParameters) GetFluentdTlsMaxVersion() *string { - if o == nil || IsNil(o.FluentdTlsMaxVersion) { - var ret *string - return ret - } - return o.FluentdTlsMaxVersion +func (o *InstanceParameters) GetFluentdTlsMaxVersion() (res InstanceParametersGetFluentdTlsMaxVersionRetType) { + res, _ = o.GetFluentdTlsMaxVersionOk() + return } // GetFluentdTlsMaxVersionOk returns a tuple with the FluentdTlsMaxVersion field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetFluentdTlsMaxVersionOk() (*string, bool) { - if o == nil || IsNil(o.FluentdTlsMaxVersion) { - return nil, false - } - return o.FluentdTlsMaxVersion, true +func (o *InstanceParameters) GetFluentdTlsMaxVersionOk() (ret InstanceParametersGetFluentdTlsMaxVersionRetType, ok bool) { + return getInstanceParametersGetFluentdTlsMaxVersionAttributeTypeOk(o.FluentdTlsMaxVersion) } // HasFluentdTlsMaxVersion returns a boolean if a field has been set. func (o *InstanceParameters) HasFluentdTlsMaxVersion() bool { - if o != nil && !IsNil(o.FluentdTlsMaxVersion) { - return true - } - - return false + _, ok := o.GetFluentdTlsMaxVersionOk() + return ok } // SetFluentdTlsMaxVersion gets a reference to the given string and assigns it to the FluentdTlsMaxVersion field. -func (o *InstanceParameters) SetFluentdTlsMaxVersion(v *string) { - o.FluentdTlsMaxVersion = v +func (o *InstanceParameters) SetFluentdTlsMaxVersion(v InstanceParametersGetFluentdTlsMaxVersionRetType) { + setInstanceParametersGetFluentdTlsMaxVersionAttributeType(&o.FluentdTlsMaxVersion, v) } // GetFluentdTlsMinVersion returns the FluentdTlsMinVersion field value if set, zero value otherwise. -func (o *InstanceParameters) GetFluentdTlsMinVersion() *string { - if o == nil || IsNil(o.FluentdTlsMinVersion) { - var ret *string - return ret - } - return o.FluentdTlsMinVersion +func (o *InstanceParameters) GetFluentdTlsMinVersion() (res InstanceParametersGetFluentdTlsMinVersionRetType) { + res, _ = o.GetFluentdTlsMinVersionOk() + return } // GetFluentdTlsMinVersionOk returns a tuple with the FluentdTlsMinVersion field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetFluentdTlsMinVersionOk() (*string, bool) { - if o == nil || IsNil(o.FluentdTlsMinVersion) { - return nil, false - } - return o.FluentdTlsMinVersion, true +func (o *InstanceParameters) GetFluentdTlsMinVersionOk() (ret InstanceParametersGetFluentdTlsMinVersionRetType, ok bool) { + return getInstanceParametersGetFluentdTlsMinVersionAttributeTypeOk(o.FluentdTlsMinVersion) } // HasFluentdTlsMinVersion returns a boolean if a field has been set. func (o *InstanceParameters) HasFluentdTlsMinVersion() bool { - if o != nil && !IsNil(o.FluentdTlsMinVersion) { - return true - } - - return false + _, ok := o.GetFluentdTlsMinVersionOk() + return ok } // SetFluentdTlsMinVersion gets a reference to the given string and assigns it to the FluentdTlsMinVersion field. -func (o *InstanceParameters) SetFluentdTlsMinVersion(v *string) { - o.FluentdTlsMinVersion = v +func (o *InstanceParameters) SetFluentdTlsMinVersion(v InstanceParametersGetFluentdTlsMinVersionRetType) { + setInstanceParametersGetFluentdTlsMinVersionAttributeType(&o.FluentdTlsMinVersion, v) } // GetFluentdTlsVersion returns the FluentdTlsVersion field value if set, zero value otherwise. -func (o *InstanceParameters) GetFluentdTlsVersion() *string { - if o == nil || IsNil(o.FluentdTlsVersion) { - var ret *string - return ret - } - return o.FluentdTlsVersion +func (o *InstanceParameters) GetFluentdTlsVersion() (res InstanceParametersGetFluentdTlsVersionRetType) { + res, _ = o.GetFluentdTlsVersionOk() + return } // GetFluentdTlsVersionOk returns a tuple with the FluentdTlsVersion field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetFluentdTlsVersionOk() (*string, bool) { - if o == nil || IsNil(o.FluentdTlsVersion) { - return nil, false - } - return o.FluentdTlsVersion, true +func (o *InstanceParameters) GetFluentdTlsVersionOk() (ret InstanceParametersGetFluentdTlsVersionRetType, ok bool) { + return getInstanceParametersGetFluentdTlsVersionAttributeTypeOk(o.FluentdTlsVersion) } // HasFluentdTlsVersion returns a boolean if a field has been set. func (o *InstanceParameters) HasFluentdTlsVersion() bool { - if o != nil && !IsNil(o.FluentdTlsVersion) { - return true - } - - return false + _, ok := o.GetFluentdTlsVersionOk() + return ok } // SetFluentdTlsVersion gets a reference to the given string and assigns it to the FluentdTlsVersion field. -func (o *InstanceParameters) SetFluentdTlsVersion(v *string) { - o.FluentdTlsVersion = v +func (o *InstanceParameters) SetFluentdTlsVersion(v InstanceParametersGetFluentdTlsVersionRetType) { + setInstanceParametersGetFluentdTlsVersionAttributeType(&o.FluentdTlsVersion, v) } // GetFluentdUdp returns the FluentdUdp field value if set, zero value otherwise. -func (o *InstanceParameters) GetFluentdUdp() *int64 { - if o == nil || IsNil(o.FluentdUdp) { - var ret *int64 - return ret - } - return o.FluentdUdp +func (o *InstanceParameters) GetFluentdUdp() (res InstanceParametersGetFluentdUdpRetType) { + res, _ = o.GetFluentdUdpOk() + return } // GetFluentdUdpOk returns a tuple with the FluentdUdp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetFluentdUdpOk() (*int64, bool) { - if o == nil || IsNil(o.FluentdUdp) { - return nil, false - } - return o.FluentdUdp, true +func (o *InstanceParameters) GetFluentdUdpOk() (ret InstanceParametersGetFluentdUdpRetType, ok bool) { + return getInstanceParametersGetFluentdUdpAttributeTypeOk(o.FluentdUdp) } // HasFluentdUdp returns a boolean if a field has been set. func (o *InstanceParameters) HasFluentdUdp() bool { - if o != nil && !IsNil(o.FluentdUdp) { - return true - } - - return false + _, ok := o.GetFluentdUdpOk() + return ok } // SetFluentdUdp gets a reference to the given int64 and assigns it to the FluentdUdp field. -func (o *InstanceParameters) SetFluentdUdp(v *int64) { - o.FluentdUdp = v +func (o *InstanceParameters) SetFluentdUdp(v InstanceParametersGetFluentdUdpRetType) { + setInstanceParametersGetFluentdUdpAttributeType(&o.FluentdUdp, v) } // GetGraphite returns the Graphite field value if set, zero value otherwise. -func (o *InstanceParameters) GetGraphite() *string { - if o == nil || IsNil(o.Graphite) { - var ret *string - return ret - } - return o.Graphite +func (o *InstanceParameters) GetGraphite() (res InstanceParametersGetGraphiteRetType) { + res, _ = o.GetGraphiteOk() + return } // GetGraphiteOk returns a tuple with the Graphite field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetGraphiteOk() (*string, bool) { - if o == nil || IsNil(o.Graphite) { - return nil, false - } - return o.Graphite, true +func (o *InstanceParameters) GetGraphiteOk() (ret InstanceParametersGetGraphiteRetType, ok bool) { + return getInstanceParametersGetGraphiteAttributeTypeOk(o.Graphite) } // HasGraphite returns a boolean if a field has been set. func (o *InstanceParameters) HasGraphite() bool { - if o != nil && !IsNil(o.Graphite) { - return true - } - - return false + _, ok := o.GetGraphiteOk() + return ok } // SetGraphite gets a reference to the given string and assigns it to the Graphite field. -func (o *InstanceParameters) SetGraphite(v *string) { - o.Graphite = v +func (o *InstanceParameters) SetGraphite(v InstanceParametersGetGraphiteRetType) { + setInstanceParametersGetGraphiteAttributeType(&o.Graphite, v) } // GetGroks returns the Groks field value if set, zero value otherwise. -func (o *InstanceParameters) GetGroks() *[]InstanceParametersGroksInner { - if o == nil || IsNil(o.Groks) { - var ret *[]InstanceParametersGroksInner - return ret - } - return o.Groks +func (o *InstanceParameters) GetGroks() (res InstanceParametersGetGroksRetType) { + res, _ = o.GetGroksOk() + return } // GetGroksOk returns a tuple with the Groks field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetGroksOk() (*[]InstanceParametersGroksInner, bool) { - if o == nil || IsNil(o.Groks) { - return nil, false - } - return o.Groks, true +func (o *InstanceParameters) GetGroksOk() (ret InstanceParametersGetGroksRetType, ok bool) { + return getInstanceParametersGetGroksAttributeTypeOk(o.Groks) } // HasGroks returns a boolean if a field has been set. func (o *InstanceParameters) HasGroks() bool { - if o != nil && !IsNil(o.Groks) { - return true - } - - return false + _, ok := o.GetGroksOk() + return ok } // SetGroks gets a reference to the given []InstanceParametersGroksInner and assigns it to the Groks field. -func (o *InstanceParameters) SetGroks(v *[]InstanceParametersGroksInner) { - o.Groks = v +func (o *InstanceParameters) SetGroks(v InstanceParametersGetGroksRetType) { + setInstanceParametersGetGroksAttributeType(&o.Groks, v) } // GetIsmDeletionAfter returns the IsmDeletionAfter field value if set, zero value otherwise. -func (o *InstanceParameters) GetIsmDeletionAfter() *string { - if o == nil || IsNil(o.IsmDeletionAfter) { - var ret *string - return ret - } - return o.IsmDeletionAfter +func (o *InstanceParameters) GetIsmDeletionAfter() (res InstanceParametersGetIsmDeletionAfterRetType) { + res, _ = o.GetIsmDeletionAfterOk() + return } // GetIsmDeletionAfterOk returns a tuple with the IsmDeletionAfter field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetIsmDeletionAfterOk() (*string, bool) { - if o == nil || IsNil(o.IsmDeletionAfter) { - return nil, false - } - return o.IsmDeletionAfter, true +func (o *InstanceParameters) GetIsmDeletionAfterOk() (ret InstanceParametersGetIsmDeletionAfterRetType, ok bool) { + return getInstanceParametersGetIsmDeletionAfterAttributeTypeOk(o.IsmDeletionAfter) } // HasIsmDeletionAfter returns a boolean if a field has been set. func (o *InstanceParameters) HasIsmDeletionAfter() bool { - if o != nil && !IsNil(o.IsmDeletionAfter) { - return true - } - - return false + _, ok := o.GetIsmDeletionAfterOk() + return ok } // SetIsmDeletionAfter gets a reference to the given string and assigns it to the IsmDeletionAfter field. -func (o *InstanceParameters) SetIsmDeletionAfter(v *string) { - o.IsmDeletionAfter = v +func (o *InstanceParameters) SetIsmDeletionAfter(v InstanceParametersGetIsmDeletionAfterRetType) { + setInstanceParametersGetIsmDeletionAfterAttributeType(&o.IsmDeletionAfter, v) } // GetIsmJitter returns the IsmJitter field value if set, zero value otherwise. -func (o *InstanceParameters) GetIsmJitter() *float64 { - if o == nil || IsNil(o.IsmJitter) { - var ret *float64 - return ret - } - return o.IsmJitter +func (o *InstanceParameters) GetIsmJitter() (res InstanceParametersGetIsmJitterRetType) { + res, _ = o.GetIsmJitterOk() + return } // GetIsmJitterOk returns a tuple with the IsmJitter field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetIsmJitterOk() (*float64, bool) { - if o == nil || IsNil(o.IsmJitter) { - return nil, false - } - return o.IsmJitter, true +func (o *InstanceParameters) GetIsmJitterOk() (ret InstanceParametersGetIsmJitterRetType, ok bool) { + return getInstanceParametersGetIsmJitterAttributeTypeOk(o.IsmJitter) } // HasIsmJitter returns a boolean if a field has been set. func (o *InstanceParameters) HasIsmJitter() bool { - if o != nil && !IsNil(o.IsmJitter) { - return true - } - - return false + _, ok := o.GetIsmJitterOk() + return ok } // SetIsmJitter gets a reference to the given float64 and assigns it to the IsmJitter field. -func (o *InstanceParameters) SetIsmJitter(v *float64) { - o.IsmJitter = v +func (o *InstanceParameters) SetIsmJitter(v InstanceParametersGetIsmJitterRetType) { + setInstanceParametersGetIsmJitterAttributeType(&o.IsmJitter, v) } // GetIsmJobInterval returns the IsmJobInterval field value if set, zero value otherwise. -func (o *InstanceParameters) GetIsmJobInterval() *int64 { - if o == nil || IsNil(o.IsmJobInterval) { - var ret *int64 - return ret - } - return o.IsmJobInterval +func (o *InstanceParameters) GetIsmJobInterval() (res InstanceParametersGetIsmJobIntervalRetType) { + res, _ = o.GetIsmJobIntervalOk() + return } // GetIsmJobIntervalOk returns a tuple with the IsmJobInterval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetIsmJobIntervalOk() (*int64, bool) { - if o == nil || IsNil(o.IsmJobInterval) { - return nil, false - } - return o.IsmJobInterval, true +func (o *InstanceParameters) GetIsmJobIntervalOk() (ret InstanceParametersGetIsmJobIntervalRetType, ok bool) { + return getInstanceParametersGetIsmJobIntervalAttributeTypeOk(o.IsmJobInterval) } // HasIsmJobInterval returns a boolean if a field has been set. func (o *InstanceParameters) HasIsmJobInterval() bool { - if o != nil && !IsNil(o.IsmJobInterval) { - return true - } - - return false + _, ok := o.GetIsmJobIntervalOk() + return ok } // SetIsmJobInterval gets a reference to the given int64 and assigns it to the IsmJobInterval field. -func (o *InstanceParameters) SetIsmJobInterval(v *int64) { - o.IsmJobInterval = v +func (o *InstanceParameters) SetIsmJobInterval(v InstanceParametersGetIsmJobIntervalRetType) { + setInstanceParametersGetIsmJobIntervalAttributeType(&o.IsmJobInterval, v) } // GetJavaHeapspace returns the JavaHeapspace field value if set, zero value otherwise. -func (o *InstanceParameters) GetJavaHeapspace() *int64 { - if o == nil || IsNil(o.JavaHeapspace) { - var ret *int64 - return ret - } - return o.JavaHeapspace +func (o *InstanceParameters) GetJavaHeapspace() (res InstanceParametersGetJavaHeapspaceRetType) { + res, _ = o.GetJavaHeapspaceOk() + return } // GetJavaHeapspaceOk returns a tuple with the JavaHeapspace field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetJavaHeapspaceOk() (*int64, bool) { - if o == nil || IsNil(o.JavaHeapspace) { - return nil, false - } - return o.JavaHeapspace, true +func (o *InstanceParameters) GetJavaHeapspaceOk() (ret InstanceParametersGetJavaHeapspaceRetType, ok bool) { + return getInstanceParametersGetJavaHeapspaceAttributeTypeOk(o.JavaHeapspace) } // HasJavaHeapspace returns a boolean if a field has been set. func (o *InstanceParameters) HasJavaHeapspace() bool { - if o != nil && !IsNil(o.JavaHeapspace) { - return true - } - - return false + _, ok := o.GetJavaHeapspaceOk() + return ok } // SetJavaHeapspace gets a reference to the given int64 and assigns it to the JavaHeapspace field. -func (o *InstanceParameters) SetJavaHeapspace(v *int64) { - o.JavaHeapspace = v +func (o *InstanceParameters) SetJavaHeapspace(v InstanceParametersGetJavaHeapspaceRetType) { + setInstanceParametersGetJavaHeapspaceAttributeType(&o.JavaHeapspace, v) } // GetJavaMaxmetaspace returns the JavaMaxmetaspace field value if set, zero value otherwise. -func (o *InstanceParameters) GetJavaMaxmetaspace() *int64 { - if o == nil || IsNil(o.JavaMaxmetaspace) { - var ret *int64 - return ret - } - return o.JavaMaxmetaspace +func (o *InstanceParameters) GetJavaMaxmetaspace() (res InstanceParametersGetJavaMaxmetaspaceRetType) { + res, _ = o.GetJavaMaxmetaspaceOk() + return } // GetJavaMaxmetaspaceOk returns a tuple with the JavaMaxmetaspace field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetJavaMaxmetaspaceOk() (*int64, bool) { - if o == nil || IsNil(o.JavaMaxmetaspace) { - return nil, false - } - return o.JavaMaxmetaspace, true +func (o *InstanceParameters) GetJavaMaxmetaspaceOk() (ret InstanceParametersGetJavaMaxmetaspaceRetType, ok bool) { + return getInstanceParametersGetJavaMaxmetaspaceAttributeTypeOk(o.JavaMaxmetaspace) } // HasJavaMaxmetaspace returns a boolean if a field has been set. func (o *InstanceParameters) HasJavaMaxmetaspace() bool { - if o != nil && !IsNil(o.JavaMaxmetaspace) { - return true - } - - return false + _, ok := o.GetJavaMaxmetaspaceOk() + return ok } // SetJavaMaxmetaspace gets a reference to the given int64 and assigns it to the JavaMaxmetaspace field. -func (o *InstanceParameters) SetJavaMaxmetaspace(v *int64) { - o.JavaMaxmetaspace = v +func (o *InstanceParameters) SetJavaMaxmetaspace(v InstanceParametersGetJavaMaxmetaspaceRetType) { + setInstanceParametersGetJavaMaxmetaspaceAttributeType(&o.JavaMaxmetaspace, v) } // GetMaxDiskThreshold returns the MaxDiskThreshold field value if set, zero value otherwise. -func (o *InstanceParameters) GetMaxDiskThreshold() *int64 { - if o == nil || IsNil(o.MaxDiskThreshold) { - var ret *int64 - return ret - } - return o.MaxDiskThreshold +func (o *InstanceParameters) GetMaxDiskThreshold() (res InstanceParametersGetMaxDiskThresholdRetType) { + res, _ = o.GetMaxDiskThresholdOk() + return } // GetMaxDiskThresholdOk returns a tuple with the MaxDiskThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetMaxDiskThresholdOk() (*int64, bool) { - if o == nil || IsNil(o.MaxDiskThreshold) { - return nil, false - } - return o.MaxDiskThreshold, true +func (o *InstanceParameters) GetMaxDiskThresholdOk() (ret InstanceParametersGetMaxDiskThresholdRetType, ok bool) { + return getInstanceParametersGetMaxDiskThresholdAttributeTypeOk(o.MaxDiskThreshold) } // HasMaxDiskThreshold returns a boolean if a field has been set. func (o *InstanceParameters) HasMaxDiskThreshold() bool { - if o != nil && !IsNil(o.MaxDiskThreshold) { - return true - } - - return false + _, ok := o.GetMaxDiskThresholdOk() + return ok } // SetMaxDiskThreshold gets a reference to the given int64 and assigns it to the MaxDiskThreshold field. -func (o *InstanceParameters) SetMaxDiskThreshold(v *int64) { - o.MaxDiskThreshold = v +func (o *InstanceParameters) SetMaxDiskThreshold(v InstanceParametersGetMaxDiskThresholdRetType) { + setInstanceParametersGetMaxDiskThresholdAttributeType(&o.MaxDiskThreshold, v) } // GetMetricsFrequency returns the MetricsFrequency field value if set, zero value otherwise. -func (o *InstanceParameters) GetMetricsFrequency() *int64 { - if o == nil || IsNil(o.MetricsFrequency) { - var ret *int64 - return ret - } - return o.MetricsFrequency +func (o *InstanceParameters) GetMetricsFrequency() (res InstanceParametersGetMetricsFrequencyRetType) { + res, _ = o.GetMetricsFrequencyOk() + return } // GetMetricsFrequencyOk returns a tuple with the MetricsFrequency field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetMetricsFrequencyOk() (*int64, bool) { - if o == nil || IsNil(o.MetricsFrequency) { - return nil, false - } - return o.MetricsFrequency, true +func (o *InstanceParameters) GetMetricsFrequencyOk() (ret InstanceParametersGetMetricsFrequencyRetType, ok bool) { + return getInstanceParametersGetMetricsFrequencyAttributeTypeOk(o.MetricsFrequency) } // HasMetricsFrequency returns a boolean if a field has been set. func (o *InstanceParameters) HasMetricsFrequency() bool { - if o != nil && !IsNil(o.MetricsFrequency) { - return true - } - - return false + _, ok := o.GetMetricsFrequencyOk() + return ok } // SetMetricsFrequency gets a reference to the given int64 and assigns it to the MetricsFrequency field. -func (o *InstanceParameters) SetMetricsFrequency(v *int64) { - o.MetricsFrequency = v +func (o *InstanceParameters) SetMetricsFrequency(v InstanceParametersGetMetricsFrequencyRetType) { + setInstanceParametersGetMetricsFrequencyAttributeType(&o.MetricsFrequency, v) } // GetMetricsPrefix returns the MetricsPrefix field value if set, zero value otherwise. -func (o *InstanceParameters) GetMetricsPrefix() *string { - if o == nil || IsNil(o.MetricsPrefix) { - var ret *string - return ret - } - return o.MetricsPrefix +func (o *InstanceParameters) GetMetricsPrefix() (res InstanceParametersGetMetricsPrefixRetType) { + res, _ = o.GetMetricsPrefixOk() + return } // GetMetricsPrefixOk returns a tuple with the MetricsPrefix field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetMetricsPrefixOk() (*string, bool) { - if o == nil || IsNil(o.MetricsPrefix) { - return nil, false - } - return o.MetricsPrefix, true +func (o *InstanceParameters) GetMetricsPrefixOk() (ret InstanceParametersGetMetricsPrefixRetType, ok bool) { + return getInstanceParametersGetMetricsPrefixAttributeTypeOk(o.MetricsPrefix) } // HasMetricsPrefix returns a boolean if a field has been set. func (o *InstanceParameters) HasMetricsPrefix() bool { - if o != nil && !IsNil(o.MetricsPrefix) { - return true - } - - return false + _, ok := o.GetMetricsPrefixOk() + return ok } // SetMetricsPrefix gets a reference to the given string and assigns it to the MetricsPrefix field. -func (o *InstanceParameters) SetMetricsPrefix(v *string) { - o.MetricsPrefix = v +func (o *InstanceParameters) SetMetricsPrefix(v InstanceParametersGetMetricsPrefixRetType) { + setInstanceParametersGetMetricsPrefixAttributeType(&o.MetricsPrefix, v) } // GetMonitoringInstanceId returns the MonitoringInstanceId field value if set, zero value otherwise. -func (o *InstanceParameters) GetMonitoringInstanceId() *string { - if o == nil || IsNil(o.MonitoringInstanceId) { - var ret *string - return ret - } - return o.MonitoringInstanceId +func (o *InstanceParameters) GetMonitoringInstanceId() (res InstanceParametersGetMonitoringInstanceIdRetType) { + res, _ = o.GetMonitoringInstanceIdOk() + return } // GetMonitoringInstanceIdOk returns a tuple with the MonitoringInstanceId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetMonitoringInstanceIdOk() (*string, bool) { - if o == nil || IsNil(o.MonitoringInstanceId) { - return nil, false - } - return o.MonitoringInstanceId, true +func (o *InstanceParameters) GetMonitoringInstanceIdOk() (ret InstanceParametersGetMonitoringInstanceIdRetType, ok bool) { + return getInstanceParametersGetMonitoringInstanceIdAttributeTypeOk(o.MonitoringInstanceId) } // HasMonitoringInstanceId returns a boolean if a field has been set. func (o *InstanceParameters) HasMonitoringInstanceId() bool { - if o != nil && !IsNil(o.MonitoringInstanceId) { - return true - } - - return false + _, ok := o.GetMonitoringInstanceIdOk() + return ok } // SetMonitoringInstanceId gets a reference to the given string and assigns it to the MonitoringInstanceId field. -func (o *InstanceParameters) SetMonitoringInstanceId(v *string) { - o.MonitoringInstanceId = v +func (o *InstanceParameters) SetMonitoringInstanceId(v InstanceParametersGetMonitoringInstanceIdRetType) { + setInstanceParametersGetMonitoringInstanceIdAttributeType(&o.MonitoringInstanceId, v) } // GetOpensearchTlsCiphers returns the OpensearchTlsCiphers field value if set, zero value otherwise. -func (o *InstanceParameters) GetOpensearchTlsCiphers() *[]string { - if o == nil || IsNil(o.OpensearchTlsCiphers) { - var ret *[]string - return ret - } - return o.OpensearchTlsCiphers +func (o *InstanceParameters) GetOpensearchTlsCiphers() (res InstanceParametersGetOpensearchTlsCiphersRetType) { + res, _ = o.GetOpensearchTlsCiphersOk() + return } // GetOpensearchTlsCiphersOk returns a tuple with the OpensearchTlsCiphers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetOpensearchTlsCiphersOk() (*[]string, bool) { - if o == nil || IsNil(o.OpensearchTlsCiphers) { - return nil, false - } - return o.OpensearchTlsCiphers, true +func (o *InstanceParameters) GetOpensearchTlsCiphersOk() (ret InstanceParametersGetOpensearchTlsCiphersRetType, ok bool) { + return getInstanceParametersGetOpensearchTlsCiphersAttributeTypeOk(o.OpensearchTlsCiphers) } // HasOpensearchTlsCiphers returns a boolean if a field has been set. func (o *InstanceParameters) HasOpensearchTlsCiphers() bool { - if o != nil && !IsNil(o.OpensearchTlsCiphers) { - return true - } - - return false + _, ok := o.GetOpensearchTlsCiphersOk() + return ok } // SetOpensearchTlsCiphers gets a reference to the given []string and assigns it to the OpensearchTlsCiphers field. -func (o *InstanceParameters) SetOpensearchTlsCiphers(v *[]string) { - o.OpensearchTlsCiphers = v +func (o *InstanceParameters) SetOpensearchTlsCiphers(v InstanceParametersGetOpensearchTlsCiphersRetType) { + setInstanceParametersGetOpensearchTlsCiphersAttributeType(&o.OpensearchTlsCiphers, v) } // GetOpensearchTlsProtocols returns the OpensearchTlsProtocols field value if set, zero value otherwise. -func (o *InstanceParameters) GetOpensearchTlsProtocols() *[]string { - if o == nil || IsNil(o.OpensearchTlsProtocols) { - var ret *[]string - return ret - } - return o.OpensearchTlsProtocols +func (o *InstanceParameters) GetOpensearchTlsProtocols() (res InstanceParametersGetOpensearchTlsProtocolsRetType) { + res, _ = o.GetOpensearchTlsProtocolsOk() + return } // GetOpensearchTlsProtocolsOk returns a tuple with the OpensearchTlsProtocols field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetOpensearchTlsProtocolsOk() (*[]string, bool) { - if o == nil || IsNil(o.OpensearchTlsProtocols) { - return nil, false - } - return o.OpensearchTlsProtocols, true +func (o *InstanceParameters) GetOpensearchTlsProtocolsOk() (ret InstanceParametersGetOpensearchTlsProtocolsRetType, ok bool) { + return getInstanceParametersGetOpensearchTlsProtocolsAttributeTypeOk(o.OpensearchTlsProtocols) } // HasOpensearchTlsProtocols returns a boolean if a field has been set. func (o *InstanceParameters) HasOpensearchTlsProtocols() bool { - if o != nil && !IsNil(o.OpensearchTlsProtocols) { - return true - } - - return false + _, ok := o.GetOpensearchTlsProtocolsOk() + return ok } // SetOpensearchTlsProtocols gets a reference to the given []string and assigns it to the OpensearchTlsProtocols field. -func (o *InstanceParameters) SetOpensearchTlsProtocols(v *[]string) { - o.OpensearchTlsProtocols = v +func (o *InstanceParameters) SetOpensearchTlsProtocols(v InstanceParametersGetOpensearchTlsProtocolsRetType) { + setInstanceParametersGetOpensearchTlsProtocolsAttributeType(&o.OpensearchTlsProtocols, v) } // GetSgwAcl returns the SgwAcl field value if set, zero value otherwise. -func (o *InstanceParameters) GetSgwAcl() *string { - if o == nil || IsNil(o.SgwAcl) { - var ret *string - return ret - } - return o.SgwAcl +func (o *InstanceParameters) GetSgwAcl() (res InstanceParametersGetSgwAclRetType) { + res, _ = o.GetSgwAclOk() + return } // GetSgwAclOk returns a tuple with the SgwAcl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetSgwAclOk() (*string, bool) { - if o == nil || IsNil(o.SgwAcl) { - return nil, false - } - return o.SgwAcl, true +func (o *InstanceParameters) GetSgwAclOk() (ret InstanceParametersGetSgwAclRetType, ok bool) { + return getInstanceParametersGetSgwAclAttributeTypeOk(o.SgwAcl) } // HasSgwAcl returns a boolean if a field has been set. func (o *InstanceParameters) HasSgwAcl() bool { - if o != nil && !IsNil(o.SgwAcl) { - return true - } - - return false + _, ok := o.GetSgwAclOk() + return ok } // SetSgwAcl gets a reference to the given string and assigns it to the SgwAcl field. -func (o *InstanceParameters) SetSgwAcl(v *string) { - o.SgwAcl = v +func (o *InstanceParameters) SetSgwAcl(v InstanceParametersGetSgwAclRetType) { + setInstanceParametersGetSgwAclAttributeType(&o.SgwAcl, v) } // GetSyslog returns the Syslog field value if set, zero value otherwise. -func (o *InstanceParameters) GetSyslog() *[]string { - if o == nil || IsNil(o.Syslog) { - var ret *[]string - return ret - } - return o.Syslog +func (o *InstanceParameters) GetSyslog() (res InstanceParametersGetSyslogRetType) { + res, _ = o.GetSyslogOk() + return } // GetSyslogOk returns a tuple with the Syslog field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParameters) GetSyslogOk() (*[]string, bool) { - if o == nil || IsNil(o.Syslog) { - return nil, false - } - return o.Syslog, true +func (o *InstanceParameters) GetSyslogOk() (ret InstanceParametersGetSyslogRetType, ok bool) { + return getInstanceParametersGetSyslogAttributeTypeOk(o.Syslog) } // HasSyslog returns a boolean if a field has been set. func (o *InstanceParameters) HasSyslog() bool { - if o != nil && !IsNil(o.Syslog) { - return true - } - - return false + _, ok := o.GetSyslogOk() + return ok } // SetSyslog gets a reference to the given []string and assigns it to the Syslog field. -func (o *InstanceParameters) SetSyslog(v *[]string) { - o.Syslog = v +func (o *InstanceParameters) SetSyslog(v InstanceParametersGetSyslogRetType) { + setInstanceParametersGetSyslogAttributeType(&o.Syslog, v) } func (o InstanceParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.EnableMonitoring) { - toSerialize["enable_monitoring"] = o.EnableMonitoring + if val, ok := getInstanceParametersgetEnableMonitoringAttributeTypeOk(o.EnableMonitoring); ok { + toSerialize["EnableMonitoring"] = val } - if !IsNil(o.FluentdTcp) { - toSerialize["fluentd-tcp"] = o.FluentdTcp + if val, ok := getInstanceParametersGetFluentdTcpAttributeTypeOk(o.FluentdTcp); ok { + toSerialize["FluentdTcp"] = val } - if !IsNil(o.FluentdTls) { - toSerialize["fluentd-tls"] = o.FluentdTls + if val, ok := getInstanceParametersGetFluentdTlsAttributeTypeOk(o.FluentdTls); ok { + toSerialize["FluentdTls"] = val } - if !IsNil(o.FluentdTlsCiphers) { - toSerialize["fluentd-tls-ciphers"] = o.FluentdTlsCiphers + if val, ok := getInstanceParametersGetFluentdTlsCiphersAttributeTypeOk(o.FluentdTlsCiphers); ok { + toSerialize["FluentdTlsCiphers"] = val } - if !IsNil(o.FluentdTlsMaxVersion) { - toSerialize["fluentd-tls-max-version"] = o.FluentdTlsMaxVersion + if val, ok := getInstanceParametersGetFluentdTlsMaxVersionAttributeTypeOk(o.FluentdTlsMaxVersion); ok { + toSerialize["FluentdTlsMaxVersion"] = val } - if !IsNil(o.FluentdTlsMinVersion) { - toSerialize["fluentd-tls-min-version"] = o.FluentdTlsMinVersion + if val, ok := getInstanceParametersGetFluentdTlsMinVersionAttributeTypeOk(o.FluentdTlsMinVersion); ok { + toSerialize["FluentdTlsMinVersion"] = val } - if !IsNil(o.FluentdTlsVersion) { - toSerialize["fluentd-tls-version"] = o.FluentdTlsVersion + if val, ok := getInstanceParametersGetFluentdTlsVersionAttributeTypeOk(o.FluentdTlsVersion); ok { + toSerialize["FluentdTlsVersion"] = val } - if !IsNil(o.FluentdUdp) { - toSerialize["fluentd-udp"] = o.FluentdUdp + if val, ok := getInstanceParametersGetFluentdUdpAttributeTypeOk(o.FluentdUdp); ok { + toSerialize["FluentdUdp"] = val } - if !IsNil(o.Graphite) { - toSerialize["graphite"] = o.Graphite + if val, ok := getInstanceParametersGetGraphiteAttributeTypeOk(o.Graphite); ok { + toSerialize["Graphite"] = val } - if !IsNil(o.Groks) { - toSerialize["groks"] = o.Groks + if val, ok := getInstanceParametersGetGroksAttributeTypeOk(o.Groks); ok { + toSerialize["Groks"] = val } - if !IsNil(o.IsmDeletionAfter) { - toSerialize["ism_deletion_after"] = o.IsmDeletionAfter + if val, ok := getInstanceParametersGetIsmDeletionAfterAttributeTypeOk(o.IsmDeletionAfter); ok { + toSerialize["IsmDeletionAfter"] = val } - if !IsNil(o.IsmJitter) { - toSerialize["ism_jitter"] = o.IsmJitter + if val, ok := getInstanceParametersGetIsmJitterAttributeTypeOk(o.IsmJitter); ok { + toSerialize["IsmJitter"] = val } - if !IsNil(o.IsmJobInterval) { - toSerialize["ism_job_interval"] = o.IsmJobInterval + if val, ok := getInstanceParametersGetIsmJobIntervalAttributeTypeOk(o.IsmJobInterval); ok { + toSerialize["IsmJobInterval"] = val } - if !IsNil(o.JavaHeapspace) { - toSerialize["java_heapspace"] = o.JavaHeapspace + if val, ok := getInstanceParametersGetJavaHeapspaceAttributeTypeOk(o.JavaHeapspace); ok { + toSerialize["JavaHeapspace"] = val } - if !IsNil(o.JavaMaxmetaspace) { - toSerialize["java_maxmetaspace"] = o.JavaMaxmetaspace + if val, ok := getInstanceParametersGetJavaMaxmetaspaceAttributeTypeOk(o.JavaMaxmetaspace); ok { + toSerialize["JavaMaxmetaspace"] = val } - if !IsNil(o.MaxDiskThreshold) { - toSerialize["max_disk_threshold"] = o.MaxDiskThreshold + if val, ok := getInstanceParametersGetMaxDiskThresholdAttributeTypeOk(o.MaxDiskThreshold); ok { + toSerialize["MaxDiskThreshold"] = val } - if !IsNil(o.MetricsFrequency) { - toSerialize["metrics_frequency"] = o.MetricsFrequency + if val, ok := getInstanceParametersGetMetricsFrequencyAttributeTypeOk(o.MetricsFrequency); ok { + toSerialize["MetricsFrequency"] = val } - if !IsNil(o.MetricsPrefix) { - toSerialize["metrics_prefix"] = o.MetricsPrefix + if val, ok := getInstanceParametersGetMetricsPrefixAttributeTypeOk(o.MetricsPrefix); ok { + toSerialize["MetricsPrefix"] = val } - if !IsNil(o.MonitoringInstanceId) { - toSerialize["monitoring_instance_id"] = o.MonitoringInstanceId + if val, ok := getInstanceParametersGetMonitoringInstanceIdAttributeTypeOk(o.MonitoringInstanceId); ok { + toSerialize["MonitoringInstanceId"] = val } - if !IsNil(o.OpensearchTlsCiphers) { - toSerialize["opensearch-tls-ciphers"] = o.OpensearchTlsCiphers + if val, ok := getInstanceParametersGetOpensearchTlsCiphersAttributeTypeOk(o.OpensearchTlsCiphers); ok { + toSerialize["OpensearchTlsCiphers"] = val } - if !IsNil(o.OpensearchTlsProtocols) { - toSerialize["opensearch-tls-protocols"] = o.OpensearchTlsProtocols + if val, ok := getInstanceParametersGetOpensearchTlsProtocolsAttributeTypeOk(o.OpensearchTlsProtocols); ok { + toSerialize["OpensearchTlsProtocols"] = val } - if !IsNil(o.SgwAcl) { - toSerialize["sgw_acl"] = o.SgwAcl + if val, ok := getInstanceParametersGetSgwAclAttributeTypeOk(o.SgwAcl); ok { + toSerialize["SgwAcl"] = val } - if !IsNil(o.Syslog) { - toSerialize["syslog"] = o.Syslog + if val, ok := getInstanceParametersGetSyslogAttributeTypeOk(o.Syslog); ok { + toSerialize["Syslog"] = val } return toSerialize, nil } diff --git a/services/logme/model_instance_parameters_groks_inner.go b/services/logme/model_instance_parameters_groks_inner.go index 1a8dfcf7e..a3161ada7 100644 --- a/services/logme/model_instance_parameters_groks_inner.go +++ b/services/logme/model_instance_parameters_groks_inner.go @@ -17,9 +17,30 @@ import ( // checks if the InstanceParametersGroksInner type satisfies the MappedNullable interface at compile time var _ MappedNullable = &InstanceParametersGroksInner{} +/* + types and functions for pattern +*/ + +// isNotNullableString +type InstanceParametersGroksInnerGetPatternAttributeType = *string + +func getInstanceParametersGroksInnerGetPatternAttributeTypeOk(arg InstanceParametersGroksInnerGetPatternAttributeType) (ret InstanceParametersGroksInnerGetPatternRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceParametersGroksInnerGetPatternAttributeType(arg *InstanceParametersGroksInnerGetPatternAttributeType, val InstanceParametersGroksInnerGetPatternRetType) { + *arg = &val +} + +type InstanceParametersGroksInnerGetPatternArgType = string +type InstanceParametersGroksInnerGetPatternRetType = string + // InstanceParametersGroksInner struct for InstanceParametersGroksInner type InstanceParametersGroksInner struct { - Pattern *string `json:"pattern,omitempty"` + Pattern InstanceParametersGroksInnerGetPatternAttributeType `json:"pattern,omitempty"` } // NewInstanceParametersGroksInner instantiates a new InstanceParametersGroksInner object @@ -40,41 +61,32 @@ func NewInstanceParametersGroksInnerWithDefaults() *InstanceParametersGroksInner } // GetPattern returns the Pattern field value if set, zero value otherwise. -func (o *InstanceParametersGroksInner) GetPattern() *string { - if o == nil || IsNil(o.Pattern) { - var ret *string - return ret - } - return o.Pattern +func (o *InstanceParametersGroksInner) GetPattern() (res InstanceParametersGroksInnerGetPatternRetType) { + res, _ = o.GetPatternOk() + return } // GetPatternOk returns a tuple with the Pattern field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InstanceParametersGroksInner) GetPatternOk() (*string, bool) { - if o == nil || IsNil(o.Pattern) { - return nil, false - } - return o.Pattern, true +func (o *InstanceParametersGroksInner) GetPatternOk() (ret InstanceParametersGroksInnerGetPatternRetType, ok bool) { + return getInstanceParametersGroksInnerGetPatternAttributeTypeOk(o.Pattern) } // HasPattern returns a boolean if a field has been set. func (o *InstanceParametersGroksInner) HasPattern() bool { - if o != nil && !IsNil(o.Pattern) { - return true - } - - return false + _, ok := o.GetPatternOk() + return ok } // SetPattern gets a reference to the given string and assigns it to the Pattern field. -func (o *InstanceParametersGroksInner) SetPattern(v *string) { - o.Pattern = v +func (o *InstanceParametersGroksInner) SetPattern(v InstanceParametersGroksInnerGetPatternRetType) { + setInstanceParametersGroksInnerGetPatternAttributeType(&o.Pattern, v) } func (o InstanceParametersGroksInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Pattern) { - toSerialize["pattern"] = o.Pattern + if val, ok := getInstanceParametersGroksInnerGetPatternAttributeTypeOk(o.Pattern); ok { + toSerialize["Pattern"] = val } return toSerialize, nil } diff --git a/services/logme/model_instance_schema.go b/services/logme/model_instance_schema.go index 86604a885..5e7704788 100644 --- a/services/logme/model_instance_schema.go +++ b/services/logme/model_instance_schema.go @@ -17,12 +17,52 @@ import ( // checks if the InstanceSchema type satisfies the MappedNullable interface at compile time var _ MappedNullable = &InstanceSchema{} +/* + types and functions for create +*/ + +// isModel +type InstanceSchemaGetCreateAttributeType = *Schema +type InstanceSchemaGetCreateArgType = Schema +type InstanceSchemaGetCreateRetType = Schema + +func getInstanceSchemaGetCreateAttributeTypeOk(arg InstanceSchemaGetCreateAttributeType) (ret InstanceSchemaGetCreateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSchemaGetCreateAttributeType(arg *InstanceSchemaGetCreateAttributeType, val InstanceSchemaGetCreateRetType) { + *arg = &val +} + +/* + types and functions for update +*/ + +// isModel +type InstanceSchemaGetUpdateAttributeType = *Schema +type InstanceSchemaGetUpdateArgType = Schema +type InstanceSchemaGetUpdateRetType = Schema + +func getInstanceSchemaGetUpdateAttributeTypeOk(arg InstanceSchemaGetUpdateAttributeType) (ret InstanceSchemaGetUpdateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSchemaGetUpdateAttributeType(arg *InstanceSchemaGetUpdateAttributeType, val InstanceSchemaGetUpdateRetType) { + *arg = &val +} + // InstanceSchema struct for InstanceSchema type InstanceSchema struct { // REQUIRED - Create *Schema `json:"create"` + Create InstanceSchemaGetCreateAttributeType `json:"create"` // REQUIRED - Update *Schema `json:"update"` + Update InstanceSchemaGetUpdateAttributeType `json:"update"` } type _InstanceSchema InstanceSchema @@ -31,10 +71,10 @@ type _InstanceSchema InstanceSchema // 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 NewInstanceSchema(create *Schema, update *Schema) *InstanceSchema { +func NewInstanceSchema(create InstanceSchemaGetCreateArgType, update InstanceSchemaGetUpdateArgType) *InstanceSchema { this := InstanceSchema{} - this.Create = create - this.Update = update + setInstanceSchemaGetCreateAttributeType(&this.Create, create) + setInstanceSchemaGetUpdateAttributeType(&this.Update, update) return &this } @@ -47,57 +87,47 @@ func NewInstanceSchemaWithDefaults() *InstanceSchema { } // GetCreate returns the Create field value -func (o *InstanceSchema) GetCreate() *Schema { - if o == nil || IsNil(o.Create) { - var ret *Schema - return ret - } - - return o.Create +func (o *InstanceSchema) GetCreate() (ret InstanceSchemaGetCreateRetType) { + ret, _ = o.GetCreateOk() + return ret } // GetCreateOk returns a tuple with the Create field value // and a boolean to check if the value has been set. -func (o *InstanceSchema) GetCreateOk() (*Schema, bool) { - if o == nil { - return nil, false - } - return o.Create, true +func (o *InstanceSchema) GetCreateOk() (ret InstanceSchemaGetCreateRetType, ok bool) { + return getInstanceSchemaGetCreateAttributeTypeOk(o.Create) } // SetCreate sets field value -func (o *InstanceSchema) SetCreate(v *Schema) { - o.Create = v +func (o *InstanceSchema) SetCreate(v InstanceSchemaGetCreateRetType) { + setInstanceSchemaGetCreateAttributeType(&o.Create, v) } // GetUpdate returns the Update field value -func (o *InstanceSchema) GetUpdate() *Schema { - if o == nil || IsNil(o.Update) { - var ret *Schema - return ret - } - - return o.Update +func (o *InstanceSchema) GetUpdate() (ret InstanceSchemaGetUpdateRetType) { + ret, _ = o.GetUpdateOk() + return ret } // GetUpdateOk returns a tuple with the Update field value // and a boolean to check if the value has been set. -func (o *InstanceSchema) GetUpdateOk() (*Schema, bool) { - if o == nil { - return nil, false - } - return o.Update, true +func (o *InstanceSchema) GetUpdateOk() (ret InstanceSchemaGetUpdateRetType, ok bool) { + return getInstanceSchemaGetUpdateAttributeTypeOk(o.Update) } // SetUpdate sets field value -func (o *InstanceSchema) SetUpdate(v *Schema) { - o.Update = v +func (o *InstanceSchema) SetUpdate(v InstanceSchemaGetUpdateRetType) { + setInstanceSchemaGetUpdateAttributeType(&o.Update, v) } func (o InstanceSchema) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["create"] = o.Create - toSerialize["update"] = o.Update + if val, ok := getInstanceSchemaGetCreateAttributeTypeOk(o.Create); ok { + toSerialize["Create"] = val + } + if val, ok := getInstanceSchemaGetUpdateAttributeTypeOk(o.Update); ok { + toSerialize["Update"] = val + } return toSerialize, nil } diff --git a/services/logme/model_list_backups_response.go b/services/logme/model_list_backups_response.go index 81a616b4b..5dd001004 100644 --- a/services/logme/model_list_backups_response.go +++ b/services/logme/model_list_backups_response.go @@ -17,10 +17,30 @@ import ( // checks if the ListBackupsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListBackupsResponse{} +/* + types and functions for instanceBackups +*/ + +// isArray +type ListBackupsResponseGetInstanceBackupsAttributeType = *[]Backup +type ListBackupsResponseGetInstanceBackupsArgType = []Backup +type ListBackupsResponseGetInstanceBackupsRetType = []Backup + +func getListBackupsResponseGetInstanceBackupsAttributeTypeOk(arg ListBackupsResponseGetInstanceBackupsAttributeType) (ret ListBackupsResponseGetInstanceBackupsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListBackupsResponseGetInstanceBackupsAttributeType(arg *ListBackupsResponseGetInstanceBackupsAttributeType, val ListBackupsResponseGetInstanceBackupsRetType) { + *arg = &val +} + // ListBackupsResponse struct for ListBackupsResponse type ListBackupsResponse struct { // REQUIRED - InstanceBackups *[]Backup `json:"instanceBackups"` + InstanceBackups ListBackupsResponseGetInstanceBackupsAttributeType `json:"instanceBackups"` } type _ListBackupsResponse ListBackupsResponse @@ -29,9 +49,9 @@ type _ListBackupsResponse ListBackupsResponse // 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 NewListBackupsResponse(instanceBackups *[]Backup) *ListBackupsResponse { +func NewListBackupsResponse(instanceBackups ListBackupsResponseGetInstanceBackupsArgType) *ListBackupsResponse { this := ListBackupsResponse{} - this.InstanceBackups = instanceBackups + setListBackupsResponseGetInstanceBackupsAttributeType(&this.InstanceBackups, instanceBackups) return &this } @@ -44,32 +64,27 @@ func NewListBackupsResponseWithDefaults() *ListBackupsResponse { } // GetInstanceBackups returns the InstanceBackups field value -func (o *ListBackupsResponse) GetInstanceBackups() *[]Backup { - if o == nil || IsNil(o.InstanceBackups) { - var ret *[]Backup - return ret - } - - return o.InstanceBackups +func (o *ListBackupsResponse) GetInstanceBackups() (ret ListBackupsResponseGetInstanceBackupsRetType) { + ret, _ = o.GetInstanceBackupsOk() + return ret } // GetInstanceBackupsOk returns a tuple with the InstanceBackups field value // and a boolean to check if the value has been set. -func (o *ListBackupsResponse) GetInstanceBackupsOk() (*[]Backup, bool) { - if o == nil { - return nil, false - } - return o.InstanceBackups, true +func (o *ListBackupsResponse) GetInstanceBackupsOk() (ret ListBackupsResponseGetInstanceBackupsRetType, ok bool) { + return getListBackupsResponseGetInstanceBackupsAttributeTypeOk(o.InstanceBackups) } // SetInstanceBackups sets field value -func (o *ListBackupsResponse) SetInstanceBackups(v *[]Backup) { - o.InstanceBackups = v +func (o *ListBackupsResponse) SetInstanceBackups(v ListBackupsResponseGetInstanceBackupsRetType) { + setListBackupsResponseGetInstanceBackupsAttributeType(&o.InstanceBackups, v) } func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["instanceBackups"] = o.InstanceBackups + if val, ok := getListBackupsResponseGetInstanceBackupsAttributeTypeOk(o.InstanceBackups); ok { + toSerialize["InstanceBackups"] = val + } return toSerialize, nil } diff --git a/services/logme/model_list_credentials_response.go b/services/logme/model_list_credentials_response.go index 0cf454790..ae6c50359 100644 --- a/services/logme/model_list_credentials_response.go +++ b/services/logme/model_list_credentials_response.go @@ -17,10 +17,30 @@ import ( // checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListCredentialsResponse{} +/* + types and functions for credentialsList +*/ + +// isArray +type ListCredentialsResponseGetCredentialsListAttributeType = *[]CredentialsListItem +type ListCredentialsResponseGetCredentialsListArgType = []CredentialsListItem +type ListCredentialsResponseGetCredentialsListRetType = []CredentialsListItem + +func getListCredentialsResponseGetCredentialsListAttributeTypeOk(arg ListCredentialsResponseGetCredentialsListAttributeType) (ret ListCredentialsResponseGetCredentialsListRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCredentialsResponseGetCredentialsListAttributeType(arg *ListCredentialsResponseGetCredentialsListAttributeType, val ListCredentialsResponseGetCredentialsListRetType) { + *arg = &val +} + // ListCredentialsResponse struct for ListCredentialsResponse type ListCredentialsResponse struct { // REQUIRED - CredentialsList *[]CredentialsListItem `json:"credentialsList"` + CredentialsList ListCredentialsResponseGetCredentialsListAttributeType `json:"credentialsList"` } type _ListCredentialsResponse ListCredentialsResponse @@ -29,9 +49,9 @@ 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(credentialsList *[]CredentialsListItem) *ListCredentialsResponse { +func NewListCredentialsResponse(credentialsList ListCredentialsResponseGetCredentialsListArgType) *ListCredentialsResponse { this := ListCredentialsResponse{} - this.CredentialsList = credentialsList + setListCredentialsResponseGetCredentialsListAttributeType(&this.CredentialsList, credentialsList) return &this } @@ -44,32 +64,27 @@ func NewListCredentialsResponseWithDefaults() *ListCredentialsResponse { } // GetCredentialsList returns the CredentialsList field value -func (o *ListCredentialsResponse) GetCredentialsList() *[]CredentialsListItem { - if o == nil || IsNil(o.CredentialsList) { - var ret *[]CredentialsListItem - return ret - } - - return o.CredentialsList +func (o *ListCredentialsResponse) GetCredentialsList() (ret ListCredentialsResponseGetCredentialsListRetType) { + ret, _ = o.GetCredentialsListOk() + return ret } // GetCredentialsListOk returns a tuple with the CredentialsList field value // and a boolean to check if the value has been set. -func (o *ListCredentialsResponse) GetCredentialsListOk() (*[]CredentialsListItem, bool) { - if o == nil { - return nil, false - } - return o.CredentialsList, true +func (o *ListCredentialsResponse) GetCredentialsListOk() (ret ListCredentialsResponseGetCredentialsListRetType, ok bool) { + return getListCredentialsResponseGetCredentialsListAttributeTypeOk(o.CredentialsList) } // SetCredentialsList sets field value -func (o *ListCredentialsResponse) SetCredentialsList(v *[]CredentialsListItem) { - o.CredentialsList = v +func (o *ListCredentialsResponse) SetCredentialsList(v ListCredentialsResponseGetCredentialsListRetType) { + setListCredentialsResponseGetCredentialsListAttributeType(&o.CredentialsList, v) } func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["credentialsList"] = o.CredentialsList + if val, ok := getListCredentialsResponseGetCredentialsListAttributeTypeOk(o.CredentialsList); ok { + toSerialize["CredentialsList"] = val + } return toSerialize, nil } diff --git a/services/logme/model_list_instances_response.go b/services/logme/model_list_instances_response.go index c66ae67cc..fda32a507 100644 --- a/services/logme/model_list_instances_response.go +++ b/services/logme/model_list_instances_response.go @@ -17,10 +17,30 @@ import ( // checks if the ListInstancesResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListInstancesResponse{} +/* + types and functions for instances +*/ + +// isArray +type ListInstancesResponseGetInstancesAttributeType = *[]Instance +type ListInstancesResponseGetInstancesArgType = []Instance +type ListInstancesResponseGetInstancesRetType = []Instance + +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 +} + // ListInstancesResponse struct for ListInstancesResponse type ListInstancesResponse struct { // REQUIRED - Instances *[]Instance `json:"instances"` + Instances ListInstancesResponseGetInstancesAttributeType `json:"instances"` } type _ListInstancesResponse ListInstancesResponse @@ -29,9 +49,9 @@ 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 *[]Instance) *ListInstancesResponse { +func NewListInstancesResponse(instances ListInstancesResponseGetInstancesArgType) *ListInstancesResponse { this := ListInstancesResponse{} - this.Instances = instances + setListInstancesResponseGetInstancesAttributeType(&this.Instances, instances) return &this } @@ -44,32 +64,27 @@ func NewListInstancesResponseWithDefaults() *ListInstancesResponse { } // GetInstances returns the Instances field value -func (o *ListInstancesResponse) GetInstances() *[]Instance { - if o == nil || IsNil(o.Instances) { - var ret *[]Instance - 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() (*[]Instance, 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 *[]Instance) { - o.Instances = v +func (o *ListInstancesResponse) SetInstances(v ListInstancesResponseGetInstancesRetType) { + setListInstancesResponseGetInstancesAttributeType(&o.Instances, v) } func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["instances"] = o.Instances + if val, ok := getListInstancesResponseGetInstancesAttributeTypeOk(o.Instances); ok { + toSerialize["Instances"] = val + } return toSerialize, nil } diff --git a/services/logme/model_list_offerings_response.go b/services/logme/model_list_offerings_response.go index f2245c7e6..36963da64 100644 --- a/services/logme/model_list_offerings_response.go +++ b/services/logme/model_list_offerings_response.go @@ -17,10 +17,30 @@ import ( // checks if the ListOfferingsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListOfferingsResponse{} +/* + types and functions for offerings +*/ + +// isArray +type ListOfferingsResponseGetOfferingsAttributeType = *[]Offering +type ListOfferingsResponseGetOfferingsArgType = []Offering +type ListOfferingsResponseGetOfferingsRetType = []Offering + +func getListOfferingsResponseGetOfferingsAttributeTypeOk(arg ListOfferingsResponseGetOfferingsAttributeType) (ret ListOfferingsResponseGetOfferingsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListOfferingsResponseGetOfferingsAttributeType(arg *ListOfferingsResponseGetOfferingsAttributeType, val ListOfferingsResponseGetOfferingsRetType) { + *arg = &val +} + // ListOfferingsResponse struct for ListOfferingsResponse type ListOfferingsResponse struct { // REQUIRED - Offerings *[]Offering `json:"offerings"` + Offerings ListOfferingsResponseGetOfferingsAttributeType `json:"offerings"` } type _ListOfferingsResponse ListOfferingsResponse @@ -29,9 +49,9 @@ type _ListOfferingsResponse ListOfferingsResponse // 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 NewListOfferingsResponse(offerings *[]Offering) *ListOfferingsResponse { +func NewListOfferingsResponse(offerings ListOfferingsResponseGetOfferingsArgType) *ListOfferingsResponse { this := ListOfferingsResponse{} - this.Offerings = offerings + setListOfferingsResponseGetOfferingsAttributeType(&this.Offerings, offerings) return &this } @@ -44,32 +64,27 @@ func NewListOfferingsResponseWithDefaults() *ListOfferingsResponse { } // GetOfferings returns the Offerings field value -func (o *ListOfferingsResponse) GetOfferings() *[]Offering { - if o == nil || IsNil(o.Offerings) { - var ret *[]Offering - return ret - } - - return o.Offerings +func (o *ListOfferingsResponse) GetOfferings() (ret ListOfferingsResponseGetOfferingsRetType) { + ret, _ = o.GetOfferingsOk() + return ret } // GetOfferingsOk returns a tuple with the Offerings field value // and a boolean to check if the value has been set. -func (o *ListOfferingsResponse) GetOfferingsOk() (*[]Offering, bool) { - if o == nil { - return nil, false - } - return o.Offerings, true +func (o *ListOfferingsResponse) GetOfferingsOk() (ret ListOfferingsResponseGetOfferingsRetType, ok bool) { + return getListOfferingsResponseGetOfferingsAttributeTypeOk(o.Offerings) } // SetOfferings sets field value -func (o *ListOfferingsResponse) SetOfferings(v *[]Offering) { - o.Offerings = v +func (o *ListOfferingsResponse) SetOfferings(v ListOfferingsResponseGetOfferingsRetType) { + setListOfferingsResponseGetOfferingsAttributeType(&o.Offerings, v) } func (o ListOfferingsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["offerings"] = o.Offerings + if val, ok := getListOfferingsResponseGetOfferingsAttributeTypeOk(o.Offerings); ok { + toSerialize["Offerings"] = val + } return toSerialize, nil } diff --git a/services/logme/model_list_restores_response.go b/services/logme/model_list_restores_response.go index 61f15a408..7bf2ef357 100644 --- a/services/logme/model_list_restores_response.go +++ b/services/logme/model_list_restores_response.go @@ -17,10 +17,30 @@ import ( // checks if the ListRestoresResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListRestoresResponse{} +/* + types and functions for instanceRestores +*/ + +// isArray +type ListRestoresResponseGetInstanceRestoresAttributeType = *[]Restore +type ListRestoresResponseGetInstanceRestoresArgType = []Restore +type ListRestoresResponseGetInstanceRestoresRetType = []Restore + +func getListRestoresResponseGetInstanceRestoresAttributeTypeOk(arg ListRestoresResponseGetInstanceRestoresAttributeType) (ret ListRestoresResponseGetInstanceRestoresRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListRestoresResponseGetInstanceRestoresAttributeType(arg *ListRestoresResponseGetInstanceRestoresAttributeType, val ListRestoresResponseGetInstanceRestoresRetType) { + *arg = &val +} + // ListRestoresResponse struct for ListRestoresResponse type ListRestoresResponse struct { // REQUIRED - InstanceRestores *[]Restore `json:"instanceRestores"` + InstanceRestores ListRestoresResponseGetInstanceRestoresAttributeType `json:"instanceRestores"` } type _ListRestoresResponse ListRestoresResponse @@ -29,9 +49,9 @@ type _ListRestoresResponse ListRestoresResponse // 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 NewListRestoresResponse(instanceRestores *[]Restore) *ListRestoresResponse { +func NewListRestoresResponse(instanceRestores ListRestoresResponseGetInstanceRestoresArgType) *ListRestoresResponse { this := ListRestoresResponse{} - this.InstanceRestores = instanceRestores + setListRestoresResponseGetInstanceRestoresAttributeType(&this.InstanceRestores, instanceRestores) return &this } @@ -44,32 +64,27 @@ func NewListRestoresResponseWithDefaults() *ListRestoresResponse { } // GetInstanceRestores returns the InstanceRestores field value -func (o *ListRestoresResponse) GetInstanceRestores() *[]Restore { - if o == nil || IsNil(o.InstanceRestores) { - var ret *[]Restore - return ret - } - - return o.InstanceRestores +func (o *ListRestoresResponse) GetInstanceRestores() (ret ListRestoresResponseGetInstanceRestoresRetType) { + ret, _ = o.GetInstanceRestoresOk() + return ret } // GetInstanceRestoresOk returns a tuple with the InstanceRestores field value // and a boolean to check if the value has been set. -func (o *ListRestoresResponse) GetInstanceRestoresOk() (*[]Restore, bool) { - if o == nil { - return nil, false - } - return o.InstanceRestores, true +func (o *ListRestoresResponse) GetInstanceRestoresOk() (ret ListRestoresResponseGetInstanceRestoresRetType, ok bool) { + return getListRestoresResponseGetInstanceRestoresAttributeTypeOk(o.InstanceRestores) } // SetInstanceRestores sets field value -func (o *ListRestoresResponse) SetInstanceRestores(v *[]Restore) { - o.InstanceRestores = v +func (o *ListRestoresResponse) SetInstanceRestores(v ListRestoresResponseGetInstanceRestoresRetType) { + setListRestoresResponseGetInstanceRestoresAttributeType(&o.InstanceRestores, v) } func (o ListRestoresResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["instanceRestores"] = o.InstanceRestores + if val, ok := getListRestoresResponseGetInstanceRestoresAttributeTypeOk(o.InstanceRestores); ok { + toSerialize["InstanceRestores"] = val + } return toSerialize, nil } diff --git a/services/logme/model_offering.go b/services/logme/model_offering.go index 92459d00d..c8394d7e0 100644 --- a/services/logme/model_offering.go +++ b/services/logme/model_offering.go @@ -17,26 +17,232 @@ import ( // checks if the Offering type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Offering{} +/* + types and functions for description +*/ + +// isNotNullableString +type OfferingGetDescriptionAttributeType = *string + +func getOfferingGetDescriptionAttributeTypeOk(arg OfferingGetDescriptionAttributeType) (ret OfferingGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOfferingGetDescriptionAttributeType(arg *OfferingGetDescriptionAttributeType, val OfferingGetDescriptionRetType) { + *arg = &val +} + +type OfferingGetDescriptionArgType = string +type OfferingGetDescriptionRetType = string + +/* + types and functions for documentationUrl +*/ + +// isNotNullableString +type OfferingGetDocumentationUrlAttributeType = *string + +func getOfferingGetDocumentationUrlAttributeTypeOk(arg OfferingGetDocumentationUrlAttributeType) (ret OfferingGetDocumentationUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOfferingGetDocumentationUrlAttributeType(arg *OfferingGetDocumentationUrlAttributeType, val OfferingGetDocumentationUrlRetType) { + *arg = &val +} + +type OfferingGetDocumentationUrlArgType = string +type OfferingGetDocumentationUrlRetType = string + +/* + types and functions for imageUrl +*/ + +// isNotNullableString +type OfferingGetImageUrlAttributeType = *string + +func getOfferingGetImageUrlAttributeTypeOk(arg OfferingGetImageUrlAttributeType) (ret OfferingGetImageUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOfferingGetImageUrlAttributeType(arg *OfferingGetImageUrlAttributeType, val OfferingGetImageUrlRetType) { + *arg = &val +} + +type OfferingGetImageUrlArgType = string +type OfferingGetImageUrlRetType = string + +/* + types and functions for latest +*/ + +// isBoolean +type OfferinggetLatestAttributeType = *bool +type OfferinggetLatestArgType = bool +type OfferinggetLatestRetType = bool + +func getOfferinggetLatestAttributeTypeOk(arg OfferinggetLatestAttributeType) (ret OfferinggetLatestRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOfferinggetLatestAttributeType(arg *OfferinggetLatestAttributeType, val OfferinggetLatestRetType) { + *arg = &val +} + +/* + types and functions for lifecycle +*/ + +// isNotNullableString +type OfferingGetLifecycleAttributeType = *string + +func getOfferingGetLifecycleAttributeTypeOk(arg OfferingGetLifecycleAttributeType) (ret OfferingGetLifecycleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOfferingGetLifecycleAttributeType(arg *OfferingGetLifecycleAttributeType, val OfferingGetLifecycleRetType) { + *arg = &val +} + +type OfferingGetLifecycleArgType = string +type OfferingGetLifecycleRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type OfferingGetNameAttributeType = *string + +func getOfferingGetNameAttributeTypeOk(arg OfferingGetNameAttributeType) (ret OfferingGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOfferingGetNameAttributeType(arg *OfferingGetNameAttributeType, val OfferingGetNameRetType) { + *arg = &val +} + +type OfferingGetNameArgType = string +type OfferingGetNameRetType = string + +/* + types and functions for plans +*/ + +// isArray +type OfferingGetPlansAttributeType = *[]Plan +type OfferingGetPlansArgType = []Plan +type OfferingGetPlansRetType = []Plan + +func getOfferingGetPlansAttributeTypeOk(arg OfferingGetPlansAttributeType) (ret OfferingGetPlansRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOfferingGetPlansAttributeType(arg *OfferingGetPlansAttributeType, val OfferingGetPlansRetType) { + *arg = &val +} + +/* + types and functions for quotaCount +*/ + +// isInteger +type OfferingGetQuotaCountAttributeType = *int64 +type OfferingGetQuotaCountArgType = int64 +type OfferingGetQuotaCountRetType = int64 + +func getOfferingGetQuotaCountAttributeTypeOk(arg OfferingGetQuotaCountAttributeType) (ret OfferingGetQuotaCountRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOfferingGetQuotaCountAttributeType(arg *OfferingGetQuotaCountAttributeType, val OfferingGetQuotaCountRetType) { + *arg = &val +} + +/* + types and functions for schema +*/ + +// isModel +type OfferingGetSchemaAttributeType = *InstanceSchema +type OfferingGetSchemaArgType = InstanceSchema +type OfferingGetSchemaRetType = InstanceSchema + +func getOfferingGetSchemaAttributeTypeOk(arg OfferingGetSchemaAttributeType) (ret OfferingGetSchemaRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOfferingGetSchemaAttributeType(arg *OfferingGetSchemaAttributeType, val OfferingGetSchemaRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isNotNullableString +type OfferingGetVersionAttributeType = *string + +func getOfferingGetVersionAttributeTypeOk(arg OfferingGetVersionAttributeType) (ret OfferingGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setOfferingGetVersionAttributeType(arg *OfferingGetVersionAttributeType, val OfferingGetVersionRetType) { + *arg = &val +} + +type OfferingGetVersionArgType = string +type OfferingGetVersionRetType = string + // Offering struct for Offering type Offering struct { // REQUIRED - Description *string `json:"description"` + Description OfferingGetDescriptionAttributeType `json:"description"` // REQUIRED - DocumentationUrl *string `json:"documentationUrl"` + DocumentationUrl OfferingGetDocumentationUrlAttributeType `json:"documentationUrl"` // REQUIRED - ImageUrl *string `json:"imageUrl"` + ImageUrl OfferingGetImageUrlAttributeType `json:"imageUrl"` // REQUIRED - Latest *bool `json:"latest"` - Lifecycle *string `json:"lifecycle,omitempty"` + Latest OfferinggetLatestAttributeType `json:"latest"` + Lifecycle OfferingGetLifecycleAttributeType `json:"lifecycle,omitempty"` // REQUIRED - Name *string `json:"name"` + Name OfferingGetNameAttributeType `json:"name"` // REQUIRED - Plans *[]Plan `json:"plans"` + Plans OfferingGetPlansAttributeType `json:"plans"` // REQUIRED - QuotaCount *int64 `json:"quotaCount"` - Schema *InstanceSchema `json:"schema,omitempty"` + QuotaCount OfferingGetQuotaCountAttributeType `json:"quotaCount"` + Schema OfferingGetSchemaAttributeType `json:"schema,omitempty"` // REQUIRED - Version *string `json:"version"` + Version OfferingGetVersionAttributeType `json:"version"` } type _Offering Offering @@ -45,16 +251,16 @@ type _Offering Offering // 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 NewOffering(description *string, documentationUrl *string, imageUrl *string, latest *bool, name *string, plans *[]Plan, quotaCount *int64, version *string) *Offering { +func NewOffering(description OfferingGetDescriptionArgType, documentationUrl OfferingGetDocumentationUrlArgType, imageUrl OfferingGetImageUrlArgType, latest OfferinggetLatestArgType, name OfferingGetNameArgType, plans OfferingGetPlansArgType, quotaCount OfferingGetQuotaCountArgType, version OfferingGetVersionArgType) *Offering { this := Offering{} - this.Description = description - this.DocumentationUrl = documentationUrl - this.ImageUrl = imageUrl - this.Latest = latest - this.Name = name - this.Plans = plans - this.QuotaCount = quotaCount - this.Version = version + setOfferingGetDescriptionAttributeType(&this.Description, description) + setOfferingGetDocumentationUrlAttributeType(&this.DocumentationUrl, documentationUrl) + setOfferingGetImageUrlAttributeType(&this.ImageUrl, imageUrl) + setOfferinggetLatestAttributeType(&this.Latest, latest) + setOfferingGetNameAttributeType(&this.Name, name) + setOfferingGetPlansAttributeType(&this.Plans, plans) + setOfferingGetQuotaCountAttributeType(&this.QuotaCount, quotaCount) + setOfferingGetVersionAttributeType(&this.Version, version) return &this } @@ -67,277 +273,219 @@ func NewOfferingWithDefaults() *Offering { } // GetDescription returns the Description field value -func (o *Offering) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - - return o.Description +func (o *Offering) GetDescription() (ret OfferingGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *Offering) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description, true +func (o *Offering) GetDescriptionOk() (ret OfferingGetDescriptionRetType, ok bool) { + return getOfferingGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value -func (o *Offering) SetDescription(v *string) { - o.Description = v +func (o *Offering) SetDescription(v OfferingGetDescriptionRetType) { + setOfferingGetDescriptionAttributeType(&o.Description, v) } // GetDocumentationUrl returns the DocumentationUrl field value -func (o *Offering) GetDocumentationUrl() *string { - if o == nil || IsNil(o.DocumentationUrl) { - var ret *string - return ret - } - - return o.DocumentationUrl +func (o *Offering) GetDocumentationUrl() (ret OfferingGetDocumentationUrlRetType) { + ret, _ = o.GetDocumentationUrlOk() + return ret } // GetDocumentationUrlOk returns a tuple with the DocumentationUrl field value // and a boolean to check if the value has been set. -func (o *Offering) GetDocumentationUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DocumentationUrl, true +func (o *Offering) GetDocumentationUrlOk() (ret OfferingGetDocumentationUrlRetType, ok bool) { + return getOfferingGetDocumentationUrlAttributeTypeOk(o.DocumentationUrl) } // SetDocumentationUrl sets field value -func (o *Offering) SetDocumentationUrl(v *string) { - o.DocumentationUrl = v +func (o *Offering) SetDocumentationUrl(v OfferingGetDocumentationUrlRetType) { + setOfferingGetDocumentationUrlAttributeType(&o.DocumentationUrl, v) } // GetImageUrl returns the ImageUrl field value -func (o *Offering) GetImageUrl() *string { - if o == nil || IsNil(o.ImageUrl) { - var ret *string - return ret - } - - return o.ImageUrl +func (o *Offering) GetImageUrl() (ret OfferingGetImageUrlRetType) { + ret, _ = o.GetImageUrlOk() + return ret } // GetImageUrlOk returns a tuple with the ImageUrl field value // and a boolean to check if the value has been set. -func (o *Offering) GetImageUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ImageUrl, true +func (o *Offering) GetImageUrlOk() (ret OfferingGetImageUrlRetType, ok bool) { + return getOfferingGetImageUrlAttributeTypeOk(o.ImageUrl) } // SetImageUrl sets field value -func (o *Offering) SetImageUrl(v *string) { - o.ImageUrl = v +func (o *Offering) SetImageUrl(v OfferingGetImageUrlRetType) { + setOfferingGetImageUrlAttributeType(&o.ImageUrl, v) } // GetLatest returns the Latest field value -func (o *Offering) GetLatest() *bool { - if o == nil || IsNil(o.Latest) { - var ret *bool - return ret - } - - return o.Latest +func (o *Offering) GetLatest() (ret OfferinggetLatestRetType) { + ret, _ = o.GetLatestOk() + return ret } // GetLatestOk returns a tuple with the Latest field value // and a boolean to check if the value has been set. -func (o *Offering) GetLatestOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Latest, true +func (o *Offering) GetLatestOk() (ret OfferinggetLatestRetType, ok bool) { + return getOfferinggetLatestAttributeTypeOk(o.Latest) } // SetLatest sets field value -func (o *Offering) SetLatest(v *bool) { - o.Latest = v +func (o *Offering) SetLatest(v OfferinggetLatestRetType) { + setOfferinggetLatestAttributeType(&o.Latest, v) } // GetLifecycle returns the Lifecycle field value if set, zero value otherwise. -func (o *Offering) GetLifecycle() *string { - if o == nil || IsNil(o.Lifecycle) { - var ret *string - return ret - } - return o.Lifecycle +func (o *Offering) GetLifecycle() (res OfferingGetLifecycleRetType) { + res, _ = o.GetLifecycleOk() + return } // GetLifecycleOk returns a tuple with the Lifecycle field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Offering) GetLifecycleOk() (*string, bool) { - if o == nil || IsNil(o.Lifecycle) { - return nil, false - } - return o.Lifecycle, true +func (o *Offering) GetLifecycleOk() (ret OfferingGetLifecycleRetType, ok bool) { + return getOfferingGetLifecycleAttributeTypeOk(o.Lifecycle) } // HasLifecycle returns a boolean if a field has been set. func (o *Offering) HasLifecycle() bool { - if o != nil && !IsNil(o.Lifecycle) { - return true - } - - return false + _, ok := o.GetLifecycleOk() + return ok } // SetLifecycle gets a reference to the given string and assigns it to the Lifecycle field. -func (o *Offering) SetLifecycle(v *string) { - o.Lifecycle = v +func (o *Offering) SetLifecycle(v OfferingGetLifecycleRetType) { + setOfferingGetLifecycleAttributeType(&o.Lifecycle, v) } // GetName returns the Name field value -func (o *Offering) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *Offering) GetName() (ret OfferingGetNameRetType) { + 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 *Offering) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *Offering) GetNameOk() (ret OfferingGetNameRetType, ok bool) { + return getOfferingGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *Offering) SetName(v *string) { - o.Name = v +func (o *Offering) SetName(v OfferingGetNameRetType) { + setOfferingGetNameAttributeType(&o.Name, v) } // GetPlans returns the Plans field value -func (o *Offering) GetPlans() *[]Plan { - if o == nil || IsNil(o.Plans) { - var ret *[]Plan - return ret - } - - return o.Plans +func (o *Offering) GetPlans() (ret OfferingGetPlansRetType) { + 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 *Offering) GetPlansOk() (*[]Plan, bool) { - if o == nil { - return nil, false - } - return o.Plans, true +func (o *Offering) GetPlansOk() (ret OfferingGetPlansRetType, ok bool) { + return getOfferingGetPlansAttributeTypeOk(o.Plans) } // SetPlans sets field value -func (o *Offering) SetPlans(v *[]Plan) { - o.Plans = v +func (o *Offering) SetPlans(v OfferingGetPlansRetType) { + setOfferingGetPlansAttributeType(&o.Plans, v) } // GetQuotaCount returns the QuotaCount field value -func (o *Offering) GetQuotaCount() *int64 { - if o == nil || IsNil(o.QuotaCount) { - var ret *int64 - return ret - } - - return o.QuotaCount +func (o *Offering) GetQuotaCount() (ret OfferingGetQuotaCountRetType) { + ret, _ = o.GetQuotaCountOk() + return ret } // GetQuotaCountOk returns a tuple with the QuotaCount field value // and a boolean to check if the value has been set. -func (o *Offering) GetQuotaCountOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.QuotaCount, true +func (o *Offering) GetQuotaCountOk() (ret OfferingGetQuotaCountRetType, ok bool) { + return getOfferingGetQuotaCountAttributeTypeOk(o.QuotaCount) } // SetQuotaCount sets field value -func (o *Offering) SetQuotaCount(v *int64) { - o.QuotaCount = v +func (o *Offering) SetQuotaCount(v OfferingGetQuotaCountRetType) { + setOfferingGetQuotaCountAttributeType(&o.QuotaCount, v) } // GetSchema returns the Schema field value if set, zero value otherwise. -func (o *Offering) GetSchema() *InstanceSchema { - if o == nil || IsNil(o.Schema) { - var ret *InstanceSchema - return ret - } - return o.Schema +func (o *Offering) GetSchema() (res OfferingGetSchemaRetType) { + 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 *Offering) GetSchemaOk() (*InstanceSchema, bool) { - if o == nil || IsNil(o.Schema) { - return nil, false - } - return o.Schema, true +func (o *Offering) GetSchemaOk() (ret OfferingGetSchemaRetType, ok bool) { + return getOfferingGetSchemaAttributeTypeOk(o.Schema) } // HasSchema returns a boolean if a field has been set. func (o *Offering) HasSchema() bool { - if o != nil && !IsNil(o.Schema) { - return true - } - - return false + _, ok := o.GetSchemaOk() + return ok } // SetSchema gets a reference to the given InstanceSchema and assigns it to the Schema field. -func (o *Offering) SetSchema(v *InstanceSchema) { - o.Schema = v +func (o *Offering) SetSchema(v OfferingGetSchemaRetType) { + setOfferingGetSchemaAttributeType(&o.Schema, v) } // GetVersion returns the Version field value -func (o *Offering) GetVersion() *string { - if o == nil || IsNil(o.Version) { - var ret *string - return ret - } - - return o.Version +func (o *Offering) GetVersion() (ret OfferingGetVersionRetType) { + ret, _ = o.GetVersionOk() + return ret } // GetVersionOk returns a tuple with the Version field value // and a boolean to check if the value has been set. -func (o *Offering) GetVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Version, true +func (o *Offering) GetVersionOk() (ret OfferingGetVersionRetType, ok bool) { + return getOfferingGetVersionAttributeTypeOk(o.Version) } // SetVersion sets field value -func (o *Offering) SetVersion(v *string) { - o.Version = v +func (o *Offering) SetVersion(v OfferingGetVersionRetType) { + setOfferingGetVersionAttributeType(&o.Version, v) } func (o Offering) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["description"] = o.Description - toSerialize["documentationUrl"] = o.DocumentationUrl - toSerialize["imageUrl"] = o.ImageUrl - toSerialize["latest"] = o.Latest - if !IsNil(o.Lifecycle) { - toSerialize["lifecycle"] = o.Lifecycle + if val, ok := getOfferingGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getOfferingGetDocumentationUrlAttributeTypeOk(o.DocumentationUrl); ok { + toSerialize["DocumentationUrl"] = val + } + if val, ok := getOfferingGetImageUrlAttributeTypeOk(o.ImageUrl); ok { + toSerialize["ImageUrl"] = val + } + if val, ok := getOfferinggetLatestAttributeTypeOk(o.Latest); ok { + toSerialize["Latest"] = val + } + if val, ok := getOfferingGetLifecycleAttributeTypeOk(o.Lifecycle); ok { + toSerialize["Lifecycle"] = val + } + if val, ok := getOfferingGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getOfferingGetPlansAttributeTypeOk(o.Plans); ok { + toSerialize["Plans"] = val + } + if val, ok := getOfferingGetQuotaCountAttributeTypeOk(o.QuotaCount); ok { + toSerialize["QuotaCount"] = val + } + if val, ok := getOfferingGetSchemaAttributeTypeOk(o.Schema); ok { + toSerialize["Schema"] = val } - toSerialize["name"] = o.Name - toSerialize["plans"] = o.Plans - toSerialize["quotaCount"] = o.QuotaCount - if !IsNil(o.Schema) { - toSerialize["schema"] = o.Schema + if val, ok := getOfferingGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val } - toSerialize["version"] = o.Version return toSerialize, nil } diff --git a/services/logme/model_partial_update_instance_payload.go b/services/logme/model_partial_update_instance_payload.go index 3cba3e640..cf86e60e2 100644 --- a/services/logme/model_partial_update_instance_payload.go +++ b/services/logme/model_partial_update_instance_payload.go @@ -17,11 +17,73 @@ import ( // checks if the PartialUpdateInstancePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PartialUpdateInstancePayload{} +/* + types and functions for instanceName +*/ + +// isNotNullableString +type PartialUpdateInstancePayloadGetInstanceNameAttributeType = *string + +func getPartialUpdateInstancePayloadGetInstanceNameAttributeTypeOk(arg PartialUpdateInstancePayloadGetInstanceNameAttributeType) (ret PartialUpdateInstancePayloadGetInstanceNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateInstancePayloadGetInstanceNameAttributeType(arg *PartialUpdateInstancePayloadGetInstanceNameAttributeType, val PartialUpdateInstancePayloadGetInstanceNameRetType) { + *arg = &val +} + +type PartialUpdateInstancePayloadGetInstanceNameArgType = string +type PartialUpdateInstancePayloadGetInstanceNameRetType = string + +/* + types and functions for parameters +*/ + +// isModel +type PartialUpdateInstancePayloadGetParametersAttributeType = *InstanceParameters +type PartialUpdateInstancePayloadGetParametersArgType = InstanceParameters +type PartialUpdateInstancePayloadGetParametersRetType = InstanceParameters + +func getPartialUpdateInstancePayloadGetParametersAttributeTypeOk(arg PartialUpdateInstancePayloadGetParametersAttributeType) (ret PartialUpdateInstancePayloadGetParametersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateInstancePayloadGetParametersAttributeType(arg *PartialUpdateInstancePayloadGetParametersAttributeType, val PartialUpdateInstancePayloadGetParametersRetType) { + *arg = &val +} + +/* + types and functions for planId +*/ + +// isNotNullableString +type PartialUpdateInstancePayloadGetPlanIdAttributeType = *string + +func getPartialUpdateInstancePayloadGetPlanIdAttributeTypeOk(arg PartialUpdateInstancePayloadGetPlanIdAttributeType) (ret PartialUpdateInstancePayloadGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateInstancePayloadGetPlanIdAttributeType(arg *PartialUpdateInstancePayloadGetPlanIdAttributeType, val PartialUpdateInstancePayloadGetPlanIdRetType) { + *arg = &val +} + +type PartialUpdateInstancePayloadGetPlanIdArgType = string +type PartialUpdateInstancePayloadGetPlanIdRetType = string + // PartialUpdateInstancePayload struct for PartialUpdateInstancePayload type PartialUpdateInstancePayload struct { - InstanceName *string `json:"instanceName,omitempty"` - Parameters *InstanceParameters `json:"parameters,omitempty"` - PlanId *string `json:"planId,omitempty"` + InstanceName PartialUpdateInstancePayloadGetInstanceNameAttributeType `json:"instanceName,omitempty"` + Parameters PartialUpdateInstancePayloadGetParametersAttributeType `json:"parameters,omitempty"` + PlanId PartialUpdateInstancePayloadGetPlanIdAttributeType `json:"planId,omitempty"` } // NewPartialUpdateInstancePayload instantiates a new PartialUpdateInstancePayload object @@ -42,111 +104,84 @@ func NewPartialUpdateInstancePayloadWithDefaults() *PartialUpdateInstancePayload } // GetInstanceName returns the InstanceName field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetInstanceName() *string { - if o == nil || IsNil(o.InstanceName) { - var ret *string - return ret - } - return o.InstanceName +func (o *PartialUpdateInstancePayload) GetInstanceName() (res PartialUpdateInstancePayloadGetInstanceNameRetType) { + res, _ = o.GetInstanceNameOk() + return } // GetInstanceNameOk returns a tuple with the InstanceName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetInstanceNameOk() (*string, bool) { - if o == nil || IsNil(o.InstanceName) { - return nil, false - } - return o.InstanceName, true +func (o *PartialUpdateInstancePayload) GetInstanceNameOk() (ret PartialUpdateInstancePayloadGetInstanceNameRetType, ok bool) { + return getPartialUpdateInstancePayloadGetInstanceNameAttributeTypeOk(o.InstanceName) } // HasInstanceName returns a boolean if a field has been set. func (o *PartialUpdateInstancePayload) HasInstanceName() bool { - if o != nil && !IsNil(o.InstanceName) { - return true - } - - return false + _, ok := o.GetInstanceNameOk() + return ok } // SetInstanceName gets a reference to the given string and assigns it to the InstanceName field. -func (o *PartialUpdateInstancePayload) SetInstanceName(v *string) { - o.InstanceName = v +func (o *PartialUpdateInstancePayload) SetInstanceName(v PartialUpdateInstancePayloadGetInstanceNameRetType) { + setPartialUpdateInstancePayloadGetInstanceNameAttributeType(&o.InstanceName, v) } // GetParameters returns the Parameters field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetParameters() *InstanceParameters { - if o == nil || IsNil(o.Parameters) { - var ret *InstanceParameters - return ret - } - return o.Parameters +func (o *PartialUpdateInstancePayload) GetParameters() (res PartialUpdateInstancePayloadGetParametersRetType) { + 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 *PartialUpdateInstancePayload) GetParametersOk() (*InstanceParameters, bool) { - if o == nil || IsNil(o.Parameters) { - return nil, false - } - return o.Parameters, true +func (o *PartialUpdateInstancePayload) GetParametersOk() (ret PartialUpdateInstancePayloadGetParametersRetType, ok bool) { + return getPartialUpdateInstancePayloadGetParametersAttributeTypeOk(o.Parameters) } // HasParameters returns a boolean if a field has been set. func (o *PartialUpdateInstancePayload) HasParameters() bool { - if o != nil && !IsNil(o.Parameters) { - return true - } - - return false + _, ok := o.GetParametersOk() + return ok } // SetParameters gets a reference to the given InstanceParameters and assigns it to the Parameters field. -func (o *PartialUpdateInstancePayload) SetParameters(v *InstanceParameters) { - o.Parameters = v +func (o *PartialUpdateInstancePayload) SetParameters(v PartialUpdateInstancePayloadGetParametersRetType) { + setPartialUpdateInstancePayloadGetParametersAttributeType(&o.Parameters, v) } // GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - return o.PlanId +func (o *PartialUpdateInstancePayload) GetPlanId() (res PartialUpdateInstancePayloadGetPlanIdRetType) { + res, _ = o.GetPlanIdOk() + return } // GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetPlanIdOk() (*string, bool) { - if o == nil || IsNil(o.PlanId) { - return nil, false - } - return o.PlanId, true +func (o *PartialUpdateInstancePayload) GetPlanIdOk() (ret PartialUpdateInstancePayloadGetPlanIdRetType, ok bool) { + return getPartialUpdateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId) } // HasPlanId returns a boolean if a field has been set. func (o *PartialUpdateInstancePayload) HasPlanId() bool { - if o != nil && !IsNil(o.PlanId) { - return true - } - - return false + _, ok := o.GetPlanIdOk() + return ok } // SetPlanId gets a reference to the given string and assigns it to the PlanId field. -func (o *PartialUpdateInstancePayload) SetPlanId(v *string) { - o.PlanId = v +func (o *PartialUpdateInstancePayload) SetPlanId(v PartialUpdateInstancePayloadGetPlanIdRetType) { + setPartialUpdateInstancePayloadGetPlanIdAttributeType(&o.PlanId, v) } func (o PartialUpdateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.InstanceName) { - toSerialize["instanceName"] = o.InstanceName + if val, ok := getPartialUpdateInstancePayloadGetInstanceNameAttributeTypeOk(o.InstanceName); ok { + toSerialize["InstanceName"] = val } - if !IsNil(o.Parameters) { - toSerialize["parameters"] = o.Parameters + if val, ok := getPartialUpdateInstancePayloadGetParametersAttributeTypeOk(o.Parameters); ok { + toSerialize["Parameters"] = val } - if !IsNil(o.PlanId) { - toSerialize["planId"] = o.PlanId + if val, ok := getPartialUpdateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val } return toSerialize, nil } diff --git a/services/logme/model_plan.go b/services/logme/model_plan.go index b84100876..fda0071c1 100644 --- a/services/logme/model_plan.go +++ b/services/logme/model_plan.go @@ -17,18 +17,122 @@ import ( // checks if the Plan type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Plan{} +/* + 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 free +*/ + +// isBoolean +type PlangetFreeAttributeType = *bool +type PlangetFreeArgType = bool +type PlangetFreeRetType = bool + +func getPlangetFreeAttributeTypeOk(arg PlangetFreeAttributeType) (ret PlangetFreeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlangetFreeAttributeType(arg *PlangetFreeAttributeType, val PlangetFreeRetType) { + *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 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 skuName +*/ + +// isNotNullableString +type PlanGetSkuNameAttributeType = *string + +func getPlanGetSkuNameAttributeTypeOk(arg PlanGetSkuNameAttributeType) (ret PlanGetSkuNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanGetSkuNameAttributeType(arg *PlanGetSkuNameAttributeType, val PlanGetSkuNameRetType) { + *arg = &val +} + +type PlanGetSkuNameArgType = string +type PlanGetSkuNameRetType = string + // Plan struct for Plan type Plan struct { // REQUIRED - Description *string `json:"description"` + Description PlanGetDescriptionAttributeType `json:"description"` // REQUIRED - Free *bool `json:"free"` + Free PlangetFreeAttributeType `json:"free"` // REQUIRED - Id *string `json:"id"` + Id PlanGetIdAttributeType `json:"id"` // REQUIRED - Name *string `json:"name"` + Name PlanGetNameAttributeType `json:"name"` // REQUIRED - SkuName *string `json:"skuName"` + SkuName PlanGetSkuNameAttributeType `json:"skuName"` } type _Plan Plan @@ -37,13 +141,13 @@ 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(description *string, free *bool, id *string, name *string, skuName *string) *Plan { +func NewPlan(description PlanGetDescriptionArgType, free PlangetFreeArgType, id PlanGetIdArgType, name PlanGetNameArgType, skuName PlanGetSkuNameArgType) *Plan { this := Plan{} - this.Description = description - this.Free = free - this.Id = id - this.Name = name - this.SkuName = skuName + setPlanGetDescriptionAttributeType(&this.Description, description) + setPlangetFreeAttributeType(&this.Free, free) + setPlanGetIdAttributeType(&this.Id, id) + setPlanGetNameAttributeType(&this.Name, name) + setPlanGetSkuNameAttributeType(&this.SkuName, skuName) return &this } @@ -56,132 +160,107 @@ func NewPlanWithDefaults() *Plan { } // GetDescription returns the Description field value -func (o *Plan) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - - return o.Description +func (o *Plan) GetDescription() (ret PlanGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *Plan) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description, true +func (o *Plan) GetDescriptionOk() (ret PlanGetDescriptionRetType, ok bool) { + return getPlanGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value -func (o *Plan) SetDescription(v *string) { - o.Description = v +func (o *Plan) SetDescription(v PlanGetDescriptionRetType) { + setPlanGetDescriptionAttributeType(&o.Description, v) } // GetFree returns the Free field value -func (o *Plan) GetFree() *bool { - if o == nil || IsNil(o.Free) { - var ret *bool - return ret - } - - return o.Free +func (o *Plan) GetFree() (ret PlangetFreeRetType) { + ret, _ = o.GetFreeOk() + return ret } // GetFreeOk returns a tuple with the Free field value // and a boolean to check if the value has been set. -func (o *Plan) GetFreeOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Free, true +func (o *Plan) GetFreeOk() (ret PlangetFreeRetType, ok bool) { + return getPlangetFreeAttributeTypeOk(o.Free) } // SetFree sets field value -func (o *Plan) SetFree(v *bool) { - o.Free = v +func (o *Plan) SetFree(v PlangetFreeRetType) { + setPlangetFreeAttributeType(&o.Free, 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) } // GetName returns the Name field value -func (o *Plan) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *Plan) GetName() (ret PlanGetNameRetType) { + 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 *Plan) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *Plan) GetNameOk() (ret PlanGetNameRetType, ok bool) { + return getPlanGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *Plan) SetName(v *string) { - o.Name = v +func (o *Plan) SetName(v PlanGetNameRetType) { + setPlanGetNameAttributeType(&o.Name, v) } // GetSkuName returns the SkuName field value -func (o *Plan) GetSkuName() *string { - if o == nil || IsNil(o.SkuName) { - var ret *string - return ret - } - - return o.SkuName +func (o *Plan) GetSkuName() (ret PlanGetSkuNameRetType) { + ret, _ = o.GetSkuNameOk() + return ret } // GetSkuNameOk returns a tuple with the SkuName field value // and a boolean to check if the value has been set. -func (o *Plan) GetSkuNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.SkuName, true +func (o *Plan) GetSkuNameOk() (ret PlanGetSkuNameRetType, ok bool) { + return getPlanGetSkuNameAttributeTypeOk(o.SkuName) } // SetSkuName sets field value -func (o *Plan) SetSkuName(v *string) { - o.SkuName = v +func (o *Plan) SetSkuName(v PlanGetSkuNameRetType) { + setPlanGetSkuNameAttributeType(&o.SkuName, v) } func (o Plan) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["description"] = o.Description - toSerialize["free"] = o.Free - toSerialize["id"] = o.Id - toSerialize["name"] = o.Name - toSerialize["skuName"] = o.SkuName + if val, ok := getPlanGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getPlangetFreeAttributeTypeOk(o.Free); ok { + toSerialize["Free"] = val + } + if val, ok := getPlanGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getPlanGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getPlanGetSkuNameAttributeTypeOk(o.SkuName); ok { + toSerialize["SkuName"] = val + } return toSerialize, nil } diff --git a/services/logme/model_raw_credentials.go b/services/logme/model_raw_credentials.go index 47d1a6061..7e1e4f629 100644 --- a/services/logme/model_raw_credentials.go +++ b/services/logme/model_raw_credentials.go @@ -17,10 +17,30 @@ import ( // checks if the RawCredentials type satisfies the MappedNullable interface at compile time var _ MappedNullable = &RawCredentials{} +/* + types and functions for credentials +*/ + +// isModel +type RawCredentialsGetCredentialsAttributeType = *Credentials +type RawCredentialsGetCredentialsArgType = Credentials +type RawCredentialsGetCredentialsRetType = Credentials + +func getRawCredentialsGetCredentialsAttributeTypeOk(arg RawCredentialsGetCredentialsAttributeType) (ret RawCredentialsGetCredentialsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRawCredentialsGetCredentialsAttributeType(arg *RawCredentialsGetCredentialsAttributeType, val RawCredentialsGetCredentialsRetType) { + *arg = &val +} + // RawCredentials struct for RawCredentials type RawCredentials struct { // REQUIRED - Credentials *Credentials `json:"credentials"` + Credentials RawCredentialsGetCredentialsAttributeType `json:"credentials"` } type _RawCredentials RawCredentials @@ -29,9 +49,9 @@ type _RawCredentials RawCredentials // 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 NewRawCredentials(credentials *Credentials) *RawCredentials { +func NewRawCredentials(credentials RawCredentialsGetCredentialsArgType) *RawCredentials { this := RawCredentials{} - this.Credentials = credentials + setRawCredentialsGetCredentialsAttributeType(&this.Credentials, credentials) return &this } @@ -44,32 +64,27 @@ func NewRawCredentialsWithDefaults() *RawCredentials { } // GetCredentials returns the Credentials field value -func (o *RawCredentials) GetCredentials() *Credentials { - if o == nil || IsNil(o.Credentials) { - var ret *Credentials - return ret - } - - return o.Credentials +func (o *RawCredentials) GetCredentials() (ret RawCredentialsGetCredentialsRetType) { + 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 *RawCredentials) GetCredentialsOk() (*Credentials, bool) { - if o == nil { - return nil, false - } - return o.Credentials, true +func (o *RawCredentials) GetCredentialsOk() (ret RawCredentialsGetCredentialsRetType, ok bool) { + return getRawCredentialsGetCredentialsAttributeTypeOk(o.Credentials) } // SetCredentials sets field value -func (o *RawCredentials) SetCredentials(v *Credentials) { - o.Credentials = v +func (o *RawCredentials) SetCredentials(v RawCredentialsGetCredentialsRetType) { + setRawCredentialsGetCredentialsAttributeType(&o.Credentials, v) } func (o RawCredentials) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["credentials"] = o.Credentials + if val, ok := getRawCredentialsGetCredentialsAttributeTypeOk(o.Credentials); ok { + toSerialize["Credentials"] = val + } return toSerialize, nil } diff --git a/services/logme/model_restore.go b/services/logme/model_restore.go index 154a8ce5f..c5e7aecc9 100644 --- a/services/logme/model_restore.go +++ b/services/logme/model_restore.go @@ -17,17 +17,120 @@ import ( // checks if the Restore type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Restore{} +/* + types and functions for backup_id +*/ + +// isInteger +type RestoreGetBackupIdAttributeType = *int64 +type RestoreGetBackupIdArgType = int64 +type RestoreGetBackupIdRetType = int64 + +func getRestoreGetBackupIdAttributeTypeOk(arg RestoreGetBackupIdAttributeType) (ret RestoreGetBackupIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRestoreGetBackupIdAttributeType(arg *RestoreGetBackupIdAttributeType, val RestoreGetBackupIdRetType) { + *arg = &val +} + +/* + types and functions for finished_at +*/ + +// isNotNullableString +type RestoreGetFinishedAtAttributeType = *string + +func getRestoreGetFinishedAtAttributeTypeOk(arg RestoreGetFinishedAtAttributeType) (ret RestoreGetFinishedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRestoreGetFinishedAtAttributeType(arg *RestoreGetFinishedAtAttributeType, val RestoreGetFinishedAtRetType) { + *arg = &val +} + +type RestoreGetFinishedAtArgType = string +type RestoreGetFinishedAtRetType = string + +/* + types and functions for id +*/ + +// isInteger +type RestoreGetIdAttributeType = *int64 +type RestoreGetIdArgType = int64 +type RestoreGetIdRetType = int64 + +func getRestoreGetIdAttributeTypeOk(arg RestoreGetIdAttributeType) (ret RestoreGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRestoreGetIdAttributeType(arg *RestoreGetIdAttributeType, val RestoreGetIdRetType) { + *arg = &val +} + +/* + types and functions for status +*/ + +// isNotNullableString +type RestoreGetStatusAttributeType = *string + +func getRestoreGetStatusAttributeTypeOk(arg RestoreGetStatusAttributeType) (ret RestoreGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRestoreGetStatusAttributeType(arg *RestoreGetStatusAttributeType, val RestoreGetStatusRetType) { + *arg = &val +} + +type RestoreGetStatusArgType = string +type RestoreGetStatusRetType = string + +/* + types and functions for triggered_at +*/ + +// isNotNullableString +type RestoreGetTriggeredAtAttributeType = *string + +func getRestoreGetTriggeredAtAttributeTypeOk(arg RestoreGetTriggeredAtAttributeType) (ret RestoreGetTriggeredAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRestoreGetTriggeredAtAttributeType(arg *RestoreGetTriggeredAtAttributeType, val RestoreGetTriggeredAtRetType) { + *arg = &val +} + +type RestoreGetTriggeredAtArgType = string +type RestoreGetTriggeredAtRetType = string + // Restore struct for Restore type Restore struct { // REQUIRED - BackupId *int64 `json:"backup_id"` + BackupId RestoreGetBackupIdAttributeType `json:"backup_id"` // REQUIRED - FinishedAt *string `json:"finished_at"` + FinishedAt RestoreGetFinishedAtAttributeType `json:"finished_at"` // REQUIRED - Id *int64 `json:"id"` + Id RestoreGetIdAttributeType `json:"id"` // REQUIRED - Status *string `json:"status"` - TriggeredAt *string `json:"triggered_at,omitempty"` + Status RestoreGetStatusAttributeType `json:"status"` + TriggeredAt RestoreGetTriggeredAtAttributeType `json:"triggered_at,omitempty"` } type _Restore Restore @@ -36,12 +139,12 @@ type _Restore Restore // 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 NewRestore(backupId *int64, finishedAt *string, id *int64, status *string) *Restore { +func NewRestore(backupId RestoreGetBackupIdArgType, finishedAt RestoreGetFinishedAtArgType, id RestoreGetIdArgType, status RestoreGetStatusArgType) *Restore { this := Restore{} - this.BackupId = backupId - this.FinishedAt = finishedAt - this.Id = id - this.Status = status + setRestoreGetBackupIdAttributeType(&this.BackupId, backupId) + setRestoreGetFinishedAtAttributeType(&this.FinishedAt, finishedAt) + setRestoreGetIdAttributeType(&this.Id, id) + setRestoreGetStatusAttributeType(&this.Status, status) return &this } @@ -54,141 +157,112 @@ func NewRestoreWithDefaults() *Restore { } // GetBackupId returns the BackupId field value -func (o *Restore) GetBackupId() *int64 { - if o == nil || IsNil(o.BackupId) { - var ret *int64 - return ret - } - - return o.BackupId +func (o *Restore) GetBackupId() (ret RestoreGetBackupIdRetType) { + ret, _ = o.GetBackupIdOk() + return ret } // GetBackupIdOk returns a tuple with the BackupId field value // and a boolean to check if the value has been set. -func (o *Restore) GetBackupIdOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.BackupId, true +func (o *Restore) GetBackupIdOk() (ret RestoreGetBackupIdRetType, ok bool) { + return getRestoreGetBackupIdAttributeTypeOk(o.BackupId) } // SetBackupId sets field value -func (o *Restore) SetBackupId(v *int64) { - o.BackupId = v +func (o *Restore) SetBackupId(v RestoreGetBackupIdRetType) { + setRestoreGetBackupIdAttributeType(&o.BackupId, v) } // GetFinishedAt returns the FinishedAt field value -func (o *Restore) GetFinishedAt() *string { - if o == nil || IsNil(o.FinishedAt) { - var ret *string - return ret - } - - return o.FinishedAt +func (o *Restore) GetFinishedAt() (ret RestoreGetFinishedAtRetType) { + ret, _ = o.GetFinishedAtOk() + return ret } // GetFinishedAtOk returns a tuple with the FinishedAt field value // and a boolean to check if the value has been set. -func (o *Restore) GetFinishedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FinishedAt, true +func (o *Restore) GetFinishedAtOk() (ret RestoreGetFinishedAtRetType, ok bool) { + return getRestoreGetFinishedAtAttributeTypeOk(o.FinishedAt) } // SetFinishedAt sets field value -func (o *Restore) SetFinishedAt(v *string) { - o.FinishedAt = v +func (o *Restore) SetFinishedAt(v RestoreGetFinishedAtRetType) { + setRestoreGetFinishedAtAttributeType(&o.FinishedAt, v) } // GetId returns the Id field value -func (o *Restore) GetId() *int64 { - if o == nil || IsNil(o.Id) { - var ret *int64 - return ret - } - - return o.Id +func (o *Restore) GetId() (ret RestoreGetIdRetType) { + 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 *Restore) GetIdOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Id, true +func (o *Restore) GetIdOk() (ret RestoreGetIdRetType, ok bool) { + return getRestoreGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *Restore) SetId(v *int64) { - o.Id = v +func (o *Restore) SetId(v RestoreGetIdRetType) { + setRestoreGetIdAttributeType(&o.Id, v) } // GetStatus returns the Status field value -func (o *Restore) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - - return o.Status +func (o *Restore) GetStatus() (ret RestoreGetStatusRetType) { + 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 *Restore) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Status, true +func (o *Restore) GetStatusOk() (ret RestoreGetStatusRetType, ok bool) { + return getRestoreGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value -func (o *Restore) SetStatus(v *string) { - o.Status = v +func (o *Restore) SetStatus(v RestoreGetStatusRetType) { + setRestoreGetStatusAttributeType(&o.Status, v) } // GetTriggeredAt returns the TriggeredAt field value if set, zero value otherwise. -func (o *Restore) GetTriggeredAt() *string { - if o == nil || IsNil(o.TriggeredAt) { - var ret *string - return ret - } - return o.TriggeredAt +func (o *Restore) GetTriggeredAt() (res RestoreGetTriggeredAtRetType) { + res, _ = o.GetTriggeredAtOk() + return } // GetTriggeredAtOk returns a tuple with the TriggeredAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Restore) GetTriggeredAtOk() (*string, bool) { - if o == nil || IsNil(o.TriggeredAt) { - return nil, false - } - return o.TriggeredAt, true +func (o *Restore) GetTriggeredAtOk() (ret RestoreGetTriggeredAtRetType, ok bool) { + return getRestoreGetTriggeredAtAttributeTypeOk(o.TriggeredAt) } // HasTriggeredAt returns a boolean if a field has been set. func (o *Restore) HasTriggeredAt() bool { - if o != nil && !IsNil(o.TriggeredAt) { - return true - } - - return false + _, ok := o.GetTriggeredAtOk() + return ok } // SetTriggeredAt gets a reference to the given string and assigns it to the TriggeredAt field. -func (o *Restore) SetTriggeredAt(v *string) { - o.TriggeredAt = v +func (o *Restore) SetTriggeredAt(v RestoreGetTriggeredAtRetType) { + setRestoreGetTriggeredAtAttributeType(&o.TriggeredAt, v) } func (o Restore) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["backup_id"] = o.BackupId - toSerialize["finished_at"] = o.FinishedAt - toSerialize["id"] = o.Id - toSerialize["status"] = o.Status - if !IsNil(o.TriggeredAt) { - toSerialize["triggered_at"] = o.TriggeredAt + if val, ok := getRestoreGetBackupIdAttributeTypeOk(o.BackupId); ok { + toSerialize["BackupId"] = val + } + if val, ok := getRestoreGetFinishedAtAttributeTypeOk(o.FinishedAt); ok { + toSerialize["FinishedAt"] = val + } + if val, ok := getRestoreGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getRestoreGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val + } + if val, ok := getRestoreGetTriggeredAtAttributeTypeOk(o.TriggeredAt); ok { + toSerialize["TriggeredAt"] = val } return toSerialize, nil } diff --git a/services/logme/model_schema.go b/services/logme/model_schema.go index bbd2efc74..565c6731f 100644 --- a/services/logme/model_schema.go +++ b/services/logme/model_schema.go @@ -17,10 +17,30 @@ import ( // checks if the Schema type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Schema{} +/* + types and functions for parameters +*/ + +// isFreeform +type SchemaGetParametersAttributeType = *map[string]interface{} +type SchemaGetParametersArgType = map[string]interface{} +type SchemaGetParametersRetType = map[string]interface{} + +func getSchemaGetParametersAttributeTypeOk(arg SchemaGetParametersAttributeType) (ret SchemaGetParametersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSchemaGetParametersAttributeType(arg *SchemaGetParametersAttributeType, val SchemaGetParametersRetType) { + *arg = &val +} + // Schema struct for Schema type Schema struct { // REQUIRED - Parameters *map[string]interface{} `json:"parameters"` + Parameters SchemaGetParametersAttributeType `json:"parameters"` } type _Schema Schema @@ -29,9 +49,9 @@ type _Schema Schema // 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 NewSchema(parameters *map[string]interface{}) *Schema { +func NewSchema(parameters SchemaGetParametersArgType) *Schema { this := Schema{} - this.Parameters = parameters + setSchemaGetParametersAttributeType(&this.Parameters, parameters) return &this } @@ -44,32 +64,27 @@ func NewSchemaWithDefaults() *Schema { } // GetParameters returns the Parameters field value -func (o *Schema) GetParameters() *map[string]interface{} { - if o == nil || IsNil(o.Parameters) { - var ret *map[string]interface{} - return ret - } - - return o.Parameters +func (o *Schema) GetParameters() (ret SchemaGetParametersRetType) { + ret, _ = o.GetParametersOk() + return ret } // GetParametersOk returns a tuple with the Parameters field value // and a boolean to check if the value has been set. -func (o *Schema) GetParametersOk() (*map[string]interface{}, bool) { - if o == nil { - return &map[string]interface{}{}, false - } - return o.Parameters, true +func (o *Schema) GetParametersOk() (ret SchemaGetParametersRetType, ok bool) { + return getSchemaGetParametersAttributeTypeOk(o.Parameters) } // SetParameters sets field value -func (o *Schema) SetParameters(v *map[string]interface{}) { - o.Parameters = v +func (o *Schema) SetParameters(v SchemaGetParametersRetType) { + setSchemaGetParametersAttributeType(&o.Parameters, v) } func (o Schema) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["parameters"] = o.Parameters + if val, ok := getSchemaGetParametersAttributeTypeOk(o.Parameters); ok { + toSerialize["Parameters"] = val + } return toSerialize, nil } diff --git a/services/logme/model_trigger_restore_response.go b/services/logme/model_trigger_restore_response.go index 79992e247..2cd152043 100644 --- a/services/logme/model_trigger_restore_response.go +++ b/services/logme/model_trigger_restore_response.go @@ -17,10 +17,30 @@ import ( // checks if the TriggerRestoreResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &TriggerRestoreResponse{} +/* + types and functions for id +*/ + +// isInteger +type TriggerRestoreResponseGetIdAttributeType = *int64 +type TriggerRestoreResponseGetIdArgType = int64 +type TriggerRestoreResponseGetIdRetType = int64 + +func getTriggerRestoreResponseGetIdAttributeTypeOk(arg TriggerRestoreResponseGetIdAttributeType) (ret TriggerRestoreResponseGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setTriggerRestoreResponseGetIdAttributeType(arg *TriggerRestoreResponseGetIdAttributeType, val TriggerRestoreResponseGetIdRetType) { + *arg = &val +} + // TriggerRestoreResponse struct for TriggerRestoreResponse type TriggerRestoreResponse struct { // REQUIRED - Id *int64 `json:"id"` + Id TriggerRestoreResponseGetIdAttributeType `json:"id"` } type _TriggerRestoreResponse TriggerRestoreResponse @@ -29,9 +49,9 @@ type _TriggerRestoreResponse TriggerRestoreResponse // 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 NewTriggerRestoreResponse(id *int64) *TriggerRestoreResponse { +func NewTriggerRestoreResponse(id TriggerRestoreResponseGetIdArgType) *TriggerRestoreResponse { this := TriggerRestoreResponse{} - this.Id = id + setTriggerRestoreResponseGetIdAttributeType(&this.Id, id) return &this } @@ -44,32 +64,27 @@ func NewTriggerRestoreResponseWithDefaults() *TriggerRestoreResponse { } // GetId returns the Id field value -func (o *TriggerRestoreResponse) GetId() *int64 { - if o == nil || IsNil(o.Id) { - var ret *int64 - return ret - } - - return o.Id +func (o *TriggerRestoreResponse) GetId() (ret TriggerRestoreResponseGetIdRetType) { + 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 *TriggerRestoreResponse) GetIdOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Id, true +func (o *TriggerRestoreResponse) GetIdOk() (ret TriggerRestoreResponseGetIdRetType, ok bool) { + return getTriggerRestoreResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *TriggerRestoreResponse) SetId(v *int64) { - o.Id = v +func (o *TriggerRestoreResponse) SetId(v TriggerRestoreResponseGetIdRetType) { + setTriggerRestoreResponseGetIdAttributeType(&o.Id, v) } func (o TriggerRestoreResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id + if val, ok := getTriggerRestoreResponseGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } return toSerialize, nil } diff --git a/services/logme/model_update_backups_config_payload.go b/services/logme/model_update_backups_config_payload.go index e8af6f3db..33896c2f1 100644 --- a/services/logme/model_update_backups_config_payload.go +++ b/services/logme/model_update_backups_config_payload.go @@ -17,9 +17,30 @@ import ( // checks if the UpdateBackupsConfigPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateBackupsConfigPayload{} +/* + types and functions for encryption_key +*/ + +// isNotNullableString +type UpdateBackupsConfigPayloadGetEncryptionKeyAttributeType = *string + +func getUpdateBackupsConfigPayloadGetEncryptionKeyAttributeTypeOk(arg UpdateBackupsConfigPayloadGetEncryptionKeyAttributeType) (ret UpdateBackupsConfigPayloadGetEncryptionKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateBackupsConfigPayloadGetEncryptionKeyAttributeType(arg *UpdateBackupsConfigPayloadGetEncryptionKeyAttributeType, val UpdateBackupsConfigPayloadGetEncryptionKeyRetType) { + *arg = &val +} + +type UpdateBackupsConfigPayloadGetEncryptionKeyArgType = string +type UpdateBackupsConfigPayloadGetEncryptionKeyRetType = string + // UpdateBackupsConfigPayload struct for UpdateBackupsConfigPayload type UpdateBackupsConfigPayload struct { - EncryptionKey *string `json:"encryption_key,omitempty"` + EncryptionKey UpdateBackupsConfigPayloadGetEncryptionKeyAttributeType `json:"encryption_key,omitempty"` } // NewUpdateBackupsConfigPayload instantiates a new UpdateBackupsConfigPayload object @@ -40,41 +61,32 @@ func NewUpdateBackupsConfigPayloadWithDefaults() *UpdateBackupsConfigPayload { } // GetEncryptionKey returns the EncryptionKey field value if set, zero value otherwise. -func (o *UpdateBackupsConfigPayload) GetEncryptionKey() *string { - if o == nil || IsNil(o.EncryptionKey) { - var ret *string - return ret - } - return o.EncryptionKey +func (o *UpdateBackupsConfigPayload) GetEncryptionKey() (res UpdateBackupsConfigPayloadGetEncryptionKeyRetType) { + res, _ = o.GetEncryptionKeyOk() + return } // GetEncryptionKeyOk returns a tuple with the EncryptionKey field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateBackupsConfigPayload) GetEncryptionKeyOk() (*string, bool) { - if o == nil || IsNil(o.EncryptionKey) { - return nil, false - } - return o.EncryptionKey, true +func (o *UpdateBackupsConfigPayload) GetEncryptionKeyOk() (ret UpdateBackupsConfigPayloadGetEncryptionKeyRetType, ok bool) { + return getUpdateBackupsConfigPayloadGetEncryptionKeyAttributeTypeOk(o.EncryptionKey) } // HasEncryptionKey returns a boolean if a field has been set. func (o *UpdateBackupsConfigPayload) HasEncryptionKey() bool { - if o != nil && !IsNil(o.EncryptionKey) { - return true - } - - return false + _, ok := o.GetEncryptionKeyOk() + return ok } // SetEncryptionKey gets a reference to the given string and assigns it to the EncryptionKey field. -func (o *UpdateBackupsConfigPayload) SetEncryptionKey(v *string) { - o.EncryptionKey = v +func (o *UpdateBackupsConfigPayload) SetEncryptionKey(v UpdateBackupsConfigPayloadGetEncryptionKeyRetType) { + setUpdateBackupsConfigPayloadGetEncryptionKeyAttributeType(&o.EncryptionKey, v) } func (o UpdateBackupsConfigPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.EncryptionKey) { - toSerialize["encryption_key"] = o.EncryptionKey + if val, ok := getUpdateBackupsConfigPayloadGetEncryptionKeyAttributeTypeOk(o.EncryptionKey); ok { + toSerialize["EncryptionKey"] = val } return toSerialize, nil } diff --git a/services/logme/model_update_backups_config_response.go b/services/logme/model_update_backups_config_response.go index b1abfb1ef..bad42c688 100644 --- a/services/logme/model_update_backups_config_response.go +++ b/services/logme/model_update_backups_config_response.go @@ -17,10 +17,31 @@ import ( // checks if the UpdateBackupsConfigResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateBackupsConfigResponse{} +/* + types and functions for message +*/ + +// isNotNullableString +type UpdateBackupsConfigResponseGetMessageAttributeType = *string + +func getUpdateBackupsConfigResponseGetMessageAttributeTypeOk(arg UpdateBackupsConfigResponseGetMessageAttributeType) (ret UpdateBackupsConfigResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateBackupsConfigResponseGetMessageAttributeType(arg *UpdateBackupsConfigResponseGetMessageAttributeType, val UpdateBackupsConfigResponseGetMessageRetType) { + *arg = &val +} + +type UpdateBackupsConfigResponseGetMessageArgType = string +type UpdateBackupsConfigResponseGetMessageRetType = string + // UpdateBackupsConfigResponse struct for UpdateBackupsConfigResponse type UpdateBackupsConfigResponse struct { // REQUIRED - Message *string `json:"message"` + Message UpdateBackupsConfigResponseGetMessageAttributeType `json:"message"` } type _UpdateBackupsConfigResponse UpdateBackupsConfigResponse @@ -29,9 +50,9 @@ type _UpdateBackupsConfigResponse UpdateBackupsConfigResponse // 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 NewUpdateBackupsConfigResponse(message *string) *UpdateBackupsConfigResponse { +func NewUpdateBackupsConfigResponse(message UpdateBackupsConfigResponseGetMessageArgType) *UpdateBackupsConfigResponse { this := UpdateBackupsConfigResponse{} - this.Message = message + setUpdateBackupsConfigResponseGetMessageAttributeType(&this.Message, message) return &this } @@ -44,32 +65,27 @@ func NewUpdateBackupsConfigResponseWithDefaults() *UpdateBackupsConfigResponse { } // GetMessage returns the Message field value -func (o *UpdateBackupsConfigResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - - return o.Message +func (o *UpdateBackupsConfigResponse) GetMessage() (ret UpdateBackupsConfigResponseGetMessageRetType) { + 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 *UpdateBackupsConfigResponse) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Message, true +func (o *UpdateBackupsConfigResponse) GetMessageOk() (ret UpdateBackupsConfigResponseGetMessageRetType, ok bool) { + return getUpdateBackupsConfigResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *UpdateBackupsConfigResponse) SetMessage(v *string) { - o.Message = v +func (o *UpdateBackupsConfigResponse) SetMessage(v UpdateBackupsConfigResponseGetMessageRetType) { + setUpdateBackupsConfigResponseGetMessageAttributeType(&o.Message, v) } func (o UpdateBackupsConfigResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message + if val, ok := getUpdateBackupsConfigResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } return toSerialize, nil } diff --git a/services/logme/utils.go b/services/logme/utils.go index e586e5cd3..45f0abf87 100644 --- a/services/logme/utils.go +++ b/services/logme/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()