Skip to content

Commit ed5be7b

Browse files
authored
doc: add deprecation notices (#570)
1 parent 013f5a1 commit ed5be7b

File tree

10 files changed

+58
-52
lines changed

10 files changed

+58
-52
lines changed

api/account/v2alpha1/account_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ type CreateSSHKeyRequest struct {
203203
Name string `json:"name"`
204204
// PublicKey: SSH public key. Currently ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST curves are supported
205205
PublicKey string `json:"public_key"`
206-
// OrganizationID: use project_id field instead
206+
// Deprecated: OrganizationID: use project_id field instead
207207
// Precisely one of OrganizationID, ProjectID must be set.
208208
OrganizationID *string `json:"organization_id,omitempty"`
209209
// ProjectID: project owning the resource

api/baremetal/v1/baremetal_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ type CreateServerRequest struct {
735735
Zone scw.Zone `json:"-"`
736736
// OfferID: offer ID of the new server
737737
OfferID string `json:"offer_id"`
738-
// OrganizationID: organization ID with which the server will be created
738+
// Deprecated: OrganizationID: organization ID with which the server will be created
739739
// Precisely one of OrganizationID, ProjectID must be set.
740740
OrganizationID *string `json:"organization_id,omitempty"`
741741
// ProjectID: project ID with which the server will be created

api/baremetal/v1alpha1/baremetal_sdk.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -772,9 +772,9 @@ type Offer struct {
772772
Bandwidth uint32 `json:"bandwidth"`
773773
// CommercialRange: commercial range of the offer
774774
CommercialRange string `json:"commercial_range"`
775-
// PriceByMinute: price of the offer by minutes, this field is deprecated, please use `price_per_sixty_minutes` instead
775+
// Deprecated: PriceByMinute: price of the offer by minutes, this field is deprecated, please use `price_per_sixty_minutes` instead
776776
PriceByMinute *scw.Money `json:"price_by_minute"`
777-
// PriceByMonth: price of the offer by months, this field is deprecated, please use `price_per_month` instead
777+
// Deprecated: PriceByMonth: price of the offer by months, this field is deprecated, please use `price_per_month` instead
778778
PriceByMonth *scw.Money `json:"price_by_month"`
779779
// PricePerSixtyMinutes: price of the offer for the next 60 minutes (a server order at 11h32 will be payed until 12h32)
780780
PricePerSixtyMinutes *scw.Money `json:"price_per_sixty_minutes"`
@@ -1641,7 +1641,7 @@ func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, er
16411641

16421642
type CreateIPFailoverRequest struct {
16431643
Zone scw.Zone `json:"-"`
1644-
// OrganizationID: ID of the organization to associate to the IP failover
1644+
// Deprecated: OrganizationID: ID of the organization to associate to the IP failover
16451645
// Precisely one of OrganizationID, ProjectID must be set.
16461646
OrganizationID *string `json:"organization_id,omitempty"`
16471647
// ProjectID: ID of the project to associate to the IP failover

api/instance/v1/instance_sdk.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ type SecurityGroup struct {
952952
Organization string `json:"organization"`
953953
// Project: the security group project ID
954954
Project string `json:"project"`
955-
// OrganizationDefault: true if it is your default security group for this organization ID
955+
// Deprecated: OrganizationDefault: true if it is your default security group for this organization ID
956956
OrganizationDefault bool `json:"organization_default"`
957957
// ProjectDefault: true if it is your default security group for this project ID
958958
ProjectDefault bool `json:"project_default"`
@@ -1319,7 +1319,7 @@ type VolumeTemplate struct {
13191319
//
13201320
// Default value: l_ssd
13211321
VolumeType VolumeVolumeType `json:"volume_type,omitempty"`
1322-
// Organization: organization ID of the volume
1322+
// Deprecated: Organization: organization ID of the volume
13231323
// Precisely one of Organization, Project must be set.
13241324
Organization *string `json:"organization,omitempty"`
13251325
// Project: project ID of the volume
@@ -1636,7 +1636,7 @@ type CreateServerRequest struct {
16361636
BootType *BootType `json:"boot_type,omitempty"`
16371637
// Bootscript: the bootscript ID to use when `boot_type` is set to `bootscript`
16381638
Bootscript *string `json:"bootscript,omitempty"`
1639-
// Organization: the server organization ID
1639+
// Deprecated: Organization: the server organization ID
16401640
// Precisely one of Organization, Project must be set.
16411641
Organization *string `json:"organization,omitempty"`
16421642
// Project: the server project ID
@@ -2271,7 +2271,7 @@ type CreateImageRequest struct {
22712271
DefaultBootscript string `json:"default_bootscript,omitempty"`
22722272
// ExtraVolumes: additional volumes of the image
22732273
ExtraVolumes map[string]*VolumeTemplate `json:"extra_volumes,omitempty"`
2274-
// Organization: organization ID of the image
2274+
// Deprecated: Organization: organization ID of the image
22752275
// Precisely one of Organization, Project must be set.
22762276
Organization *string `json:"organization,omitempty"`
22772277
// Project: project ID of the image
@@ -2529,7 +2529,7 @@ type CreateSnapshotRequest struct {
25292529
Name string `json:"name,omitempty"`
25302530
// VolumeID: UUID of the volume
25312531
VolumeID string `json:"volume_id,omitempty"`
2532-
// Organization: organization ID of the snapshot
2532+
// Deprecated: Organization: organization ID of the snapshot
25332533
// Precisely one of Organization, Project must be set.
25342534
Organization *string `json:"organization,omitempty"`
25352535
// Project: project ID of the snapshot
@@ -2824,7 +2824,7 @@ type CreateVolumeRequest struct {
28242824
Zone scw.Zone `json:"-"`
28252825
// Name: the volume name
28262826
Name string `json:"name,omitempty"`
2827-
// Organization: the volume organization ID
2827+
// Deprecated: Organization: the volume organization ID
28282828
// Precisely one of Organization, Project must be set.
28292829
Organization *string `json:"organization,omitempty"`
28302830
// Project: the volume project ID
@@ -3099,13 +3099,13 @@ type CreateSecurityGroupRequest struct {
30993099
Name string `json:"name,omitempty"`
31003100
// Description: description of the security group
31013101
Description string `json:"description,omitempty"`
3102-
// Organization: organization ID the security group belongs to
3102+
// Deprecated: Organization: organization ID the security group belongs to
31033103
// Precisely one of Organization, Project must be set.
31043104
Organization *string `json:"organization,omitempty"`
31053105
// Project: project ID the security group belong to
31063106
// Precisely one of Organization, Project must be set.
31073107
Project *string `json:"project,omitempty"`
3108-
// OrganizationDefault: whether this security group becomes the default security group for new instances
3108+
// Deprecated: OrganizationDefault: whether this security group becomes the default security group for new instances
31093109
//
31103110
// Default value: false
31113111
// Precisely one of OrganizationDefault, ProjectDefault must be set.
@@ -3278,7 +3278,7 @@ type setSecurityGroupRequest struct {
32783278
Organization string `json:"organization"`
32793279
// Project: the security group project ID
32803280
Project string `json:"project"`
3281-
// OrganizationDefault: please use project_default instead
3281+
// Deprecated: OrganizationDefault: please use project_default instead
32823282
OrganizationDefault bool `json:"organization_default"`
32833283
// ProjectDefault: true use this security group for future instances created in this project
32843284
ProjectDefault bool `json:"project_default"`
@@ -3720,7 +3720,7 @@ type CreatePlacementGroupRequest struct {
37203720
Zone scw.Zone `json:"-"`
37213721
// Name: name of the placement group
37223722
Name string `json:"name,omitempty"`
3723-
// Organization: organization ID of the placement group
3723+
// Deprecated: Organization: organization ID of the placement group
37243724
// Precisely one of Organization, Project must be set.
37253725
Organization *string `json:"organization,omitempty"`
37263726
// Project: project ID of the placement group
@@ -4199,7 +4199,7 @@ func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, error) {
41994199

42004200
type CreateIPRequest struct {
42014201
Zone scw.Zone `json:"-"`
4202-
// Organization: the organization ID the IP is reserved in
4202+
// Deprecated: Organization: the organization ID the IP is reserved in
42034203
// Precisely one of Organization, Project must be set.
42044204
Organization *string `json:"organization,omitempty"`
42054205
// Project: the project ID the IP is reserved in

api/iot/v1beta1/iot_sdk.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,11 +1299,11 @@ type ListDevicesRequest struct {
12991299
Name *string `json:"-"`
13001300
// HubID: filter on the hub
13011301
HubID *string `json:"-"`
1302-
// Enabled: deprecated, ignored filter
1302+
// Deprecated: Enabled: deprecated, ignored filter
13031303
Enabled *bool `json:"-"`
13041304
// AllowInsecure: filter on the allow_insecure flag
13051305
AllowInsecure *bool `json:"-"`
1306-
// IsConnected: deprecated, ignored filter
1306+
// Deprecated: IsConnected: deprecated, ignored filter
13071307
IsConnected *bool `json:"-"`
13081308
}
13091309

@@ -2344,7 +2344,7 @@ type CreateNetworkRequest struct {
23442344
Region scw.Region `json:"-"`
23452345
// Name: network name
23462346
Name string `json:"name"`
2347-
// OrganizationID: deprecated: Organization owning the resource, do not use
2347+
// Deprecated: OrganizationID: deprecated: Organization owning the resource, do not use
23482348
//
23492349
// Will always be assigned to the organization owning the IoT hub.
23502350
OrganizationID string `json:"organization_id"`

api/k8s/v1/k8s_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ func (r *ListClustersResponse) UnsafeAppend(res interface{}) (uint32, error) {
958958

959959
type CreateClusterRequest struct {
960960
Region scw.Region `json:"-"`
961-
// OrganizationID: the organization ID where the cluster will be created
961+
// Deprecated: OrganizationID: the organization ID where the cluster will be created
962962
// Precisely one of OrganizationID, ProjectID must be set.
963963
OrganizationID *string `json:"organization_id,omitempty"`
964964
// ProjectID: the project ID where the cluster will be created

api/lb/v1/lb_sdk.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ type Backend struct {
947947
Pool []string `json:"pool"`
948948

949949
LB *LB `json:"lb"`
950-
950+
// Deprecated
951951
SendProxyV2 bool `json:"send_proxy_v2"`
952952

953953
TimeoutServer *time.Duration `json:"timeout_server"`
@@ -1080,7 +1080,7 @@ type Frontend struct {
10801080
LB *LB `json:"lb"`
10811081

10821082
TimeoutClient *time.Duration `json:"timeout_client"`
1083-
1083+
// Deprecated
10841084
Certificate *Certificate `json:"certificate"`
10851085

10861086
CertificateIDs []string `json:"certificate_ids"`
@@ -1531,7 +1531,7 @@ func (r *ListLBsResponse) UnsafeAppend(res interface{}) (uint32, error) {
15311531

15321532
type CreateLBRequest struct {
15331533
Region scw.Region `json:"-"`
1534-
// OrganizationID: owner of resources
1534+
// Deprecated: OrganizationID: owner of resources
15351535
// Precisely one of OrganizationID, ProjectID must be set.
15361536
OrganizationID *string `json:"organization_id,omitempty"`
15371537
// ProjectID: assign the resource to a project ID
@@ -1864,7 +1864,7 @@ func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, error) {
18641864

18651865
type CreateIPRequest struct {
18661866
Region scw.Region `json:"-"`
1867-
// OrganizationID: owner of resources
1867+
// Deprecated: OrganizationID: owner of resources
18681868
// Precisely one of OrganizationID, ProjectID must be set.
18691869
OrganizationID *string `json:"organization_id,omitempty"`
18701870
// ProjectID: assign the resource to a project ID
@@ -2141,7 +2141,7 @@ type CreateBackendRequest struct {
21412141
HealthCheck *HealthCheck `json:"health_check"`
21422142
// ServerIP: backend server IP addresses list (IPv4 or IPv6)
21432143
ServerIP []string `json:"server_ip"`
2144-
// SendProxyV2: deprecated in favor of proxy_protocol field !
2144+
// Deprecated: SendProxyV2: deprecated in favor of proxy_protocol field !
21452145
SendProxyV2 bool `json:"send_proxy_v2"`
21462146
// TimeoutServer: maximum server connection inactivity time
21472147
TimeoutServer *time.Duration `json:"timeout_server"`
@@ -2308,7 +2308,7 @@ type UpdateBackendRequest struct {
23082308
StickySessions StickySessionsType `json:"sticky_sessions"`
23092309

23102310
StickySessionsCookieName string `json:"sticky_sessions_cookie_name"`
2311-
2311+
// Deprecated
23122312
SendProxyV2 bool `json:"send_proxy_v2"`
23132313

23142314
TimeoutServer *time.Duration `json:"timeout_server"`
@@ -2773,7 +2773,7 @@ type CreateFrontendRequest struct {
27732773
BackendID string `json:"backend_id"`
27742774
// TimeoutClient: set the maximum inactivity time on the client side
27752775
TimeoutClient *time.Duration `json:"timeout_client"`
2776-
// CertificateID: certificate ID, deprecated in favor of certificate_ids array !
2776+
// Deprecated: CertificateID: certificate ID, deprecated in favor of certificate_ids array !
27772777
CertificateID *string `json:"certificate_id"`
27782778
// CertificateIDs: list of certificate IDs to bind on the frontend
27792779
CertificateIDs *[]string `json:"certificate_ids"`
@@ -2902,7 +2902,7 @@ type UpdateFrontendRequest struct {
29022902
BackendID string `json:"backend_id"`
29032903
// TimeoutClient: client session maximum inactivity time
29042904
TimeoutClient *time.Duration `json:"timeout_client"`
2905-
// CertificateID: certificate ID, deprecated in favor of `certificate_ids` array!
2905+
// Deprecated: CertificateID: certificate ID, deprecated in favor of `certificate_ids` array!
29062906
CertificateID *string `json:"certificate_id"`
29072907
// CertificateIDs: list of certificate IDs to bind on the frontend
29082908
CertificateIDs *[]string `json:"certificate_ids"`
@@ -3019,7 +3019,7 @@ type GetLBStatsRequest struct {
30193019
LBID string `json:"-"`
30203020
}
30213021

3022-
// GetLBStats: get usage statistics of a given load balancer
3022+
// Deprecated: GetLBStats: get usage statistics of a given load balancer
30233023
func (s *API) GetLBStats(req *GetLBStatsRequest, opts ...scw.RequestOption) (*LBStats, error) {
30243024
var err error
30253025

@@ -3717,7 +3717,7 @@ type CreateSubscriberRequest struct {
37173717
// WebhookConfig: webHook URI configuration
37183718
// Precisely one of EmailConfig, WebhookConfig must be set.
37193719
WebhookConfig *SubscriberWebhookConfig `json:"webhook_config,omitempty"`
3720-
// OrganizationID: owner of resources
3720+
// Deprecated: OrganizationID: owner of resources
37213721
// Precisely one of OrganizationID, ProjectID must be set.
37223722
OrganizationID *string `json:"organization_id,omitempty"`
37233723
// ProjectID: assign the resource to a project ID

api/rdb/v1/rdb_sdk.go

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -731,13 +731,15 @@ type DatabaseBackup struct {
731731
Region scw.Region `json:"region"`
732732
}
733733

734+
// DatabaseEngine: database engine
734735
type DatabaseEngine struct {
736+
// Name: engine name
735737
Name string `json:"name"`
736-
738+
// LogoURL: engine logo URL
737739
LogoURL string `json:"logo_url"`
738-
740+
// Versions: available versions
739741
Versions []*EngineVersion `json:"versions"`
740-
742+
// Region: region of this database engine
741743
Region scw.Region `json:"region"`
742744
}
743745

@@ -763,42 +765,46 @@ type Endpoint struct {
763765
Name *string `json:"name"`
764766
}
765767

768+
// EngineSetting: engine setting
766769
type EngineSetting struct {
770+
// Name: setting name from database engine
767771
Name string `json:"name"`
768-
772+
// DefaultValue: value set when not specified
769773
DefaultValue string `json:"default_value"`
770-
774+
// HotConfigurable: setting can be applied without restarting
771775
HotConfigurable bool `json:"hot_configurable"`
772-
776+
// Description: setting description
773777
Description string `json:"description"`
774-
// PropertyType:
778+
// PropertyType: setting type
775779
//
776780
// Default value: BOOLEAN
777781
PropertyType EngineSettingPropertyType `json:"property_type"`
778-
782+
// Unit: setting base unit
779783
Unit *string `json:"unit"`
780-
784+
// StringConstraint: validation regex for string type settings
781785
StringConstraint *string `json:"string_constraint"`
782-
786+
// IntMin: minimum value for int types
783787
IntMin *int32 `json:"int_min"`
784-
788+
// IntMax: maximum value for int types
785789
IntMax *int32 `json:"int_max"`
786790
}
787791

792+
// EngineVersion: engine version
788793
type EngineVersion struct {
794+
// Version: database engine version
789795
Version string `json:"version"`
790-
796+
// Name: database engine name
791797
Name string `json:"name"`
792-
798+
// EndOfLife: end of life date
793799
EndOfLife *time.Time `json:"end_of_life"`
794-
800+
// AvailableSettings: engine settings available to be set
795801
AvailableSettings []*EngineSetting `json:"available_settings"`
796-
802+
// Disabled: disabled versions cannot be created
797803
Disabled bool `json:"disabled"`
798-
804+
// Beta: beta status of engine version
799805
Beta bool `json:"beta"`
800-
801-
InitSettings []*EngineSetting `json:"init_settings"`
806+
// AvailableInitSettings: engine settings available to be set at database initialisation
807+
AvailableInitSettings []*EngineSetting `json:"available_init_settings"`
802808
}
803809

804810
// Instance: instance

api/registry/v1/registry_sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ type CreateNamespaceRequest struct {
548548
Name string `json:"name"`
549549
// Description: define a description
550550
Description string `json:"description"`
551-
// OrganizationID: assign the namespace owner (deprecated)
551+
// Deprecated: OrganizationID: assign the namespace owner (deprecated)
552552
// Precisely one of OrganizationID, ProjectID must be set.
553553
OrganizationID *string `json:"organization_id,omitempty"`
554554
// ProjectID: assign the namespace to a project ID

api/test/v1/test_sdk.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ type CreateHumanRequest struct {
412412
//
413413
// Default value: unknown
414414
EyesColor EyeColors `json:"eyes_color"`
415-
415+
// Deprecated
416416
// Precisely one of OrganizationID, ProjectID must be set.
417417
OrganizationID *string `json:"organization_id,omitempty"`
418418

@@ -617,11 +617,11 @@ func (s *API) RunHuman(req *RunHumanRequest, opts ...scw.RequestOption) (*Human,
617617

618618
type SmokeHumanRequest struct {
619619
Region scw.Region `json:"-"`
620-
// HumanID: UUID of the human you want to make smoking
620+
// Deprecated: HumanID: UUID of the human you want to make smoking
621621
HumanID string `json:"-"`
622622
}
623623

624-
// SmokeHuman: make a human smoke
624+
// Deprecated: SmokeHuman: make a human smoke
625625
//
626626
// Make a human smoke.
627627
func (s *API) SmokeHuman(req *SmokeHumanRequest, opts ...scw.RequestOption) (*Human, error) {

0 commit comments

Comments
 (0)