From 0a3f1a4d181187c3ae91ea4f4cf19aa7f150bba6 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Tue, 15 Sep 2020 10:37:32 +0000 Subject: [PATCH] feat: update generated apis --- api/account/v2alpha1/account_sdk.go | 2 +- api/baremetal/v1/baremetal_sdk.go | 2 +- api/baremetal/v1alpha1/baremetal_sdk.go | 6 ++-- api/instance/v1/instance_sdk.go | 22 ++++++------- api/iot/v1beta1/iot_sdk.go | 6 ++-- api/k8s/v1/k8s_sdk.go | 2 +- api/lb/v1/lb_sdk.go | 20 +++++------ api/rdb/v1/rdb_sdk.go | 44 +++++++++++++++---------- api/registry/v1/registry_sdk.go | 2 +- api/test/v1/test_sdk.go | 6 ++-- 10 files changed, 60 insertions(+), 52 deletions(-) diff --git a/api/account/v2alpha1/account_sdk.go b/api/account/v2alpha1/account_sdk.go index 685d518f9..f51dcffaa 100644 --- a/api/account/v2alpha1/account_sdk.go +++ b/api/account/v2alpha1/account_sdk.go @@ -203,7 +203,7 @@ type CreateSSHKeyRequest struct { Name string `json:"name"` // PublicKey: SSH public key. Currently ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST curves are supported PublicKey string `json:"public_key"` - // OrganizationID: use project_id field instead + // Deprecated: OrganizationID: use project_id field instead // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: project owning the resource diff --git a/api/baremetal/v1/baremetal_sdk.go b/api/baremetal/v1/baremetal_sdk.go index 72913a797..3b8797a12 100644 --- a/api/baremetal/v1/baremetal_sdk.go +++ b/api/baremetal/v1/baremetal_sdk.go @@ -735,7 +735,7 @@ type CreateServerRequest struct { Zone scw.Zone `json:"-"` // OfferID: offer ID of the new server OfferID string `json:"offer_id"` - // OrganizationID: organization ID with which the server will be created + // Deprecated: OrganizationID: organization ID with which the server will be created // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: project ID with which the server will be created diff --git a/api/baremetal/v1alpha1/baremetal_sdk.go b/api/baremetal/v1alpha1/baremetal_sdk.go index 9643c0662..5d99d9180 100644 --- a/api/baremetal/v1alpha1/baremetal_sdk.go +++ b/api/baremetal/v1alpha1/baremetal_sdk.go @@ -772,9 +772,9 @@ type Offer struct { Bandwidth uint32 `json:"bandwidth"` // CommercialRange: commercial range of the offer CommercialRange string `json:"commercial_range"` - // PriceByMinute: price of the offer by minutes, this field is deprecated, please use `price_per_sixty_minutes` instead + // Deprecated: PriceByMinute: price of the offer by minutes, this field is deprecated, please use `price_per_sixty_minutes` instead PriceByMinute *scw.Money `json:"price_by_minute"` - // PriceByMonth: price of the offer by months, this field is deprecated, please use `price_per_month` instead + // Deprecated: PriceByMonth: price of the offer by months, this field is deprecated, please use `price_per_month` instead PriceByMonth *scw.Money `json:"price_by_month"` // PricePerSixtyMinutes: price of the offer for the next 60 minutes (a server order at 11h32 will be payed until 12h32) PricePerSixtyMinutes *scw.Money `json:"price_per_sixty_minutes"` @@ -1641,7 +1641,7 @@ func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, er type CreateIPFailoverRequest struct { Zone scw.Zone `json:"-"` - // OrganizationID: ID of the organization to associate to the IP failover + // Deprecated: OrganizationID: ID of the organization to associate to the IP failover // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: ID of the project to associate to the IP failover diff --git a/api/instance/v1/instance_sdk.go b/api/instance/v1/instance_sdk.go index 926af20e1..18532771c 100644 --- a/api/instance/v1/instance_sdk.go +++ b/api/instance/v1/instance_sdk.go @@ -952,7 +952,7 @@ type SecurityGroup struct { Organization string `json:"organization"` // Project: the security group project ID Project string `json:"project"` - // OrganizationDefault: true if it is your default security group for this organization ID + // Deprecated: OrganizationDefault: true if it is your default security group for this organization ID OrganizationDefault bool `json:"organization_default"` // ProjectDefault: true if it is your default security group for this project ID ProjectDefault bool `json:"project_default"` @@ -1319,7 +1319,7 @@ type VolumeTemplate struct { // // Default value: l_ssd VolumeType VolumeVolumeType `json:"volume_type,omitempty"` - // Organization: organization ID of the volume + // Deprecated: Organization: organization ID of the volume // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: project ID of the volume @@ -1636,7 +1636,7 @@ type CreateServerRequest struct { BootType *BootType `json:"boot_type,omitempty"` // Bootscript: the bootscript ID to use when `boot_type` is set to `bootscript` Bootscript *string `json:"bootscript,omitempty"` - // Organization: the server organization ID + // Deprecated: Organization: the server organization ID // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: the server project ID @@ -2271,7 +2271,7 @@ type CreateImageRequest struct { DefaultBootscript string `json:"default_bootscript,omitempty"` // ExtraVolumes: additional volumes of the image ExtraVolumes map[string]*VolumeTemplate `json:"extra_volumes,omitempty"` - // Organization: organization ID of the image + // Deprecated: Organization: organization ID of the image // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: project ID of the image @@ -2529,7 +2529,7 @@ type CreateSnapshotRequest struct { Name string `json:"name,omitempty"` // VolumeID: UUID of the volume VolumeID string `json:"volume_id,omitempty"` - // Organization: organization ID of the snapshot + // Deprecated: Organization: organization ID of the snapshot // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: project ID of the snapshot @@ -2824,7 +2824,7 @@ type CreateVolumeRequest struct { Zone scw.Zone `json:"-"` // Name: the volume name Name string `json:"name,omitempty"` - // Organization: the volume organization ID + // Deprecated: Organization: the volume organization ID // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: the volume project ID @@ -3099,13 +3099,13 @@ type CreateSecurityGroupRequest struct { Name string `json:"name,omitempty"` // Description: description of the security group Description string `json:"description,omitempty"` - // Organization: organization ID the security group belongs to + // Deprecated: Organization: organization ID the security group belongs to // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: project ID the security group belong to // Precisely one of Organization, Project must be set. Project *string `json:"project,omitempty"` - // OrganizationDefault: whether this security group becomes the default security group for new instances + // Deprecated: OrganizationDefault: whether this security group becomes the default security group for new instances // // Default value: false // Precisely one of OrganizationDefault, ProjectDefault must be set. @@ -3278,7 +3278,7 @@ type setSecurityGroupRequest struct { Organization string `json:"organization"` // Project: the security group project ID Project string `json:"project"` - // OrganizationDefault: please use project_default instead + // Deprecated: OrganizationDefault: please use project_default instead OrganizationDefault bool `json:"organization_default"` // ProjectDefault: true use this security group for future instances created in this project ProjectDefault bool `json:"project_default"` @@ -3720,7 +3720,7 @@ type CreatePlacementGroupRequest struct { Zone scw.Zone `json:"-"` // Name: name of the placement group Name string `json:"name,omitempty"` - // Organization: organization ID of the placement group + // Deprecated: Organization: organization ID of the placement group // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: project ID of the placement group @@ -4199,7 +4199,7 @@ func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, error) { type CreateIPRequest struct { Zone scw.Zone `json:"-"` - // Organization: the organization ID the IP is reserved in + // Deprecated: Organization: the organization ID the IP is reserved in // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: the project ID the IP is reserved in diff --git a/api/iot/v1beta1/iot_sdk.go b/api/iot/v1beta1/iot_sdk.go index 23b40db04..ae3b76436 100644 --- a/api/iot/v1beta1/iot_sdk.go +++ b/api/iot/v1beta1/iot_sdk.go @@ -1299,11 +1299,11 @@ type ListDevicesRequest struct { Name *string `json:"-"` // HubID: filter on the hub HubID *string `json:"-"` - // Enabled: deprecated, ignored filter + // Deprecated: Enabled: deprecated, ignored filter Enabled *bool `json:"-"` // AllowInsecure: filter on the allow_insecure flag AllowInsecure *bool `json:"-"` - // IsConnected: deprecated, ignored filter + // Deprecated: IsConnected: deprecated, ignored filter IsConnected *bool `json:"-"` } @@ -2344,7 +2344,7 @@ type CreateNetworkRequest struct { Region scw.Region `json:"-"` // Name: network name Name string `json:"name"` - // OrganizationID: deprecated: Organization owning the resource, do not use + // Deprecated: OrganizationID: deprecated: Organization owning the resource, do not use // // Will always be assigned to the organization owning the IoT hub. OrganizationID string `json:"organization_id"` diff --git a/api/k8s/v1/k8s_sdk.go b/api/k8s/v1/k8s_sdk.go index 2539f84c4..a9a964fba 100644 --- a/api/k8s/v1/k8s_sdk.go +++ b/api/k8s/v1/k8s_sdk.go @@ -958,7 +958,7 @@ func (r *ListClustersResponse) UnsafeAppend(res interface{}) (uint32, error) { type CreateClusterRequest struct { Region scw.Region `json:"-"` - // OrganizationID: the organization ID where the cluster will be created + // Deprecated: OrganizationID: the organization ID where the cluster will be created // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: the project ID where the cluster will be created diff --git a/api/lb/v1/lb_sdk.go b/api/lb/v1/lb_sdk.go index 3202052d6..6a3998f60 100644 --- a/api/lb/v1/lb_sdk.go +++ b/api/lb/v1/lb_sdk.go @@ -947,7 +947,7 @@ type Backend struct { Pool []string `json:"pool"` LB *LB `json:"lb"` - + // Deprecated SendProxyV2 bool `json:"send_proxy_v2"` TimeoutServer *time.Duration `json:"timeout_server"` @@ -1080,7 +1080,7 @@ type Frontend struct { LB *LB `json:"lb"` TimeoutClient *time.Duration `json:"timeout_client"` - + // Deprecated Certificate *Certificate `json:"certificate"` CertificateIDs []string `json:"certificate_ids"` @@ -1531,7 +1531,7 @@ func (r *ListLBsResponse) UnsafeAppend(res interface{}) (uint32, error) { type CreateLBRequest struct { Region scw.Region `json:"-"` - // OrganizationID: owner of resources + // Deprecated: OrganizationID: owner of resources // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: assign the resource to a project ID @@ -1864,7 +1864,7 @@ func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, error) { type CreateIPRequest struct { Region scw.Region `json:"-"` - // OrganizationID: owner of resources + // Deprecated: OrganizationID: owner of resources // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: assign the resource to a project ID @@ -2141,7 +2141,7 @@ type CreateBackendRequest struct { HealthCheck *HealthCheck `json:"health_check"` // ServerIP: backend server IP addresses list (IPv4 or IPv6) ServerIP []string `json:"server_ip"` - // SendProxyV2: deprecated in favor of proxy_protocol field ! + // Deprecated: SendProxyV2: deprecated in favor of proxy_protocol field ! SendProxyV2 bool `json:"send_proxy_v2"` // TimeoutServer: maximum server connection inactivity time TimeoutServer *time.Duration `json:"timeout_server"` @@ -2308,7 +2308,7 @@ type UpdateBackendRequest struct { StickySessions StickySessionsType `json:"sticky_sessions"` StickySessionsCookieName string `json:"sticky_sessions_cookie_name"` - + // Deprecated SendProxyV2 bool `json:"send_proxy_v2"` TimeoutServer *time.Duration `json:"timeout_server"` @@ -2773,7 +2773,7 @@ type CreateFrontendRequest struct { BackendID string `json:"backend_id"` // TimeoutClient: set the maximum inactivity time on the client side TimeoutClient *time.Duration `json:"timeout_client"` - // CertificateID: certificate ID, deprecated in favor of certificate_ids array ! + // Deprecated: CertificateID: certificate ID, deprecated in favor of certificate_ids array ! CertificateID *string `json:"certificate_id"` // CertificateIDs: list of certificate IDs to bind on the frontend CertificateIDs *[]string `json:"certificate_ids"` @@ -2902,7 +2902,7 @@ type UpdateFrontendRequest struct { BackendID string `json:"backend_id"` // TimeoutClient: client session maximum inactivity time TimeoutClient *time.Duration `json:"timeout_client"` - // CertificateID: certificate ID, deprecated in favor of `certificate_ids` array! + // Deprecated: CertificateID: certificate ID, deprecated in favor of `certificate_ids` array! CertificateID *string `json:"certificate_id"` // CertificateIDs: list of certificate IDs to bind on the frontend CertificateIDs *[]string `json:"certificate_ids"` @@ -3019,7 +3019,7 @@ type GetLBStatsRequest struct { LBID string `json:"-"` } -// GetLBStats: get usage statistics of a given load balancer +// Deprecated: GetLBStats: get usage statistics of a given load balancer func (s *API) GetLBStats(req *GetLBStatsRequest, opts ...scw.RequestOption) (*LBStats, error) { var err error @@ -3717,7 +3717,7 @@ type CreateSubscriberRequest struct { // WebhookConfig: webHook URI configuration // Precisely one of EmailConfig, WebhookConfig must be set. WebhookConfig *SubscriberWebhookConfig `json:"webhook_config,omitempty"` - // OrganizationID: owner of resources + // Deprecated: OrganizationID: owner of resources // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: assign the resource to a project ID diff --git a/api/rdb/v1/rdb_sdk.go b/api/rdb/v1/rdb_sdk.go index 779c780cd..cd11eba64 100644 --- a/api/rdb/v1/rdb_sdk.go +++ b/api/rdb/v1/rdb_sdk.go @@ -166,6 +166,8 @@ const ( DatabaseBackupStatusError = DatabaseBackupStatus("error") // DatabaseBackupStatusExporting is [insert doc]. DatabaseBackupStatusExporting = DatabaseBackupStatus("exporting") + // DatabaseBackupStatusLocked is [insert doc]. + DatabaseBackupStatusLocked = DatabaseBackupStatus("locked") ) func (enum DatabaseBackupStatus) String() string { @@ -729,13 +731,15 @@ type DatabaseBackup struct { Region scw.Region `json:"region"` } +// DatabaseEngine: database engine type DatabaseEngine struct { + // Name: engine name Name string `json:"name"` - + // LogoURL: engine logo URL LogoURL string `json:"logo_url"` - + // Versions: available versions Versions []*EngineVersion `json:"versions"` - + // Region: region of this database engine Region scw.Region `json:"region"` } @@ -761,42 +765,46 @@ type Endpoint struct { Name *string `json:"name"` } +// EngineSetting: engine setting type EngineSetting struct { + // Name: setting name from database engine Name string `json:"name"` - + // DefaultValue: value set when not specified DefaultValue string `json:"default_value"` - + // HotConfigurable: setting can be applied without restarting HotConfigurable bool `json:"hot_configurable"` - + // Description: setting description Description string `json:"description"` - // PropertyType: + // PropertyType: setting type // // Default value: BOOLEAN PropertyType EngineSettingPropertyType `json:"property_type"` - + // Unit: setting base unit Unit *string `json:"unit"` - + // StringConstraint: validation regex for string type settings StringConstraint *string `json:"string_constraint"` - + // IntMin: minimum value for int types IntMin *int32 `json:"int_min"` - + // IntMax: maximum value for int types IntMax *int32 `json:"int_max"` } +// EngineVersion: engine version type EngineVersion struct { + // Version: database engine version Version string `json:"version"` - + // Name: database engine name Name string `json:"name"` - + // EndOfLife: end of life date EndOfLife *time.Time `json:"end_of_life"` - + // AvailableSettings: engine settings available to be set AvailableSettings []*EngineSetting `json:"available_settings"` - + // Disabled: disabled versions cannot be created Disabled bool `json:"disabled"` - + // Beta: beta status of engine version Beta bool `json:"beta"` - - InitSettings []*EngineSetting `json:"init_settings"` + // AvailableInitSettings: engine settings available to be set at database initialisation + AvailableInitSettings []*EngineSetting `json:"available_init_settings"` } // Instance: instance diff --git a/api/registry/v1/registry_sdk.go b/api/registry/v1/registry_sdk.go index 9dea6f07f..5123360d4 100644 --- a/api/registry/v1/registry_sdk.go +++ b/api/registry/v1/registry_sdk.go @@ -548,7 +548,7 @@ type CreateNamespaceRequest struct { Name string `json:"name"` // Description: define a description Description string `json:"description"` - // OrganizationID: assign the namespace owner (deprecated) + // Deprecated: OrganizationID: assign the namespace owner (deprecated) // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: assign the namespace to a project ID diff --git a/api/test/v1/test_sdk.go b/api/test/v1/test_sdk.go index d27f46bda..2f6823ea0 100644 --- a/api/test/v1/test_sdk.go +++ b/api/test/v1/test_sdk.go @@ -412,7 +412,7 @@ type CreateHumanRequest struct { // // Default value: unknown EyesColor EyeColors `json:"eyes_color"` - + // Deprecated // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` @@ -617,11 +617,11 @@ func (s *API) RunHuman(req *RunHumanRequest, opts ...scw.RequestOption) (*Human, type SmokeHumanRequest struct { Region scw.Region `json:"-"` - // HumanID: UUID of the human you want to make smoking + // Deprecated: HumanID: UUID of the human you want to make smoking HumanID string `json:"-"` } -// SmokeHuman: make a human smoke +// Deprecated: SmokeHuman: make a human smoke // // Make a human smoke. func (s *API) SmokeHuman(req *SmokeHumanRequest, opts ...scw.RequestOption) (*Human, error) {