3939 _ = namegenerator .GetRandomName
4040)
4141
42- // API: user related data
43- //
44- // This API allows you to manage projects.
42+ // API: this API allows you to manage projects.
4543type API struct {
4644 client * scw.Client
4745}
@@ -85,42 +83,42 @@ func (enum *ListProjectsRequestOrderBy) UnmarshalJSON(data []byte) error {
8583 return nil
8684}
8785
88- // ListProjectsResponse: list projects response
86+ // ListProjectsResponse: list projects response.
8987type ListProjectsResponse struct {
90- // TotalCount: the total number of projects
88+ // TotalCount: the total number of projects.
9189 TotalCount uint32 `json:"total_count"`
92- // Projects: the paginated returned projects
90+ // Projects: the paginated returned projects.
9391 Projects []* Project `json:"projects"`
9492}
9593
96- // Project: project
94+ // Project: project.
9795type Project struct {
98- // ID: the ID of the project
96+ // ID: the ID of the project.
9997 ID string `json:"id"`
100- // Name: the name of the project
98+ // Name: the name of the project.
10199 Name string `json:"name"`
102- // OrganizationID: the organization ID of the project
100+ // OrganizationID: the organization ID of the project.
103101 OrganizationID string `json:"organization_id"`
104- // CreatedAt: the creation date of the project
102+ // CreatedAt: the creation date of the project.
105103 CreatedAt * time.Time `json:"created_at"`
106- // UpdatedAt: the update date of the project
104+ // UpdatedAt: the update date of the project.
107105 UpdatedAt * time.Time `json:"updated_at"`
108- // Description: the description of the project
106+ // Description: the description of the project.
109107 Description string `json:"description"`
110108}
111109
112110// Service API
113111
114112type CreateProjectRequest struct {
115- // Name: the name of the project
113+ // Name: the name of the project.
116114 Name string `json:"name"`
117- // OrganizationID: the organization ID of the project
115+ // OrganizationID: the organization ID of the project.
118116 OrganizationID string `json:"organization_id"`
119- // Description: the description of the project
117+ // Description: the description of the project.
120118 Description * string `json:"description"`
121119}
122120
123- // CreateProject: create project
121+ // CreateProject: create project.
124122func (s * API ) CreateProject (req * CreateProjectRequest , opts ... scw.RequestOption ) (* Project , error ) {
125123 var err error
126124
@@ -150,23 +148,22 @@ func (s *API) CreateProject(req *CreateProjectRequest, opts ...scw.RequestOption
150148}
151149
152150type ListProjectsRequest struct {
153- // OrganizationID: the organization ID of the project
151+ // OrganizationID: the organization ID of the project.
154152 OrganizationID string `json:"-"`
155- // Name: the name of the project
153+ // Name: the name of the project.
156154 Name * string `json:"-"`
157- // Page: the page number for the returned projects
155+ // Page: the page number for the returned projects.
158156 Page * int32 `json:"-"`
159- // PageSize: the maximum number of project per page
157+ // PageSize: the maximum number of project per page.
160158 PageSize * uint32 `json:"-"`
161- // OrderBy: the sort order of the returned projects
162- //
159+ // OrderBy: the sort order of the returned projects.
163160 // Default value: created_at_asc
164161 OrderBy ListProjectsRequestOrderBy `json:"-"`
165- // ProjectIDs: filter out by a list of project ID
162+ // ProjectIDs: filter out by a list of project ID.
166163 ProjectIDs []string `json:"-"`
167164}
168165
169- // ListProjects: list projects
166+ // ListProjects: list projects.
170167func (s * API ) ListProjects (req * ListProjectsRequest , opts ... scw.RequestOption ) (* ListProjectsResponse , error ) {
171168 var err error
172169
@@ -205,11 +202,11 @@ func (s *API) ListProjects(req *ListProjectsRequest, opts ...scw.RequestOption)
205202}
206203
207204type GetProjectRequest struct {
208- // ProjectID: the project ID of the project
205+ // ProjectID: the project ID of the project.
209206 ProjectID string `json:"-"`
210207}
211208
212- // GetProject: get project
209+ // GetProject: get project.
213210func (s * API ) GetProject (req * GetProjectRequest , opts ... scw.RequestOption ) (* Project , error ) {
214211 var err error
215212
@@ -238,11 +235,11 @@ func (s *API) GetProject(req *GetProjectRequest, opts ...scw.RequestOption) (*Pr
238235}
239236
240237type DeleteProjectRequest struct {
241- // ProjectID: the project ID of the project
238+ // ProjectID: the project ID of the project.
242239 ProjectID string `json:"-"`
243240}
244241
245- // DeleteProject: delete project
242+ // DeleteProject: delete project.
246243func (s * API ) DeleteProject (req * DeleteProjectRequest , opts ... scw.RequestOption ) error {
247244 var err error
248245
@@ -269,15 +266,15 @@ func (s *API) DeleteProject(req *DeleteProjectRequest, opts ...scw.RequestOption
269266}
270267
271268type UpdateProjectRequest struct {
272- // ProjectID: the project ID of the project
269+ // ProjectID: the project ID of the project.
273270 ProjectID string `json:"-"`
274- // Name: the name of the project
271+ // Name: the name of the project.
275272 Name * string `json:"name"`
276- // Description: the description of the project
273+ // Description: the description of the project.
277274 Description * string `json:"description"`
278275}
279276
280- // UpdateProject: update project
277+ // UpdateProject: update project.
281278func (s * API ) UpdateProject (req * UpdateProjectRequest , opts ... scw.RequestOption ) (* Project , error ) {
282279 var err error
283280
0 commit comments