From 99c01066bedea6e9438e0669630df34f310b87da Mon Sep 17 00:00:00 2001 From: Ionos Cloud SDK Robot Date: Thu, 8 Aug 2024 12:15:38 +0000 Subject: [PATCH] auto-generated version 6.2.1 --- client.go | 2 +- configuration.go | 2 +- docs/models/NicProperties.md | 26 ++++ docs/models/ServerProperties.md | 26 ++++ docs/models/UserMetadata.md | 130 ++++++++++++++++++ go.mod | 13 +- go.sum | 2 + model_nic_properties.go | 44 +++++++ model_server_properties.go | 44 +++++++ model_user_metadata.go | 227 ++++++++++++++++++++++++++++++++ 10 files changed, 506 insertions(+), 10 deletions(-) diff --git a/client.go b/client.go index 9ad02a8..8281969 100644 --- a/client.go +++ b/client.go @@ -52,7 +52,7 @@ const ( RequestStatusFailed = "FAILED" RequestStatusDone = "DONE" - Version = "6.2.0" + Version = "6.2.1" ) // Constants for APIs diff --git a/configuration.go b/configuration.go index 54e7e89..df1682f 100644 --- a/configuration.go +++ b/configuration.go @@ -131,7 +131,7 @@ func NewConfiguration(username, password, token, hostUrl string) *Configuration cfg := &Configuration{ DefaultHeader: make(map[string]string), DefaultQueryParams: url.Values{}, - UserAgent: "ionos-cloud-sdk-go/v6.2.0", + UserAgent: "ionos-cloud-sdk-go/v6.2.1", Debug: false, Username: username, Password: password, diff --git a/docs/models/NicProperties.md b/docs/models/NicProperties.md index c3fda18..dd80adf 100644 --- a/docs/models/NicProperties.md +++ b/docs/models/NicProperties.md @@ -16,6 +16,7 @@ |**FirewallType** | Pointer to **string** | The type of firewall rules that will be allowed on the NIC. If not specified, the default INGRESS value is used. | [optional] | |**DeviceNumber** | Pointer to **int32** | The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created using Cloud API and no DCD changes were performed on the Datacenter. | [optional] [readonly] | |**PciSlot** | Pointer to **int32** | The PCI slot number for the NIC. | [optional] [readonly] | +|**Vnet** | Pointer to **string** | The vnet ID that belongs to this NIC; Requires system privileges, for internal usage only | [optional] | ## Methods @@ -351,5 +352,30 @@ SetPciSlot sets PciSlot field to given value. HasPciSlot returns a boolean if a field has been set. +### GetVnet + +`func (o *NicProperties) GetVnet() string` + +GetVnet returns the Vnet field if non-nil, zero value otherwise. + +### GetVnetOk + +`func (o *NicProperties) GetVnetOk() (*string, bool)` + +GetVnetOk returns a tuple with the Vnet field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVnet + +`func (o *NicProperties) SetVnet(v string)` + +SetVnet sets Vnet field to given value. + +### HasVnet + +`func (o *NicProperties) HasVnet() bool` + +HasVnet returns a boolean if a field has been set. + diff --git a/docs/models/ServerProperties.md b/docs/models/ServerProperties.md index 28bb3dc..82fcde1 100644 --- a/docs/models/ServerProperties.md +++ b/docs/models/ServerProperties.md @@ -15,6 +15,7 @@ |**BootVolume** | Pointer to [**ResourceReference**](ResourceReference.md) | | [optional] | |**CpuFamily** | Pointer to **string** | CPU architecture on which server gets provisioned; not all CPU architectures are available in all datacenter regions; available CPU architectures can be retrieved from the datacenter resource; must not be provided for CUBE and VCPU servers. | [optional] | |**Type** | Pointer to **string** | Server type: CUBE, ENTERPRISE or VCPU. | [optional] | +|**PlacementGroupId** | Pointer to **string** | The placement group ID that belongs to this server; Requires system privileges, for internal usage only | [optional] | ## Methods @@ -310,5 +311,30 @@ SetType sets Type field to given value. HasType returns a boolean if a field has been set. +### GetPlacementGroupId + +`func (o *ServerProperties) GetPlacementGroupId() string` + +GetPlacementGroupId returns the PlacementGroupId field if non-nil, zero value otherwise. + +### GetPlacementGroupIdOk + +`func (o *ServerProperties) GetPlacementGroupIdOk() (*string, bool)` + +GetPlacementGroupIdOk returns a tuple with the PlacementGroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlacementGroupId + +`func (o *ServerProperties) SetPlacementGroupId(v string)` + +SetPlacementGroupId sets PlacementGroupId field to given value. + +### HasPlacementGroupId + +`func (o *ServerProperties) HasPlacementGroupId() bool` + +HasPlacementGroupId returns a boolean if a field has been set. + diff --git a/docs/models/UserMetadata.md b/docs/models/UserMetadata.md index f310b6e..040c48e 100644 --- a/docs/models/UserMetadata.md +++ b/docs/models/UserMetadata.md @@ -6,6 +6,11 @@ |------------ | ------------- | ------------- | -------------| |**Etag** | Pointer to **string** | Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. | [optional] [readonly] | |**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The time the user was created. | [optional] [readonly] | +|**CreatedBy** | Pointer to **string** | The user who has created the resource. | [optional] [readonly] | +|**CreatedByUserId** | Pointer to **string** | The unique ID of the user who created the resource. | [optional] [readonly] | +|**LastModifiedDate** | Pointer to [**time.Time**](time.Time.md) | The last time the resource was modified. | [optional] [readonly] | +|**LastModifiedBy** | Pointer to **string** | The user who last modified the resource. | [optional] [readonly] | +|**LastModifiedByUserId** | Pointer to **string** | The unique ID of the user who last modified the resource. | [optional] [readonly] | |**LastLogin** | Pointer to [**time.Time**](time.Time.md) | The time of the last login by the user. | [optional] [readonly] | ## Methods @@ -77,6 +82,131 @@ SetCreatedDate sets CreatedDate field to given value. HasCreatedDate returns a boolean if a field has been set. +### GetCreatedBy + +`func (o *UserMetadata) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *UserMetadata) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *UserMetadata) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + +### HasCreatedBy + +`func (o *UserMetadata) HasCreatedBy() bool` + +HasCreatedBy returns a boolean if a field has been set. + +### GetCreatedByUserId + +`func (o *UserMetadata) GetCreatedByUserId() string` + +GetCreatedByUserId returns the CreatedByUserId field if non-nil, zero value otherwise. + +### GetCreatedByUserIdOk + +`func (o *UserMetadata) GetCreatedByUserIdOk() (*string, bool)` + +GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByUserId + +`func (o *UserMetadata) SetCreatedByUserId(v string)` + +SetCreatedByUserId sets CreatedByUserId field to given value. + +### HasCreatedByUserId + +`func (o *UserMetadata) HasCreatedByUserId() bool` + +HasCreatedByUserId returns a boolean if a field has been set. + +### GetLastModifiedDate + +`func (o *UserMetadata) GetLastModifiedDate() time.Time` + +GetLastModifiedDate returns the LastModifiedDate field if non-nil, zero value otherwise. + +### GetLastModifiedDateOk + +`func (o *UserMetadata) GetLastModifiedDateOk() (*time.Time, bool)` + +GetLastModifiedDateOk returns a tuple with the LastModifiedDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedDate + +`func (o *UserMetadata) SetLastModifiedDate(v time.Time)` + +SetLastModifiedDate sets LastModifiedDate field to given value. + +### HasLastModifiedDate + +`func (o *UserMetadata) HasLastModifiedDate() bool` + +HasLastModifiedDate returns a boolean if a field has been set. + +### GetLastModifiedBy + +`func (o *UserMetadata) GetLastModifiedBy() string` + +GetLastModifiedBy returns the LastModifiedBy field if non-nil, zero value otherwise. + +### GetLastModifiedByOk + +`func (o *UserMetadata) GetLastModifiedByOk() (*string, bool)` + +GetLastModifiedByOk returns a tuple with the LastModifiedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedBy + +`func (o *UserMetadata) SetLastModifiedBy(v string)` + +SetLastModifiedBy sets LastModifiedBy field to given value. + +### HasLastModifiedBy + +`func (o *UserMetadata) HasLastModifiedBy() bool` + +HasLastModifiedBy returns a boolean if a field has been set. + +### GetLastModifiedByUserId + +`func (o *UserMetadata) GetLastModifiedByUserId() string` + +GetLastModifiedByUserId returns the LastModifiedByUserId field if non-nil, zero value otherwise. + +### GetLastModifiedByUserIdOk + +`func (o *UserMetadata) GetLastModifiedByUserIdOk() (*string, bool)` + +GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedByUserId + +`func (o *UserMetadata) SetLastModifiedByUserId(v string)` + +SetLastModifiedByUserId sets LastModifiedByUserId field to given value. + +### HasLastModifiedByUserId + +`func (o *UserMetadata) HasLastModifiedByUserId() bool` + +HasLastModifiedByUserId returns a boolean if a field has been set. + ### GetLastLogin `func (o *UserMetadata) GetLastLogin() time.Time` diff --git a/go.mod b/go.mod index 353c698..0bad9e5 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,11 @@ module github.com/ionos-cloud/sdk-go/v6 -go 1.19 - -require golang.org/x/oauth2 v0.6.0 +go 1.21 require ( - github.com/golang/protobuf v1.5.2 // indirect - golang.org/x/net v0.8.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.0 // indirect + golang.org/x/oauth2 v0.21.0 ) -retract v6.0.5851 // Published accidentally. +retract ( + v6.0.5851 // Published accidentally. +) \ No newline at end of file diff --git a/go.sum b/go.sum index 1a2ed39..94a8255 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/model_nic_properties.go b/model_nic_properties.go index 76b8165..cb0e799 100644 --- a/model_nic_properties.go +++ b/model_nic_properties.go @@ -44,6 +44,8 @@ type NicProperties struct { DeviceNumber *int32 `json:"deviceNumber,omitempty"` // The PCI slot number for the NIC. PciSlot *int32 `json:"pciSlot,omitempty"` + // The vnet ID that belongs to this NIC; Requires system privileges, for internal usage only + Vnet *string `json:"vnet,omitempty"` } // NewNicProperties instantiates a new NicProperties object @@ -536,6 +538,44 @@ func (o *NicProperties) HasPciSlot() bool { return false } +// GetVnet returns the Vnet field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetVnet() *string { + if o == nil { + return nil + } + + return o.Vnet + +} + +// GetVnetOk returns a tuple with the Vnet field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NicProperties) GetVnetOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Vnet, true +} + +// SetVnet sets field value +func (o *NicProperties) SetVnet(v string) { + + o.Vnet = &v + +} + +// HasVnet returns a boolean if a field has been set. +func (o *NicProperties) HasVnet() bool { + if o != nil && o.Vnet != nil { + return true + } + + return false +} + func (o NicProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { @@ -588,6 +628,10 @@ func (o NicProperties) MarshalJSON() ([]byte, error) { toSerialize["pciSlot"] = o.PciSlot } + if o.Vnet != nil { + toSerialize["vnet"] = o.Vnet + } + return json.Marshal(toSerialize) } diff --git a/model_server_properties.go b/model_server_properties.go index e630bd6..094c1df 100644 --- a/model_server_properties.go +++ b/model_server_properties.go @@ -36,6 +36,8 @@ type ServerProperties struct { CpuFamily *string `json:"cpuFamily,omitempty"` // Server type: CUBE, ENTERPRISE or VCPU. Type *string `json:"type,omitempty"` + // The placement group ID that belongs to this server; Requires system privileges, for internal usage only + PlacementGroupId *string `json:"placementGroupId,omitempty"` } // NewServerProperties instantiates a new ServerProperties object @@ -474,6 +476,44 @@ func (o *ServerProperties) HasType() bool { return false } +// GetPlacementGroupId returns the PlacementGroupId field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetPlacementGroupId() *string { + if o == nil { + return nil + } + + return o.PlacementGroupId + +} + +// GetPlacementGroupIdOk returns a tuple with the PlacementGroupId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ServerProperties) GetPlacementGroupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.PlacementGroupId, true +} + +// SetPlacementGroupId sets field value +func (o *ServerProperties) SetPlacementGroupId(v string) { + + o.PlacementGroupId = &v + +} + +// HasPlacementGroupId returns a boolean if a field has been set. +func (o *ServerProperties) HasPlacementGroupId() bool { + if o != nil && o.PlacementGroupId != nil { + return true + } + + return false +} + func (o ServerProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.TemplateUuid != nil { @@ -520,6 +560,10 @@ func (o ServerProperties) MarshalJSON() ([]byte, error) { toSerialize["type"] = o.Type } + if o.PlacementGroupId != nil { + toSerialize["placementGroupId"] = o.PlacementGroupId + } + return json.Marshal(toSerialize) } diff --git a/model_user_metadata.go b/model_user_metadata.go index edc3468..64fff33 100644 --- a/model_user_metadata.go +++ b/model_user_metadata.go @@ -21,6 +21,16 @@ type UserMetadata struct { Etag *string `json:"etag,omitempty"` // The time the user was created. CreatedDate *IonosTime + // The user who has created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // The unique ID of the user who created the resource. + CreatedByUserId *string `json:"createdByUserId,omitempty"` + // The last time the resource was modified. + LastModifiedDate *IonosTime + // The user who last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // The unique ID of the user who last modified the resource. + LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` // The time of the last login by the user. LastLogin *IonosTime } @@ -126,6 +136,203 @@ func (o *UserMetadata) HasCreatedDate() bool { return false } +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, nil is returned +func (o *UserMetadata) GetCreatedBy() *string { + if o == nil { + return nil + } + + return o.CreatedBy + +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserMetadata) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.CreatedBy, true +} + +// SetCreatedBy sets field value +func (o *UserMetadata) SetCreatedBy(v string) { + + o.CreatedBy = &v + +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *UserMetadata) HasCreatedBy() bool { + if o != nil && o.CreatedBy != nil { + return true + } + + return false +} + +// GetCreatedByUserId returns the CreatedByUserId field value +// If the value is explicit nil, nil is returned +func (o *UserMetadata) GetCreatedByUserId() *string { + if o == nil { + return nil + } + + return o.CreatedByUserId + +} + +// GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserMetadata) GetCreatedByUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.CreatedByUserId, true +} + +// SetCreatedByUserId sets field value +func (o *UserMetadata) SetCreatedByUserId(v string) { + + o.CreatedByUserId = &v + +} + +// HasCreatedByUserId returns a boolean if a field has been set. +func (o *UserMetadata) HasCreatedByUserId() bool { + if o != nil && o.CreatedByUserId != nil { + return true + } + + return false +} + +// GetLastModifiedDate returns the LastModifiedDate field value +// If the value is explicit nil, nil is returned +func (o *UserMetadata) GetLastModifiedDate() *time.Time { + if o == nil { + return nil + } + + if o.LastModifiedDate == nil { + return nil + } + return &o.LastModifiedDate.Time + +} + +// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserMetadata) GetLastModifiedDateOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + + if o.LastModifiedDate == nil { + return nil, false + } + return &o.LastModifiedDate.Time, true + +} + +// SetLastModifiedDate sets field value +func (o *UserMetadata) SetLastModifiedDate(v time.Time) { + + o.LastModifiedDate = &IonosTime{v} + +} + +// HasLastModifiedDate returns a boolean if a field has been set. +func (o *UserMetadata) HasLastModifiedDate() bool { + if o != nil && o.LastModifiedDate != nil { + return true + } + + return false +} + +// GetLastModifiedBy returns the LastModifiedBy field value +// If the value is explicit nil, nil is returned +func (o *UserMetadata) GetLastModifiedBy() *string { + if o == nil { + return nil + } + + return o.LastModifiedBy + +} + +// GetLastModifiedByOk returns a tuple with the LastModifiedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserMetadata) GetLastModifiedByOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.LastModifiedBy, true +} + +// SetLastModifiedBy sets field value +func (o *UserMetadata) SetLastModifiedBy(v string) { + + o.LastModifiedBy = &v + +} + +// HasLastModifiedBy returns a boolean if a field has been set. +func (o *UserMetadata) HasLastModifiedBy() bool { + if o != nil && o.LastModifiedBy != nil { + return true + } + + return false +} + +// GetLastModifiedByUserId returns the LastModifiedByUserId field value +// If the value is explicit nil, nil is returned +func (o *UserMetadata) GetLastModifiedByUserId() *string { + if o == nil { + return nil + } + + return o.LastModifiedByUserId + +} + +// GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserMetadata) GetLastModifiedByUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.LastModifiedByUserId, true +} + +// SetLastModifiedByUserId sets field value +func (o *UserMetadata) SetLastModifiedByUserId(v string) { + + o.LastModifiedByUserId = &v + +} + +// HasLastModifiedByUserId returns a boolean if a field has been set. +func (o *UserMetadata) HasLastModifiedByUserId() bool { + if o != nil && o.LastModifiedByUserId != nil { + return true + } + + return false +} + // GetLastLogin returns the LastLogin field value // If the value is explicit nil, nil is returned func (o *UserMetadata) GetLastLogin() *time.Time { @@ -181,6 +388,26 @@ func (o UserMetadata) MarshalJSON() ([]byte, error) { toSerialize["createdDate"] = o.CreatedDate } + if o.CreatedBy != nil { + toSerialize["createdBy"] = o.CreatedBy + } + + if o.CreatedByUserId != nil { + toSerialize["createdByUserId"] = o.CreatedByUserId + } + + if o.LastModifiedDate != nil { + toSerialize["lastModifiedDate"] = o.LastModifiedDate + } + + if o.LastModifiedBy != nil { + toSerialize["lastModifiedBy"] = o.LastModifiedBy + } + + if o.LastModifiedByUserId != nil { + toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId + } + if o.LastLogin != nil { toSerialize["lastLogin"] = o.LastLogin }