rusoto_codestar/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl CodeStarClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request = SignedRequest::new(http_method, "codestar", &self.region, request_uri);
31
32        request.set_content_type("application/x-amz-json-1.1".to_owned());
33
34        request
35    }
36
37    async fn sign_and_dispatch<E>(
38        &self,
39        request: SignedRequest,
40        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
41    ) -> Result<HttpResponse, RusotoError<E>> {
42        let mut response = self.client.sign_and_dispatch(request).await?;
43        if !response.status.is_success() {
44            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
45            return Err(from_response(response));
46        }
47
48        Ok(response)
49    }
50}
51
52use serde_json;
53#[derive(Clone, Debug, Default, PartialEq, Serialize)]
54#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
55pub struct AssociateTeamMemberRequest {
56    /// <p>A user- or system-generated token that identifies the entity that requested the team member association to the project. This token can be used to repeat the request.</p>
57    #[serde(rename = "clientRequestToken")]
58    #[serde(skip_serializing_if = "Option::is_none")]
59    pub client_request_token: Option<String>,
60    /// <p>The ID of the project to which you will add the IAM user.</p>
61    #[serde(rename = "projectId")]
62    pub project_id: String,
63    /// <p>The AWS CodeStar project role that will apply to this user. This role determines what actions a user can take in an AWS CodeStar project.</p>
64    #[serde(rename = "projectRole")]
65    pub project_role: String,
66    /// <p>Whether the team member is allowed to use an SSH public/private key pair to remotely access project resources, for example Amazon EC2 instances.</p>
67    #[serde(rename = "remoteAccessAllowed")]
68    #[serde(skip_serializing_if = "Option::is_none")]
69    pub remote_access_allowed: Option<bool>,
70    /// <p>The Amazon Resource Name (ARN) for the IAM user you want to add to the AWS CodeStar project.</p>
71    #[serde(rename = "userArn")]
72    pub user_arn: String,
73}
74
75#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
76#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
77pub struct AssociateTeamMemberResult {
78    /// <p>The user- or system-generated token from the initial request that can be used to repeat the request.</p>
79    #[serde(rename = "clientRequestToken")]
80    #[serde(skip_serializing_if = "Option::is_none")]
81    pub client_request_token: Option<String>,
82}
83
84/// <p>Location and destination information about the source code files provided with the project request. The source code is uploaded to the new project source repository after project creation.</p>
85#[derive(Clone, Debug, Default, PartialEq, Serialize)]
86#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
87pub struct Code {
88    /// <p>The repository to be created in AWS CodeStar. Valid values are AWS CodeCommit or GitHub. After AWS CodeStar provisions the new repository, the source code files provided with the project request are placed in the repository.</p>
89    #[serde(rename = "destination")]
90    pub destination: CodeDestination,
91    /// <p>The location where the source code files provided with the project request are stored. AWS CodeStar retrieves the files during project creation.</p>
92    #[serde(rename = "source")]
93    pub source: CodeSource,
94}
95
96/// <p>Information about the AWS CodeCommit repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
97#[derive(Clone, Debug, Default, PartialEq, Serialize)]
98#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
99pub struct CodeCommitCodeDestination {
100    /// <p>The name of the AWS CodeCommit repository to be created in AWS CodeStar.</p>
101    #[serde(rename = "name")]
102    pub name: String,
103}
104
105/// <p>The repository to be created in AWS CodeStar. Valid values are AWS CodeCommit or GitHub. After AWS CodeStar provisions the new repository, the source code files provided with the project request are placed in the repository.</p>
106#[derive(Clone, Debug, Default, PartialEq, Serialize)]
107#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
108pub struct CodeDestination {
109    /// <p>Information about the AWS CodeCommit repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
110    #[serde(rename = "codeCommit")]
111    #[serde(skip_serializing_if = "Option::is_none")]
112    pub code_commit: Option<CodeCommitCodeDestination>,
113    /// <p>Information about the GitHub repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
114    #[serde(rename = "gitHub")]
115    #[serde(skip_serializing_if = "Option::is_none")]
116    pub git_hub: Option<GitHubCodeDestination>,
117}
118
119/// <p>The location where the source code files provided with the project request are stored. AWS CodeStar retrieves the files during project creation.</p>
120#[derive(Clone, Debug, Default, PartialEq, Serialize)]
121#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
122pub struct CodeSource {
123    /// <p>Information about the Amazon S3 location where the source code files provided with the project request are stored. </p>
124    #[serde(rename = "s3")]
125    pub s_3: S3Location,
126}
127
128#[derive(Clone, Debug, Default, PartialEq, Serialize)]
129#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
130pub struct CreateProjectRequest {
131    /// <p>A user- or system-generated token that identifies the entity that requested project creation. This token can be used to repeat the request.</p>
132    #[serde(rename = "clientRequestToken")]
133    #[serde(skip_serializing_if = "Option::is_none")]
134    pub client_request_token: Option<String>,
135    /// <p>The description of the project, if any.</p>
136    #[serde(rename = "description")]
137    #[serde(skip_serializing_if = "Option::is_none")]
138    pub description: Option<String>,
139    /// <p>The ID of the project to be created in AWS CodeStar.</p>
140    #[serde(rename = "id")]
141    pub id: String,
142    /// <p>The display name for the project to be created in AWS CodeStar.</p>
143    #[serde(rename = "name")]
144    pub name: String,
145    /// <p>A list of the Code objects submitted with the project request. If this parameter is specified, the request must also include the toolchain parameter.</p>
146    #[serde(rename = "sourceCode")]
147    #[serde(skip_serializing_if = "Option::is_none")]
148    pub source_code: Option<Vec<Code>>,
149    /// <p>The tags created for the project.</p>
150    #[serde(rename = "tags")]
151    #[serde(skip_serializing_if = "Option::is_none")]
152    pub tags: Option<::std::collections::HashMap<String, String>>,
153    /// <p>The name of the toolchain template file submitted with the project request. If this parameter is specified, the request must also include the sourceCode parameter.</p>
154    #[serde(rename = "toolchain")]
155    #[serde(skip_serializing_if = "Option::is_none")]
156    pub toolchain: Option<Toolchain>,
157}
158
159#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
160#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
161pub struct CreateProjectResult {
162    /// <p>The Amazon Resource Name (ARN) of the created project.</p>
163    #[serde(rename = "arn")]
164    pub arn: String,
165    /// <p>A user- or system-generated token that identifies the entity that requested project creation.</p>
166    #[serde(rename = "clientRequestToken")]
167    #[serde(skip_serializing_if = "Option::is_none")]
168    pub client_request_token: Option<String>,
169    /// <p>The ID of the project.</p>
170    #[serde(rename = "id")]
171    pub id: String,
172    /// <p>Reserved for future use.</p>
173    #[serde(rename = "projectTemplateId")]
174    #[serde(skip_serializing_if = "Option::is_none")]
175    pub project_template_id: Option<String>,
176}
177
178#[derive(Clone, Debug, Default, PartialEq, Serialize)]
179#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
180pub struct CreateUserProfileRequest {
181    /// <p>The name that will be displayed as the friendly name for the user in AWS CodeStar. </p>
182    #[serde(rename = "displayName")]
183    pub display_name: String,
184    /// <p>The email address that will be displayed as part of the user's profile in AWS CodeStar.</p>
185    #[serde(rename = "emailAddress")]
186    pub email_address: String,
187    /// <p>The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.</p>
188    #[serde(rename = "sshPublicKey")]
189    #[serde(skip_serializing_if = "Option::is_none")]
190    pub ssh_public_key: Option<String>,
191    /// <p>The Amazon Resource Name (ARN) of the user in IAM.</p>
192    #[serde(rename = "userArn")]
193    pub user_arn: String,
194}
195
196#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
197#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
198pub struct CreateUserProfileResult {
199    /// <p>The date the user profile was created, in timestamp format.</p>
200    #[serde(rename = "createdTimestamp")]
201    #[serde(skip_serializing_if = "Option::is_none")]
202    pub created_timestamp: Option<f64>,
203    /// <p>The name that is displayed as the friendly name for the user in AWS CodeStar.</p>
204    #[serde(rename = "displayName")]
205    #[serde(skip_serializing_if = "Option::is_none")]
206    pub display_name: Option<String>,
207    /// <p>The email address that is displayed as part of the user's profile in AWS CodeStar.</p>
208    #[serde(rename = "emailAddress")]
209    #[serde(skip_serializing_if = "Option::is_none")]
210    pub email_address: Option<String>,
211    /// <p>The date the user profile was last modified, in timestamp format.</p>
212    #[serde(rename = "lastModifiedTimestamp")]
213    #[serde(skip_serializing_if = "Option::is_none")]
214    pub last_modified_timestamp: Option<f64>,
215    /// <p>The SSH public key associated with the user in AWS CodeStar. This is the public portion of the public/private keypair the user can use to access project resources if a project owner allows the user remote access to those resources.</p>
216    #[serde(rename = "sshPublicKey")]
217    #[serde(skip_serializing_if = "Option::is_none")]
218    pub ssh_public_key: Option<String>,
219    /// <p>The Amazon Resource Name (ARN) of the user in IAM.</p>
220    #[serde(rename = "userArn")]
221    pub user_arn: String,
222}
223
224#[derive(Clone, Debug, Default, PartialEq, Serialize)]
225#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
226pub struct DeleteProjectRequest {
227    /// <p>A user- or system-generated token that identifies the entity that requested project deletion. This token can be used to repeat the request. </p>
228    #[serde(rename = "clientRequestToken")]
229    #[serde(skip_serializing_if = "Option::is_none")]
230    pub client_request_token: Option<String>,
231    /// <p>Whether to send a delete request for the primary stack in AWS CloudFormation originally used to generate the project and its resources. This option will delete all AWS resources for the project (except for any buckets in Amazon S3) as well as deleting the project itself. Recommended for most use cases.</p>
232    #[serde(rename = "deleteStack")]
233    #[serde(skip_serializing_if = "Option::is_none")]
234    pub delete_stack: Option<bool>,
235    /// <p>The ID of the project to be deleted in AWS CodeStar.</p>
236    #[serde(rename = "id")]
237    pub id: String,
238}
239
240#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
241#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
242pub struct DeleteProjectResult {
243    /// <p>The Amazon Resource Name (ARN) of the deleted project.</p>
244    #[serde(rename = "projectArn")]
245    #[serde(skip_serializing_if = "Option::is_none")]
246    pub project_arn: Option<String>,
247    /// <p>The ID of the primary stack in AWS CloudFormation that will be deleted as part of deleting the project and its resources.</p>
248    #[serde(rename = "stackId")]
249    #[serde(skip_serializing_if = "Option::is_none")]
250    pub stack_id: Option<String>,
251}
252
253#[derive(Clone, Debug, Default, PartialEq, Serialize)]
254#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
255pub struct DeleteUserProfileRequest {
256    /// <p>The Amazon Resource Name (ARN) of the user to delete from AWS CodeStar.</p>
257    #[serde(rename = "userArn")]
258    pub user_arn: String,
259}
260
261#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
262#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
263pub struct DeleteUserProfileResult {
264    /// <p>The Amazon Resource Name (ARN) of the user deleted from AWS CodeStar.</p>
265    #[serde(rename = "userArn")]
266    pub user_arn: String,
267}
268
269#[derive(Clone, Debug, Default, PartialEq, Serialize)]
270#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
271pub struct DescribeProjectRequest {
272    /// <p>The ID of the project.</p>
273    #[serde(rename = "id")]
274    pub id: String,
275}
276
277#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
278#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
279pub struct DescribeProjectResult {
280    /// <p>The Amazon Resource Name (ARN) for the project.</p>
281    #[serde(rename = "arn")]
282    #[serde(skip_serializing_if = "Option::is_none")]
283    pub arn: Option<String>,
284    /// <p>A user- or system-generated token that identifies the entity that requested project creation. </p>
285    #[serde(rename = "clientRequestToken")]
286    #[serde(skip_serializing_if = "Option::is_none")]
287    pub client_request_token: Option<String>,
288    /// <p>The date and time the project was created, in timestamp format.</p>
289    #[serde(rename = "createdTimeStamp")]
290    #[serde(skip_serializing_if = "Option::is_none")]
291    pub created_time_stamp: Option<f64>,
292    /// <p>The description of the project, if any.</p>
293    #[serde(rename = "description")]
294    #[serde(skip_serializing_if = "Option::is_none")]
295    pub description: Option<String>,
296    /// <p>The ID of the project.</p>
297    #[serde(rename = "id")]
298    #[serde(skip_serializing_if = "Option::is_none")]
299    pub id: Option<String>,
300    /// <p>The display name for the project.</p>
301    #[serde(rename = "name")]
302    #[serde(skip_serializing_if = "Option::is_none")]
303    pub name: Option<String>,
304    /// <p>The ID for the AWS CodeStar project template used to create the project.</p>
305    #[serde(rename = "projectTemplateId")]
306    #[serde(skip_serializing_if = "Option::is_none")]
307    pub project_template_id: Option<String>,
308    /// <p>The ID of the primary stack in AWS CloudFormation used to generate resources for the project.</p>
309    #[serde(rename = "stackId")]
310    #[serde(skip_serializing_if = "Option::is_none")]
311    pub stack_id: Option<String>,
312    /// <p>The project creation or deletion status.</p>
313    #[serde(rename = "status")]
314    #[serde(skip_serializing_if = "Option::is_none")]
315    pub status: Option<ProjectStatus>,
316}
317
318#[derive(Clone, Debug, Default, PartialEq, Serialize)]
319#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
320pub struct DescribeUserProfileRequest {
321    /// <p>The Amazon Resource Name (ARN) of the user.</p>
322    #[serde(rename = "userArn")]
323    pub user_arn: String,
324}
325
326#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
327#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
328pub struct DescribeUserProfileResult {
329    /// <p>The date and time when the user profile was created in AWS CodeStar, in timestamp format.</p>
330    #[serde(rename = "createdTimestamp")]
331    pub created_timestamp: f64,
332    /// <p>The display name shown for the user in AWS CodeStar projects. For example, this could be set to both first and last name ("Mary Major") or a single name ("Mary"). The display name is also used to generate the initial icon associated with the user in AWS CodeStar projects. If spaces are included in the display name, the first character that appears after the space will be used as the second character in the user initial icon. The initial icon displays a maximum of two characters, so a display name with more than one space (for example "Mary Jane Major") would generate an initial icon using the first character and the first character after the space ("MJ", not "MM").</p>
333    #[serde(rename = "displayName")]
334    #[serde(skip_serializing_if = "Option::is_none")]
335    pub display_name: Option<String>,
336    /// <p>The email address for the user. Optional.</p>
337    #[serde(rename = "emailAddress")]
338    #[serde(skip_serializing_if = "Option::is_none")]
339    pub email_address: Option<String>,
340    /// <p>The date and time when the user profile was last modified, in timestamp format.</p>
341    #[serde(rename = "lastModifiedTimestamp")]
342    pub last_modified_timestamp: f64,
343    /// <p>The SSH public key associated with the user. This SSH public key is associated with the user profile, and can be used in conjunction with the associated private key for access to project resources, such as Amazon EC2 instances, if a project owner grants remote access to those resources.</p>
344    #[serde(rename = "sshPublicKey")]
345    #[serde(skip_serializing_if = "Option::is_none")]
346    pub ssh_public_key: Option<String>,
347    /// <p>The Amazon Resource Name (ARN) of the user.</p>
348    #[serde(rename = "userArn")]
349    pub user_arn: String,
350}
351
352#[derive(Clone, Debug, Default, PartialEq, Serialize)]
353#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
354pub struct DisassociateTeamMemberRequest {
355    /// <p>The ID of the AWS CodeStar project from which you want to remove a team member.</p>
356    #[serde(rename = "projectId")]
357    pub project_id: String,
358    /// <p>The Amazon Resource Name (ARN) of the IAM user or group whom you want to remove from the project.</p>
359    #[serde(rename = "userArn")]
360    pub user_arn: String,
361}
362
363#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
364#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
365pub struct DisassociateTeamMemberResult {}
366
367/// <p>Information about the GitHub repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
368#[derive(Clone, Debug, Default, PartialEq, Serialize)]
369#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
370pub struct GitHubCodeDestination {
371    /// <p>Description for the GitHub repository to be created in AWS CodeStar. This description displays in GitHub after the repository is created.</p>
372    #[serde(rename = "description")]
373    #[serde(skip_serializing_if = "Option::is_none")]
374    pub description: Option<String>,
375    /// <p>Whether to enable issues for the GitHub repository.</p>
376    #[serde(rename = "issuesEnabled")]
377    pub issues_enabled: bool,
378    /// <p>Name of the GitHub repository to be created in AWS CodeStar.</p>
379    #[serde(rename = "name")]
380    pub name: String,
381    /// <p>The GitHub username for the owner of the GitHub repository to be created in AWS CodeStar. If this repository should be owned by a GitHub organization, provide its name.</p>
382    #[serde(rename = "owner")]
383    pub owner: String,
384    /// <p>Whether the GitHub repository is to be a private repository.</p>
385    #[serde(rename = "privateRepository")]
386    pub private_repository: bool,
387    /// <p>The GitHub user's personal access token for the GitHub repository.</p>
388    #[serde(rename = "token")]
389    pub token: String,
390    /// <p>The type of GitHub repository to be created in AWS CodeStar. Valid values are User or Organization.</p>
391    #[serde(rename = "type")]
392    pub type_: String,
393}
394
395#[derive(Clone, Debug, Default, PartialEq, Serialize)]
396#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
397pub struct ListProjectsRequest {
398    /// <p>The maximum amount of data that can be contained in a single set of results.</p>
399    #[serde(rename = "maxResults")]
400    #[serde(skip_serializing_if = "Option::is_none")]
401    pub max_results: Option<i64>,
402    /// <p>The continuation token to be used to return the next set of results, if the results cannot be returned in one response.</p>
403    #[serde(rename = "nextToken")]
404    #[serde(skip_serializing_if = "Option::is_none")]
405    pub next_token: Option<String>,
406}
407
408#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
409#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
410pub struct ListProjectsResult {
411    /// <p>The continuation token to use when requesting the next set of results, if there are more results to be returned.</p>
412    #[serde(rename = "nextToken")]
413    #[serde(skip_serializing_if = "Option::is_none")]
414    pub next_token: Option<String>,
415    /// <p>A list of projects.</p>
416    #[serde(rename = "projects")]
417    pub projects: Vec<ProjectSummary>,
418}
419
420#[derive(Clone, Debug, Default, PartialEq, Serialize)]
421#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
422pub struct ListResourcesRequest {
423    /// <p>The maximum amount of data that can be contained in a single set of results.</p>
424    #[serde(rename = "maxResults")]
425    #[serde(skip_serializing_if = "Option::is_none")]
426    pub max_results: Option<i64>,
427    /// <p>The continuation token for the next set of results, if the results cannot be returned in one response.</p>
428    #[serde(rename = "nextToken")]
429    #[serde(skip_serializing_if = "Option::is_none")]
430    pub next_token: Option<String>,
431    /// <p>The ID of the project.</p>
432    #[serde(rename = "projectId")]
433    pub project_id: String,
434}
435
436#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
437#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
438pub struct ListResourcesResult {
439    /// <p>The continuation token to use when requesting the next set of results, if there are more results to be returned.</p>
440    #[serde(rename = "nextToken")]
441    #[serde(skip_serializing_if = "Option::is_none")]
442    pub next_token: Option<String>,
443    /// <p>An array of resources associated with the project. </p>
444    #[serde(rename = "resources")]
445    #[serde(skip_serializing_if = "Option::is_none")]
446    pub resources: Option<Vec<Resource>>,
447}
448
449#[derive(Clone, Debug, Default, PartialEq, Serialize)]
450#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
451pub struct ListTagsForProjectRequest {
452    /// <p>The ID of the project to get tags for.</p>
453    #[serde(rename = "id")]
454    pub id: String,
455    /// <p>Reserved for future use.</p>
456    #[serde(rename = "maxResults")]
457    #[serde(skip_serializing_if = "Option::is_none")]
458    pub max_results: Option<i64>,
459    /// <p>Reserved for future use.</p>
460    #[serde(rename = "nextToken")]
461    #[serde(skip_serializing_if = "Option::is_none")]
462    pub next_token: Option<String>,
463}
464
465#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
466#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
467pub struct ListTagsForProjectResult {
468    /// <p>Reserved for future use.</p>
469    #[serde(rename = "nextToken")]
470    #[serde(skip_serializing_if = "Option::is_none")]
471    pub next_token: Option<String>,
472    /// <p>The tags for the project.</p>
473    #[serde(rename = "tags")]
474    #[serde(skip_serializing_if = "Option::is_none")]
475    pub tags: Option<::std::collections::HashMap<String, String>>,
476}
477
478#[derive(Clone, Debug, Default, PartialEq, Serialize)]
479#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
480pub struct ListTeamMembersRequest {
481    /// <p>The maximum number of team members you want returned in a response.</p>
482    #[serde(rename = "maxResults")]
483    #[serde(skip_serializing_if = "Option::is_none")]
484    pub max_results: Option<i64>,
485    /// <p>The continuation token for the next set of results, if the results cannot be returned in one response.</p>
486    #[serde(rename = "nextToken")]
487    #[serde(skip_serializing_if = "Option::is_none")]
488    pub next_token: Option<String>,
489    /// <p>The ID of the project for which you want to list team members.</p>
490    #[serde(rename = "projectId")]
491    pub project_id: String,
492}
493
494#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
495#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
496pub struct ListTeamMembersResult {
497    /// <p>The continuation token to use when requesting the next set of results, if there are more results to be returned.</p>
498    #[serde(rename = "nextToken")]
499    #[serde(skip_serializing_if = "Option::is_none")]
500    pub next_token: Option<String>,
501    /// <p>A list of team member objects for the project.</p>
502    #[serde(rename = "teamMembers")]
503    pub team_members: Vec<TeamMember>,
504}
505
506#[derive(Clone, Debug, Default, PartialEq, Serialize)]
507#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
508pub struct ListUserProfilesRequest {
509    /// <p>The maximum number of results to return in a response.</p>
510    #[serde(rename = "maxResults")]
511    #[serde(skip_serializing_if = "Option::is_none")]
512    pub max_results: Option<i64>,
513    /// <p>The continuation token for the next set of results, if the results cannot be returned in one response.</p>
514    #[serde(rename = "nextToken")]
515    #[serde(skip_serializing_if = "Option::is_none")]
516    pub next_token: Option<String>,
517}
518
519#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
520#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
521pub struct ListUserProfilesResult {
522    /// <p>The continuation token to use when requesting the next set of results, if there are more results to be returned.</p>
523    #[serde(rename = "nextToken")]
524    #[serde(skip_serializing_if = "Option::is_none")]
525    pub next_token: Option<String>,
526    /// <p>All the user profiles configured in AWS CodeStar for an AWS account.</p>
527    #[serde(rename = "userProfiles")]
528    pub user_profiles: Vec<UserProfileSummary>,
529}
530
531/// <p>An indication of whether a project creation or deletion is failed or successful.</p>
532#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
533#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
534pub struct ProjectStatus {
535    /// <p>In the case of a project creation or deletion failure, a reason for the failure.</p>
536    #[serde(rename = "reason")]
537    #[serde(skip_serializing_if = "Option::is_none")]
538    pub reason: Option<String>,
539    /// <p>The phase of completion for a project creation or deletion.</p>
540    #[serde(rename = "state")]
541    pub state: String,
542}
543
544/// <p>Information about the metadata for a project.</p>
545#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
546#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
547pub struct ProjectSummary {
548    /// <p>The Amazon Resource Name (ARN) of the project.</p>
549    #[serde(rename = "projectArn")]
550    #[serde(skip_serializing_if = "Option::is_none")]
551    pub project_arn: Option<String>,
552    /// <p>The ID of the project.</p>
553    #[serde(rename = "projectId")]
554    #[serde(skip_serializing_if = "Option::is_none")]
555    pub project_id: Option<String>,
556}
557
558/// <p>Information about a resource for a project.</p>
559#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
560#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
561pub struct Resource {
562    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
563    #[serde(rename = "id")]
564    pub id: String,
565}
566
567/// <p>The Amazon S3 location where the source code files provided with the project request are stored.</p>
568#[derive(Clone, Debug, Default, PartialEq, Serialize)]
569#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
570pub struct S3Location {
571    /// <p>The Amazon S3 object key where the source code files provided with the project request are stored.</p>
572    #[serde(rename = "bucketKey")]
573    #[serde(skip_serializing_if = "Option::is_none")]
574    pub bucket_key: Option<String>,
575    /// <p>The Amazon S3 bucket name where the source code files provided with the project request are stored.</p>
576    #[serde(rename = "bucketName")]
577    #[serde(skip_serializing_if = "Option::is_none")]
578    pub bucket_name: Option<String>,
579}
580
581#[derive(Clone, Debug, Default, PartialEq, Serialize)]
582#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
583pub struct TagProjectRequest {
584    /// <p>The ID of the project you want to add a tag to.</p>
585    #[serde(rename = "id")]
586    pub id: String,
587    /// <p>The tags you want to add to the project.</p>
588    #[serde(rename = "tags")]
589    pub tags: ::std::collections::HashMap<String, String>,
590}
591
592#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
593#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
594pub struct TagProjectResult {
595    /// <p>The tags for the project.</p>
596    #[serde(rename = "tags")]
597    #[serde(skip_serializing_if = "Option::is_none")]
598    pub tags: Option<::std::collections::HashMap<String, String>>,
599}
600
601/// <p>Information about a team member in a project.</p>
602#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
603#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
604pub struct TeamMember {
605    /// <p>The role assigned to the user in the project. Project roles have different levels of access. For more information, see <a href="http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html">Working with Teams</a> in the <i>AWS CodeStar User Guide</i>. </p>
606    #[serde(rename = "projectRole")]
607    pub project_role: String,
608    /// <p>Whether the user is allowed to remotely access project resources using an SSH public/private key pair.</p>
609    #[serde(rename = "remoteAccessAllowed")]
610    #[serde(skip_serializing_if = "Option::is_none")]
611    pub remote_access_allowed: Option<bool>,
612    /// <p>The Amazon Resource Name (ARN) of the user in IAM.</p>
613    #[serde(rename = "userArn")]
614    pub user_arn: String,
615}
616
617/// <p>The toolchain template file provided with the project request. AWS CodeStar uses the template to provision the toolchain stack in AWS CloudFormation.</p>
618#[derive(Clone, Debug, Default, PartialEq, Serialize)]
619#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
620pub struct Toolchain {
621    /// <p>The service role ARN for AWS CodeStar to use for the toolchain template during stack provisioning.</p>
622    #[serde(rename = "roleArn")]
623    #[serde(skip_serializing_if = "Option::is_none")]
624    pub role_arn: Option<String>,
625    /// <p>The Amazon S3 location where the toolchain template file provided with the project request is stored. AWS CodeStar retrieves the file during project creation.</p>
626    #[serde(rename = "source")]
627    pub source: ToolchainSource,
628    /// <p>The list of parameter overrides to be passed into the toolchain template during stack provisioning, if any.</p>
629    #[serde(rename = "stackParameters")]
630    #[serde(skip_serializing_if = "Option::is_none")]
631    pub stack_parameters: Option<::std::collections::HashMap<String, String>>,
632}
633
634/// <p>The Amazon S3 location where the toolchain template file provided with the project request is stored. AWS CodeStar retrieves the file during project creation.</p>
635#[derive(Clone, Debug, Default, PartialEq, Serialize)]
636#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
637pub struct ToolchainSource {
638    /// <p>The Amazon S3 bucket where the toolchain template file provided with the project request is stored.</p>
639    #[serde(rename = "s3")]
640    pub s_3: S3Location,
641}
642
643#[derive(Clone, Debug, Default, PartialEq, Serialize)]
644#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
645pub struct UntagProjectRequest {
646    /// <p>The ID of the project to remove tags from.</p>
647    #[serde(rename = "id")]
648    pub id: String,
649    /// <p>The tags to remove from the project.</p>
650    #[serde(rename = "tags")]
651    pub tags: Vec<String>,
652}
653
654#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
655#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
656pub struct UntagProjectResult {}
657
658#[derive(Clone, Debug, Default, PartialEq, Serialize)]
659#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
660pub struct UpdateProjectRequest {
661    /// <p>The description of the project, if any.</p>
662    #[serde(rename = "description")]
663    #[serde(skip_serializing_if = "Option::is_none")]
664    pub description: Option<String>,
665    /// <p>The ID of the project you want to update.</p>
666    #[serde(rename = "id")]
667    pub id: String,
668    /// <p>The name of the project you want to update.</p>
669    #[serde(rename = "name")]
670    #[serde(skip_serializing_if = "Option::is_none")]
671    pub name: Option<String>,
672}
673
674#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
675#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
676pub struct UpdateProjectResult {}
677
678#[derive(Clone, Debug, Default, PartialEq, Serialize)]
679#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
680pub struct UpdateTeamMemberRequest {
681    /// <p>The ID of the project.</p>
682    #[serde(rename = "projectId")]
683    pub project_id: String,
684    /// <p>The role assigned to the user in the project. Project roles have different levels of access. For more information, see <a href="http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html">Working with Teams</a> in the <i>AWS CodeStar User Guide</i>.</p>
685    #[serde(rename = "projectRole")]
686    #[serde(skip_serializing_if = "Option::is_none")]
687    pub project_role: Option<String>,
688    /// <p>Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile. Even if this is set to True, the user must associate a public key with their profile before the user can access resources.</p>
689    #[serde(rename = "remoteAccessAllowed")]
690    #[serde(skip_serializing_if = "Option::is_none")]
691    pub remote_access_allowed: Option<bool>,
692    /// <p>The Amazon Resource Name (ARN) of the user for whom you want to change team membership attributes.</p>
693    #[serde(rename = "userArn")]
694    pub user_arn: String,
695}
696
697#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
698#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
699pub struct UpdateTeamMemberResult {
700    /// <p>The project role granted to the user.</p>
701    #[serde(rename = "projectRole")]
702    #[serde(skip_serializing_if = "Option::is_none")]
703    pub project_role: Option<String>,
704    /// <p>Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile.</p>
705    #[serde(rename = "remoteAccessAllowed")]
706    #[serde(skip_serializing_if = "Option::is_none")]
707    pub remote_access_allowed: Option<bool>,
708    /// <p>The Amazon Resource Name (ARN) of the user whose team membership attributes were updated.</p>
709    #[serde(rename = "userArn")]
710    #[serde(skip_serializing_if = "Option::is_none")]
711    pub user_arn: Option<String>,
712}
713
714#[derive(Clone, Debug, Default, PartialEq, Serialize)]
715#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
716pub struct UpdateUserProfileRequest {
717    /// <p>The name that is displayed as the friendly name for the user in AWS CodeStar.</p>
718    #[serde(rename = "displayName")]
719    #[serde(skip_serializing_if = "Option::is_none")]
720    pub display_name: Option<String>,
721    /// <p>The email address that is displayed as part of the user's profile in AWS CodeStar.</p>
722    #[serde(rename = "emailAddress")]
723    #[serde(skip_serializing_if = "Option::is_none")]
724    pub email_address: Option<String>,
725    /// <p>The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.</p>
726    #[serde(rename = "sshPublicKey")]
727    #[serde(skip_serializing_if = "Option::is_none")]
728    pub ssh_public_key: Option<String>,
729    /// <p>The name that will be displayed as the friendly name for the user in AWS CodeStar.</p>
730    #[serde(rename = "userArn")]
731    pub user_arn: String,
732}
733
734#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
735#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
736pub struct UpdateUserProfileResult {
737    /// <p>The date the user profile was created, in timestamp format.</p>
738    #[serde(rename = "createdTimestamp")]
739    #[serde(skip_serializing_if = "Option::is_none")]
740    pub created_timestamp: Option<f64>,
741    /// <p>The name that is displayed as the friendly name for the user in AWS CodeStar.</p>
742    #[serde(rename = "displayName")]
743    #[serde(skip_serializing_if = "Option::is_none")]
744    pub display_name: Option<String>,
745    /// <p>The email address that is displayed as part of the user's profile in AWS CodeStar.</p>
746    #[serde(rename = "emailAddress")]
747    #[serde(skip_serializing_if = "Option::is_none")]
748    pub email_address: Option<String>,
749    /// <p>The date the user profile was last modified, in timestamp format.</p>
750    #[serde(rename = "lastModifiedTimestamp")]
751    #[serde(skip_serializing_if = "Option::is_none")]
752    pub last_modified_timestamp: Option<f64>,
753    /// <p>The SSH public key associated with the user in AWS CodeStar. This is the public portion of the public/private keypair the user can use to access project resources if a project owner allows the user remote access to those resources.</p>
754    #[serde(rename = "sshPublicKey")]
755    #[serde(skip_serializing_if = "Option::is_none")]
756    pub ssh_public_key: Option<String>,
757    /// <p>The Amazon Resource Name (ARN) of the user in IAM.</p>
758    #[serde(rename = "userArn")]
759    pub user_arn: String,
760}
761
762/// <p>Information about a user's profile in AWS CodeStar.</p>
763#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
764#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
765pub struct UserProfileSummary {
766    /// <p>The display name of a user in AWS CodeStar. For example, this could be set to both first and last name ("Mary Major") or a single name ("Mary"). The display name is also used to generate the initial icon associated with the user in AWS CodeStar projects. If spaces are included in the display name, the first character that appears after the space will be used as the second character in the user initial icon. The initial icon displays a maximum of two characters, so a display name with more than one space (for example "Mary Jane Major") would generate an initial icon using the first character and the first character after the space ("MJ", not "MM").</p>
767    #[serde(rename = "displayName")]
768    #[serde(skip_serializing_if = "Option::is_none")]
769    pub display_name: Option<String>,
770    /// <p>The email address associated with the user.</p>
771    #[serde(rename = "emailAddress")]
772    #[serde(skip_serializing_if = "Option::is_none")]
773    pub email_address: Option<String>,
774    /// <p>The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.</p>
775    #[serde(rename = "sshPublicKey")]
776    #[serde(skip_serializing_if = "Option::is_none")]
777    pub ssh_public_key: Option<String>,
778    /// <p>The Amazon Resource Name (ARN) of the user in IAM.</p>
779    #[serde(rename = "userArn")]
780    #[serde(skip_serializing_if = "Option::is_none")]
781    pub user_arn: Option<String>,
782}
783
784/// Errors returned by AssociateTeamMember
785#[derive(Debug, PartialEq)]
786pub enum AssociateTeamMemberError {
787    /// <p>Another modification is being made. That modification must complete before you can make your change.</p>
788    ConcurrentModification(String),
789    /// <p>The service role is not valid.</p>
790    InvalidServiceRole(String),
791    /// <p>A resource limit has been exceeded.</p>
792    LimitExceeded(String),
793    /// <p>Project configuration information is required but not specified.</p>
794    ProjectConfiguration(String),
795    /// <p>The specified AWS CodeStar project was not found.</p>
796    ProjectNotFound(String),
797    /// <p>The team member is already associated with a role in this project.</p>
798    TeamMemberAlreadyAssociated(String),
799}
800
801impl AssociateTeamMemberError {
802    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateTeamMemberError> {
803        if let Some(err) = proto::json::Error::parse(&res) {
804            match err.typ.as_str() {
805                "ConcurrentModificationException" => {
806                    return RusotoError::Service(AssociateTeamMemberError::ConcurrentModification(
807                        err.msg,
808                    ))
809                }
810                "InvalidServiceRoleException" => {
811                    return RusotoError::Service(AssociateTeamMemberError::InvalidServiceRole(
812                        err.msg,
813                    ))
814                }
815                "LimitExceededException" => {
816                    return RusotoError::Service(AssociateTeamMemberError::LimitExceeded(err.msg))
817                }
818                "ProjectConfigurationException" => {
819                    return RusotoError::Service(AssociateTeamMemberError::ProjectConfiguration(
820                        err.msg,
821                    ))
822                }
823                "ProjectNotFoundException" => {
824                    return RusotoError::Service(AssociateTeamMemberError::ProjectNotFound(err.msg))
825                }
826                "TeamMemberAlreadyAssociatedException" => {
827                    return RusotoError::Service(
828                        AssociateTeamMemberError::TeamMemberAlreadyAssociated(err.msg),
829                    )
830                }
831                "ValidationException" => return RusotoError::Validation(err.msg),
832                _ => {}
833            }
834        }
835        RusotoError::Unknown(res)
836    }
837}
838impl fmt::Display for AssociateTeamMemberError {
839    #[allow(unused_variables)]
840    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
841        match *self {
842            AssociateTeamMemberError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
843            AssociateTeamMemberError::InvalidServiceRole(ref cause) => write!(f, "{}", cause),
844            AssociateTeamMemberError::LimitExceeded(ref cause) => write!(f, "{}", cause),
845            AssociateTeamMemberError::ProjectConfiguration(ref cause) => write!(f, "{}", cause),
846            AssociateTeamMemberError::ProjectNotFound(ref cause) => write!(f, "{}", cause),
847            AssociateTeamMemberError::TeamMemberAlreadyAssociated(ref cause) => {
848                write!(f, "{}", cause)
849            }
850        }
851    }
852}
853impl Error for AssociateTeamMemberError {}
854/// Errors returned by CreateProject
855#[derive(Debug, PartialEq)]
856pub enum CreateProjectError {
857    /// <p>Another modification is being made. That modification must complete before you can make your change.</p>
858    ConcurrentModification(String),
859    /// <p>The service role is not valid.</p>
860    InvalidServiceRole(String),
861    /// <p>A resource limit has been exceeded.</p>
862    LimitExceeded(String),
863    /// <p>An AWS CodeStar project with the same ID already exists in this region for the AWS account. AWS CodeStar project IDs must be unique within a region for the AWS account.</p>
864    ProjectAlreadyExists(String),
865    /// <p>Project configuration information is required but not specified.</p>
866    ProjectConfiguration(String),
867    /// <p>The project creation request was valid, but a nonspecific exception or error occurred during project creation. The project could not be created in AWS CodeStar.</p>
868    ProjectCreationFailed(String),
869}
870
871impl CreateProjectError {
872    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateProjectError> {
873        if let Some(err) = proto::json::Error::parse(&res) {
874            match err.typ.as_str() {
875                "ConcurrentModificationException" => {
876                    return RusotoError::Service(CreateProjectError::ConcurrentModification(
877                        err.msg,
878                    ))
879                }
880                "InvalidServiceRoleException" => {
881                    return RusotoError::Service(CreateProjectError::InvalidServiceRole(err.msg))
882                }
883                "LimitExceededException" => {
884                    return RusotoError::Service(CreateProjectError::LimitExceeded(err.msg))
885                }
886                "ProjectAlreadyExistsException" => {
887                    return RusotoError::Service(CreateProjectError::ProjectAlreadyExists(err.msg))
888                }
889                "ProjectConfigurationException" => {
890                    return RusotoError::Service(CreateProjectError::ProjectConfiguration(err.msg))
891                }
892                "ProjectCreationFailedException" => {
893                    return RusotoError::Service(CreateProjectError::ProjectCreationFailed(err.msg))
894                }
895                "ValidationException" => return RusotoError::Validation(err.msg),
896                _ => {}
897            }
898        }
899        RusotoError::Unknown(res)
900    }
901}
902impl fmt::Display for CreateProjectError {
903    #[allow(unused_variables)]
904    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
905        match *self {
906            CreateProjectError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
907            CreateProjectError::InvalidServiceRole(ref cause) => write!(f, "{}", cause),
908            CreateProjectError::LimitExceeded(ref cause) => write!(f, "{}", cause),
909            CreateProjectError::ProjectAlreadyExists(ref cause) => write!(f, "{}", cause),
910            CreateProjectError::ProjectConfiguration(ref cause) => write!(f, "{}", cause),
911            CreateProjectError::ProjectCreationFailed(ref cause) => write!(f, "{}", cause),
912        }
913    }
914}
915impl Error for CreateProjectError {}
916/// Errors returned by CreateUserProfile
917#[derive(Debug, PartialEq)]
918pub enum CreateUserProfileError {
919    /// <p>A user profile with that name already exists in this region for the AWS account. AWS CodeStar user profile names must be unique within a region for the AWS account. </p>
920    UserProfileAlreadyExists(String),
921}
922
923impl CreateUserProfileError {
924    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserProfileError> {
925        if let Some(err) = proto::json::Error::parse(&res) {
926            match err.typ.as_str() {
927                "UserProfileAlreadyExistsException" => {
928                    return RusotoError::Service(CreateUserProfileError::UserProfileAlreadyExists(
929                        err.msg,
930                    ))
931                }
932                "ValidationException" => return RusotoError::Validation(err.msg),
933                _ => {}
934            }
935        }
936        RusotoError::Unknown(res)
937    }
938}
939impl fmt::Display for CreateUserProfileError {
940    #[allow(unused_variables)]
941    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
942        match *self {
943            CreateUserProfileError::UserProfileAlreadyExists(ref cause) => write!(f, "{}", cause),
944        }
945    }
946}
947impl Error for CreateUserProfileError {}
948/// Errors returned by DeleteProject
949#[derive(Debug, PartialEq)]
950pub enum DeleteProjectError {
951    /// <p>Another modification is being made. That modification must complete before you can make your change.</p>
952    ConcurrentModification(String),
953    /// <p>The service role is not valid.</p>
954    InvalidServiceRole(String),
955}
956
957impl DeleteProjectError {
958    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteProjectError> {
959        if let Some(err) = proto::json::Error::parse(&res) {
960            match err.typ.as_str() {
961                "ConcurrentModificationException" => {
962                    return RusotoError::Service(DeleteProjectError::ConcurrentModification(
963                        err.msg,
964                    ))
965                }
966                "InvalidServiceRoleException" => {
967                    return RusotoError::Service(DeleteProjectError::InvalidServiceRole(err.msg))
968                }
969                "ValidationException" => return RusotoError::Validation(err.msg),
970                _ => {}
971            }
972        }
973        RusotoError::Unknown(res)
974    }
975}
976impl fmt::Display for DeleteProjectError {
977    #[allow(unused_variables)]
978    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
979        match *self {
980            DeleteProjectError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
981            DeleteProjectError::InvalidServiceRole(ref cause) => write!(f, "{}", cause),
982        }
983    }
984}
985impl Error for DeleteProjectError {}
986/// Errors returned by DeleteUserProfile
987#[derive(Debug, PartialEq)]
988pub enum DeleteUserProfileError {}
989
990impl DeleteUserProfileError {
991    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserProfileError> {
992        if let Some(err) = proto::json::Error::parse(&res) {
993            match err.typ.as_str() {
994                "ValidationException" => return RusotoError::Validation(err.msg),
995                _ => {}
996            }
997        }
998        RusotoError::Unknown(res)
999    }
1000}
1001impl fmt::Display for DeleteUserProfileError {
1002    #[allow(unused_variables)]
1003    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1004        match *self {}
1005    }
1006}
1007impl Error for DeleteUserProfileError {}
1008/// Errors returned by DescribeProject
1009#[derive(Debug, PartialEq)]
1010pub enum DescribeProjectError {
1011    /// <p>Another modification is being made. That modification must complete before you can make your change.</p>
1012    ConcurrentModification(String),
1013    /// <p>The service role is not valid.</p>
1014    InvalidServiceRole(String),
1015    /// <p>Project configuration information is required but not specified.</p>
1016    ProjectConfiguration(String),
1017    /// <p>The specified AWS CodeStar project was not found.</p>
1018    ProjectNotFound(String),
1019}
1020
1021impl DescribeProjectError {
1022    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeProjectError> {
1023        if let Some(err) = proto::json::Error::parse(&res) {
1024            match err.typ.as_str() {
1025                "ConcurrentModificationException" => {
1026                    return RusotoError::Service(DescribeProjectError::ConcurrentModification(
1027                        err.msg,
1028                    ))
1029                }
1030                "InvalidServiceRoleException" => {
1031                    return RusotoError::Service(DescribeProjectError::InvalidServiceRole(err.msg))
1032                }
1033                "ProjectConfigurationException" => {
1034                    return RusotoError::Service(DescribeProjectError::ProjectConfiguration(
1035                        err.msg,
1036                    ))
1037                }
1038                "ProjectNotFoundException" => {
1039                    return RusotoError::Service(DescribeProjectError::ProjectNotFound(err.msg))
1040                }
1041                "ValidationException" => return RusotoError::Validation(err.msg),
1042                _ => {}
1043            }
1044        }
1045        RusotoError::Unknown(res)
1046    }
1047}
1048impl fmt::Display for DescribeProjectError {
1049    #[allow(unused_variables)]
1050    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1051        match *self {
1052            DescribeProjectError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
1053            DescribeProjectError::InvalidServiceRole(ref cause) => write!(f, "{}", cause),
1054            DescribeProjectError::ProjectConfiguration(ref cause) => write!(f, "{}", cause),
1055            DescribeProjectError::ProjectNotFound(ref cause) => write!(f, "{}", cause),
1056        }
1057    }
1058}
1059impl Error for DescribeProjectError {}
1060/// Errors returned by DescribeUserProfile
1061#[derive(Debug, PartialEq)]
1062pub enum DescribeUserProfileError {
1063    /// <p>The user profile was not found.</p>
1064    UserProfileNotFound(String),
1065}
1066
1067impl DescribeUserProfileError {
1068    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeUserProfileError> {
1069        if let Some(err) = proto::json::Error::parse(&res) {
1070            match err.typ.as_str() {
1071                "UserProfileNotFoundException" => {
1072                    return RusotoError::Service(DescribeUserProfileError::UserProfileNotFound(
1073                        err.msg,
1074                    ))
1075                }
1076                "ValidationException" => return RusotoError::Validation(err.msg),
1077                _ => {}
1078            }
1079        }
1080        RusotoError::Unknown(res)
1081    }
1082}
1083impl fmt::Display for DescribeUserProfileError {
1084    #[allow(unused_variables)]
1085    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1086        match *self {
1087            DescribeUserProfileError::UserProfileNotFound(ref cause) => write!(f, "{}", cause),
1088        }
1089    }
1090}
1091impl Error for DescribeUserProfileError {}
1092/// Errors returned by DisassociateTeamMember
1093#[derive(Debug, PartialEq)]
1094pub enum DisassociateTeamMemberError {
1095    /// <p>Another modification is being made. That modification must complete before you can make your change.</p>
1096    ConcurrentModification(String),
1097    /// <p>The service role is not valid.</p>
1098    InvalidServiceRole(String),
1099    /// <p>The specified AWS CodeStar project was not found.</p>
1100    ProjectNotFound(String),
1101}
1102
1103impl DisassociateTeamMemberError {
1104    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisassociateTeamMemberError> {
1105        if let Some(err) = proto::json::Error::parse(&res) {
1106            match err.typ.as_str() {
1107                "ConcurrentModificationException" => {
1108                    return RusotoError::Service(
1109                        DisassociateTeamMemberError::ConcurrentModification(err.msg),
1110                    )
1111                }
1112                "InvalidServiceRoleException" => {
1113                    return RusotoError::Service(DisassociateTeamMemberError::InvalidServiceRole(
1114                        err.msg,
1115                    ))
1116                }
1117                "ProjectNotFoundException" => {
1118                    return RusotoError::Service(DisassociateTeamMemberError::ProjectNotFound(
1119                        err.msg,
1120                    ))
1121                }
1122                "ValidationException" => return RusotoError::Validation(err.msg),
1123                _ => {}
1124            }
1125        }
1126        RusotoError::Unknown(res)
1127    }
1128}
1129impl fmt::Display for DisassociateTeamMemberError {
1130    #[allow(unused_variables)]
1131    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1132        match *self {
1133            DisassociateTeamMemberError::ConcurrentModification(ref cause) => {
1134                write!(f, "{}", cause)
1135            }
1136            DisassociateTeamMemberError::InvalidServiceRole(ref cause) => write!(f, "{}", cause),
1137            DisassociateTeamMemberError::ProjectNotFound(ref cause) => write!(f, "{}", cause),
1138        }
1139    }
1140}
1141impl Error for DisassociateTeamMemberError {}
1142/// Errors returned by ListProjects
1143#[derive(Debug, PartialEq)]
1144pub enum ListProjectsError {
1145    /// <p>The next token is not valid.</p>
1146    InvalidNextToken(String),
1147}
1148
1149impl ListProjectsError {
1150    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListProjectsError> {
1151        if let Some(err) = proto::json::Error::parse(&res) {
1152            match err.typ.as_str() {
1153                "InvalidNextTokenException" => {
1154                    return RusotoError::Service(ListProjectsError::InvalidNextToken(err.msg))
1155                }
1156                "ValidationException" => return RusotoError::Validation(err.msg),
1157                _ => {}
1158            }
1159        }
1160        RusotoError::Unknown(res)
1161    }
1162}
1163impl fmt::Display for ListProjectsError {
1164    #[allow(unused_variables)]
1165    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1166        match *self {
1167            ListProjectsError::InvalidNextToken(ref cause) => write!(f, "{}", cause),
1168        }
1169    }
1170}
1171impl Error for ListProjectsError {}
1172/// Errors returned by ListResources
1173#[derive(Debug, PartialEq)]
1174pub enum ListResourcesError {
1175    /// <p>The next token is not valid.</p>
1176    InvalidNextToken(String),
1177    /// <p>The specified AWS CodeStar project was not found.</p>
1178    ProjectNotFound(String),
1179}
1180
1181impl ListResourcesError {
1182    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListResourcesError> {
1183        if let Some(err) = proto::json::Error::parse(&res) {
1184            match err.typ.as_str() {
1185                "InvalidNextTokenException" => {
1186                    return RusotoError::Service(ListResourcesError::InvalidNextToken(err.msg))
1187                }
1188                "ProjectNotFoundException" => {
1189                    return RusotoError::Service(ListResourcesError::ProjectNotFound(err.msg))
1190                }
1191                "ValidationException" => return RusotoError::Validation(err.msg),
1192                _ => {}
1193            }
1194        }
1195        RusotoError::Unknown(res)
1196    }
1197}
1198impl fmt::Display for ListResourcesError {
1199    #[allow(unused_variables)]
1200    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1201        match *self {
1202            ListResourcesError::InvalidNextToken(ref cause) => write!(f, "{}", cause),
1203            ListResourcesError::ProjectNotFound(ref cause) => write!(f, "{}", cause),
1204        }
1205    }
1206}
1207impl Error for ListResourcesError {}
1208/// Errors returned by ListTagsForProject
1209#[derive(Debug, PartialEq)]
1210pub enum ListTagsForProjectError {
1211    /// <p>The next token is not valid.</p>
1212    InvalidNextToken(String),
1213    /// <p>The specified AWS CodeStar project was not found.</p>
1214    ProjectNotFound(String),
1215}
1216
1217impl ListTagsForProjectError {
1218    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForProjectError> {
1219        if let Some(err) = proto::json::Error::parse(&res) {
1220            match err.typ.as_str() {
1221                "InvalidNextTokenException" => {
1222                    return RusotoError::Service(ListTagsForProjectError::InvalidNextToken(err.msg))
1223                }
1224                "ProjectNotFoundException" => {
1225                    return RusotoError::Service(ListTagsForProjectError::ProjectNotFound(err.msg))
1226                }
1227                "ValidationException" => return RusotoError::Validation(err.msg),
1228                _ => {}
1229            }
1230        }
1231        RusotoError::Unknown(res)
1232    }
1233}
1234impl fmt::Display for ListTagsForProjectError {
1235    #[allow(unused_variables)]
1236    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1237        match *self {
1238            ListTagsForProjectError::InvalidNextToken(ref cause) => write!(f, "{}", cause),
1239            ListTagsForProjectError::ProjectNotFound(ref cause) => write!(f, "{}", cause),
1240        }
1241    }
1242}
1243impl Error for ListTagsForProjectError {}
1244/// Errors returned by ListTeamMembers
1245#[derive(Debug, PartialEq)]
1246pub enum ListTeamMembersError {
1247    /// <p>The next token is not valid.</p>
1248    InvalidNextToken(String),
1249    /// <p>The specified AWS CodeStar project was not found.</p>
1250    ProjectNotFound(String),
1251}
1252
1253impl ListTeamMembersError {
1254    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTeamMembersError> {
1255        if let Some(err) = proto::json::Error::parse(&res) {
1256            match err.typ.as_str() {
1257                "InvalidNextTokenException" => {
1258                    return RusotoError::Service(ListTeamMembersError::InvalidNextToken(err.msg))
1259                }
1260                "ProjectNotFoundException" => {
1261                    return RusotoError::Service(ListTeamMembersError::ProjectNotFound(err.msg))
1262                }
1263                "ValidationException" => return RusotoError::Validation(err.msg),
1264                _ => {}
1265            }
1266        }
1267        RusotoError::Unknown(res)
1268    }
1269}
1270impl fmt::Display for ListTeamMembersError {
1271    #[allow(unused_variables)]
1272    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1273        match *self {
1274            ListTeamMembersError::InvalidNextToken(ref cause) => write!(f, "{}", cause),
1275            ListTeamMembersError::ProjectNotFound(ref cause) => write!(f, "{}", cause),
1276        }
1277    }
1278}
1279impl Error for ListTeamMembersError {}
1280/// Errors returned by ListUserProfiles
1281#[derive(Debug, PartialEq)]
1282pub enum ListUserProfilesError {
1283    /// <p>The next token is not valid.</p>
1284    InvalidNextToken(String),
1285}
1286
1287impl ListUserProfilesError {
1288    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUserProfilesError> {
1289        if let Some(err) = proto::json::Error::parse(&res) {
1290            match err.typ.as_str() {
1291                "InvalidNextTokenException" => {
1292                    return RusotoError::Service(ListUserProfilesError::InvalidNextToken(err.msg))
1293                }
1294                "ValidationException" => return RusotoError::Validation(err.msg),
1295                _ => {}
1296            }
1297        }
1298        RusotoError::Unknown(res)
1299    }
1300}
1301impl fmt::Display for ListUserProfilesError {
1302    #[allow(unused_variables)]
1303    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1304        match *self {
1305            ListUserProfilesError::InvalidNextToken(ref cause) => write!(f, "{}", cause),
1306        }
1307    }
1308}
1309impl Error for ListUserProfilesError {}
1310/// Errors returned by TagProject
1311#[derive(Debug, PartialEq)]
1312pub enum TagProjectError {
1313    /// <p>Another modification is being made. That modification must complete before you can make your change.</p>
1314    ConcurrentModification(String),
1315    /// <p>A resource limit has been exceeded.</p>
1316    LimitExceeded(String),
1317    /// <p>The specified AWS CodeStar project was not found.</p>
1318    ProjectNotFound(String),
1319}
1320
1321impl TagProjectError {
1322    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagProjectError> {
1323        if let Some(err) = proto::json::Error::parse(&res) {
1324            match err.typ.as_str() {
1325                "ConcurrentModificationException" => {
1326                    return RusotoError::Service(TagProjectError::ConcurrentModification(err.msg))
1327                }
1328                "LimitExceededException" => {
1329                    return RusotoError::Service(TagProjectError::LimitExceeded(err.msg))
1330                }
1331                "ProjectNotFoundException" => {
1332                    return RusotoError::Service(TagProjectError::ProjectNotFound(err.msg))
1333                }
1334                "ValidationException" => return RusotoError::Validation(err.msg),
1335                _ => {}
1336            }
1337        }
1338        RusotoError::Unknown(res)
1339    }
1340}
1341impl fmt::Display for TagProjectError {
1342    #[allow(unused_variables)]
1343    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1344        match *self {
1345            TagProjectError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
1346            TagProjectError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1347            TagProjectError::ProjectNotFound(ref cause) => write!(f, "{}", cause),
1348        }
1349    }
1350}
1351impl Error for TagProjectError {}
1352/// Errors returned by UntagProject
1353#[derive(Debug, PartialEq)]
1354pub enum UntagProjectError {
1355    /// <p>Another modification is being made. That modification must complete before you can make your change.</p>
1356    ConcurrentModification(String),
1357    /// <p>A resource limit has been exceeded.</p>
1358    LimitExceeded(String),
1359    /// <p>The specified AWS CodeStar project was not found.</p>
1360    ProjectNotFound(String),
1361}
1362
1363impl UntagProjectError {
1364    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagProjectError> {
1365        if let Some(err) = proto::json::Error::parse(&res) {
1366            match err.typ.as_str() {
1367                "ConcurrentModificationException" => {
1368                    return RusotoError::Service(UntagProjectError::ConcurrentModification(err.msg))
1369                }
1370                "LimitExceededException" => {
1371                    return RusotoError::Service(UntagProjectError::LimitExceeded(err.msg))
1372                }
1373                "ProjectNotFoundException" => {
1374                    return RusotoError::Service(UntagProjectError::ProjectNotFound(err.msg))
1375                }
1376                "ValidationException" => return RusotoError::Validation(err.msg),
1377                _ => {}
1378            }
1379        }
1380        RusotoError::Unknown(res)
1381    }
1382}
1383impl fmt::Display for UntagProjectError {
1384    #[allow(unused_variables)]
1385    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1386        match *self {
1387            UntagProjectError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
1388            UntagProjectError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1389            UntagProjectError::ProjectNotFound(ref cause) => write!(f, "{}", cause),
1390        }
1391    }
1392}
1393impl Error for UntagProjectError {}
1394/// Errors returned by UpdateProject
1395#[derive(Debug, PartialEq)]
1396pub enum UpdateProjectError {
1397    /// <p>The specified AWS CodeStar project was not found.</p>
1398    ProjectNotFound(String),
1399}
1400
1401impl UpdateProjectError {
1402    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateProjectError> {
1403        if let Some(err) = proto::json::Error::parse(&res) {
1404            match err.typ.as_str() {
1405                "ProjectNotFoundException" => {
1406                    return RusotoError::Service(UpdateProjectError::ProjectNotFound(err.msg))
1407                }
1408                "ValidationException" => return RusotoError::Validation(err.msg),
1409                _ => {}
1410            }
1411        }
1412        RusotoError::Unknown(res)
1413    }
1414}
1415impl fmt::Display for UpdateProjectError {
1416    #[allow(unused_variables)]
1417    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1418        match *self {
1419            UpdateProjectError::ProjectNotFound(ref cause) => write!(f, "{}", cause),
1420        }
1421    }
1422}
1423impl Error for UpdateProjectError {}
1424/// Errors returned by UpdateTeamMember
1425#[derive(Debug, PartialEq)]
1426pub enum UpdateTeamMemberError {
1427    /// <p>Another modification is being made. That modification must complete before you can make your change.</p>
1428    ConcurrentModification(String),
1429    /// <p>The service role is not valid.</p>
1430    InvalidServiceRole(String),
1431    /// <p>A resource limit has been exceeded.</p>
1432    LimitExceeded(String),
1433    /// <p>Project configuration information is required but not specified.</p>
1434    ProjectConfiguration(String),
1435    /// <p>The specified AWS CodeStar project was not found.</p>
1436    ProjectNotFound(String),
1437    /// <p>The specified team member was not found.</p>
1438    TeamMemberNotFound(String),
1439}
1440
1441impl UpdateTeamMemberError {
1442    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTeamMemberError> {
1443        if let Some(err) = proto::json::Error::parse(&res) {
1444            match err.typ.as_str() {
1445                "ConcurrentModificationException" => {
1446                    return RusotoError::Service(UpdateTeamMemberError::ConcurrentModification(
1447                        err.msg,
1448                    ))
1449                }
1450                "InvalidServiceRoleException" => {
1451                    return RusotoError::Service(UpdateTeamMemberError::InvalidServiceRole(err.msg))
1452                }
1453                "LimitExceededException" => {
1454                    return RusotoError::Service(UpdateTeamMemberError::LimitExceeded(err.msg))
1455                }
1456                "ProjectConfigurationException" => {
1457                    return RusotoError::Service(UpdateTeamMemberError::ProjectConfiguration(
1458                        err.msg,
1459                    ))
1460                }
1461                "ProjectNotFoundException" => {
1462                    return RusotoError::Service(UpdateTeamMemberError::ProjectNotFound(err.msg))
1463                }
1464                "TeamMemberNotFoundException" => {
1465                    return RusotoError::Service(UpdateTeamMemberError::TeamMemberNotFound(err.msg))
1466                }
1467                "ValidationException" => return RusotoError::Validation(err.msg),
1468                _ => {}
1469            }
1470        }
1471        RusotoError::Unknown(res)
1472    }
1473}
1474impl fmt::Display for UpdateTeamMemberError {
1475    #[allow(unused_variables)]
1476    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1477        match *self {
1478            UpdateTeamMemberError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
1479            UpdateTeamMemberError::InvalidServiceRole(ref cause) => write!(f, "{}", cause),
1480            UpdateTeamMemberError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1481            UpdateTeamMemberError::ProjectConfiguration(ref cause) => write!(f, "{}", cause),
1482            UpdateTeamMemberError::ProjectNotFound(ref cause) => write!(f, "{}", cause),
1483            UpdateTeamMemberError::TeamMemberNotFound(ref cause) => write!(f, "{}", cause),
1484        }
1485    }
1486}
1487impl Error for UpdateTeamMemberError {}
1488/// Errors returned by UpdateUserProfile
1489#[derive(Debug, PartialEq)]
1490pub enum UpdateUserProfileError {
1491    /// <p>The user profile was not found.</p>
1492    UserProfileNotFound(String),
1493}
1494
1495impl UpdateUserProfileError {
1496    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUserProfileError> {
1497        if let Some(err) = proto::json::Error::parse(&res) {
1498            match err.typ.as_str() {
1499                "UserProfileNotFoundException" => {
1500                    return RusotoError::Service(UpdateUserProfileError::UserProfileNotFound(
1501                        err.msg,
1502                    ))
1503                }
1504                "ValidationException" => return RusotoError::Validation(err.msg),
1505                _ => {}
1506            }
1507        }
1508        RusotoError::Unknown(res)
1509    }
1510}
1511impl fmt::Display for UpdateUserProfileError {
1512    #[allow(unused_variables)]
1513    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1514        match *self {
1515            UpdateUserProfileError::UserProfileNotFound(ref cause) => write!(f, "{}", cause),
1516        }
1517    }
1518}
1519impl Error for UpdateUserProfileError {}
1520/// Trait representing the capabilities of the CodeStar API. CodeStar clients implement this trait.
1521#[async_trait]
1522pub trait CodeStar {
1523    /// <p>Adds an IAM user to the team for an AWS CodeStar project.</p>
1524    async fn associate_team_member(
1525        &self,
1526        input: AssociateTeamMemberRequest,
1527    ) -> Result<AssociateTeamMemberResult, RusotoError<AssociateTeamMemberError>>;
1528
1529    /// <p>Creates a project, including project resources. This action creates a project based on a submitted project request. A set of source code files and a toolchain template file can be included with the project request. If these are not provided, an empty project is created.</p>
1530    async fn create_project(
1531        &self,
1532        input: CreateProjectRequest,
1533    ) -> Result<CreateProjectResult, RusotoError<CreateProjectError>>;
1534
1535    /// <p>Creates a profile for a user that includes user preferences, such as the display name and email address assocciated with the user, in AWS CodeStar. The user profile is not project-specific. Information in the user profile is displayed wherever the user's information appears to other users in AWS CodeStar.</p>
1536    async fn create_user_profile(
1537        &self,
1538        input: CreateUserProfileRequest,
1539    ) -> Result<CreateUserProfileResult, RusotoError<CreateUserProfileError>>;
1540
1541    /// <p>Deletes a project, including project resources. Does not delete users associated with the project, but does delete the IAM roles that allowed access to the project.</p>
1542    async fn delete_project(
1543        &self,
1544        input: DeleteProjectRequest,
1545    ) -> Result<DeleteProjectResult, RusotoError<DeleteProjectError>>;
1546
1547    /// <p>Deletes a user profile in AWS CodeStar, including all personal preference data associated with that profile, such as display name and email address. It does not delete the history of that user, for example the history of commits made by that user.</p>
1548    async fn delete_user_profile(
1549        &self,
1550        input: DeleteUserProfileRequest,
1551    ) -> Result<DeleteUserProfileResult, RusotoError<DeleteUserProfileError>>;
1552
1553    /// <p>Describes a project and its resources.</p>
1554    async fn describe_project(
1555        &self,
1556        input: DescribeProjectRequest,
1557    ) -> Result<DescribeProjectResult, RusotoError<DescribeProjectError>>;
1558
1559    /// <p>Describes a user in AWS CodeStar and the user attributes across all projects.</p>
1560    async fn describe_user_profile(
1561        &self,
1562        input: DescribeUserProfileRequest,
1563    ) -> Result<DescribeUserProfileResult, RusotoError<DescribeUserProfileError>>;
1564
1565    /// <p>Removes a user from a project. Removing a user from a project also removes the IAM policies from that user that allowed access to the project and its resources. Disassociating a team member does not remove that user's profile from AWS CodeStar. It does not remove the user from IAM.</p>
1566    async fn disassociate_team_member(
1567        &self,
1568        input: DisassociateTeamMemberRequest,
1569    ) -> Result<DisassociateTeamMemberResult, RusotoError<DisassociateTeamMemberError>>;
1570
1571    /// <p>Lists all projects in AWS CodeStar associated with your AWS account.</p>
1572    async fn list_projects(
1573        &self,
1574        input: ListProjectsRequest,
1575    ) -> Result<ListProjectsResult, RusotoError<ListProjectsError>>;
1576
1577    /// <p>Lists resources associated with a project in AWS CodeStar.</p>
1578    async fn list_resources(
1579        &self,
1580        input: ListResourcesRequest,
1581    ) -> Result<ListResourcesResult, RusotoError<ListResourcesError>>;
1582
1583    /// <p>Gets the tags for a project.</p>
1584    async fn list_tags_for_project(
1585        &self,
1586        input: ListTagsForProjectRequest,
1587    ) -> Result<ListTagsForProjectResult, RusotoError<ListTagsForProjectError>>;
1588
1589    /// <p>Lists all team members associated with a project.</p>
1590    async fn list_team_members(
1591        &self,
1592        input: ListTeamMembersRequest,
1593    ) -> Result<ListTeamMembersResult, RusotoError<ListTeamMembersError>>;
1594
1595    /// <p>Lists all the user profiles configured for your AWS account in AWS CodeStar.</p>
1596    async fn list_user_profiles(
1597        &self,
1598        input: ListUserProfilesRequest,
1599    ) -> Result<ListUserProfilesResult, RusotoError<ListUserProfilesError>>;
1600
1601    /// <p>Adds tags to a project.</p>
1602    async fn tag_project(
1603        &self,
1604        input: TagProjectRequest,
1605    ) -> Result<TagProjectResult, RusotoError<TagProjectError>>;
1606
1607    /// <p>Removes tags from a project.</p>
1608    async fn untag_project(
1609        &self,
1610        input: UntagProjectRequest,
1611    ) -> Result<UntagProjectResult, RusotoError<UntagProjectError>>;
1612
1613    /// <p>Updates a project in AWS CodeStar.</p>
1614    async fn update_project(
1615        &self,
1616        input: UpdateProjectRequest,
1617    ) -> Result<UpdateProjectResult, RusotoError<UpdateProjectError>>;
1618
1619    /// <p>Updates a team member's attributes in an AWS CodeStar project. For example, you can change a team member's role in the project, or change whether they have remote access to project resources.</p>
1620    async fn update_team_member(
1621        &self,
1622        input: UpdateTeamMemberRequest,
1623    ) -> Result<UpdateTeamMemberResult, RusotoError<UpdateTeamMemberError>>;
1624
1625    /// <p>Updates a user's profile in AWS CodeStar. The user profile is not project-specific. Information in the user profile is displayed wherever the user's information appears to other users in AWS CodeStar. </p>
1626    async fn update_user_profile(
1627        &self,
1628        input: UpdateUserProfileRequest,
1629    ) -> Result<UpdateUserProfileResult, RusotoError<UpdateUserProfileError>>;
1630}
1631/// A client for the CodeStar API.
1632#[derive(Clone)]
1633pub struct CodeStarClient {
1634    client: Client,
1635    region: region::Region,
1636}
1637
1638impl CodeStarClient {
1639    /// Creates a client backed by the default tokio event loop.
1640    ///
1641    /// The client will use the default credentials provider and tls client.
1642    pub fn new(region: region::Region) -> CodeStarClient {
1643        CodeStarClient {
1644            client: Client::shared(),
1645            region,
1646        }
1647    }
1648
1649    pub fn new_with<P, D>(
1650        request_dispatcher: D,
1651        credentials_provider: P,
1652        region: region::Region,
1653    ) -> CodeStarClient
1654    where
1655        P: ProvideAwsCredentials + Send + Sync + 'static,
1656        D: DispatchSignedRequest + Send + Sync + 'static,
1657    {
1658        CodeStarClient {
1659            client: Client::new_with(credentials_provider, request_dispatcher),
1660            region,
1661        }
1662    }
1663
1664    pub fn new_with_client(client: Client, region: region::Region) -> CodeStarClient {
1665        CodeStarClient { client, region }
1666    }
1667}
1668
1669#[async_trait]
1670impl CodeStar for CodeStarClient {
1671    /// <p>Adds an IAM user to the team for an AWS CodeStar project.</p>
1672    async fn associate_team_member(
1673        &self,
1674        input: AssociateTeamMemberRequest,
1675    ) -> Result<AssociateTeamMemberResult, RusotoError<AssociateTeamMemberError>> {
1676        let mut request = self.new_signed_request("POST", "/");
1677        request.add_header("x-amz-target", "CodeStar_20170419.AssociateTeamMember");
1678        let encoded = serde_json::to_string(&input).unwrap();
1679        request.set_payload(Some(encoded));
1680
1681        let response = self
1682            .sign_and_dispatch(request, AssociateTeamMemberError::from_response)
1683            .await?;
1684        let mut response = response;
1685        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1686        proto::json::ResponsePayload::new(&response).deserialize::<AssociateTeamMemberResult, _>()
1687    }
1688
1689    /// <p>Creates a project, including project resources. This action creates a project based on a submitted project request. A set of source code files and a toolchain template file can be included with the project request. If these are not provided, an empty project is created.</p>
1690    async fn create_project(
1691        &self,
1692        input: CreateProjectRequest,
1693    ) -> Result<CreateProjectResult, RusotoError<CreateProjectError>> {
1694        let mut request = self.new_signed_request("POST", "/");
1695        request.add_header("x-amz-target", "CodeStar_20170419.CreateProject");
1696        let encoded = serde_json::to_string(&input).unwrap();
1697        request.set_payload(Some(encoded));
1698
1699        let response = self
1700            .sign_and_dispatch(request, CreateProjectError::from_response)
1701            .await?;
1702        let mut response = response;
1703        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1704        proto::json::ResponsePayload::new(&response).deserialize::<CreateProjectResult, _>()
1705    }
1706
1707    /// <p>Creates a profile for a user that includes user preferences, such as the display name and email address assocciated with the user, in AWS CodeStar. The user profile is not project-specific. Information in the user profile is displayed wherever the user's information appears to other users in AWS CodeStar.</p>
1708    async fn create_user_profile(
1709        &self,
1710        input: CreateUserProfileRequest,
1711    ) -> Result<CreateUserProfileResult, RusotoError<CreateUserProfileError>> {
1712        let mut request = self.new_signed_request("POST", "/");
1713        request.add_header("x-amz-target", "CodeStar_20170419.CreateUserProfile");
1714        let encoded = serde_json::to_string(&input).unwrap();
1715        request.set_payload(Some(encoded));
1716
1717        let response = self
1718            .sign_and_dispatch(request, CreateUserProfileError::from_response)
1719            .await?;
1720        let mut response = response;
1721        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1722        proto::json::ResponsePayload::new(&response).deserialize::<CreateUserProfileResult, _>()
1723    }
1724
1725    /// <p>Deletes a project, including project resources. Does not delete users associated with the project, but does delete the IAM roles that allowed access to the project.</p>
1726    async fn delete_project(
1727        &self,
1728        input: DeleteProjectRequest,
1729    ) -> Result<DeleteProjectResult, RusotoError<DeleteProjectError>> {
1730        let mut request = self.new_signed_request("POST", "/");
1731        request.add_header("x-amz-target", "CodeStar_20170419.DeleteProject");
1732        let encoded = serde_json::to_string(&input).unwrap();
1733        request.set_payload(Some(encoded));
1734
1735        let response = self
1736            .sign_and_dispatch(request, DeleteProjectError::from_response)
1737            .await?;
1738        let mut response = response;
1739        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1740        proto::json::ResponsePayload::new(&response).deserialize::<DeleteProjectResult, _>()
1741    }
1742
1743    /// <p>Deletes a user profile in AWS CodeStar, including all personal preference data associated with that profile, such as display name and email address. It does not delete the history of that user, for example the history of commits made by that user.</p>
1744    async fn delete_user_profile(
1745        &self,
1746        input: DeleteUserProfileRequest,
1747    ) -> Result<DeleteUserProfileResult, RusotoError<DeleteUserProfileError>> {
1748        let mut request = self.new_signed_request("POST", "/");
1749        request.add_header("x-amz-target", "CodeStar_20170419.DeleteUserProfile");
1750        let encoded = serde_json::to_string(&input).unwrap();
1751        request.set_payload(Some(encoded));
1752
1753        let response = self
1754            .sign_and_dispatch(request, DeleteUserProfileError::from_response)
1755            .await?;
1756        let mut response = response;
1757        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1758        proto::json::ResponsePayload::new(&response).deserialize::<DeleteUserProfileResult, _>()
1759    }
1760
1761    /// <p>Describes a project and its resources.</p>
1762    async fn describe_project(
1763        &self,
1764        input: DescribeProjectRequest,
1765    ) -> Result<DescribeProjectResult, RusotoError<DescribeProjectError>> {
1766        let mut request = self.new_signed_request("POST", "/");
1767        request.add_header("x-amz-target", "CodeStar_20170419.DescribeProject");
1768        let encoded = serde_json::to_string(&input).unwrap();
1769        request.set_payload(Some(encoded));
1770
1771        let response = self
1772            .sign_and_dispatch(request, DescribeProjectError::from_response)
1773            .await?;
1774        let mut response = response;
1775        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1776        proto::json::ResponsePayload::new(&response).deserialize::<DescribeProjectResult, _>()
1777    }
1778
1779    /// <p>Describes a user in AWS CodeStar and the user attributes across all projects.</p>
1780    async fn describe_user_profile(
1781        &self,
1782        input: DescribeUserProfileRequest,
1783    ) -> Result<DescribeUserProfileResult, RusotoError<DescribeUserProfileError>> {
1784        let mut request = self.new_signed_request("POST", "/");
1785        request.add_header("x-amz-target", "CodeStar_20170419.DescribeUserProfile");
1786        let encoded = serde_json::to_string(&input).unwrap();
1787        request.set_payload(Some(encoded));
1788
1789        let response = self
1790            .sign_and_dispatch(request, DescribeUserProfileError::from_response)
1791            .await?;
1792        let mut response = response;
1793        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1794        proto::json::ResponsePayload::new(&response).deserialize::<DescribeUserProfileResult, _>()
1795    }
1796
1797    /// <p>Removes a user from a project. Removing a user from a project also removes the IAM policies from that user that allowed access to the project and its resources. Disassociating a team member does not remove that user's profile from AWS CodeStar. It does not remove the user from IAM.</p>
1798    async fn disassociate_team_member(
1799        &self,
1800        input: DisassociateTeamMemberRequest,
1801    ) -> Result<DisassociateTeamMemberResult, RusotoError<DisassociateTeamMemberError>> {
1802        let mut request = self.new_signed_request("POST", "/");
1803        request.add_header("x-amz-target", "CodeStar_20170419.DisassociateTeamMember");
1804        let encoded = serde_json::to_string(&input).unwrap();
1805        request.set_payload(Some(encoded));
1806
1807        let response = self
1808            .sign_and_dispatch(request, DisassociateTeamMemberError::from_response)
1809            .await?;
1810        let mut response = response;
1811        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1812        proto::json::ResponsePayload::new(&response)
1813            .deserialize::<DisassociateTeamMemberResult, _>()
1814    }
1815
1816    /// <p>Lists all projects in AWS CodeStar associated with your AWS account.</p>
1817    async fn list_projects(
1818        &self,
1819        input: ListProjectsRequest,
1820    ) -> Result<ListProjectsResult, RusotoError<ListProjectsError>> {
1821        let mut request = self.new_signed_request("POST", "/");
1822        request.add_header("x-amz-target", "CodeStar_20170419.ListProjects");
1823        let encoded = serde_json::to_string(&input).unwrap();
1824        request.set_payload(Some(encoded));
1825
1826        let response = self
1827            .sign_and_dispatch(request, ListProjectsError::from_response)
1828            .await?;
1829        let mut response = response;
1830        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1831        proto::json::ResponsePayload::new(&response).deserialize::<ListProjectsResult, _>()
1832    }
1833
1834    /// <p>Lists resources associated with a project in AWS CodeStar.</p>
1835    async fn list_resources(
1836        &self,
1837        input: ListResourcesRequest,
1838    ) -> Result<ListResourcesResult, RusotoError<ListResourcesError>> {
1839        let mut request = self.new_signed_request("POST", "/");
1840        request.add_header("x-amz-target", "CodeStar_20170419.ListResources");
1841        let encoded = serde_json::to_string(&input).unwrap();
1842        request.set_payload(Some(encoded));
1843
1844        let response = self
1845            .sign_and_dispatch(request, ListResourcesError::from_response)
1846            .await?;
1847        let mut response = response;
1848        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1849        proto::json::ResponsePayload::new(&response).deserialize::<ListResourcesResult, _>()
1850    }
1851
1852    /// <p>Gets the tags for a project.</p>
1853    async fn list_tags_for_project(
1854        &self,
1855        input: ListTagsForProjectRequest,
1856    ) -> Result<ListTagsForProjectResult, RusotoError<ListTagsForProjectError>> {
1857        let mut request = self.new_signed_request("POST", "/");
1858        request.add_header("x-amz-target", "CodeStar_20170419.ListTagsForProject");
1859        let encoded = serde_json::to_string(&input).unwrap();
1860        request.set_payload(Some(encoded));
1861
1862        let response = self
1863            .sign_and_dispatch(request, ListTagsForProjectError::from_response)
1864            .await?;
1865        let mut response = response;
1866        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1867        proto::json::ResponsePayload::new(&response).deserialize::<ListTagsForProjectResult, _>()
1868    }
1869
1870    /// <p>Lists all team members associated with a project.</p>
1871    async fn list_team_members(
1872        &self,
1873        input: ListTeamMembersRequest,
1874    ) -> Result<ListTeamMembersResult, RusotoError<ListTeamMembersError>> {
1875        let mut request = self.new_signed_request("POST", "/");
1876        request.add_header("x-amz-target", "CodeStar_20170419.ListTeamMembers");
1877        let encoded = serde_json::to_string(&input).unwrap();
1878        request.set_payload(Some(encoded));
1879
1880        let response = self
1881            .sign_and_dispatch(request, ListTeamMembersError::from_response)
1882            .await?;
1883        let mut response = response;
1884        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1885        proto::json::ResponsePayload::new(&response).deserialize::<ListTeamMembersResult, _>()
1886    }
1887
1888    /// <p>Lists all the user profiles configured for your AWS account in AWS CodeStar.</p>
1889    async fn list_user_profiles(
1890        &self,
1891        input: ListUserProfilesRequest,
1892    ) -> Result<ListUserProfilesResult, RusotoError<ListUserProfilesError>> {
1893        let mut request = self.new_signed_request("POST", "/");
1894        request.add_header("x-amz-target", "CodeStar_20170419.ListUserProfiles");
1895        let encoded = serde_json::to_string(&input).unwrap();
1896        request.set_payload(Some(encoded));
1897
1898        let response = self
1899            .sign_and_dispatch(request, ListUserProfilesError::from_response)
1900            .await?;
1901        let mut response = response;
1902        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1903        proto::json::ResponsePayload::new(&response).deserialize::<ListUserProfilesResult, _>()
1904    }
1905
1906    /// <p>Adds tags to a project.</p>
1907    async fn tag_project(
1908        &self,
1909        input: TagProjectRequest,
1910    ) -> Result<TagProjectResult, RusotoError<TagProjectError>> {
1911        let mut request = self.new_signed_request("POST", "/");
1912        request.add_header("x-amz-target", "CodeStar_20170419.TagProject");
1913        let encoded = serde_json::to_string(&input).unwrap();
1914        request.set_payload(Some(encoded));
1915
1916        let response = self
1917            .sign_and_dispatch(request, TagProjectError::from_response)
1918            .await?;
1919        let mut response = response;
1920        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1921        proto::json::ResponsePayload::new(&response).deserialize::<TagProjectResult, _>()
1922    }
1923
1924    /// <p>Removes tags from a project.</p>
1925    async fn untag_project(
1926        &self,
1927        input: UntagProjectRequest,
1928    ) -> Result<UntagProjectResult, RusotoError<UntagProjectError>> {
1929        let mut request = self.new_signed_request("POST", "/");
1930        request.add_header("x-amz-target", "CodeStar_20170419.UntagProject");
1931        let encoded = serde_json::to_string(&input).unwrap();
1932        request.set_payload(Some(encoded));
1933
1934        let response = self
1935            .sign_and_dispatch(request, UntagProjectError::from_response)
1936            .await?;
1937        let mut response = response;
1938        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1939        proto::json::ResponsePayload::new(&response).deserialize::<UntagProjectResult, _>()
1940    }
1941
1942    /// <p>Updates a project in AWS CodeStar.</p>
1943    async fn update_project(
1944        &self,
1945        input: UpdateProjectRequest,
1946    ) -> Result<UpdateProjectResult, RusotoError<UpdateProjectError>> {
1947        let mut request = self.new_signed_request("POST", "/");
1948        request.add_header("x-amz-target", "CodeStar_20170419.UpdateProject");
1949        let encoded = serde_json::to_string(&input).unwrap();
1950        request.set_payload(Some(encoded));
1951
1952        let response = self
1953            .sign_and_dispatch(request, UpdateProjectError::from_response)
1954            .await?;
1955        let mut response = response;
1956        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1957        proto::json::ResponsePayload::new(&response).deserialize::<UpdateProjectResult, _>()
1958    }
1959
1960    /// <p>Updates a team member's attributes in an AWS CodeStar project. For example, you can change a team member's role in the project, or change whether they have remote access to project resources.</p>
1961    async fn update_team_member(
1962        &self,
1963        input: UpdateTeamMemberRequest,
1964    ) -> Result<UpdateTeamMemberResult, RusotoError<UpdateTeamMemberError>> {
1965        let mut request = self.new_signed_request("POST", "/");
1966        request.add_header("x-amz-target", "CodeStar_20170419.UpdateTeamMember");
1967        let encoded = serde_json::to_string(&input).unwrap();
1968        request.set_payload(Some(encoded));
1969
1970        let response = self
1971            .sign_and_dispatch(request, UpdateTeamMemberError::from_response)
1972            .await?;
1973        let mut response = response;
1974        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1975        proto::json::ResponsePayload::new(&response).deserialize::<UpdateTeamMemberResult, _>()
1976    }
1977
1978    /// <p>Updates a user's profile in AWS CodeStar. The user profile is not project-specific. Information in the user profile is displayed wherever the user's information appears to other users in AWS CodeStar. </p>
1979    async fn update_user_profile(
1980        &self,
1981        input: UpdateUserProfileRequest,
1982    ) -> Result<UpdateUserProfileResult, RusotoError<UpdateUserProfileError>> {
1983        let mut request = self.new_signed_request("POST", "/");
1984        request.add_header("x-amz-target", "CodeStar_20170419.UpdateUserProfile");
1985        let encoded = serde_json::to_string(&input).unwrap();
1986        request.set_payload(Some(encoded));
1987
1988        let response = self
1989            .sign_and_dispatch(request, UpdateUserProfileError::from_response)
1990            .await?;
1991        let mut response = response;
1992        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1993        proto::json::ResponsePayload::new(&response).deserialize::<UpdateUserProfileResult, _>()
1994    }
1995}