Skip to content
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
114 changes: 59 additions & 55 deletions api/instance/v1/instance_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1181,37 +1181,41 @@ type SetPlacementGroupServersResponse struct {
Servers []*PlacementGroupServer `json:"servers"`
}

// Snapshot: snapshot
type Snapshot struct {
// ID: the snapshot ID
ID string `json:"id"`

// Name: the snapshot name
Name string `json:"name"`

// Organization: the snapshot organization ID
Organization string `json:"organization"`
// VolumeType:
// Project: the snapshot project ID
Project string `json:"project"`
// VolumeType: the snapshot volume type
//
// Default value: l_ssd
VolumeType VolumeVolumeType `json:"volume_type"`

// Size: the snapshot size
Size scw.Size `json:"size"`
// State:
// State: the snapshot state
//
// Default value: available
State SnapshotState `json:"state"`

// BaseVolume: the volume on which the snapshot is based on
BaseVolume *SnapshotBaseVolume `json:"base_volume"`

// CreationDate: the snapshot creation date
CreationDate *time.Time `json:"creation_date"`

// ModificationDate: the snapshot modification date
ModificationDate *time.Time `json:"modification_date"`

Project string `json:"project"`

// Zone: the snapshot zone
Zone scw.Zone `json:"zone"`
}

// SnapshotBaseVolume: snapshot. base volume
type SnapshotBaseVolume struct {
// ID: the volume ID on which the snapshot is based on
ID string `json:"id"`

// Name: the volume name on which the snapshot is based on
Name string `json:"name"`
}

Expand Down Expand Up @@ -1261,29 +1265,29 @@ type UpdateVolumeResponse struct {

// Volume: volume
type Volume struct {
// ID: the volumes unique ID
// ID: the volume unique ID
ID string `json:"id"`
// Name: the volumes names
// Name: the volume name
Name string `json:"name"`
// ExportURI: show the volumes NBD export URI
// ExportURI: show the volume NBD export URI
ExportURI string `json:"export_uri"`
// Size: the volumes disk size
// Size: the volume disk size
Size scw.Size `json:"size"`
// VolumeType: the volumes type
// VolumeType: the volume type
//
// Default value: l_ssd
VolumeType VolumeVolumeType `json:"volume_type"`
// CreationDate: the volumes creation date
// CreationDate: the volume creation date
CreationDate *time.Time `json:"creation_date"`
// ModificationDate: the volumes modification date
// ModificationDate: the volume modification date
ModificationDate *time.Time `json:"modification_date"`
// Organization: the volumes organization ID
// Organization: the volume organization ID
Organization string `json:"organization"`
// Project: the volumes project ID
// Project: the volume project ID
Project string `json:"project"`
// Server: the server attached to the volume
Server *ServerSummary `json:"server"`
// State: the volumes state
// State: the volume state
//
// Default value: available
State VolumeState `json:"state"`
Expand Down Expand Up @@ -2522,10 +2526,10 @@ 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
// Precisely one of Organization, Project must be set.
Organization *string `json:"organization,omitempty"`

// Project: project ID of the snapshot
// Precisely one of Organization, Project must be set.
Project *string `json:"project,omitempty"`
}
Expand Down Expand Up @@ -2815,27 +2819,27 @@ func (r *ListVolumesResponse) UnsafeAppend(res interface{}) (uint32, error) {

type CreateVolumeRequest struct {
Zone scw.Zone `json:"-"`

// Name: the volume name
Name string `json:"name,omitempty"`

// Organization: the volume organization ID
// Precisely one of Organization, Project must be set.
Organization *string `json:"organization,omitempty"`
// VolumeType:
// Project: the volume project ID
// Precisely one of Organization, Project must be set.
Project *string `json:"project,omitempty"`
// VolumeType: the volume type
//
// Default value: l_ssd
VolumeType VolumeVolumeType `json:"volume_type"`

// Size: the volume disk size
// Precisely one of BaseSnapshot, BaseVolume, Size must be set.
Size *scw.Size `json:"size,omitempty"`

// BaseVolume: the ID of the volume on which this volume will be based
// Precisely one of BaseSnapshot, BaseVolume, Size must be set.
BaseVolume *string `json:"base_volume,omitempty"`

// BaseSnapshot: the ID of the snapshot on which this volume will be based
// Precisely one of BaseSnapshot, BaseVolume, Size must be set.
BaseSnapshot *string `json:"base_snapshot,omitempty"`

// Precisely one of Organization, Project must be set.
Project *string `json:"project,omitempty"`
}

// CreateVolume: create a volume
Expand Down Expand Up @@ -3247,38 +3251,38 @@ func (s *API) DeleteSecurityGroup(req *DeleteSecurityGroupRequest, opts ...scw.R

type setSecurityGroupRequest struct {
Zone scw.Zone `json:"-"`

// ID: the ID of the security group (will be ignored)
ID string `json:"-"`

// Name: the name of the security group
Name string `json:"name"`

// CreationDate: the creation date of the security group (will be ignored)
CreationDate *time.Time `json:"creation_date"`

// ModificationDate: the modification date of the security group (will be ignored)
ModificationDate *time.Time `json:"modification_date"`

// Description: the description of the security group
Description string `json:"description"`

// EnableDefaultSecurity: true to block SMTP on IPv4 and IPv6
EnableDefaultSecurity bool `json:"enable_default_security"`
// InboundDefaultPolicy:
// InboundDefaultPolicy: the default inbound policy
//
// Default value: accept
InboundDefaultPolicy SecurityGroupPolicy `json:"inbound_default_policy"`

Organization string `json:"organization"`

OrganizationDefault bool `json:"organization_default"`
// OutboundDefaultPolicy:
// OutboundDefaultPolicy: the default outbound policy
//
// Default value: accept
OutboundDefaultPolicy SecurityGroupPolicy `json:"outbound_default_policy"`

Servers []*ServerSummary `json:"servers"`

Stateful bool `json:"stateful"`

// Organization: the security groups organization ID
Organization string `json:"organization"`
// Project: the security group project ID
Project string `json:"project"`

// 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"`
// Servers: the servers attached to this security group
Servers []*ServerSummary `json:"servers"`
// Stateful: true to set the security group as stateful
Stateful bool `json:"stateful"`
}

// setSecurityGroup: update a security group
Expand Down Expand Up @@ -3713,17 +3717,17 @@ 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
// Precisely one of Organization, Project must be set.
Organization *string `json:"organization,omitempty"`

// Project: project ID of the placement group
// Precisely one of Organization, Project must be set.
Project *string `json:"project,omitempty"`
// PolicyMode:
// PolicyMode: the operating mode of the placement group
//
// Default value: optional
PolicyMode PlacementGroupPolicyMode `json:"policy_mode"`
// PolicyType:
// PolicyType: the policy type of the placement group
//
// Default value: max_availability
PolicyType PlacementGroupPolicyType `json:"policy_type"`
Expand Down
16 changes: 2 additions & 14 deletions api/iot/v1beta1/iot_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,10 @@ const (
ListDevicesRequestOrderByUpdatedAtAsc = ListDevicesRequestOrderBy("updated_at_asc")
// ListDevicesRequestOrderByUpdatedAtDesc is [insert doc].
ListDevicesRequestOrderByUpdatedAtDesc = ListDevicesRequestOrderBy("updated_at_desc")
// ListDevicesRequestOrderByEnabledAsc is [insert doc].
ListDevicesRequestOrderByEnabledAsc = ListDevicesRequestOrderBy("enabled_asc")
// ListDevicesRequestOrderByEnabledDesc is [insert doc].
ListDevicesRequestOrderByEnabledDesc = ListDevicesRequestOrderBy("enabled_desc")
// ListDevicesRequestOrderByAllowInsecureAsc is [insert doc].
ListDevicesRequestOrderByAllowInsecureAsc = ListDevicesRequestOrderBy("allow_insecure_asc")
// ListDevicesRequestOrderByAllowInsecureDesc is [insert doc].
ListDevicesRequestOrderByAllowInsecureDesc = ListDevicesRequestOrderBy("allow_insecure_desc")
// ListDevicesRequestOrderByLastSeenAtAsc is [insert doc].
ListDevicesRequestOrderByLastSeenAtAsc = ListDevicesRequestOrderBy("last_seen_at_asc")
// ListDevicesRequestOrderByLastSeenAtDesc is [insert doc].
ListDevicesRequestOrderByLastSeenAtDesc = ListDevicesRequestOrderBy("last_seen_at_desc")
)

func (enum ListDevicesRequestOrderBy) String() string {
Expand Down Expand Up @@ -240,10 +232,6 @@ const (
ListHubsRequestOrderByUpdatedAtAsc = ListHubsRequestOrderBy("updated_at_asc")
// ListHubsRequestOrderByUpdatedAtDesc is [insert doc].
ListHubsRequestOrderByUpdatedAtDesc = ListHubsRequestOrderBy("updated_at_desc")
// ListHubsRequestOrderByEnabledAsc is [insert doc].
ListHubsRequestOrderByEnabledAsc = ListHubsRequestOrderBy("enabled_asc")
// ListHubsRequestOrderByEnabledDesc is [insert doc].
ListHubsRequestOrderByEnabledDesc = ListHubsRequestOrderBy("enabled_desc")
)

func (enum ListHubsRequestOrderBy) String() string {
Expand Down Expand Up @@ -1311,11 +1299,11 @@ type ListDevicesRequest struct {
Name *string `json:"-"`
// HubID: filter on the hub
HubID *string `json:"-"`
// Enabled: filter on the enabled flag
// Enabled: deprecated, ignored filter
Enabled *bool `json:"-"`
// AllowInsecure: filter on the allow_insecure flag
AllowInsecure *bool `json:"-"`
// IsConnected: filter on the is_connected state
// IsConnected: deprecated, ignored filter
IsConnected *bool `json:"-"`
}

Expand Down