Skip to content

Commit

Permalink
feat(account/v2): Add deprecation warnings (#1780)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Jul 13, 2023
1 parent efc922e commit 4a36f18
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions api/account/v2/account_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ type CreateProjectRequest struct {
Description *string `json:"description"`
}

// CreateProject: create a new Project for an Organization.
// Deprecated: CreateProject: create a new Project for an Organization.
// Deprecated in favor of Account API v3.
// Generate a new Project for an Organization, specifying its configuration including name and description.
func (s *API) CreateProject(req *CreateProjectRequest, opts ...scw.RequestOption) (*Project, error) {
var err error
Expand Down Expand Up @@ -173,7 +174,8 @@ type ListProjectsRequest struct {
ProjectIDs []string `json:"-"`
}

// ListProjects: list all Projects of an Organization.
// Deprecated: ListProjects: list all Projects of an Organization.
// Deprecated in favor of Account API v3.
// List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project.
func (s *API) ListProjects(req *ListProjectsRequest, opts ...scw.RequestOption) (*ListProjectsResponse, error) {
var err error
Expand Down Expand Up @@ -217,7 +219,8 @@ type GetProjectRequest struct {
ProjectID string `json:"-"`
}

// GetProject: get an existing Project.
// Deprecated: GetProject: get an existing Project.
// Deprecated in favor of Account API v3.
// Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object.
func (s *API) GetProject(req *GetProjectRequest, opts ...scw.RequestOption) (*Project, error) {
var err error
Expand Down Expand Up @@ -251,7 +254,8 @@ type DeleteProjectRequest struct {
ProjectID string `json:"-"`
}

// DeleteProject: delete an existing Project.
// Deprecated: DeleteProject: delete an existing Project.
// Deprecated in favor of Account API v3.
// Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone.
func (s *API) DeleteProject(req *DeleteProjectRequest, opts ...scw.RequestOption) error {
var err error
Expand Down Expand Up @@ -287,7 +291,8 @@ type UpdateProjectRequest struct {
Description *string `json:"description"`
}

// UpdateProject: update Project.
// Deprecated: UpdateProject: update Project.
// Deprecated in favor of Account API v3.
// Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.
func (s *API) UpdateProject(req *UpdateProjectRequest, opts ...scw.RequestOption) (*Project, error) {
var err error
Expand Down

0 comments on commit 4a36f18

Please sign in to comment.