Skip to content

Commit 4a36f18

Browse files
authored
feat(account/v2): Add deprecation warnings (#1780)
1 parent efc922e commit 4a36f18

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

api/account/v2/account_sdk.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ type CreateProjectRequest struct {
123123
Description *string `json:"description"`
124124
}
125125

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

176-
// ListProjects: list all Projects of an Organization.
177+
// Deprecated: ListProjects: list all Projects of an Organization.
178+
// Deprecated in favor of Account API v3.
177179
// 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.
178180
func (s *API) ListProjects(req *ListProjectsRequest, opts ...scw.RequestOption) (*ListProjectsResponse, error) {
179181
var err error
@@ -217,7 +219,8 @@ type GetProjectRequest struct {
217219
ProjectID string `json:"-"`
218220
}
219221

220-
// GetProject: get an existing Project.
222+
// Deprecated: GetProject: get an existing Project.
223+
// Deprecated in favor of Account API v3.
221224
// 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.
222225
func (s *API) GetProject(req *GetProjectRequest, opts ...scw.RequestOption) (*Project, error) {
223226
var err error
@@ -251,7 +254,8 @@ type DeleteProjectRequest struct {
251254
ProjectID string `json:"-"`
252255
}
253256

254-
// DeleteProject: delete an existing Project.
257+
// Deprecated: DeleteProject: delete an existing Project.
258+
// Deprecated in favor of Account API v3.
255259
// 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.
256260
func (s *API) DeleteProject(req *DeleteProjectRequest, opts ...scw.RequestOption) error {
257261
var err error
@@ -287,7 +291,8 @@ type UpdateProjectRequest struct {
287291
Description *string `json:"description"`
288292
}
289293

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

0 commit comments

Comments
 (0)