diff --git a/services/iaas/api_default.go b/services/iaas/api_default.go index 49b527a7b..1e05c1643 100644 --- a/services/iaas/api_default.go +++ b/services/iaas/api_default.go @@ -13015,9 +13015,17 @@ type ApiListImagesRequest struct { ctx context.Context apiService *DefaultApiService projectId string + all *bool labelSelector *string } +// List all Images. + +func (r ApiListImagesRequest) All(all bool) ApiListImagesRequest { + r.all = &all + return r +} + // Filter resources by labels. func (r ApiListImagesRequest) LabelSelector(labelSelector string) ApiListImagesRequest { @@ -13051,6 +13059,9 @@ func (r ApiListImagesRequest) Execute() (*ImageListResponse, error) { return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") } + if r.all != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "") + } if r.labelSelector != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "label_selector", r.labelSelector, "") } @@ -15079,6 +15090,172 @@ func (a *APIClient) ListPublicIPsExecute(ctx context.Context, projectId string) return r.Execute() } +type ApiListPublicIpRangesRequest struct { + ctx context.Context + apiService *DefaultApiService +} + +func (r ApiListPublicIpRangesRequest) Execute() (*PublicNetworkListResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PublicNetworkListResponse + ) + a := r.apiService + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListPublicIpRanges") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/networks/public-ip-ranges" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +/* +ListPublicIpRanges: List all public IP ranges. + +Get a list of all public IP ranges that STACKIT uses. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPublicIpRangesRequest +*/ +func (a *APIClient) ListPublicIpRanges(ctx context.Context) ApiListPublicIpRangesRequest { + return ApiListPublicIpRangesRequest{ + apiService: a.defaultApi, + ctx: ctx, + } +} + +func (a *APIClient) ListPublicIpRangesExecute(ctx context.Context) (*PublicNetworkListResponse, error) { + r := ApiListPublicIpRangesRequest{ + apiService: a.defaultApi, + ctx: ctx, + } + return r.Execute() +} + type ApiListQuotasRequest struct { ctx context.Context apiService *DefaultApiService diff --git a/services/iaas/api_default_test.go b/services/iaas/api_default_test.go index bc2e57b25..d5d7ab2c2 100644 --- a/services/iaas/api_default_test.go +++ b/services/iaas/api_default_test.go @@ -4222,6 +4222,54 @@ func Test_iaas_DefaultApiService(t *testing.T) { } }) + t.Run("Test DefaultApiService ListPublicIpRanges", func(t *testing.T) { + path := "/v1beta1/networks/public-ip-ranges" + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + data := PublicNetworkListResponse{} + w.Header().Add("Content-Type", "application/json") + json.NewEncoder(w).Encode(data) + }) + testServer := httptest.NewServer(testDefaultApiServeMux) + defer testServer.Close() + + configuration := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Region: "test_region", + Servers: config.ServerConfigurations{ + { + URL: testServer.URL, + Description: "Localhost for iaas_DefaultApi", + Variables: map[string]config.ServerVariable{ + "region": { + DefaultValue: "test_region.", + EnumValues: []string{ + "test_region.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) + if err != nil { + t.Fatalf("creating API client: %v", err) + } + + resp, reqErr := apiClient.ListPublicIpRanges(context.Background()).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if resp == nil { + t.Fatalf("response not present") + } + }) + t.Run("Test DefaultApiService ListQuotas", func(t *testing.T) { path := "/v1beta1/projects/{projectId}/quotas" projectIdValue := "projectId" diff --git a/services/iaas/model_add_volume_to_server_payload.go b/services/iaas/model_add_volume_to_server_payload.go index 2649cd96e..bc8ca90b7 100644 --- a/services/iaas/model_add_volume_to_server_payload.go +++ b/services/iaas/model_add_volume_to_server_payload.go @@ -33,8 +33,6 @@ type AddVolumeToServerPayload struct { // will change when the set of required properties is changed func NewAddVolumeToServerPayload() *AddVolumeToServerPayload { this := AddVolumeToServerPayload{} - var deleteOnTermination bool = false - this.DeleteOnTermination = &deleteOnTermination return &this } @@ -43,8 +41,6 @@ func NewAddVolumeToServerPayload() *AddVolumeToServerPayload { // but it doesn't guarantee that properties required by API are set func NewAddVolumeToServerPayloadWithDefaults() *AddVolumeToServerPayload { this := AddVolumeToServerPayload{} - var deleteOnTermination bool = false - this.DeleteOnTermination = &deleteOnTermination return &this } diff --git a/services/iaas/model_affinity_group.go b/services/iaas/model_affinity_group.go index bc2ebd1ca..944aef774 100644 --- a/services/iaas/model_affinity_group.go +++ b/services/iaas/model_affinity_group.go @@ -26,7 +26,7 @@ type AffinityGroup struct { // The name for a General Object. Matches Names and also UUIDs. // REQUIRED Name *string `json:"name"` - // The affinity group policy. + // The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`. // REQUIRED Policy *string `json:"policy"` } diff --git a/services/iaas/model_allowed_addresses_inner.go b/services/iaas/model_allowed_addresses_inner.go index e590b6eb5..d46b83031 100644 --- a/services/iaas/model_allowed_addresses_inner.go +++ b/services/iaas/model_allowed_addresses_inner.go @@ -62,7 +62,7 @@ func (src AllowedAddressesInner) MarshalJSON() ([]byte, error) { return json.Marshal(&src.String) } - return nil, nil // no data in oneOf schemas + return []byte("{}"), nil // no data in oneOf schemas => empty JSON object } // Get the actual instance diff --git a/services/iaas/model_backup.go b/services/iaas/model_backup.go index c2f226f3a..ef904a79d 100644 --- a/services/iaas/model_backup.go +++ b/services/iaas/model_backup.go @@ -26,7 +26,7 @@ type Backup struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` @@ -34,7 +34,7 @@ type Backup struct { Size *int64 `json:"size,omitempty"` // Universally Unique Identifier (UUID). SnapshotId *string `json:"snapshotId,omitempty"` - // The status of a backup object. + // The status of a backup object. Possible values: `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`. Status *string `json:"status,omitempty"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` diff --git a/services/iaas/model_backup_source.go b/services/iaas/model_backup_source.go index bb40f8c40..d6b729009 100644 --- a/services/iaas/model_backup_source.go +++ b/services/iaas/model_backup_source.go @@ -22,7 +22,7 @@ type BackupSource struct { // Universally Unique Identifier (UUID). // REQUIRED Id *string `json:"id"` - // The source types of a backup. + // The source types of a backup. Possible values: `volume`, `snapshot`. // REQUIRED Type *string `json:"type"` } diff --git a/services/iaas/model_boot_volume.go b/services/iaas/model_boot_volume.go index 1fb2b1aae..b883774ee 100644 --- a/services/iaas/model_boot_volume.go +++ b/services/iaas/model_boot_volume.go @@ -36,8 +36,6 @@ type BootVolume struct { // will change when the set of required properties is changed func NewBootVolume() *BootVolume { this := BootVolume{} - var deleteOnTermination bool = false - this.DeleteOnTermination = &deleteOnTermination return &this } @@ -46,8 +44,6 @@ func NewBootVolume() *BootVolume { // but it doesn't guarantee that properties required by API are set func NewBootVolumeWithDefaults() *BootVolume { this := BootVolume{} - var deleteOnTermination bool = false - this.DeleteOnTermination = &deleteOnTermination return &this } diff --git a/services/iaas/model_boot_volume_source.go b/services/iaas/model_boot_volume_source.go index 0b6dbe85a..a05088ee4 100644 --- a/services/iaas/model_boot_volume_source.go +++ b/services/iaas/model_boot_volume_source.go @@ -22,7 +22,7 @@ type BootVolumeSource struct { // Universally Unique Identifier (UUID). // REQUIRED Id *string `json:"id"` - // The source types of a boot volume. + // The source types of a boot volume. Possible values: `image`, `volume`. // REQUIRED Type *string `json:"type"` } diff --git a/services/iaas/model_create_affinity_group_payload.go b/services/iaas/model_create_affinity_group_payload.go index 1f9d11329..b51a05fd6 100644 --- a/services/iaas/model_create_affinity_group_payload.go +++ b/services/iaas/model_create_affinity_group_payload.go @@ -26,7 +26,7 @@ type CreateAffinityGroupPayload struct { // The name for a General Object. Matches Names and also UUIDs. // REQUIRED Name *string `json:"name"` - // The affinity group policy. + // The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`. // REQUIRED Policy *string `json:"policy"` } diff --git a/services/iaas/model_create_backup_payload.go b/services/iaas/model_create_backup_payload.go index d195676d5..b3b401bce 100644 --- a/services/iaas/model_create_backup_payload.go +++ b/services/iaas/model_create_backup_payload.go @@ -19,7 +19,7 @@ var _ MappedNullable = &CreateBackupPayload{} // CreateBackupPayload Object that represents a backup create request body. type CreateBackupPayload struct { - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` diff --git a/services/iaas/model_create_image_payload.go b/services/iaas/model_create_image_payload.go index 118ab95c2..f2eae6970 100644 --- a/services/iaas/model_create_image_payload.go +++ b/services/iaas/model_create_image_payload.go @@ -24,12 +24,12 @@ type CreateImagePayload struct { Config *ImageConfig `json:"config,omitempty"` // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` - // Object that represents a disk format. + // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. // REQUIRED DiskFormat *string `json:"diskFormat"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` @@ -41,9 +41,11 @@ type CreateImagePayload struct { // Universally Unique Identifier (UUID). Owner *string `json:"owner,omitempty"` Protected *bool `json:"protected,omitempty"` - // Scope of an Image. + // Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`. Scope *string `json:"scope,omitempty"` - // The status of an image object. + // Size in bytes. + Size *int64 `json:"size,omitempty"` + // The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`. Status *string `json:"status,omitempty"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` @@ -438,6 +440,38 @@ func (o *CreateImagePayload) SetScope(v *string) { o.Scope = v } +// GetSize returns the Size field value if set, zero value otherwise. +func (o *CreateImagePayload) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateImagePayload) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *CreateImagePayload) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *CreateImagePayload) SetSize(v *int64) { + o.Size = v +} + // GetStatus returns the Status field value if set, zero value otherwise. func (o *CreateImagePayload) GetStatus() *string { if o == nil || IsNil(o.Status) { @@ -536,6 +570,9 @@ func (o CreateImagePayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Scope) { toSerialize["scope"] = o.Scope } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } if !IsNil(o.Status) { toSerialize["status"] = o.Status } diff --git a/services/iaas/model_create_key_pair_payload.go b/services/iaas/model_create_key_pair_payload.go index 7375ba887..48c27576f 100644 --- a/services/iaas/model_create_key_pair_payload.go +++ b/services/iaas/model_create_key_pair_payload.go @@ -24,7 +24,7 @@ type CreateKeyPairPayload struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an SSH keypair MD5 fingerprint. Fingerprint *string `json:"fingerprint,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty"` diff --git a/services/iaas/model_create_network_area_payload.go b/services/iaas/model_create_network_area_payload.go index 6b09cfc23..bcf2d0cd4 100644 --- a/services/iaas/model_create_network_area_payload.go +++ b/services/iaas/model_create_network_area_payload.go @@ -21,7 +21,7 @@ var _ MappedNullable = &CreateNetworkAreaPayload{} type CreateNetworkAreaPayload struct { // REQUIRED AddressFamily *CreateAreaAddressFamily `json:"addressFamily"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/model_create_network_payload.go b/services/iaas/model_create_network_payload.go index 3681ff3a8..e79a1cd68 100644 --- a/services/iaas/model_create_network_payload.go +++ b/services/iaas/model_create_network_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &CreateNetworkPayload{} // CreateNetworkPayload Object that represents the request body for a network create. type CreateNetworkPayload struct { AddressFamily *CreateNetworkAddressFamily `json:"addressFamily,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/model_create_nic_payload.go b/services/iaas/model_create_nic_payload.go index f1a67dc98..54916f4e6 100644 --- a/services/iaas/model_create_nic_payload.go +++ b/services/iaas/model_create_nic_payload.go @@ -29,7 +29,7 @@ type CreateNicPayload struct { Ipv4 *string `json:"ipv4,omitempty"` // Object that represents an IPv6 address. Ipv6 *string `json:"ipv6,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty"` diff --git a/services/iaas/model_create_protocol.go b/services/iaas/model_create_protocol.go index 4b0f5b47f..4683d54ab 100644 --- a/services/iaas/model_create_protocol.go +++ b/services/iaas/model_create_protocol.go @@ -88,7 +88,7 @@ func (src CreateProtocol) MarshalJSON() ([]byte, error) { return json.Marshal(&src.String) } - return nil, nil // no data in oneOf schemas + return []byte("{}"), nil // no data in oneOf schemas => empty JSON object } // Get the actual instance diff --git a/services/iaas/model_create_public_ip_payload.go b/services/iaas/model_create_public_ip_payload.go index be131c151..132f20122 100644 --- a/services/iaas/model_create_public_ip_payload.go +++ b/services/iaas/model_create_public_ip_payload.go @@ -23,7 +23,7 @@ type CreatePublicIPPayload struct { Id *string `json:"id,omitempty"` // Object that represents an IP address. Ip *string `json:"ip,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Universally Unique Identifier (UUID). NetworkInterface *NullableString `json:"networkInterface,omitempty"` diff --git a/services/iaas/model_create_security_group_payload.go b/services/iaas/model_create_security_group_payload.go index 6f6acba9b..ff3ffb293 100644 --- a/services/iaas/model_create_security_group_payload.go +++ b/services/iaas/model_create_security_group_payload.go @@ -26,7 +26,7 @@ type CreateSecurityGroupPayload struct { Description *string `json:"description,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/model_create_server_payload.go b/services/iaas/model_create_server_payload.go index 5bed30b12..b711f12cd 100644 --- a/services/iaas/model_create_server_payload.go +++ b/services/iaas/model_create_server_payload.go @@ -33,9 +33,9 @@ type CreateServerPayload struct { Id *string `json:"id,omitempty"` // Universally Unique Identifier (UUID). ImageId *string `json:"imageId,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. + // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. KeypairName *string `json:"keypairName,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` @@ -49,13 +49,13 @@ type CreateServerPayload struct { Networking *CreateServerPayloadNetworking `json:"networking,omitempty"` // A list of networks attached to a server. Nics *[]ServerNetwork `json:"nics,omitempty"` - // The power status of a server. + // The power status of a server. Possible values: `CRASHED`, `ERROR`, `RUNNING`, `STOPPED`. PowerStatus *string `json:"powerStatus,omitempty"` // A list of General Objects. SecurityGroups *[]string `json:"securityGroups,omitempty"` // A list of service account mails. ServiceAccountMails *[]string `json:"serviceAccountMails,omitempty"` - // The status of a server object. + // The status of a server object. Possible values: `ACTIVE`, `BACKING-UP`, `CREATING`, `DEALLOCATED`, `DEALLOCATING`, `DELETED`, `DELETING`, `ERROR`, `INACTIVE`, `MIGRATING`, `REBOOT`, `REBOOTING`, `REBUILD`, `REBUILDING`, `RESCUE`, `RESCUING`, `RESIZING`, `RESTORING`, `SNAPSHOTTING`, `STARTING`, `STOPPING`, `UNRESCUING`, `UPDATING`. Status *string `json:"status,omitempty"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` diff --git a/services/iaas/model_create_server_payload_boot_volume.go b/services/iaas/model_create_server_payload_boot_volume.go index 26184c318..ace4dceb1 100644 --- a/services/iaas/model_create_server_payload_boot_volume.go +++ b/services/iaas/model_create_server_payload_boot_volume.go @@ -36,8 +36,6 @@ type CreateServerPayloadBootVolume struct { // will change when the set of required properties is changed func NewCreateServerPayloadBootVolume() *CreateServerPayloadBootVolume { this := CreateServerPayloadBootVolume{} - var deleteOnTermination bool = false - this.DeleteOnTermination = &deleteOnTermination return &this } @@ -46,8 +44,6 @@ func NewCreateServerPayloadBootVolume() *CreateServerPayloadBootVolume { // but it doesn't guarantee that properties required by API are set func NewCreateServerPayloadBootVolumeWithDefaults() *CreateServerPayloadBootVolume { this := CreateServerPayloadBootVolume{} - var deleteOnTermination bool = false - this.DeleteOnTermination = &deleteOnTermination return &this } diff --git a/services/iaas/model_create_server_payload_networking.go b/services/iaas/model_create_server_payload_networking.go index 8bebe2e97..965fe1224 100644 --- a/services/iaas/model_create_server_payload_networking.go +++ b/services/iaas/model_create_server_payload_networking.go @@ -88,7 +88,7 @@ func (src CreateServerPayloadNetworking) MarshalJSON() ([]byte, error) { return json.Marshal(&src.CreateServerNetworkingWithNics) } - return nil, nil // no data in oneOf schemas + return []byte("{}"), nil // no data in oneOf schemas => empty JSON object } // Get the actual instance diff --git a/services/iaas/model_create_snapshot_payload.go b/services/iaas/model_create_snapshot_payload.go index 8ceeae256..f361f0340 100644 --- a/services/iaas/model_create_snapshot_payload.go +++ b/services/iaas/model_create_snapshot_payload.go @@ -24,13 +24,13 @@ type CreateSnapshotPayload struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` - // The status of a snapshot object. + // The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`. Status *string `json:"status,omitempty"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` diff --git a/services/iaas/model_create_volume_payload.go b/services/iaas/model_create_volume_payload.go index 10f332e8e..6c8238c21 100644 --- a/services/iaas/model_create_volume_payload.go +++ b/services/iaas/model_create_volume_payload.go @@ -32,7 +32,7 @@ type CreateVolumePayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty"` ImageConfig *ImageConfig `json:"imageConfig,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` @@ -43,7 +43,7 @@ type CreateVolumePayload struct { // Size in Gigabyte. Size *int64 `json:"size,omitempty"` Source *VolumeSource `json:"source,omitempty"` - // The status of a volume object. + // The status of a volume object. Possible values: `ATTACHED`, `ATTACHING`, `AVAILABLE`, `AWAITING-TRANSFER`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `DETACHING`, `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, `MAINTENANCE`, `RESERVED`, `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`. Status *string `json:"status,omitempty"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` diff --git a/services/iaas/model_image.go b/services/iaas/model_image.go index 6d1bf2236..09a171728 100644 --- a/services/iaas/model_image.go +++ b/services/iaas/model_image.go @@ -24,12 +24,12 @@ type Image struct { Config *ImageConfig `json:"config,omitempty"` // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` - // Object that represents a disk format. + // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. // REQUIRED DiskFormat *string `json:"diskFormat"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` @@ -41,9 +41,11 @@ type Image struct { // Universally Unique Identifier (UUID). Owner *string `json:"owner,omitempty"` Protected *bool `json:"protected,omitempty"` - // Scope of an Image. + // Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`. Scope *string `json:"scope,omitempty"` - // The status of an image object. + // Size in bytes. + Size *int64 `json:"size,omitempty"` + // The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`. Status *string `json:"status,omitempty"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` @@ -438,6 +440,38 @@ func (o *Image) SetScope(v *string) { o.Scope = v } +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Image) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Image) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Image) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *Image) SetSize(v *int64) { + o.Size = v +} + // GetStatus returns the Status field value if set, zero value otherwise. func (o *Image) GetStatus() *string { if o == nil || IsNil(o.Status) { @@ -536,6 +570,9 @@ func (o Image) ToMap() (map[string]interface{}, error) { if !IsNil(o.Scope) { toSerialize["scope"] = o.Scope } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } if !IsNil(o.Status) { toSerialize["status"] = o.Status } diff --git a/services/iaas/model_image_config.go b/services/iaas/model_image_config.go index 484c0eb84..78a974393 100644 --- a/services/iaas/model_image_config.go +++ b/services/iaas/model_image_config.go @@ -19,7 +19,9 @@ var _ MappedNullable = &ImageConfig{} // ImageConfig Properties to set hardware and scheduling settings for an Image. type ImageConfig struct { - // Enables the BIOS bootmenu. + // Represents CPU architecture. The default for new images is x86. + Architecture *string `json:"architecture,omitempty"` + // Enables the BIOS bootmenu. The default for new images is disabled. BootMenu *bool `json:"bootMenu,omitempty"` // Sets CDROM bus controller type. CdromBus *NullableString `json:"cdromBus,omitempty"` @@ -37,13 +39,13 @@ type ImageConfig struct { RescueBus *NullableString `json:"rescueBus,omitempty"` // Sets the device when the image is used as a rescue image. RescueDevice *NullableString `json:"rescueDevice,omitempty"` - // Enables Secure Boot. + // Enables Secure Boot. The default for new images is disabled. SecureBoot *bool `json:"secureBoot,omitempty"` - // Enables UEFI boot. + // Configure UEFI boot. The default for new images is enabled. Uefi *bool `json:"uefi,omitempty"` // Sets Graphic device model. VideoModel *NullableString `json:"videoModel,omitempty"` - // Enables the use of VirtIO SCSI to provide block device access. By default instances use VirtIO Block. + // Enables the use of VirtIO SCSI to provide block device access. By default servers use VirtIO Block. VirtioScsi *bool `json:"virtioScsi,omitempty"` } @@ -53,14 +55,6 @@ type ImageConfig struct { // will change when the set of required properties is changed func NewImageConfig() *ImageConfig { this := ImageConfig{} - var bootMenu bool = false - this.BootMenu = &bootMenu - var secureBoot bool = false - this.SecureBoot = &secureBoot - var uefi bool = false - this.Uefi = &uefi - var virtioScsi bool = false - this.VirtioScsi = &virtioScsi return &this } @@ -69,17 +63,41 @@ func NewImageConfig() *ImageConfig { // but it doesn't guarantee that properties required by API are set func NewImageConfigWithDefaults() *ImageConfig { this := ImageConfig{} - var bootMenu bool = false - this.BootMenu = &bootMenu - var secureBoot bool = false - this.SecureBoot = &secureBoot - var uefi bool = false - this.Uefi = &uefi - var virtioScsi bool = false - this.VirtioScsi = &virtioScsi return &this } +// GetArchitecture returns the Architecture field value if set, zero value otherwise. +func (o *ImageConfig) GetArchitecture() *string { + if o == nil || IsNil(o.Architecture) { + var ret *string + return ret + } + return o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageConfig) GetArchitectureOk() (*string, bool) { + if o == nil || IsNil(o.Architecture) { + return nil, false + } + return o.Architecture, true +} + +// HasArchitecture returns a boolean if a field has been set. +func (o *ImageConfig) HasArchitecture() bool { + if o != nil && !IsNil(o.Architecture) { + return true + } + + return false +} + +// SetArchitecture gets a reference to the given string and assigns it to the Architecture field. +func (o *ImageConfig) SetArchitecture(v *string) { + o.Architecture = v +} + // GetBootMenu returns the BootMenu field value if set, zero value otherwise. func (o *ImageConfig) GetBootMenu() *bool { if o == nil || IsNil(o.BootMenu) { @@ -658,6 +676,9 @@ func (o *ImageConfig) SetVirtioScsi(v *bool) { func (o ImageConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Architecture) { + toSerialize["architecture"] = o.Architecture + } if !IsNil(o.BootMenu) { toSerialize["bootMenu"] = o.BootMenu } diff --git a/services/iaas/model_keypair.go b/services/iaas/model_keypair.go index 282ef75df..4deffa6d7 100644 --- a/services/iaas/model_keypair.go +++ b/services/iaas/model_keypair.go @@ -24,7 +24,7 @@ type Keypair struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Object that represents an SSH keypair MD5 fingerprint. Fingerprint *string `json:"fingerprint,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty"` diff --git a/services/iaas/model_network.go b/services/iaas/model_network.go index e555379ea..e14f60faf 100644 --- a/services/iaas/model_network.go +++ b/services/iaas/model_network.go @@ -26,7 +26,7 @@ type Network struct { Gateway *NullableString `json:"gateway,omitempty"` // The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. Gatewayv6 *NullableString `json:"gatewayv6,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // REQUIRED Name *string `json:"name"` @@ -43,7 +43,7 @@ type Network struct { PublicIp *string `json:"publicIp,omitempty"` // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` - // The state of a resource object. + // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. // REQUIRED State *string `json:"state"` // Date-time when resource was last updated. diff --git a/services/iaas/model_network_area.go b/services/iaas/model_network_area.go index aab900b25..143638e62 100644 --- a/services/iaas/model_network_area.go +++ b/services/iaas/model_network_area.go @@ -26,14 +26,14 @@ type NetworkArea struct { // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` Ipv4 *NetworkAreaIPv4 `json:"ipv4,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // REQUIRED Name *string `json:"name"` // The amount of projects currently referencing a specific area. // REQUIRED ProjectCount *int64 `json:"projectCount"` - // The state of a resource object. + // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. // REQUIRED State *string `json:"state"` // Date-time when resource was last updated. diff --git a/services/iaas/model_nic.go b/services/iaas/model_nic.go index 6587354dc..ecff3921c 100644 --- a/services/iaas/model_nic.go +++ b/services/iaas/model_nic.go @@ -29,7 +29,7 @@ type NIC struct { Ipv4 *string `json:"ipv4,omitempty"` // Object that represents an IPv6 address. Ipv6 *string `json:"ipv6,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty"` diff --git a/services/iaas/model_partial_update_network_area_payload.go b/services/iaas/model_partial_update_network_area_payload.go index 4db59e096..f3e8781ce 100644 --- a/services/iaas/model_partial_update_network_area_payload.go +++ b/services/iaas/model_partial_update_network_area_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &PartialUpdateNetworkAreaPayload{} // PartialUpdateNetworkAreaPayload struct for PartialUpdateNetworkAreaPayload type PartialUpdateNetworkAreaPayload struct { AddressFamily *UpdateAreaAddressFamily `json:"addressFamily,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` diff --git a/services/iaas/model_partial_update_network_payload.go b/services/iaas/model_partial_update_network_payload.go index b178b3094..43fe96d49 100644 --- a/services/iaas/model_partial_update_network_payload.go +++ b/services/iaas/model_partial_update_network_payload.go @@ -20,7 +20,7 @@ var _ MappedNullable = &PartialUpdateNetworkPayload{} // PartialUpdateNetworkPayload Object that represents the request body for a network update. type PartialUpdateNetworkPayload struct { AddressFamily *UpdateNetworkAddressFamily `json:"addressFamily,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` diff --git a/services/iaas/model_protocol.go b/services/iaas/model_protocol.go index 6451227a8..19785adf8 100644 --- a/services/iaas/model_protocol.go +++ b/services/iaas/model_protocol.go @@ -19,7 +19,7 @@ var _ MappedNullable = &Protocol{} // Protocol The schema for a protocol of a security group rule. type Protocol struct { - // The protocol name which the rule should match. + // The protocol name which the rule should match. Possible values: `ah`, `dccp`, `egp`, `esp`, `gre`, `icmp`, `igmp`, `ipip`, `ipv6-encap`, `ipv6-frag`, `ipv6-icmp`, `ipv6-nonxt`, `ipv6-opts`, `ipv6-route`, `ospf`, `pgm`, `rsvp`, `sctp`, `tcp`, `udp`, `udplite`, `vrrp`. Name *string `json:"name,omitempty"` // The protocol number which the rule should match. Number *int64 `json:"number,omitempty"` diff --git a/services/iaas/model_public_ip.go b/services/iaas/model_public_ip.go index 8726f908c..bf715f0e1 100644 --- a/services/iaas/model_public_ip.go +++ b/services/iaas/model_public_ip.go @@ -23,7 +23,7 @@ type PublicIp struct { Id *string `json:"id,omitempty"` // Object that represents an IP address. Ip *string `json:"ip,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Universally Unique Identifier (UUID). NetworkInterface *NullableString `json:"networkInterface,omitempty"` diff --git a/services/iaas/model_public_network.go b/services/iaas/model_public_network.go new file mode 100644 index 000000000..8f90f2470 --- /dev/null +++ b/services/iaas/model_public_network.go @@ -0,0 +1,111 @@ +/* +IaaS-API + +This API allows you to create and modify IaaS resources. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package iaas + +import ( + "encoding/json" +) + +// checks if the PublicNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicNetwork{} + +// PublicNetwork Public network. +type PublicNetwork struct { + // Classless Inter-Domain Routing (CIDR). + // REQUIRED + Cidr *string `json:"cidr"` +} + +type _PublicNetwork PublicNetwork + +// NewPublicNetwork instantiates a new PublicNetwork object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPublicNetwork(cidr *string) *PublicNetwork { + this := PublicNetwork{} + this.Cidr = cidr + return &this +} + +// NewPublicNetworkWithDefaults instantiates a new PublicNetwork object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPublicNetworkWithDefaults() *PublicNetwork { + this := PublicNetwork{} + return &this +} + +// GetCidr returns the Cidr field value +func (o *PublicNetwork) GetCidr() *string { + if o == nil || IsNil(o.Cidr) { + var ret *string + return ret + } + + return o.Cidr +} + +// GetCidrOk returns a tuple with the Cidr field value +// and a boolean to check if the value has been set. +func (o *PublicNetwork) GetCidrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Cidr, true +} + +// SetCidr sets field value +func (o *PublicNetwork) SetCidr(v *string) { + o.Cidr = v +} + +func (o PublicNetwork) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cidr"] = o.Cidr + return toSerialize, nil +} + +type NullablePublicNetwork struct { + value *PublicNetwork + isSet bool +} + +func (v NullablePublicNetwork) Get() *PublicNetwork { + return v.value +} + +func (v *NullablePublicNetwork) Set(val *PublicNetwork) { + v.value = val + v.isSet = true +} + +func (v NullablePublicNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicNetwork(val *PublicNetwork) *NullablePublicNetwork { + return &NullablePublicNetwork{value: val, isSet: true} +} + +func (v NullablePublicNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_public_network_list_response.go b/services/iaas/model_public_network_list_response.go new file mode 100644 index 000000000..824189115 --- /dev/null +++ b/services/iaas/model_public_network_list_response.go @@ -0,0 +1,111 @@ +/* +IaaS-API + +This API allows you to create and modify IaaS resources. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package iaas + +import ( + "encoding/json" +) + +// checks if the PublicNetworkListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicNetworkListResponse{} + +// PublicNetworkListResponse Public network list response. +type PublicNetworkListResponse struct { + // A list of public networks. + // REQUIRED + Items *[]PublicNetwork `json:"items"` +} + +type _PublicNetworkListResponse PublicNetworkListResponse + +// NewPublicNetworkListResponse instantiates a new PublicNetworkListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPublicNetworkListResponse(items *[]PublicNetwork) *PublicNetworkListResponse { + this := PublicNetworkListResponse{} + this.Items = items + return &this +} + +// NewPublicNetworkListResponseWithDefaults instantiates a new PublicNetworkListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPublicNetworkListResponseWithDefaults() *PublicNetworkListResponse { + this := PublicNetworkListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *PublicNetworkListResponse) GetItems() *[]PublicNetwork { + if o == nil || IsNil(o.Items) { + var ret *[]PublicNetwork + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *PublicNetworkListResponse) GetItemsOk() (*[]PublicNetwork, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *PublicNetworkListResponse) SetItems(v *[]PublicNetwork) { + o.Items = v +} + +func (o PublicNetworkListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullablePublicNetworkListResponse struct { + value *PublicNetworkListResponse + isSet bool +} + +func (v NullablePublicNetworkListResponse) Get() *PublicNetworkListResponse { + return v.value +} + +func (v *NullablePublicNetworkListResponse) Set(val *PublicNetworkListResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePublicNetworkListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicNetworkListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicNetworkListResponse(val *PublicNetworkListResponse) *NullablePublicNetworkListResponse { + return &NullablePublicNetworkListResponse{value: val, isSet: true} +} + +func (v NullablePublicNetworkListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicNetworkListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_request.go b/services/iaas/model_request.go index c44be6818..842ce74ca 100644 --- a/services/iaas/model_request.go +++ b/services/iaas/model_request.go @@ -20,18 +20,18 @@ var _ MappedNullable = &Request{} // Request Object that represents a request. type Request struct { Details *string `json:"details,omitempty"` - // Object that represents a resource action. + // Object that represents a resource action. Possible values: `CREATE`, `DELETE`, `UPDATE`. // REQUIRED RequestAction *string `json:"requestAction"` // Identifier (ID) representing a single API request. // REQUIRED RequestId *string `json:"requestId"` - // Object that represents a resource type. + // Object that represents a resource type. Possible values: `BACKUP`, `IMAGE`, `NETWORK`, `NETWORKAREA`, `NIC`, `PROJECT`, `ROUTE`, `SERVER`, `SERVICEACCOUNT`, `SNAPSHOT`, `VIRTUALIP`, `VOLUME`. // REQUIRED RequestType *string `json:"requestType"` // REQUIRED Resources *[]RequestResource `json:"resources"` - // The state of a resource object. + // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. // REQUIRED Status *string `json:"status"` } diff --git a/services/iaas/model_request_resource.go b/services/iaas/model_request_resource.go index 5d7184719..dec67bad3 100644 --- a/services/iaas/model_request_resource.go +++ b/services/iaas/model_request_resource.go @@ -22,10 +22,10 @@ type RequestResource struct { // Universally Unique Identifier (UUID). // REQUIRED Id *string `json:"id"` - // The state of a resource object. + // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. // REQUIRED Status *string `json:"status"` - // Object that represents a resource type. + // Object that represents a resource type. Possible values: `BACKUP`, `IMAGE`, `NETWORK`, `NETWORKAREA`, `NIC`, `PROJECT`, `ROUTE`, `SERVER`, `SERVICEACCOUNT`, `SNAPSHOT`, `VIRTUALIP`, `VOLUME`. // REQUIRED Type *string `json:"type"` } diff --git a/services/iaas/model_route.go b/services/iaas/model_route.go index 2cc01ae33..5fac5152c 100644 --- a/services/iaas/model_route.go +++ b/services/iaas/model_route.go @@ -22,7 +22,7 @@ var _ MappedNullable = &Route{} type Route struct { // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Object that represents an IP address. // REQUIRED diff --git a/services/iaas/model_security_group.go b/services/iaas/model_security_group.go index 7a2f4e303..92db9f2ee 100644 --- a/services/iaas/model_security_group.go +++ b/services/iaas/model_security_group.go @@ -26,7 +26,7 @@ type SecurityGroup struct { Description *string `json:"description,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/model_server.go b/services/iaas/model_server.go index 3176a6587..a8ea807d9 100644 --- a/services/iaas/model_server.go +++ b/services/iaas/model_server.go @@ -33,9 +33,9 @@ type Server struct { Id *string `json:"id,omitempty"` // Universally Unique Identifier (UUID). ImageId *string `json:"imageId,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. + // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. KeypairName *string `json:"keypairName,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` @@ -49,13 +49,13 @@ type Server struct { Networking *CreateServerPayloadNetworking `json:"networking,omitempty"` // A list of networks attached to a server. Nics *[]ServerNetwork `json:"nics,omitempty"` - // The power status of a server. + // The power status of a server. Possible values: `CRASHED`, `ERROR`, `RUNNING`, `STOPPED`. PowerStatus *string `json:"powerStatus,omitempty"` // A list of General Objects. SecurityGroups *[]string `json:"securityGroups,omitempty"` // A list of service account mails. ServiceAccountMails *[]string `json:"serviceAccountMails,omitempty"` - // The status of a server object. + // The status of a server object. Possible values: `ACTIVE`, `BACKING-UP`, `CREATING`, `DEALLOCATED`, `DEALLOCATING`, `DELETED`, `DELETING`, `ERROR`, `INACTIVE`, `MIGRATING`, `REBOOT`, `REBOOTING`, `REBUILD`, `REBUILDING`, `RESCUE`, `RESCUING`, `RESIZING`, `RESTORING`, `SNAPSHOTTING`, `STARTING`, `STOPPING`, `UNRESCUING`, `UPDATING`. Status *string `json:"status,omitempty"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` diff --git a/services/iaas/model_server_network.go b/services/iaas/model_server_network.go index 2cd5a8e6e..dffc21658 100644 --- a/services/iaas/model_server_network.go +++ b/services/iaas/model_server_network.go @@ -67,8 +67,6 @@ func NewServerNetwork(mac *string, networkId *string, networkName *string, nicId // but it doesn't guarantee that properties required by API are set func NewServerNetworkWithDefaults() *ServerNetwork { this := ServerNetwork{} - var nicSecurity bool = true - this.NicSecurity = &nicSecurity return &this } diff --git a/services/iaas/model_snapshot.go b/services/iaas/model_snapshot.go index a0313ea21..9935d7e09 100644 --- a/services/iaas/model_snapshot.go +++ b/services/iaas/model_snapshot.go @@ -24,13 +24,13 @@ type Snapshot struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` - // The status of a snapshot object. + // The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`. Status *string `json:"status,omitempty"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` diff --git a/services/iaas/model_update_attached_volume_payload.go b/services/iaas/model_update_attached_volume_payload.go index 921410df5..1357e3324 100644 --- a/services/iaas/model_update_attached_volume_payload.go +++ b/services/iaas/model_update_attached_volume_payload.go @@ -33,8 +33,6 @@ type UpdateAttachedVolumePayload struct { // will change when the set of required properties is changed func NewUpdateAttachedVolumePayload() *UpdateAttachedVolumePayload { this := UpdateAttachedVolumePayload{} - var deleteOnTermination bool = false - this.DeleteOnTermination = &deleteOnTermination return &this } @@ -43,8 +41,6 @@ func NewUpdateAttachedVolumePayload() *UpdateAttachedVolumePayload { // but it doesn't guarantee that properties required by API are set func NewUpdateAttachedVolumePayloadWithDefaults() *UpdateAttachedVolumePayload { this := UpdateAttachedVolumePayload{} - var deleteOnTermination bool = false - this.DeleteOnTermination = &deleteOnTermination return &this } diff --git a/services/iaas/model_update_backup_payload.go b/services/iaas/model_update_backup_payload.go index 7a06b479c..41bd159de 100644 --- a/services/iaas/model_update_backup_payload.go +++ b/services/iaas/model_update_backup_payload.go @@ -26,7 +26,7 @@ type UpdateBackupPayload struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` @@ -34,7 +34,7 @@ type UpdateBackupPayload struct { Size *int64 `json:"size,omitempty"` // Universally Unique Identifier (UUID). SnapshotId *string `json:"snapshotId,omitempty"` - // The status of a backup object. + // The status of a backup object. Possible values: `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`. Status *string `json:"status,omitempty"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` diff --git a/services/iaas/model_update_image_payload.go b/services/iaas/model_update_image_payload.go index 7c8ca3f21..5e622ae6a 100644 --- a/services/iaas/model_update_image_payload.go +++ b/services/iaas/model_update_image_payload.go @@ -20,9 +20,9 @@ var _ MappedNullable = &UpdateImagePayload{} // UpdateImagePayload Object that represents an update request body of an Image. type UpdateImagePayload struct { Config *ImageConfig `json:"config,omitempty"` - // Object that represents a disk format. + // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. DiskFormat *string `json:"diskFormat,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Size in Gigabyte. MinDiskSize *int64 `json:"minDiskSize,omitempty"` diff --git a/services/iaas/model_update_key_pair_payload.go b/services/iaas/model_update_key_pair_payload.go index aae8ed115..0d7ecb4a5 100644 --- a/services/iaas/model_update_key_pair_payload.go +++ b/services/iaas/model_update_key_pair_payload.go @@ -19,7 +19,7 @@ var _ MappedNullable = &UpdateKeyPairPayload{} // UpdateKeyPairPayload Object that represents an update request body of a public key of an SSH keypair. type UpdateKeyPairPayload struct { - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` } diff --git a/services/iaas/model_update_network_area_route_payload.go b/services/iaas/model_update_network_area_route_payload.go index 250055374..1655dff76 100644 --- a/services/iaas/model_update_network_area_route_payload.go +++ b/services/iaas/model_update_network_area_route_payload.go @@ -19,7 +19,7 @@ var _ MappedNullable = &UpdateNetworkAreaRoutePayload{} // UpdateNetworkAreaRoutePayload Object that represents the request body for a route update. type UpdateNetworkAreaRoutePayload struct { - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` } diff --git a/services/iaas/model_update_nic_payload.go b/services/iaas/model_update_nic_payload.go index 434714db8..103b72a62 100644 --- a/services/iaas/model_update_nic_payload.go +++ b/services/iaas/model_update_nic_payload.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateNicPayload{} type UpdateNicPayload struct { // A list of IPs or CIDR notations. AllowedAddresses *[]AllowedAddressesInner `json:"allowedAddresses,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` diff --git a/services/iaas/model_update_public_ip_payload.go b/services/iaas/model_update_public_ip_payload.go index 6263b7293..9ebe3c40f 100644 --- a/services/iaas/model_update_public_ip_payload.go +++ b/services/iaas/model_update_public_ip_payload.go @@ -23,7 +23,7 @@ type UpdatePublicIPPayload struct { Id *string `json:"id,omitempty"` // Object that represents an IP address. Ip *string `json:"ip,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // Universally Unique Identifier (UUID). NetworkInterface *NullableString `json:"networkInterface,omitempty"` diff --git a/services/iaas/model_update_security_group_payload.go b/services/iaas/model_update_security_group_payload.go index 5d6d7a9e3..5c227458e 100644 --- a/services/iaas/model_update_security_group_payload.go +++ b/services/iaas/model_update_security_group_payload.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateSecurityGroupPayload{} type UpdateSecurityGroupPayload struct { // Description Object. Allows string up to 127 Characters. Description *string `json:"description,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` diff --git a/services/iaas/model_update_server_payload.go b/services/iaas/model_update_server_payload.go index cb1f51958..0ebb041b5 100644 --- a/services/iaas/model_update_server_payload.go +++ b/services/iaas/model_update_server_payload.go @@ -19,9 +19,9 @@ var _ MappedNullable = &UpdateServerPayload{} // UpdateServerPayload Object that represents an update request body of a server. type UpdateServerPayload struct { - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` - // The name for a General Object. Matches Names and also UUIDs. + // The name for a Server. Name *string `json:"name,omitempty"` } diff --git a/services/iaas/model_update_snapshot_payload.go b/services/iaas/model_update_snapshot_payload.go index 4cc2a0c21..71e46f850 100644 --- a/services/iaas/model_update_snapshot_payload.go +++ b/services/iaas/model_update_snapshot_payload.go @@ -19,7 +19,7 @@ var _ MappedNullable = &UpdateSnapshotPayload{} // UpdateSnapshotPayload Object that represents an update request body of a snapshot. type UpdateSnapshotPayload struct { - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` diff --git a/services/iaas/model_update_volume_payload.go b/services/iaas/model_update_volume_payload.go index cb69b67e1..4da4cb547 100644 --- a/services/iaas/model_update_volume_payload.go +++ b/services/iaas/model_update_volume_payload.go @@ -24,7 +24,7 @@ type UpdateVolumePayload struct { // Description Object. Allows string up to 127 Characters. Description *string `json:"description,omitempty"` ImageConfig *ImageConfig `json:"imageConfig,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` @@ -36,8 +36,6 @@ type UpdateVolumePayload struct { // will change when the set of required properties is changed func NewUpdateVolumePayload() *UpdateVolumePayload { this := UpdateVolumePayload{} - var bootable bool = false - this.Bootable = &bootable return &this } @@ -46,8 +44,6 @@ func NewUpdateVolumePayload() *UpdateVolumePayload { // but it doesn't guarantee that properties required by API are set func NewUpdateVolumePayloadWithDefaults() *UpdateVolumePayload { this := UpdateVolumePayload{} - var bootable bool = false - this.Bootable = &bootable return &this } diff --git a/services/iaas/model_volume.go b/services/iaas/model_volume.go index 29314efef..70edc95bd 100644 --- a/services/iaas/model_volume.go +++ b/services/iaas/model_volume.go @@ -32,7 +32,7 @@ type Volume struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty"` ImageConfig *ImageConfig `json:"imageConfig,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` @@ -43,7 +43,7 @@ type Volume struct { // Size in Gigabyte. Size *int64 `json:"size,omitempty"` Source *VolumeSource `json:"source,omitempty"` - // The status of a volume object. + // The status of a volume object. Possible values: `ATTACHED`, `ATTACHING`, `AVAILABLE`, `AWAITING-TRANSFER`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `DETACHING`, `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, `MAINTENANCE`, `RESERVED`, `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`. Status *string `json:"status,omitempty"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` diff --git a/services/iaas/model_volume_attachment.go b/services/iaas/model_volume_attachment.go index b75f67964..a4865527b 100644 --- a/services/iaas/model_volume_attachment.go +++ b/services/iaas/model_volume_attachment.go @@ -33,8 +33,6 @@ type VolumeAttachment struct { // will change when the set of required properties is changed func NewVolumeAttachment() *VolumeAttachment { this := VolumeAttachment{} - var deleteOnTermination bool = false - this.DeleteOnTermination = &deleteOnTermination return &this } @@ -43,8 +41,6 @@ func NewVolumeAttachment() *VolumeAttachment { // but it doesn't guarantee that properties required by API are set func NewVolumeAttachmentWithDefaults() *VolumeAttachment { this := VolumeAttachment{} - var deleteOnTermination bool = false - this.DeleteOnTermination = &deleteOnTermination return &this } diff --git a/services/iaas/model_volume_performance_class.go b/services/iaas/model_volume_performance_class.go index f6eec0ef6..6d5d936b0 100644 --- a/services/iaas/model_volume_performance_class.go +++ b/services/iaas/model_volume_performance_class.go @@ -23,7 +23,7 @@ type VolumePerformanceClass struct { Description *string `json:"description,omitempty"` // Input/Output Operations per second. Iops *int64 `json:"iops,omitempty"` - // Object that represents the labels of an object. + // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Labels *map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. // REQUIRED diff --git a/services/iaas/model_volume_source.go b/services/iaas/model_volume_source.go index 26d741371..62db77414 100644 --- a/services/iaas/model_volume_source.go +++ b/services/iaas/model_volume_source.go @@ -22,7 +22,7 @@ type VolumeSource struct { // Universally Unique Identifier (UUID). // REQUIRED Id *string `json:"id"` - // The source types of a volume. + // The source types of a volume. Possible values: `image`, `volume`, `snapshot`, `backup`. // REQUIRED Type *string `json:"type"` }