Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add deprecation notices #570

Merged
merged 1 commit into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/account/v2alpha1/account_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion api/baremetal/v1/baremetal_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions api/baremetal/v1alpha1/baremetal_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions api/instance/v1/instance_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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"`
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions api/iot/v1beta1/iot_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:"-"`
}

Expand Down Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion api/k8s/v1/k8s_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions api/lb/v1/lb_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
44 changes: 26 additions & 18 deletions api/rdb/v1/rdb_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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"`
}

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion api/registry/v1/registry_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions api/test/v1/test_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down Expand Up @@ -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) {
Expand Down