diff --git a/services/objectstorage/api_default_test.go b/services/objectstorage/api_default_test.go index 719792747..b309399bf 100644 --- a/services/objectstorage/api_default_test.go +++ b/services/objectstorage/api_default_test.go @@ -24,14 +24,14 @@ import ( func Test_objectstorage_DefaultApiService(t *testing.T) { t.Run("Test DefaultApiService CreateAccessKey", func(t *testing.T) { - path := "/v2/project/{projectId}/regions/{region}/access-key" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}/access-key" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -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 := CreateAccessKeyResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -65,8 +65,8 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" + projectId := projectIdValue + region := regionValue createAccessKeyPayload := CreateAccessKeyPayload{} resp, reqErr := apiClient.CreateAccessKey(context.Background(), projectId, region).CreateAccessKeyPayload(createAccessKeyPayload).Execute() @@ -74,22 +74,22 @@ func Test_objectstorage_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 CreateBucket", func(t *testing.T) { - path := "/v2/project/{projectId}/regions/{region}/bucket/{bucketName}" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}/bucket/{bucketName}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) bucketNameValue := "bucketName" - path = strings.Replace(path, "{"+"bucketName"+"}", url.PathEscape(ParameterValueToString(bucketNameValue, "bucketName")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"bucketName"+"}", url.PathEscape(ParameterValueToString(bucketNameValue, "bucketName")), -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 := CreateBucketResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -123,29 +123,29 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" - bucketName := "bucketName" + projectId := projectIdValue + region := regionValue + bucketName := bucketNameValue resp, reqErr := apiClient.CreateBucket(context.Background(), projectId, region, bucketName).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 CreateCredentialsGroup", func(t *testing.T) { - path := "/v2/project/{projectId}/regions/{region}/credentials-group" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}/credentials-group" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -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 := CreateCredentialsGroupResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -179,8 +179,8 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" + projectId := projectIdValue + region := regionValue createCredentialsGroupPayload := CreateCredentialsGroupPayload{} resp, reqErr := apiClient.CreateCredentialsGroup(context.Background(), projectId, region).CreateCredentialsGroupPayload(createCredentialsGroupPayload).Execute() @@ -188,22 +188,22 @@ func Test_objectstorage_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 DeleteAccessKey", func(t *testing.T) { - path := "/v2/project/{projectId}/regions/{region}/access-key/{keyId}" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}/access-key/{keyId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) keyIdValue := "keyId" - path = strings.Replace(path, "{"+"keyId"+"}", url.PathEscape(ParameterValueToString(keyIdValue, "keyId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"keyId"+"}", url.PathEscape(ParameterValueToString(keyIdValue, "keyId")), -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 := DeleteAccessKeyResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -237,31 +237,31 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" - keyId := "keyId" + projectId := projectIdValue + region := regionValue + keyId := keyIdValue resp, reqErr := apiClient.DeleteAccessKey(context.Background(), projectId, region, keyId).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 DeleteBucket", func(t *testing.T) { - path := "/v2/project/{projectId}/regions/{region}/bucket/{bucketName}" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}/bucket/{bucketName}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) bucketNameValue := "bucketName" - path = strings.Replace(path, "{"+"bucketName"+"}", url.PathEscape(ParameterValueToString(bucketNameValue, "bucketName")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"bucketName"+"}", url.PathEscape(ParameterValueToString(bucketNameValue, "bucketName")), -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 := DeleteBucketResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -295,31 +295,31 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" - bucketName := "bucketName" + projectId := projectIdValue + region := regionValue + bucketName := bucketNameValue resp, reqErr := apiClient.DeleteBucket(context.Background(), projectId, region, bucketName).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 DeleteCredentialsGroup", func(t *testing.T) { - path := "/v2/project/{projectId}/regions/{region}/credentials-group/{groupId}" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}/credentials-group/{groupId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) groupIdValue := "groupId" - path = strings.Replace(path, "{"+"groupId"+"}", url.PathEscape(ParameterValueToString(groupIdValue, "groupId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"groupId"+"}", url.PathEscape(ParameterValueToString(groupIdValue, "groupId")), -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 := DeleteCredentialsGroupResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -353,29 +353,29 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" - groupId := "groupId" + projectId := projectIdValue + region := regionValue + groupId := groupIdValue resp, reqErr := apiClient.DeleteCredentialsGroup(context.Background(), projectId, region, groupId).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 := "/v2/project/{projectId}/regions/{region}" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -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 := ProjectStatus{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -409,28 +409,28 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" + projectId := projectIdValue + region := regionValue resp, reqErr := apiClient.DisableService(context.Background(), projectId, region).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 := "/v2/project/{projectId}/regions/{region}" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -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 := ProjectStatus{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -464,30 +464,30 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" + projectId := projectIdValue + region := regionValue resp, reqErr := apiClient.EnableService(context.Background(), projectId, region).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 GetBucket", func(t *testing.T) { - path := "/v2/project/{projectId}/regions/{region}/bucket/{bucketName}" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}/bucket/{bucketName}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) bucketNameValue := "bucketName" - path = strings.Replace(path, "{"+"bucketName"+"}", url.PathEscape(ParameterValueToString(bucketNameValue, "bucketName")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"bucketName"+"}", url.PathEscape(ParameterValueToString(bucketNameValue, "bucketName")), -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 := GetBucketResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -521,29 +521,29 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" - bucketName := "bucketName" + projectId := projectIdValue + region := regionValue + bucketName := bucketNameValue resp, reqErr := apiClient.GetBucket(context.Background(), projectId, region, bucketName).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 := "/v2/project/{projectId}/regions/{region}" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -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 := ProjectStatus{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -577,28 +577,28 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" + projectId := projectIdValue + region := regionValue resp, reqErr := apiClient.GetServiceStatus(context.Background(), projectId, region).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 ListAccessKeys", func(t *testing.T) { - path := "/v2/project/{projectId}/regions/{region}/access-keys" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}/access-keys" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -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 := ListAccessKeysResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -632,28 +632,28 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" + projectId := projectIdValue + region := regionValue resp, reqErr := apiClient.ListAccessKeys(context.Background(), projectId, region).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 ListBuckets", func(t *testing.T) { - path := "/v2/project/{projectId}/regions/{region}/buckets" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}/buckets" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -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 := ListBucketsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -687,28 +687,28 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" + projectId := projectIdValue + region := regionValue resp, reqErr := apiClient.ListBuckets(context.Background(), projectId, region).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 ListCredentialsGroups", func(t *testing.T) { - path := "/v2/project/{projectId}/regions/{region}/credentials-groups" + _apiUrlPath := "/v2/project/{projectId}/regions/{region}/credentials-groups" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) regionValue := "region" - path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -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 := ListCredentialsGroupsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -742,15 +742,15 @@ func Test_objectstorage_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - region := "region" + projectId := projectIdValue + region := regionValue resp, reqErr := apiClient.ListCredentialsGroups(context.Background(), projectId, region).Execute() 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/objectstorage/model_access_key.go b/services/objectstorage/model_access_key.go index bd272c366..0fb1faebc 100644 --- a/services/objectstorage/model_access_key.go +++ b/services/objectstorage/model_access_key.go @@ -17,15 +17,78 @@ import ( // checks if the AccessKey type satisfies the MappedNullable interface at compile time var _ MappedNullable = &AccessKey{} +/* + types and functions for displayName +*/ + +// isNotNullableString +type AccessKeyGetDisplayNameAttributeType = *string + +func getAccessKeyGetDisplayNameAttributeTypeOk(arg AccessKeyGetDisplayNameAttributeType) (ret AccessKeyGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAccessKeyGetDisplayNameAttributeType(arg *AccessKeyGetDisplayNameAttributeType, val AccessKeyGetDisplayNameRetType) { + *arg = &val +} + +type AccessKeyGetDisplayNameArgType = string +type AccessKeyGetDisplayNameRetType = string + +/* + types and functions for expires +*/ + +// isNotNullableString +type AccessKeyGetExpiresAttributeType = *string + +func getAccessKeyGetExpiresAttributeTypeOk(arg AccessKeyGetExpiresAttributeType) (ret AccessKeyGetExpiresRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAccessKeyGetExpiresAttributeType(arg *AccessKeyGetExpiresAttributeType, val AccessKeyGetExpiresRetType) { + *arg = &val +} + +type AccessKeyGetExpiresArgType = string +type AccessKeyGetExpiresRetType = string + +/* + types and functions for keyId +*/ + +// isNotNullableString +type AccessKeyGetKeyIdAttributeType = *string + +func getAccessKeyGetKeyIdAttributeTypeOk(arg AccessKeyGetKeyIdAttributeType) (ret AccessKeyGetKeyIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setAccessKeyGetKeyIdAttributeType(arg *AccessKeyGetKeyIdAttributeType, val AccessKeyGetKeyIdRetType) { + *arg = &val +} + +type AccessKeyGetKeyIdArgType = string +type AccessKeyGetKeyIdRetType = string + // AccessKey struct for AccessKey type AccessKey struct { // REQUIRED - DisplayName *string `json:"displayName"` + DisplayName AccessKeyGetDisplayNameAttributeType `json:"displayName"` // REQUIRED - Expires *string `json:"expires"` + Expires AccessKeyGetExpiresAttributeType `json:"expires"` // Identifies the pair of access key and secret access key for deletion // REQUIRED - KeyId *string `json:"keyId"` + KeyId AccessKeyGetKeyIdAttributeType `json:"keyId"` } type _AccessKey AccessKey @@ -34,11 +97,11 @@ type _AccessKey AccessKey // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAccessKey(displayName *string, expires *string, keyId *string) *AccessKey { +func NewAccessKey(displayName AccessKeyGetDisplayNameArgType, expires AccessKeyGetExpiresArgType, keyId AccessKeyGetKeyIdArgType) *AccessKey { this := AccessKey{} - this.DisplayName = displayName - this.Expires = expires - this.KeyId = keyId + setAccessKeyGetDisplayNameAttributeType(&this.DisplayName, displayName) + setAccessKeyGetExpiresAttributeType(&this.Expires, expires) + setAccessKeyGetKeyIdAttributeType(&this.KeyId, keyId) return &this } @@ -51,82 +114,67 @@ func NewAccessKeyWithDefaults() *AccessKey { } // GetDisplayName returns the DisplayName field value -func (o *AccessKey) GetDisplayName() *string { - if o == nil || IsNil(o.DisplayName) { - var ret *string - return ret - } - - return o.DisplayName +func (o *AccessKey) GetDisplayName() (ret AccessKeyGetDisplayNameRetType) { + ret, _ = o.GetDisplayNameOk() + return ret } // GetDisplayNameOk returns a tuple with the DisplayName field value // and a boolean to check if the value has been set. -func (o *AccessKey) GetDisplayNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DisplayName, true +func (o *AccessKey) GetDisplayNameOk() (ret AccessKeyGetDisplayNameRetType, ok bool) { + return getAccessKeyGetDisplayNameAttributeTypeOk(o.DisplayName) } // SetDisplayName sets field value -func (o *AccessKey) SetDisplayName(v *string) { - o.DisplayName = v +func (o *AccessKey) SetDisplayName(v AccessKeyGetDisplayNameRetType) { + setAccessKeyGetDisplayNameAttributeType(&o.DisplayName, v) } // GetExpires returns the Expires field value -func (o *AccessKey) GetExpires() *string { - if o == nil || IsNil(o.Expires) { - var ret *string - return ret - } - - return o.Expires +func (o *AccessKey) GetExpires() (ret AccessKeyGetExpiresRetType) { + ret, _ = o.GetExpiresOk() + return ret } // GetExpiresOk returns a tuple with the Expires field value // and a boolean to check if the value has been set. -func (o *AccessKey) GetExpiresOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Expires, true +func (o *AccessKey) GetExpiresOk() (ret AccessKeyGetExpiresRetType, ok bool) { + return getAccessKeyGetExpiresAttributeTypeOk(o.Expires) } // SetExpires sets field value -func (o *AccessKey) SetExpires(v *string) { - o.Expires = v +func (o *AccessKey) SetExpires(v AccessKeyGetExpiresRetType) { + setAccessKeyGetExpiresAttributeType(&o.Expires, v) } // GetKeyId returns the KeyId field value -func (o *AccessKey) GetKeyId() *string { - if o == nil || IsNil(o.KeyId) { - var ret *string - return ret - } - - return o.KeyId +func (o *AccessKey) GetKeyId() (ret AccessKeyGetKeyIdRetType) { + ret, _ = o.GetKeyIdOk() + return ret } // GetKeyIdOk returns a tuple with the KeyId field value // and a boolean to check if the value has been set. -func (o *AccessKey) GetKeyIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyId, true +func (o *AccessKey) GetKeyIdOk() (ret AccessKeyGetKeyIdRetType, ok bool) { + return getAccessKeyGetKeyIdAttributeTypeOk(o.KeyId) } // SetKeyId sets field value -func (o *AccessKey) SetKeyId(v *string) { - o.KeyId = v +func (o *AccessKey) SetKeyId(v AccessKeyGetKeyIdRetType) { + setAccessKeyGetKeyIdAttributeType(&o.KeyId, v) } func (o AccessKey) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["displayName"] = o.DisplayName - toSerialize["expires"] = o.Expires - toSerialize["keyId"] = o.KeyId + if val, ok := getAccessKeyGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val + } + if val, ok := getAccessKeyGetExpiresAttributeTypeOk(o.Expires); ok { + toSerialize["Expires"] = val + } + if val, ok := getAccessKeyGetKeyIdAttributeTypeOk(o.KeyId); ok { + toSerialize["KeyId"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_bucket.go b/services/objectstorage/model_bucket.go index 100bc70fc..4a19810e2 100644 --- a/services/objectstorage/model_bucket.go +++ b/services/objectstorage/model_bucket.go @@ -17,18 +17,102 @@ import ( // checks if the Bucket type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Bucket{} +/* + types and functions for name +*/ + +// isNotNullableString +type BucketGetNameAttributeType = *string + +func getBucketGetNameAttributeTypeOk(arg BucketGetNameAttributeType) (ret BucketGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketGetNameAttributeType(arg *BucketGetNameAttributeType, val BucketGetNameRetType) { + *arg = &val +} + +type BucketGetNameArgType = string +type BucketGetNameRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type BucketGetRegionAttributeType = *string + +func getBucketGetRegionAttributeTypeOk(arg BucketGetRegionAttributeType) (ret BucketGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketGetRegionAttributeType(arg *BucketGetRegionAttributeType, val BucketGetRegionRetType) { + *arg = &val +} + +type BucketGetRegionArgType = string +type BucketGetRegionRetType = string + +/* + types and functions for urlPathStyle +*/ + +// isNotNullableString +type BucketGetUrlPathStyleAttributeType = *string + +func getBucketGetUrlPathStyleAttributeTypeOk(arg BucketGetUrlPathStyleAttributeType) (ret BucketGetUrlPathStyleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketGetUrlPathStyleAttributeType(arg *BucketGetUrlPathStyleAttributeType, val BucketGetUrlPathStyleRetType) { + *arg = &val +} + +type BucketGetUrlPathStyleArgType = string +type BucketGetUrlPathStyleRetType = string + +/* + types and functions for urlVirtualHostedStyle +*/ + +// isNotNullableString +type BucketGetUrlVirtualHostedStyleAttributeType = *string + +func getBucketGetUrlVirtualHostedStyleAttributeTypeOk(arg BucketGetUrlVirtualHostedStyleAttributeType) (ret BucketGetUrlVirtualHostedStyleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketGetUrlVirtualHostedStyleAttributeType(arg *BucketGetUrlVirtualHostedStyleAttributeType, val BucketGetUrlVirtualHostedStyleRetType) { + *arg = &val +} + +type BucketGetUrlVirtualHostedStyleArgType = string +type BucketGetUrlVirtualHostedStyleRetType = string + // Bucket struct for Bucket type Bucket struct { // REQUIRED - Name *string `json:"name"` + Name BucketGetNameAttributeType `json:"name"` // REQUIRED - Region *string `json:"region"` + Region BucketGetRegionAttributeType `json:"region"` // URL in path style // REQUIRED - UrlPathStyle *string `json:"urlPathStyle"` + UrlPathStyle BucketGetUrlPathStyleAttributeType `json:"urlPathStyle"` // URL in virtual hosted style // REQUIRED - UrlVirtualHostedStyle *string `json:"urlVirtualHostedStyle"` + UrlVirtualHostedStyle BucketGetUrlVirtualHostedStyleAttributeType `json:"urlVirtualHostedStyle"` } type _Bucket Bucket @@ -37,12 +121,12 @@ type _Bucket Bucket // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewBucket(name *string, region *string, urlPathStyle *string, urlVirtualHostedStyle *string) *Bucket { +func NewBucket(name BucketGetNameArgType, region BucketGetRegionArgType, urlPathStyle BucketGetUrlPathStyleArgType, urlVirtualHostedStyle BucketGetUrlVirtualHostedStyleArgType) *Bucket { this := Bucket{} - this.Name = name - this.Region = region - this.UrlPathStyle = urlPathStyle - this.UrlVirtualHostedStyle = urlVirtualHostedStyle + setBucketGetNameAttributeType(&this.Name, name) + setBucketGetRegionAttributeType(&this.Region, region) + setBucketGetUrlPathStyleAttributeType(&this.UrlPathStyle, urlPathStyle) + setBucketGetUrlVirtualHostedStyleAttributeType(&this.UrlVirtualHostedStyle, urlVirtualHostedStyle) return &this } @@ -55,107 +139,87 @@ func NewBucketWithDefaults() *Bucket { } // GetName returns the Name field value -func (o *Bucket) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *Bucket) GetName() (ret BucketGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *Bucket) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *Bucket) GetNameOk() (ret BucketGetNameRetType, ok bool) { + return getBucketGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *Bucket) SetName(v *string) { - o.Name = v +func (o *Bucket) SetName(v BucketGetNameRetType) { + setBucketGetNameAttributeType(&o.Name, v) } // GetRegion returns the Region field value -func (o *Bucket) GetRegion() *string { - if o == nil || IsNil(o.Region) { - var ret *string - return ret - } - - return o.Region +func (o *Bucket) GetRegion() (ret BucketGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret } // GetRegionOk returns a tuple with the Region field value // and a boolean to check if the value has been set. -func (o *Bucket) GetRegionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Region, true +func (o *Bucket) GetRegionOk() (ret BucketGetRegionRetType, ok bool) { + return getBucketGetRegionAttributeTypeOk(o.Region) } // SetRegion sets field value -func (o *Bucket) SetRegion(v *string) { - o.Region = v +func (o *Bucket) SetRegion(v BucketGetRegionRetType) { + setBucketGetRegionAttributeType(&o.Region, v) } // GetUrlPathStyle returns the UrlPathStyle field value -func (o *Bucket) GetUrlPathStyle() *string { - if o == nil || IsNil(o.UrlPathStyle) { - var ret *string - return ret - } - - return o.UrlPathStyle +func (o *Bucket) GetUrlPathStyle() (ret BucketGetUrlPathStyleRetType) { + ret, _ = o.GetUrlPathStyleOk() + return ret } // GetUrlPathStyleOk returns a tuple with the UrlPathStyle field value // and a boolean to check if the value has been set. -func (o *Bucket) GetUrlPathStyleOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.UrlPathStyle, true +func (o *Bucket) GetUrlPathStyleOk() (ret BucketGetUrlPathStyleRetType, ok bool) { + return getBucketGetUrlPathStyleAttributeTypeOk(o.UrlPathStyle) } // SetUrlPathStyle sets field value -func (o *Bucket) SetUrlPathStyle(v *string) { - o.UrlPathStyle = v +func (o *Bucket) SetUrlPathStyle(v BucketGetUrlPathStyleRetType) { + setBucketGetUrlPathStyleAttributeType(&o.UrlPathStyle, v) } // GetUrlVirtualHostedStyle returns the UrlVirtualHostedStyle field value -func (o *Bucket) GetUrlVirtualHostedStyle() *string { - if o == nil || IsNil(o.UrlVirtualHostedStyle) { - var ret *string - return ret - } - - return o.UrlVirtualHostedStyle +func (o *Bucket) GetUrlVirtualHostedStyle() (ret BucketGetUrlVirtualHostedStyleRetType) { + ret, _ = o.GetUrlVirtualHostedStyleOk() + return ret } // GetUrlVirtualHostedStyleOk returns a tuple with the UrlVirtualHostedStyle field value // and a boolean to check if the value has been set. -func (o *Bucket) GetUrlVirtualHostedStyleOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.UrlVirtualHostedStyle, true +func (o *Bucket) GetUrlVirtualHostedStyleOk() (ret BucketGetUrlVirtualHostedStyleRetType, ok bool) { + return getBucketGetUrlVirtualHostedStyleAttributeTypeOk(o.UrlVirtualHostedStyle) } // SetUrlVirtualHostedStyle sets field value -func (o *Bucket) SetUrlVirtualHostedStyle(v *string) { - o.UrlVirtualHostedStyle = v +func (o *Bucket) SetUrlVirtualHostedStyle(v BucketGetUrlVirtualHostedStyleRetType) { + setBucketGetUrlVirtualHostedStyleAttributeType(&o.UrlVirtualHostedStyle, v) } func (o Bucket) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["region"] = o.Region - toSerialize["urlPathStyle"] = o.UrlPathStyle - toSerialize["urlVirtualHostedStyle"] = o.UrlVirtualHostedStyle + if val, ok := getBucketGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getBucketGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getBucketGetUrlPathStyleAttributeTypeOk(o.UrlPathStyle); ok { + toSerialize["UrlPathStyle"] = val + } + if val, ok := getBucketGetUrlVirtualHostedStyleAttributeTypeOk(o.UrlVirtualHostedStyle); ok { + toSerialize["UrlVirtualHostedStyle"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_create_access_key_payload.go b/services/objectstorage/model_create_access_key_payload.go index decb82e28..c499d6fb3 100644 --- a/services/objectstorage/model_create_access_key_payload.go +++ b/services/objectstorage/model_create_access_key_payload.go @@ -18,10 +18,30 @@ import ( // checks if the CreateAccessKeyPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateAccessKeyPayload{} +/* + types and functions for expires +*/ + +// isDateTime +type CreateAccessKeyPayloadGetExpiresAttributeType = *time.Time +type CreateAccessKeyPayloadGetExpiresArgType = time.Time +type CreateAccessKeyPayloadGetExpiresRetType = time.Time + +func getCreateAccessKeyPayloadGetExpiresAttributeTypeOk(arg CreateAccessKeyPayloadGetExpiresAttributeType) (ret CreateAccessKeyPayloadGetExpiresRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAccessKeyPayloadGetExpiresAttributeType(arg *CreateAccessKeyPayloadGetExpiresAttributeType, val CreateAccessKeyPayloadGetExpiresRetType) { + *arg = &val +} + // CreateAccessKeyPayload struct for CreateAccessKeyPayload type CreateAccessKeyPayload struct { // Expiration date. Null means never expires. - Expires *time.Time `json:"expires,omitempty"` + Expires CreateAccessKeyPayloadGetExpiresAttributeType `json:"expires,omitempty"` } // NewCreateAccessKeyPayload instantiates a new CreateAccessKeyPayload object @@ -42,41 +62,32 @@ func NewCreateAccessKeyPayloadWithDefaults() *CreateAccessKeyPayload { } // GetExpires returns the Expires field value if set, zero value otherwise. -func (o *CreateAccessKeyPayload) GetExpires() *time.Time { - if o == nil || IsNil(o.Expires) { - var ret *time.Time - return ret - } - return o.Expires +func (o *CreateAccessKeyPayload) GetExpires() (res CreateAccessKeyPayloadGetExpiresRetType) { + res, _ = o.GetExpiresOk() + return } // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateAccessKeyPayload) GetExpiresOk() (*time.Time, bool) { - if o == nil || IsNil(o.Expires) { - return nil, false - } - return o.Expires, true +func (o *CreateAccessKeyPayload) GetExpiresOk() (ret CreateAccessKeyPayloadGetExpiresRetType, ok bool) { + return getCreateAccessKeyPayloadGetExpiresAttributeTypeOk(o.Expires) } // HasExpires returns a boolean if a field has been set. func (o *CreateAccessKeyPayload) HasExpires() bool { - if o != nil && !IsNil(o.Expires) { - return true - } - - return false + _, ok := o.GetExpiresOk() + return ok } // SetExpires gets a reference to the given time.Time and assigns it to the Expires field. -func (o *CreateAccessKeyPayload) SetExpires(v *time.Time) { - o.Expires = v +func (o *CreateAccessKeyPayload) SetExpires(v CreateAccessKeyPayloadGetExpiresRetType) { + setCreateAccessKeyPayloadGetExpiresAttributeType(&o.Expires, v) } func (o CreateAccessKeyPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Expires) { - toSerialize["expires"] = o.Expires + if val, ok := getCreateAccessKeyPayloadGetExpiresAttributeTypeOk(o.Expires); ok { + toSerialize["Expires"] = val } return toSerialize, nil } diff --git a/services/objectstorage/model_create_access_key_response.go b/services/objectstorage/model_create_access_key_response.go index 6d5aff58c..faa66b322 100644 --- a/services/objectstorage/model_create_access_key_response.go +++ b/services/objectstorage/model_create_access_key_response.go @@ -17,26 +17,152 @@ import ( // checks if the CreateAccessKeyResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateAccessKeyResponse{} +/* + types and functions for accessKey +*/ + +// isNotNullableString +type CreateAccessKeyResponseGetAccessKeyAttributeType = *string + +func getCreateAccessKeyResponseGetAccessKeyAttributeTypeOk(arg CreateAccessKeyResponseGetAccessKeyAttributeType) (ret CreateAccessKeyResponseGetAccessKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAccessKeyResponseGetAccessKeyAttributeType(arg *CreateAccessKeyResponseGetAccessKeyAttributeType, val CreateAccessKeyResponseGetAccessKeyRetType) { + *arg = &val +} + +type CreateAccessKeyResponseGetAccessKeyArgType = string +type CreateAccessKeyResponseGetAccessKeyRetType = string + +/* + types and functions for displayName +*/ + +// isNotNullableString +type CreateAccessKeyResponseGetDisplayNameAttributeType = *string + +func getCreateAccessKeyResponseGetDisplayNameAttributeTypeOk(arg CreateAccessKeyResponseGetDisplayNameAttributeType) (ret CreateAccessKeyResponseGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAccessKeyResponseGetDisplayNameAttributeType(arg *CreateAccessKeyResponseGetDisplayNameAttributeType, val CreateAccessKeyResponseGetDisplayNameRetType) { + *arg = &val +} + +type CreateAccessKeyResponseGetDisplayNameArgType = string +type CreateAccessKeyResponseGetDisplayNameRetType = string + +/* + types and functions for expires +*/ + +// isNotNullableString +type CreateAccessKeyResponseGetExpiresAttributeType = *string + +func getCreateAccessKeyResponseGetExpiresAttributeTypeOk(arg CreateAccessKeyResponseGetExpiresAttributeType) (ret CreateAccessKeyResponseGetExpiresRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAccessKeyResponseGetExpiresAttributeType(arg *CreateAccessKeyResponseGetExpiresAttributeType, val CreateAccessKeyResponseGetExpiresRetType) { + *arg = &val +} + +type CreateAccessKeyResponseGetExpiresArgType = string +type CreateAccessKeyResponseGetExpiresRetType = string + +/* + types and functions for keyId +*/ + +// isNotNullableString +type CreateAccessKeyResponseGetKeyIdAttributeType = *string + +func getCreateAccessKeyResponseGetKeyIdAttributeTypeOk(arg CreateAccessKeyResponseGetKeyIdAttributeType) (ret CreateAccessKeyResponseGetKeyIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAccessKeyResponseGetKeyIdAttributeType(arg *CreateAccessKeyResponseGetKeyIdAttributeType, val CreateAccessKeyResponseGetKeyIdRetType) { + *arg = &val +} + +type CreateAccessKeyResponseGetKeyIdArgType = string +type CreateAccessKeyResponseGetKeyIdRetType = string + +/* + types and functions for project +*/ + +// isNotNullableString +type CreateAccessKeyResponseGetProjectAttributeType = *string + +func getCreateAccessKeyResponseGetProjectAttributeTypeOk(arg CreateAccessKeyResponseGetProjectAttributeType) (ret CreateAccessKeyResponseGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAccessKeyResponseGetProjectAttributeType(arg *CreateAccessKeyResponseGetProjectAttributeType, val CreateAccessKeyResponseGetProjectRetType) { + *arg = &val +} + +type CreateAccessKeyResponseGetProjectArgType = string +type CreateAccessKeyResponseGetProjectRetType = string + +/* + types and functions for secretAccessKey +*/ + +// isNotNullableString +type CreateAccessKeyResponseGetSecretAccessKeyAttributeType = *string + +func getCreateAccessKeyResponseGetSecretAccessKeyAttributeTypeOk(arg CreateAccessKeyResponseGetSecretAccessKeyAttributeType) (ret CreateAccessKeyResponseGetSecretAccessKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateAccessKeyResponseGetSecretAccessKeyAttributeType(arg *CreateAccessKeyResponseGetSecretAccessKeyAttributeType, val CreateAccessKeyResponseGetSecretAccessKeyRetType) { + *arg = &val +} + +type CreateAccessKeyResponseGetSecretAccessKeyArgType = string +type CreateAccessKeyResponseGetSecretAccessKeyRetType = string + // CreateAccessKeyResponse struct for CreateAccessKeyResponse type CreateAccessKeyResponse struct { // Access key // REQUIRED - AccessKey *string `json:"accessKey"` + AccessKey CreateAccessKeyResponseGetAccessKeyAttributeType `json:"accessKey"` // Obfuscated access key // REQUIRED - DisplayName *string `json:"displayName"` + DisplayName CreateAccessKeyResponseGetDisplayNameAttributeType `json:"displayName"` // Expiration date. Null means never expires. // REQUIRED - Expires *string `json:"expires"` + Expires CreateAccessKeyResponseGetExpiresAttributeType `json:"expires"` // Identifies the pair of access key and secret access key for deletion // REQUIRED - KeyId *string `json:"keyId"` + KeyId CreateAccessKeyResponseGetKeyIdAttributeType `json:"keyId"` // Project ID // REQUIRED - Project *string `json:"project"` + Project CreateAccessKeyResponseGetProjectAttributeType `json:"project"` // Secret access key // REQUIRED - SecretAccessKey *string `json:"secretAccessKey"` + SecretAccessKey CreateAccessKeyResponseGetSecretAccessKeyAttributeType `json:"secretAccessKey"` } type _CreateAccessKeyResponse CreateAccessKeyResponse @@ -45,14 +171,14 @@ type _CreateAccessKeyResponse CreateAccessKeyResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateAccessKeyResponse(accessKey *string, displayName *string, expires *string, keyId *string, project *string, secretAccessKey *string) *CreateAccessKeyResponse { +func NewCreateAccessKeyResponse(accessKey CreateAccessKeyResponseGetAccessKeyArgType, displayName CreateAccessKeyResponseGetDisplayNameArgType, expires CreateAccessKeyResponseGetExpiresArgType, keyId CreateAccessKeyResponseGetKeyIdArgType, project CreateAccessKeyResponseGetProjectArgType, secretAccessKey CreateAccessKeyResponseGetSecretAccessKeyArgType) *CreateAccessKeyResponse { this := CreateAccessKeyResponse{} - this.AccessKey = accessKey - this.DisplayName = displayName - this.Expires = expires - this.KeyId = keyId - this.Project = project - this.SecretAccessKey = secretAccessKey + setCreateAccessKeyResponseGetAccessKeyAttributeType(&this.AccessKey, accessKey) + setCreateAccessKeyResponseGetDisplayNameAttributeType(&this.DisplayName, displayName) + setCreateAccessKeyResponseGetExpiresAttributeType(&this.Expires, expires) + setCreateAccessKeyResponseGetKeyIdAttributeType(&this.KeyId, keyId) + setCreateAccessKeyResponseGetProjectAttributeType(&this.Project, project) + setCreateAccessKeyResponseGetSecretAccessKeyAttributeType(&this.SecretAccessKey, secretAccessKey) return &this } @@ -65,157 +191,127 @@ func NewCreateAccessKeyResponseWithDefaults() *CreateAccessKeyResponse { } // GetAccessKey returns the AccessKey field value -func (o *CreateAccessKeyResponse) GetAccessKey() *string { - if o == nil || IsNil(o.AccessKey) { - var ret *string - return ret - } - - return o.AccessKey +func (o *CreateAccessKeyResponse) GetAccessKey() (ret CreateAccessKeyResponseGetAccessKeyRetType) { + ret, _ = o.GetAccessKeyOk() + return ret } // GetAccessKeyOk returns a tuple with the AccessKey field value // and a boolean to check if the value has been set. -func (o *CreateAccessKeyResponse) GetAccessKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.AccessKey, true +func (o *CreateAccessKeyResponse) GetAccessKeyOk() (ret CreateAccessKeyResponseGetAccessKeyRetType, ok bool) { + return getCreateAccessKeyResponseGetAccessKeyAttributeTypeOk(o.AccessKey) } // SetAccessKey sets field value -func (o *CreateAccessKeyResponse) SetAccessKey(v *string) { - o.AccessKey = v +func (o *CreateAccessKeyResponse) SetAccessKey(v CreateAccessKeyResponseGetAccessKeyRetType) { + setCreateAccessKeyResponseGetAccessKeyAttributeType(&o.AccessKey, v) } // GetDisplayName returns the DisplayName field value -func (o *CreateAccessKeyResponse) GetDisplayName() *string { - if o == nil || IsNil(o.DisplayName) { - var ret *string - return ret - } - - return o.DisplayName +func (o *CreateAccessKeyResponse) GetDisplayName() (ret CreateAccessKeyResponseGetDisplayNameRetType) { + ret, _ = o.GetDisplayNameOk() + return ret } // GetDisplayNameOk returns a tuple with the DisplayName field value // and a boolean to check if the value has been set. -func (o *CreateAccessKeyResponse) GetDisplayNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DisplayName, true +func (o *CreateAccessKeyResponse) GetDisplayNameOk() (ret CreateAccessKeyResponseGetDisplayNameRetType, ok bool) { + return getCreateAccessKeyResponseGetDisplayNameAttributeTypeOk(o.DisplayName) } // SetDisplayName sets field value -func (o *CreateAccessKeyResponse) SetDisplayName(v *string) { - o.DisplayName = v +func (o *CreateAccessKeyResponse) SetDisplayName(v CreateAccessKeyResponseGetDisplayNameRetType) { + setCreateAccessKeyResponseGetDisplayNameAttributeType(&o.DisplayName, v) } // GetExpires returns the Expires field value -func (o *CreateAccessKeyResponse) GetExpires() *string { - if o == nil || IsNil(o.Expires) { - var ret *string - return ret - } - - return o.Expires +func (o *CreateAccessKeyResponse) GetExpires() (ret CreateAccessKeyResponseGetExpiresRetType) { + ret, _ = o.GetExpiresOk() + return ret } // GetExpiresOk returns a tuple with the Expires field value // and a boolean to check if the value has been set. -func (o *CreateAccessKeyResponse) GetExpiresOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Expires, true +func (o *CreateAccessKeyResponse) GetExpiresOk() (ret CreateAccessKeyResponseGetExpiresRetType, ok bool) { + return getCreateAccessKeyResponseGetExpiresAttributeTypeOk(o.Expires) } // SetExpires sets field value -func (o *CreateAccessKeyResponse) SetExpires(v *string) { - o.Expires = v +func (o *CreateAccessKeyResponse) SetExpires(v CreateAccessKeyResponseGetExpiresRetType) { + setCreateAccessKeyResponseGetExpiresAttributeType(&o.Expires, v) } // GetKeyId returns the KeyId field value -func (o *CreateAccessKeyResponse) GetKeyId() *string { - if o == nil || IsNil(o.KeyId) { - var ret *string - return ret - } - - return o.KeyId +func (o *CreateAccessKeyResponse) GetKeyId() (ret CreateAccessKeyResponseGetKeyIdRetType) { + ret, _ = o.GetKeyIdOk() + return ret } // GetKeyIdOk returns a tuple with the KeyId field value // and a boolean to check if the value has been set. -func (o *CreateAccessKeyResponse) GetKeyIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyId, true +func (o *CreateAccessKeyResponse) GetKeyIdOk() (ret CreateAccessKeyResponseGetKeyIdRetType, ok bool) { + return getCreateAccessKeyResponseGetKeyIdAttributeTypeOk(o.KeyId) } // SetKeyId sets field value -func (o *CreateAccessKeyResponse) SetKeyId(v *string) { - o.KeyId = v +func (o *CreateAccessKeyResponse) SetKeyId(v CreateAccessKeyResponseGetKeyIdRetType) { + setCreateAccessKeyResponseGetKeyIdAttributeType(&o.KeyId, v) } // GetProject returns the Project field value -func (o *CreateAccessKeyResponse) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *CreateAccessKeyResponse) GetProject() (ret CreateAccessKeyResponseGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *CreateAccessKeyResponse) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *CreateAccessKeyResponse) GetProjectOk() (ret CreateAccessKeyResponseGetProjectRetType, ok bool) { + return getCreateAccessKeyResponseGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *CreateAccessKeyResponse) SetProject(v *string) { - o.Project = v +func (o *CreateAccessKeyResponse) SetProject(v CreateAccessKeyResponseGetProjectRetType) { + setCreateAccessKeyResponseGetProjectAttributeType(&o.Project, v) } // GetSecretAccessKey returns the SecretAccessKey field value -func (o *CreateAccessKeyResponse) GetSecretAccessKey() *string { - if o == nil || IsNil(o.SecretAccessKey) { - var ret *string - return ret - } - - return o.SecretAccessKey +func (o *CreateAccessKeyResponse) GetSecretAccessKey() (ret CreateAccessKeyResponseGetSecretAccessKeyRetType) { + ret, _ = o.GetSecretAccessKeyOk() + return ret } // GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field value // and a boolean to check if the value has been set. -func (o *CreateAccessKeyResponse) GetSecretAccessKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.SecretAccessKey, true +func (o *CreateAccessKeyResponse) GetSecretAccessKeyOk() (ret CreateAccessKeyResponseGetSecretAccessKeyRetType, ok bool) { + return getCreateAccessKeyResponseGetSecretAccessKeyAttributeTypeOk(o.SecretAccessKey) } // SetSecretAccessKey sets field value -func (o *CreateAccessKeyResponse) SetSecretAccessKey(v *string) { - o.SecretAccessKey = v +func (o *CreateAccessKeyResponse) SetSecretAccessKey(v CreateAccessKeyResponseGetSecretAccessKeyRetType) { + setCreateAccessKeyResponseGetSecretAccessKeyAttributeType(&o.SecretAccessKey, v) } func (o CreateAccessKeyResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["accessKey"] = o.AccessKey - toSerialize["displayName"] = o.DisplayName - toSerialize["expires"] = o.Expires - toSerialize["keyId"] = o.KeyId - toSerialize["project"] = o.Project - toSerialize["secretAccessKey"] = o.SecretAccessKey + if val, ok := getCreateAccessKeyResponseGetAccessKeyAttributeTypeOk(o.AccessKey); ok { + toSerialize["AccessKey"] = val + } + if val, ok := getCreateAccessKeyResponseGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val + } + if val, ok := getCreateAccessKeyResponseGetExpiresAttributeTypeOk(o.Expires); ok { + toSerialize["Expires"] = val + } + if val, ok := getCreateAccessKeyResponseGetKeyIdAttributeTypeOk(o.KeyId); ok { + toSerialize["KeyId"] = val + } + if val, ok := getCreateAccessKeyResponseGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } + if val, ok := getCreateAccessKeyResponseGetSecretAccessKeyAttributeTypeOk(o.SecretAccessKey); ok { + toSerialize["SecretAccessKey"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_create_bucket_response.go b/services/objectstorage/model_create_bucket_response.go index dc9df91ed..bf77bae38 100644 --- a/services/objectstorage/model_create_bucket_response.go +++ b/services/objectstorage/model_create_bucket_response.go @@ -17,14 +17,56 @@ import ( // checks if the CreateBucketResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateBucketResponse{} +/* + types and functions for bucket +*/ + +// isNotNullableString +type CreateBucketResponseGetBucketAttributeType = *string + +func getCreateBucketResponseGetBucketAttributeTypeOk(arg CreateBucketResponseGetBucketAttributeType) (ret CreateBucketResponseGetBucketRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateBucketResponseGetBucketAttributeType(arg *CreateBucketResponseGetBucketAttributeType, val CreateBucketResponseGetBucketRetType) { + *arg = &val +} + +type CreateBucketResponseGetBucketArgType = string +type CreateBucketResponseGetBucketRetType = string + +/* + types and functions for project +*/ + +// isNotNullableString +type CreateBucketResponseGetProjectAttributeType = *string + +func getCreateBucketResponseGetProjectAttributeTypeOk(arg CreateBucketResponseGetProjectAttributeType) (ret CreateBucketResponseGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateBucketResponseGetProjectAttributeType(arg *CreateBucketResponseGetProjectAttributeType, val CreateBucketResponseGetProjectRetType) { + *arg = &val +} + +type CreateBucketResponseGetProjectArgType = string +type CreateBucketResponseGetProjectRetType = string + // CreateBucketResponse struct for CreateBucketResponse type CreateBucketResponse struct { // Name of the bucket // REQUIRED - Bucket *string `json:"bucket"` + Bucket CreateBucketResponseGetBucketAttributeType `json:"bucket"` // Project ID // REQUIRED - Project *string `json:"project"` + Project CreateBucketResponseGetProjectAttributeType `json:"project"` } type _CreateBucketResponse CreateBucketResponse @@ -33,10 +75,10 @@ type _CreateBucketResponse CreateBucketResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateBucketResponse(bucket *string, project *string) *CreateBucketResponse { +func NewCreateBucketResponse(bucket CreateBucketResponseGetBucketArgType, project CreateBucketResponseGetProjectArgType) *CreateBucketResponse { this := CreateBucketResponse{} - this.Bucket = bucket - this.Project = project + setCreateBucketResponseGetBucketAttributeType(&this.Bucket, bucket) + setCreateBucketResponseGetProjectAttributeType(&this.Project, project) return &this } @@ -49,57 +91,47 @@ func NewCreateBucketResponseWithDefaults() *CreateBucketResponse { } // GetBucket returns the Bucket field value -func (o *CreateBucketResponse) GetBucket() *string { - if o == nil || IsNil(o.Bucket) { - var ret *string - return ret - } - - return o.Bucket +func (o *CreateBucketResponse) GetBucket() (ret CreateBucketResponseGetBucketRetType) { + ret, _ = o.GetBucketOk() + return ret } // GetBucketOk returns a tuple with the Bucket field value // and a boolean to check if the value has been set. -func (o *CreateBucketResponse) GetBucketOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Bucket, true +func (o *CreateBucketResponse) GetBucketOk() (ret CreateBucketResponseGetBucketRetType, ok bool) { + return getCreateBucketResponseGetBucketAttributeTypeOk(o.Bucket) } // SetBucket sets field value -func (o *CreateBucketResponse) SetBucket(v *string) { - o.Bucket = v +func (o *CreateBucketResponse) SetBucket(v CreateBucketResponseGetBucketRetType) { + setCreateBucketResponseGetBucketAttributeType(&o.Bucket, v) } // GetProject returns the Project field value -func (o *CreateBucketResponse) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *CreateBucketResponse) GetProject() (ret CreateBucketResponseGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *CreateBucketResponse) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *CreateBucketResponse) GetProjectOk() (ret CreateBucketResponseGetProjectRetType, ok bool) { + return getCreateBucketResponseGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *CreateBucketResponse) SetProject(v *string) { - o.Project = v +func (o *CreateBucketResponse) SetProject(v CreateBucketResponseGetProjectRetType) { + setCreateBucketResponseGetProjectAttributeType(&o.Project, v) } func (o CreateBucketResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["bucket"] = o.Bucket - toSerialize["project"] = o.Project + if val, ok := getCreateBucketResponseGetBucketAttributeTypeOk(o.Bucket); ok { + toSerialize["Bucket"] = val + } + if val, ok := getCreateBucketResponseGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_create_credentials_group_payload.go b/services/objectstorage/model_create_credentials_group_payload.go index cd9b683dc..6459829a8 100644 --- a/services/objectstorage/model_create_credentials_group_payload.go +++ b/services/objectstorage/model_create_credentials_group_payload.go @@ -17,11 +17,32 @@ import ( // checks if the CreateCredentialsGroupPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateCredentialsGroupPayload{} +/* + types and functions for displayName +*/ + +// isNotNullableString +type CreateCredentialsGroupPayloadGetDisplayNameAttributeType = *string + +func getCreateCredentialsGroupPayloadGetDisplayNameAttributeTypeOk(arg CreateCredentialsGroupPayloadGetDisplayNameAttributeType) (ret CreateCredentialsGroupPayloadGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateCredentialsGroupPayloadGetDisplayNameAttributeType(arg *CreateCredentialsGroupPayloadGetDisplayNameAttributeType, val CreateCredentialsGroupPayloadGetDisplayNameRetType) { + *arg = &val +} + +type CreateCredentialsGroupPayloadGetDisplayNameArgType = string +type CreateCredentialsGroupPayloadGetDisplayNameRetType = string + // CreateCredentialsGroupPayload struct for CreateCredentialsGroupPayload type CreateCredentialsGroupPayload struct { // Name of the group holding credentials // REQUIRED - DisplayName *string `json:"displayName"` + DisplayName CreateCredentialsGroupPayloadGetDisplayNameAttributeType `json:"displayName"` } type _CreateCredentialsGroupPayload CreateCredentialsGroupPayload @@ -30,9 +51,9 @@ type _CreateCredentialsGroupPayload CreateCredentialsGroupPayload // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateCredentialsGroupPayload(displayName *string) *CreateCredentialsGroupPayload { +func NewCreateCredentialsGroupPayload(displayName CreateCredentialsGroupPayloadGetDisplayNameArgType) *CreateCredentialsGroupPayload { this := CreateCredentialsGroupPayload{} - this.DisplayName = displayName + setCreateCredentialsGroupPayloadGetDisplayNameAttributeType(&this.DisplayName, displayName) return &this } @@ -45,32 +66,27 @@ func NewCreateCredentialsGroupPayloadWithDefaults() *CreateCredentialsGroupPaylo } // GetDisplayName returns the DisplayName field value -func (o *CreateCredentialsGroupPayload) GetDisplayName() *string { - if o == nil || IsNil(o.DisplayName) { - var ret *string - return ret - } - - return o.DisplayName +func (o *CreateCredentialsGroupPayload) GetDisplayName() (ret CreateCredentialsGroupPayloadGetDisplayNameRetType) { + ret, _ = o.GetDisplayNameOk() + return ret } // GetDisplayNameOk returns a tuple with the DisplayName field value // and a boolean to check if the value has been set. -func (o *CreateCredentialsGroupPayload) GetDisplayNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DisplayName, true +func (o *CreateCredentialsGroupPayload) GetDisplayNameOk() (ret CreateCredentialsGroupPayloadGetDisplayNameRetType, ok bool) { + return getCreateCredentialsGroupPayloadGetDisplayNameAttributeTypeOk(o.DisplayName) } // SetDisplayName sets field value -func (o *CreateCredentialsGroupPayload) SetDisplayName(v *string) { - o.DisplayName = v +func (o *CreateCredentialsGroupPayload) SetDisplayName(v CreateCredentialsGroupPayloadGetDisplayNameRetType) { + setCreateCredentialsGroupPayloadGetDisplayNameAttributeType(&o.DisplayName, v) } func (o CreateCredentialsGroupPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["displayName"] = o.DisplayName + if val, ok := getCreateCredentialsGroupPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_create_credentials_group_response.go b/services/objectstorage/model_create_credentials_group_response.go index 97becee1f..c2574197e 100644 --- a/services/objectstorage/model_create_credentials_group_response.go +++ b/services/objectstorage/model_create_credentials_group_response.go @@ -17,13 +17,54 @@ import ( // checks if the CreateCredentialsGroupResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateCredentialsGroupResponse{} +/* + types and functions for credentialsGroup +*/ + +// isModel +type CreateCredentialsGroupResponseGetCredentialsGroupAttributeType = *CredentialsGroup +type CreateCredentialsGroupResponseGetCredentialsGroupArgType = CredentialsGroup +type CreateCredentialsGroupResponseGetCredentialsGroupRetType = CredentialsGroup + +func getCreateCredentialsGroupResponseGetCredentialsGroupAttributeTypeOk(arg CreateCredentialsGroupResponseGetCredentialsGroupAttributeType) (ret CreateCredentialsGroupResponseGetCredentialsGroupRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateCredentialsGroupResponseGetCredentialsGroupAttributeType(arg *CreateCredentialsGroupResponseGetCredentialsGroupAttributeType, val CreateCredentialsGroupResponseGetCredentialsGroupRetType) { + *arg = &val +} + +/* + types and functions for project +*/ + +// isNotNullableString +type CreateCredentialsGroupResponseGetProjectAttributeType = *string + +func getCreateCredentialsGroupResponseGetProjectAttributeTypeOk(arg CreateCredentialsGroupResponseGetProjectAttributeType) (ret CreateCredentialsGroupResponseGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateCredentialsGroupResponseGetProjectAttributeType(arg *CreateCredentialsGroupResponseGetProjectAttributeType, val CreateCredentialsGroupResponseGetProjectRetType) { + *arg = &val +} + +type CreateCredentialsGroupResponseGetProjectArgType = string +type CreateCredentialsGroupResponseGetProjectRetType = string + // CreateCredentialsGroupResponse struct for CreateCredentialsGroupResponse type CreateCredentialsGroupResponse struct { // REQUIRED - CredentialsGroup *CredentialsGroup `json:"credentialsGroup"` + CredentialsGroup CreateCredentialsGroupResponseGetCredentialsGroupAttributeType `json:"credentialsGroup"` // Project ID // REQUIRED - Project *string `json:"project"` + Project CreateCredentialsGroupResponseGetProjectAttributeType `json:"project"` } type _CreateCredentialsGroupResponse CreateCredentialsGroupResponse @@ -32,10 +73,10 @@ type _CreateCredentialsGroupResponse CreateCredentialsGroupResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateCredentialsGroupResponse(credentialsGroup *CredentialsGroup, project *string) *CreateCredentialsGroupResponse { +func NewCreateCredentialsGroupResponse(credentialsGroup CreateCredentialsGroupResponseGetCredentialsGroupArgType, project CreateCredentialsGroupResponseGetProjectArgType) *CreateCredentialsGroupResponse { this := CreateCredentialsGroupResponse{} - this.CredentialsGroup = credentialsGroup - this.Project = project + setCreateCredentialsGroupResponseGetCredentialsGroupAttributeType(&this.CredentialsGroup, credentialsGroup) + setCreateCredentialsGroupResponseGetProjectAttributeType(&this.Project, project) return &this } @@ -48,57 +89,47 @@ func NewCreateCredentialsGroupResponseWithDefaults() *CreateCredentialsGroupResp } // GetCredentialsGroup returns the CredentialsGroup field value -func (o *CreateCredentialsGroupResponse) GetCredentialsGroup() *CredentialsGroup { - if o == nil || IsNil(o.CredentialsGroup) { - var ret *CredentialsGroup - return ret - } - - return o.CredentialsGroup +func (o *CreateCredentialsGroupResponse) GetCredentialsGroup() (ret CreateCredentialsGroupResponseGetCredentialsGroupRetType) { + ret, _ = o.GetCredentialsGroupOk() + return ret } // GetCredentialsGroupOk returns a tuple with the CredentialsGroup field value // and a boolean to check if the value has been set. -func (o *CreateCredentialsGroupResponse) GetCredentialsGroupOk() (*CredentialsGroup, bool) { - if o == nil { - return nil, false - } - return o.CredentialsGroup, true +func (o *CreateCredentialsGroupResponse) GetCredentialsGroupOk() (ret CreateCredentialsGroupResponseGetCredentialsGroupRetType, ok bool) { + return getCreateCredentialsGroupResponseGetCredentialsGroupAttributeTypeOk(o.CredentialsGroup) } // SetCredentialsGroup sets field value -func (o *CreateCredentialsGroupResponse) SetCredentialsGroup(v *CredentialsGroup) { - o.CredentialsGroup = v +func (o *CreateCredentialsGroupResponse) SetCredentialsGroup(v CreateCredentialsGroupResponseGetCredentialsGroupRetType) { + setCreateCredentialsGroupResponseGetCredentialsGroupAttributeType(&o.CredentialsGroup, v) } // GetProject returns the Project field value -func (o *CreateCredentialsGroupResponse) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *CreateCredentialsGroupResponse) GetProject() (ret CreateCredentialsGroupResponseGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *CreateCredentialsGroupResponse) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *CreateCredentialsGroupResponse) GetProjectOk() (ret CreateCredentialsGroupResponseGetProjectRetType, ok bool) { + return getCreateCredentialsGroupResponseGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *CreateCredentialsGroupResponse) SetProject(v *string) { - o.Project = v +func (o *CreateCredentialsGroupResponse) SetProject(v CreateCredentialsGroupResponseGetProjectRetType) { + setCreateCredentialsGroupResponseGetProjectAttributeType(&o.Project, v) } func (o CreateCredentialsGroupResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["credentialsGroup"] = o.CredentialsGroup - toSerialize["project"] = o.Project + if val, ok := getCreateCredentialsGroupResponseGetCredentialsGroupAttributeTypeOk(o.CredentialsGroup); ok { + toSerialize["CredentialsGroup"] = val + } + if val, ok := getCreateCredentialsGroupResponseGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_credentials_group.go b/services/objectstorage/model_credentials_group.go index 7f0ab72a9..972f2bca1 100644 --- a/services/objectstorage/model_credentials_group.go +++ b/services/objectstorage/model_credentials_group.go @@ -17,17 +17,80 @@ import ( // checks if the CredentialsGroup type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CredentialsGroup{} +/* + types and functions for credentialsGroupId +*/ + +// isNotNullableString +type CredentialsGroupGetCredentialsGroupIdAttributeType = *string + +func getCredentialsGroupGetCredentialsGroupIdAttributeTypeOk(arg CredentialsGroupGetCredentialsGroupIdAttributeType) (ret CredentialsGroupGetCredentialsGroupIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsGroupGetCredentialsGroupIdAttributeType(arg *CredentialsGroupGetCredentialsGroupIdAttributeType, val CredentialsGroupGetCredentialsGroupIdRetType) { + *arg = &val +} + +type CredentialsGroupGetCredentialsGroupIdArgType = string +type CredentialsGroupGetCredentialsGroupIdRetType = string + +/* + types and functions for displayName +*/ + +// isNotNullableString +type CredentialsGroupGetDisplayNameAttributeType = *string + +func getCredentialsGroupGetDisplayNameAttributeTypeOk(arg CredentialsGroupGetDisplayNameAttributeType) (ret CredentialsGroupGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsGroupGetDisplayNameAttributeType(arg *CredentialsGroupGetDisplayNameAttributeType, val CredentialsGroupGetDisplayNameRetType) { + *arg = &val +} + +type CredentialsGroupGetDisplayNameArgType = string +type CredentialsGroupGetDisplayNameRetType = string + +/* + types and functions for urn +*/ + +// isNotNullableString +type CredentialsGroupGetUrnAttributeType = *string + +func getCredentialsGroupGetUrnAttributeTypeOk(arg CredentialsGroupGetUrnAttributeType) (ret CredentialsGroupGetUrnRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCredentialsGroupGetUrnAttributeType(arg *CredentialsGroupGetUrnAttributeType, val CredentialsGroupGetUrnRetType) { + *arg = &val +} + +type CredentialsGroupGetUrnArgType = string +type CredentialsGroupGetUrnRetType = string + // CredentialsGroup struct for CredentialsGroup type CredentialsGroup struct { // The ID of the credentials group // REQUIRED - CredentialsGroupId *string `json:"credentialsGroupId"` + CredentialsGroupId CredentialsGroupGetCredentialsGroupIdAttributeType `json:"credentialsGroupId"` // Name of the group holding credentials // REQUIRED - DisplayName *string `json:"displayName"` + DisplayName CredentialsGroupGetDisplayNameAttributeType `json:"displayName"` // Credentials group URN // REQUIRED - Urn *string `json:"urn"` + Urn CredentialsGroupGetUrnAttributeType `json:"urn"` } type _CredentialsGroup CredentialsGroup @@ -36,11 +99,11 @@ type _CredentialsGroup CredentialsGroup // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCredentialsGroup(credentialsGroupId *string, displayName *string, urn *string) *CredentialsGroup { +func NewCredentialsGroup(credentialsGroupId CredentialsGroupGetCredentialsGroupIdArgType, displayName CredentialsGroupGetDisplayNameArgType, urn CredentialsGroupGetUrnArgType) *CredentialsGroup { this := CredentialsGroup{} - this.CredentialsGroupId = credentialsGroupId - this.DisplayName = displayName - this.Urn = urn + setCredentialsGroupGetCredentialsGroupIdAttributeType(&this.CredentialsGroupId, credentialsGroupId) + setCredentialsGroupGetDisplayNameAttributeType(&this.DisplayName, displayName) + setCredentialsGroupGetUrnAttributeType(&this.Urn, urn) return &this } @@ -53,82 +116,67 @@ func NewCredentialsGroupWithDefaults() *CredentialsGroup { } // GetCredentialsGroupId returns the CredentialsGroupId field value -func (o *CredentialsGroup) GetCredentialsGroupId() *string { - if o == nil || IsNil(o.CredentialsGroupId) { - var ret *string - return ret - } - - return o.CredentialsGroupId +func (o *CredentialsGroup) GetCredentialsGroupId() (ret CredentialsGroupGetCredentialsGroupIdRetType) { + ret, _ = o.GetCredentialsGroupIdOk() + return ret } // GetCredentialsGroupIdOk returns a tuple with the CredentialsGroupId field value // and a boolean to check if the value has been set. -func (o *CredentialsGroup) GetCredentialsGroupIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CredentialsGroupId, true +func (o *CredentialsGroup) GetCredentialsGroupIdOk() (ret CredentialsGroupGetCredentialsGroupIdRetType, ok bool) { + return getCredentialsGroupGetCredentialsGroupIdAttributeTypeOk(o.CredentialsGroupId) } // SetCredentialsGroupId sets field value -func (o *CredentialsGroup) SetCredentialsGroupId(v *string) { - o.CredentialsGroupId = v +func (o *CredentialsGroup) SetCredentialsGroupId(v CredentialsGroupGetCredentialsGroupIdRetType) { + setCredentialsGroupGetCredentialsGroupIdAttributeType(&o.CredentialsGroupId, v) } // GetDisplayName returns the DisplayName field value -func (o *CredentialsGroup) GetDisplayName() *string { - if o == nil || IsNil(o.DisplayName) { - var ret *string - return ret - } - - return o.DisplayName +func (o *CredentialsGroup) GetDisplayName() (ret CredentialsGroupGetDisplayNameRetType) { + ret, _ = o.GetDisplayNameOk() + return ret } // GetDisplayNameOk returns a tuple with the DisplayName field value // and a boolean to check if the value has been set. -func (o *CredentialsGroup) GetDisplayNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DisplayName, true +func (o *CredentialsGroup) GetDisplayNameOk() (ret CredentialsGroupGetDisplayNameRetType, ok bool) { + return getCredentialsGroupGetDisplayNameAttributeTypeOk(o.DisplayName) } // SetDisplayName sets field value -func (o *CredentialsGroup) SetDisplayName(v *string) { - o.DisplayName = v +func (o *CredentialsGroup) SetDisplayName(v CredentialsGroupGetDisplayNameRetType) { + setCredentialsGroupGetDisplayNameAttributeType(&o.DisplayName, v) } // GetUrn returns the Urn field value -func (o *CredentialsGroup) GetUrn() *string { - if o == nil || IsNil(o.Urn) { - var ret *string - return ret - } - - return o.Urn +func (o *CredentialsGroup) GetUrn() (ret CredentialsGroupGetUrnRetType) { + ret, _ = o.GetUrnOk() + return ret } // GetUrnOk returns a tuple with the Urn field value // and a boolean to check if the value has been set. -func (o *CredentialsGroup) GetUrnOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Urn, true +func (o *CredentialsGroup) GetUrnOk() (ret CredentialsGroupGetUrnRetType, ok bool) { + return getCredentialsGroupGetUrnAttributeTypeOk(o.Urn) } // SetUrn sets field value -func (o *CredentialsGroup) SetUrn(v *string) { - o.Urn = v +func (o *CredentialsGroup) SetUrn(v CredentialsGroupGetUrnRetType) { + setCredentialsGroupGetUrnAttributeType(&o.Urn, v) } func (o CredentialsGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["credentialsGroupId"] = o.CredentialsGroupId - toSerialize["displayName"] = o.DisplayName - toSerialize["urn"] = o.Urn + if val, ok := getCredentialsGroupGetCredentialsGroupIdAttributeTypeOk(o.CredentialsGroupId); ok { + toSerialize["CredentialsGroupId"] = val + } + if val, ok := getCredentialsGroupGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val + } + if val, ok := getCredentialsGroupGetUrnAttributeTypeOk(o.Urn); ok { + toSerialize["Urn"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_delete_access_key_response.go b/services/objectstorage/model_delete_access_key_response.go index 6380c652d..6007f10b7 100644 --- a/services/objectstorage/model_delete_access_key_response.go +++ b/services/objectstorage/model_delete_access_key_response.go @@ -17,14 +17,56 @@ import ( // checks if the DeleteAccessKeyResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DeleteAccessKeyResponse{} +/* + types and functions for keyId +*/ + +// isNotNullableString +type DeleteAccessKeyResponseGetKeyIdAttributeType = *string + +func getDeleteAccessKeyResponseGetKeyIdAttributeTypeOk(arg DeleteAccessKeyResponseGetKeyIdAttributeType) (ret DeleteAccessKeyResponseGetKeyIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDeleteAccessKeyResponseGetKeyIdAttributeType(arg *DeleteAccessKeyResponseGetKeyIdAttributeType, val DeleteAccessKeyResponseGetKeyIdRetType) { + *arg = &val +} + +type DeleteAccessKeyResponseGetKeyIdArgType = string +type DeleteAccessKeyResponseGetKeyIdRetType = string + +/* + types and functions for project +*/ + +// isNotNullableString +type DeleteAccessKeyResponseGetProjectAttributeType = *string + +func getDeleteAccessKeyResponseGetProjectAttributeTypeOk(arg DeleteAccessKeyResponseGetProjectAttributeType) (ret DeleteAccessKeyResponseGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDeleteAccessKeyResponseGetProjectAttributeType(arg *DeleteAccessKeyResponseGetProjectAttributeType, val DeleteAccessKeyResponseGetProjectRetType) { + *arg = &val +} + +type DeleteAccessKeyResponseGetProjectArgType = string +type DeleteAccessKeyResponseGetProjectRetType = string + // DeleteAccessKeyResponse struct for DeleteAccessKeyResponse type DeleteAccessKeyResponse struct { // Identifies the pair of access key and secret access key for deletion // REQUIRED - KeyId *string `json:"keyId"` + KeyId DeleteAccessKeyResponseGetKeyIdAttributeType `json:"keyId"` // Project ID // REQUIRED - Project *string `json:"project"` + Project DeleteAccessKeyResponseGetProjectAttributeType `json:"project"` } type _DeleteAccessKeyResponse DeleteAccessKeyResponse @@ -33,10 +75,10 @@ type _DeleteAccessKeyResponse DeleteAccessKeyResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewDeleteAccessKeyResponse(keyId *string, project *string) *DeleteAccessKeyResponse { +func NewDeleteAccessKeyResponse(keyId DeleteAccessKeyResponseGetKeyIdArgType, project DeleteAccessKeyResponseGetProjectArgType) *DeleteAccessKeyResponse { this := DeleteAccessKeyResponse{} - this.KeyId = keyId - this.Project = project + setDeleteAccessKeyResponseGetKeyIdAttributeType(&this.KeyId, keyId) + setDeleteAccessKeyResponseGetProjectAttributeType(&this.Project, project) return &this } @@ -49,57 +91,47 @@ func NewDeleteAccessKeyResponseWithDefaults() *DeleteAccessKeyResponse { } // GetKeyId returns the KeyId field value -func (o *DeleteAccessKeyResponse) GetKeyId() *string { - if o == nil || IsNil(o.KeyId) { - var ret *string - return ret - } - - return o.KeyId +func (o *DeleteAccessKeyResponse) GetKeyId() (ret DeleteAccessKeyResponseGetKeyIdRetType) { + ret, _ = o.GetKeyIdOk() + return ret } // GetKeyIdOk returns a tuple with the KeyId field value // and a boolean to check if the value has been set. -func (o *DeleteAccessKeyResponse) GetKeyIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyId, true +func (o *DeleteAccessKeyResponse) GetKeyIdOk() (ret DeleteAccessKeyResponseGetKeyIdRetType, ok bool) { + return getDeleteAccessKeyResponseGetKeyIdAttributeTypeOk(o.KeyId) } // SetKeyId sets field value -func (o *DeleteAccessKeyResponse) SetKeyId(v *string) { - o.KeyId = v +func (o *DeleteAccessKeyResponse) SetKeyId(v DeleteAccessKeyResponseGetKeyIdRetType) { + setDeleteAccessKeyResponseGetKeyIdAttributeType(&o.KeyId, v) } // GetProject returns the Project field value -func (o *DeleteAccessKeyResponse) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *DeleteAccessKeyResponse) GetProject() (ret DeleteAccessKeyResponseGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *DeleteAccessKeyResponse) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *DeleteAccessKeyResponse) GetProjectOk() (ret DeleteAccessKeyResponseGetProjectRetType, ok bool) { + return getDeleteAccessKeyResponseGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *DeleteAccessKeyResponse) SetProject(v *string) { - o.Project = v +func (o *DeleteAccessKeyResponse) SetProject(v DeleteAccessKeyResponseGetProjectRetType) { + setDeleteAccessKeyResponseGetProjectAttributeType(&o.Project, v) } func (o DeleteAccessKeyResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["keyId"] = o.KeyId - toSerialize["project"] = o.Project + if val, ok := getDeleteAccessKeyResponseGetKeyIdAttributeTypeOk(o.KeyId); ok { + toSerialize["KeyId"] = val + } + if val, ok := getDeleteAccessKeyResponseGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_delete_bucket_response.go b/services/objectstorage/model_delete_bucket_response.go index 758d74deb..bfbc9b635 100644 --- a/services/objectstorage/model_delete_bucket_response.go +++ b/services/objectstorage/model_delete_bucket_response.go @@ -17,14 +17,56 @@ import ( // checks if the DeleteBucketResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DeleteBucketResponse{} +/* + types and functions for bucket +*/ + +// isNotNullableString +type DeleteBucketResponseGetBucketAttributeType = *string + +func getDeleteBucketResponseGetBucketAttributeTypeOk(arg DeleteBucketResponseGetBucketAttributeType) (ret DeleteBucketResponseGetBucketRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDeleteBucketResponseGetBucketAttributeType(arg *DeleteBucketResponseGetBucketAttributeType, val DeleteBucketResponseGetBucketRetType) { + *arg = &val +} + +type DeleteBucketResponseGetBucketArgType = string +type DeleteBucketResponseGetBucketRetType = string + +/* + types and functions for project +*/ + +// isNotNullableString +type DeleteBucketResponseGetProjectAttributeType = *string + +func getDeleteBucketResponseGetProjectAttributeTypeOk(arg DeleteBucketResponseGetProjectAttributeType) (ret DeleteBucketResponseGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDeleteBucketResponseGetProjectAttributeType(arg *DeleteBucketResponseGetProjectAttributeType, val DeleteBucketResponseGetProjectRetType) { + *arg = &val +} + +type DeleteBucketResponseGetProjectArgType = string +type DeleteBucketResponseGetProjectRetType = string + // DeleteBucketResponse struct for DeleteBucketResponse type DeleteBucketResponse struct { // Name of the bucket // REQUIRED - Bucket *string `json:"bucket"` + Bucket DeleteBucketResponseGetBucketAttributeType `json:"bucket"` // Project ID // REQUIRED - Project *string `json:"project"` + Project DeleteBucketResponseGetProjectAttributeType `json:"project"` } type _DeleteBucketResponse DeleteBucketResponse @@ -33,10 +75,10 @@ type _DeleteBucketResponse DeleteBucketResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewDeleteBucketResponse(bucket *string, project *string) *DeleteBucketResponse { +func NewDeleteBucketResponse(bucket DeleteBucketResponseGetBucketArgType, project DeleteBucketResponseGetProjectArgType) *DeleteBucketResponse { this := DeleteBucketResponse{} - this.Bucket = bucket - this.Project = project + setDeleteBucketResponseGetBucketAttributeType(&this.Bucket, bucket) + setDeleteBucketResponseGetProjectAttributeType(&this.Project, project) return &this } @@ -49,57 +91,47 @@ func NewDeleteBucketResponseWithDefaults() *DeleteBucketResponse { } // GetBucket returns the Bucket field value -func (o *DeleteBucketResponse) GetBucket() *string { - if o == nil || IsNil(o.Bucket) { - var ret *string - return ret - } - - return o.Bucket +func (o *DeleteBucketResponse) GetBucket() (ret DeleteBucketResponseGetBucketRetType) { + ret, _ = o.GetBucketOk() + return ret } // GetBucketOk returns a tuple with the Bucket field value // and a boolean to check if the value has been set. -func (o *DeleteBucketResponse) GetBucketOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Bucket, true +func (o *DeleteBucketResponse) GetBucketOk() (ret DeleteBucketResponseGetBucketRetType, ok bool) { + return getDeleteBucketResponseGetBucketAttributeTypeOk(o.Bucket) } // SetBucket sets field value -func (o *DeleteBucketResponse) SetBucket(v *string) { - o.Bucket = v +func (o *DeleteBucketResponse) SetBucket(v DeleteBucketResponseGetBucketRetType) { + setDeleteBucketResponseGetBucketAttributeType(&o.Bucket, v) } // GetProject returns the Project field value -func (o *DeleteBucketResponse) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *DeleteBucketResponse) GetProject() (ret DeleteBucketResponseGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *DeleteBucketResponse) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *DeleteBucketResponse) GetProjectOk() (ret DeleteBucketResponseGetProjectRetType, ok bool) { + return getDeleteBucketResponseGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *DeleteBucketResponse) SetProject(v *string) { - o.Project = v +func (o *DeleteBucketResponse) SetProject(v DeleteBucketResponseGetProjectRetType) { + setDeleteBucketResponseGetProjectAttributeType(&o.Project, v) } func (o DeleteBucketResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["bucket"] = o.Bucket - toSerialize["project"] = o.Project + if val, ok := getDeleteBucketResponseGetBucketAttributeTypeOk(o.Bucket); ok { + toSerialize["Bucket"] = val + } + if val, ok := getDeleteBucketResponseGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_delete_credentials_group_response.go b/services/objectstorage/model_delete_credentials_group_response.go index 95877fda9..08e212691 100644 --- a/services/objectstorage/model_delete_credentials_group_response.go +++ b/services/objectstorage/model_delete_credentials_group_response.go @@ -17,14 +17,56 @@ import ( // checks if the DeleteCredentialsGroupResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DeleteCredentialsGroupResponse{} +/* + types and functions for credentialsGroupId +*/ + +// isNotNullableString +type DeleteCredentialsGroupResponseGetCredentialsGroupIdAttributeType = *string + +func getDeleteCredentialsGroupResponseGetCredentialsGroupIdAttributeTypeOk(arg DeleteCredentialsGroupResponseGetCredentialsGroupIdAttributeType) (ret DeleteCredentialsGroupResponseGetCredentialsGroupIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDeleteCredentialsGroupResponseGetCredentialsGroupIdAttributeType(arg *DeleteCredentialsGroupResponseGetCredentialsGroupIdAttributeType, val DeleteCredentialsGroupResponseGetCredentialsGroupIdRetType) { + *arg = &val +} + +type DeleteCredentialsGroupResponseGetCredentialsGroupIdArgType = string +type DeleteCredentialsGroupResponseGetCredentialsGroupIdRetType = string + +/* + types and functions for project +*/ + +// isNotNullableString +type DeleteCredentialsGroupResponseGetProjectAttributeType = *string + +func getDeleteCredentialsGroupResponseGetProjectAttributeTypeOk(arg DeleteCredentialsGroupResponseGetProjectAttributeType) (ret DeleteCredentialsGroupResponseGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDeleteCredentialsGroupResponseGetProjectAttributeType(arg *DeleteCredentialsGroupResponseGetProjectAttributeType, val DeleteCredentialsGroupResponseGetProjectRetType) { + *arg = &val +} + +type DeleteCredentialsGroupResponseGetProjectArgType = string +type DeleteCredentialsGroupResponseGetProjectRetType = string + // DeleteCredentialsGroupResponse struct for DeleteCredentialsGroupResponse type DeleteCredentialsGroupResponse struct { // The ID of the credentials group // REQUIRED - CredentialsGroupId *string `json:"credentialsGroupId"` + CredentialsGroupId DeleteCredentialsGroupResponseGetCredentialsGroupIdAttributeType `json:"credentialsGroupId"` // Project ID // REQUIRED - Project *string `json:"project"` + Project DeleteCredentialsGroupResponseGetProjectAttributeType `json:"project"` } type _DeleteCredentialsGroupResponse DeleteCredentialsGroupResponse @@ -33,10 +75,10 @@ type _DeleteCredentialsGroupResponse DeleteCredentialsGroupResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewDeleteCredentialsGroupResponse(credentialsGroupId *string, project *string) *DeleteCredentialsGroupResponse { +func NewDeleteCredentialsGroupResponse(credentialsGroupId DeleteCredentialsGroupResponseGetCredentialsGroupIdArgType, project DeleteCredentialsGroupResponseGetProjectArgType) *DeleteCredentialsGroupResponse { this := DeleteCredentialsGroupResponse{} - this.CredentialsGroupId = credentialsGroupId - this.Project = project + setDeleteCredentialsGroupResponseGetCredentialsGroupIdAttributeType(&this.CredentialsGroupId, credentialsGroupId) + setDeleteCredentialsGroupResponseGetProjectAttributeType(&this.Project, project) return &this } @@ -49,57 +91,47 @@ func NewDeleteCredentialsGroupResponseWithDefaults() *DeleteCredentialsGroupResp } // GetCredentialsGroupId returns the CredentialsGroupId field value -func (o *DeleteCredentialsGroupResponse) GetCredentialsGroupId() *string { - if o == nil || IsNil(o.CredentialsGroupId) { - var ret *string - return ret - } - - return o.CredentialsGroupId +func (o *DeleteCredentialsGroupResponse) GetCredentialsGroupId() (ret DeleteCredentialsGroupResponseGetCredentialsGroupIdRetType) { + ret, _ = o.GetCredentialsGroupIdOk() + return ret } // GetCredentialsGroupIdOk returns a tuple with the CredentialsGroupId field value // and a boolean to check if the value has been set. -func (o *DeleteCredentialsGroupResponse) GetCredentialsGroupIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CredentialsGroupId, true +func (o *DeleteCredentialsGroupResponse) GetCredentialsGroupIdOk() (ret DeleteCredentialsGroupResponseGetCredentialsGroupIdRetType, ok bool) { + return getDeleteCredentialsGroupResponseGetCredentialsGroupIdAttributeTypeOk(o.CredentialsGroupId) } // SetCredentialsGroupId sets field value -func (o *DeleteCredentialsGroupResponse) SetCredentialsGroupId(v *string) { - o.CredentialsGroupId = v +func (o *DeleteCredentialsGroupResponse) SetCredentialsGroupId(v DeleteCredentialsGroupResponseGetCredentialsGroupIdRetType) { + setDeleteCredentialsGroupResponseGetCredentialsGroupIdAttributeType(&o.CredentialsGroupId, v) } // GetProject returns the Project field value -func (o *DeleteCredentialsGroupResponse) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *DeleteCredentialsGroupResponse) GetProject() (ret DeleteCredentialsGroupResponseGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *DeleteCredentialsGroupResponse) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *DeleteCredentialsGroupResponse) GetProjectOk() (ret DeleteCredentialsGroupResponseGetProjectRetType, ok bool) { + return getDeleteCredentialsGroupResponseGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *DeleteCredentialsGroupResponse) SetProject(v *string) { - o.Project = v +func (o *DeleteCredentialsGroupResponse) SetProject(v DeleteCredentialsGroupResponseGetProjectRetType) { + setDeleteCredentialsGroupResponseGetProjectAttributeType(&o.Project, v) } func (o DeleteCredentialsGroupResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["credentialsGroupId"] = o.CredentialsGroupId - toSerialize["project"] = o.Project + if val, ok := getDeleteCredentialsGroupResponseGetCredentialsGroupIdAttributeTypeOk(o.CredentialsGroupId); ok { + toSerialize["CredentialsGroupId"] = val + } + if val, ok := getDeleteCredentialsGroupResponseGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_detailed_error.go b/services/objectstorage/model_detailed_error.go index dc671ebb3..ab2ebf154 100644 --- a/services/objectstorage/model_detailed_error.go +++ b/services/objectstorage/model_detailed_error.go @@ -17,12 +17,54 @@ import ( // checks if the DetailedError type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DetailedError{} +/* + types and functions for key +*/ + +// isNotNullableString +type DetailedErrorGetKeyAttributeType = *string + +func getDetailedErrorGetKeyAttributeTypeOk(arg DetailedErrorGetKeyAttributeType) (ret DetailedErrorGetKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDetailedErrorGetKeyAttributeType(arg *DetailedErrorGetKeyAttributeType, val DetailedErrorGetKeyRetType) { + *arg = &val +} + +type DetailedErrorGetKeyArgType = string +type DetailedErrorGetKeyRetType = string + +/* + types and functions for msg +*/ + +// isNotNullableString +type DetailedErrorGetMsgAttributeType = *string + +func getDetailedErrorGetMsgAttributeTypeOk(arg DetailedErrorGetMsgAttributeType) (ret DetailedErrorGetMsgRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDetailedErrorGetMsgAttributeType(arg *DetailedErrorGetMsgAttributeType, val DetailedErrorGetMsgRetType) { + *arg = &val +} + +type DetailedErrorGetMsgArgType = string +type DetailedErrorGetMsgRetType = string + // DetailedError struct for DetailedError type DetailedError struct { // REQUIRED - Key *string `json:"key"` + Key DetailedErrorGetKeyAttributeType `json:"key"` // REQUIRED - Msg *string `json:"msg"` + Msg DetailedErrorGetMsgAttributeType `json:"msg"` } type _DetailedError DetailedError @@ -31,10 +73,10 @@ type _DetailedError DetailedError // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewDetailedError(key *string, msg *string) *DetailedError { +func NewDetailedError(key DetailedErrorGetKeyArgType, msg DetailedErrorGetMsgArgType) *DetailedError { this := DetailedError{} - this.Key = key - this.Msg = msg + setDetailedErrorGetKeyAttributeType(&this.Key, key) + setDetailedErrorGetMsgAttributeType(&this.Msg, msg) return &this } @@ -47,57 +89,47 @@ func NewDetailedErrorWithDefaults() *DetailedError { } // GetKey returns the Key field value -func (o *DetailedError) GetKey() *string { - if o == nil || IsNil(o.Key) { - var ret *string - return ret - } - - return o.Key +func (o *DetailedError) GetKey() (ret DetailedErrorGetKeyRetType) { + ret, _ = o.GetKeyOk() + return ret } // GetKeyOk returns a tuple with the Key field value // and a boolean to check if the value has been set. -func (o *DetailedError) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Key, true +func (o *DetailedError) GetKeyOk() (ret DetailedErrorGetKeyRetType, ok bool) { + return getDetailedErrorGetKeyAttributeTypeOk(o.Key) } // SetKey sets field value -func (o *DetailedError) SetKey(v *string) { - o.Key = v +func (o *DetailedError) SetKey(v DetailedErrorGetKeyRetType) { + setDetailedErrorGetKeyAttributeType(&o.Key, v) } // GetMsg returns the Msg field value -func (o *DetailedError) GetMsg() *string { - if o == nil || IsNil(o.Msg) { - var ret *string - return ret - } - - return o.Msg +func (o *DetailedError) GetMsg() (ret DetailedErrorGetMsgRetType) { + ret, _ = o.GetMsgOk() + return ret } // GetMsgOk returns a tuple with the Msg field value // and a boolean to check if the value has been set. -func (o *DetailedError) GetMsgOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Msg, true +func (o *DetailedError) GetMsgOk() (ret DetailedErrorGetMsgRetType, ok bool) { + return getDetailedErrorGetMsgAttributeTypeOk(o.Msg) } // SetMsg sets field value -func (o *DetailedError) SetMsg(v *string) { - o.Msg = v +func (o *DetailedError) SetMsg(v DetailedErrorGetMsgRetType) { + setDetailedErrorGetMsgAttributeType(&o.Msg, v) } func (o DetailedError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["msg"] = o.Msg + if val, ok := getDetailedErrorGetKeyAttributeTypeOk(o.Key); ok { + toSerialize["Key"] = val + } + if val, ok := getDetailedErrorGetMsgAttributeTypeOk(o.Msg); ok { + toSerialize["Msg"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_error_message.go b/services/objectstorage/model_error_message.go index 627d03eba..37edd5935 100644 --- a/services/objectstorage/model_error_message.go +++ b/services/objectstorage/model_error_message.go @@ -17,10 +17,30 @@ import ( // checks if the ErrorMessage type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ErrorMessage{} +/* + types and functions for detail +*/ + +// isArray +type ErrorMessageGetDetailAttributeType = *[]DetailedError +type ErrorMessageGetDetailArgType = []DetailedError +type ErrorMessageGetDetailRetType = []DetailedError + +func getErrorMessageGetDetailAttributeTypeOk(arg ErrorMessageGetDetailAttributeType) (ret ErrorMessageGetDetailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorMessageGetDetailAttributeType(arg *ErrorMessageGetDetailAttributeType, val ErrorMessageGetDetailRetType) { + *arg = &val +} + // ErrorMessage struct for ErrorMessage type ErrorMessage struct { // REQUIRED - Detail *[]DetailedError `json:"detail"` + Detail ErrorMessageGetDetailAttributeType `json:"detail"` } type _ErrorMessage ErrorMessage @@ -29,9 +49,9 @@ type _ErrorMessage ErrorMessage // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewErrorMessage(detail *[]DetailedError) *ErrorMessage { +func NewErrorMessage(detail ErrorMessageGetDetailArgType) *ErrorMessage { this := ErrorMessage{} - this.Detail = detail + setErrorMessageGetDetailAttributeType(&this.Detail, detail) return &this } @@ -44,32 +64,27 @@ func NewErrorMessageWithDefaults() *ErrorMessage { } // GetDetail returns the Detail field value -func (o *ErrorMessage) GetDetail() *[]DetailedError { - if o == nil || IsNil(o.Detail) { - var ret *[]DetailedError - return ret - } - - return o.Detail +func (o *ErrorMessage) GetDetail() (ret ErrorMessageGetDetailRetType) { + ret, _ = o.GetDetailOk() + return ret } // GetDetailOk returns a tuple with the Detail field value // and a boolean to check if the value has been set. -func (o *ErrorMessage) GetDetailOk() (*[]DetailedError, bool) { - if o == nil { - return nil, false - } - return o.Detail, true +func (o *ErrorMessage) GetDetailOk() (ret ErrorMessageGetDetailRetType, ok bool) { + return getErrorMessageGetDetailAttributeTypeOk(o.Detail) } // SetDetail sets field value -func (o *ErrorMessage) SetDetail(v *[]DetailedError) { - o.Detail = v +func (o *ErrorMessage) SetDetail(v ErrorMessageGetDetailRetType) { + setErrorMessageGetDetailAttributeType(&o.Detail, v) } func (o ErrorMessage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["detail"] = o.Detail + if val, ok := getErrorMessageGetDetailAttributeTypeOk(o.Detail); ok { + toSerialize["Detail"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_get_bucket_response.go b/services/objectstorage/model_get_bucket_response.go index fe77ff4fa..db51f5291 100644 --- a/services/objectstorage/model_get_bucket_response.go +++ b/services/objectstorage/model_get_bucket_response.go @@ -17,13 +17,54 @@ import ( // checks if the GetBucketResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetBucketResponse{} +/* + types and functions for bucket +*/ + +// isModel +type GetBucketResponseGetBucketAttributeType = *Bucket +type GetBucketResponseGetBucketArgType = Bucket +type GetBucketResponseGetBucketRetType = Bucket + +func getGetBucketResponseGetBucketAttributeTypeOk(arg GetBucketResponseGetBucketAttributeType) (ret GetBucketResponseGetBucketRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetBucketResponseGetBucketAttributeType(arg *GetBucketResponseGetBucketAttributeType, val GetBucketResponseGetBucketRetType) { + *arg = &val +} + +/* + types and functions for project +*/ + +// isNotNullableString +type GetBucketResponseGetProjectAttributeType = *string + +func getGetBucketResponseGetProjectAttributeTypeOk(arg GetBucketResponseGetProjectAttributeType) (ret GetBucketResponseGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetBucketResponseGetProjectAttributeType(arg *GetBucketResponseGetProjectAttributeType, val GetBucketResponseGetProjectRetType) { + *arg = &val +} + +type GetBucketResponseGetProjectArgType = string +type GetBucketResponseGetProjectRetType = string + // GetBucketResponse struct for GetBucketResponse type GetBucketResponse struct { // REQUIRED - Bucket *Bucket `json:"bucket"` + Bucket GetBucketResponseGetBucketAttributeType `json:"bucket"` // Project ID // REQUIRED - Project *string `json:"project"` + Project GetBucketResponseGetProjectAttributeType `json:"project"` } type _GetBucketResponse GetBucketResponse @@ -32,10 +73,10 @@ type _GetBucketResponse GetBucketResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGetBucketResponse(bucket *Bucket, project *string) *GetBucketResponse { +func NewGetBucketResponse(bucket GetBucketResponseGetBucketArgType, project GetBucketResponseGetProjectArgType) *GetBucketResponse { this := GetBucketResponse{} - this.Bucket = bucket - this.Project = project + setGetBucketResponseGetBucketAttributeType(&this.Bucket, bucket) + setGetBucketResponseGetProjectAttributeType(&this.Project, project) return &this } @@ -48,57 +89,47 @@ func NewGetBucketResponseWithDefaults() *GetBucketResponse { } // GetBucket returns the Bucket field value -func (o *GetBucketResponse) GetBucket() *Bucket { - if o == nil || IsNil(o.Bucket) { - var ret *Bucket - return ret - } - - return o.Bucket +func (o *GetBucketResponse) GetBucket() (ret GetBucketResponseGetBucketRetType) { + ret, _ = o.GetBucketOk() + return ret } // GetBucketOk returns a tuple with the Bucket field value // and a boolean to check if the value has been set. -func (o *GetBucketResponse) GetBucketOk() (*Bucket, bool) { - if o == nil { - return nil, false - } - return o.Bucket, true +func (o *GetBucketResponse) GetBucketOk() (ret GetBucketResponseGetBucketRetType, ok bool) { + return getGetBucketResponseGetBucketAttributeTypeOk(o.Bucket) } // SetBucket sets field value -func (o *GetBucketResponse) SetBucket(v *Bucket) { - o.Bucket = v +func (o *GetBucketResponse) SetBucket(v GetBucketResponseGetBucketRetType) { + setGetBucketResponseGetBucketAttributeType(&o.Bucket, v) } // GetProject returns the Project field value -func (o *GetBucketResponse) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *GetBucketResponse) GetProject() (ret GetBucketResponseGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *GetBucketResponse) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *GetBucketResponse) GetProjectOk() (ret GetBucketResponseGetProjectRetType, ok bool) { + return getGetBucketResponseGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *GetBucketResponse) SetProject(v *string) { - o.Project = v +func (o *GetBucketResponse) SetProject(v GetBucketResponseGetProjectRetType) { + setGetBucketResponseGetProjectAttributeType(&o.Project, v) } func (o GetBucketResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["bucket"] = o.Bucket - toSerialize["project"] = o.Project + if val, ok := getGetBucketResponseGetBucketAttributeTypeOk(o.Bucket); ok { + toSerialize["Bucket"] = val + } + if val, ok := getGetBucketResponseGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_http_validation_error.go b/services/objectstorage/model_http_validation_error.go index 93e67d4f6..23aa9c3a5 100644 --- a/services/objectstorage/model_http_validation_error.go +++ b/services/objectstorage/model_http_validation_error.go @@ -17,9 +17,29 @@ import ( // checks if the HTTPValidationError type satisfies the MappedNullable interface at compile time var _ MappedNullable = &HTTPValidationError{} +/* + types and functions for detail +*/ + +// isArray +type HTTPValidationErrorGetDetailAttributeType = *[]ValidationError +type HTTPValidationErrorGetDetailArgType = []ValidationError +type HTTPValidationErrorGetDetailRetType = []ValidationError + +func getHTTPValidationErrorGetDetailAttributeTypeOk(arg HTTPValidationErrorGetDetailAttributeType) (ret HTTPValidationErrorGetDetailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHTTPValidationErrorGetDetailAttributeType(arg *HTTPValidationErrorGetDetailAttributeType, val HTTPValidationErrorGetDetailRetType) { + *arg = &val +} + // HTTPValidationError struct for HTTPValidationError type HTTPValidationError struct { - Detail *[]ValidationError `json:"detail,omitempty"` + Detail HTTPValidationErrorGetDetailAttributeType `json:"detail,omitempty"` } // NewHTTPValidationError instantiates a new HTTPValidationError object @@ -40,41 +60,32 @@ func NewHTTPValidationErrorWithDefaults() *HTTPValidationError { } // GetDetail returns the Detail field value if set, zero value otherwise. -func (o *HTTPValidationError) GetDetail() *[]ValidationError { - if o == nil || IsNil(o.Detail) { - var ret *[]ValidationError - return ret - } - return o.Detail +func (o *HTTPValidationError) GetDetail() (res HTTPValidationErrorGetDetailRetType) { + res, _ = o.GetDetailOk() + return } // GetDetailOk returns a tuple with the Detail field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *HTTPValidationError) GetDetailOk() (*[]ValidationError, bool) { - if o == nil || IsNil(o.Detail) { - return nil, false - } - return o.Detail, true +func (o *HTTPValidationError) GetDetailOk() (ret HTTPValidationErrorGetDetailRetType, ok bool) { + return getHTTPValidationErrorGetDetailAttributeTypeOk(o.Detail) } // HasDetail returns a boolean if a field has been set. func (o *HTTPValidationError) HasDetail() bool { - if o != nil && !IsNil(o.Detail) { - return true - } - - return false + _, ok := o.GetDetailOk() + return ok } // SetDetail gets a reference to the given []ValidationError and assigns it to the Detail field. -func (o *HTTPValidationError) SetDetail(v *[]ValidationError) { - o.Detail = v +func (o *HTTPValidationError) SetDetail(v HTTPValidationErrorGetDetailRetType) { + setHTTPValidationErrorGetDetailAttributeType(&o.Detail, v) } func (o HTTPValidationError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Detail) { - toSerialize["detail"] = o.Detail + if val, ok := getHTTPValidationErrorGetDetailAttributeTypeOk(o.Detail); ok { + toSerialize["Detail"] = val } return toSerialize, nil } diff --git a/services/objectstorage/model_list_access_keys_response.go b/services/objectstorage/model_list_access_keys_response.go index 3b54ca154..3469eabc9 100644 --- a/services/objectstorage/model_list_access_keys_response.go +++ b/services/objectstorage/model_list_access_keys_response.go @@ -17,13 +17,54 @@ import ( // checks if the ListAccessKeysResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListAccessKeysResponse{} +/* + types and functions for accessKeys +*/ + +// isArray +type ListAccessKeysResponseGetAccessKeysAttributeType = *[]AccessKey +type ListAccessKeysResponseGetAccessKeysArgType = []AccessKey +type ListAccessKeysResponseGetAccessKeysRetType = []AccessKey + +func getListAccessKeysResponseGetAccessKeysAttributeTypeOk(arg ListAccessKeysResponseGetAccessKeysAttributeType) (ret ListAccessKeysResponseGetAccessKeysRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListAccessKeysResponseGetAccessKeysAttributeType(arg *ListAccessKeysResponseGetAccessKeysAttributeType, val ListAccessKeysResponseGetAccessKeysRetType) { + *arg = &val +} + +/* + types and functions for project +*/ + +// isNotNullableString +type ListAccessKeysResponseGetProjectAttributeType = *string + +func getListAccessKeysResponseGetProjectAttributeTypeOk(arg ListAccessKeysResponseGetProjectAttributeType) (ret ListAccessKeysResponseGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListAccessKeysResponseGetProjectAttributeType(arg *ListAccessKeysResponseGetProjectAttributeType, val ListAccessKeysResponseGetProjectRetType) { + *arg = &val +} + +type ListAccessKeysResponseGetProjectArgType = string +type ListAccessKeysResponseGetProjectRetType = string + // ListAccessKeysResponse struct for ListAccessKeysResponse type ListAccessKeysResponse struct { // REQUIRED - AccessKeys *[]AccessKey `json:"accessKeys"` + AccessKeys ListAccessKeysResponseGetAccessKeysAttributeType `json:"accessKeys"` // Project ID // REQUIRED - Project *string `json:"project"` + Project ListAccessKeysResponseGetProjectAttributeType `json:"project"` } type _ListAccessKeysResponse ListAccessKeysResponse @@ -32,10 +73,10 @@ type _ListAccessKeysResponse ListAccessKeysResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewListAccessKeysResponse(accessKeys *[]AccessKey, project *string) *ListAccessKeysResponse { +func NewListAccessKeysResponse(accessKeys ListAccessKeysResponseGetAccessKeysArgType, project ListAccessKeysResponseGetProjectArgType) *ListAccessKeysResponse { this := ListAccessKeysResponse{} - this.AccessKeys = accessKeys - this.Project = project + setListAccessKeysResponseGetAccessKeysAttributeType(&this.AccessKeys, accessKeys) + setListAccessKeysResponseGetProjectAttributeType(&this.Project, project) return &this } @@ -48,57 +89,47 @@ func NewListAccessKeysResponseWithDefaults() *ListAccessKeysResponse { } // GetAccessKeys returns the AccessKeys field value -func (o *ListAccessKeysResponse) GetAccessKeys() *[]AccessKey { - if o == nil || IsNil(o.AccessKeys) { - var ret *[]AccessKey - return ret - } - - return o.AccessKeys +func (o *ListAccessKeysResponse) GetAccessKeys() (ret ListAccessKeysResponseGetAccessKeysRetType) { + ret, _ = o.GetAccessKeysOk() + return ret } // GetAccessKeysOk returns a tuple with the AccessKeys field value // and a boolean to check if the value has been set. -func (o *ListAccessKeysResponse) GetAccessKeysOk() (*[]AccessKey, bool) { - if o == nil { - return nil, false - } - return o.AccessKeys, true +func (o *ListAccessKeysResponse) GetAccessKeysOk() (ret ListAccessKeysResponseGetAccessKeysRetType, ok bool) { + return getListAccessKeysResponseGetAccessKeysAttributeTypeOk(o.AccessKeys) } // SetAccessKeys sets field value -func (o *ListAccessKeysResponse) SetAccessKeys(v *[]AccessKey) { - o.AccessKeys = v +func (o *ListAccessKeysResponse) SetAccessKeys(v ListAccessKeysResponseGetAccessKeysRetType) { + setListAccessKeysResponseGetAccessKeysAttributeType(&o.AccessKeys, v) } // GetProject returns the Project field value -func (o *ListAccessKeysResponse) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *ListAccessKeysResponse) GetProject() (ret ListAccessKeysResponseGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *ListAccessKeysResponse) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *ListAccessKeysResponse) GetProjectOk() (ret ListAccessKeysResponseGetProjectRetType, ok bool) { + return getListAccessKeysResponseGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *ListAccessKeysResponse) SetProject(v *string) { - o.Project = v +func (o *ListAccessKeysResponse) SetProject(v ListAccessKeysResponseGetProjectRetType) { + setListAccessKeysResponseGetProjectAttributeType(&o.Project, v) } func (o ListAccessKeysResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["accessKeys"] = o.AccessKeys - toSerialize["project"] = o.Project + if val, ok := getListAccessKeysResponseGetAccessKeysAttributeTypeOk(o.AccessKeys); ok { + toSerialize["AccessKeys"] = val + } + if val, ok := getListAccessKeysResponseGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_list_buckets_response.go b/services/objectstorage/model_list_buckets_response.go index 94cb7fffb..d36c6b7ca 100644 --- a/services/objectstorage/model_list_buckets_response.go +++ b/services/objectstorage/model_list_buckets_response.go @@ -17,13 +17,54 @@ import ( // checks if the ListBucketsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListBucketsResponse{} +/* + types and functions for buckets +*/ + +// isArray +type ListBucketsResponseGetBucketsAttributeType = *[]Bucket +type ListBucketsResponseGetBucketsArgType = []Bucket +type ListBucketsResponseGetBucketsRetType = []Bucket + +func getListBucketsResponseGetBucketsAttributeTypeOk(arg ListBucketsResponseGetBucketsAttributeType) (ret ListBucketsResponseGetBucketsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListBucketsResponseGetBucketsAttributeType(arg *ListBucketsResponseGetBucketsAttributeType, val ListBucketsResponseGetBucketsRetType) { + *arg = &val +} + +/* + types and functions for project +*/ + +// isNotNullableString +type ListBucketsResponseGetProjectAttributeType = *string + +func getListBucketsResponseGetProjectAttributeTypeOk(arg ListBucketsResponseGetProjectAttributeType) (ret ListBucketsResponseGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListBucketsResponseGetProjectAttributeType(arg *ListBucketsResponseGetProjectAttributeType, val ListBucketsResponseGetProjectRetType) { + *arg = &val +} + +type ListBucketsResponseGetProjectArgType = string +type ListBucketsResponseGetProjectRetType = string + // ListBucketsResponse struct for ListBucketsResponse type ListBucketsResponse struct { // REQUIRED - Buckets *[]Bucket `json:"buckets"` + Buckets ListBucketsResponseGetBucketsAttributeType `json:"buckets"` // Project ID // REQUIRED - Project *string `json:"project"` + Project ListBucketsResponseGetProjectAttributeType `json:"project"` } type _ListBucketsResponse ListBucketsResponse @@ -32,10 +73,10 @@ type _ListBucketsResponse ListBucketsResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewListBucketsResponse(buckets *[]Bucket, project *string) *ListBucketsResponse { +func NewListBucketsResponse(buckets ListBucketsResponseGetBucketsArgType, project ListBucketsResponseGetProjectArgType) *ListBucketsResponse { this := ListBucketsResponse{} - this.Buckets = buckets - this.Project = project + setListBucketsResponseGetBucketsAttributeType(&this.Buckets, buckets) + setListBucketsResponseGetProjectAttributeType(&this.Project, project) return &this } @@ -48,57 +89,47 @@ func NewListBucketsResponseWithDefaults() *ListBucketsResponse { } // GetBuckets returns the Buckets field value -func (o *ListBucketsResponse) GetBuckets() *[]Bucket { - if o == nil || IsNil(o.Buckets) { - var ret *[]Bucket - return ret - } - - return o.Buckets +func (o *ListBucketsResponse) GetBuckets() (ret ListBucketsResponseGetBucketsRetType) { + ret, _ = o.GetBucketsOk() + return ret } // GetBucketsOk returns a tuple with the Buckets field value // and a boolean to check if the value has been set. -func (o *ListBucketsResponse) GetBucketsOk() (*[]Bucket, bool) { - if o == nil { - return nil, false - } - return o.Buckets, true +func (o *ListBucketsResponse) GetBucketsOk() (ret ListBucketsResponseGetBucketsRetType, ok bool) { + return getListBucketsResponseGetBucketsAttributeTypeOk(o.Buckets) } // SetBuckets sets field value -func (o *ListBucketsResponse) SetBuckets(v *[]Bucket) { - o.Buckets = v +func (o *ListBucketsResponse) SetBuckets(v ListBucketsResponseGetBucketsRetType) { + setListBucketsResponseGetBucketsAttributeType(&o.Buckets, v) } // GetProject returns the Project field value -func (o *ListBucketsResponse) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *ListBucketsResponse) GetProject() (ret ListBucketsResponseGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *ListBucketsResponse) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *ListBucketsResponse) GetProjectOk() (ret ListBucketsResponseGetProjectRetType, ok bool) { + return getListBucketsResponseGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *ListBucketsResponse) SetProject(v *string) { - o.Project = v +func (o *ListBucketsResponse) SetProject(v ListBucketsResponseGetProjectRetType) { + setListBucketsResponseGetProjectAttributeType(&o.Project, v) } func (o ListBucketsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["buckets"] = o.Buckets - toSerialize["project"] = o.Project + if val, ok := getListBucketsResponseGetBucketsAttributeTypeOk(o.Buckets); ok { + toSerialize["Buckets"] = val + } + if val, ok := getListBucketsResponseGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_list_credentials_groups_response.go b/services/objectstorage/model_list_credentials_groups_response.go index dfc6e0f48..24addf652 100644 --- a/services/objectstorage/model_list_credentials_groups_response.go +++ b/services/objectstorage/model_list_credentials_groups_response.go @@ -17,13 +17,54 @@ import ( // checks if the ListCredentialsGroupsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListCredentialsGroupsResponse{} +/* + types and functions for credentialsGroups +*/ + +// isArray +type ListCredentialsGroupsResponseGetCredentialsGroupsAttributeType = *[]CredentialsGroup +type ListCredentialsGroupsResponseGetCredentialsGroupsArgType = []CredentialsGroup +type ListCredentialsGroupsResponseGetCredentialsGroupsRetType = []CredentialsGroup + +func getListCredentialsGroupsResponseGetCredentialsGroupsAttributeTypeOk(arg ListCredentialsGroupsResponseGetCredentialsGroupsAttributeType) (ret ListCredentialsGroupsResponseGetCredentialsGroupsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCredentialsGroupsResponseGetCredentialsGroupsAttributeType(arg *ListCredentialsGroupsResponseGetCredentialsGroupsAttributeType, val ListCredentialsGroupsResponseGetCredentialsGroupsRetType) { + *arg = &val +} + +/* + types and functions for project +*/ + +// isNotNullableString +type ListCredentialsGroupsResponseGetProjectAttributeType = *string + +func getListCredentialsGroupsResponseGetProjectAttributeTypeOk(arg ListCredentialsGroupsResponseGetProjectAttributeType) (ret ListCredentialsGroupsResponseGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCredentialsGroupsResponseGetProjectAttributeType(arg *ListCredentialsGroupsResponseGetProjectAttributeType, val ListCredentialsGroupsResponseGetProjectRetType) { + *arg = &val +} + +type ListCredentialsGroupsResponseGetProjectArgType = string +type ListCredentialsGroupsResponseGetProjectRetType = string + // ListCredentialsGroupsResponse struct for ListCredentialsGroupsResponse type ListCredentialsGroupsResponse struct { // REQUIRED - CredentialsGroups *[]CredentialsGroup `json:"credentialsGroups"` + CredentialsGroups ListCredentialsGroupsResponseGetCredentialsGroupsAttributeType `json:"credentialsGroups"` // Project ID // REQUIRED - Project *string `json:"project"` + Project ListCredentialsGroupsResponseGetProjectAttributeType `json:"project"` } type _ListCredentialsGroupsResponse ListCredentialsGroupsResponse @@ -32,10 +73,10 @@ type _ListCredentialsGroupsResponse ListCredentialsGroupsResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewListCredentialsGroupsResponse(credentialsGroups *[]CredentialsGroup, project *string) *ListCredentialsGroupsResponse { +func NewListCredentialsGroupsResponse(credentialsGroups ListCredentialsGroupsResponseGetCredentialsGroupsArgType, project ListCredentialsGroupsResponseGetProjectArgType) *ListCredentialsGroupsResponse { this := ListCredentialsGroupsResponse{} - this.CredentialsGroups = credentialsGroups - this.Project = project + setListCredentialsGroupsResponseGetCredentialsGroupsAttributeType(&this.CredentialsGroups, credentialsGroups) + setListCredentialsGroupsResponseGetProjectAttributeType(&this.Project, project) return &this } @@ -48,57 +89,47 @@ func NewListCredentialsGroupsResponseWithDefaults() *ListCredentialsGroupsRespon } // GetCredentialsGroups returns the CredentialsGroups field value -func (o *ListCredentialsGroupsResponse) GetCredentialsGroups() *[]CredentialsGroup { - if o == nil || IsNil(o.CredentialsGroups) { - var ret *[]CredentialsGroup - return ret - } - - return o.CredentialsGroups +func (o *ListCredentialsGroupsResponse) GetCredentialsGroups() (ret ListCredentialsGroupsResponseGetCredentialsGroupsRetType) { + ret, _ = o.GetCredentialsGroupsOk() + return ret } // GetCredentialsGroupsOk returns a tuple with the CredentialsGroups field value // and a boolean to check if the value has been set. -func (o *ListCredentialsGroupsResponse) GetCredentialsGroupsOk() (*[]CredentialsGroup, bool) { - if o == nil { - return nil, false - } - return o.CredentialsGroups, true +func (o *ListCredentialsGroupsResponse) GetCredentialsGroupsOk() (ret ListCredentialsGroupsResponseGetCredentialsGroupsRetType, ok bool) { + return getListCredentialsGroupsResponseGetCredentialsGroupsAttributeTypeOk(o.CredentialsGroups) } // SetCredentialsGroups sets field value -func (o *ListCredentialsGroupsResponse) SetCredentialsGroups(v *[]CredentialsGroup) { - o.CredentialsGroups = v +func (o *ListCredentialsGroupsResponse) SetCredentialsGroups(v ListCredentialsGroupsResponseGetCredentialsGroupsRetType) { + setListCredentialsGroupsResponseGetCredentialsGroupsAttributeType(&o.CredentialsGroups, v) } // GetProject returns the Project field value -func (o *ListCredentialsGroupsResponse) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *ListCredentialsGroupsResponse) GetProject() (ret ListCredentialsGroupsResponseGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *ListCredentialsGroupsResponse) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *ListCredentialsGroupsResponse) GetProjectOk() (ret ListCredentialsGroupsResponseGetProjectRetType, ok bool) { + return getListCredentialsGroupsResponseGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *ListCredentialsGroupsResponse) SetProject(v *string) { - o.Project = v +func (o *ListCredentialsGroupsResponse) SetProject(v ListCredentialsGroupsResponseGetProjectRetType) { + setListCredentialsGroupsResponseGetProjectAttributeType(&o.Project, v) } func (o ListCredentialsGroupsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["credentialsGroups"] = o.CredentialsGroups - toSerialize["project"] = o.Project + if val, ok := getListCredentialsGroupsResponseGetCredentialsGroupsAttributeTypeOk(o.CredentialsGroups); ok { + toSerialize["CredentialsGroups"] = val + } + if val, ok := getListCredentialsGroupsResponseGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_project_status.go b/services/objectstorage/model_project_status.go index e0bc51a60..fe96909c0 100644 --- a/services/objectstorage/model_project_status.go +++ b/services/objectstorage/model_project_status.go @@ -17,13 +17,54 @@ import ( // checks if the ProjectStatus type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ProjectStatus{} +/* + types and functions for project +*/ + +// isNotNullableString +type ProjectStatusGetProjectAttributeType = *string + +func getProjectStatusGetProjectAttributeTypeOk(arg ProjectStatusGetProjectAttributeType) (ret ProjectStatusGetProjectRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setProjectStatusGetProjectAttributeType(arg *ProjectStatusGetProjectAttributeType, val ProjectStatusGetProjectRetType) { + *arg = &val +} + +type ProjectStatusGetProjectArgType = string +type ProjectStatusGetProjectRetType = string + +/* + types and functions for scope +*/ + +// isEnumRef +type ProjectStatusGetScopeAttributeType = *ProjectScope +type ProjectStatusGetScopeArgType = ProjectScope +type ProjectStatusGetScopeRetType = ProjectScope + +func getProjectStatusGetScopeAttributeTypeOk(arg ProjectStatusGetScopeAttributeType) (ret ProjectStatusGetScopeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setProjectStatusGetScopeAttributeType(arg *ProjectStatusGetScopeAttributeType, val ProjectStatusGetScopeRetType) { + *arg = &val +} + // ProjectStatus struct for ProjectStatus type ProjectStatus struct { // Project ID // REQUIRED - Project *string `json:"project"` + Project ProjectStatusGetProjectAttributeType `json:"project"` // REQUIRED - Scope *ProjectScope `json:"scope"` + Scope ProjectStatusGetScopeAttributeType `json:"scope"` } type _ProjectStatus ProjectStatus @@ -32,10 +73,10 @@ type _ProjectStatus ProjectStatus // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewProjectStatus(project *string, scope *ProjectScope) *ProjectStatus { +func NewProjectStatus(project ProjectStatusGetProjectArgType, scope ProjectStatusGetScopeArgType) *ProjectStatus { this := ProjectStatus{} - this.Project = project - this.Scope = scope + setProjectStatusGetProjectAttributeType(&this.Project, project) + setProjectStatusGetScopeAttributeType(&this.Scope, scope) return &this } @@ -48,57 +89,47 @@ func NewProjectStatusWithDefaults() *ProjectStatus { } // GetProject returns the Project field value -func (o *ProjectStatus) GetProject() *string { - if o == nil || IsNil(o.Project) { - var ret *string - return ret - } - - return o.Project +func (o *ProjectStatus) GetProject() (ret ProjectStatusGetProjectRetType) { + ret, _ = o.GetProjectOk() + return ret } // GetProjectOk returns a tuple with the Project field value // and a boolean to check if the value has been set. -func (o *ProjectStatus) GetProjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Project, true +func (o *ProjectStatus) GetProjectOk() (ret ProjectStatusGetProjectRetType, ok bool) { + return getProjectStatusGetProjectAttributeTypeOk(o.Project) } // SetProject sets field value -func (o *ProjectStatus) SetProject(v *string) { - o.Project = v +func (o *ProjectStatus) SetProject(v ProjectStatusGetProjectRetType) { + setProjectStatusGetProjectAttributeType(&o.Project, v) } // GetScope returns the Scope field value -func (o *ProjectStatus) GetScope() *ProjectScope { - if o == nil || IsNil(o.Scope) { - var ret *ProjectScope - return ret - } - - return o.Scope +func (o *ProjectStatus) GetScope() (ret ProjectStatusGetScopeRetType) { + ret, _ = o.GetScopeOk() + return ret } // GetScopeOk returns a tuple with the Scope field value // and a boolean to check if the value has been set. -func (o *ProjectStatus) GetScopeOk() (*ProjectScope, bool) { - if o == nil { - return nil, false - } - return o.Scope, true +func (o *ProjectStatus) GetScopeOk() (ret ProjectStatusGetScopeRetType, ok bool) { + return getProjectStatusGetScopeAttributeTypeOk(o.Scope) } // SetScope sets field value -func (o *ProjectStatus) SetScope(v *ProjectScope) { - o.Scope = v +func (o *ProjectStatus) SetScope(v ProjectStatusGetScopeRetType) { + setProjectStatusGetScopeAttributeType(&o.Scope, v) } func (o ProjectStatus) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["project"] = o.Project - toSerialize["scope"] = o.Scope + if val, ok := getProjectStatusGetProjectAttributeTypeOk(o.Project); ok { + toSerialize["Project"] = val + } + if val, ok := getProjectStatusGetScopeAttributeTypeOk(o.Scope); ok { + toSerialize["Scope"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/model_validation_error.go b/services/objectstorage/model_validation_error.go index 44c81a575..d49f8b1b6 100644 --- a/services/objectstorage/model_validation_error.go +++ b/services/objectstorage/model_validation_error.go @@ -17,14 +17,76 @@ import ( // checks if the ValidationError type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ValidationError{} +/* + types and functions for loc +*/ + +// isArray +type ValidationErrorGetLocAttributeType = *[]LocationInner +type ValidationErrorGetLocArgType = []LocationInner +type ValidationErrorGetLocRetType = []LocationInner + +func getValidationErrorGetLocAttributeTypeOk(arg ValidationErrorGetLocAttributeType) (ret ValidationErrorGetLocRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setValidationErrorGetLocAttributeType(arg *ValidationErrorGetLocAttributeType, val ValidationErrorGetLocRetType) { + *arg = &val +} + +/* + types and functions for msg +*/ + +// isNotNullableString +type ValidationErrorGetMsgAttributeType = *string + +func getValidationErrorGetMsgAttributeTypeOk(arg ValidationErrorGetMsgAttributeType) (ret ValidationErrorGetMsgRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setValidationErrorGetMsgAttributeType(arg *ValidationErrorGetMsgAttributeType, val ValidationErrorGetMsgRetType) { + *arg = &val +} + +type ValidationErrorGetMsgArgType = string +type ValidationErrorGetMsgRetType = string + +/* + types and functions for type +*/ + +// isNotNullableString +type ValidationErrorGetTypeAttributeType = *string + +func getValidationErrorGetTypeAttributeTypeOk(arg ValidationErrorGetTypeAttributeType) (ret ValidationErrorGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setValidationErrorGetTypeAttributeType(arg *ValidationErrorGetTypeAttributeType, val ValidationErrorGetTypeRetType) { + *arg = &val +} + +type ValidationErrorGetTypeArgType = string +type ValidationErrorGetTypeRetType = string + // ValidationError struct for ValidationError type ValidationError struct { // REQUIRED - Loc *[]LocationInner `json:"loc"` + Loc ValidationErrorGetLocAttributeType `json:"loc"` // REQUIRED - Msg *string `json:"msg"` + Msg ValidationErrorGetMsgAttributeType `json:"msg"` // REQUIRED - Type *string `json:"type"` + Type ValidationErrorGetTypeAttributeType `json:"type"` } type _ValidationError ValidationError @@ -33,11 +95,11 @@ type _ValidationError ValidationError // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewValidationError(loc *[]LocationInner, msg *string, type_ *string) *ValidationError { +func NewValidationError(loc ValidationErrorGetLocArgType, msg ValidationErrorGetMsgArgType, type_ ValidationErrorGetTypeArgType) *ValidationError { this := ValidationError{} - this.Loc = loc - this.Msg = msg - this.Type = type_ + setValidationErrorGetLocAttributeType(&this.Loc, loc) + setValidationErrorGetMsgAttributeType(&this.Msg, msg) + setValidationErrorGetTypeAttributeType(&this.Type, type_) return &this } @@ -50,82 +112,67 @@ func NewValidationErrorWithDefaults() *ValidationError { } // GetLoc returns the Loc field value -func (o *ValidationError) GetLoc() *[]LocationInner { - if o == nil || IsNil(o.Loc) { - var ret *[]LocationInner - return ret - } - - return o.Loc +func (o *ValidationError) GetLoc() (ret ValidationErrorGetLocRetType) { + ret, _ = o.GetLocOk() + return ret } // GetLocOk returns a tuple with the Loc field value // and a boolean to check if the value has been set. -func (o *ValidationError) GetLocOk() (*[]LocationInner, bool) { - if o == nil { - return nil, false - } - return o.Loc, true +func (o *ValidationError) GetLocOk() (ret ValidationErrorGetLocRetType, ok bool) { + return getValidationErrorGetLocAttributeTypeOk(o.Loc) } // SetLoc sets field value -func (o *ValidationError) SetLoc(v *[]LocationInner) { - o.Loc = v +func (o *ValidationError) SetLoc(v ValidationErrorGetLocRetType) { + setValidationErrorGetLocAttributeType(&o.Loc, v) } // GetMsg returns the Msg field value -func (o *ValidationError) GetMsg() *string { - if o == nil || IsNil(o.Msg) { - var ret *string - return ret - } - - return o.Msg +func (o *ValidationError) GetMsg() (ret ValidationErrorGetMsgRetType) { + ret, _ = o.GetMsgOk() + return ret } // GetMsgOk returns a tuple with the Msg field value // and a boolean to check if the value has been set. -func (o *ValidationError) GetMsgOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Msg, true +func (o *ValidationError) GetMsgOk() (ret ValidationErrorGetMsgRetType, ok bool) { + return getValidationErrorGetMsgAttributeTypeOk(o.Msg) } // SetMsg sets field value -func (o *ValidationError) SetMsg(v *string) { - o.Msg = v +func (o *ValidationError) SetMsg(v ValidationErrorGetMsgRetType) { + setValidationErrorGetMsgAttributeType(&o.Msg, v) } // GetType returns the Type field value -func (o *ValidationError) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - - return o.Type +func (o *ValidationError) GetType() (ret ValidationErrorGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *ValidationError) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true +func (o *ValidationError) GetTypeOk() (ret ValidationErrorGetTypeRetType, ok bool) { + return getValidationErrorGetTypeAttributeTypeOk(o.Type) } // SetType sets field value -func (o *ValidationError) SetType(v *string) { - o.Type = v +func (o *ValidationError) SetType(v ValidationErrorGetTypeRetType) { + setValidationErrorGetTypeAttributeType(&o.Type, v) } func (o ValidationError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["loc"] = o.Loc - toSerialize["msg"] = o.Msg - toSerialize["type"] = o.Type + if val, ok := getValidationErrorGetLocAttributeTypeOk(o.Loc); ok { + toSerialize["Loc"] = val + } + if val, ok := getValidationErrorGetMsgAttributeTypeOk(o.Msg); ok { + toSerialize["Msg"] = val + } + if val, ok := getValidationErrorGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } return toSerialize, nil } diff --git a/services/objectstorage/utils.go b/services/objectstorage/utils.go index 67b9bb142..e335068b7 100644 --- a/services/objectstorage/utils.go +++ b/services/objectstorage/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()