Skip to content

Commit

Permalink
feat(block): add organization_id filter in listings (scaleway#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Nov 24, 2023
1 parent 948146e commit bd36039
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/block/v1alpha1/block_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ type ListSnapshotsRequest struct {
// ProjectID: filter by Project ID.
ProjectID *string `json:"-"`

// OrganizationID: filter by Organization ID.
OrganizationID *string `json:"-"`

// Page: page number.
Page *int32 `json:"-"`

Expand Down Expand Up @@ -680,6 +683,9 @@ type ListVolumesRequest struct {
// ProjectID: filter by Project ID.
ProjectID *string `json:"-"`

// OrganizationID: filter by Organization ID.
OrganizationID *string `json:"-"`

// Page: page number.
Page *int32 `json:"-"`

Expand Down Expand Up @@ -868,6 +874,7 @@ func (s *API) ListVolumes(req *ListVolumesRequest, opts ...scw.RequestOption) (*
query := url.Values{}
parameter.AddToQuery(query, "order_by", req.OrderBy)
parameter.AddToQuery(query, "project_id", req.ProjectID)
parameter.AddToQuery(query, "organization_id", req.OrganizationID)
parameter.AddToQuery(query, "page", req.Page)
parameter.AddToQuery(query, "page_size", req.PageSize)
parameter.AddToQuery(query, "name", req.Name)
Expand Down Expand Up @@ -1044,6 +1051,7 @@ func (s *API) ListSnapshots(req *ListSnapshotsRequest, opts ...scw.RequestOption
query := url.Values{}
parameter.AddToQuery(query, "order_by", req.OrderBy)
parameter.AddToQuery(query, "project_id", req.ProjectID)
parameter.AddToQuery(query, "organization_id", req.OrganizationID)
parameter.AddToQuery(query, "page", req.Page)
parameter.AddToQuery(query, "page_size", req.PageSize)
parameter.AddToQuery(query, "volume_id", req.VolumeID)
Expand Down

0 comments on commit bd36039

Please sign in to comment.