diff --git a/services/lbapplication/api_default_test.go b/services/lbapplication/api_default_test.go index 089cd4cd6..375b523ef 100644 --- a/services/lbapplication/api_default_test.go +++ b/services/lbapplication/api_default_test.go @@ -24,12 +24,12 @@ import ( func Test_lbapplication_DefaultApiService(t *testing.T) { t.Run("Test DefaultApiService CreateCredentials", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/credentials" + _apiUrlPath := "/v1beta/projects/{projectId}/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) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := CreateCredentialsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -63,7 +63,7 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue createCredentialsPayload := CreateCredentialsPayload{} resp, reqErr := apiClient.CreateCredentials(context.Background(), projectId).CreateCredentialsPayload(createCredentialsPayload).Execute() @@ -71,18 +71,18 @@ func Test_lbapplication_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 CreateLoadBalancer", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/load-balancers" + _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers" 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 := LoadBalancer{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -116,7 +116,7 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue createLoadBalancerPayload := CreateLoadBalancerPayload{} resp, reqErr := apiClient.CreateLoadBalancer(context.Background(), projectId).CreateLoadBalancerPayload(createLoadBalancerPayload).Execute() @@ -124,20 +124,20 @@ func Test_lbapplication_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 := "/v1beta/projects/{projectId}/credentials/{credentialsRef}" + _apiUrlPath := "/v1beta/projects/{projectId}/credentials/{credentialsRef}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) credentialsRefValue := "credentialsRef" - path = strings.Replace(path, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -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 := map[string]interface{}{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -171,28 +171,28 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - credentialsRef := "credentialsRef" + projectId := projectIdValue + credentialsRef := credentialsRefValue resp, reqErr := apiClient.DeleteCredentials(context.Background(), projectId, credentialsRef).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 DeleteLoadBalancer", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/load-balancers/{name}" + _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers/{name}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) nameValue := "name" - path = strings.Replace(path, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -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 := map[string]interface{}{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -226,26 +226,26 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - name := "name" + projectId := projectIdValue + name := nameValue resp, reqErr := apiClient.DeleteLoadBalancer(context.Background(), projectId, name).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 DisableService", func(t *testing.T) { - path := "/v1beta/projects/{projectId}" + _apiUrlPath := "/v1beta/projects/{projectId}" 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 := map[string]interface{}{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -279,25 +279,25 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.DisableService(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 EnableService", func(t *testing.T) { - path := "/v1beta/projects/{projectId}" + _apiUrlPath := "/v1beta/projects/{projectId}" 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 := map[string]interface{}{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -331,27 +331,27 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.EnableService(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 GetCredentials", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/credentials/{credentialsRef}" + _apiUrlPath := "/v1beta/projects/{projectId}/credentials/{credentialsRef}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) credentialsRefValue := "credentialsRef" - path = strings.Replace(path, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := GetCredentialsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -385,28 +385,28 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - credentialsRef := "credentialsRef" + projectId := projectIdValue + credentialsRef := credentialsRefValue resp, reqErr := apiClient.GetCredentials(context.Background(), projectId, credentialsRef).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 GetLoadBalancer", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/load-balancers/{name}" + _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers/{name}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) nameValue := "name" - path = strings.Replace(path, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -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 := LoadBalancer{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -440,26 +440,26 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - name := "name" + projectId := projectIdValue + name := nameValue resp, reqErr := apiClient.GetLoadBalancer(context.Background(), projectId, name).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 GetQuota", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/quota" + _apiUrlPath := "/v1beta/projects/{projectId}/quota" 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 := GetQuotaResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -493,25 +493,25 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.GetQuota(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 GetServiceStatus", func(t *testing.T) { - path := "/v1beta/projects/{projectId}" + _apiUrlPath := "/v1beta/projects/{projectId}" 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 := GetServiceStatusResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -545,25 +545,25 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.GetServiceStatus(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 ListCredentials", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/credentials" + _apiUrlPath := "/v1beta/projects/{projectId}/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) 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) @@ -597,25 +597,25 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.ListCredentials(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 ListLoadBalancers", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/load-balancers" + _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers" 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 := ListLoadBalancersResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -649,23 +649,23 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.ListLoadBalancers(context.Background(), projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListPlans", func(t *testing.T) { - path := "/v1beta/plans" + _apiUrlPath := "/v1beta/plans" testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ListPlansResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -704,20 +704,20 @@ func Test_lbapplication_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 UpdateCredentials", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/credentials/{credentialsRef}" + _apiUrlPath := "/v1beta/projects/{projectId}/credentials/{credentialsRef}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) credentialsRefValue := "credentialsRef" - path = strings.Replace(path, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -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 := UpdateCredentialsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -751,8 +751,8 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - credentialsRef := "credentialsRef" + projectId := projectIdValue + credentialsRef := credentialsRefValue updateCredentialsPayload := UpdateCredentialsPayload{} resp, reqErr := apiClient.UpdateCredentials(context.Background(), projectId, credentialsRef).UpdateCredentialsPayload(updateCredentialsPayload).Execute() @@ -760,20 +760,20 @@ func Test_lbapplication_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 UpdateLoadBalancer", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/load-balancers/{name}" + _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers/{name}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) nameValue := "name" - path = strings.Replace(path, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -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 := LoadBalancer{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -807,8 +807,8 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - name := "name" + projectId := projectIdValue + name := nameValue updateLoadBalancerPayload := UpdateLoadBalancerPayload{} resp, reqErr := apiClient.UpdateLoadBalancer(context.Background(), projectId, name).UpdateLoadBalancerPayload(updateLoadBalancerPayload).Execute() @@ -816,22 +816,22 @@ func Test_lbapplication_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 UpdateTargetPool", func(t *testing.T) { - path := "/v1beta/projects/{projectId}/load-balancers/{name}/target-pools/{targetPoolName}" + _apiUrlPath := "/v1beta/projects/{projectId}/load-balancers/{name}/target-pools/{targetPoolName}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) nameValue := "name" - path = strings.Replace(path, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1) targetPoolNameValue := "targetPoolName" - path = strings.Replace(path, "{"+"targetPoolName"+"}", url.PathEscape(ParameterValueToString(targetPoolNameValue, "targetPoolName")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"targetPoolName"+"}", url.PathEscape(ParameterValueToString(targetPoolNameValue, "targetPoolName")), -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 := TargetPool{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -865,9 +865,9 @@ func Test_lbapplication_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - name := "name" - targetPoolName := "targetPoolName" + projectId := projectIdValue + name := nameValue + targetPoolName := targetPoolNameValue updateTargetPoolPayload := UpdateTargetPoolPayload{} resp, reqErr := apiClient.UpdateTargetPool(context.Background(), projectId, name, targetPoolName).UpdateTargetPoolPayload(updateTargetPoolPayload).Execute() @@ -875,7 +875,7 @@ func Test_lbapplication_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/lbapplication/model_active_health_check.go b/services/lbapplication/model_active_health_check.go index 1d0966761..3409a88fc 100644 --- a/services/lbapplication/model_active_health_check.go +++ b/services/lbapplication/model_active_health_check.go @@ -17,19 +17,142 @@ import ( // checks if the ActiveHealthCheck type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ActiveHealthCheck{} +/* + types and functions for healthyThreshold +*/ + +// isInteger +type ActiveHealthCheckGetHealthyThresholdAttributeType = *int64 +type ActiveHealthCheckGetHealthyThresholdArgType = int64 +type ActiveHealthCheckGetHealthyThresholdRetType = int64 + +func getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(arg ActiveHealthCheckGetHealthyThresholdAttributeType) (ret ActiveHealthCheckGetHealthyThresholdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setActiveHealthCheckGetHealthyThresholdAttributeType(arg *ActiveHealthCheckGetHealthyThresholdAttributeType, val ActiveHealthCheckGetHealthyThresholdRetType) { + *arg = &val +} + +/* + types and functions for httpHealthChecks +*/ + +// isModel +type ActiveHealthCheckGetHttpHealthChecksAttributeType = *HttpHealthChecks +type ActiveHealthCheckGetHttpHealthChecksArgType = HttpHealthChecks +type ActiveHealthCheckGetHttpHealthChecksRetType = HttpHealthChecks + +func getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(arg ActiveHealthCheckGetHttpHealthChecksAttributeType) (ret ActiveHealthCheckGetHttpHealthChecksRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setActiveHealthCheckGetHttpHealthChecksAttributeType(arg *ActiveHealthCheckGetHttpHealthChecksAttributeType, val ActiveHealthCheckGetHttpHealthChecksRetType) { + *arg = &val +} + +/* + types and functions for interval +*/ + +// isNotNullableString +type ActiveHealthCheckGetIntervalAttributeType = *string + +func getActiveHealthCheckGetIntervalAttributeTypeOk(arg ActiveHealthCheckGetIntervalAttributeType) (ret ActiveHealthCheckGetIntervalRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setActiveHealthCheckGetIntervalAttributeType(arg *ActiveHealthCheckGetIntervalAttributeType, val ActiveHealthCheckGetIntervalRetType) { + *arg = &val +} + +type ActiveHealthCheckGetIntervalArgType = string +type ActiveHealthCheckGetIntervalRetType = string + +/* + types and functions for intervalJitter +*/ + +// isNotNullableString +type ActiveHealthCheckGetIntervalJitterAttributeType = *string + +func getActiveHealthCheckGetIntervalJitterAttributeTypeOk(arg ActiveHealthCheckGetIntervalJitterAttributeType) (ret ActiveHealthCheckGetIntervalJitterRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setActiveHealthCheckGetIntervalJitterAttributeType(arg *ActiveHealthCheckGetIntervalJitterAttributeType, val ActiveHealthCheckGetIntervalJitterRetType) { + *arg = &val +} + +type ActiveHealthCheckGetIntervalJitterArgType = string +type ActiveHealthCheckGetIntervalJitterRetType = string + +/* + types and functions for timeout +*/ + +// isNotNullableString +type ActiveHealthCheckGetTimeoutAttributeType = *string + +func getActiveHealthCheckGetTimeoutAttributeTypeOk(arg ActiveHealthCheckGetTimeoutAttributeType) (ret ActiveHealthCheckGetTimeoutRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setActiveHealthCheckGetTimeoutAttributeType(arg *ActiveHealthCheckGetTimeoutAttributeType, val ActiveHealthCheckGetTimeoutRetType) { + *arg = &val +} + +type ActiveHealthCheckGetTimeoutArgType = string +type ActiveHealthCheckGetTimeoutRetType = string + +/* + types and functions for unhealthyThreshold +*/ + +// isInteger +type ActiveHealthCheckGetUnhealthyThresholdAttributeType = *int64 +type ActiveHealthCheckGetUnhealthyThresholdArgType = int64 +type ActiveHealthCheckGetUnhealthyThresholdRetType = int64 + +func getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(arg ActiveHealthCheckGetUnhealthyThresholdAttributeType) (ret ActiveHealthCheckGetUnhealthyThresholdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setActiveHealthCheckGetUnhealthyThresholdAttributeType(arg *ActiveHealthCheckGetUnhealthyThresholdAttributeType, val ActiveHealthCheckGetUnhealthyThresholdRetType) { + *arg = &val +} + // ActiveHealthCheck struct for ActiveHealthCheck type ActiveHealthCheck struct { // Healthy threshold of the health checking - HealthyThreshold *int64 `json:"healthyThreshold,omitempty"` - HttpHealthChecks *HttpHealthChecks `json:"httpHealthChecks,omitempty"` + HealthyThreshold ActiveHealthCheckGetHealthyThresholdAttributeType `json:"healthyThreshold,omitempty"` + HttpHealthChecks ActiveHealthCheckGetHttpHealthChecksAttributeType `json:"httpHealthChecks,omitempty"` // Interval duration of health checking in seconds - Interval *string `json:"interval,omitempty"` + Interval ActiveHealthCheckGetIntervalAttributeType `json:"interval,omitempty"` // Interval duration threshold of the health checking in seconds - IntervalJitter *string `json:"intervalJitter,omitempty"` + IntervalJitter ActiveHealthCheckGetIntervalJitterAttributeType `json:"intervalJitter,omitempty"` // Active health checking timeout duration in seconds - Timeout *string `json:"timeout,omitempty"` + Timeout ActiveHealthCheckGetTimeoutAttributeType `json:"timeout,omitempty"` // Unhealthy threshold of the health checking - UnhealthyThreshold *int64 `json:"unhealthyThreshold,omitempty"` + UnhealthyThreshold ActiveHealthCheckGetUnhealthyThresholdAttributeType `json:"unhealthyThreshold,omitempty"` } // NewActiveHealthCheck instantiates a new ActiveHealthCheck object @@ -50,216 +173,162 @@ func NewActiveHealthCheckWithDefaults() *ActiveHealthCheck { } // GetHealthyThreshold returns the HealthyThreshold field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetHealthyThreshold() *int64 { - if o == nil || IsNil(o.HealthyThreshold) { - var ret *int64 - return ret - } - return o.HealthyThreshold +func (o *ActiveHealthCheck) GetHealthyThreshold() (res ActiveHealthCheckGetHealthyThresholdRetType) { + res, _ = o.GetHealthyThresholdOk() + return } // GetHealthyThresholdOk returns a tuple with the HealthyThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetHealthyThresholdOk() (*int64, bool) { - if o == nil || IsNil(o.HealthyThreshold) { - return nil, false - } - return o.HealthyThreshold, true +func (o *ActiveHealthCheck) GetHealthyThresholdOk() (ret ActiveHealthCheckGetHealthyThresholdRetType, ok bool) { + return getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(o.HealthyThreshold) } // HasHealthyThreshold returns a boolean if a field has been set. func (o *ActiveHealthCheck) HasHealthyThreshold() bool { - if o != nil && !IsNil(o.HealthyThreshold) { - return true - } - - return false + _, ok := o.GetHealthyThresholdOk() + return ok } // SetHealthyThreshold gets a reference to the given int64 and assigns it to the HealthyThreshold field. -func (o *ActiveHealthCheck) SetHealthyThreshold(v *int64) { - o.HealthyThreshold = v +func (o *ActiveHealthCheck) SetHealthyThreshold(v ActiveHealthCheckGetHealthyThresholdRetType) { + setActiveHealthCheckGetHealthyThresholdAttributeType(&o.HealthyThreshold, v) } // GetHttpHealthChecks returns the HttpHealthChecks field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetHttpHealthChecks() *HttpHealthChecks { - if o == nil || IsNil(o.HttpHealthChecks) { - var ret *HttpHealthChecks - return ret - } - return o.HttpHealthChecks +func (o *ActiveHealthCheck) GetHttpHealthChecks() (res ActiveHealthCheckGetHttpHealthChecksRetType) { + res, _ = o.GetHttpHealthChecksOk() + return } // GetHttpHealthChecksOk returns a tuple with the HttpHealthChecks field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetHttpHealthChecksOk() (*HttpHealthChecks, bool) { - if o == nil || IsNil(o.HttpHealthChecks) { - return nil, false - } - return o.HttpHealthChecks, true +func (o *ActiveHealthCheck) GetHttpHealthChecksOk() (ret ActiveHealthCheckGetHttpHealthChecksRetType, ok bool) { + return getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(o.HttpHealthChecks) } // HasHttpHealthChecks returns a boolean if a field has been set. func (o *ActiveHealthCheck) HasHttpHealthChecks() bool { - if o != nil && !IsNil(o.HttpHealthChecks) { - return true - } - - return false + _, ok := o.GetHttpHealthChecksOk() + return ok } // SetHttpHealthChecks gets a reference to the given HttpHealthChecks and assigns it to the HttpHealthChecks field. -func (o *ActiveHealthCheck) SetHttpHealthChecks(v *HttpHealthChecks) { - o.HttpHealthChecks = v +func (o *ActiveHealthCheck) SetHttpHealthChecks(v ActiveHealthCheckGetHttpHealthChecksRetType) { + setActiveHealthCheckGetHttpHealthChecksAttributeType(&o.HttpHealthChecks, v) } // GetInterval returns the Interval field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetInterval() *string { - if o == nil || IsNil(o.Interval) { - var ret *string - return ret - } - return o.Interval +func (o *ActiveHealthCheck) GetInterval() (res ActiveHealthCheckGetIntervalRetType) { + res, _ = o.GetIntervalOk() + return } // GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetIntervalOk() (*string, bool) { - if o == nil || IsNil(o.Interval) { - return nil, false - } - return o.Interval, true +func (o *ActiveHealthCheck) GetIntervalOk() (ret ActiveHealthCheckGetIntervalRetType, ok bool) { + return getActiveHealthCheckGetIntervalAttributeTypeOk(o.Interval) } // HasInterval returns a boolean if a field has been set. func (o *ActiveHealthCheck) HasInterval() bool { - if o != nil && !IsNil(o.Interval) { - return true - } - - return false + _, ok := o.GetIntervalOk() + return ok } // SetInterval gets a reference to the given string and assigns it to the Interval field. -func (o *ActiveHealthCheck) SetInterval(v *string) { - o.Interval = v +func (o *ActiveHealthCheck) SetInterval(v ActiveHealthCheckGetIntervalRetType) { + setActiveHealthCheckGetIntervalAttributeType(&o.Interval, v) } // GetIntervalJitter returns the IntervalJitter field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetIntervalJitter() *string { - if o == nil || IsNil(o.IntervalJitter) { - var ret *string - return ret - } - return o.IntervalJitter +func (o *ActiveHealthCheck) GetIntervalJitter() (res ActiveHealthCheckGetIntervalJitterRetType) { + res, _ = o.GetIntervalJitterOk() + return } // GetIntervalJitterOk returns a tuple with the IntervalJitter field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetIntervalJitterOk() (*string, bool) { - if o == nil || IsNil(o.IntervalJitter) { - return nil, false - } - return o.IntervalJitter, true +func (o *ActiveHealthCheck) GetIntervalJitterOk() (ret ActiveHealthCheckGetIntervalJitterRetType, ok bool) { + return getActiveHealthCheckGetIntervalJitterAttributeTypeOk(o.IntervalJitter) } // HasIntervalJitter returns a boolean if a field has been set. func (o *ActiveHealthCheck) HasIntervalJitter() bool { - if o != nil && !IsNil(o.IntervalJitter) { - return true - } - - return false + _, ok := o.GetIntervalJitterOk() + return ok } // SetIntervalJitter gets a reference to the given string and assigns it to the IntervalJitter field. -func (o *ActiveHealthCheck) SetIntervalJitter(v *string) { - o.IntervalJitter = v +func (o *ActiveHealthCheck) SetIntervalJitter(v ActiveHealthCheckGetIntervalJitterRetType) { + setActiveHealthCheckGetIntervalJitterAttributeType(&o.IntervalJitter, v) } // GetTimeout returns the Timeout field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetTimeout() *string { - if o == nil || IsNil(o.Timeout) { - var ret *string - return ret - } - return o.Timeout +func (o *ActiveHealthCheck) GetTimeout() (res ActiveHealthCheckGetTimeoutRetType) { + res, _ = o.GetTimeoutOk() + return } // GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetTimeoutOk() (*string, bool) { - if o == nil || IsNil(o.Timeout) { - return nil, false - } - return o.Timeout, true +func (o *ActiveHealthCheck) GetTimeoutOk() (ret ActiveHealthCheckGetTimeoutRetType, ok bool) { + return getActiveHealthCheckGetTimeoutAttributeTypeOk(o.Timeout) } // HasTimeout returns a boolean if a field has been set. func (o *ActiveHealthCheck) HasTimeout() bool { - if o != nil && !IsNil(o.Timeout) { - return true - } - - return false + _, ok := o.GetTimeoutOk() + return ok } // SetTimeout gets a reference to the given string and assigns it to the Timeout field. -func (o *ActiveHealthCheck) SetTimeout(v *string) { - o.Timeout = v +func (o *ActiveHealthCheck) SetTimeout(v ActiveHealthCheckGetTimeoutRetType) { + setActiveHealthCheckGetTimeoutAttributeType(&o.Timeout, v) } // GetUnhealthyThreshold returns the UnhealthyThreshold field value if set, zero value otherwise. -func (o *ActiveHealthCheck) GetUnhealthyThreshold() *int64 { - if o == nil || IsNil(o.UnhealthyThreshold) { - var ret *int64 - return ret - } - return o.UnhealthyThreshold +func (o *ActiveHealthCheck) GetUnhealthyThreshold() (res ActiveHealthCheckGetUnhealthyThresholdRetType) { + res, _ = o.GetUnhealthyThresholdOk() + return } // GetUnhealthyThresholdOk returns a tuple with the UnhealthyThreshold field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (*int64, bool) { - if o == nil || IsNil(o.UnhealthyThreshold) { - return nil, false - } - return o.UnhealthyThreshold, true +func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (ret ActiveHealthCheckGetUnhealthyThresholdRetType, ok bool) { + return getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(o.UnhealthyThreshold) } // HasUnhealthyThreshold returns a boolean if a field has been set. func (o *ActiveHealthCheck) HasUnhealthyThreshold() bool { - if o != nil && !IsNil(o.UnhealthyThreshold) { - return true - } - - return false + _, ok := o.GetUnhealthyThresholdOk() + return ok } // SetUnhealthyThreshold gets a reference to the given int64 and assigns it to the UnhealthyThreshold field. -func (o *ActiveHealthCheck) SetUnhealthyThreshold(v *int64) { - o.UnhealthyThreshold = v +func (o *ActiveHealthCheck) SetUnhealthyThreshold(v ActiveHealthCheckGetUnhealthyThresholdRetType) { + setActiveHealthCheckGetUnhealthyThresholdAttributeType(&o.UnhealthyThreshold, v) } func (o ActiveHealthCheck) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.HealthyThreshold) { - toSerialize["healthyThreshold"] = o.HealthyThreshold + if val, ok := getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(o.HealthyThreshold); ok { + toSerialize["HealthyThreshold"] = val } - if !IsNil(o.HttpHealthChecks) { - toSerialize["httpHealthChecks"] = o.HttpHealthChecks + if val, ok := getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(o.HttpHealthChecks); ok { + toSerialize["HttpHealthChecks"] = val } - if !IsNil(o.Interval) { - toSerialize["interval"] = o.Interval + if val, ok := getActiveHealthCheckGetIntervalAttributeTypeOk(o.Interval); ok { + toSerialize["Interval"] = val } - if !IsNil(o.IntervalJitter) { - toSerialize["intervalJitter"] = o.IntervalJitter + if val, ok := getActiveHealthCheckGetIntervalJitterAttributeTypeOk(o.IntervalJitter); ok { + toSerialize["IntervalJitter"] = val } - if !IsNil(o.Timeout) { - toSerialize["timeout"] = o.Timeout + if val, ok := getActiveHealthCheckGetTimeoutAttributeTypeOk(o.Timeout); ok { + toSerialize["Timeout"] = val } - if !IsNil(o.UnhealthyThreshold) { - toSerialize["unhealthyThreshold"] = o.UnhealthyThreshold + if val, ok := getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(o.UnhealthyThreshold); ok { + toSerialize["UnhealthyThreshold"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_certificate_config.go b/services/lbapplication/model_certificate_config.go index 347987148..b1ae159a3 100644 --- a/services/lbapplication/model_certificate_config.go +++ b/services/lbapplication/model_certificate_config.go @@ -17,10 +17,30 @@ import ( // checks if the CertificateConfig type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CertificateConfig{} +/* + types and functions for certificateIds +*/ + +// isArray +type CertificateConfigGetCertificateIdsAttributeType = *[]string +type CertificateConfigGetCertificateIdsArgType = []string +type CertificateConfigGetCertificateIdsRetType = []string + +func getCertificateConfigGetCertificateIdsAttributeTypeOk(arg CertificateConfigGetCertificateIdsAttributeType) (ret CertificateConfigGetCertificateIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCertificateConfigGetCertificateIdsAttributeType(arg *CertificateConfigGetCertificateIdsAttributeType, val CertificateConfigGetCertificateIdsRetType) { + *arg = &val +} + // CertificateConfig struct for CertificateConfig type CertificateConfig struct { // Certificate IDs for TLS termination - CertificateIds *[]string `json:"certificateIds,omitempty"` + CertificateIds CertificateConfigGetCertificateIdsAttributeType `json:"certificateIds,omitempty"` } // NewCertificateConfig instantiates a new CertificateConfig object @@ -41,41 +61,32 @@ func NewCertificateConfigWithDefaults() *CertificateConfig { } // GetCertificateIds returns the CertificateIds field value if set, zero value otherwise. -func (o *CertificateConfig) GetCertificateIds() *[]string { - if o == nil || IsNil(o.CertificateIds) { - var ret *[]string - return ret - } - return o.CertificateIds +func (o *CertificateConfig) GetCertificateIds() (res CertificateConfigGetCertificateIdsRetType) { + res, _ = o.GetCertificateIdsOk() + return } // GetCertificateIdsOk returns a tuple with the CertificateIds field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CertificateConfig) GetCertificateIdsOk() (*[]string, bool) { - if o == nil || IsNil(o.CertificateIds) { - return nil, false - } - return o.CertificateIds, true +func (o *CertificateConfig) GetCertificateIdsOk() (ret CertificateConfigGetCertificateIdsRetType, ok bool) { + return getCertificateConfigGetCertificateIdsAttributeTypeOk(o.CertificateIds) } // HasCertificateIds returns a boolean if a field has been set. func (o *CertificateConfig) HasCertificateIds() bool { - if o != nil && !IsNil(o.CertificateIds) { - return true - } - - return false + _, ok := o.GetCertificateIdsOk() + return ok } // SetCertificateIds gets a reference to the given []string and assigns it to the CertificateIds field. -func (o *CertificateConfig) SetCertificateIds(v *[]string) { - o.CertificateIds = v +func (o *CertificateConfig) SetCertificateIds(v CertificateConfigGetCertificateIdsRetType) { + setCertificateConfigGetCertificateIdsAttributeType(&o.CertificateIds, v) } func (o CertificateConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CertificateIds) { - toSerialize["certificateIds"] = o.CertificateIds + if val, ok := getCertificateConfigGetCertificateIdsAttributeTypeOk(o.CertificateIds); ok { + toSerialize["CertificateIds"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_cookie_persistence.go b/services/lbapplication/model_cookie_persistence.go index 46fd43257..f0d511aec 100644 --- a/services/lbapplication/model_cookie_persistence.go +++ b/services/lbapplication/model_cookie_persistence.go @@ -17,12 +17,54 @@ import ( // checks if the CookiePersistence type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CookiePersistence{} +/* + types and functions for name +*/ + +// isNotNullableString +type CookiePersistenceGetNameAttributeType = *string + +func getCookiePersistenceGetNameAttributeTypeOk(arg CookiePersistenceGetNameAttributeType) (ret CookiePersistenceGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCookiePersistenceGetNameAttributeType(arg *CookiePersistenceGetNameAttributeType, val CookiePersistenceGetNameRetType) { + *arg = &val +} + +type CookiePersistenceGetNameArgType = string +type CookiePersistenceGetNameRetType = string + +/* + types and functions for ttl +*/ + +// isNotNullableString +type CookiePersistenceGetTtlAttributeType = *string + +func getCookiePersistenceGetTtlAttributeTypeOk(arg CookiePersistenceGetTtlAttributeType) (ret CookiePersistenceGetTtlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCookiePersistenceGetTtlAttributeType(arg *CookiePersistenceGetTtlAttributeType, val CookiePersistenceGetTtlRetType) { + *arg = &val +} + +type CookiePersistenceGetTtlArgType = string +type CookiePersistenceGetTtlRetType = string + // CookiePersistence struct for CookiePersistence type CookiePersistence struct { // Cookie is the name of the cookie to use. - Name *string `json:"name,omitempty"` + Name CookiePersistenceGetNameAttributeType `json:"name,omitempty"` // TTL specifies the time-to-live for the cookie. The default value is 0s, and it acts as a session cookie, expiring when the client session ends. - Ttl *string `json:"ttl,omitempty"` + Ttl CookiePersistenceGetTtlAttributeType `json:"ttl,omitempty"` } // NewCookiePersistence instantiates a new CookiePersistence object @@ -43,76 +85,58 @@ func NewCookiePersistenceWithDefaults() *CookiePersistence { } // GetName returns the Name field value if set, zero value otherwise. -func (o *CookiePersistence) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *CookiePersistence) GetName() (res CookiePersistenceGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CookiePersistence) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *CookiePersistence) GetNameOk() (ret CookiePersistenceGetNameRetType, ok bool) { + return getCookiePersistenceGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *CookiePersistence) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *CookiePersistence) SetName(v *string) { - o.Name = v +func (o *CookiePersistence) SetName(v CookiePersistenceGetNameRetType) { + setCookiePersistenceGetNameAttributeType(&o.Name, v) } // GetTtl returns the Ttl field value if set, zero value otherwise. -func (o *CookiePersistence) GetTtl() *string { - if o == nil || IsNil(o.Ttl) { - var ret *string - return ret - } - return o.Ttl +func (o *CookiePersistence) GetTtl() (res CookiePersistenceGetTtlRetType) { + res, _ = o.GetTtlOk() + return } // GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CookiePersistence) GetTtlOk() (*string, bool) { - if o == nil || IsNil(o.Ttl) { - return nil, false - } - return o.Ttl, true +func (o *CookiePersistence) GetTtlOk() (ret CookiePersistenceGetTtlRetType, ok bool) { + return getCookiePersistenceGetTtlAttributeTypeOk(o.Ttl) } // HasTtl returns a boolean if a field has been set. func (o *CookiePersistence) HasTtl() bool { - if o != nil && !IsNil(o.Ttl) { - return true - } - - return false + _, ok := o.GetTtlOk() + return ok } // SetTtl gets a reference to the given string and assigns it to the Ttl field. -func (o *CookiePersistence) SetTtl(v *string) { - o.Ttl = v +func (o *CookiePersistence) SetTtl(v CookiePersistenceGetTtlRetType) { + setCookiePersistenceGetTtlAttributeType(&o.Ttl, v) } func (o CookiePersistence) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getCookiePersistenceGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.Ttl) { - toSerialize["ttl"] = o.Ttl + if val, ok := getCookiePersistenceGetTtlAttributeTypeOk(o.Ttl); ok { + toSerialize["Ttl"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_create_credentials_payload.go b/services/lbapplication/model_create_credentials_payload.go index e1662d4d6..e78fd80c1 100644 --- a/services/lbapplication/model_create_credentials_payload.go +++ b/services/lbapplication/model_create_credentials_payload.go @@ -17,14 +17,77 @@ import ( // checks if the CreateCredentialsPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateCredentialsPayload{} +/* + types and functions for displayName +*/ + +// isNotNullableString +type CreateCredentialsPayloadGetDisplayNameAttributeType = *string + +func getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(arg CreateCredentialsPayloadGetDisplayNameAttributeType) (ret CreateCredentialsPayloadGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateCredentialsPayloadGetDisplayNameAttributeType(arg *CreateCredentialsPayloadGetDisplayNameAttributeType, val CreateCredentialsPayloadGetDisplayNameRetType) { + *arg = &val +} + +type CreateCredentialsPayloadGetDisplayNameArgType = string +type CreateCredentialsPayloadGetDisplayNameRetType = string + +/* + types and functions for password +*/ + +// isNotNullableString +type CreateCredentialsPayloadGetPasswordAttributeType = *string + +func getCreateCredentialsPayloadGetPasswordAttributeTypeOk(arg CreateCredentialsPayloadGetPasswordAttributeType) (ret CreateCredentialsPayloadGetPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateCredentialsPayloadGetPasswordAttributeType(arg *CreateCredentialsPayloadGetPasswordAttributeType, val CreateCredentialsPayloadGetPasswordRetType) { + *arg = &val +} + +type CreateCredentialsPayloadGetPasswordArgType = string +type CreateCredentialsPayloadGetPasswordRetType = string + +/* + types and functions for username +*/ + +// isNotNullableString +type CreateCredentialsPayloadGetUsernameAttributeType = *string + +func getCreateCredentialsPayloadGetUsernameAttributeTypeOk(arg CreateCredentialsPayloadGetUsernameAttributeType) (ret CreateCredentialsPayloadGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateCredentialsPayloadGetUsernameAttributeType(arg *CreateCredentialsPayloadGetUsernameAttributeType, val CreateCredentialsPayloadGetUsernameRetType) { + *arg = &val +} + +type CreateCredentialsPayloadGetUsernameArgType = string +type CreateCredentialsPayloadGetUsernameRetType = string + // CreateCredentialsPayload struct for CreateCredentialsPayload type CreateCredentialsPayload struct { // Credential name - DisplayName *string `json:"displayName,omitempty"` + DisplayName CreateCredentialsPayloadGetDisplayNameAttributeType `json:"displayName,omitempty"` // A valid password used for an existing ARGUS instance, which is used during basic auth. - Password *string `json:"password,omitempty"` + Password CreateCredentialsPayloadGetPasswordAttributeType `json:"password,omitempty"` // A valid username used for an existing ARGUS instance, which is used during basic auth. - Username *string `json:"username,omitempty"` + Username CreateCredentialsPayloadGetUsernameAttributeType `json:"username,omitempty"` } // NewCreateCredentialsPayload instantiates a new CreateCredentialsPayload object @@ -45,111 +108,84 @@ func NewCreateCredentialsPayloadWithDefaults() *CreateCredentialsPayload { } // GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *CreateCredentialsPayload) GetDisplayName() *string { - if o == nil || IsNil(o.DisplayName) { - var ret *string - return ret - } - return o.DisplayName +func (o *CreateCredentialsPayload) GetDisplayName() (res CreateCredentialsPayloadGetDisplayNameRetType) { + res, _ = o.GetDisplayNameOk() + return } // GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCredentialsPayload) GetDisplayNameOk() (*string, bool) { - if o == nil || IsNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true +func (o *CreateCredentialsPayload) GetDisplayNameOk() (ret CreateCredentialsPayloadGetDisplayNameRetType, ok bool) { + return getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName) } // HasDisplayName returns a boolean if a field has been set. func (o *CreateCredentialsPayload) HasDisplayName() bool { - if o != nil && !IsNil(o.DisplayName) { - return true - } - - return false + _, ok := o.GetDisplayNameOk() + return ok } // SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *CreateCredentialsPayload) SetDisplayName(v *string) { - o.DisplayName = v +func (o *CreateCredentialsPayload) SetDisplayName(v CreateCredentialsPayloadGetDisplayNameRetType) { + setCreateCredentialsPayloadGetDisplayNameAttributeType(&o.DisplayName, v) } // GetPassword returns the Password field value if set, zero value otherwise. -func (o *CreateCredentialsPayload) GetPassword() *string { - if o == nil || IsNil(o.Password) { - var ret *string - return ret - } - return o.Password +func (o *CreateCredentialsPayload) GetPassword() (res CreateCredentialsPayloadGetPasswordRetType) { + res, _ = o.GetPasswordOk() + return } // GetPasswordOk returns a tuple with the Password field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCredentialsPayload) GetPasswordOk() (*string, bool) { - if o == nil || IsNil(o.Password) { - return nil, false - } - return o.Password, true +func (o *CreateCredentialsPayload) GetPasswordOk() (ret CreateCredentialsPayloadGetPasswordRetType, ok bool) { + return getCreateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password) } // HasPassword returns a boolean if a field has been set. func (o *CreateCredentialsPayload) HasPassword() bool { - if o != nil && !IsNil(o.Password) { - return true - } - - return false + _, ok := o.GetPasswordOk() + return ok } // SetPassword gets a reference to the given string and assigns it to the Password field. -func (o *CreateCredentialsPayload) SetPassword(v *string) { - o.Password = v +func (o *CreateCredentialsPayload) SetPassword(v CreateCredentialsPayloadGetPasswordRetType) { + setCreateCredentialsPayloadGetPasswordAttributeType(&o.Password, v) } // GetUsername returns the Username field value if set, zero value otherwise. -func (o *CreateCredentialsPayload) GetUsername() *string { - if o == nil || IsNil(o.Username) { - var ret *string - return ret - } - return o.Username +func (o *CreateCredentialsPayload) GetUsername() (res CreateCredentialsPayloadGetUsernameRetType) { + res, _ = o.GetUsernameOk() + return } // GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCredentialsPayload) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true +func (o *CreateCredentialsPayload) GetUsernameOk() (ret CreateCredentialsPayloadGetUsernameRetType, ok bool) { + return getCreateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username) } // HasUsername returns a boolean if a field has been set. func (o *CreateCredentialsPayload) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false + _, ok := o.GetUsernameOk() + return ok } // SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *CreateCredentialsPayload) SetUsername(v *string) { - o.Username = v +func (o *CreateCredentialsPayload) SetUsername(v CreateCredentialsPayloadGetUsernameRetType) { + setCreateCredentialsPayloadGetUsernameAttributeType(&o.Username, v) } func (o CreateCredentialsPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.DisplayName) { - toSerialize["displayName"] = o.DisplayName + if val, ok := getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val } - if !IsNil(o.Password) { - toSerialize["password"] = o.Password + if val, ok := getCreateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password); ok { + toSerialize["Password"] = val } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username + if val, ok := getCreateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_create_credentials_response.go b/services/lbapplication/model_create_credentials_response.go index e92fd0010..864519caa 100644 --- a/services/lbapplication/model_create_credentials_response.go +++ b/services/lbapplication/model_create_credentials_response.go @@ -17,9 +17,29 @@ import ( // checks if the CreateCredentialsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateCredentialsResponse{} +/* + types and functions for credential +*/ + +// isModel +type CreateCredentialsResponseGetCredentialAttributeType = *CredentialsResponse +type CreateCredentialsResponseGetCredentialArgType = CredentialsResponse +type CreateCredentialsResponseGetCredentialRetType = CredentialsResponse + +func getCreateCredentialsResponseGetCredentialAttributeTypeOk(arg CreateCredentialsResponseGetCredentialAttributeType) (ret CreateCredentialsResponseGetCredentialRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateCredentialsResponseGetCredentialAttributeType(arg *CreateCredentialsResponseGetCredentialAttributeType, val CreateCredentialsResponseGetCredentialRetType) { + *arg = &val +} + // CreateCredentialsResponse struct for CreateCredentialsResponse type CreateCredentialsResponse struct { - Credential *CredentialsResponse `json:"credential,omitempty"` + Credential CreateCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"` } // NewCreateCredentialsResponse instantiates a new CreateCredentialsResponse object @@ -40,41 +60,32 @@ func NewCreateCredentialsResponseWithDefaults() *CreateCredentialsResponse { } // GetCredential returns the Credential field value if set, zero value otherwise. -func (o *CreateCredentialsResponse) GetCredential() *CredentialsResponse { - if o == nil || IsNil(o.Credential) { - var ret *CredentialsResponse - return ret - } - return o.Credential +func (o *CreateCredentialsResponse) GetCredential() (res CreateCredentialsResponseGetCredentialRetType) { + res, _ = o.GetCredentialOk() + return } // GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { - if o == nil || IsNil(o.Credential) { - return nil, false - } - return o.Credential, true +func (o *CreateCredentialsResponse) GetCredentialOk() (ret CreateCredentialsResponseGetCredentialRetType, ok bool) { + return getCreateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential) } // HasCredential returns a boolean if a field has been set. func (o *CreateCredentialsResponse) HasCredential() bool { - if o != nil && !IsNil(o.Credential) { - return true - } - - return false + _, ok := o.GetCredentialOk() + return ok } // SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. -func (o *CreateCredentialsResponse) SetCredential(v *CredentialsResponse) { - o.Credential = v +func (o *CreateCredentialsResponse) SetCredential(v CreateCredentialsResponseGetCredentialRetType) { + setCreateCredentialsResponseGetCredentialAttributeType(&o.Credential, v) } func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Credential) { - toSerialize["credential"] = o.Credential + if val, ok := getCreateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok { + toSerialize["Credential"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_create_load_balancer_payload.go b/services/lbapplication/model_create_load_balancer_payload.go index e207f09c3..facc96954 100644 --- a/services/lbapplication/model_create_load_balancer_payload.go +++ b/services/lbapplication/model_create_load_balancer_payload.go @@ -17,28 +17,253 @@ import ( // checks if the CreateLoadBalancerPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateLoadBalancerPayload{} +/* + types and functions for errors +*/ + +// isArray +type CreateLoadBalancerPayloadGetErrorsAttributeType = *[]LoadBalancerError +type CreateLoadBalancerPayloadGetErrorsArgType = []LoadBalancerError +type CreateLoadBalancerPayloadGetErrorsRetType = []LoadBalancerError + +func getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg CreateLoadBalancerPayloadGetErrorsAttributeType) (ret CreateLoadBalancerPayloadGetErrorsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetErrorsAttributeType(arg *CreateLoadBalancerPayloadGetErrorsAttributeType, val CreateLoadBalancerPayloadGetErrorsRetType) { + *arg = &val +} + +/* + types and functions for externalAddress +*/ + +// isNotNullableString +type CreateLoadBalancerPayloadGetExternalAddressAttributeType = *string + +func getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg CreateLoadBalancerPayloadGetExternalAddressAttributeType) (ret CreateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetExternalAddressAttributeType(arg *CreateLoadBalancerPayloadGetExternalAddressAttributeType, val CreateLoadBalancerPayloadGetExternalAddressRetType) { + *arg = &val +} + +type CreateLoadBalancerPayloadGetExternalAddressArgType = string +type CreateLoadBalancerPayloadGetExternalAddressRetType = string + +/* + types and functions for listeners +*/ + +// isArray +type CreateLoadBalancerPayloadGetListenersAttributeType = *[]Listener +type CreateLoadBalancerPayloadGetListenersArgType = []Listener +type CreateLoadBalancerPayloadGetListenersRetType = []Listener + +func getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(arg CreateLoadBalancerPayloadGetListenersAttributeType) (ret CreateLoadBalancerPayloadGetListenersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetListenersAttributeType(arg *CreateLoadBalancerPayloadGetListenersAttributeType, val CreateLoadBalancerPayloadGetListenersRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type CreateLoadBalancerPayloadGetNameAttributeType = *string + +func getCreateLoadBalancerPayloadGetNameAttributeTypeOk(arg CreateLoadBalancerPayloadGetNameAttributeType) (ret CreateLoadBalancerPayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetNameAttributeType(arg *CreateLoadBalancerPayloadGetNameAttributeType, val CreateLoadBalancerPayloadGetNameRetType) { + *arg = &val +} + +type CreateLoadBalancerPayloadGetNameArgType = string +type CreateLoadBalancerPayloadGetNameRetType = string + +/* + types and functions for networks +*/ + +// isArray +type CreateLoadBalancerPayloadGetNetworksAttributeType = *[]Network +type CreateLoadBalancerPayloadGetNetworksArgType = []Network +type CreateLoadBalancerPayloadGetNetworksRetType = []Network + +func getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg CreateLoadBalancerPayloadGetNetworksAttributeType) (ret CreateLoadBalancerPayloadGetNetworksRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetNetworksAttributeType(arg *CreateLoadBalancerPayloadGetNetworksAttributeType, val CreateLoadBalancerPayloadGetNetworksRetType) { + *arg = &val +} + +/* + types and functions for options +*/ + +// isModel +type CreateLoadBalancerPayloadGetOptionsAttributeType = *LoadBalancerOptions +type CreateLoadBalancerPayloadGetOptionsArgType = LoadBalancerOptions +type CreateLoadBalancerPayloadGetOptionsRetType = LoadBalancerOptions + +func getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg CreateLoadBalancerPayloadGetOptionsAttributeType) (ret CreateLoadBalancerPayloadGetOptionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetOptionsAttributeType(arg *CreateLoadBalancerPayloadGetOptionsAttributeType, val CreateLoadBalancerPayloadGetOptionsRetType) { + *arg = &val +} + +/* + types and functions for planId +*/ + +// isNotNullableString +type CreateLoadBalancerPayloadGetPlanIdAttributeType = *string + +func getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg CreateLoadBalancerPayloadGetPlanIdAttributeType) (ret CreateLoadBalancerPayloadGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetPlanIdAttributeType(arg *CreateLoadBalancerPayloadGetPlanIdAttributeType, val CreateLoadBalancerPayloadGetPlanIdRetType) { + *arg = &val +} + +type CreateLoadBalancerPayloadGetPlanIdArgType = string +type CreateLoadBalancerPayloadGetPlanIdRetType = string + +/* + types and functions for privateAddress +*/ + +// isNotNullableString +type CreateLoadBalancerPayloadGetPrivateAddressAttributeType = *string + +func getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg CreateLoadBalancerPayloadGetPrivateAddressAttributeType) (ret CreateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetPrivateAddressAttributeType(arg *CreateLoadBalancerPayloadGetPrivateAddressAttributeType, val CreateLoadBalancerPayloadGetPrivateAddressRetType) { + *arg = &val +} + +type CreateLoadBalancerPayloadGetPrivateAddressArgType = string +type CreateLoadBalancerPayloadGetPrivateAddressRetType = string + +/* + types and functions for status +*/ + +// isEnumRef +type CreateLoadBalancerPayloadGetStatusAttributeType = *string +type CreateLoadBalancerPayloadGetStatusArgType = string +type CreateLoadBalancerPayloadGetStatusRetType = string + +func getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(arg CreateLoadBalancerPayloadGetStatusAttributeType) (ret CreateLoadBalancerPayloadGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetStatusAttributeType(arg *CreateLoadBalancerPayloadGetStatusAttributeType, val CreateLoadBalancerPayloadGetStatusRetType) { + *arg = &val +} + +/* + types and functions for targetPools +*/ + +// isArray +type CreateLoadBalancerPayloadGetTargetPoolsAttributeType = *[]TargetPool +type CreateLoadBalancerPayloadGetTargetPoolsArgType = []TargetPool +type CreateLoadBalancerPayloadGetTargetPoolsRetType = []TargetPool + +func getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg CreateLoadBalancerPayloadGetTargetPoolsAttributeType) (ret CreateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *CreateLoadBalancerPayloadGetTargetPoolsAttributeType, val CreateLoadBalancerPayloadGetTargetPoolsRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isNotNullableString +type CreateLoadBalancerPayloadGetVersionAttributeType = *string + +func getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(arg CreateLoadBalancerPayloadGetVersionAttributeType) (ret CreateLoadBalancerPayloadGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLoadBalancerPayloadGetVersionAttributeType(arg *CreateLoadBalancerPayloadGetVersionAttributeType, val CreateLoadBalancerPayloadGetVersionRetType) { + *arg = &val +} + +type CreateLoadBalancerPayloadGetVersionArgType = string +type CreateLoadBalancerPayloadGetVersionRetType = string + // CreateLoadBalancerPayload struct for CreateLoadBalancerPayload type CreateLoadBalancerPayload struct { // Reports all errors a application load balancer has. - Errors *[]LoadBalancerError `json:"errors,omitempty"` + Errors CreateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` // External application load balancer IP address where this application load balancer is exposed. Not changeable after creation. - ExternalAddress *string `json:"externalAddress,omitempty"` + ExternalAddress CreateLoadBalancerPayloadGetExternalAddressAttributeType `json:"externalAddress,omitempty"` // There is a maximum listener count of 20. - Listeners *[]Listener `json:"listeners,omitempty"` + Listeners CreateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"` // Application Load Balancer name. Not changeable after creation. - Name *string `json:"name,omitempty"` + Name CreateLoadBalancerPayloadGetNameAttributeType `json:"name,omitempty"` // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks *[]Network `json:"networks,omitempty"` - Options *LoadBalancerOptions `json:"options,omitempty"` + Networks CreateLoadBalancerPayloadGetNetworksAttributeType `json:"networks,omitempty"` + Options CreateLoadBalancerPayloadGetOptionsAttributeType `json:"options,omitempty"` // Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId *string `json:"planId,omitempty"` + PlanId CreateLoadBalancerPayloadGetPlanIdAttributeType `json:"planId,omitempty"` // Transient private application load balancer IP address that can change any time. - PrivateAddress *string `json:"privateAddress,omitempty"` - Status *string `json:"status,omitempty"` + PrivateAddress CreateLoadBalancerPayloadGetPrivateAddressAttributeType `json:"privateAddress,omitempty"` + Status CreateLoadBalancerPayloadGetStatusAttributeType `json:"status,omitempty"` // List of all target pools which will be used in the application load balancer. Limited to 20. - TargetPools *[]TargetPool `json:"targetPools,omitempty"` + TargetPools CreateLoadBalancerPayloadGetTargetPoolsAttributeType `json:"targetPools,omitempty"` // Application Load Balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this application load balancer resource that changes during updates of the load balancers. On updates this field specified the application load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a application load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version *string `json:"version,omitempty"` + Version CreateLoadBalancerPayloadGetVersionAttributeType `json:"version,omitempty"` } // NewCreateLoadBalancerPayload instantiates a new CreateLoadBalancerPayload object @@ -59,391 +284,292 @@ func NewCreateLoadBalancerPayloadWithDefaults() *CreateLoadBalancerPayload { } // GetErrors returns the Errors field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetErrors() *[]LoadBalancerError { - if o == nil || IsNil(o.Errors) { - var ret *[]LoadBalancerError - return ret - } - return o.Errors +func (o *CreateLoadBalancerPayload) GetErrors() (res CreateLoadBalancerPayloadGetErrorsRetType) { + res, _ = o.GetErrorsOk() + return } // GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetErrorsOk() (*[]LoadBalancerError, bool) { - if o == nil || IsNil(o.Errors) { - return nil, false - } - return o.Errors, true +func (o *CreateLoadBalancerPayload) GetErrorsOk() (ret CreateLoadBalancerPayloadGetErrorsRetType, ok bool) { + return getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors) } // HasErrors returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasErrors() bool { - if o != nil && !IsNil(o.Errors) { - return true - } - - return false + _, ok := o.GetErrorsOk() + return ok } // SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. -func (o *CreateLoadBalancerPayload) SetErrors(v *[]LoadBalancerError) { - o.Errors = v +func (o *CreateLoadBalancerPayload) SetErrors(v CreateLoadBalancerPayloadGetErrorsRetType) { + setCreateLoadBalancerPayloadGetErrorsAttributeType(&o.Errors, v) } // GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetExternalAddress() *string { - if o == nil || IsNil(o.ExternalAddress) { - var ret *string - return ret - } - return o.ExternalAddress +func (o *CreateLoadBalancerPayload) GetExternalAddress() (res CreateLoadBalancerPayloadGetExternalAddressRetType) { + res, _ = o.GetExternalAddressOk() + return } // GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetExternalAddressOk() (*string, bool) { - if o == nil || IsNil(o.ExternalAddress) { - return nil, false - } - return o.ExternalAddress, true +func (o *CreateLoadBalancerPayload) GetExternalAddressOk() (ret CreateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { + return getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress) } // HasExternalAddress returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasExternalAddress() bool { - if o != nil && !IsNil(o.ExternalAddress) { - return true - } - - return false + _, ok := o.GetExternalAddressOk() + return ok } // SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. -func (o *CreateLoadBalancerPayload) SetExternalAddress(v *string) { - o.ExternalAddress = v +func (o *CreateLoadBalancerPayload) SetExternalAddress(v CreateLoadBalancerPayloadGetExternalAddressRetType) { + setCreateLoadBalancerPayloadGetExternalAddressAttributeType(&o.ExternalAddress, v) } // GetListeners returns the Listeners field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetListeners() *[]Listener { - if o == nil || IsNil(o.Listeners) { - var ret *[]Listener - return ret - } - return o.Listeners +func (o *CreateLoadBalancerPayload) GetListeners() (res CreateLoadBalancerPayloadGetListenersRetType) { + res, _ = o.GetListenersOk() + return } // GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetListenersOk() (*[]Listener, bool) { - if o == nil || IsNil(o.Listeners) { - return nil, false - } - return o.Listeners, true +func (o *CreateLoadBalancerPayload) GetListenersOk() (ret CreateLoadBalancerPayloadGetListenersRetType, ok bool) { + return getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners) } // HasListeners returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasListeners() bool { - if o != nil && !IsNil(o.Listeners) { - return true - } - - return false + _, ok := o.GetListenersOk() + return ok } // SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. -func (o *CreateLoadBalancerPayload) SetListeners(v *[]Listener) { - o.Listeners = v +func (o *CreateLoadBalancerPayload) SetListeners(v CreateLoadBalancerPayloadGetListenersRetType) { + setCreateLoadBalancerPayloadGetListenersAttributeType(&o.Listeners, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *CreateLoadBalancerPayload) GetName() (res CreateLoadBalancerPayloadGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *CreateLoadBalancerPayload) GetNameOk() (ret CreateLoadBalancerPayloadGetNameRetType, ok bool) { + return getCreateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *CreateLoadBalancerPayload) SetName(v *string) { - o.Name = v +func (o *CreateLoadBalancerPayload) SetName(v CreateLoadBalancerPayloadGetNameRetType) { + setCreateLoadBalancerPayloadGetNameAttributeType(&o.Name, v) } // GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetNetworks() *[]Network { - if o == nil || IsNil(o.Networks) { - var ret *[]Network - return ret - } - return o.Networks +func (o *CreateLoadBalancerPayload) GetNetworks() (res CreateLoadBalancerPayloadGetNetworksRetType) { + res, _ = o.GetNetworksOk() + return } // GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetNetworksOk() (*[]Network, bool) { - if o == nil || IsNil(o.Networks) { - return nil, false - } - return o.Networks, true +func (o *CreateLoadBalancerPayload) GetNetworksOk() (ret CreateLoadBalancerPayloadGetNetworksRetType, ok bool) { + return getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks) } // HasNetworks returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasNetworks() bool { - if o != nil && !IsNil(o.Networks) { - return true - } - - return false + _, ok := o.GetNetworksOk() + return ok } // SetNetworks gets a reference to the given []Network and assigns it to the Networks field. -func (o *CreateLoadBalancerPayload) SetNetworks(v *[]Network) { - o.Networks = v +func (o *CreateLoadBalancerPayload) SetNetworks(v CreateLoadBalancerPayloadGetNetworksRetType) { + setCreateLoadBalancerPayloadGetNetworksAttributeType(&o.Networks, v) } // GetOptions returns the Options field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetOptions() *LoadBalancerOptions { - if o == nil || IsNil(o.Options) { - var ret *LoadBalancerOptions - return ret - } - return o.Options +func (o *CreateLoadBalancerPayload) GetOptions() (res CreateLoadBalancerPayloadGetOptionsRetType) { + res, _ = o.GetOptionsOk() + return } // GetOptionsOk returns a tuple with the Options field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetOptionsOk() (*LoadBalancerOptions, bool) { - if o == nil || IsNil(o.Options) { - return nil, false - } - return o.Options, true +func (o *CreateLoadBalancerPayload) GetOptionsOk() (ret CreateLoadBalancerPayloadGetOptionsRetType, ok bool) { + return getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options) } // HasOptions returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasOptions() bool { - if o != nil && !IsNil(o.Options) { - return true - } - - return false + _, ok := o.GetOptionsOk() + return ok } // SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. -func (o *CreateLoadBalancerPayload) SetOptions(v *LoadBalancerOptions) { - o.Options = v +func (o *CreateLoadBalancerPayload) SetOptions(v CreateLoadBalancerPayloadGetOptionsRetType) { + setCreateLoadBalancerPayloadGetOptionsAttributeType(&o.Options, v) } // GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - return o.PlanId +func (o *CreateLoadBalancerPayload) GetPlanId() (res CreateLoadBalancerPayloadGetPlanIdRetType) { + 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 *CreateLoadBalancerPayload) GetPlanIdOk() (*string, bool) { - if o == nil || IsNil(o.PlanId) { - return nil, false - } - return o.PlanId, true +func (o *CreateLoadBalancerPayload) GetPlanIdOk() (ret CreateLoadBalancerPayloadGetPlanIdRetType, ok bool) { + return getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId) } // HasPlanId returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) 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 *CreateLoadBalancerPayload) SetPlanId(v *string) { - o.PlanId = v +func (o *CreateLoadBalancerPayload) SetPlanId(v CreateLoadBalancerPayloadGetPlanIdRetType) { + setCreateLoadBalancerPayloadGetPlanIdAttributeType(&o.PlanId, v) } // GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetPrivateAddress() *string { - if o == nil || IsNil(o.PrivateAddress) { - var ret *string - return ret - } - return o.PrivateAddress +func (o *CreateLoadBalancerPayload) GetPrivateAddress() (res CreateLoadBalancerPayloadGetPrivateAddressRetType) { + res, _ = o.GetPrivateAddressOk() + return } // GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetPrivateAddressOk() (*string, bool) { - if o == nil || IsNil(o.PrivateAddress) { - return nil, false - } - return o.PrivateAddress, true +func (o *CreateLoadBalancerPayload) GetPrivateAddressOk() (ret CreateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { + return getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress) } // HasPrivateAddress returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasPrivateAddress() bool { - if o != nil && !IsNil(o.PrivateAddress) { - return true - } - - return false + _, ok := o.GetPrivateAddressOk() + return ok } // SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. -func (o *CreateLoadBalancerPayload) SetPrivateAddress(v *string) { - o.PrivateAddress = v +func (o *CreateLoadBalancerPayload) SetPrivateAddress(v CreateLoadBalancerPayloadGetPrivateAddressRetType) { + setCreateLoadBalancerPayloadGetPrivateAddressAttributeType(&o.PrivateAddress, v) } // GetStatus returns the Status field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - return o.Status +func (o *CreateLoadBalancerPayload) GetStatus() (res CreateLoadBalancerPayloadGetStatusRetType) { + 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 *CreateLoadBalancerPayload) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true +func (o *CreateLoadBalancerPayload) GetStatusOk() (ret CreateLoadBalancerPayloadGetStatusRetType, ok bool) { + return getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status) } // HasStatus returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) 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 *CreateLoadBalancerPayload) SetStatus(v *string) { - o.Status = v +func (o *CreateLoadBalancerPayload) SetStatus(v CreateLoadBalancerPayloadGetStatusRetType) { + setCreateLoadBalancerPayloadGetStatusAttributeType(&o.Status, v) } // GetTargetPools returns the TargetPools field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetTargetPools() *[]TargetPool { - if o == nil || IsNil(o.TargetPools) { - var ret *[]TargetPool - return ret - } - return o.TargetPools +func (o *CreateLoadBalancerPayload) GetTargetPools() (res CreateLoadBalancerPayloadGetTargetPoolsRetType) { + res, _ = o.GetTargetPoolsOk() + return } // GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetTargetPoolsOk() (*[]TargetPool, bool) { - if o == nil || IsNil(o.TargetPools) { - return nil, false - } - return o.TargetPools, true +func (o *CreateLoadBalancerPayload) GetTargetPoolsOk() (ret CreateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { + return getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools) } // HasTargetPools returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasTargetPools() bool { - if o != nil && !IsNil(o.TargetPools) { - return true - } - - return false + _, ok := o.GetTargetPoolsOk() + return ok } // SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. -func (o *CreateLoadBalancerPayload) SetTargetPools(v *[]TargetPool) { - o.TargetPools = v +func (o *CreateLoadBalancerPayload) SetTargetPools(v CreateLoadBalancerPayloadGetTargetPoolsRetType) { + setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(&o.TargetPools, v) } // GetVersion returns the Version field value if set, zero value otherwise. -func (o *CreateLoadBalancerPayload) GetVersion() *string { - if o == nil || IsNil(o.Version) { - var ret *string - return ret - } - return o.Version +func (o *CreateLoadBalancerPayload) GetVersion() (res CreateLoadBalancerPayloadGetVersionRetType) { + res, _ = o.GetVersionOk() + return } // GetVersionOk returns a tuple with the Version field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLoadBalancerPayload) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true +func (o *CreateLoadBalancerPayload) GetVersionOk() (ret CreateLoadBalancerPayloadGetVersionRetType, ok bool) { + return getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version) } // HasVersion returns a boolean if a field has been set. func (o *CreateLoadBalancerPayload) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false + _, ok := o.GetVersionOk() + return ok } // SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *CreateLoadBalancerPayload) SetVersion(v *string) { - o.Version = v +func (o *CreateLoadBalancerPayload) SetVersion(v CreateLoadBalancerPayloadGetVersionRetType) { + setCreateLoadBalancerPayloadGetVersionAttributeType(&o.Version, v) } func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Errors) { - toSerialize["errors"] = o.Errors + if val, ok := getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors); ok { + toSerialize["Errors"] = val } - if !IsNil(o.ExternalAddress) { - toSerialize["externalAddress"] = o.ExternalAddress + if val, ok := getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok { + toSerialize["ExternalAddress"] = val } - if !IsNil(o.Listeners) { - toSerialize["listeners"] = o.Listeners + if val, ok := getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners); ok { + toSerialize["Listeners"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getCreateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.Networks) { - toSerialize["networks"] = o.Networks + if val, ok := getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks); ok { + toSerialize["Networks"] = val } - if !IsNil(o.Options) { - toSerialize["options"] = o.Options + if val, ok := getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options); ok { + toSerialize["Options"] = val } - if !IsNil(o.PlanId) { - toSerialize["planId"] = o.PlanId + if val, ok := getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val } - if !IsNil(o.PrivateAddress) { - toSerialize["privateAddress"] = o.PrivateAddress + if val, ok := getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok { + toSerialize["PrivateAddress"] = val } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status + if val, ok := getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val } - if !IsNil(o.TargetPools) { - toSerialize["targetPools"] = o.TargetPools + if val, ok := getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools); ok { + toSerialize["TargetPools"] = val } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version + if val, ok := getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_credentials_response.go b/services/lbapplication/model_credentials_response.go index 180b5344f..520cf5748 100644 --- a/services/lbapplication/model_credentials_response.go +++ b/services/lbapplication/model_credentials_response.go @@ -17,14 +17,77 @@ import ( // checks if the CredentialsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CredentialsResponse{} +/* + types and functions for credentialsRef +*/ + +// isNotNullableString +type CredentialsResponseGetCredentialsRefAttributeType = *string + +func getCredentialsResponseGetCredentialsRefAttributeTypeOk(arg CredentialsResponseGetCredentialsRefAttributeType) (ret CredentialsResponseGetCredentialsRefRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsResponseGetCredentialsRefAttributeType(arg *CredentialsResponseGetCredentialsRefAttributeType, val CredentialsResponseGetCredentialsRefRetType) { + *arg = &val +} + +type CredentialsResponseGetCredentialsRefArgType = string +type CredentialsResponseGetCredentialsRefRetType = string + +/* + types and functions for displayName +*/ + +// isNotNullableString +type CredentialsResponseGetDisplayNameAttributeType = *string + +func getCredentialsResponseGetDisplayNameAttributeTypeOk(arg CredentialsResponseGetDisplayNameAttributeType) (ret CredentialsResponseGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsResponseGetDisplayNameAttributeType(arg *CredentialsResponseGetDisplayNameAttributeType, val CredentialsResponseGetDisplayNameRetType) { + *arg = &val +} + +type CredentialsResponseGetDisplayNameArgType = string +type CredentialsResponseGetDisplayNameRetType = string + +/* + types and functions for username +*/ + +// isNotNullableString +type CredentialsResponseGetUsernameAttributeType = *string + +func getCredentialsResponseGetUsernameAttributeTypeOk(arg CredentialsResponseGetUsernameAttributeType) (ret CredentialsResponseGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsResponseGetUsernameAttributeType(arg *CredentialsResponseGetUsernameAttributeType, val CredentialsResponseGetUsernameRetType) { + *arg = &val +} + +type CredentialsResponseGetUsernameArgType = string +type CredentialsResponseGetUsernameRetType = string + // CredentialsResponse struct for CredentialsResponse type CredentialsResponse struct { // The credentials reference can be used for observability of the Application Load Balancer. - CredentialsRef *string `json:"credentialsRef,omitempty"` + CredentialsRef CredentialsResponseGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"` // Credential name - DisplayName *string `json:"displayName,omitempty"` + DisplayName CredentialsResponseGetDisplayNameAttributeType `json:"displayName,omitempty"` // The username used for the ARGUS instance - Username *string `json:"username,omitempty"` + Username CredentialsResponseGetUsernameAttributeType `json:"username,omitempty"` } // NewCredentialsResponse instantiates a new CredentialsResponse object @@ -45,111 +108,84 @@ func NewCredentialsResponseWithDefaults() *CredentialsResponse { } // GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. -func (o *CredentialsResponse) GetCredentialsRef() *string { - if o == nil || IsNil(o.CredentialsRef) { - var ret *string - return ret - } - return o.CredentialsRef +func (o *CredentialsResponse) GetCredentialsRef() (res CredentialsResponseGetCredentialsRefRetType) { + res, _ = o.GetCredentialsRefOk() + return } // GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetCredentialsRefOk() (*string, bool) { - if o == nil || IsNil(o.CredentialsRef) { - return nil, false - } - return o.CredentialsRef, true +func (o *CredentialsResponse) GetCredentialsRefOk() (ret CredentialsResponseGetCredentialsRefRetType, ok bool) { + return getCredentialsResponseGetCredentialsRefAttributeTypeOk(o.CredentialsRef) } // HasCredentialsRef returns a boolean if a field has been set. func (o *CredentialsResponse) HasCredentialsRef() bool { - if o != nil && !IsNil(o.CredentialsRef) { - return true - } - - return false + _, ok := o.GetCredentialsRefOk() + return ok } // SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. -func (o *CredentialsResponse) SetCredentialsRef(v *string) { - o.CredentialsRef = v +func (o *CredentialsResponse) SetCredentialsRef(v CredentialsResponseGetCredentialsRefRetType) { + setCredentialsResponseGetCredentialsRefAttributeType(&o.CredentialsRef, v) } // GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *CredentialsResponse) GetDisplayName() *string { - if o == nil || IsNil(o.DisplayName) { - var ret *string - return ret - } - return o.DisplayName +func (o *CredentialsResponse) GetDisplayName() (res CredentialsResponseGetDisplayNameRetType) { + res, _ = o.GetDisplayNameOk() + return } // GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetDisplayNameOk() (*string, bool) { - if o == nil || IsNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true +func (o *CredentialsResponse) GetDisplayNameOk() (ret CredentialsResponseGetDisplayNameRetType, ok bool) { + return getCredentialsResponseGetDisplayNameAttributeTypeOk(o.DisplayName) } // HasDisplayName returns a boolean if a field has been set. func (o *CredentialsResponse) HasDisplayName() bool { - if o != nil && !IsNil(o.DisplayName) { - return true - } - - return false + _, ok := o.GetDisplayNameOk() + return ok } // SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *CredentialsResponse) SetDisplayName(v *string) { - o.DisplayName = v +func (o *CredentialsResponse) SetDisplayName(v CredentialsResponseGetDisplayNameRetType) { + setCredentialsResponseGetDisplayNameAttributeType(&o.DisplayName, v) } // GetUsername returns the Username field value if set, zero value otherwise. -func (o *CredentialsResponse) GetUsername() *string { - if o == nil || IsNil(o.Username) { - var ret *string - return ret - } - return o.Username +func (o *CredentialsResponse) GetUsername() (res CredentialsResponseGetUsernameRetType) { + res, _ = o.GetUsernameOk() + return } // GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CredentialsResponse) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true +func (o *CredentialsResponse) GetUsernameOk() (ret CredentialsResponseGetUsernameRetType, ok bool) { + return getCredentialsResponseGetUsernameAttributeTypeOk(o.Username) } // HasUsername returns a boolean if a field has been set. func (o *CredentialsResponse) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false + _, ok := o.GetUsernameOk() + return ok } // SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *CredentialsResponse) SetUsername(v *string) { - o.Username = v +func (o *CredentialsResponse) SetUsername(v CredentialsResponseGetUsernameRetType) { + setCredentialsResponseGetUsernameAttributeType(&o.Username, v) } func (o CredentialsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CredentialsRef) { - toSerialize["credentialsRef"] = o.CredentialsRef + if val, ok := getCredentialsResponseGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok { + toSerialize["CredentialsRef"] = val } - if !IsNil(o.DisplayName) { - toSerialize["displayName"] = o.DisplayName + if val, ok := getCredentialsResponseGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username + if val, ok := getCredentialsResponseGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_get_credentials_response.go b/services/lbapplication/model_get_credentials_response.go index 521163d39..354b235cc 100644 --- a/services/lbapplication/model_get_credentials_response.go +++ b/services/lbapplication/model_get_credentials_response.go @@ -17,9 +17,29 @@ import ( // checks if the GetCredentialsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetCredentialsResponse{} +/* + types and functions for credential +*/ + +// isModel +type GetCredentialsResponseGetCredentialAttributeType = *CredentialsResponse +type GetCredentialsResponseGetCredentialArgType = CredentialsResponse +type GetCredentialsResponseGetCredentialRetType = CredentialsResponse + +func getGetCredentialsResponseGetCredentialAttributeTypeOk(arg GetCredentialsResponseGetCredentialAttributeType) (ret GetCredentialsResponseGetCredentialRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetCredentialsResponseGetCredentialAttributeType(arg *GetCredentialsResponseGetCredentialAttributeType, val GetCredentialsResponseGetCredentialRetType) { + *arg = &val +} + // GetCredentialsResponse struct for GetCredentialsResponse type GetCredentialsResponse struct { - Credential *CredentialsResponse `json:"credential,omitempty"` + Credential GetCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"` } // NewGetCredentialsResponse instantiates a new GetCredentialsResponse object @@ -40,41 +60,32 @@ func NewGetCredentialsResponseWithDefaults() *GetCredentialsResponse { } // GetCredential returns the Credential field value if set, zero value otherwise. -func (o *GetCredentialsResponse) GetCredential() *CredentialsResponse { - if o == nil || IsNil(o.Credential) { - var ret *CredentialsResponse - return ret - } - return o.Credential +func (o *GetCredentialsResponse) GetCredential() (res GetCredentialsResponseGetCredentialRetType) { + res, _ = o.GetCredentialOk() + return } // GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { - if o == nil || IsNil(o.Credential) { - return nil, false - } - return o.Credential, true +func (o *GetCredentialsResponse) GetCredentialOk() (ret GetCredentialsResponseGetCredentialRetType, ok bool) { + return getGetCredentialsResponseGetCredentialAttributeTypeOk(o.Credential) } // HasCredential returns a boolean if a field has been set. func (o *GetCredentialsResponse) HasCredential() bool { - if o != nil && !IsNil(o.Credential) { - return true - } - - return false + _, ok := o.GetCredentialOk() + return ok } // SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. -func (o *GetCredentialsResponse) SetCredential(v *CredentialsResponse) { - o.Credential = v +func (o *GetCredentialsResponse) SetCredential(v GetCredentialsResponseGetCredentialRetType) { + setGetCredentialsResponseGetCredentialAttributeType(&o.Credential, v) } func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Credential) { - toSerialize["credential"] = o.Credential + if val, ok := getGetCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok { + toSerialize["Credential"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_get_quota_response.go b/services/lbapplication/model_get_quota_response.go index 6b270b597..91b0a48c7 100644 --- a/services/lbapplication/model_get_quota_response.go +++ b/services/lbapplication/model_get_quota_response.go @@ -17,12 +17,53 @@ import ( // checks if the GetQuotaResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetQuotaResponse{} +/* + types and functions for maxLoadBalancers +*/ + +// isInteger +type GetQuotaResponseGetMaxLoadBalancersAttributeType = *int64 +type GetQuotaResponseGetMaxLoadBalancersArgType = int64 +type GetQuotaResponseGetMaxLoadBalancersRetType = int64 + +func getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(arg GetQuotaResponseGetMaxLoadBalancersAttributeType) (ret GetQuotaResponseGetMaxLoadBalancersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetQuotaResponseGetMaxLoadBalancersAttributeType(arg *GetQuotaResponseGetMaxLoadBalancersAttributeType, val GetQuotaResponseGetMaxLoadBalancersRetType) { + *arg = &val +} + +/* + types and functions for projectId +*/ + +// isNotNullableString +type GetQuotaResponseGetProjectIdAttributeType = *string + +func getGetQuotaResponseGetProjectIdAttributeTypeOk(arg GetQuotaResponseGetProjectIdAttributeType) (ret GetQuotaResponseGetProjectIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetQuotaResponseGetProjectIdAttributeType(arg *GetQuotaResponseGetProjectIdAttributeType, val GetQuotaResponseGetProjectIdRetType) { + *arg = &val +} + +type GetQuotaResponseGetProjectIdArgType = string +type GetQuotaResponseGetProjectIdRetType = string + // GetQuotaResponse struct for GetQuotaResponse type GetQuotaResponse struct { // The maximum number of load balancing servers in this project. Unlimited if set to -1. - MaxLoadBalancers *int64 `json:"maxLoadBalancers,omitempty"` + MaxLoadBalancers GetQuotaResponseGetMaxLoadBalancersAttributeType `json:"maxLoadBalancers,omitempty"` // Project identifier - ProjectId *string `json:"projectId,omitempty"` + ProjectId GetQuotaResponseGetProjectIdAttributeType `json:"projectId,omitempty"` } // NewGetQuotaResponse instantiates a new GetQuotaResponse object @@ -43,76 +84,58 @@ func NewGetQuotaResponseWithDefaults() *GetQuotaResponse { } // GetMaxLoadBalancers returns the MaxLoadBalancers field value if set, zero value otherwise. -func (o *GetQuotaResponse) GetMaxLoadBalancers() *int64 { - if o == nil || IsNil(o.MaxLoadBalancers) { - var ret *int64 - return ret - } - return o.MaxLoadBalancers +func (o *GetQuotaResponse) GetMaxLoadBalancers() (res GetQuotaResponseGetMaxLoadBalancersRetType) { + res, _ = o.GetMaxLoadBalancersOk() + return } // GetMaxLoadBalancersOk returns a tuple with the MaxLoadBalancers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (*int64, bool) { - if o == nil || IsNil(o.MaxLoadBalancers) { - return nil, false - } - return o.MaxLoadBalancers, true +func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (ret GetQuotaResponseGetMaxLoadBalancersRetType, ok bool) { + return getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(o.MaxLoadBalancers) } // HasMaxLoadBalancers returns a boolean if a field has been set. func (o *GetQuotaResponse) HasMaxLoadBalancers() bool { - if o != nil && !IsNil(o.MaxLoadBalancers) { - return true - } - - return false + _, ok := o.GetMaxLoadBalancersOk() + return ok } // SetMaxLoadBalancers gets a reference to the given int64 and assigns it to the MaxLoadBalancers field. -func (o *GetQuotaResponse) SetMaxLoadBalancers(v *int64) { - o.MaxLoadBalancers = v +func (o *GetQuotaResponse) SetMaxLoadBalancers(v GetQuotaResponseGetMaxLoadBalancersRetType) { + setGetQuotaResponseGetMaxLoadBalancersAttributeType(&o.MaxLoadBalancers, v) } // GetProjectId returns the ProjectId field value if set, zero value otherwise. -func (o *GetQuotaResponse) GetProjectId() *string { - if o == nil || IsNil(o.ProjectId) { - var ret *string - return ret - } - return o.ProjectId +func (o *GetQuotaResponse) GetProjectId() (res GetQuotaResponseGetProjectIdRetType) { + res, _ = o.GetProjectIdOk() + return } // GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetQuotaResponse) GetProjectIdOk() (*string, bool) { - if o == nil || IsNil(o.ProjectId) { - return nil, false - } - return o.ProjectId, true +func (o *GetQuotaResponse) GetProjectIdOk() (ret GetQuotaResponseGetProjectIdRetType, ok bool) { + return getGetQuotaResponseGetProjectIdAttributeTypeOk(o.ProjectId) } // HasProjectId returns a boolean if a field has been set. func (o *GetQuotaResponse) HasProjectId() bool { - if o != nil && !IsNil(o.ProjectId) { - return true - } - - return false + _, ok := o.GetProjectIdOk() + return ok } // SetProjectId gets a reference to the given string and assigns it to the ProjectId field. -func (o *GetQuotaResponse) SetProjectId(v *string) { - o.ProjectId = v +func (o *GetQuotaResponse) SetProjectId(v GetQuotaResponseGetProjectIdRetType) { + setGetQuotaResponseGetProjectIdAttributeType(&o.ProjectId, v) } func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.MaxLoadBalancers) { - toSerialize["maxLoadBalancers"] = o.MaxLoadBalancers + if val, ok := getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(o.MaxLoadBalancers); ok { + toSerialize["MaxLoadBalancers"] = val } - if !IsNil(o.ProjectId) { - toSerialize["projectId"] = o.ProjectId + if val, ok := getGetQuotaResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok { + toSerialize["ProjectId"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_get_service_status_response.go b/services/lbapplication/model_get_service_status_response.go index 06948290a..ef55edb39 100644 --- a/services/lbapplication/model_get_service_status_response.go +++ b/services/lbapplication/model_get_service_status_response.go @@ -17,10 +17,30 @@ import ( // checks if the GetServiceStatusResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetServiceStatusResponse{} +/* + types and functions for status +*/ + +// isEnumRef +type GetServiceStatusResponseGetStatusAttributeType = *string +type GetServiceStatusResponseGetStatusArgType = string +type GetServiceStatusResponseGetStatusRetType = string + +func getGetServiceStatusResponseGetStatusAttributeTypeOk(arg GetServiceStatusResponseGetStatusAttributeType) (ret GetServiceStatusResponseGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetServiceStatusResponseGetStatusAttributeType(arg *GetServiceStatusResponseGetStatusAttributeType, val GetServiceStatusResponseGetStatusRetType) { + *arg = &val +} + // GetServiceStatusResponse Response with customer project status. type GetServiceStatusResponse struct { // status of the project - Status *string `json:"status,omitempty"` + Status GetServiceStatusResponseGetStatusAttributeType `json:"status,omitempty"` } // NewGetServiceStatusResponse instantiates a new GetServiceStatusResponse object @@ -41,41 +61,32 @@ func NewGetServiceStatusResponseWithDefaults() *GetServiceStatusResponse { } // GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetServiceStatusResponse) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - return o.Status +func (o *GetServiceStatusResponse) GetStatus() (res GetServiceStatusResponseGetStatusRetType) { + 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 *GetServiceStatusResponse) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true +func (o *GetServiceStatusResponse) GetStatusOk() (ret GetServiceStatusResponseGetStatusRetType, ok bool) { + return getGetServiceStatusResponseGetStatusAttributeTypeOk(o.Status) } // HasStatus returns a boolean if a field has been set. func (o *GetServiceStatusResponse) 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 *GetServiceStatusResponse) SetStatus(v *string) { - o.Status = v +func (o *GetServiceStatusResponse) SetStatus(v GetServiceStatusResponseGetStatusRetType) { + setGetServiceStatusResponseGetStatusAttributeType(&o.Status, v) } func (o GetServiceStatusResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Status) { - toSerialize["status"] = o.Status + if val, ok := getGetServiceStatusResponseGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_google_protobuf_any.go b/services/lbapplication/model_google_protobuf_any.go index 4875ade32..b12eb82c1 100644 --- a/services/lbapplication/model_google_protobuf_any.go +++ b/services/lbapplication/model_google_protobuf_any.go @@ -17,10 +17,31 @@ import ( // checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GoogleProtobufAny{} +/* + types and functions for @type +*/ + +// isNotNullableString +type GoogleProtobufAnyGetTypeAttributeType = *string + +func getGoogleProtobufAnyGetTypeAttributeTypeOk(arg GoogleProtobufAnyGetTypeAttributeType) (ret GoogleProtobufAnyGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGoogleProtobufAnyGetTypeAttributeType(arg *GoogleProtobufAnyGetTypeAttributeType, val GoogleProtobufAnyGetTypeRetType) { + *arg = &val +} + +type GoogleProtobufAnyGetTypeArgType = string +type GoogleProtobufAnyGetTypeRetType = string + // GoogleProtobufAny Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. type GoogleProtobufAny struct { // The type of the serialized message. - Type *string `json:"@type,omitempty"` + Type GoogleProtobufAnyGetTypeAttributeType `json:"@type,omitempty"` AdditionalProperties map[string]interface{} } @@ -44,41 +65,32 @@ func NewGoogleProtobufAnyWithDefaults() *GoogleProtobufAny { } // GetType returns the Type field value if set, zero value otherwise. -func (o *GoogleProtobufAny) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - return o.Type +func (o *GoogleProtobufAny) GetType() (res GoogleProtobufAnyGetTypeRetType) { + res, _ = o.GetTypeOk() + return } // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GoogleProtobufAny) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true +func (o *GoogleProtobufAny) GetTypeOk() (ret GoogleProtobufAnyGetTypeRetType, ok bool) { + return getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type) } // HasType returns a boolean if a field has been set. func (o *GoogleProtobufAny) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false + _, ok := o.GetTypeOk() + return ok } // SetType gets a reference to the given string and assigns it to the Type field. -func (o *GoogleProtobufAny) SetType(v *string) { - o.Type = v +func (o *GoogleProtobufAny) SetType(v GoogleProtobufAnyGetTypeRetType) { + setGoogleProtobufAnyGetTypeAttributeType(&o.Type, v) } func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Type) { - toSerialize["@type"] = o.Type + if val, ok := getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val } for key, value := range o.AdditionalProperties { diff --git a/services/lbapplication/model_header.go b/services/lbapplication/model_header.go index bae66c09a..34a076b57 100644 --- a/services/lbapplication/model_header.go +++ b/services/lbapplication/model_header.go @@ -17,12 +17,54 @@ import ( // checks if the Header type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Header{} +/* + types and functions for exactMatch +*/ + +// isNotNullableString +type HeaderGetExactMatchAttributeType = *string + +func getHeaderGetExactMatchAttributeTypeOk(arg HeaderGetExactMatchAttributeType) (ret HeaderGetExactMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHeaderGetExactMatchAttributeType(arg *HeaderGetExactMatchAttributeType, val HeaderGetExactMatchRetType) { + *arg = &val +} + +type HeaderGetExactMatchArgType = string +type HeaderGetExactMatchRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type HeaderGetNameAttributeType = *string + +func getHeaderGetNameAttributeTypeOk(arg HeaderGetNameAttributeType) (ret HeaderGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHeaderGetNameAttributeType(arg *HeaderGetNameAttributeType, val HeaderGetNameRetType) { + *arg = &val +} + +type HeaderGetNameArgType = string +type HeaderGetNameRetType = string + // Header struct for Header type Header struct { // Exact match for the header value. - ExactMatch *string `json:"exactMatch,omitempty"` + ExactMatch HeaderGetExactMatchAttributeType `json:"exactMatch,omitempty"` // Header name. - Name *string `json:"name,omitempty"` + Name HeaderGetNameAttributeType `json:"name,omitempty"` } // NewHeader instantiates a new Header object @@ -43,76 +85,58 @@ func NewHeaderWithDefaults() *Header { } // GetExactMatch returns the ExactMatch field value if set, zero value otherwise. -func (o *Header) GetExactMatch() *string { - if o == nil || IsNil(o.ExactMatch) { - var ret *string - return ret - } - return o.ExactMatch +func (o *Header) GetExactMatch() (res HeaderGetExactMatchRetType) { + res, _ = o.GetExactMatchOk() + return } // GetExactMatchOk returns a tuple with the ExactMatch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Header) GetExactMatchOk() (*string, bool) { - if o == nil || IsNil(o.ExactMatch) { - return nil, false - } - return o.ExactMatch, true +func (o *Header) GetExactMatchOk() (ret HeaderGetExactMatchRetType, ok bool) { + return getHeaderGetExactMatchAttributeTypeOk(o.ExactMatch) } // HasExactMatch returns a boolean if a field has been set. func (o *Header) HasExactMatch() bool { - if o != nil && !IsNil(o.ExactMatch) { - return true - } - - return false + _, ok := o.GetExactMatchOk() + return ok } // SetExactMatch gets a reference to the given string and assigns it to the ExactMatch field. -func (o *Header) SetExactMatch(v *string) { - o.ExactMatch = v +func (o *Header) SetExactMatch(v HeaderGetExactMatchRetType) { + setHeaderGetExactMatchAttributeType(&o.ExactMatch, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *Header) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *Header) GetName() (res HeaderGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Header) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *Header) GetNameOk() (ret HeaderGetNameRetType, ok bool) { + return getHeaderGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *Header) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *Header) SetName(v *string) { - o.Name = v +func (o *Header) SetName(v HeaderGetNameRetType) { + setHeaderGetNameAttributeType(&o.Name, v) } func (o Header) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ExactMatch) { - toSerialize["exactMatch"] = o.ExactMatch + if val, ok := getHeaderGetExactMatchAttributeTypeOk(o.ExactMatch); ok { + toSerialize["ExactMatch"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getHeaderGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_http_config.go b/services/lbapplication/model_http_config.go index 73e481b65..ac5348237 100644 --- a/services/lbapplication/model_http_config.go +++ b/services/lbapplication/model_http_config.go @@ -17,9 +17,29 @@ import ( // checks if the HTTPConfig type satisfies the MappedNullable interface at compile time var _ MappedNullable = &HTTPConfig{} +/* + types and functions for matcher +*/ + +// isArray +type HTTPConfigGetMatcherAttributeType = *[]Matcher +type HTTPConfigGetMatcherArgType = []Matcher +type HTTPConfigGetMatcherRetType = []Matcher + +func getHTTPConfigGetMatcherAttributeTypeOk(arg HTTPConfigGetMatcherAttributeType) (ret HTTPConfigGetMatcherRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHTTPConfigGetMatcherAttributeType(arg *HTTPConfigGetMatcherAttributeType, val HTTPConfigGetMatcherRetType) { + *arg = &val +} + // HTTPConfig struct for HTTPConfig type HTTPConfig struct { - Matcher *[]Matcher `json:"matcher,omitempty"` + Matcher HTTPConfigGetMatcherAttributeType `json:"matcher,omitempty"` } // NewHTTPConfig instantiates a new HTTPConfig object @@ -40,41 +60,32 @@ func NewHTTPConfigWithDefaults() *HTTPConfig { } // GetMatcher returns the Matcher field value if set, zero value otherwise. -func (o *HTTPConfig) GetMatcher() *[]Matcher { - if o == nil || IsNil(o.Matcher) { - var ret *[]Matcher - return ret - } - return o.Matcher +func (o *HTTPConfig) GetMatcher() (res HTTPConfigGetMatcherRetType) { + res, _ = o.GetMatcherOk() + return } // GetMatcherOk returns a tuple with the Matcher field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *HTTPConfig) GetMatcherOk() (*[]Matcher, bool) { - if o == nil || IsNil(o.Matcher) { - return nil, false - } - return o.Matcher, true +func (o *HTTPConfig) GetMatcherOk() (ret HTTPConfigGetMatcherRetType, ok bool) { + return getHTTPConfigGetMatcherAttributeTypeOk(o.Matcher) } // HasMatcher returns a boolean if a field has been set. func (o *HTTPConfig) HasMatcher() bool { - if o != nil && !IsNil(o.Matcher) { - return true - } - - return false + _, ok := o.GetMatcherOk() + return ok } // SetMatcher gets a reference to the given []Matcher and assigns it to the Matcher field. -func (o *HTTPConfig) SetMatcher(v *[]Matcher) { - o.Matcher = v +func (o *HTTPConfig) SetMatcher(v HTTPConfigGetMatcherRetType) { + setHTTPConfigGetMatcherAttributeType(&o.Matcher, v) } func (o HTTPConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Matcher) { - toSerialize["matcher"] = o.Matcher + if val, ok := getHTTPConfigGetMatcherAttributeTypeOk(o.Matcher); ok { + toSerialize["Matcher"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_http_health_checks.go b/services/lbapplication/model_http_health_checks.go index be8b0a257..3eecfd884 100644 --- a/services/lbapplication/model_http_health_checks.go +++ b/services/lbapplication/model_http_health_checks.go @@ -17,12 +17,53 @@ import ( // checks if the HttpHealthChecks type satisfies the MappedNullable interface at compile time var _ MappedNullable = &HttpHealthChecks{} +/* + types and functions for okStatuses +*/ + +// isArray +type HttpHealthChecksGetOkStatusesAttributeType = *[]string +type HttpHealthChecksGetOkStatusesArgType = []string +type HttpHealthChecksGetOkStatusesRetType = []string + +func getHttpHealthChecksGetOkStatusesAttributeTypeOk(arg HttpHealthChecksGetOkStatusesAttributeType) (ret HttpHealthChecksGetOkStatusesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHttpHealthChecksGetOkStatusesAttributeType(arg *HttpHealthChecksGetOkStatusesAttributeType, val HttpHealthChecksGetOkStatusesRetType) { + *arg = &val +} + +/* + types and functions for path +*/ + +// isNotNullableString +type HttpHealthChecksGetPathAttributeType = *string + +func getHttpHealthChecksGetPathAttributeTypeOk(arg HttpHealthChecksGetPathAttributeType) (ret HttpHealthChecksGetPathRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHttpHealthChecksGetPathAttributeType(arg *HttpHealthChecksGetPathAttributeType, val HttpHealthChecksGetPathRetType) { + *arg = &val +} + +type HttpHealthChecksGetPathArgType = string +type HttpHealthChecksGetPathRetType = string + // HttpHealthChecks struct for HttpHealthChecks type HttpHealthChecks struct { // List of HTTP status codes that indicate a healthy response - OkStatuses *[]string `json:"okStatuses,omitempty"` + OkStatuses HttpHealthChecksGetOkStatusesAttributeType `json:"okStatuses,omitempty"` // Path to send the health check request to - Path *string `json:"path,omitempty"` + Path HttpHealthChecksGetPathAttributeType `json:"path,omitempty"` } // NewHttpHealthChecks instantiates a new HttpHealthChecks object @@ -43,76 +84,58 @@ func NewHttpHealthChecksWithDefaults() *HttpHealthChecks { } // GetOkStatuses returns the OkStatuses field value if set, zero value otherwise. -func (o *HttpHealthChecks) GetOkStatuses() *[]string { - if o == nil || IsNil(o.OkStatuses) { - var ret *[]string - return ret - } - return o.OkStatuses +func (o *HttpHealthChecks) GetOkStatuses() (res HttpHealthChecksGetOkStatusesRetType) { + res, _ = o.GetOkStatusesOk() + return } // GetOkStatusesOk returns a tuple with the OkStatuses field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *HttpHealthChecks) GetOkStatusesOk() (*[]string, bool) { - if o == nil || IsNil(o.OkStatuses) { - return nil, false - } - return o.OkStatuses, true +func (o *HttpHealthChecks) GetOkStatusesOk() (ret HttpHealthChecksGetOkStatusesRetType, ok bool) { + return getHttpHealthChecksGetOkStatusesAttributeTypeOk(o.OkStatuses) } // HasOkStatuses returns a boolean if a field has been set. func (o *HttpHealthChecks) HasOkStatuses() bool { - if o != nil && !IsNil(o.OkStatuses) { - return true - } - - return false + _, ok := o.GetOkStatusesOk() + return ok } // SetOkStatuses gets a reference to the given []string and assigns it to the OkStatuses field. -func (o *HttpHealthChecks) SetOkStatuses(v *[]string) { - o.OkStatuses = v +func (o *HttpHealthChecks) SetOkStatuses(v HttpHealthChecksGetOkStatusesRetType) { + setHttpHealthChecksGetOkStatusesAttributeType(&o.OkStatuses, v) } // GetPath returns the Path field value if set, zero value otherwise. -func (o *HttpHealthChecks) GetPath() *string { - if o == nil || IsNil(o.Path) { - var ret *string - return ret - } - return o.Path +func (o *HttpHealthChecks) GetPath() (res HttpHealthChecksGetPathRetType) { + res, _ = o.GetPathOk() + return } // GetPathOk returns a tuple with the Path field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *HttpHealthChecks) GetPathOk() (*string, bool) { - if o == nil || IsNil(o.Path) { - return nil, false - } - return o.Path, true +func (o *HttpHealthChecks) GetPathOk() (ret HttpHealthChecksGetPathRetType, ok bool) { + return getHttpHealthChecksGetPathAttributeTypeOk(o.Path) } // HasPath returns a boolean if a field has been set. func (o *HttpHealthChecks) HasPath() bool { - if o != nil && !IsNil(o.Path) { - return true - } - - return false + _, ok := o.GetPathOk() + return ok } // SetPath gets a reference to the given string and assigns it to the Path field. -func (o *HttpHealthChecks) SetPath(v *string) { - o.Path = v +func (o *HttpHealthChecks) SetPath(v HttpHealthChecksGetPathRetType) { + setHttpHealthChecksGetPathAttributeType(&o.Path, v) } func (o HttpHealthChecks) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.OkStatuses) { - toSerialize["okStatuses"] = o.OkStatuses + if val, ok := getHttpHealthChecksGetOkStatusesAttributeTypeOk(o.OkStatuses); ok { + toSerialize["OkStatuses"] = val } - if !IsNil(o.Path) { - toSerialize["path"] = o.Path + if val, ok := getHttpHealthChecksGetPathAttributeTypeOk(o.Path); ok { + toSerialize["Path"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_list_credentials_response.go b/services/lbapplication/model_list_credentials_response.go index fec42f0a7..2b6a06e19 100644 --- a/services/lbapplication/model_list_credentials_response.go +++ b/services/lbapplication/model_list_credentials_response.go @@ -17,9 +17,29 @@ import ( // checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListCredentialsResponse{} +/* + types and functions for credentials +*/ + +// isArray +type ListCredentialsResponseGetCredentialsAttributeType = *[]CredentialsResponse +type ListCredentialsResponseGetCredentialsArgType = []CredentialsResponse +type ListCredentialsResponseGetCredentialsRetType = []CredentialsResponse + +func getListCredentialsResponseGetCredentialsAttributeTypeOk(arg ListCredentialsResponseGetCredentialsAttributeType) (ret ListCredentialsResponseGetCredentialsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCredentialsResponseGetCredentialsAttributeType(arg *ListCredentialsResponseGetCredentialsAttributeType, val ListCredentialsResponseGetCredentialsRetType) { + *arg = &val +} + // ListCredentialsResponse struct for ListCredentialsResponse type ListCredentialsResponse struct { - Credentials *[]CredentialsResponse `json:"credentials,omitempty"` + Credentials ListCredentialsResponseGetCredentialsAttributeType `json:"credentials,omitempty"` } // NewListCredentialsResponse instantiates a new ListCredentialsResponse object @@ -40,41 +60,32 @@ func NewListCredentialsResponseWithDefaults() *ListCredentialsResponse { } // GetCredentials returns the Credentials field value if set, zero value otherwise. -func (o *ListCredentialsResponse) GetCredentials() *[]CredentialsResponse { - if o == nil || IsNil(o.Credentials) { - var ret *[]CredentialsResponse - return ret - } - return o.Credentials +func (o *ListCredentialsResponse) GetCredentials() (res ListCredentialsResponseGetCredentialsRetType) { + res, _ = o.GetCredentialsOk() + return } // GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ListCredentialsResponse) GetCredentialsOk() (*[]CredentialsResponse, bool) { - if o == nil || IsNil(o.Credentials) { - return nil, false - } - return o.Credentials, true +func (o *ListCredentialsResponse) GetCredentialsOk() (ret ListCredentialsResponseGetCredentialsRetType, ok bool) { + return getListCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials) } // HasCredentials returns a boolean if a field has been set. func (o *ListCredentialsResponse) HasCredentials() bool { - if o != nil && !IsNil(o.Credentials) { - return true - } - - return false + _, ok := o.GetCredentialsOk() + return ok } // SetCredentials gets a reference to the given []CredentialsResponse and assigns it to the Credentials field. -func (o *ListCredentialsResponse) SetCredentials(v *[]CredentialsResponse) { - o.Credentials = v +func (o *ListCredentialsResponse) SetCredentials(v ListCredentialsResponseGetCredentialsRetType) { + setListCredentialsResponseGetCredentialsAttributeType(&o.Credentials, v) } func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Credentials) { - toSerialize["credentials"] = o.Credentials + if val, ok := getListCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials); ok { + toSerialize["Credentials"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_list_load_balancers_response.go b/services/lbapplication/model_list_load_balancers_response.go index d599bf13b..f6084c135 100644 --- a/services/lbapplication/model_list_load_balancers_response.go +++ b/services/lbapplication/model_list_load_balancers_response.go @@ -17,11 +17,52 @@ import ( // checks if the ListLoadBalancersResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListLoadBalancersResponse{} +/* + types and functions for loadBalancers +*/ + +// isArray +type ListLoadBalancersResponseGetLoadBalancersAttributeType = *[]LoadBalancer +type ListLoadBalancersResponseGetLoadBalancersArgType = []LoadBalancer +type ListLoadBalancersResponseGetLoadBalancersRetType = []LoadBalancer + +func getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(arg ListLoadBalancersResponseGetLoadBalancersAttributeType) (ret ListLoadBalancersResponseGetLoadBalancersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListLoadBalancersResponseGetLoadBalancersAttributeType(arg *ListLoadBalancersResponseGetLoadBalancersAttributeType, val ListLoadBalancersResponseGetLoadBalancersRetType) { + *arg = &val +} + +/* + types and functions for nextPageId +*/ + +// isNotNullableString +type ListLoadBalancersResponseGetNextPageIdAttributeType = *string + +func getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(arg ListLoadBalancersResponseGetNextPageIdAttributeType) (ret ListLoadBalancersResponseGetNextPageIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListLoadBalancersResponseGetNextPageIdAttributeType(arg *ListLoadBalancersResponseGetNextPageIdAttributeType, val ListLoadBalancersResponseGetNextPageIdRetType) { + *arg = &val +} + +type ListLoadBalancersResponseGetNextPageIdArgType = string +type ListLoadBalancersResponseGetNextPageIdRetType = string + // ListLoadBalancersResponse struct for ListLoadBalancersResponse type ListLoadBalancersResponse struct { - LoadBalancers *[]LoadBalancer `json:"loadBalancers,omitempty"` + LoadBalancers ListLoadBalancersResponseGetLoadBalancersAttributeType `json:"loadBalancers,omitempty"` // Continue token from the ListLoadBalancerResponse with Limit option - NextPageId *string `json:"nextPageId,omitempty"` + NextPageId ListLoadBalancersResponseGetNextPageIdAttributeType `json:"nextPageId,omitempty"` } // NewListLoadBalancersResponse instantiates a new ListLoadBalancersResponse object @@ -42,76 +83,58 @@ func NewListLoadBalancersResponseWithDefaults() *ListLoadBalancersResponse { } // GetLoadBalancers returns the LoadBalancers field value if set, zero value otherwise. -func (o *ListLoadBalancersResponse) GetLoadBalancers() *[]LoadBalancer { - if o == nil || IsNil(o.LoadBalancers) { - var ret *[]LoadBalancer - return ret - } - return o.LoadBalancers +func (o *ListLoadBalancersResponse) GetLoadBalancers() (res ListLoadBalancersResponseGetLoadBalancersRetType) { + res, _ = o.GetLoadBalancersOk() + return } // GetLoadBalancersOk returns a tuple with the LoadBalancers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ListLoadBalancersResponse) GetLoadBalancersOk() (*[]LoadBalancer, bool) { - if o == nil || IsNil(o.LoadBalancers) { - return nil, false - } - return o.LoadBalancers, true +func (o *ListLoadBalancersResponse) GetLoadBalancersOk() (ret ListLoadBalancersResponseGetLoadBalancersRetType, ok bool) { + return getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(o.LoadBalancers) } // HasLoadBalancers returns a boolean if a field has been set. func (o *ListLoadBalancersResponse) HasLoadBalancers() bool { - if o != nil && !IsNil(o.LoadBalancers) { - return true - } - - return false + _, ok := o.GetLoadBalancersOk() + return ok } // SetLoadBalancers gets a reference to the given []LoadBalancer and assigns it to the LoadBalancers field. -func (o *ListLoadBalancersResponse) SetLoadBalancers(v *[]LoadBalancer) { - o.LoadBalancers = v +func (o *ListLoadBalancersResponse) SetLoadBalancers(v ListLoadBalancersResponseGetLoadBalancersRetType) { + setListLoadBalancersResponseGetLoadBalancersAttributeType(&o.LoadBalancers, v) } // GetNextPageId returns the NextPageId field value if set, zero value otherwise. -func (o *ListLoadBalancersResponse) GetNextPageId() *string { - if o == nil || IsNil(o.NextPageId) { - var ret *string - return ret - } - return o.NextPageId +func (o *ListLoadBalancersResponse) GetNextPageId() (res ListLoadBalancersResponseGetNextPageIdRetType) { + res, _ = o.GetNextPageIdOk() + return } // GetNextPageIdOk returns a tuple with the NextPageId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ListLoadBalancersResponse) GetNextPageIdOk() (*string, bool) { - if o == nil || IsNil(o.NextPageId) { - return nil, false - } - return o.NextPageId, true +func (o *ListLoadBalancersResponse) GetNextPageIdOk() (ret ListLoadBalancersResponseGetNextPageIdRetType, ok bool) { + return getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(o.NextPageId) } // HasNextPageId returns a boolean if a field has been set. func (o *ListLoadBalancersResponse) HasNextPageId() bool { - if o != nil && !IsNil(o.NextPageId) { - return true - } - - return false + _, ok := o.GetNextPageIdOk() + return ok } // SetNextPageId gets a reference to the given string and assigns it to the NextPageId field. -func (o *ListLoadBalancersResponse) SetNextPageId(v *string) { - o.NextPageId = v +func (o *ListLoadBalancersResponse) SetNextPageId(v ListLoadBalancersResponseGetNextPageIdRetType) { + setListLoadBalancersResponseGetNextPageIdAttributeType(&o.NextPageId, v) } func (o ListLoadBalancersResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.LoadBalancers) { - toSerialize["loadBalancers"] = o.LoadBalancers + if val, ok := getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(o.LoadBalancers); ok { + toSerialize["LoadBalancers"] = val } - if !IsNil(o.NextPageId) { - toSerialize["nextPageId"] = o.NextPageId + if val, ok := getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(o.NextPageId); ok { + toSerialize["NextPageId"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_list_plans_response.go b/services/lbapplication/model_list_plans_response.go index 612dfee7b..1baf5d189 100644 --- a/services/lbapplication/model_list_plans_response.go +++ b/services/lbapplication/model_list_plans_response.go @@ -17,9 +17,29 @@ import ( // checks if the ListPlansResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListPlansResponse{} +/* + types and functions for validPlans +*/ + +// isArray +type ListPlansResponseGetValidPlansAttributeType = *[]PlanDetails +type ListPlansResponseGetValidPlansArgType = []PlanDetails +type ListPlansResponseGetValidPlansRetType = []PlanDetails + +func getListPlansResponseGetValidPlansAttributeTypeOk(arg ListPlansResponseGetValidPlansAttributeType) (ret ListPlansResponseGetValidPlansRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListPlansResponseGetValidPlansAttributeType(arg *ListPlansResponseGetValidPlansAttributeType, val ListPlansResponseGetValidPlansRetType) { + *arg = &val +} + // ListPlansResponse struct for ListPlansResponse type ListPlansResponse struct { - ValidPlans *[]PlanDetails `json:"validPlans,omitempty"` + ValidPlans ListPlansResponseGetValidPlansAttributeType `json:"validPlans,omitempty"` } // NewListPlansResponse instantiates a new ListPlansResponse object @@ -40,41 +60,32 @@ func NewListPlansResponseWithDefaults() *ListPlansResponse { } // GetValidPlans returns the ValidPlans field value if set, zero value otherwise. -func (o *ListPlansResponse) GetValidPlans() *[]PlanDetails { - if o == nil || IsNil(o.ValidPlans) { - var ret *[]PlanDetails - return ret - } - return o.ValidPlans +func (o *ListPlansResponse) GetValidPlans() (res ListPlansResponseGetValidPlansRetType) { + res, _ = o.GetValidPlansOk() + return } // GetValidPlansOk returns a tuple with the ValidPlans field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ListPlansResponse) GetValidPlansOk() (*[]PlanDetails, bool) { - if o == nil || IsNil(o.ValidPlans) { - return nil, false - } - return o.ValidPlans, true +func (o *ListPlansResponse) GetValidPlansOk() (ret ListPlansResponseGetValidPlansRetType, ok bool) { + return getListPlansResponseGetValidPlansAttributeTypeOk(o.ValidPlans) } // HasValidPlans returns a boolean if a field has been set. func (o *ListPlansResponse) HasValidPlans() bool { - if o != nil && !IsNil(o.ValidPlans) { - return true - } - - return false + _, ok := o.GetValidPlansOk() + return ok } // SetValidPlans gets a reference to the given []PlanDetails and assigns it to the ValidPlans field. -func (o *ListPlansResponse) SetValidPlans(v *[]PlanDetails) { - o.ValidPlans = v +func (o *ListPlansResponse) SetValidPlans(v ListPlansResponseGetValidPlansRetType) { + setListPlansResponseGetValidPlansAttributeType(&o.ValidPlans, v) } func (o ListPlansResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ValidPlans) { - toSerialize["validPlans"] = o.ValidPlans + if val, ok := getListPlansResponseGetValidPlansAttributeTypeOk(o.ValidPlans); ok { + toSerialize["ValidPlans"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_listener.go b/services/lbapplication/model_listener.go index 46d6d790b..07456a62f 100644 --- a/services/lbapplication/model_listener.go +++ b/services/lbapplication/model_listener.go @@ -17,19 +17,161 @@ import ( // checks if the Listener type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Listener{} +/* + types and functions for displayName +*/ + +// isNotNullableString +type ListenerGetDisplayNameAttributeType = *string + +func getListenerGetDisplayNameAttributeTypeOk(arg ListenerGetDisplayNameAttributeType) (ret ListenerGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListenerGetDisplayNameAttributeType(arg *ListenerGetDisplayNameAttributeType, val ListenerGetDisplayNameRetType) { + *arg = &val +} + +type ListenerGetDisplayNameArgType = string +type ListenerGetDisplayNameRetType = string + +/* + types and functions for http +*/ + +// isFreeform +type ListenerGetHttpAttributeType = *map[string]interface{} +type ListenerGetHttpArgType = map[string]interface{} +type ListenerGetHttpRetType = map[string]interface{} + +func getListenerGetHttpAttributeTypeOk(arg ListenerGetHttpAttributeType) (ret ListenerGetHttpRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListenerGetHttpAttributeType(arg *ListenerGetHttpAttributeType, val ListenerGetHttpRetType) { + *arg = &val +} + +/* + types and functions for https +*/ + +// isModel +type ListenerGetHttpsAttributeType = *ProtocolOptionsHTTPS +type ListenerGetHttpsArgType = ProtocolOptionsHTTPS +type ListenerGetHttpsRetType = ProtocolOptionsHTTPS + +func getListenerGetHttpsAttributeTypeOk(arg ListenerGetHttpsAttributeType) (ret ListenerGetHttpsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListenerGetHttpsAttributeType(arg *ListenerGetHttpsAttributeType, val ListenerGetHttpsRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type ListenerGetNameAttributeType = *string + +func getListenerGetNameAttributeTypeOk(arg ListenerGetNameAttributeType) (ret ListenerGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListenerGetNameAttributeType(arg *ListenerGetNameAttributeType, val ListenerGetNameRetType) { + *arg = &val +} + +type ListenerGetNameArgType = string +type ListenerGetNameRetType = string + +/* + types and functions for port +*/ + +// isInteger +type ListenerGetPortAttributeType = *int64 +type ListenerGetPortArgType = int64 +type ListenerGetPortRetType = int64 + +func getListenerGetPortAttributeTypeOk(arg ListenerGetPortAttributeType) (ret ListenerGetPortRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListenerGetPortAttributeType(arg *ListenerGetPortAttributeType, val ListenerGetPortRetType) { + *arg = &val +} + +/* + types and functions for protocol +*/ + +// isEnumRef +type ListenerGetProtocolAttributeType = *string +type ListenerGetProtocolArgType = string +type ListenerGetProtocolRetType = string + +func getListenerGetProtocolAttributeTypeOk(arg ListenerGetProtocolAttributeType) (ret ListenerGetProtocolRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListenerGetProtocolAttributeType(arg *ListenerGetProtocolAttributeType, val ListenerGetProtocolRetType) { + *arg = &val +} + +/* + types and functions for rules +*/ + +// isArray +type ListenerGetRulesAttributeType = *[]Rule +type ListenerGetRulesArgType = []Rule +type ListenerGetRulesRetType = []Rule + +func getListenerGetRulesAttributeTypeOk(arg ListenerGetRulesAttributeType) (ret ListenerGetRulesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListenerGetRulesAttributeType(arg *ListenerGetRulesAttributeType, val ListenerGetRulesRetType) { + *arg = &val +} + // Listener struct for Listener type Listener struct { - DisplayName *string `json:"displayName,omitempty"` - Http *map[string]interface{} `json:"http,omitempty"` - Https *ProtocolOptionsHTTPS `json:"https,omitempty"` + DisplayName ListenerGetDisplayNameAttributeType `json:"displayName,omitempty"` + Http ListenerGetHttpAttributeType `json:"http,omitempty"` + Https ListenerGetHttpsAttributeType `json:"https,omitempty"` // Will be used to reference a listener and will replace display name in the future. Currently uses - as the name if no display name is given. - Name *string `json:"name,omitempty"` + Name ListenerGetNameAttributeType `json:"name,omitempty"` // Port number where we listen for traffic - Port *int64 `json:"port,omitempty"` + Port ListenerGetPortAttributeType `json:"port,omitempty"` // Protocol is the highest network protocol we understand to load balance. Currently PROTOCOL_HTTP and PROTOCOL_HTTPS are supported. - Protocol *string `json:"protocol,omitempty"` + Protocol ListenerGetProtocolAttributeType `json:"protocol,omitempty"` // Rules define the routing parameters for the HTTP and HTTPS listeners. - Rules *[]Rule `json:"rules,omitempty"` + Rules ListenerGetRulesAttributeType `json:"rules,omitempty"` } // NewListener instantiates a new Listener object @@ -50,251 +192,188 @@ func NewListenerWithDefaults() *Listener { } // GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *Listener) GetDisplayName() *string { - if o == nil || IsNil(o.DisplayName) { - var ret *string - return ret - } - return o.DisplayName +func (o *Listener) GetDisplayName() (res ListenerGetDisplayNameRetType) { + res, _ = o.GetDisplayNameOk() + return } // GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Listener) GetDisplayNameOk() (*string, bool) { - if o == nil || IsNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true +func (o *Listener) GetDisplayNameOk() (ret ListenerGetDisplayNameRetType, ok bool) { + return getListenerGetDisplayNameAttributeTypeOk(o.DisplayName) } // HasDisplayName returns a boolean if a field has been set. func (o *Listener) HasDisplayName() bool { - if o != nil && !IsNil(o.DisplayName) { - return true - } - - return false + _, ok := o.GetDisplayNameOk() + return ok } // SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *Listener) SetDisplayName(v *string) { - o.DisplayName = v +func (o *Listener) SetDisplayName(v ListenerGetDisplayNameRetType) { + setListenerGetDisplayNameAttributeType(&o.DisplayName, v) } // GetHttp returns the Http field value if set, zero value otherwise. -func (o *Listener) GetHttp() *map[string]interface{} { - if o == nil || IsNil(o.Http) { - var ret *map[string]interface{} - return ret - } - return o.Http +func (o *Listener) GetHttp() (res ListenerGetHttpRetType) { + res, _ = o.GetHttpOk() + return } // GetHttpOk returns a tuple with the Http field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Listener) GetHttpOk() (*map[string]interface{}, bool) { - if o == nil || IsNil(o.Http) { - return &map[string]interface{}{}, false - } - return o.Http, true +func (o *Listener) GetHttpOk() (ret ListenerGetHttpRetType, ok bool) { + return getListenerGetHttpAttributeTypeOk(o.Http) } // HasHttp returns a boolean if a field has been set. func (o *Listener) HasHttp() bool { - if o != nil && !IsNil(o.Http) { - return true - } - - return false + _, ok := o.GetHttpOk() + return ok } // SetHttp gets a reference to the given map[string]interface{} and assigns it to the Http field. -func (o *Listener) SetHttp(v *map[string]interface{}) { - o.Http = v +func (o *Listener) SetHttp(v ListenerGetHttpRetType) { + setListenerGetHttpAttributeType(&o.Http, v) } // GetHttps returns the Https field value if set, zero value otherwise. -func (o *Listener) GetHttps() *ProtocolOptionsHTTPS { - if o == nil || IsNil(o.Https) { - var ret *ProtocolOptionsHTTPS - return ret - } - return o.Https +func (o *Listener) GetHttps() (res ListenerGetHttpsRetType) { + res, _ = o.GetHttpsOk() + return } // GetHttpsOk returns a tuple with the Https field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Listener) GetHttpsOk() (*ProtocolOptionsHTTPS, bool) { - if o == nil || IsNil(o.Https) { - return nil, false - } - return o.Https, true +func (o *Listener) GetHttpsOk() (ret ListenerGetHttpsRetType, ok bool) { + return getListenerGetHttpsAttributeTypeOk(o.Https) } // HasHttps returns a boolean if a field has been set. func (o *Listener) HasHttps() bool { - if o != nil && !IsNil(o.Https) { - return true - } - - return false + _, ok := o.GetHttpsOk() + return ok } // SetHttps gets a reference to the given ProtocolOptionsHTTPS and assigns it to the Https field. -func (o *Listener) SetHttps(v *ProtocolOptionsHTTPS) { - o.Https = v +func (o *Listener) SetHttps(v ListenerGetHttpsRetType) { + setListenerGetHttpsAttributeType(&o.Https, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *Listener) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *Listener) GetName() (res ListenerGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Listener) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *Listener) GetNameOk() (ret ListenerGetNameRetType, ok bool) { + return getListenerGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *Listener) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *Listener) SetName(v *string) { - o.Name = v +func (o *Listener) SetName(v ListenerGetNameRetType) { + setListenerGetNameAttributeType(&o.Name, v) } // GetPort returns the Port field value if set, zero value otherwise. -func (o *Listener) GetPort() *int64 { - if o == nil || IsNil(o.Port) { - var ret *int64 - return ret - } - return o.Port +func (o *Listener) GetPort() (res ListenerGetPortRetType) { + 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 *Listener) GetPortOk() (*int64, bool) { - if o == nil || IsNil(o.Port) { - return nil, false - } - return o.Port, true +func (o *Listener) GetPortOk() (ret ListenerGetPortRetType, ok bool) { + return getListenerGetPortAttributeTypeOk(o.Port) } // HasPort returns a boolean if a field has been set. func (o *Listener) 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 *Listener) SetPort(v *int64) { - o.Port = v +func (o *Listener) SetPort(v ListenerGetPortRetType) { + setListenerGetPortAttributeType(&o.Port, v) } // GetProtocol returns the Protocol field value if set, zero value otherwise. -func (o *Listener) GetProtocol() *string { - if o == nil || IsNil(o.Protocol) { - var ret *string - return ret - } - return o.Protocol +func (o *Listener) GetProtocol() (res ListenerGetProtocolRetType) { + res, _ = o.GetProtocolOk() + return } // GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Listener) GetProtocolOk() (*string, bool) { - if o == nil || IsNil(o.Protocol) { - return nil, false - } - return o.Protocol, true +func (o *Listener) GetProtocolOk() (ret ListenerGetProtocolRetType, ok bool) { + return getListenerGetProtocolAttributeTypeOk(o.Protocol) } // HasProtocol returns a boolean if a field has been set. func (o *Listener) HasProtocol() bool { - if o != nil && !IsNil(o.Protocol) { - return true - } - - return false + _, ok := o.GetProtocolOk() + return ok } // SetProtocol gets a reference to the given string and assigns it to the Protocol field. -func (o *Listener) SetProtocol(v *string) { - o.Protocol = v +func (o *Listener) SetProtocol(v ListenerGetProtocolRetType) { + setListenerGetProtocolAttributeType(&o.Protocol, v) } // GetRules returns the Rules field value if set, zero value otherwise. -func (o *Listener) GetRules() *[]Rule { - if o == nil || IsNil(o.Rules) { - var ret *[]Rule - return ret - } - return o.Rules +func (o *Listener) GetRules() (res ListenerGetRulesRetType) { + res, _ = o.GetRulesOk() + return } // GetRulesOk returns a tuple with the Rules field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Listener) GetRulesOk() (*[]Rule, bool) { - if o == nil || IsNil(o.Rules) { - return nil, false - } - return o.Rules, true +func (o *Listener) GetRulesOk() (ret ListenerGetRulesRetType, ok bool) { + return getListenerGetRulesAttributeTypeOk(o.Rules) } // HasRules returns a boolean if a field has been set. func (o *Listener) HasRules() bool { - if o != nil && !IsNil(o.Rules) { - return true - } - - return false + _, ok := o.GetRulesOk() + return ok } // SetRules gets a reference to the given []Rule and assigns it to the Rules field. -func (o *Listener) SetRules(v *[]Rule) { - o.Rules = v +func (o *Listener) SetRules(v ListenerGetRulesRetType) { + setListenerGetRulesAttributeType(&o.Rules, v) } func (o Listener) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.DisplayName) { - toSerialize["displayName"] = o.DisplayName + if val, ok := getListenerGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val } - if !IsNil(o.Http) { - toSerialize["http"] = o.Http + if val, ok := getListenerGetHttpAttributeTypeOk(o.Http); ok { + toSerialize["Http"] = val } - if !IsNil(o.Https) { - toSerialize["https"] = o.Https + if val, ok := getListenerGetHttpsAttributeTypeOk(o.Https); ok { + toSerialize["Https"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getListenerGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.Port) { - toSerialize["port"] = o.Port + if val, ok := getListenerGetPortAttributeTypeOk(o.Port); ok { + toSerialize["Port"] = val } - if !IsNil(o.Protocol) { - toSerialize["protocol"] = o.Protocol + if val, ok := getListenerGetProtocolAttributeTypeOk(o.Protocol); ok { + toSerialize["Protocol"] = val } - if !IsNil(o.Rules) { - toSerialize["rules"] = o.Rules + if val, ok := getListenerGetRulesAttributeTypeOk(o.Rules); ok { + toSerialize["Rules"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_load_balancer.go b/services/lbapplication/model_load_balancer.go index 476d8bd26..6b639f36f 100644 --- a/services/lbapplication/model_load_balancer.go +++ b/services/lbapplication/model_load_balancer.go @@ -17,28 +17,253 @@ import ( // checks if the LoadBalancer type satisfies the MappedNullable interface at compile time var _ MappedNullable = &LoadBalancer{} +/* + types and functions for errors +*/ + +// isArray +type LoadBalancerGetErrorsAttributeType = *[]LoadBalancerError +type LoadBalancerGetErrorsArgType = []LoadBalancerError +type LoadBalancerGetErrorsRetType = []LoadBalancerError + +func getLoadBalancerGetErrorsAttributeTypeOk(arg LoadBalancerGetErrorsAttributeType) (ret LoadBalancerGetErrorsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetErrorsAttributeType(arg *LoadBalancerGetErrorsAttributeType, val LoadBalancerGetErrorsRetType) { + *arg = &val +} + +/* + types and functions for externalAddress +*/ + +// isNotNullableString +type LoadBalancerGetExternalAddressAttributeType = *string + +func getLoadBalancerGetExternalAddressAttributeTypeOk(arg LoadBalancerGetExternalAddressAttributeType) (ret LoadBalancerGetExternalAddressRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetExternalAddressAttributeType(arg *LoadBalancerGetExternalAddressAttributeType, val LoadBalancerGetExternalAddressRetType) { + *arg = &val +} + +type LoadBalancerGetExternalAddressArgType = string +type LoadBalancerGetExternalAddressRetType = string + +/* + types and functions for listeners +*/ + +// isArray +type LoadBalancerGetListenersAttributeType = *[]Listener +type LoadBalancerGetListenersArgType = []Listener +type LoadBalancerGetListenersRetType = []Listener + +func getLoadBalancerGetListenersAttributeTypeOk(arg LoadBalancerGetListenersAttributeType) (ret LoadBalancerGetListenersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetListenersAttributeType(arg *LoadBalancerGetListenersAttributeType, val LoadBalancerGetListenersRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type LoadBalancerGetNameAttributeType = *string + +func getLoadBalancerGetNameAttributeTypeOk(arg LoadBalancerGetNameAttributeType) (ret LoadBalancerGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetNameAttributeType(arg *LoadBalancerGetNameAttributeType, val LoadBalancerGetNameRetType) { + *arg = &val +} + +type LoadBalancerGetNameArgType = string +type LoadBalancerGetNameRetType = string + +/* + types and functions for networks +*/ + +// isArray +type LoadBalancerGetNetworksAttributeType = *[]Network +type LoadBalancerGetNetworksArgType = []Network +type LoadBalancerGetNetworksRetType = []Network + +func getLoadBalancerGetNetworksAttributeTypeOk(arg LoadBalancerGetNetworksAttributeType) (ret LoadBalancerGetNetworksRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetNetworksAttributeType(arg *LoadBalancerGetNetworksAttributeType, val LoadBalancerGetNetworksRetType) { + *arg = &val +} + +/* + types and functions for options +*/ + +// isModel +type LoadBalancerGetOptionsAttributeType = *LoadBalancerOptions +type LoadBalancerGetOptionsArgType = LoadBalancerOptions +type LoadBalancerGetOptionsRetType = LoadBalancerOptions + +func getLoadBalancerGetOptionsAttributeTypeOk(arg LoadBalancerGetOptionsAttributeType) (ret LoadBalancerGetOptionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetOptionsAttributeType(arg *LoadBalancerGetOptionsAttributeType, val LoadBalancerGetOptionsRetType) { + *arg = &val +} + +/* + types and functions for planId +*/ + +// isNotNullableString +type LoadBalancerGetPlanIdAttributeType = *string + +func getLoadBalancerGetPlanIdAttributeTypeOk(arg LoadBalancerGetPlanIdAttributeType) (ret LoadBalancerGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetPlanIdAttributeType(arg *LoadBalancerGetPlanIdAttributeType, val LoadBalancerGetPlanIdRetType) { + *arg = &val +} + +type LoadBalancerGetPlanIdArgType = string +type LoadBalancerGetPlanIdRetType = string + +/* + types and functions for privateAddress +*/ + +// isNotNullableString +type LoadBalancerGetPrivateAddressAttributeType = *string + +func getLoadBalancerGetPrivateAddressAttributeTypeOk(arg LoadBalancerGetPrivateAddressAttributeType) (ret LoadBalancerGetPrivateAddressRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetPrivateAddressAttributeType(arg *LoadBalancerGetPrivateAddressAttributeType, val LoadBalancerGetPrivateAddressRetType) { + *arg = &val +} + +type LoadBalancerGetPrivateAddressArgType = string +type LoadBalancerGetPrivateAddressRetType = string + +/* + types and functions for status +*/ + +// isEnumRef +type LoadBalancerGetStatusAttributeType = *string +type LoadBalancerGetStatusArgType = string +type LoadBalancerGetStatusRetType = string + +func getLoadBalancerGetStatusAttributeTypeOk(arg LoadBalancerGetStatusAttributeType) (ret LoadBalancerGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetStatusAttributeType(arg *LoadBalancerGetStatusAttributeType, val LoadBalancerGetStatusRetType) { + *arg = &val +} + +/* + types and functions for targetPools +*/ + +// isArray +type LoadBalancerGetTargetPoolsAttributeType = *[]TargetPool +type LoadBalancerGetTargetPoolsArgType = []TargetPool +type LoadBalancerGetTargetPoolsRetType = []TargetPool + +func getLoadBalancerGetTargetPoolsAttributeTypeOk(arg LoadBalancerGetTargetPoolsAttributeType) (ret LoadBalancerGetTargetPoolsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetTargetPoolsAttributeType(arg *LoadBalancerGetTargetPoolsAttributeType, val LoadBalancerGetTargetPoolsRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isNotNullableString +type LoadBalancerGetVersionAttributeType = *string + +func getLoadBalancerGetVersionAttributeTypeOk(arg LoadBalancerGetVersionAttributeType) (ret LoadBalancerGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerGetVersionAttributeType(arg *LoadBalancerGetVersionAttributeType, val LoadBalancerGetVersionRetType) { + *arg = &val +} + +type LoadBalancerGetVersionArgType = string +type LoadBalancerGetVersionRetType = string + // LoadBalancer struct for LoadBalancer type LoadBalancer struct { // Reports all errors a application load balancer has. - Errors *[]LoadBalancerError `json:"errors,omitempty"` + Errors LoadBalancerGetErrorsAttributeType `json:"errors,omitempty"` // External application load balancer IP address where this application load balancer is exposed. Not changeable after creation. - ExternalAddress *string `json:"externalAddress,omitempty"` + ExternalAddress LoadBalancerGetExternalAddressAttributeType `json:"externalAddress,omitempty"` // There is a maximum listener count of 20. - Listeners *[]Listener `json:"listeners,omitempty"` + Listeners LoadBalancerGetListenersAttributeType `json:"listeners,omitempty"` // Application Load Balancer name. Not changeable after creation. - Name *string `json:"name,omitempty"` + Name LoadBalancerGetNameAttributeType `json:"name,omitempty"` // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks *[]Network `json:"networks,omitempty"` - Options *LoadBalancerOptions `json:"options,omitempty"` + Networks LoadBalancerGetNetworksAttributeType `json:"networks,omitempty"` + Options LoadBalancerGetOptionsAttributeType `json:"options,omitempty"` // Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId *string `json:"planId,omitempty"` + PlanId LoadBalancerGetPlanIdAttributeType `json:"planId,omitempty"` // Transient private application load balancer IP address that can change any time. - PrivateAddress *string `json:"privateAddress,omitempty"` - Status *string `json:"status,omitempty"` + PrivateAddress LoadBalancerGetPrivateAddressAttributeType `json:"privateAddress,omitempty"` + Status LoadBalancerGetStatusAttributeType `json:"status,omitempty"` // List of all target pools which will be used in the application load balancer. Limited to 20. - TargetPools *[]TargetPool `json:"targetPools,omitempty"` + TargetPools LoadBalancerGetTargetPoolsAttributeType `json:"targetPools,omitempty"` // Application Load Balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this application load balancer resource that changes during updates of the load balancers. On updates this field specified the application load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a application load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version *string `json:"version,omitempty"` + Version LoadBalancerGetVersionAttributeType `json:"version,omitempty"` } // NewLoadBalancer instantiates a new LoadBalancer object @@ -59,391 +284,292 @@ func NewLoadBalancerWithDefaults() *LoadBalancer { } // GetErrors returns the Errors field value if set, zero value otherwise. -func (o *LoadBalancer) GetErrors() *[]LoadBalancerError { - if o == nil || IsNil(o.Errors) { - var ret *[]LoadBalancerError - return ret - } - return o.Errors +func (o *LoadBalancer) GetErrors() (res LoadBalancerGetErrorsRetType) { + res, _ = o.GetErrorsOk() + return } // GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancer) GetErrorsOk() (*[]LoadBalancerError, bool) { - if o == nil || IsNil(o.Errors) { - return nil, false - } - return o.Errors, true +func (o *LoadBalancer) GetErrorsOk() (ret LoadBalancerGetErrorsRetType, ok bool) { + return getLoadBalancerGetErrorsAttributeTypeOk(o.Errors) } // HasErrors returns a boolean if a field has been set. func (o *LoadBalancer) HasErrors() bool { - if o != nil && !IsNil(o.Errors) { - return true - } - - return false + _, ok := o.GetErrorsOk() + return ok } // SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. -func (o *LoadBalancer) SetErrors(v *[]LoadBalancerError) { - o.Errors = v +func (o *LoadBalancer) SetErrors(v LoadBalancerGetErrorsRetType) { + setLoadBalancerGetErrorsAttributeType(&o.Errors, v) } // GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -func (o *LoadBalancer) GetExternalAddress() *string { - if o == nil || IsNil(o.ExternalAddress) { - var ret *string - return ret - } - return o.ExternalAddress +func (o *LoadBalancer) GetExternalAddress() (res LoadBalancerGetExternalAddressRetType) { + res, _ = o.GetExternalAddressOk() + return } // GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancer) GetExternalAddressOk() (*string, bool) { - if o == nil || IsNil(o.ExternalAddress) { - return nil, false - } - return o.ExternalAddress, true +func (o *LoadBalancer) GetExternalAddressOk() (ret LoadBalancerGetExternalAddressRetType, ok bool) { + return getLoadBalancerGetExternalAddressAttributeTypeOk(o.ExternalAddress) } // HasExternalAddress returns a boolean if a field has been set. func (o *LoadBalancer) HasExternalAddress() bool { - if o != nil && !IsNil(o.ExternalAddress) { - return true - } - - return false + _, ok := o.GetExternalAddressOk() + return ok } // SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. -func (o *LoadBalancer) SetExternalAddress(v *string) { - o.ExternalAddress = v +func (o *LoadBalancer) SetExternalAddress(v LoadBalancerGetExternalAddressRetType) { + setLoadBalancerGetExternalAddressAttributeType(&o.ExternalAddress, v) } // GetListeners returns the Listeners field value if set, zero value otherwise. -func (o *LoadBalancer) GetListeners() *[]Listener { - if o == nil || IsNil(o.Listeners) { - var ret *[]Listener - return ret - } - return o.Listeners +func (o *LoadBalancer) GetListeners() (res LoadBalancerGetListenersRetType) { + res, _ = o.GetListenersOk() + return } // GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancer) GetListenersOk() (*[]Listener, bool) { - if o == nil || IsNil(o.Listeners) { - return nil, false - } - return o.Listeners, true +func (o *LoadBalancer) GetListenersOk() (ret LoadBalancerGetListenersRetType, ok bool) { + return getLoadBalancerGetListenersAttributeTypeOk(o.Listeners) } // HasListeners returns a boolean if a field has been set. func (o *LoadBalancer) HasListeners() bool { - if o != nil && !IsNil(o.Listeners) { - return true - } - - return false + _, ok := o.GetListenersOk() + return ok } // SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. -func (o *LoadBalancer) SetListeners(v *[]Listener) { - o.Listeners = v +func (o *LoadBalancer) SetListeners(v LoadBalancerGetListenersRetType) { + setLoadBalancerGetListenersAttributeType(&o.Listeners, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *LoadBalancer) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *LoadBalancer) GetName() (res LoadBalancerGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancer) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *LoadBalancer) GetNameOk() (ret LoadBalancerGetNameRetType, ok bool) { + return getLoadBalancerGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *LoadBalancer) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *LoadBalancer) SetName(v *string) { - o.Name = v +func (o *LoadBalancer) SetName(v LoadBalancerGetNameRetType) { + setLoadBalancerGetNameAttributeType(&o.Name, v) } // GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *LoadBalancer) GetNetworks() *[]Network { - if o == nil || IsNil(o.Networks) { - var ret *[]Network - return ret - } - return o.Networks +func (o *LoadBalancer) GetNetworks() (res LoadBalancerGetNetworksRetType) { + res, _ = o.GetNetworksOk() + return } // GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancer) GetNetworksOk() (*[]Network, bool) { - if o == nil || IsNil(o.Networks) { - return nil, false - } - return o.Networks, true +func (o *LoadBalancer) GetNetworksOk() (ret LoadBalancerGetNetworksRetType, ok bool) { + return getLoadBalancerGetNetworksAttributeTypeOk(o.Networks) } // HasNetworks returns a boolean if a field has been set. func (o *LoadBalancer) HasNetworks() bool { - if o != nil && !IsNil(o.Networks) { - return true - } - - return false + _, ok := o.GetNetworksOk() + return ok } // SetNetworks gets a reference to the given []Network and assigns it to the Networks field. -func (o *LoadBalancer) SetNetworks(v *[]Network) { - o.Networks = v +func (o *LoadBalancer) SetNetworks(v LoadBalancerGetNetworksRetType) { + setLoadBalancerGetNetworksAttributeType(&o.Networks, v) } // GetOptions returns the Options field value if set, zero value otherwise. -func (o *LoadBalancer) GetOptions() *LoadBalancerOptions { - if o == nil || IsNil(o.Options) { - var ret *LoadBalancerOptions - return ret - } - return o.Options +func (o *LoadBalancer) GetOptions() (res LoadBalancerGetOptionsRetType) { + res, _ = o.GetOptionsOk() + return } // GetOptionsOk returns a tuple with the Options field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancer) GetOptionsOk() (*LoadBalancerOptions, bool) { - if o == nil || IsNil(o.Options) { - return nil, false - } - return o.Options, true +func (o *LoadBalancer) GetOptionsOk() (ret LoadBalancerGetOptionsRetType, ok bool) { + return getLoadBalancerGetOptionsAttributeTypeOk(o.Options) } // HasOptions returns a boolean if a field has been set. func (o *LoadBalancer) HasOptions() bool { - if o != nil && !IsNil(o.Options) { - return true - } - - return false + _, ok := o.GetOptionsOk() + return ok } // SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. -func (o *LoadBalancer) SetOptions(v *LoadBalancerOptions) { - o.Options = v +func (o *LoadBalancer) SetOptions(v LoadBalancerGetOptionsRetType) { + setLoadBalancerGetOptionsAttributeType(&o.Options, v) } // GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *LoadBalancer) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - return o.PlanId +func (o *LoadBalancer) GetPlanId() (res LoadBalancerGetPlanIdRetType) { + 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 *LoadBalancer) GetPlanIdOk() (*string, bool) { - if o == nil || IsNil(o.PlanId) { - return nil, false - } - return o.PlanId, true +func (o *LoadBalancer) GetPlanIdOk() (ret LoadBalancerGetPlanIdRetType, ok bool) { + return getLoadBalancerGetPlanIdAttributeTypeOk(o.PlanId) } // HasPlanId returns a boolean if a field has been set. func (o *LoadBalancer) 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 *LoadBalancer) SetPlanId(v *string) { - o.PlanId = v +func (o *LoadBalancer) SetPlanId(v LoadBalancerGetPlanIdRetType) { + setLoadBalancerGetPlanIdAttributeType(&o.PlanId, v) } // GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -func (o *LoadBalancer) GetPrivateAddress() *string { - if o == nil || IsNil(o.PrivateAddress) { - var ret *string - return ret - } - return o.PrivateAddress +func (o *LoadBalancer) GetPrivateAddress() (res LoadBalancerGetPrivateAddressRetType) { + res, _ = o.GetPrivateAddressOk() + return } // GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancer) GetPrivateAddressOk() (*string, bool) { - if o == nil || IsNil(o.PrivateAddress) { - return nil, false - } - return o.PrivateAddress, true +func (o *LoadBalancer) GetPrivateAddressOk() (ret LoadBalancerGetPrivateAddressRetType, ok bool) { + return getLoadBalancerGetPrivateAddressAttributeTypeOk(o.PrivateAddress) } // HasPrivateAddress returns a boolean if a field has been set. func (o *LoadBalancer) HasPrivateAddress() bool { - if o != nil && !IsNil(o.PrivateAddress) { - return true - } - - return false + _, ok := o.GetPrivateAddressOk() + return ok } // SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. -func (o *LoadBalancer) SetPrivateAddress(v *string) { - o.PrivateAddress = v +func (o *LoadBalancer) SetPrivateAddress(v LoadBalancerGetPrivateAddressRetType) { + setLoadBalancerGetPrivateAddressAttributeType(&o.PrivateAddress, v) } // GetStatus returns the Status field value if set, zero value otherwise. -func (o *LoadBalancer) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - return o.Status +func (o *LoadBalancer) GetStatus() (res LoadBalancerGetStatusRetType) { + 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 *LoadBalancer) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true +func (o *LoadBalancer) GetStatusOk() (ret LoadBalancerGetStatusRetType, ok bool) { + return getLoadBalancerGetStatusAttributeTypeOk(o.Status) } // HasStatus returns a boolean if a field has been set. func (o *LoadBalancer) 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 *LoadBalancer) SetStatus(v *string) { - o.Status = v +func (o *LoadBalancer) SetStatus(v LoadBalancerGetStatusRetType) { + setLoadBalancerGetStatusAttributeType(&o.Status, v) } // GetTargetPools returns the TargetPools field value if set, zero value otherwise. -func (o *LoadBalancer) GetTargetPools() *[]TargetPool { - if o == nil || IsNil(o.TargetPools) { - var ret *[]TargetPool - return ret - } - return o.TargetPools +func (o *LoadBalancer) GetTargetPools() (res LoadBalancerGetTargetPoolsRetType) { + res, _ = o.GetTargetPoolsOk() + return } // GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancer) GetTargetPoolsOk() (*[]TargetPool, bool) { - if o == nil || IsNil(o.TargetPools) { - return nil, false - } - return o.TargetPools, true +func (o *LoadBalancer) GetTargetPoolsOk() (ret LoadBalancerGetTargetPoolsRetType, ok bool) { + return getLoadBalancerGetTargetPoolsAttributeTypeOk(o.TargetPools) } // HasTargetPools returns a boolean if a field has been set. func (o *LoadBalancer) HasTargetPools() bool { - if o != nil && !IsNil(o.TargetPools) { - return true - } - - return false + _, ok := o.GetTargetPoolsOk() + return ok } // SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. -func (o *LoadBalancer) SetTargetPools(v *[]TargetPool) { - o.TargetPools = v +func (o *LoadBalancer) SetTargetPools(v LoadBalancerGetTargetPoolsRetType) { + setLoadBalancerGetTargetPoolsAttributeType(&o.TargetPools, v) } // GetVersion returns the Version field value if set, zero value otherwise. -func (o *LoadBalancer) GetVersion() *string { - if o == nil || IsNil(o.Version) { - var ret *string - return ret - } - return o.Version +func (o *LoadBalancer) GetVersion() (res LoadBalancerGetVersionRetType) { + res, _ = o.GetVersionOk() + return } // GetVersionOk returns a tuple with the Version field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancer) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true +func (o *LoadBalancer) GetVersionOk() (ret LoadBalancerGetVersionRetType, ok bool) { + return getLoadBalancerGetVersionAttributeTypeOk(o.Version) } // HasVersion returns a boolean if a field has been set. func (o *LoadBalancer) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false + _, ok := o.GetVersionOk() + return ok } // SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *LoadBalancer) SetVersion(v *string) { - o.Version = v +func (o *LoadBalancer) SetVersion(v LoadBalancerGetVersionRetType) { + setLoadBalancerGetVersionAttributeType(&o.Version, v) } func (o LoadBalancer) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Errors) { - toSerialize["errors"] = o.Errors + if val, ok := getLoadBalancerGetErrorsAttributeTypeOk(o.Errors); ok { + toSerialize["Errors"] = val } - if !IsNil(o.ExternalAddress) { - toSerialize["externalAddress"] = o.ExternalAddress + if val, ok := getLoadBalancerGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok { + toSerialize["ExternalAddress"] = val } - if !IsNil(o.Listeners) { - toSerialize["listeners"] = o.Listeners + if val, ok := getLoadBalancerGetListenersAttributeTypeOk(o.Listeners); ok { + toSerialize["Listeners"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getLoadBalancerGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.Networks) { - toSerialize["networks"] = o.Networks + if val, ok := getLoadBalancerGetNetworksAttributeTypeOk(o.Networks); ok { + toSerialize["Networks"] = val } - if !IsNil(o.Options) { - toSerialize["options"] = o.Options + if val, ok := getLoadBalancerGetOptionsAttributeTypeOk(o.Options); ok { + toSerialize["Options"] = val } - if !IsNil(o.PlanId) { - toSerialize["planId"] = o.PlanId + if val, ok := getLoadBalancerGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val } - if !IsNil(o.PrivateAddress) { - toSerialize["privateAddress"] = o.PrivateAddress + if val, ok := getLoadBalancerGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok { + toSerialize["PrivateAddress"] = val } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status + if val, ok := getLoadBalancerGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val } - if !IsNil(o.TargetPools) { - toSerialize["targetPools"] = o.TargetPools + if val, ok := getLoadBalancerGetTargetPoolsAttributeTypeOk(o.TargetPools); ok { + toSerialize["TargetPools"] = val } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version + if val, ok := getLoadBalancerGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_load_balancer_error.go b/services/lbapplication/model_load_balancer_error.go index ffbfdabb2..c2bc60efb 100644 --- a/services/lbapplication/model_load_balancer_error.go +++ b/services/lbapplication/model_load_balancer_error.go @@ -17,12 +17,53 @@ import ( // checks if the LoadBalancerError type satisfies the MappedNullable interface at compile time var _ MappedNullable = &LoadBalancerError{} +/* + types and functions for description +*/ + +// isNotNullableString +type LoadBalancerErrorGetDescriptionAttributeType = *string + +func getLoadBalancerErrorGetDescriptionAttributeTypeOk(arg LoadBalancerErrorGetDescriptionAttributeType) (ret LoadBalancerErrorGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerErrorGetDescriptionAttributeType(arg *LoadBalancerErrorGetDescriptionAttributeType, val LoadBalancerErrorGetDescriptionRetType) { + *arg = &val +} + +type LoadBalancerErrorGetDescriptionArgType = string +type LoadBalancerErrorGetDescriptionRetType = string + +/* + types and functions for type +*/ + +// isEnumRef +type LoadBalancerErrorGetTypeAttributeType = *string +type LoadBalancerErrorGetTypeArgType = string +type LoadBalancerErrorGetTypeRetType = string + +func getLoadBalancerErrorGetTypeAttributeTypeOk(arg LoadBalancerErrorGetTypeAttributeType) (ret LoadBalancerErrorGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerErrorGetTypeAttributeType(arg *LoadBalancerErrorGetTypeAttributeType, val LoadBalancerErrorGetTypeRetType) { + *arg = &val +} + // LoadBalancerError struct for LoadBalancerError type LoadBalancerError struct { // The error description contains additional helpful user information to fix the error state of the application load balancer. For example the IP 45.135.247.139 does not exist in the project, then the description will report: Floating IP \"45.135.247.139\" could not be found. - Description *string `json:"description,omitempty"` + Description LoadBalancerErrorGetDescriptionAttributeType `json:"description,omitempty"` // The error type specifies which part of the application load balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the application load balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error. - Type *string `json:"type,omitempty"` + Type LoadBalancerErrorGetTypeAttributeType `json:"type,omitempty"` } // NewLoadBalancerError instantiates a new LoadBalancerError object @@ -43,76 +84,58 @@ func NewLoadBalancerErrorWithDefaults() *LoadBalancerError { } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *LoadBalancerError) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - return o.Description +func (o *LoadBalancerError) GetDescription() (res LoadBalancerErrorGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancerError) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true +func (o *LoadBalancerError) GetDescriptionOk() (ret LoadBalancerErrorGetDescriptionRetType, ok bool) { + return getLoadBalancerErrorGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. func (o *LoadBalancerError) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false + _, ok := o.GetDescriptionOk() + return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *LoadBalancerError) SetDescription(v *string) { - o.Description = v +func (o *LoadBalancerError) SetDescription(v LoadBalancerErrorGetDescriptionRetType) { + setLoadBalancerErrorGetDescriptionAttributeType(&o.Description, v) } // GetType returns the Type field value if set, zero value otherwise. -func (o *LoadBalancerError) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - return o.Type +func (o *LoadBalancerError) GetType() (res LoadBalancerErrorGetTypeRetType) { + res, _ = o.GetTypeOk() + return } // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancerError) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true +func (o *LoadBalancerError) GetTypeOk() (ret LoadBalancerErrorGetTypeRetType, ok bool) { + return getLoadBalancerErrorGetTypeAttributeTypeOk(o.Type) } // HasType returns a boolean if a field has been set. func (o *LoadBalancerError) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false + _, ok := o.GetTypeOk() + return ok } // SetType gets a reference to the given string and assigns it to the Type field. -func (o *LoadBalancerError) SetType(v *string) { - o.Type = v +func (o *LoadBalancerError) SetType(v LoadBalancerErrorGetTypeRetType) { + setLoadBalancerErrorGetTypeAttributeType(&o.Type, v) } func (o LoadBalancerError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Description) { - toSerialize["description"] = o.Description + if val, ok := getLoadBalancerErrorGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type + if val, ok := getLoadBalancerErrorGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_load_balancer_options.go b/services/lbapplication/model_load_balancer_options.go index 58f200228..82c0cc6ec 100644 --- a/services/lbapplication/model_load_balancer_options.go +++ b/services/lbapplication/model_load_balancer_options.go @@ -17,13 +17,93 @@ import ( // checks if the LoadBalancerOptions type satisfies the MappedNullable interface at compile time var _ MappedNullable = &LoadBalancerOptions{} +/* + types and functions for accessControl +*/ + +// isModel +type LoadBalancerOptionsGetAccessControlAttributeType = *LoadbalancerOptionAccessControl +type LoadBalancerOptionsGetAccessControlArgType = LoadbalancerOptionAccessControl +type LoadBalancerOptionsGetAccessControlRetType = LoadbalancerOptionAccessControl + +func getLoadBalancerOptionsGetAccessControlAttributeTypeOk(arg LoadBalancerOptionsGetAccessControlAttributeType) (ret LoadBalancerOptionsGetAccessControlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerOptionsGetAccessControlAttributeType(arg *LoadBalancerOptionsGetAccessControlAttributeType, val LoadBalancerOptionsGetAccessControlRetType) { + *arg = &val +} + +/* + types and functions for ephemeralAddress +*/ + +// isBoolean +type LoadBalancerOptionsgetEphemeralAddressAttributeType = *bool +type LoadBalancerOptionsgetEphemeralAddressArgType = bool +type LoadBalancerOptionsgetEphemeralAddressRetType = bool + +func getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(arg LoadBalancerOptionsgetEphemeralAddressAttributeType) (ret LoadBalancerOptionsgetEphemeralAddressRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerOptionsgetEphemeralAddressAttributeType(arg *LoadBalancerOptionsgetEphemeralAddressAttributeType, val LoadBalancerOptionsgetEphemeralAddressRetType) { + *arg = &val +} + +/* + types and functions for observability +*/ + +// isModel +type LoadBalancerOptionsGetObservabilityAttributeType = *LoadbalancerOptionObservability +type LoadBalancerOptionsGetObservabilityArgType = LoadbalancerOptionObservability +type LoadBalancerOptionsGetObservabilityRetType = LoadbalancerOptionObservability + +func getLoadBalancerOptionsGetObservabilityAttributeTypeOk(arg LoadBalancerOptionsGetObservabilityAttributeType) (ret LoadBalancerOptionsGetObservabilityRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerOptionsGetObservabilityAttributeType(arg *LoadBalancerOptionsGetObservabilityAttributeType, val LoadBalancerOptionsGetObservabilityRetType) { + *arg = &val +} + +/* + types and functions for privateNetworkOnly +*/ + +// isBoolean +type LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType = *bool +type LoadBalancerOptionsgetPrivateNetworkOnlyArgType = bool +type LoadBalancerOptionsgetPrivateNetworkOnlyRetType = bool + +func getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(arg LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType) (ret LoadBalancerOptionsgetPrivateNetworkOnlyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadBalancerOptionsgetPrivateNetworkOnlyAttributeType(arg *LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType, val LoadBalancerOptionsgetPrivateNetworkOnlyRetType) { + *arg = &val +} + // LoadBalancerOptions Defines any optional functionality you want to have enabled on your application load balancer. type LoadBalancerOptions struct { - AccessControl *LoadbalancerOptionAccessControl `json:"accessControl,omitempty"` - EphemeralAddress *bool `json:"ephemeralAddress,omitempty"` - Observability *LoadbalancerOptionObservability `json:"observability,omitempty"` + AccessControl LoadBalancerOptionsGetAccessControlAttributeType `json:"accessControl,omitempty"` + EphemeralAddress LoadBalancerOptionsgetEphemeralAddressAttributeType `json:"ephemeralAddress,omitempty"` + Observability LoadBalancerOptionsGetObservabilityAttributeType `json:"observability,omitempty"` // Application Load Balancer is accessible only via a private network ip address. Not changeable after creation. - PrivateNetworkOnly *bool `json:"privateNetworkOnly,omitempty"` + PrivateNetworkOnly LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType `json:"privateNetworkOnly,omitempty"` } // NewLoadBalancerOptions instantiates a new LoadBalancerOptions object @@ -44,146 +124,110 @@ func NewLoadBalancerOptionsWithDefaults() *LoadBalancerOptions { } // GetAccessControl returns the AccessControl field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetAccessControl() *LoadbalancerOptionAccessControl { - if o == nil || IsNil(o.AccessControl) { - var ret *LoadbalancerOptionAccessControl - return ret - } - return o.AccessControl +func (o *LoadBalancerOptions) GetAccessControl() (res LoadBalancerOptionsGetAccessControlRetType) { + res, _ = o.GetAccessControlOk() + return } // GetAccessControlOk returns a tuple with the AccessControl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetAccessControlOk() (*LoadbalancerOptionAccessControl, bool) { - if o == nil || IsNil(o.AccessControl) { - return nil, false - } - return o.AccessControl, true +func (o *LoadBalancerOptions) GetAccessControlOk() (ret LoadBalancerOptionsGetAccessControlRetType, ok bool) { + return getLoadBalancerOptionsGetAccessControlAttributeTypeOk(o.AccessControl) } // HasAccessControl returns a boolean if a field has been set. func (o *LoadBalancerOptions) HasAccessControl() bool { - if o != nil && !IsNil(o.AccessControl) { - return true - } - - return false + _, ok := o.GetAccessControlOk() + return ok } // SetAccessControl gets a reference to the given LoadbalancerOptionAccessControl and assigns it to the AccessControl field. -func (o *LoadBalancerOptions) SetAccessControl(v *LoadbalancerOptionAccessControl) { - o.AccessControl = v +func (o *LoadBalancerOptions) SetAccessControl(v LoadBalancerOptionsGetAccessControlRetType) { + setLoadBalancerOptionsGetAccessControlAttributeType(&o.AccessControl, v) } // GetEphemeralAddress returns the EphemeralAddress field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetEphemeralAddress() *bool { - if o == nil || IsNil(o.EphemeralAddress) { - var ret *bool - return ret - } - return o.EphemeralAddress +func (o *LoadBalancerOptions) GetEphemeralAddress() (res LoadBalancerOptionsgetEphemeralAddressRetType) { + res, _ = o.GetEphemeralAddressOk() + return } // GetEphemeralAddressOk returns a tuple with the EphemeralAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetEphemeralAddressOk() (*bool, bool) { - if o == nil || IsNil(o.EphemeralAddress) { - return nil, false - } - return o.EphemeralAddress, true +func (o *LoadBalancerOptions) GetEphemeralAddressOk() (ret LoadBalancerOptionsgetEphemeralAddressRetType, ok bool) { + return getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(o.EphemeralAddress) } // HasEphemeralAddress returns a boolean if a field has been set. func (o *LoadBalancerOptions) HasEphemeralAddress() bool { - if o != nil && !IsNil(o.EphemeralAddress) { - return true - } - - return false + _, ok := o.GetEphemeralAddressOk() + return ok } // SetEphemeralAddress gets a reference to the given bool and assigns it to the EphemeralAddress field. -func (o *LoadBalancerOptions) SetEphemeralAddress(v *bool) { - o.EphemeralAddress = v +func (o *LoadBalancerOptions) SetEphemeralAddress(v LoadBalancerOptionsgetEphemeralAddressRetType) { + setLoadBalancerOptionsgetEphemeralAddressAttributeType(&o.EphemeralAddress, v) } // GetObservability returns the Observability field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetObservability() *LoadbalancerOptionObservability { - if o == nil || IsNil(o.Observability) { - var ret *LoadbalancerOptionObservability - return ret - } - return o.Observability +func (o *LoadBalancerOptions) GetObservability() (res LoadBalancerOptionsGetObservabilityRetType) { + res, _ = o.GetObservabilityOk() + return } // GetObservabilityOk returns a tuple with the Observability field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetObservabilityOk() (*LoadbalancerOptionObservability, bool) { - if o == nil || IsNil(o.Observability) { - return nil, false - } - return o.Observability, true +func (o *LoadBalancerOptions) GetObservabilityOk() (ret LoadBalancerOptionsGetObservabilityRetType, ok bool) { + return getLoadBalancerOptionsGetObservabilityAttributeTypeOk(o.Observability) } // HasObservability returns a boolean if a field has been set. func (o *LoadBalancerOptions) HasObservability() bool { - if o != nil && !IsNil(o.Observability) { - return true - } - - return false + _, ok := o.GetObservabilityOk() + return ok } // SetObservability gets a reference to the given LoadbalancerOptionObservability and assigns it to the Observability field. -func (o *LoadBalancerOptions) SetObservability(v *LoadbalancerOptionObservability) { - o.Observability = v +func (o *LoadBalancerOptions) SetObservability(v LoadBalancerOptionsGetObservabilityRetType) { + setLoadBalancerOptionsGetObservabilityAttributeType(&o.Observability, v) } // GetPrivateNetworkOnly returns the PrivateNetworkOnly field value if set, zero value otherwise. -func (o *LoadBalancerOptions) GetPrivateNetworkOnly() *bool { - if o == nil || IsNil(o.PrivateNetworkOnly) { - var ret *bool - return ret - } - return o.PrivateNetworkOnly +func (o *LoadBalancerOptions) GetPrivateNetworkOnly() (res LoadBalancerOptionsgetPrivateNetworkOnlyRetType) { + res, _ = o.GetPrivateNetworkOnlyOk() + return } // GetPrivateNetworkOnlyOk returns a tuple with the PrivateNetworkOnly field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadBalancerOptions) GetPrivateNetworkOnlyOk() (*bool, bool) { - if o == nil || IsNil(o.PrivateNetworkOnly) { - return nil, false - } - return o.PrivateNetworkOnly, true +func (o *LoadBalancerOptions) GetPrivateNetworkOnlyOk() (ret LoadBalancerOptionsgetPrivateNetworkOnlyRetType, ok bool) { + return getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(o.PrivateNetworkOnly) } // HasPrivateNetworkOnly returns a boolean if a field has been set. func (o *LoadBalancerOptions) HasPrivateNetworkOnly() bool { - if o != nil && !IsNil(o.PrivateNetworkOnly) { - return true - } - - return false + _, ok := o.GetPrivateNetworkOnlyOk() + return ok } // SetPrivateNetworkOnly gets a reference to the given bool and assigns it to the PrivateNetworkOnly field. -func (o *LoadBalancerOptions) SetPrivateNetworkOnly(v *bool) { - o.PrivateNetworkOnly = v +func (o *LoadBalancerOptions) SetPrivateNetworkOnly(v LoadBalancerOptionsgetPrivateNetworkOnlyRetType) { + setLoadBalancerOptionsgetPrivateNetworkOnlyAttributeType(&o.PrivateNetworkOnly, v) } func (o LoadBalancerOptions) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.AccessControl) { - toSerialize["accessControl"] = o.AccessControl + if val, ok := getLoadBalancerOptionsGetAccessControlAttributeTypeOk(o.AccessControl); ok { + toSerialize["AccessControl"] = val } - if !IsNil(o.EphemeralAddress) { - toSerialize["ephemeralAddress"] = o.EphemeralAddress + if val, ok := getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(o.EphemeralAddress); ok { + toSerialize["EphemeralAddress"] = val } - if !IsNil(o.Observability) { - toSerialize["observability"] = o.Observability + if val, ok := getLoadBalancerOptionsGetObservabilityAttributeTypeOk(o.Observability); ok { + toSerialize["Observability"] = val } - if !IsNil(o.PrivateNetworkOnly) { - toSerialize["privateNetworkOnly"] = o.PrivateNetworkOnly + if val, ok := getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(o.PrivateNetworkOnly); ok { + toSerialize["PrivateNetworkOnly"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_loadbalancer_option_access_control.go b/services/lbapplication/model_loadbalancer_option_access_control.go index 837d64342..7c2fde916 100644 --- a/services/lbapplication/model_loadbalancer_option_access_control.go +++ b/services/lbapplication/model_loadbalancer_option_access_control.go @@ -17,10 +17,30 @@ import ( // checks if the LoadbalancerOptionAccessControl type satisfies the MappedNullable interface at compile time var _ MappedNullable = &LoadbalancerOptionAccessControl{} +/* + types and functions for allowedSourceRanges +*/ + +// isArray +type LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType = *[]string +type LoadbalancerOptionAccessControlGetAllowedSourceRangesArgType = []string +type LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType = []string + +func getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(arg LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType) (ret LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType(arg *LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType, val LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) { + *arg = &val +} + // LoadbalancerOptionAccessControl Use this option to limit the IP ranges that can use the application load balancer. type LoadbalancerOptionAccessControl struct { // Application Load Balancer is accessible only from an IP address in this range - AllowedSourceRanges *[]string `json:"allowedSourceRanges,omitempty"` + AllowedSourceRanges LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType `json:"allowedSourceRanges,omitempty"` } // NewLoadbalancerOptionAccessControl instantiates a new LoadbalancerOptionAccessControl object @@ -41,41 +61,32 @@ func NewLoadbalancerOptionAccessControlWithDefaults() *LoadbalancerOptionAccessC } // GetAllowedSourceRanges returns the AllowedSourceRanges field value if set, zero value otherwise. -func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRanges() *[]string { - if o == nil || IsNil(o.AllowedSourceRanges) { - var ret *[]string - return ret - } - return o.AllowedSourceRanges +func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRanges() (res LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) { + res, _ = o.GetAllowedSourceRangesOk() + return } // GetAllowedSourceRangesOk returns a tuple with the AllowedSourceRanges field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRangesOk() (*[]string, bool) { - if o == nil || IsNil(o.AllowedSourceRanges) { - return nil, false - } - return o.AllowedSourceRanges, true +func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRangesOk() (ret LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType, ok bool) { + return getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(o.AllowedSourceRanges) } // HasAllowedSourceRanges returns a boolean if a field has been set. func (o *LoadbalancerOptionAccessControl) HasAllowedSourceRanges() bool { - if o != nil && !IsNil(o.AllowedSourceRanges) { - return true - } - - return false + _, ok := o.GetAllowedSourceRangesOk() + return ok } // SetAllowedSourceRanges gets a reference to the given []string and assigns it to the AllowedSourceRanges field. -func (o *LoadbalancerOptionAccessControl) SetAllowedSourceRanges(v *[]string) { - o.AllowedSourceRanges = v +func (o *LoadbalancerOptionAccessControl) SetAllowedSourceRanges(v LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) { + setLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType(&o.AllowedSourceRanges, v) } func (o LoadbalancerOptionAccessControl) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.AllowedSourceRanges) { - toSerialize["allowedSourceRanges"] = o.AllowedSourceRanges + if val, ok := getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(o.AllowedSourceRanges); ok { + toSerialize["AllowedSourceRanges"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_loadbalancer_option_logs.go b/services/lbapplication/model_loadbalancer_option_logs.go index 341116e32..096ffd401 100644 --- a/services/lbapplication/model_loadbalancer_option_logs.go +++ b/services/lbapplication/model_loadbalancer_option_logs.go @@ -17,12 +17,54 @@ import ( // checks if the LoadbalancerOptionLogs type satisfies the MappedNullable interface at compile time var _ MappedNullable = &LoadbalancerOptionLogs{} +/* + types and functions for credentialsRef +*/ + +// isNotNullableString +type LoadbalancerOptionLogsGetCredentialsRefAttributeType = *string + +func getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(arg LoadbalancerOptionLogsGetCredentialsRefAttributeType) (ret LoadbalancerOptionLogsGetCredentialsRefRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadbalancerOptionLogsGetCredentialsRefAttributeType(arg *LoadbalancerOptionLogsGetCredentialsRefAttributeType, val LoadbalancerOptionLogsGetCredentialsRefRetType) { + *arg = &val +} + +type LoadbalancerOptionLogsGetCredentialsRefArgType = string +type LoadbalancerOptionLogsGetCredentialsRefRetType = string + +/* + types and functions for pushUrl +*/ + +// isNotNullableString +type LoadbalancerOptionLogsGetPushUrlAttributeType = *string + +func getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(arg LoadbalancerOptionLogsGetPushUrlAttributeType) (ret LoadbalancerOptionLogsGetPushUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadbalancerOptionLogsGetPushUrlAttributeType(arg *LoadbalancerOptionLogsGetPushUrlAttributeType, val LoadbalancerOptionLogsGetPushUrlRetType) { + *arg = &val +} + +type LoadbalancerOptionLogsGetPushUrlArgType = string +type LoadbalancerOptionLogsGetPushUrlRetType = string + // LoadbalancerOptionLogs struct for LoadbalancerOptionLogs type LoadbalancerOptionLogs struct { // Credentials reference for logging. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the logging solution the push URL points to. Then this enables monitoring via remote write for the Application Load Balancer. - CredentialsRef *string `json:"credentialsRef,omitempty"` + CredentialsRef LoadbalancerOptionLogsGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"` // The ARGUS/Loki remote write Push URL you want the logs to be shipped to. - PushUrl *string `json:"pushUrl,omitempty"` + PushUrl LoadbalancerOptionLogsGetPushUrlAttributeType `json:"pushUrl,omitempty"` } // NewLoadbalancerOptionLogs instantiates a new LoadbalancerOptionLogs object @@ -43,76 +85,58 @@ func NewLoadbalancerOptionLogsWithDefaults() *LoadbalancerOptionLogs { } // GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. -func (o *LoadbalancerOptionLogs) GetCredentialsRef() *string { - if o == nil || IsNil(o.CredentialsRef) { - var ret *string - return ret - } - return o.CredentialsRef +func (o *LoadbalancerOptionLogs) GetCredentialsRef() (res LoadbalancerOptionLogsGetCredentialsRefRetType) { + res, _ = o.GetCredentialsRefOk() + return } // GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadbalancerOptionLogs) GetCredentialsRefOk() (*string, bool) { - if o == nil || IsNil(o.CredentialsRef) { - return nil, false - } - return o.CredentialsRef, true +func (o *LoadbalancerOptionLogs) GetCredentialsRefOk() (ret LoadbalancerOptionLogsGetCredentialsRefRetType, ok bool) { + return getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(o.CredentialsRef) } // HasCredentialsRef returns a boolean if a field has been set. func (o *LoadbalancerOptionLogs) HasCredentialsRef() bool { - if o != nil && !IsNil(o.CredentialsRef) { - return true - } - - return false + _, ok := o.GetCredentialsRefOk() + return ok } // SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. -func (o *LoadbalancerOptionLogs) SetCredentialsRef(v *string) { - o.CredentialsRef = v +func (o *LoadbalancerOptionLogs) SetCredentialsRef(v LoadbalancerOptionLogsGetCredentialsRefRetType) { + setLoadbalancerOptionLogsGetCredentialsRefAttributeType(&o.CredentialsRef, v) } // GetPushUrl returns the PushUrl field value if set, zero value otherwise. -func (o *LoadbalancerOptionLogs) GetPushUrl() *string { - if o == nil || IsNil(o.PushUrl) { - var ret *string - return ret - } - return o.PushUrl +func (o *LoadbalancerOptionLogs) GetPushUrl() (res LoadbalancerOptionLogsGetPushUrlRetType) { + res, _ = o.GetPushUrlOk() + return } // GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadbalancerOptionLogs) GetPushUrlOk() (*string, bool) { - if o == nil || IsNil(o.PushUrl) { - return nil, false - } - return o.PushUrl, true +func (o *LoadbalancerOptionLogs) GetPushUrlOk() (ret LoadbalancerOptionLogsGetPushUrlRetType, ok bool) { + return getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(o.PushUrl) } // HasPushUrl returns a boolean if a field has been set. func (o *LoadbalancerOptionLogs) HasPushUrl() bool { - if o != nil && !IsNil(o.PushUrl) { - return true - } - - return false + _, ok := o.GetPushUrlOk() + return ok } // SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. -func (o *LoadbalancerOptionLogs) SetPushUrl(v *string) { - o.PushUrl = v +func (o *LoadbalancerOptionLogs) SetPushUrl(v LoadbalancerOptionLogsGetPushUrlRetType) { + setLoadbalancerOptionLogsGetPushUrlAttributeType(&o.PushUrl, v) } func (o LoadbalancerOptionLogs) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CredentialsRef) { - toSerialize["credentialsRef"] = o.CredentialsRef + if val, ok := getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok { + toSerialize["CredentialsRef"] = val } - if !IsNil(o.PushUrl) { - toSerialize["pushUrl"] = o.PushUrl + if val, ok := getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(o.PushUrl); ok { + toSerialize["PushUrl"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_loadbalancer_option_metrics.go b/services/lbapplication/model_loadbalancer_option_metrics.go index a79db913b..7ac5264e5 100644 --- a/services/lbapplication/model_loadbalancer_option_metrics.go +++ b/services/lbapplication/model_loadbalancer_option_metrics.go @@ -17,12 +17,54 @@ import ( // checks if the LoadbalancerOptionMetrics type satisfies the MappedNullable interface at compile time var _ MappedNullable = &LoadbalancerOptionMetrics{} +/* + types and functions for credentialsRef +*/ + +// isNotNullableString +type LoadbalancerOptionMetricsGetCredentialsRefAttributeType = *string + +func getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(arg LoadbalancerOptionMetricsGetCredentialsRefAttributeType) (ret LoadbalancerOptionMetricsGetCredentialsRefRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadbalancerOptionMetricsGetCredentialsRefAttributeType(arg *LoadbalancerOptionMetricsGetCredentialsRefAttributeType, val LoadbalancerOptionMetricsGetCredentialsRefRetType) { + *arg = &val +} + +type LoadbalancerOptionMetricsGetCredentialsRefArgType = string +type LoadbalancerOptionMetricsGetCredentialsRefRetType = string + +/* + types and functions for pushUrl +*/ + +// isNotNullableString +type LoadbalancerOptionMetricsGetPushUrlAttributeType = *string + +func getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(arg LoadbalancerOptionMetricsGetPushUrlAttributeType) (ret LoadbalancerOptionMetricsGetPushUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadbalancerOptionMetricsGetPushUrlAttributeType(arg *LoadbalancerOptionMetricsGetPushUrlAttributeType, val LoadbalancerOptionMetricsGetPushUrlRetType) { + *arg = &val +} + +type LoadbalancerOptionMetricsGetPushUrlArgType = string +type LoadbalancerOptionMetricsGetPushUrlRetType = string + // LoadbalancerOptionMetrics struct for LoadbalancerOptionMetrics type LoadbalancerOptionMetrics struct { // Credentials reference for metrics. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the metrics solution the push URL points to. Then this enables monitoring via remote write for the Application Load Balancer. - CredentialsRef *string `json:"credentialsRef,omitempty"` + CredentialsRef LoadbalancerOptionMetricsGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"` // The ARGUS/Prometheus remote write Push URL you want the metrics to be shipped to. - PushUrl *string `json:"pushUrl,omitempty"` + PushUrl LoadbalancerOptionMetricsGetPushUrlAttributeType `json:"pushUrl,omitempty"` } // NewLoadbalancerOptionMetrics instantiates a new LoadbalancerOptionMetrics object @@ -43,76 +85,58 @@ func NewLoadbalancerOptionMetricsWithDefaults() *LoadbalancerOptionMetrics { } // GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise. -func (o *LoadbalancerOptionMetrics) GetCredentialsRef() *string { - if o == nil || IsNil(o.CredentialsRef) { - var ret *string - return ret - } - return o.CredentialsRef +func (o *LoadbalancerOptionMetrics) GetCredentialsRef() (res LoadbalancerOptionMetricsGetCredentialsRefRetType) { + res, _ = o.GetCredentialsRefOk() + return } // GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadbalancerOptionMetrics) GetCredentialsRefOk() (*string, bool) { - if o == nil || IsNil(o.CredentialsRef) { - return nil, false - } - return o.CredentialsRef, true +func (o *LoadbalancerOptionMetrics) GetCredentialsRefOk() (ret LoadbalancerOptionMetricsGetCredentialsRefRetType, ok bool) { + return getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(o.CredentialsRef) } // HasCredentialsRef returns a boolean if a field has been set. func (o *LoadbalancerOptionMetrics) HasCredentialsRef() bool { - if o != nil && !IsNil(o.CredentialsRef) { - return true - } - - return false + _, ok := o.GetCredentialsRefOk() + return ok } // SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field. -func (o *LoadbalancerOptionMetrics) SetCredentialsRef(v *string) { - o.CredentialsRef = v +func (o *LoadbalancerOptionMetrics) SetCredentialsRef(v LoadbalancerOptionMetricsGetCredentialsRefRetType) { + setLoadbalancerOptionMetricsGetCredentialsRefAttributeType(&o.CredentialsRef, v) } // GetPushUrl returns the PushUrl field value if set, zero value otherwise. -func (o *LoadbalancerOptionMetrics) GetPushUrl() *string { - if o == nil || IsNil(o.PushUrl) { - var ret *string - return ret - } - return o.PushUrl +func (o *LoadbalancerOptionMetrics) GetPushUrl() (res LoadbalancerOptionMetricsGetPushUrlRetType) { + res, _ = o.GetPushUrlOk() + return } // GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadbalancerOptionMetrics) GetPushUrlOk() (*string, bool) { - if o == nil || IsNil(o.PushUrl) { - return nil, false - } - return o.PushUrl, true +func (o *LoadbalancerOptionMetrics) GetPushUrlOk() (ret LoadbalancerOptionMetricsGetPushUrlRetType, ok bool) { + return getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(o.PushUrl) } // HasPushUrl returns a boolean if a field has been set. func (o *LoadbalancerOptionMetrics) HasPushUrl() bool { - if o != nil && !IsNil(o.PushUrl) { - return true - } - - return false + _, ok := o.GetPushUrlOk() + return ok } // SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. -func (o *LoadbalancerOptionMetrics) SetPushUrl(v *string) { - o.PushUrl = v +func (o *LoadbalancerOptionMetrics) SetPushUrl(v LoadbalancerOptionMetricsGetPushUrlRetType) { + setLoadbalancerOptionMetricsGetPushUrlAttributeType(&o.PushUrl, v) } func (o LoadbalancerOptionMetrics) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CredentialsRef) { - toSerialize["credentialsRef"] = o.CredentialsRef + if val, ok := getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok { + toSerialize["CredentialsRef"] = val } - if !IsNil(o.PushUrl) { - toSerialize["pushUrl"] = o.PushUrl + if val, ok := getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(o.PushUrl); ok { + toSerialize["PushUrl"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_loadbalancer_option_observability.go b/services/lbapplication/model_loadbalancer_option_observability.go index 9fed6ed40..a5d70dab4 100644 --- a/services/lbapplication/model_loadbalancer_option_observability.go +++ b/services/lbapplication/model_loadbalancer_option_observability.go @@ -17,10 +17,50 @@ import ( // checks if the LoadbalancerOptionObservability type satisfies the MappedNullable interface at compile time var _ MappedNullable = &LoadbalancerOptionObservability{} +/* + types and functions for logs +*/ + +// isModel +type LoadbalancerOptionObservabilityGetLogsAttributeType = *LoadbalancerOptionLogs +type LoadbalancerOptionObservabilityGetLogsArgType = LoadbalancerOptionLogs +type LoadbalancerOptionObservabilityGetLogsRetType = LoadbalancerOptionLogs + +func getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(arg LoadbalancerOptionObservabilityGetLogsAttributeType) (ret LoadbalancerOptionObservabilityGetLogsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadbalancerOptionObservabilityGetLogsAttributeType(arg *LoadbalancerOptionObservabilityGetLogsAttributeType, val LoadbalancerOptionObservabilityGetLogsRetType) { + *arg = &val +} + +/* + types and functions for metrics +*/ + +// isModel +type LoadbalancerOptionObservabilityGetMetricsAttributeType = *LoadbalancerOptionMetrics +type LoadbalancerOptionObservabilityGetMetricsArgType = LoadbalancerOptionMetrics +type LoadbalancerOptionObservabilityGetMetricsRetType = LoadbalancerOptionMetrics + +func getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(arg LoadbalancerOptionObservabilityGetMetricsAttributeType) (ret LoadbalancerOptionObservabilityGetMetricsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoadbalancerOptionObservabilityGetMetricsAttributeType(arg *LoadbalancerOptionObservabilityGetMetricsAttributeType, val LoadbalancerOptionObservabilityGetMetricsRetType) { + *arg = &val +} + // LoadbalancerOptionObservability We offer Application Load Balancer metrics observability via ARGUS or external solutions. Not changeable after creation. type LoadbalancerOptionObservability struct { - Logs *LoadbalancerOptionLogs `json:"logs,omitempty"` - Metrics *LoadbalancerOptionMetrics `json:"metrics,omitempty"` + Logs LoadbalancerOptionObservabilityGetLogsAttributeType `json:"logs,omitempty"` + Metrics LoadbalancerOptionObservabilityGetMetricsAttributeType `json:"metrics,omitempty"` } // NewLoadbalancerOptionObservability instantiates a new LoadbalancerOptionObservability object @@ -41,76 +81,58 @@ func NewLoadbalancerOptionObservabilityWithDefaults() *LoadbalancerOptionObserva } // GetLogs returns the Logs field value if set, zero value otherwise. -func (o *LoadbalancerOptionObservability) GetLogs() *LoadbalancerOptionLogs { - if o == nil || IsNil(o.Logs) { - var ret *LoadbalancerOptionLogs - return ret - } - return o.Logs +func (o *LoadbalancerOptionObservability) GetLogs() (res LoadbalancerOptionObservabilityGetLogsRetType) { + res, _ = o.GetLogsOk() + return } // GetLogsOk returns a tuple with the Logs field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadbalancerOptionObservability) GetLogsOk() (*LoadbalancerOptionLogs, bool) { - if o == nil || IsNil(o.Logs) { - return nil, false - } - return o.Logs, true +func (o *LoadbalancerOptionObservability) GetLogsOk() (ret LoadbalancerOptionObservabilityGetLogsRetType, ok bool) { + return getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(o.Logs) } // HasLogs returns a boolean if a field has been set. func (o *LoadbalancerOptionObservability) HasLogs() bool { - if o != nil && !IsNil(o.Logs) { - return true - } - - return false + _, ok := o.GetLogsOk() + return ok } // SetLogs gets a reference to the given LoadbalancerOptionLogs and assigns it to the Logs field. -func (o *LoadbalancerOptionObservability) SetLogs(v *LoadbalancerOptionLogs) { - o.Logs = v +func (o *LoadbalancerOptionObservability) SetLogs(v LoadbalancerOptionObservabilityGetLogsRetType) { + setLoadbalancerOptionObservabilityGetLogsAttributeType(&o.Logs, v) } // GetMetrics returns the Metrics field value if set, zero value otherwise. -func (o *LoadbalancerOptionObservability) GetMetrics() *LoadbalancerOptionMetrics { - if o == nil || IsNil(o.Metrics) { - var ret *LoadbalancerOptionMetrics - return ret - } - return o.Metrics +func (o *LoadbalancerOptionObservability) GetMetrics() (res LoadbalancerOptionObservabilityGetMetricsRetType) { + res, _ = o.GetMetricsOk() + return } // GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoadbalancerOptionObservability) GetMetricsOk() (*LoadbalancerOptionMetrics, bool) { - if o == nil || IsNil(o.Metrics) { - return nil, false - } - return o.Metrics, true +func (o *LoadbalancerOptionObservability) GetMetricsOk() (ret LoadbalancerOptionObservabilityGetMetricsRetType, ok bool) { + return getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(o.Metrics) } // HasMetrics returns a boolean if a field has been set. func (o *LoadbalancerOptionObservability) HasMetrics() bool { - if o != nil && !IsNil(o.Metrics) { - return true - } - - return false + _, ok := o.GetMetricsOk() + return ok } // SetMetrics gets a reference to the given LoadbalancerOptionMetrics and assigns it to the Metrics field. -func (o *LoadbalancerOptionObservability) SetMetrics(v *LoadbalancerOptionMetrics) { - o.Metrics = v +func (o *LoadbalancerOptionObservability) SetMetrics(v LoadbalancerOptionObservabilityGetMetricsRetType) { + setLoadbalancerOptionObservabilityGetMetricsAttributeType(&o.Metrics, v) } func (o LoadbalancerOptionObservability) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Logs) { - toSerialize["logs"] = o.Logs + if val, ok := getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(o.Logs); ok { + toSerialize["Logs"] = val } - if !IsNil(o.Metrics) { - toSerialize["metrics"] = o.Metrics + if val, ok := getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(o.Metrics); ok { + toSerialize["Metrics"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_matcher.go b/services/lbapplication/model_matcher.go index 183945b06..0f205209e 100644 --- a/services/lbapplication/model_matcher.go +++ b/services/lbapplication/model_matcher.go @@ -17,19 +17,141 @@ import ( // checks if the Matcher type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Matcher{} +/* + types and functions for cookiePersistence +*/ + +// isModel +type MatcherGetCookiePersistenceAttributeType = *CookiePersistence +type MatcherGetCookiePersistenceArgType = CookiePersistence +type MatcherGetCookiePersistenceRetType = CookiePersistence + +func getMatcherGetCookiePersistenceAttributeTypeOk(arg MatcherGetCookiePersistenceAttributeType) (ret MatcherGetCookiePersistenceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMatcherGetCookiePersistenceAttributeType(arg *MatcherGetCookiePersistenceAttributeType, val MatcherGetCookiePersistenceRetType) { + *arg = &val +} + +/* + types and functions for headers +*/ + +// isArray +type MatcherGetHeadersAttributeType = *[]Header +type MatcherGetHeadersArgType = []Header +type MatcherGetHeadersRetType = []Header + +func getMatcherGetHeadersAttributeTypeOk(arg MatcherGetHeadersAttributeType) (ret MatcherGetHeadersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMatcherGetHeadersAttributeType(arg *MatcherGetHeadersAttributeType, val MatcherGetHeadersRetType) { + *arg = &val +} + +/* + types and functions for pathPrefix +*/ + +// isNotNullableString +type MatcherGetPathPrefixAttributeType = *string + +func getMatcherGetPathPrefixAttributeTypeOk(arg MatcherGetPathPrefixAttributeType) (ret MatcherGetPathPrefixRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMatcherGetPathPrefixAttributeType(arg *MatcherGetPathPrefixAttributeType, val MatcherGetPathPrefixRetType) { + *arg = &val +} + +type MatcherGetPathPrefixArgType = string +type MatcherGetPathPrefixRetType = string + +/* + types and functions for queryParameters +*/ + +// isArray +type MatcherGetQueryParametersAttributeType = *[]QueryParameters +type MatcherGetQueryParametersArgType = []QueryParameters +type MatcherGetQueryParametersRetType = []QueryParameters + +func getMatcherGetQueryParametersAttributeTypeOk(arg MatcherGetQueryParametersAttributeType) (ret MatcherGetQueryParametersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMatcherGetQueryParametersAttributeType(arg *MatcherGetQueryParametersAttributeType, val MatcherGetQueryParametersRetType) { + *arg = &val +} + +/* + types and functions for targetPool +*/ + +// isNotNullableString +type MatcherGetTargetPoolAttributeType = *string + +func getMatcherGetTargetPoolAttributeTypeOk(arg MatcherGetTargetPoolAttributeType) (ret MatcherGetTargetPoolRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMatcherGetTargetPoolAttributeType(arg *MatcherGetTargetPoolAttributeType, val MatcherGetTargetPoolRetType) { + *arg = &val +} + +type MatcherGetTargetPoolArgType = string +type MatcherGetTargetPoolRetType = string + +/* + types and functions for webSocket +*/ + +// isBoolean +type MatchergetWebSocketAttributeType = *bool +type MatchergetWebSocketArgType = bool +type MatchergetWebSocketRetType = bool + +func getMatchergetWebSocketAttributeTypeOk(arg MatchergetWebSocketAttributeType) (ret MatchergetWebSocketRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMatchergetWebSocketAttributeType(arg *MatchergetWebSocketAttributeType, val MatchergetWebSocketRetType) { + *arg = &val +} + // Matcher struct for Matcher type Matcher struct { - CookiePersistence *CookiePersistence `json:"cookiePersistence,omitempty"` + CookiePersistence MatcherGetCookiePersistenceAttributeType `json:"cookiePersistence,omitempty"` // Headers for the matcher - Headers *[]Header `json:"headers,omitempty"` + Headers MatcherGetHeadersAttributeType `json:"headers,omitempty"` // Path prefix for the matcher - PathPrefix *string `json:"pathPrefix,omitempty"` + PathPrefix MatcherGetPathPrefixAttributeType `json:"pathPrefix,omitempty"` // Query Parameters for the matcher - QueryParameters *[]QueryParameters `json:"queryParameters,omitempty"` + QueryParameters MatcherGetQueryParametersAttributeType `json:"queryParameters,omitempty"` // Reference target pool by target pool name. - TargetPool *string `json:"targetPool,omitempty"` + TargetPool MatcherGetTargetPoolAttributeType `json:"targetPool,omitempty"` // If enabled, when client sends an HTTP request with and Upgrade header, indicating the desire to establish a Websocket connection, if backend server supports WebSocket, it responds with HTTP 101 status code, switching protocols from HTTP to WebSocket. Hence the client and the server can exchange data in real-time using one long-lived TCP connection. - WebSocket *bool `json:"webSocket,omitempty"` + WebSocket MatchergetWebSocketAttributeType `json:"webSocket,omitempty"` } // NewMatcher instantiates a new Matcher object @@ -50,216 +172,162 @@ func NewMatcherWithDefaults() *Matcher { } // GetCookiePersistence returns the CookiePersistence field value if set, zero value otherwise. -func (o *Matcher) GetCookiePersistence() *CookiePersistence { - if o == nil || IsNil(o.CookiePersistence) { - var ret *CookiePersistence - return ret - } - return o.CookiePersistence +func (o *Matcher) GetCookiePersistence() (res MatcherGetCookiePersistenceRetType) { + res, _ = o.GetCookiePersistenceOk() + return } // GetCookiePersistenceOk returns a tuple with the CookiePersistence field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Matcher) GetCookiePersistenceOk() (*CookiePersistence, bool) { - if o == nil || IsNil(o.CookiePersistence) { - return nil, false - } - return o.CookiePersistence, true +func (o *Matcher) GetCookiePersistenceOk() (ret MatcherGetCookiePersistenceRetType, ok bool) { + return getMatcherGetCookiePersistenceAttributeTypeOk(o.CookiePersistence) } // HasCookiePersistence returns a boolean if a field has been set. func (o *Matcher) HasCookiePersistence() bool { - if o != nil && !IsNil(o.CookiePersistence) { - return true - } - - return false + _, ok := o.GetCookiePersistenceOk() + return ok } // SetCookiePersistence gets a reference to the given CookiePersistence and assigns it to the CookiePersistence field. -func (o *Matcher) SetCookiePersistence(v *CookiePersistence) { - o.CookiePersistence = v +func (o *Matcher) SetCookiePersistence(v MatcherGetCookiePersistenceRetType) { + setMatcherGetCookiePersistenceAttributeType(&o.CookiePersistence, v) } // GetHeaders returns the Headers field value if set, zero value otherwise. -func (o *Matcher) GetHeaders() *[]Header { - if o == nil || IsNil(o.Headers) { - var ret *[]Header - return ret - } - return o.Headers +func (o *Matcher) GetHeaders() (res MatcherGetHeadersRetType) { + res, _ = o.GetHeadersOk() + return } // GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Matcher) GetHeadersOk() (*[]Header, bool) { - if o == nil || IsNil(o.Headers) { - return nil, false - } - return o.Headers, true +func (o *Matcher) GetHeadersOk() (ret MatcherGetHeadersRetType, ok bool) { + return getMatcherGetHeadersAttributeTypeOk(o.Headers) } // HasHeaders returns a boolean if a field has been set. func (o *Matcher) HasHeaders() bool { - if o != nil && !IsNil(o.Headers) { - return true - } - - return false + _, ok := o.GetHeadersOk() + return ok } // SetHeaders gets a reference to the given []Header and assigns it to the Headers field. -func (o *Matcher) SetHeaders(v *[]Header) { - o.Headers = v +func (o *Matcher) SetHeaders(v MatcherGetHeadersRetType) { + setMatcherGetHeadersAttributeType(&o.Headers, v) } // GetPathPrefix returns the PathPrefix field value if set, zero value otherwise. -func (o *Matcher) GetPathPrefix() *string { - if o == nil || IsNil(o.PathPrefix) { - var ret *string - return ret - } - return o.PathPrefix +func (o *Matcher) GetPathPrefix() (res MatcherGetPathPrefixRetType) { + res, _ = o.GetPathPrefixOk() + return } // GetPathPrefixOk returns a tuple with the PathPrefix field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Matcher) GetPathPrefixOk() (*string, bool) { - if o == nil || IsNil(o.PathPrefix) { - return nil, false - } - return o.PathPrefix, true +func (o *Matcher) GetPathPrefixOk() (ret MatcherGetPathPrefixRetType, ok bool) { + return getMatcherGetPathPrefixAttributeTypeOk(o.PathPrefix) } // HasPathPrefix returns a boolean if a field has been set. func (o *Matcher) HasPathPrefix() bool { - if o != nil && !IsNil(o.PathPrefix) { - return true - } - - return false + _, ok := o.GetPathPrefixOk() + return ok } // SetPathPrefix gets a reference to the given string and assigns it to the PathPrefix field. -func (o *Matcher) SetPathPrefix(v *string) { - o.PathPrefix = v +func (o *Matcher) SetPathPrefix(v MatcherGetPathPrefixRetType) { + setMatcherGetPathPrefixAttributeType(&o.PathPrefix, v) } // GetQueryParameters returns the QueryParameters field value if set, zero value otherwise. -func (o *Matcher) GetQueryParameters() *[]QueryParameters { - if o == nil || IsNil(o.QueryParameters) { - var ret *[]QueryParameters - return ret - } - return o.QueryParameters +func (o *Matcher) GetQueryParameters() (res MatcherGetQueryParametersRetType) { + res, _ = o.GetQueryParametersOk() + return } // GetQueryParametersOk returns a tuple with the QueryParameters field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Matcher) GetQueryParametersOk() (*[]QueryParameters, bool) { - if o == nil || IsNil(o.QueryParameters) { - return nil, false - } - return o.QueryParameters, true +func (o *Matcher) GetQueryParametersOk() (ret MatcherGetQueryParametersRetType, ok bool) { + return getMatcherGetQueryParametersAttributeTypeOk(o.QueryParameters) } // HasQueryParameters returns a boolean if a field has been set. func (o *Matcher) HasQueryParameters() bool { - if o != nil && !IsNil(o.QueryParameters) { - return true - } - - return false + _, ok := o.GetQueryParametersOk() + return ok } // SetQueryParameters gets a reference to the given []QueryParameters and assigns it to the QueryParameters field. -func (o *Matcher) SetQueryParameters(v *[]QueryParameters) { - o.QueryParameters = v +func (o *Matcher) SetQueryParameters(v MatcherGetQueryParametersRetType) { + setMatcherGetQueryParametersAttributeType(&o.QueryParameters, v) } // GetTargetPool returns the TargetPool field value if set, zero value otherwise. -func (o *Matcher) GetTargetPool() *string { - if o == nil || IsNil(o.TargetPool) { - var ret *string - return ret - } - return o.TargetPool +func (o *Matcher) GetTargetPool() (res MatcherGetTargetPoolRetType) { + res, _ = o.GetTargetPoolOk() + return } // GetTargetPoolOk returns a tuple with the TargetPool field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Matcher) GetTargetPoolOk() (*string, bool) { - if o == nil || IsNil(o.TargetPool) { - return nil, false - } - return o.TargetPool, true +func (o *Matcher) GetTargetPoolOk() (ret MatcherGetTargetPoolRetType, ok bool) { + return getMatcherGetTargetPoolAttributeTypeOk(o.TargetPool) } // HasTargetPool returns a boolean if a field has been set. func (o *Matcher) HasTargetPool() bool { - if o != nil && !IsNil(o.TargetPool) { - return true - } - - return false + _, ok := o.GetTargetPoolOk() + return ok } // SetTargetPool gets a reference to the given string and assigns it to the TargetPool field. -func (o *Matcher) SetTargetPool(v *string) { - o.TargetPool = v +func (o *Matcher) SetTargetPool(v MatcherGetTargetPoolRetType) { + setMatcherGetTargetPoolAttributeType(&o.TargetPool, v) } // GetWebSocket returns the WebSocket field value if set, zero value otherwise. -func (o *Matcher) GetWebSocket() *bool { - if o == nil || IsNil(o.WebSocket) { - var ret *bool - return ret - } - return o.WebSocket +func (o *Matcher) GetWebSocket() (res MatchergetWebSocketRetType) { + res, _ = o.GetWebSocketOk() + return } // GetWebSocketOk returns a tuple with the WebSocket field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Matcher) GetWebSocketOk() (*bool, bool) { - if o == nil || IsNil(o.WebSocket) { - return nil, false - } - return o.WebSocket, true +func (o *Matcher) GetWebSocketOk() (ret MatchergetWebSocketRetType, ok bool) { + return getMatchergetWebSocketAttributeTypeOk(o.WebSocket) } // HasWebSocket returns a boolean if a field has been set. func (o *Matcher) HasWebSocket() bool { - if o != nil && !IsNil(o.WebSocket) { - return true - } - - return false + _, ok := o.GetWebSocketOk() + return ok } // SetWebSocket gets a reference to the given bool and assigns it to the WebSocket field. -func (o *Matcher) SetWebSocket(v *bool) { - o.WebSocket = v +func (o *Matcher) SetWebSocket(v MatchergetWebSocketRetType) { + setMatchergetWebSocketAttributeType(&o.WebSocket, v) } func (o Matcher) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CookiePersistence) { - toSerialize["cookiePersistence"] = o.CookiePersistence + if val, ok := getMatcherGetCookiePersistenceAttributeTypeOk(o.CookiePersistence); ok { + toSerialize["CookiePersistence"] = val } - if !IsNil(o.Headers) { - toSerialize["headers"] = o.Headers + if val, ok := getMatcherGetHeadersAttributeTypeOk(o.Headers); ok { + toSerialize["Headers"] = val } - if !IsNil(o.PathPrefix) { - toSerialize["pathPrefix"] = o.PathPrefix + if val, ok := getMatcherGetPathPrefixAttributeTypeOk(o.PathPrefix); ok { + toSerialize["PathPrefix"] = val } - if !IsNil(o.QueryParameters) { - toSerialize["queryParameters"] = o.QueryParameters + if val, ok := getMatcherGetQueryParametersAttributeTypeOk(o.QueryParameters); ok { + toSerialize["QueryParameters"] = val } - if !IsNil(o.TargetPool) { - toSerialize["targetPool"] = o.TargetPool + if val, ok := getMatcherGetTargetPoolAttributeTypeOk(o.TargetPool); ok { + toSerialize["TargetPool"] = val } - if !IsNil(o.WebSocket) { - toSerialize["webSocket"] = o.WebSocket + if val, ok := getMatchergetWebSocketAttributeTypeOk(o.WebSocket); ok { + toSerialize["WebSocket"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_network.go b/services/lbapplication/model_network.go index 075d1df8e..e1e10317d 100644 --- a/services/lbapplication/model_network.go +++ b/services/lbapplication/model_network.go @@ -17,12 +17,53 @@ import ( // checks if the Network type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Network{} +/* + types and functions for networkId +*/ + +// isNotNullableString +type NetworkGetNetworkIdAttributeType = *string + +func getNetworkGetNetworkIdAttributeTypeOk(arg NetworkGetNetworkIdAttributeType) (ret NetworkGetNetworkIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setNetworkGetNetworkIdAttributeType(arg *NetworkGetNetworkIdAttributeType, val NetworkGetNetworkIdRetType) { + *arg = &val +} + +type NetworkGetNetworkIdArgType = string +type NetworkGetNetworkIdRetType = string + +/* + types and functions for role +*/ + +// isEnumRef +type NetworkGetRoleAttributeType = *string +type NetworkGetRoleArgType = string +type NetworkGetRoleRetType = string + +func getNetworkGetRoleAttributeTypeOk(arg NetworkGetRoleAttributeType) (ret NetworkGetRoleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setNetworkGetRoleAttributeType(arg *NetworkGetRoleAttributeType, val NetworkGetRoleRetType) { + *arg = &val +} + // Network struct for Network type Network struct { // Openstack network ID - NetworkId *string `json:"networkId,omitempty"` + NetworkId NetworkGetNetworkIdAttributeType `json:"networkId,omitempty"` // The role defines how the Application Load Balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported. - Role *string `json:"role,omitempty"` + Role NetworkGetRoleAttributeType `json:"role,omitempty"` } // NewNetwork instantiates a new Network object @@ -43,76 +84,58 @@ func NewNetworkWithDefaults() *Network { } // GetNetworkId returns the NetworkId field value if set, zero value otherwise. -func (o *Network) GetNetworkId() *string { - if o == nil || IsNil(o.NetworkId) { - var ret *string - return ret - } - return o.NetworkId +func (o *Network) GetNetworkId() (res NetworkGetNetworkIdRetType) { + res, _ = o.GetNetworkIdOk() + return } // GetNetworkIdOk returns a tuple with the NetworkId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Network) GetNetworkIdOk() (*string, bool) { - if o == nil || IsNil(o.NetworkId) { - return nil, false - } - return o.NetworkId, true +func (o *Network) GetNetworkIdOk() (ret NetworkGetNetworkIdRetType, ok bool) { + return getNetworkGetNetworkIdAttributeTypeOk(o.NetworkId) } // HasNetworkId returns a boolean if a field has been set. func (o *Network) HasNetworkId() bool { - if o != nil && !IsNil(o.NetworkId) { - return true - } - - return false + _, ok := o.GetNetworkIdOk() + return ok } // SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. -func (o *Network) SetNetworkId(v *string) { - o.NetworkId = v +func (o *Network) SetNetworkId(v NetworkGetNetworkIdRetType) { + setNetworkGetNetworkIdAttributeType(&o.NetworkId, v) } // GetRole returns the Role field value if set, zero value otherwise. -func (o *Network) GetRole() *string { - if o == nil || IsNil(o.Role) { - var ret *string - return ret - } - return o.Role +func (o *Network) GetRole() (res NetworkGetRoleRetType) { + res, _ = o.GetRoleOk() + return } // GetRoleOk returns a tuple with the Role field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Network) GetRoleOk() (*string, bool) { - if o == nil || IsNil(o.Role) { - return nil, false - } - return o.Role, true +func (o *Network) GetRoleOk() (ret NetworkGetRoleRetType, ok bool) { + return getNetworkGetRoleAttributeTypeOk(o.Role) } // HasRole returns a boolean if a field has been set. func (o *Network) HasRole() bool { - if o != nil && !IsNil(o.Role) { - return true - } - - return false + _, ok := o.GetRoleOk() + return ok } // SetRole gets a reference to the given string and assigns it to the Role field. -func (o *Network) SetRole(v *string) { - o.Role = v +func (o *Network) SetRole(v NetworkGetRoleRetType) { + setNetworkGetRoleAttributeType(&o.Role, v) } func (o Network) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.NetworkId) { - toSerialize["networkId"] = o.NetworkId + if val, ok := getNetworkGetNetworkIdAttributeTypeOk(o.NetworkId); ok { + toSerialize["NetworkId"] = val } - if !IsNil(o.Role) { - toSerialize["role"] = o.Role + if val, ok := getNetworkGetRoleAttributeTypeOk(o.Role); ok { + toSerialize["Role"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_plan_details.go b/services/lbapplication/model_plan_details.go index 996535924..3fb2540d6 100644 --- a/services/lbapplication/model_plan_details.go +++ b/services/lbapplication/model_plan_details.go @@ -17,18 +17,122 @@ import ( // checks if the PlanDetails type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PlanDetails{} +/* + types and functions for description +*/ + +// isNotNullableString +type PlanDetailsGetDescriptionAttributeType = *string + +func getPlanDetailsGetDescriptionAttributeTypeOk(arg PlanDetailsGetDescriptionAttributeType) (ret PlanDetailsGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanDetailsGetDescriptionAttributeType(arg *PlanDetailsGetDescriptionAttributeType, val PlanDetailsGetDescriptionRetType) { + *arg = &val +} + +type PlanDetailsGetDescriptionArgType = string +type PlanDetailsGetDescriptionRetType = string + +/* + types and functions for flavorName +*/ + +// isNotNullableString +type PlanDetailsGetFlavorNameAttributeType = *string + +func getPlanDetailsGetFlavorNameAttributeTypeOk(arg PlanDetailsGetFlavorNameAttributeType) (ret PlanDetailsGetFlavorNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanDetailsGetFlavorNameAttributeType(arg *PlanDetailsGetFlavorNameAttributeType, val PlanDetailsGetFlavorNameRetType) { + *arg = &val +} + +type PlanDetailsGetFlavorNameArgType = string +type PlanDetailsGetFlavorNameRetType = string + +/* + types and functions for maxConnections +*/ + +// isInteger +type PlanDetailsGetMaxConnectionsAttributeType = *int64 +type PlanDetailsGetMaxConnectionsArgType = int64 +type PlanDetailsGetMaxConnectionsRetType = int64 + +func getPlanDetailsGetMaxConnectionsAttributeTypeOk(arg PlanDetailsGetMaxConnectionsAttributeType) (ret PlanDetailsGetMaxConnectionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanDetailsGetMaxConnectionsAttributeType(arg *PlanDetailsGetMaxConnectionsAttributeType, val PlanDetailsGetMaxConnectionsRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type PlanDetailsGetNameAttributeType = *string + +func getPlanDetailsGetNameAttributeTypeOk(arg PlanDetailsGetNameAttributeType) (ret PlanDetailsGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanDetailsGetNameAttributeType(arg *PlanDetailsGetNameAttributeType, val PlanDetailsGetNameRetType) { + *arg = &val +} + +type PlanDetailsGetNameArgType = string +type PlanDetailsGetNameRetType = string + +/* + types and functions for planId +*/ + +// isNotNullableString +type PlanDetailsGetPlanIdAttributeType = *string + +func getPlanDetailsGetPlanIdAttributeTypeOk(arg PlanDetailsGetPlanIdAttributeType) (ret PlanDetailsGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPlanDetailsGetPlanIdAttributeType(arg *PlanDetailsGetPlanIdAttributeType, val PlanDetailsGetPlanIdRetType) { + *arg = &val +} + +type PlanDetailsGetPlanIdArgType = string +type PlanDetailsGetPlanIdRetType = string + // PlanDetails struct for PlanDetails type PlanDetails struct { // Description - Description *string `json:"description,omitempty"` + Description PlanDetailsGetDescriptionAttributeType `json:"description,omitempty"` // Flavor Name - FlavorName *string `json:"flavorName,omitempty"` + FlavorName PlanDetailsGetFlavorNameAttributeType `json:"flavorName,omitempty"` // Maximum number of concurrent connections per application load balancer VM instance. - MaxConnections *int64 `json:"maxConnections,omitempty"` + MaxConnections PlanDetailsGetMaxConnectionsAttributeType `json:"maxConnections,omitempty"` // Service Plan Name - Name *string `json:"name,omitempty"` + Name PlanDetailsGetNameAttributeType `json:"name,omitempty"` // Service Plan Identifier - PlanId *string `json:"planId,omitempty"` + PlanId PlanDetailsGetPlanIdAttributeType `json:"planId,omitempty"` } // NewPlanDetails instantiates a new PlanDetails object @@ -49,181 +153,136 @@ func NewPlanDetailsWithDefaults() *PlanDetails { } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *PlanDetails) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - return o.Description +func (o *PlanDetails) GetDescription() (res PlanDetailsGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlanDetails) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true +func (o *PlanDetails) GetDescriptionOk() (ret PlanDetailsGetDescriptionRetType, ok bool) { + return getPlanDetailsGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. func (o *PlanDetails) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false + _, ok := o.GetDescriptionOk() + return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PlanDetails) SetDescription(v *string) { - o.Description = v +func (o *PlanDetails) SetDescription(v PlanDetailsGetDescriptionRetType) { + setPlanDetailsGetDescriptionAttributeType(&o.Description, v) } // GetFlavorName returns the FlavorName field value if set, zero value otherwise. -func (o *PlanDetails) GetFlavorName() *string { - if o == nil || IsNil(o.FlavorName) { - var ret *string - return ret - } - return o.FlavorName +func (o *PlanDetails) GetFlavorName() (res PlanDetailsGetFlavorNameRetType) { + res, _ = o.GetFlavorNameOk() + return } // GetFlavorNameOk returns a tuple with the FlavorName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlanDetails) GetFlavorNameOk() (*string, bool) { - if o == nil || IsNil(o.FlavorName) { - return nil, false - } - return o.FlavorName, true +func (o *PlanDetails) GetFlavorNameOk() (ret PlanDetailsGetFlavorNameRetType, ok bool) { + return getPlanDetailsGetFlavorNameAttributeTypeOk(o.FlavorName) } // HasFlavorName returns a boolean if a field has been set. func (o *PlanDetails) HasFlavorName() bool { - if o != nil && !IsNil(o.FlavorName) { - return true - } - - return false + _, ok := o.GetFlavorNameOk() + return ok } // SetFlavorName gets a reference to the given string and assigns it to the FlavorName field. -func (o *PlanDetails) SetFlavorName(v *string) { - o.FlavorName = v +func (o *PlanDetails) SetFlavorName(v PlanDetailsGetFlavorNameRetType) { + setPlanDetailsGetFlavorNameAttributeType(&o.FlavorName, v) } // GetMaxConnections returns the MaxConnections field value if set, zero value otherwise. -func (o *PlanDetails) GetMaxConnections() *int64 { - if o == nil || IsNil(o.MaxConnections) { - var ret *int64 - return ret - } - return o.MaxConnections +func (o *PlanDetails) GetMaxConnections() (res PlanDetailsGetMaxConnectionsRetType) { + res, _ = o.GetMaxConnectionsOk() + return } // GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlanDetails) GetMaxConnectionsOk() (*int64, bool) { - if o == nil || IsNil(o.MaxConnections) { - return nil, false - } - return o.MaxConnections, true +func (o *PlanDetails) GetMaxConnectionsOk() (ret PlanDetailsGetMaxConnectionsRetType, ok bool) { + return getPlanDetailsGetMaxConnectionsAttributeTypeOk(o.MaxConnections) } // HasMaxConnections returns a boolean if a field has been set. func (o *PlanDetails) HasMaxConnections() bool { - if o != nil && !IsNil(o.MaxConnections) { - return true - } - - return false + _, ok := o.GetMaxConnectionsOk() + return ok } // SetMaxConnections gets a reference to the given int64 and assigns it to the MaxConnections field. -func (o *PlanDetails) SetMaxConnections(v *int64) { - o.MaxConnections = v +func (o *PlanDetails) SetMaxConnections(v PlanDetailsGetMaxConnectionsRetType) { + setPlanDetailsGetMaxConnectionsAttributeType(&o.MaxConnections, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *PlanDetails) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *PlanDetails) GetName() (res PlanDetailsGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlanDetails) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *PlanDetails) GetNameOk() (ret PlanDetailsGetNameRetType, ok bool) { + return getPlanDetailsGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *PlanDetails) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *PlanDetails) SetName(v *string) { - o.Name = v +func (o *PlanDetails) SetName(v PlanDetailsGetNameRetType) { + setPlanDetailsGetNameAttributeType(&o.Name, v) } // GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *PlanDetails) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - return o.PlanId +func (o *PlanDetails) GetPlanId() (res PlanDetailsGetPlanIdRetType) { + 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 *PlanDetails) GetPlanIdOk() (*string, bool) { - if o == nil || IsNil(o.PlanId) { - return nil, false - } - return o.PlanId, true +func (o *PlanDetails) GetPlanIdOk() (ret PlanDetailsGetPlanIdRetType, ok bool) { + return getPlanDetailsGetPlanIdAttributeTypeOk(o.PlanId) } // HasPlanId returns a boolean if a field has been set. func (o *PlanDetails) 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 *PlanDetails) SetPlanId(v *string) { - o.PlanId = v +func (o *PlanDetails) SetPlanId(v PlanDetailsGetPlanIdRetType) { + setPlanDetailsGetPlanIdAttributeType(&o.PlanId, v) } func (o PlanDetails) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Description) { - toSerialize["description"] = o.Description + if val, ok := getPlanDetailsGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val } - if !IsNil(o.FlavorName) { - toSerialize["flavorName"] = o.FlavorName + if val, ok := getPlanDetailsGetFlavorNameAttributeTypeOk(o.FlavorName); ok { + toSerialize["FlavorName"] = val } - if !IsNil(o.MaxConnections) { - toSerialize["maxConnections"] = o.MaxConnections + if val, ok := getPlanDetailsGetMaxConnectionsAttributeTypeOk(o.MaxConnections); ok { + toSerialize["MaxConnections"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getPlanDetailsGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.PlanId) { - toSerialize["planId"] = o.PlanId + if val, ok := getPlanDetailsGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_protocol_options_https.go b/services/lbapplication/model_protocol_options_https.go index dc841d519..8fa733e81 100644 --- a/services/lbapplication/model_protocol_options_https.go +++ b/services/lbapplication/model_protocol_options_https.go @@ -17,9 +17,29 @@ import ( // checks if the ProtocolOptionsHTTPS type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ProtocolOptionsHTTPS{} +/* + types and functions for certificateConfig +*/ + +// isModel +type ProtocolOptionsHTTPSGetCertificateConfigAttributeType = *CertificateConfig +type ProtocolOptionsHTTPSGetCertificateConfigArgType = CertificateConfig +type ProtocolOptionsHTTPSGetCertificateConfigRetType = CertificateConfig + +func getProtocolOptionsHTTPSGetCertificateConfigAttributeTypeOk(arg ProtocolOptionsHTTPSGetCertificateConfigAttributeType) (ret ProtocolOptionsHTTPSGetCertificateConfigRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setProtocolOptionsHTTPSGetCertificateConfigAttributeType(arg *ProtocolOptionsHTTPSGetCertificateConfigAttributeType, val ProtocolOptionsHTTPSGetCertificateConfigRetType) { + *arg = &val +} + // ProtocolOptionsHTTPS struct for ProtocolOptionsHTTPS type ProtocolOptionsHTTPS struct { - CertificateConfig *CertificateConfig `json:"certificateConfig,omitempty"` + CertificateConfig ProtocolOptionsHTTPSGetCertificateConfigAttributeType `json:"certificateConfig,omitempty"` } // NewProtocolOptionsHTTPS instantiates a new ProtocolOptionsHTTPS object @@ -40,41 +60,32 @@ func NewProtocolOptionsHTTPSWithDefaults() *ProtocolOptionsHTTPS { } // GetCertificateConfig returns the CertificateConfig field value if set, zero value otherwise. -func (o *ProtocolOptionsHTTPS) GetCertificateConfig() *CertificateConfig { - if o == nil || IsNil(o.CertificateConfig) { - var ret *CertificateConfig - return ret - } - return o.CertificateConfig +func (o *ProtocolOptionsHTTPS) GetCertificateConfig() (res ProtocolOptionsHTTPSGetCertificateConfigRetType) { + res, _ = o.GetCertificateConfigOk() + return } // GetCertificateConfigOk returns a tuple with the CertificateConfig field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ProtocolOptionsHTTPS) GetCertificateConfigOk() (*CertificateConfig, bool) { - if o == nil || IsNil(o.CertificateConfig) { - return nil, false - } - return o.CertificateConfig, true +func (o *ProtocolOptionsHTTPS) GetCertificateConfigOk() (ret ProtocolOptionsHTTPSGetCertificateConfigRetType, ok bool) { + return getProtocolOptionsHTTPSGetCertificateConfigAttributeTypeOk(o.CertificateConfig) } // HasCertificateConfig returns a boolean if a field has been set. func (o *ProtocolOptionsHTTPS) HasCertificateConfig() bool { - if o != nil && !IsNil(o.CertificateConfig) { - return true - } - - return false + _, ok := o.GetCertificateConfigOk() + return ok } // SetCertificateConfig gets a reference to the given CertificateConfig and assigns it to the CertificateConfig field. -func (o *ProtocolOptionsHTTPS) SetCertificateConfig(v *CertificateConfig) { - o.CertificateConfig = v +func (o *ProtocolOptionsHTTPS) SetCertificateConfig(v ProtocolOptionsHTTPSGetCertificateConfigRetType) { + setProtocolOptionsHTTPSGetCertificateConfigAttributeType(&o.CertificateConfig, v) } func (o ProtocolOptionsHTTPS) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CertificateConfig) { - toSerialize["certificateConfig"] = o.CertificateConfig + if val, ok := getProtocolOptionsHTTPSGetCertificateConfigAttributeTypeOk(o.CertificateConfig); ok { + toSerialize["CertificateConfig"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_query_parameters.go b/services/lbapplication/model_query_parameters.go index 69db2ed5d..fcb915944 100644 --- a/services/lbapplication/model_query_parameters.go +++ b/services/lbapplication/model_query_parameters.go @@ -17,12 +17,54 @@ import ( // checks if the QueryParameters type satisfies the MappedNullable interface at compile time var _ MappedNullable = &QueryParameters{} +/* + types and functions for exactMatch +*/ + +// isNotNullableString +type QueryParametersGetExactMatchAttributeType = *string + +func getQueryParametersGetExactMatchAttributeTypeOk(arg QueryParametersGetExactMatchAttributeType) (ret QueryParametersGetExactMatchRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQueryParametersGetExactMatchAttributeType(arg *QueryParametersGetExactMatchAttributeType, val QueryParametersGetExactMatchRetType) { + *arg = &val +} + +type QueryParametersGetExactMatchArgType = string +type QueryParametersGetExactMatchRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type QueryParametersGetNameAttributeType = *string + +func getQueryParametersGetNameAttributeTypeOk(arg QueryParametersGetNameAttributeType) (ret QueryParametersGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setQueryParametersGetNameAttributeType(arg *QueryParametersGetNameAttributeType, val QueryParametersGetNameRetType) { + *arg = &val +} + +type QueryParametersGetNameArgType = string +type QueryParametersGetNameRetType = string + // QueryParameters struct for QueryParameters type QueryParameters struct { // Exact match for the parameter value - ExactMatch *string `json:"exactMatch,omitempty"` + ExactMatch QueryParametersGetExactMatchAttributeType `json:"exactMatch,omitempty"` // Parameter name - Name *string `json:"name,omitempty"` + Name QueryParametersGetNameAttributeType `json:"name,omitempty"` } // NewQueryParameters instantiates a new QueryParameters object @@ -43,76 +85,58 @@ func NewQueryParametersWithDefaults() *QueryParameters { } // GetExactMatch returns the ExactMatch field value if set, zero value otherwise. -func (o *QueryParameters) GetExactMatch() *string { - if o == nil || IsNil(o.ExactMatch) { - var ret *string - return ret - } - return o.ExactMatch +func (o *QueryParameters) GetExactMatch() (res QueryParametersGetExactMatchRetType) { + res, _ = o.GetExactMatchOk() + return } // GetExactMatchOk returns a tuple with the ExactMatch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *QueryParameters) GetExactMatchOk() (*string, bool) { - if o == nil || IsNil(o.ExactMatch) { - return nil, false - } - return o.ExactMatch, true +func (o *QueryParameters) GetExactMatchOk() (ret QueryParametersGetExactMatchRetType, ok bool) { + return getQueryParametersGetExactMatchAttributeTypeOk(o.ExactMatch) } // HasExactMatch returns a boolean if a field has been set. func (o *QueryParameters) HasExactMatch() bool { - if o != nil && !IsNil(o.ExactMatch) { - return true - } - - return false + _, ok := o.GetExactMatchOk() + return ok } // SetExactMatch gets a reference to the given string and assigns it to the ExactMatch field. -func (o *QueryParameters) SetExactMatch(v *string) { - o.ExactMatch = v +func (o *QueryParameters) SetExactMatch(v QueryParametersGetExactMatchRetType) { + setQueryParametersGetExactMatchAttributeType(&o.ExactMatch, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *QueryParameters) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *QueryParameters) GetName() (res QueryParametersGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *QueryParameters) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *QueryParameters) GetNameOk() (ret QueryParametersGetNameRetType, ok bool) { + return getQueryParametersGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *QueryParameters) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *QueryParameters) SetName(v *string) { - o.Name = v +func (o *QueryParameters) SetName(v QueryParametersGetNameRetType) { + setQueryParametersGetNameAttributeType(&o.Name, v) } func (o QueryParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ExactMatch) { - toSerialize["exactMatch"] = o.ExactMatch + if val, ok := getQueryParametersGetExactMatchAttributeTypeOk(o.ExactMatch); ok { + toSerialize["ExactMatch"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getQueryParametersGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_rule.go b/services/lbapplication/model_rule.go index b0237c17e..f45d20b8e 100644 --- a/services/lbapplication/model_rule.go +++ b/services/lbapplication/model_rule.go @@ -17,11 +17,52 @@ import ( // checks if the Rule type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Rule{} +/* + types and functions for host +*/ + +// isNotNullableString +type RuleGetHostAttributeType = *string + +func getRuleGetHostAttributeTypeOk(arg RuleGetHostAttributeType) (ret RuleGetHostRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRuleGetHostAttributeType(arg *RuleGetHostAttributeType, val RuleGetHostRetType) { + *arg = &val +} + +type RuleGetHostArgType = string +type RuleGetHostRetType = string + +/* + types and functions for http +*/ + +// isModel +type RuleGetHttpAttributeType = *HTTPConfig +type RuleGetHttpArgType = HTTPConfig +type RuleGetHttpRetType = HTTPConfig + +func getRuleGetHttpAttributeTypeOk(arg RuleGetHttpAttributeType) (ret RuleGetHttpRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRuleGetHttpAttributeType(arg *RuleGetHttpAttributeType, val RuleGetHttpRetType) { + *arg = &val +} + // Rule struct for Rule type Rule struct { // Host for the rule - Host *string `json:"host,omitempty"` - Http *HTTPConfig `json:"http,omitempty"` + Host RuleGetHostAttributeType `json:"host,omitempty"` + Http RuleGetHttpAttributeType `json:"http,omitempty"` } // NewRule instantiates a new Rule object @@ -42,76 +83,58 @@ func NewRuleWithDefaults() *Rule { } // GetHost returns the Host field value if set, zero value otherwise. -func (o *Rule) GetHost() *string { - if o == nil || IsNil(o.Host) { - var ret *string - return ret - } - return o.Host +func (o *Rule) GetHost() (res RuleGetHostRetType) { + res, _ = o.GetHostOk() + return } // GetHostOk returns a tuple with the Host field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Rule) GetHostOk() (*string, bool) { - if o == nil || IsNil(o.Host) { - return nil, false - } - return o.Host, true +func (o *Rule) GetHostOk() (ret RuleGetHostRetType, ok bool) { + return getRuleGetHostAttributeTypeOk(o.Host) } // HasHost returns a boolean if a field has been set. func (o *Rule) HasHost() bool { - if o != nil && !IsNil(o.Host) { - return true - } - - return false + _, ok := o.GetHostOk() + return ok } // SetHost gets a reference to the given string and assigns it to the Host field. -func (o *Rule) SetHost(v *string) { - o.Host = v +func (o *Rule) SetHost(v RuleGetHostRetType) { + setRuleGetHostAttributeType(&o.Host, v) } // GetHttp returns the Http field value if set, zero value otherwise. -func (o *Rule) GetHttp() *HTTPConfig { - if o == nil || IsNil(o.Http) { - var ret *HTTPConfig - return ret - } - return o.Http +func (o *Rule) GetHttp() (res RuleGetHttpRetType) { + res, _ = o.GetHttpOk() + return } // GetHttpOk returns a tuple with the Http field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Rule) GetHttpOk() (*HTTPConfig, bool) { - if o == nil || IsNil(o.Http) { - return nil, false - } - return o.Http, true +func (o *Rule) GetHttpOk() (ret RuleGetHttpRetType, ok bool) { + return getRuleGetHttpAttributeTypeOk(o.Http) } // HasHttp returns a boolean if a field has been set. func (o *Rule) HasHttp() bool { - if o != nil && !IsNil(o.Http) { - return true - } - - return false + _, ok := o.GetHttpOk() + return ok } // SetHttp gets a reference to the given HTTPConfig and assigns it to the Http field. -func (o *Rule) SetHttp(v *HTTPConfig) { - o.Http = v +func (o *Rule) SetHttp(v RuleGetHttpRetType) { + setRuleGetHttpAttributeType(&o.Http, v) } func (o Rule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Host) { - toSerialize["host"] = o.Host + if val, ok := getRuleGetHostAttributeTypeOk(o.Host); ok { + toSerialize["Host"] = val } - if !IsNil(o.Http) { - toSerialize["http"] = o.Http + if val, ok := getRuleGetHttpAttributeTypeOk(o.Http); ok { + toSerialize["Http"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_status.go b/services/lbapplication/model_status.go index ea546534f..34384841c 100644 --- a/services/lbapplication/model_status.go +++ b/services/lbapplication/model_status.go @@ -17,15 +17,76 @@ import ( // checks if the Status type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Status{} +/* + types and functions for code +*/ + +// isInteger +type StatusGetCodeAttributeType = *int64 +type StatusGetCodeArgType = int64 +type StatusGetCodeRetType = int64 + +func getStatusGetCodeAttributeTypeOk(arg StatusGetCodeAttributeType) (ret StatusGetCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setStatusGetCodeAttributeType(arg *StatusGetCodeAttributeType, val StatusGetCodeRetType) { + *arg = &val +} + +/* + types and functions for details +*/ + +// isArray +type StatusGetDetailsAttributeType = *[]GoogleProtobufAny +type StatusGetDetailsArgType = []GoogleProtobufAny +type StatusGetDetailsRetType = []GoogleProtobufAny + +func getStatusGetDetailsAttributeTypeOk(arg StatusGetDetailsAttributeType) (ret StatusGetDetailsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setStatusGetDetailsAttributeType(arg *StatusGetDetailsAttributeType, val StatusGetDetailsRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type StatusGetMessageAttributeType = *string + +func getStatusGetMessageAttributeTypeOk(arg StatusGetMessageAttributeType) (ret StatusGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setStatusGetMessageAttributeType(arg *StatusGetMessageAttributeType, val StatusGetMessageRetType) { + *arg = &val +} + +type StatusGetMessageArgType = string +type StatusGetMessageRetType = string + // Status The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). type Status struct { // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. // Can be cast to int32 without loss of precision. - Code *int64 `json:"code,omitempty"` + Code StatusGetCodeAttributeType `json:"code,omitempty"` // A list of messages that carry the error details. There is a common set of message types for APIs to use. - Details *[]GoogleProtobufAny `json:"details,omitempty"` + Details StatusGetDetailsAttributeType `json:"details,omitempty"` // A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - Message *string `json:"message,omitempty"` + Message StatusGetMessageAttributeType `json:"message,omitempty"` } // NewStatus instantiates a new Status object @@ -46,111 +107,84 @@ func NewStatusWithDefaults() *Status { } // GetCode returns the Code field value if set, zero value otherwise. -func (o *Status) GetCode() *int64 { - if o == nil || IsNil(o.Code) { - var ret *int64 - return ret - } - return o.Code +func (o *Status) GetCode() (res StatusGetCodeRetType) { + res, _ = o.GetCodeOk() + return } // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Status) GetCodeOk() (*int64, bool) { - if o == nil || IsNil(o.Code) { - return nil, false - } - return o.Code, true +func (o *Status) GetCodeOk() (ret StatusGetCodeRetType, ok bool) { + return getStatusGetCodeAttributeTypeOk(o.Code) } // HasCode returns a boolean if a field has been set. func (o *Status) HasCode() bool { - if o != nil && !IsNil(o.Code) { - return true - } - - return false + _, ok := o.GetCodeOk() + return ok } // SetCode gets a reference to the given int64 and assigns it to the Code field. -func (o *Status) SetCode(v *int64) { - o.Code = v +func (o *Status) SetCode(v StatusGetCodeRetType) { + setStatusGetCodeAttributeType(&o.Code, v) } // GetDetails returns the Details field value if set, zero value otherwise. -func (o *Status) GetDetails() *[]GoogleProtobufAny { - if o == nil || IsNil(o.Details) { - var ret *[]GoogleProtobufAny - return ret - } - return o.Details +func (o *Status) GetDetails() (res StatusGetDetailsRetType) { + res, _ = o.GetDetailsOk() + return } // GetDetailsOk returns a tuple with the Details field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Status) GetDetailsOk() (*[]GoogleProtobufAny, bool) { - if o == nil || IsNil(o.Details) { - return nil, false - } - return o.Details, true +func (o *Status) GetDetailsOk() (ret StatusGetDetailsRetType, ok bool) { + return getStatusGetDetailsAttributeTypeOk(o.Details) } // HasDetails returns a boolean if a field has been set. func (o *Status) HasDetails() bool { - if o != nil && !IsNil(o.Details) { - return true - } - - return false + _, ok := o.GetDetailsOk() + return ok } // SetDetails gets a reference to the given []GoogleProtobufAny and assigns it to the Details field. -func (o *Status) SetDetails(v *[]GoogleProtobufAny) { - o.Details = v +func (o *Status) SetDetails(v StatusGetDetailsRetType) { + setStatusGetDetailsAttributeType(&o.Details, v) } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *Status) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *Status) GetMessage() (res StatusGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Status) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *Status) GetMessageOk() (ret StatusGetMessageRetType, ok bool) { + return getStatusGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *Status) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *Status) SetMessage(v *string) { - o.Message = v +func (o *Status) SetMessage(v StatusGetMessageRetType) { + setStatusGetMessageAttributeType(&o.Message, v) } func (o Status) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Code) { - toSerialize["code"] = o.Code + if val, ok := getStatusGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val } - if !IsNil(o.Details) { - toSerialize["details"] = o.Details + if val, ok := getStatusGetDetailsAttributeTypeOk(o.Details); ok { + toSerialize["Details"] = val } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getStatusGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_target.go b/services/lbapplication/model_target.go index 5b331e368..bc5cedc3e 100644 --- a/services/lbapplication/model_target.go +++ b/services/lbapplication/model_target.go @@ -17,12 +17,54 @@ import ( // checks if the Target type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Target{} +/* + types and functions for displayName +*/ + +// isNotNullableString +type TargetGetDisplayNameAttributeType = *string + +func getTargetGetDisplayNameAttributeTypeOk(arg TargetGetDisplayNameAttributeType) (ret TargetGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setTargetGetDisplayNameAttributeType(arg *TargetGetDisplayNameAttributeType, val TargetGetDisplayNameRetType) { + *arg = &val +} + +type TargetGetDisplayNameArgType = string +type TargetGetDisplayNameRetType = string + +/* + types and functions for ip +*/ + +// isNotNullableString +type TargetGetIpAttributeType = *string + +func getTargetGetIpAttributeTypeOk(arg TargetGetIpAttributeType) (ret TargetGetIpRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setTargetGetIpAttributeType(arg *TargetGetIpAttributeType, val TargetGetIpRetType) { + *arg = &val +} + +type TargetGetIpArgType = string +type TargetGetIpRetType = string + // Target struct for Target type Target struct { // Target name - DisplayName *string `json:"displayName,omitempty"` + DisplayName TargetGetDisplayNameAttributeType `json:"displayName,omitempty"` // Target IP. Must by unique within a target pool. - Ip *string `json:"ip,omitempty"` + Ip TargetGetIpAttributeType `json:"ip,omitempty"` } // NewTarget instantiates a new Target object @@ -43,76 +85,58 @@ func NewTargetWithDefaults() *Target { } // GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *Target) GetDisplayName() *string { - if o == nil || IsNil(o.DisplayName) { - var ret *string - return ret - } - return o.DisplayName +func (o *Target) GetDisplayName() (res TargetGetDisplayNameRetType) { + res, _ = o.GetDisplayNameOk() + return } // GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Target) GetDisplayNameOk() (*string, bool) { - if o == nil || IsNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true +func (o *Target) GetDisplayNameOk() (ret TargetGetDisplayNameRetType, ok bool) { + return getTargetGetDisplayNameAttributeTypeOk(o.DisplayName) } // HasDisplayName returns a boolean if a field has been set. func (o *Target) HasDisplayName() bool { - if o != nil && !IsNil(o.DisplayName) { - return true - } - - return false + _, ok := o.GetDisplayNameOk() + return ok } // SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *Target) SetDisplayName(v *string) { - o.DisplayName = v +func (o *Target) SetDisplayName(v TargetGetDisplayNameRetType) { + setTargetGetDisplayNameAttributeType(&o.DisplayName, v) } // GetIp returns the Ip field value if set, zero value otherwise. -func (o *Target) GetIp() *string { - if o == nil || IsNil(o.Ip) { - var ret *string - return ret - } - return o.Ip +func (o *Target) GetIp() (res TargetGetIpRetType) { + res, _ = o.GetIpOk() + return } // GetIpOk returns a tuple with the Ip field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Target) GetIpOk() (*string, bool) { - if o == nil || IsNil(o.Ip) { - return nil, false - } - return o.Ip, true +func (o *Target) GetIpOk() (ret TargetGetIpRetType, ok bool) { + return getTargetGetIpAttributeTypeOk(o.Ip) } // HasIp returns a boolean if a field has been set. func (o *Target) HasIp() bool { - if o != nil && !IsNil(o.Ip) { - return true - } - - return false + _, ok := o.GetIpOk() + return ok } // SetIp gets a reference to the given string and assigns it to the Ip field. -func (o *Target) SetIp(v *string) { - o.Ip = v +func (o *Target) SetIp(v TargetGetIpRetType) { + setTargetGetIpAttributeType(&o.Ip, v) } func (o Target) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.DisplayName) { - toSerialize["displayName"] = o.DisplayName + if val, ok := getTargetGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val } - if !IsNil(o.Ip) { - toSerialize["ip"] = o.Ip + if val, ok := getTargetGetIpAttributeTypeOk(o.Ip); ok { + toSerialize["Ip"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_target_pool.go b/services/lbapplication/model_target_pool.go index 26ec61d20..296d73caf 100644 --- a/services/lbapplication/model_target_pool.go +++ b/services/lbapplication/model_target_pool.go @@ -17,15 +17,96 @@ import ( // checks if the TargetPool type satisfies the MappedNullable interface at compile time var _ MappedNullable = &TargetPool{} +/* + types and functions for activeHealthCheck +*/ + +// isModel +type TargetPoolGetActiveHealthCheckAttributeType = *ActiveHealthCheck +type TargetPoolGetActiveHealthCheckArgType = ActiveHealthCheck +type TargetPoolGetActiveHealthCheckRetType = ActiveHealthCheck + +func getTargetPoolGetActiveHealthCheckAttributeTypeOk(arg TargetPoolGetActiveHealthCheckAttributeType) (ret TargetPoolGetActiveHealthCheckRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setTargetPoolGetActiveHealthCheckAttributeType(arg *TargetPoolGetActiveHealthCheckAttributeType, val TargetPoolGetActiveHealthCheckRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type TargetPoolGetNameAttributeType = *string + +func getTargetPoolGetNameAttributeTypeOk(arg TargetPoolGetNameAttributeType) (ret TargetPoolGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setTargetPoolGetNameAttributeType(arg *TargetPoolGetNameAttributeType, val TargetPoolGetNameRetType) { + *arg = &val +} + +type TargetPoolGetNameArgType = string +type TargetPoolGetNameRetType = string + +/* + types and functions for targetPort +*/ + +// isInteger +type TargetPoolGetTargetPortAttributeType = *int64 +type TargetPoolGetTargetPortArgType = int64 +type TargetPoolGetTargetPortRetType = int64 + +func getTargetPoolGetTargetPortAttributeTypeOk(arg TargetPoolGetTargetPortAttributeType) (ret TargetPoolGetTargetPortRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setTargetPoolGetTargetPortAttributeType(arg *TargetPoolGetTargetPortAttributeType, val TargetPoolGetTargetPortRetType) { + *arg = &val +} + +/* + types and functions for targets +*/ + +// isArray +type TargetPoolGetTargetsAttributeType = *[]Target +type TargetPoolGetTargetsArgType = []Target +type TargetPoolGetTargetsRetType = []Target + +func getTargetPoolGetTargetsAttributeTypeOk(arg TargetPoolGetTargetsAttributeType) (ret TargetPoolGetTargetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setTargetPoolGetTargetsAttributeType(arg *TargetPoolGetTargetsAttributeType, val TargetPoolGetTargetsRetType) { + *arg = &val +} + // TargetPool struct for TargetPool type TargetPool struct { - ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"` + ActiveHealthCheck TargetPoolGetActiveHealthCheckAttributeType `json:"activeHealthCheck,omitempty"` // Target pool name - Name *string `json:"name,omitempty"` + Name TargetPoolGetNameAttributeType `json:"name,omitempty"` // The number identifying the port where each target listens for traffic. - TargetPort *int64 `json:"targetPort,omitempty"` + TargetPort TargetPoolGetTargetPortAttributeType `json:"targetPort,omitempty"` // List of all targets which will be used in the pool. Limited to 250. - Targets *[]Target `json:"targets,omitempty"` + Targets TargetPoolGetTargetsAttributeType `json:"targets,omitempty"` } // NewTargetPool instantiates a new TargetPool object @@ -46,146 +127,110 @@ func NewTargetPoolWithDefaults() *TargetPool { } // GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. -func (o *TargetPool) GetActiveHealthCheck() *ActiveHealthCheck { - if o == nil || IsNil(o.ActiveHealthCheck) { - var ret *ActiveHealthCheck - return ret - } - return o.ActiveHealthCheck +func (o *TargetPool) GetActiveHealthCheck() (res TargetPoolGetActiveHealthCheckRetType) { + res, _ = o.GetActiveHealthCheckOk() + return } // GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TargetPool) GetActiveHealthCheckOk() (*ActiveHealthCheck, bool) { - if o == nil || IsNil(o.ActiveHealthCheck) { - return nil, false - } - return o.ActiveHealthCheck, true +func (o *TargetPool) GetActiveHealthCheckOk() (ret TargetPoolGetActiveHealthCheckRetType, ok bool) { + return getTargetPoolGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck) } // HasActiveHealthCheck returns a boolean if a field has been set. func (o *TargetPool) HasActiveHealthCheck() bool { - if o != nil && !IsNil(o.ActiveHealthCheck) { - return true - } - - return false + _, ok := o.GetActiveHealthCheckOk() + return ok } // SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. -func (o *TargetPool) SetActiveHealthCheck(v *ActiveHealthCheck) { - o.ActiveHealthCheck = v +func (o *TargetPool) SetActiveHealthCheck(v TargetPoolGetActiveHealthCheckRetType) { + setTargetPoolGetActiveHealthCheckAttributeType(&o.ActiveHealthCheck, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *TargetPool) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *TargetPool) GetName() (res TargetPoolGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TargetPool) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *TargetPool) GetNameOk() (ret TargetPoolGetNameRetType, ok bool) { + return getTargetPoolGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *TargetPool) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *TargetPool) SetName(v *string) { - o.Name = v +func (o *TargetPool) SetName(v TargetPoolGetNameRetType) { + setTargetPoolGetNameAttributeType(&o.Name, v) } // GetTargetPort returns the TargetPort field value if set, zero value otherwise. -func (o *TargetPool) GetTargetPort() *int64 { - if o == nil || IsNil(o.TargetPort) { - var ret *int64 - return ret - } - return o.TargetPort +func (o *TargetPool) GetTargetPort() (res TargetPoolGetTargetPortRetType) { + res, _ = o.GetTargetPortOk() + return } // GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TargetPool) GetTargetPortOk() (*int64, bool) { - if o == nil || IsNil(o.TargetPort) { - return nil, false - } - return o.TargetPort, true +func (o *TargetPool) GetTargetPortOk() (ret TargetPoolGetTargetPortRetType, ok bool) { + return getTargetPoolGetTargetPortAttributeTypeOk(o.TargetPort) } // HasTargetPort returns a boolean if a field has been set. func (o *TargetPool) HasTargetPort() bool { - if o != nil && !IsNil(o.TargetPort) { - return true - } - - return false + _, ok := o.GetTargetPortOk() + return ok } // SetTargetPort gets a reference to the given int64 and assigns it to the TargetPort field. -func (o *TargetPool) SetTargetPort(v *int64) { - o.TargetPort = v +func (o *TargetPool) SetTargetPort(v TargetPoolGetTargetPortRetType) { + setTargetPoolGetTargetPortAttributeType(&o.TargetPort, v) } // GetTargets returns the Targets field value if set, zero value otherwise. -func (o *TargetPool) GetTargets() *[]Target { - if o == nil || IsNil(o.Targets) { - var ret *[]Target - return ret - } - return o.Targets +func (o *TargetPool) GetTargets() (res TargetPoolGetTargetsRetType) { + res, _ = o.GetTargetsOk() + return } // GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TargetPool) GetTargetsOk() (*[]Target, bool) { - if o == nil || IsNil(o.Targets) { - return nil, false - } - return o.Targets, true +func (o *TargetPool) GetTargetsOk() (ret TargetPoolGetTargetsRetType, ok bool) { + return getTargetPoolGetTargetsAttributeTypeOk(o.Targets) } // HasTargets returns a boolean if a field has been set. func (o *TargetPool) HasTargets() bool { - if o != nil && !IsNil(o.Targets) { - return true - } - - return false + _, ok := o.GetTargetsOk() + return ok } // SetTargets gets a reference to the given []Target and assigns it to the Targets field. -func (o *TargetPool) SetTargets(v *[]Target) { - o.Targets = v +func (o *TargetPool) SetTargets(v TargetPoolGetTargetsRetType) { + setTargetPoolGetTargetsAttributeType(&o.Targets, v) } func (o TargetPool) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ActiveHealthCheck) { - toSerialize["activeHealthCheck"] = o.ActiveHealthCheck + if val, ok := getTargetPoolGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck); ok { + toSerialize["ActiveHealthCheck"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getTargetPoolGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.TargetPort) { - toSerialize["targetPort"] = o.TargetPort + if val, ok := getTargetPoolGetTargetPortAttributeTypeOk(o.TargetPort); ok { + toSerialize["TargetPort"] = val } - if !IsNil(o.Targets) { - toSerialize["targets"] = o.Targets + if val, ok := getTargetPoolGetTargetsAttributeTypeOk(o.Targets); ok { + toSerialize["Targets"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_update_credentials_payload.go b/services/lbapplication/model_update_credentials_payload.go index 1b209fb71..df63904a0 100644 --- a/services/lbapplication/model_update_credentials_payload.go +++ b/services/lbapplication/model_update_credentials_payload.go @@ -17,14 +17,77 @@ import ( // checks if the UpdateCredentialsPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateCredentialsPayload{} +/* + types and functions for displayName +*/ + +// isNotNullableString +type UpdateCredentialsPayloadGetDisplayNameAttributeType = *string + +func getUpdateCredentialsPayloadGetDisplayNameAttributeTypeOk(arg UpdateCredentialsPayloadGetDisplayNameAttributeType) (ret UpdateCredentialsPayloadGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateCredentialsPayloadGetDisplayNameAttributeType(arg *UpdateCredentialsPayloadGetDisplayNameAttributeType, val UpdateCredentialsPayloadGetDisplayNameRetType) { + *arg = &val +} + +type UpdateCredentialsPayloadGetDisplayNameArgType = string +type UpdateCredentialsPayloadGetDisplayNameRetType = string + +/* + types and functions for password +*/ + +// isNotNullableString +type UpdateCredentialsPayloadGetPasswordAttributeType = *string + +func getUpdateCredentialsPayloadGetPasswordAttributeTypeOk(arg UpdateCredentialsPayloadGetPasswordAttributeType) (ret UpdateCredentialsPayloadGetPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateCredentialsPayloadGetPasswordAttributeType(arg *UpdateCredentialsPayloadGetPasswordAttributeType, val UpdateCredentialsPayloadGetPasswordRetType) { + *arg = &val +} + +type UpdateCredentialsPayloadGetPasswordArgType = string +type UpdateCredentialsPayloadGetPasswordRetType = string + +/* + types and functions for username +*/ + +// isNotNullableString +type UpdateCredentialsPayloadGetUsernameAttributeType = *string + +func getUpdateCredentialsPayloadGetUsernameAttributeTypeOk(arg UpdateCredentialsPayloadGetUsernameAttributeType) (ret UpdateCredentialsPayloadGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateCredentialsPayloadGetUsernameAttributeType(arg *UpdateCredentialsPayloadGetUsernameAttributeType, val UpdateCredentialsPayloadGetUsernameRetType) { + *arg = &val +} + +type UpdateCredentialsPayloadGetUsernameArgType = string +type UpdateCredentialsPayloadGetUsernameRetType = string + // UpdateCredentialsPayload struct for UpdateCredentialsPayload type UpdateCredentialsPayload struct { // Credential name - DisplayName *string `json:"displayName,omitempty"` + DisplayName UpdateCredentialsPayloadGetDisplayNameAttributeType `json:"displayName,omitempty"` // A valid password used for an existing ARGUS instance, which is used during basic auth. - Password *string `json:"password,omitempty"` + Password UpdateCredentialsPayloadGetPasswordAttributeType `json:"password,omitempty"` // A valid username used for an existing ARGUS instance, which is used during basic auth. - Username *string `json:"username,omitempty"` + Username UpdateCredentialsPayloadGetUsernameAttributeType `json:"username,omitempty"` } // NewUpdateCredentialsPayload instantiates a new UpdateCredentialsPayload object @@ -45,111 +108,84 @@ func NewUpdateCredentialsPayloadWithDefaults() *UpdateCredentialsPayload { } // GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *UpdateCredentialsPayload) GetDisplayName() *string { - if o == nil || IsNil(o.DisplayName) { - var ret *string - return ret - } - return o.DisplayName +func (o *UpdateCredentialsPayload) GetDisplayName() (res UpdateCredentialsPayloadGetDisplayNameRetType) { + res, _ = o.GetDisplayNameOk() + return } // GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateCredentialsPayload) GetDisplayNameOk() (*string, bool) { - if o == nil || IsNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true +func (o *UpdateCredentialsPayload) GetDisplayNameOk() (ret UpdateCredentialsPayloadGetDisplayNameRetType, ok bool) { + return getUpdateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName) } // HasDisplayName returns a boolean if a field has been set. func (o *UpdateCredentialsPayload) HasDisplayName() bool { - if o != nil && !IsNil(o.DisplayName) { - return true - } - - return false + _, ok := o.GetDisplayNameOk() + return ok } // SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *UpdateCredentialsPayload) SetDisplayName(v *string) { - o.DisplayName = v +func (o *UpdateCredentialsPayload) SetDisplayName(v UpdateCredentialsPayloadGetDisplayNameRetType) { + setUpdateCredentialsPayloadGetDisplayNameAttributeType(&o.DisplayName, v) } // GetPassword returns the Password field value if set, zero value otherwise. -func (o *UpdateCredentialsPayload) GetPassword() *string { - if o == nil || IsNil(o.Password) { - var ret *string - return ret - } - return o.Password +func (o *UpdateCredentialsPayload) GetPassword() (res UpdateCredentialsPayloadGetPasswordRetType) { + res, _ = o.GetPasswordOk() + return } // GetPasswordOk returns a tuple with the Password field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateCredentialsPayload) GetPasswordOk() (*string, bool) { - if o == nil || IsNil(o.Password) { - return nil, false - } - return o.Password, true +func (o *UpdateCredentialsPayload) GetPasswordOk() (ret UpdateCredentialsPayloadGetPasswordRetType, ok bool) { + return getUpdateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password) } // HasPassword returns a boolean if a field has been set. func (o *UpdateCredentialsPayload) HasPassword() bool { - if o != nil && !IsNil(o.Password) { - return true - } - - return false + _, ok := o.GetPasswordOk() + return ok } // SetPassword gets a reference to the given string and assigns it to the Password field. -func (o *UpdateCredentialsPayload) SetPassword(v *string) { - o.Password = v +func (o *UpdateCredentialsPayload) SetPassword(v UpdateCredentialsPayloadGetPasswordRetType) { + setUpdateCredentialsPayloadGetPasswordAttributeType(&o.Password, v) } // GetUsername returns the Username field value if set, zero value otherwise. -func (o *UpdateCredentialsPayload) GetUsername() *string { - if o == nil || IsNil(o.Username) { - var ret *string - return ret - } - return o.Username +func (o *UpdateCredentialsPayload) GetUsername() (res UpdateCredentialsPayloadGetUsernameRetType) { + res, _ = o.GetUsernameOk() + return } // GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateCredentialsPayload) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true +func (o *UpdateCredentialsPayload) GetUsernameOk() (ret UpdateCredentialsPayloadGetUsernameRetType, ok bool) { + return getUpdateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username) } // HasUsername returns a boolean if a field has been set. func (o *UpdateCredentialsPayload) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false + _, ok := o.GetUsernameOk() + return ok } // SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *UpdateCredentialsPayload) SetUsername(v *string) { - o.Username = v +func (o *UpdateCredentialsPayload) SetUsername(v UpdateCredentialsPayloadGetUsernameRetType) { + setUpdateCredentialsPayloadGetUsernameAttributeType(&o.Username, v) } func (o UpdateCredentialsPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.DisplayName) { - toSerialize["displayName"] = o.DisplayName + if val, ok := getUpdateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val } - if !IsNil(o.Password) { - toSerialize["password"] = o.Password + if val, ok := getUpdateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password); ok { + toSerialize["Password"] = val } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username + if val, ok := getUpdateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_update_credentials_response.go b/services/lbapplication/model_update_credentials_response.go index 835802ab3..871796f42 100644 --- a/services/lbapplication/model_update_credentials_response.go +++ b/services/lbapplication/model_update_credentials_response.go @@ -17,9 +17,29 @@ import ( // checks if the UpdateCredentialsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateCredentialsResponse{} +/* + types and functions for credential +*/ + +// isModel +type UpdateCredentialsResponseGetCredentialAttributeType = *CredentialsResponse +type UpdateCredentialsResponseGetCredentialArgType = CredentialsResponse +type UpdateCredentialsResponseGetCredentialRetType = CredentialsResponse + +func getUpdateCredentialsResponseGetCredentialAttributeTypeOk(arg UpdateCredentialsResponseGetCredentialAttributeType) (ret UpdateCredentialsResponseGetCredentialRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateCredentialsResponseGetCredentialAttributeType(arg *UpdateCredentialsResponseGetCredentialAttributeType, val UpdateCredentialsResponseGetCredentialRetType) { + *arg = &val +} + // UpdateCredentialsResponse struct for UpdateCredentialsResponse type UpdateCredentialsResponse struct { - Credential *CredentialsResponse `json:"credential,omitempty"` + Credential UpdateCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"` } // NewUpdateCredentialsResponse instantiates a new UpdateCredentialsResponse object @@ -40,41 +60,32 @@ func NewUpdateCredentialsResponseWithDefaults() *UpdateCredentialsResponse { } // GetCredential returns the Credential field value if set, zero value otherwise. -func (o *UpdateCredentialsResponse) GetCredential() *CredentialsResponse { - if o == nil || IsNil(o.Credential) { - var ret *CredentialsResponse - return ret - } - return o.Credential +func (o *UpdateCredentialsResponse) GetCredential() (res UpdateCredentialsResponseGetCredentialRetType) { + res, _ = o.GetCredentialOk() + return } // GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateCredentialsResponse) GetCredentialOk() (*CredentialsResponse, bool) { - if o == nil || IsNil(o.Credential) { - return nil, false - } - return o.Credential, true +func (o *UpdateCredentialsResponse) GetCredentialOk() (ret UpdateCredentialsResponseGetCredentialRetType, ok bool) { + return getUpdateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential) } // HasCredential returns a boolean if a field has been set. func (o *UpdateCredentialsResponse) HasCredential() bool { - if o != nil && !IsNil(o.Credential) { - return true - } - - return false + _, ok := o.GetCredentialOk() + return ok } // SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field. -func (o *UpdateCredentialsResponse) SetCredential(v *CredentialsResponse) { - o.Credential = v +func (o *UpdateCredentialsResponse) SetCredential(v UpdateCredentialsResponseGetCredentialRetType) { + setUpdateCredentialsResponseGetCredentialAttributeType(&o.Credential, v) } func (o UpdateCredentialsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Credential) { - toSerialize["credential"] = o.Credential + if val, ok := getUpdateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok { + toSerialize["Credential"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_update_load_balancer_payload.go b/services/lbapplication/model_update_load_balancer_payload.go index 1b709ce59..388a22360 100644 --- a/services/lbapplication/model_update_load_balancer_payload.go +++ b/services/lbapplication/model_update_load_balancer_payload.go @@ -17,28 +17,253 @@ import ( // checks if the UpdateLoadBalancerPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateLoadBalancerPayload{} +/* + types and functions for errors +*/ + +// isArray +type UpdateLoadBalancerPayloadGetErrorsAttributeType = *[]LoadBalancerError +type UpdateLoadBalancerPayloadGetErrorsArgType = []LoadBalancerError +type UpdateLoadBalancerPayloadGetErrorsRetType = []LoadBalancerError + +func getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetErrorsAttributeType) (ret UpdateLoadBalancerPayloadGetErrorsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetErrorsAttributeType(arg *UpdateLoadBalancerPayloadGetErrorsAttributeType, val UpdateLoadBalancerPayloadGetErrorsRetType) { + *arg = &val +} + +/* + types and functions for externalAddress +*/ + +// isNotNullableString +type UpdateLoadBalancerPayloadGetExternalAddressAttributeType = *string + +func getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg UpdateLoadBalancerPayloadGetExternalAddressAttributeType) (ret UpdateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetExternalAddressAttributeType(arg *UpdateLoadBalancerPayloadGetExternalAddressAttributeType, val UpdateLoadBalancerPayloadGetExternalAddressRetType) { + *arg = &val +} + +type UpdateLoadBalancerPayloadGetExternalAddressArgType = string +type UpdateLoadBalancerPayloadGetExternalAddressRetType = string + +/* + types and functions for listeners +*/ + +// isArray +type UpdateLoadBalancerPayloadGetListenersAttributeType = *[]Listener +type UpdateLoadBalancerPayloadGetListenersArgType = []Listener +type UpdateLoadBalancerPayloadGetListenersRetType = []Listener + +func getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(arg UpdateLoadBalancerPayloadGetListenersAttributeType) (ret UpdateLoadBalancerPayloadGetListenersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetListenersAttributeType(arg *UpdateLoadBalancerPayloadGetListenersAttributeType, val UpdateLoadBalancerPayloadGetListenersRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type UpdateLoadBalancerPayloadGetNameAttributeType = *string + +func getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(arg UpdateLoadBalancerPayloadGetNameAttributeType) (ret UpdateLoadBalancerPayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetNameAttributeType(arg *UpdateLoadBalancerPayloadGetNameAttributeType, val UpdateLoadBalancerPayloadGetNameRetType) { + *arg = &val +} + +type UpdateLoadBalancerPayloadGetNameArgType = string +type UpdateLoadBalancerPayloadGetNameRetType = string + +/* + types and functions for networks +*/ + +// isArray +type UpdateLoadBalancerPayloadGetNetworksAttributeType = *[]Network +type UpdateLoadBalancerPayloadGetNetworksArgType = []Network +type UpdateLoadBalancerPayloadGetNetworksRetType = []Network + +func getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg UpdateLoadBalancerPayloadGetNetworksAttributeType) (ret UpdateLoadBalancerPayloadGetNetworksRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetNetworksAttributeType(arg *UpdateLoadBalancerPayloadGetNetworksAttributeType, val UpdateLoadBalancerPayloadGetNetworksRetType) { + *arg = &val +} + +/* + types and functions for options +*/ + +// isModel +type UpdateLoadBalancerPayloadGetOptionsAttributeType = *LoadBalancerOptions +type UpdateLoadBalancerPayloadGetOptionsArgType = LoadBalancerOptions +type UpdateLoadBalancerPayloadGetOptionsRetType = LoadBalancerOptions + +func getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetOptionsAttributeType) (ret UpdateLoadBalancerPayloadGetOptionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetOptionsAttributeType(arg *UpdateLoadBalancerPayloadGetOptionsAttributeType, val UpdateLoadBalancerPayloadGetOptionsRetType) { + *arg = &val +} + +/* + types and functions for planId +*/ + +// isNotNullableString +type UpdateLoadBalancerPayloadGetPlanIdAttributeType = *string + +func getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg UpdateLoadBalancerPayloadGetPlanIdAttributeType) (ret UpdateLoadBalancerPayloadGetPlanIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetPlanIdAttributeType(arg *UpdateLoadBalancerPayloadGetPlanIdAttributeType, val UpdateLoadBalancerPayloadGetPlanIdRetType) { + *arg = &val +} + +type UpdateLoadBalancerPayloadGetPlanIdArgType = string +type UpdateLoadBalancerPayloadGetPlanIdRetType = string + +/* + types and functions for privateAddress +*/ + +// isNotNullableString +type UpdateLoadBalancerPayloadGetPrivateAddressAttributeType = *string + +func getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg UpdateLoadBalancerPayloadGetPrivateAddressAttributeType) (ret UpdateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetPrivateAddressAttributeType(arg *UpdateLoadBalancerPayloadGetPrivateAddressAttributeType, val UpdateLoadBalancerPayloadGetPrivateAddressRetType) { + *arg = &val +} + +type UpdateLoadBalancerPayloadGetPrivateAddressArgType = string +type UpdateLoadBalancerPayloadGetPrivateAddressRetType = string + +/* + types and functions for status +*/ + +// isEnumRef +type UpdateLoadBalancerPayloadGetStatusAttributeType = *string +type UpdateLoadBalancerPayloadGetStatusArgType = string +type UpdateLoadBalancerPayloadGetStatusRetType = string + +func getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(arg UpdateLoadBalancerPayloadGetStatusAttributeType) (ret UpdateLoadBalancerPayloadGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetStatusAttributeType(arg *UpdateLoadBalancerPayloadGetStatusAttributeType, val UpdateLoadBalancerPayloadGetStatusRetType) { + *arg = &val +} + +/* + types and functions for targetPools +*/ + +// isArray +type UpdateLoadBalancerPayloadGetTargetPoolsAttributeType = *[]TargetPool +type UpdateLoadBalancerPayloadGetTargetPoolsArgType = []TargetPool +type UpdateLoadBalancerPayloadGetTargetPoolsRetType = []TargetPool + +func getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg UpdateLoadBalancerPayloadGetTargetPoolsAttributeType) (ret UpdateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *UpdateLoadBalancerPayloadGetTargetPoolsAttributeType, val UpdateLoadBalancerPayloadGetTargetPoolsRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isNotNullableString +type UpdateLoadBalancerPayloadGetVersionAttributeType = *string + +func getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(arg UpdateLoadBalancerPayloadGetVersionAttributeType) (ret UpdateLoadBalancerPayloadGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateLoadBalancerPayloadGetVersionAttributeType(arg *UpdateLoadBalancerPayloadGetVersionAttributeType, val UpdateLoadBalancerPayloadGetVersionRetType) { + *arg = &val +} + +type UpdateLoadBalancerPayloadGetVersionArgType = string +type UpdateLoadBalancerPayloadGetVersionRetType = string + // UpdateLoadBalancerPayload struct for UpdateLoadBalancerPayload type UpdateLoadBalancerPayload struct { // Reports all errors a application load balancer has. - Errors *[]LoadBalancerError `json:"errors,omitempty"` + Errors UpdateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"` // External application load balancer IP address where this application load balancer is exposed. Not changeable after creation. - ExternalAddress *string `json:"externalAddress,omitempty"` + ExternalAddress UpdateLoadBalancerPayloadGetExternalAddressAttributeType `json:"externalAddress,omitempty"` // There is a maximum listener count of 20. - Listeners *[]Listener `json:"listeners,omitempty"` + Listeners UpdateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"` // Application Load Balancer name. Not changeable after creation. - Name *string `json:"name,omitempty"` + Name UpdateLoadBalancerPayloadGetNameAttributeType `json:"name,omitempty"` // List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation. - Networks *[]Network `json:"networks,omitempty"` - Options *LoadBalancerOptions `json:"options,omitempty"` + Networks UpdateLoadBalancerPayloadGetNetworksAttributeType `json:"networks,omitempty"` + Options UpdateLoadBalancerPayloadGetOptionsAttributeType `json:"options,omitempty"` // Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum. - PlanId *string `json:"planId,omitempty"` + PlanId UpdateLoadBalancerPayloadGetPlanIdAttributeType `json:"planId,omitempty"` // Transient private application load balancer IP address that can change any time. - PrivateAddress *string `json:"privateAddress,omitempty"` - Status *string `json:"status,omitempty"` + PrivateAddress UpdateLoadBalancerPayloadGetPrivateAddressAttributeType `json:"privateAddress,omitempty"` + Status UpdateLoadBalancerPayloadGetStatusAttributeType `json:"status,omitempty"` // List of all target pools which will be used in the application load balancer. Limited to 20. - TargetPools *[]TargetPool `json:"targetPools,omitempty"` + TargetPools UpdateLoadBalancerPayloadGetTargetPoolsAttributeType `json:"targetPools,omitempty"` // Application Load Balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this application load balancer resource that changes during updates of the load balancers. On updates this field specified the application load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a application load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case. - Version *string `json:"version,omitempty"` + Version UpdateLoadBalancerPayloadGetVersionAttributeType `json:"version,omitempty"` } // NewUpdateLoadBalancerPayload instantiates a new UpdateLoadBalancerPayload object @@ -59,391 +284,292 @@ func NewUpdateLoadBalancerPayloadWithDefaults() *UpdateLoadBalancerPayload { } // GetErrors returns the Errors field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetErrors() *[]LoadBalancerError { - if o == nil || IsNil(o.Errors) { - var ret *[]LoadBalancerError - return ret - } - return o.Errors +func (o *UpdateLoadBalancerPayload) GetErrors() (res UpdateLoadBalancerPayloadGetErrorsRetType) { + res, _ = o.GetErrorsOk() + return } // GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetErrorsOk() (*[]LoadBalancerError, bool) { - if o == nil || IsNil(o.Errors) { - return nil, false - } - return o.Errors, true +func (o *UpdateLoadBalancerPayload) GetErrorsOk() (ret UpdateLoadBalancerPayloadGetErrorsRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors) } // HasErrors returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) HasErrors() bool { - if o != nil && !IsNil(o.Errors) { - return true - } - - return false + _, ok := o.GetErrorsOk() + return ok } // SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field. -func (o *UpdateLoadBalancerPayload) SetErrors(v *[]LoadBalancerError) { - o.Errors = v +func (o *UpdateLoadBalancerPayload) SetErrors(v UpdateLoadBalancerPayloadGetErrorsRetType) { + setUpdateLoadBalancerPayloadGetErrorsAttributeType(&o.Errors, v) } // GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetExternalAddress() *string { - if o == nil || IsNil(o.ExternalAddress) { - var ret *string - return ret - } - return o.ExternalAddress +func (o *UpdateLoadBalancerPayload) GetExternalAddress() (res UpdateLoadBalancerPayloadGetExternalAddressRetType) { + res, _ = o.GetExternalAddressOk() + return } // GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetExternalAddressOk() (*string, bool) { - if o == nil || IsNil(o.ExternalAddress) { - return nil, false - } - return o.ExternalAddress, true +func (o *UpdateLoadBalancerPayload) GetExternalAddressOk() (ret UpdateLoadBalancerPayloadGetExternalAddressRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress) } // HasExternalAddress returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) HasExternalAddress() bool { - if o != nil && !IsNil(o.ExternalAddress) { - return true - } - - return false + _, ok := o.GetExternalAddressOk() + return ok } // SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field. -func (o *UpdateLoadBalancerPayload) SetExternalAddress(v *string) { - o.ExternalAddress = v +func (o *UpdateLoadBalancerPayload) SetExternalAddress(v UpdateLoadBalancerPayloadGetExternalAddressRetType) { + setUpdateLoadBalancerPayloadGetExternalAddressAttributeType(&o.ExternalAddress, v) } // GetListeners returns the Listeners field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetListeners() *[]Listener { - if o == nil || IsNil(o.Listeners) { - var ret *[]Listener - return ret - } - return o.Listeners +func (o *UpdateLoadBalancerPayload) GetListeners() (res UpdateLoadBalancerPayloadGetListenersRetType) { + res, _ = o.GetListenersOk() + return } // GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetListenersOk() (*[]Listener, bool) { - if o == nil || IsNil(o.Listeners) { - return nil, false - } - return o.Listeners, true +func (o *UpdateLoadBalancerPayload) GetListenersOk() (ret UpdateLoadBalancerPayloadGetListenersRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners) } // HasListeners returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) HasListeners() bool { - if o != nil && !IsNil(o.Listeners) { - return true - } - - return false + _, ok := o.GetListenersOk() + return ok } // SetListeners gets a reference to the given []Listener and assigns it to the Listeners field. -func (o *UpdateLoadBalancerPayload) SetListeners(v *[]Listener) { - o.Listeners = v +func (o *UpdateLoadBalancerPayload) SetListeners(v UpdateLoadBalancerPayloadGetListenersRetType) { + setUpdateLoadBalancerPayloadGetListenersAttributeType(&o.Listeners, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *UpdateLoadBalancerPayload) GetName() (res UpdateLoadBalancerPayloadGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *UpdateLoadBalancerPayload) GetNameOk() (ret UpdateLoadBalancerPayloadGetNameRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *UpdateLoadBalancerPayload) SetName(v *string) { - o.Name = v +func (o *UpdateLoadBalancerPayload) SetName(v UpdateLoadBalancerPayloadGetNameRetType) { + setUpdateLoadBalancerPayloadGetNameAttributeType(&o.Name, v) } // GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetNetworks() *[]Network { - if o == nil || IsNil(o.Networks) { - var ret *[]Network - return ret - } - return o.Networks +func (o *UpdateLoadBalancerPayload) GetNetworks() (res UpdateLoadBalancerPayloadGetNetworksRetType) { + res, _ = o.GetNetworksOk() + return } // GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetNetworksOk() (*[]Network, bool) { - if o == nil || IsNil(o.Networks) { - return nil, false - } - return o.Networks, true +func (o *UpdateLoadBalancerPayload) GetNetworksOk() (ret UpdateLoadBalancerPayloadGetNetworksRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks) } // HasNetworks returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) HasNetworks() bool { - if o != nil && !IsNil(o.Networks) { - return true - } - - return false + _, ok := o.GetNetworksOk() + return ok } // SetNetworks gets a reference to the given []Network and assigns it to the Networks field. -func (o *UpdateLoadBalancerPayload) SetNetworks(v *[]Network) { - o.Networks = v +func (o *UpdateLoadBalancerPayload) SetNetworks(v UpdateLoadBalancerPayloadGetNetworksRetType) { + setUpdateLoadBalancerPayloadGetNetworksAttributeType(&o.Networks, v) } // GetOptions returns the Options field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetOptions() *LoadBalancerOptions { - if o == nil || IsNil(o.Options) { - var ret *LoadBalancerOptions - return ret - } - return o.Options +func (o *UpdateLoadBalancerPayload) GetOptions() (res UpdateLoadBalancerPayloadGetOptionsRetType) { + res, _ = o.GetOptionsOk() + return } // GetOptionsOk returns a tuple with the Options field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetOptionsOk() (*LoadBalancerOptions, bool) { - if o == nil || IsNil(o.Options) { - return nil, false - } - return o.Options, true +func (o *UpdateLoadBalancerPayload) GetOptionsOk() (ret UpdateLoadBalancerPayloadGetOptionsRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options) } // HasOptions returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) HasOptions() bool { - if o != nil && !IsNil(o.Options) { - return true - } - - return false + _, ok := o.GetOptionsOk() + return ok } // SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field. -func (o *UpdateLoadBalancerPayload) SetOptions(v *LoadBalancerOptions) { - o.Options = v +func (o *UpdateLoadBalancerPayload) SetOptions(v UpdateLoadBalancerPayloadGetOptionsRetType) { + setUpdateLoadBalancerPayloadGetOptionsAttributeType(&o.Options, v) } // GetPlanId returns the PlanId field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetPlanId() *string { - if o == nil || IsNil(o.PlanId) { - var ret *string - return ret - } - return o.PlanId +func (o *UpdateLoadBalancerPayload) GetPlanId() (res UpdateLoadBalancerPayloadGetPlanIdRetType) { + 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 *UpdateLoadBalancerPayload) GetPlanIdOk() (*string, bool) { - if o == nil || IsNil(o.PlanId) { - return nil, false - } - return o.PlanId, true +func (o *UpdateLoadBalancerPayload) GetPlanIdOk() (ret UpdateLoadBalancerPayloadGetPlanIdRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId) } // HasPlanId returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) 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 *UpdateLoadBalancerPayload) SetPlanId(v *string) { - o.PlanId = v +func (o *UpdateLoadBalancerPayload) SetPlanId(v UpdateLoadBalancerPayloadGetPlanIdRetType) { + setUpdateLoadBalancerPayloadGetPlanIdAttributeType(&o.PlanId, v) } // GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetPrivateAddress() *string { - if o == nil || IsNil(o.PrivateAddress) { - var ret *string - return ret - } - return o.PrivateAddress +func (o *UpdateLoadBalancerPayload) GetPrivateAddress() (res UpdateLoadBalancerPayloadGetPrivateAddressRetType) { + res, _ = o.GetPrivateAddressOk() + return } // GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetPrivateAddressOk() (*string, bool) { - if o == nil || IsNil(o.PrivateAddress) { - return nil, false - } - return o.PrivateAddress, true +func (o *UpdateLoadBalancerPayload) GetPrivateAddressOk() (ret UpdateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress) } // HasPrivateAddress returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) HasPrivateAddress() bool { - if o != nil && !IsNil(o.PrivateAddress) { - return true - } - - return false + _, ok := o.GetPrivateAddressOk() + return ok } // SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field. -func (o *UpdateLoadBalancerPayload) SetPrivateAddress(v *string) { - o.PrivateAddress = v +func (o *UpdateLoadBalancerPayload) SetPrivateAddress(v UpdateLoadBalancerPayloadGetPrivateAddressRetType) { + setUpdateLoadBalancerPayloadGetPrivateAddressAttributeType(&o.PrivateAddress, v) } // GetStatus returns the Status field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - return o.Status +func (o *UpdateLoadBalancerPayload) GetStatus() (res UpdateLoadBalancerPayloadGetStatusRetType) { + 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 *UpdateLoadBalancerPayload) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true +func (o *UpdateLoadBalancerPayload) GetStatusOk() (ret UpdateLoadBalancerPayloadGetStatusRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status) } // HasStatus returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) 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 *UpdateLoadBalancerPayload) SetStatus(v *string) { - o.Status = v +func (o *UpdateLoadBalancerPayload) SetStatus(v UpdateLoadBalancerPayloadGetStatusRetType) { + setUpdateLoadBalancerPayloadGetStatusAttributeType(&o.Status, v) } // GetTargetPools returns the TargetPools field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetTargetPools() *[]TargetPool { - if o == nil || IsNil(o.TargetPools) { - var ret *[]TargetPool - return ret - } - return o.TargetPools +func (o *UpdateLoadBalancerPayload) GetTargetPools() (res UpdateLoadBalancerPayloadGetTargetPoolsRetType) { + res, _ = o.GetTargetPoolsOk() + return } // GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetTargetPoolsOk() (*[]TargetPool, bool) { - if o == nil || IsNil(o.TargetPools) { - return nil, false - } - return o.TargetPools, true +func (o *UpdateLoadBalancerPayload) GetTargetPoolsOk() (ret UpdateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools) } // HasTargetPools returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) HasTargetPools() bool { - if o != nil && !IsNil(o.TargetPools) { - return true - } - - return false + _, ok := o.GetTargetPoolsOk() + return ok } // SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field. -func (o *UpdateLoadBalancerPayload) SetTargetPools(v *[]TargetPool) { - o.TargetPools = v +func (o *UpdateLoadBalancerPayload) SetTargetPools(v UpdateLoadBalancerPayloadGetTargetPoolsRetType) { + setUpdateLoadBalancerPayloadGetTargetPoolsAttributeType(&o.TargetPools, v) } // GetVersion returns the Version field value if set, zero value otherwise. -func (o *UpdateLoadBalancerPayload) GetVersion() *string { - if o == nil || IsNil(o.Version) { - var ret *string - return ret - } - return o.Version +func (o *UpdateLoadBalancerPayload) GetVersion() (res UpdateLoadBalancerPayloadGetVersionRetType) { + res, _ = o.GetVersionOk() + return } // GetVersionOk returns a tuple with the Version field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLoadBalancerPayload) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true +func (o *UpdateLoadBalancerPayload) GetVersionOk() (ret UpdateLoadBalancerPayloadGetVersionRetType, ok bool) { + return getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version) } // HasVersion returns a boolean if a field has been set. func (o *UpdateLoadBalancerPayload) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false + _, ok := o.GetVersionOk() + return ok } // SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *UpdateLoadBalancerPayload) SetVersion(v *string) { - o.Version = v +func (o *UpdateLoadBalancerPayload) SetVersion(v UpdateLoadBalancerPayloadGetVersionRetType) { + setUpdateLoadBalancerPayloadGetVersionAttributeType(&o.Version, v) } func (o UpdateLoadBalancerPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Errors) { - toSerialize["errors"] = o.Errors + if val, ok := getUpdateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors); ok { + toSerialize["Errors"] = val } - if !IsNil(o.ExternalAddress) { - toSerialize["externalAddress"] = o.ExternalAddress + if val, ok := getUpdateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok { + toSerialize["ExternalAddress"] = val } - if !IsNil(o.Listeners) { - toSerialize["listeners"] = o.Listeners + if val, ok := getUpdateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners); ok { + toSerialize["Listeners"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getUpdateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.Networks) { - toSerialize["networks"] = o.Networks + if val, ok := getUpdateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks); ok { + toSerialize["Networks"] = val } - if !IsNil(o.Options) { - toSerialize["options"] = o.Options + if val, ok := getUpdateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options); ok { + toSerialize["Options"] = val } - if !IsNil(o.PlanId) { - toSerialize["planId"] = o.PlanId + if val, ok := getUpdateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val } - if !IsNil(o.PrivateAddress) { - toSerialize["privateAddress"] = o.PrivateAddress + if val, ok := getUpdateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok { + toSerialize["PrivateAddress"] = val } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status + if val, ok := getUpdateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val } - if !IsNil(o.TargetPools) { - toSerialize["targetPools"] = o.TargetPools + if val, ok := getUpdateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools); ok { + toSerialize["TargetPools"] = val } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version + if val, ok := getUpdateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val } return toSerialize, nil } diff --git a/services/lbapplication/model_update_target_pool_payload.go b/services/lbapplication/model_update_target_pool_payload.go index fe281f741..d8123f329 100644 --- a/services/lbapplication/model_update_target_pool_payload.go +++ b/services/lbapplication/model_update_target_pool_payload.go @@ -17,15 +17,96 @@ import ( // checks if the UpdateTargetPoolPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateTargetPoolPayload{} +/* + types and functions for activeHealthCheck +*/ + +// isModel +type UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType = *ActiveHealthCheck +type UpdateTargetPoolPayloadGetActiveHealthCheckArgType = ActiveHealthCheck +type UpdateTargetPoolPayloadGetActiveHealthCheckRetType = ActiveHealthCheck + +func getUpdateTargetPoolPayloadGetActiveHealthCheckAttributeTypeOk(arg UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType) (ret UpdateTargetPoolPayloadGetActiveHealthCheckRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateTargetPoolPayloadGetActiveHealthCheckAttributeType(arg *UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType, val UpdateTargetPoolPayloadGetActiveHealthCheckRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type UpdateTargetPoolPayloadGetNameAttributeType = *string + +func getUpdateTargetPoolPayloadGetNameAttributeTypeOk(arg UpdateTargetPoolPayloadGetNameAttributeType) (ret UpdateTargetPoolPayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateTargetPoolPayloadGetNameAttributeType(arg *UpdateTargetPoolPayloadGetNameAttributeType, val UpdateTargetPoolPayloadGetNameRetType) { + *arg = &val +} + +type UpdateTargetPoolPayloadGetNameArgType = string +type UpdateTargetPoolPayloadGetNameRetType = string + +/* + types and functions for targetPort +*/ + +// isInteger +type UpdateTargetPoolPayloadGetTargetPortAttributeType = *int64 +type UpdateTargetPoolPayloadGetTargetPortArgType = int64 +type UpdateTargetPoolPayloadGetTargetPortRetType = int64 + +func getUpdateTargetPoolPayloadGetTargetPortAttributeTypeOk(arg UpdateTargetPoolPayloadGetTargetPortAttributeType) (ret UpdateTargetPoolPayloadGetTargetPortRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateTargetPoolPayloadGetTargetPortAttributeType(arg *UpdateTargetPoolPayloadGetTargetPortAttributeType, val UpdateTargetPoolPayloadGetTargetPortRetType) { + *arg = &val +} + +/* + types and functions for targets +*/ + +// isArray +type UpdateTargetPoolPayloadGetTargetsAttributeType = *[]Target +type UpdateTargetPoolPayloadGetTargetsArgType = []Target +type UpdateTargetPoolPayloadGetTargetsRetType = []Target + +func getUpdateTargetPoolPayloadGetTargetsAttributeTypeOk(arg UpdateTargetPoolPayloadGetTargetsAttributeType) (ret UpdateTargetPoolPayloadGetTargetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateTargetPoolPayloadGetTargetsAttributeType(arg *UpdateTargetPoolPayloadGetTargetsAttributeType, val UpdateTargetPoolPayloadGetTargetsRetType) { + *arg = &val +} + // UpdateTargetPoolPayload struct for UpdateTargetPoolPayload type UpdateTargetPoolPayload struct { - ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"` + ActiveHealthCheck UpdateTargetPoolPayloadGetActiveHealthCheckAttributeType `json:"activeHealthCheck,omitempty"` // Target pool name - Name *string `json:"name,omitempty"` + Name UpdateTargetPoolPayloadGetNameAttributeType `json:"name,omitempty"` // The number identifying the port where each target listens for traffic. - TargetPort *int64 `json:"targetPort,omitempty"` + TargetPort UpdateTargetPoolPayloadGetTargetPortAttributeType `json:"targetPort,omitempty"` // List of all targets which will be used in the pool. Limited to 250. - Targets *[]Target `json:"targets,omitempty"` + Targets UpdateTargetPoolPayloadGetTargetsAttributeType `json:"targets,omitempty"` } // NewUpdateTargetPoolPayload instantiates a new UpdateTargetPoolPayload object @@ -46,146 +127,110 @@ func NewUpdateTargetPoolPayloadWithDefaults() *UpdateTargetPoolPayload { } // GetActiveHealthCheck returns the ActiveHealthCheck field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetActiveHealthCheck() *ActiveHealthCheck { - if o == nil || IsNil(o.ActiveHealthCheck) { - var ret *ActiveHealthCheck - return ret - } - return o.ActiveHealthCheck +func (o *UpdateTargetPoolPayload) GetActiveHealthCheck() (res UpdateTargetPoolPayloadGetActiveHealthCheckRetType) { + res, _ = o.GetActiveHealthCheckOk() + return } // GetActiveHealthCheckOk returns a tuple with the ActiveHealthCheck field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetActiveHealthCheckOk() (*ActiveHealthCheck, bool) { - if o == nil || IsNil(o.ActiveHealthCheck) { - return nil, false - } - return o.ActiveHealthCheck, true +func (o *UpdateTargetPoolPayload) GetActiveHealthCheckOk() (ret UpdateTargetPoolPayloadGetActiveHealthCheckRetType, ok bool) { + return getUpdateTargetPoolPayloadGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck) } // HasActiveHealthCheck returns a boolean if a field has been set. func (o *UpdateTargetPoolPayload) HasActiveHealthCheck() bool { - if o != nil && !IsNil(o.ActiveHealthCheck) { - return true - } - - return false + _, ok := o.GetActiveHealthCheckOk() + return ok } // SetActiveHealthCheck gets a reference to the given ActiveHealthCheck and assigns it to the ActiveHealthCheck field. -func (o *UpdateTargetPoolPayload) SetActiveHealthCheck(v *ActiveHealthCheck) { - o.ActiveHealthCheck = v +func (o *UpdateTargetPoolPayload) SetActiveHealthCheck(v UpdateTargetPoolPayloadGetActiveHealthCheckRetType) { + setUpdateTargetPoolPayloadGetActiveHealthCheckAttributeType(&o.ActiveHealthCheck, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *UpdateTargetPoolPayload) GetName() (res UpdateTargetPoolPayloadGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *UpdateTargetPoolPayload) GetNameOk() (ret UpdateTargetPoolPayloadGetNameRetType, ok bool) { + return getUpdateTargetPoolPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *UpdateTargetPoolPayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *UpdateTargetPoolPayload) SetName(v *string) { - o.Name = v +func (o *UpdateTargetPoolPayload) SetName(v UpdateTargetPoolPayloadGetNameRetType) { + setUpdateTargetPoolPayloadGetNameAttributeType(&o.Name, v) } // GetTargetPort returns the TargetPort field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetTargetPort() *int64 { - if o == nil || IsNil(o.TargetPort) { - var ret *int64 - return ret - } - return o.TargetPort +func (o *UpdateTargetPoolPayload) GetTargetPort() (res UpdateTargetPoolPayloadGetTargetPortRetType) { + res, _ = o.GetTargetPortOk() + return } // GetTargetPortOk returns a tuple with the TargetPort field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetTargetPortOk() (*int64, bool) { - if o == nil || IsNil(o.TargetPort) { - return nil, false - } - return o.TargetPort, true +func (o *UpdateTargetPoolPayload) GetTargetPortOk() (ret UpdateTargetPoolPayloadGetTargetPortRetType, ok bool) { + return getUpdateTargetPoolPayloadGetTargetPortAttributeTypeOk(o.TargetPort) } // HasTargetPort returns a boolean if a field has been set. func (o *UpdateTargetPoolPayload) HasTargetPort() bool { - if o != nil && !IsNil(o.TargetPort) { - return true - } - - return false + _, ok := o.GetTargetPortOk() + return ok } // SetTargetPort gets a reference to the given int64 and assigns it to the TargetPort field. -func (o *UpdateTargetPoolPayload) SetTargetPort(v *int64) { - o.TargetPort = v +func (o *UpdateTargetPoolPayload) SetTargetPort(v UpdateTargetPoolPayloadGetTargetPortRetType) { + setUpdateTargetPoolPayloadGetTargetPortAttributeType(&o.TargetPort, v) } // GetTargets returns the Targets field value if set, zero value otherwise. -func (o *UpdateTargetPoolPayload) GetTargets() *[]Target { - if o == nil || IsNil(o.Targets) { - var ret *[]Target - return ret - } - return o.Targets +func (o *UpdateTargetPoolPayload) GetTargets() (res UpdateTargetPoolPayloadGetTargetsRetType) { + res, _ = o.GetTargetsOk() + return } // GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateTargetPoolPayload) GetTargetsOk() (*[]Target, bool) { - if o == nil || IsNil(o.Targets) { - return nil, false - } - return o.Targets, true +func (o *UpdateTargetPoolPayload) GetTargetsOk() (ret UpdateTargetPoolPayloadGetTargetsRetType, ok bool) { + return getUpdateTargetPoolPayloadGetTargetsAttributeTypeOk(o.Targets) } // HasTargets returns a boolean if a field has been set. func (o *UpdateTargetPoolPayload) HasTargets() bool { - if o != nil && !IsNil(o.Targets) { - return true - } - - return false + _, ok := o.GetTargetsOk() + return ok } // SetTargets gets a reference to the given []Target and assigns it to the Targets field. -func (o *UpdateTargetPoolPayload) SetTargets(v *[]Target) { - o.Targets = v +func (o *UpdateTargetPoolPayload) SetTargets(v UpdateTargetPoolPayloadGetTargetsRetType) { + setUpdateTargetPoolPayloadGetTargetsAttributeType(&o.Targets, v) } func (o UpdateTargetPoolPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ActiveHealthCheck) { - toSerialize["activeHealthCheck"] = o.ActiveHealthCheck + if val, ok := getUpdateTargetPoolPayloadGetActiveHealthCheckAttributeTypeOk(o.ActiveHealthCheck); ok { + toSerialize["ActiveHealthCheck"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getUpdateTargetPoolPayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.TargetPort) { - toSerialize["targetPort"] = o.TargetPort + if val, ok := getUpdateTargetPoolPayloadGetTargetPortAttributeTypeOk(o.TargetPort); ok { + toSerialize["TargetPort"] = val } - if !IsNil(o.Targets) { - toSerialize["targets"] = o.Targets + if val, ok := getUpdateTargetPoolPayloadGetTargetsAttributeTypeOk(o.Targets); ok { + toSerialize["Targets"] = val } return toSerialize, nil } diff --git a/services/lbapplication/utils.go b/services/lbapplication/utils.go index 5dd8a85d7..41f25bf0e 100644 --- a/services/lbapplication/utils.go +++ b/services/lbapplication/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()