1use 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 #[serde(rename = "clientRequestToken")]
58 #[serde(skip_serializing_if = "Option::is_none")]
59 pub client_request_token: Option<String>,
60 #[serde(rename = "projectId")]
62 pub project_id: String,
63 #[serde(rename = "projectRole")]
65 pub project_role: String,
66 #[serde(rename = "remoteAccessAllowed")]
68 #[serde(skip_serializing_if = "Option::is_none")]
69 pub remote_access_allowed: Option<bool>,
70 #[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 #[serde(rename = "clientRequestToken")]
80 #[serde(skip_serializing_if = "Option::is_none")]
81 pub client_request_token: Option<String>,
82}
83
84#[derive(Clone, Debug, Default, PartialEq, Serialize)]
86#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
87pub struct Code {
88 #[serde(rename = "destination")]
90 pub destination: CodeDestination,
91 #[serde(rename = "source")]
93 pub source: CodeSource,
94}
95
96#[derive(Clone, Debug, Default, PartialEq, Serialize)]
98#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
99pub struct CodeCommitCodeDestination {
100 #[serde(rename = "name")]
102 pub name: String,
103}
104
105#[derive(Clone, Debug, Default, PartialEq, Serialize)]
107#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
108pub struct CodeDestination {
109 #[serde(rename = "codeCommit")]
111 #[serde(skip_serializing_if = "Option::is_none")]
112 pub code_commit: Option<CodeCommitCodeDestination>,
113 #[serde(rename = "gitHub")]
115 #[serde(skip_serializing_if = "Option::is_none")]
116 pub git_hub: Option<GitHubCodeDestination>,
117}
118
119#[derive(Clone, Debug, Default, PartialEq, Serialize)]
121#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
122pub struct CodeSource {
123 #[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 #[serde(rename = "clientRequestToken")]
133 #[serde(skip_serializing_if = "Option::is_none")]
134 pub client_request_token: Option<String>,
135 #[serde(rename = "description")]
137 #[serde(skip_serializing_if = "Option::is_none")]
138 pub description: Option<String>,
139 #[serde(rename = "id")]
141 pub id: String,
142 #[serde(rename = "name")]
144 pub name: String,
145 #[serde(rename = "sourceCode")]
147 #[serde(skip_serializing_if = "Option::is_none")]
148 pub source_code: Option<Vec<Code>>,
149 #[serde(rename = "tags")]
151 #[serde(skip_serializing_if = "Option::is_none")]
152 pub tags: Option<::std::collections::HashMap<String, String>>,
153 #[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 #[serde(rename = "arn")]
164 pub arn: String,
165 #[serde(rename = "clientRequestToken")]
167 #[serde(skip_serializing_if = "Option::is_none")]
168 pub client_request_token: Option<String>,
169 #[serde(rename = "id")]
171 pub id: String,
172 #[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 #[serde(rename = "displayName")]
183 pub display_name: String,
184 #[serde(rename = "emailAddress")]
186 pub email_address: String,
187 #[serde(rename = "sshPublicKey")]
189 #[serde(skip_serializing_if = "Option::is_none")]
190 pub ssh_public_key: Option<String>,
191 #[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 #[serde(rename = "createdTimestamp")]
201 #[serde(skip_serializing_if = "Option::is_none")]
202 pub created_timestamp: Option<f64>,
203 #[serde(rename = "displayName")]
205 #[serde(skip_serializing_if = "Option::is_none")]
206 pub display_name: Option<String>,
207 #[serde(rename = "emailAddress")]
209 #[serde(skip_serializing_if = "Option::is_none")]
210 pub email_address: Option<String>,
211 #[serde(rename = "lastModifiedTimestamp")]
213 #[serde(skip_serializing_if = "Option::is_none")]
214 pub last_modified_timestamp: Option<f64>,
215 #[serde(rename = "sshPublicKey")]
217 #[serde(skip_serializing_if = "Option::is_none")]
218 pub ssh_public_key: Option<String>,
219 #[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 #[serde(rename = "clientRequestToken")]
229 #[serde(skip_serializing_if = "Option::is_none")]
230 pub client_request_token: Option<String>,
231 #[serde(rename = "deleteStack")]
233 #[serde(skip_serializing_if = "Option::is_none")]
234 pub delete_stack: Option<bool>,
235 #[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 #[serde(rename = "projectArn")]
245 #[serde(skip_serializing_if = "Option::is_none")]
246 pub project_arn: Option<String>,
247 #[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 #[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 #[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 #[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 #[serde(rename = "arn")]
282 #[serde(skip_serializing_if = "Option::is_none")]
283 pub arn: Option<String>,
284 #[serde(rename = "clientRequestToken")]
286 #[serde(skip_serializing_if = "Option::is_none")]
287 pub client_request_token: Option<String>,
288 #[serde(rename = "createdTimeStamp")]
290 #[serde(skip_serializing_if = "Option::is_none")]
291 pub created_time_stamp: Option<f64>,
292 #[serde(rename = "description")]
294 #[serde(skip_serializing_if = "Option::is_none")]
295 pub description: Option<String>,
296 #[serde(rename = "id")]
298 #[serde(skip_serializing_if = "Option::is_none")]
299 pub id: Option<String>,
300 #[serde(rename = "name")]
302 #[serde(skip_serializing_if = "Option::is_none")]
303 pub name: Option<String>,
304 #[serde(rename = "projectTemplateId")]
306 #[serde(skip_serializing_if = "Option::is_none")]
307 pub project_template_id: Option<String>,
308 #[serde(rename = "stackId")]
310 #[serde(skip_serializing_if = "Option::is_none")]
311 pub stack_id: Option<String>,
312 #[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 #[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 #[serde(rename = "createdTimestamp")]
331 pub created_timestamp: f64,
332 #[serde(rename = "displayName")]
334 #[serde(skip_serializing_if = "Option::is_none")]
335 pub display_name: Option<String>,
336 #[serde(rename = "emailAddress")]
338 #[serde(skip_serializing_if = "Option::is_none")]
339 pub email_address: Option<String>,
340 #[serde(rename = "lastModifiedTimestamp")]
342 pub last_modified_timestamp: f64,
343 #[serde(rename = "sshPublicKey")]
345 #[serde(skip_serializing_if = "Option::is_none")]
346 pub ssh_public_key: Option<String>,
347 #[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 #[serde(rename = "projectId")]
357 pub project_id: String,
358 #[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#[derive(Clone, Debug, Default, PartialEq, Serialize)]
369#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
370pub struct GitHubCodeDestination {
371 #[serde(rename = "description")]
373 #[serde(skip_serializing_if = "Option::is_none")]
374 pub description: Option<String>,
375 #[serde(rename = "issuesEnabled")]
377 pub issues_enabled: bool,
378 #[serde(rename = "name")]
380 pub name: String,
381 #[serde(rename = "owner")]
383 pub owner: String,
384 #[serde(rename = "privateRepository")]
386 pub private_repository: bool,
387 #[serde(rename = "token")]
389 pub token: String,
390 #[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 #[serde(rename = "maxResults")]
400 #[serde(skip_serializing_if = "Option::is_none")]
401 pub max_results: Option<i64>,
402 #[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 #[serde(rename = "nextToken")]
413 #[serde(skip_serializing_if = "Option::is_none")]
414 pub next_token: Option<String>,
415 #[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 #[serde(rename = "maxResults")]
425 #[serde(skip_serializing_if = "Option::is_none")]
426 pub max_results: Option<i64>,
427 #[serde(rename = "nextToken")]
429 #[serde(skip_serializing_if = "Option::is_none")]
430 pub next_token: Option<String>,
431 #[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 #[serde(rename = "nextToken")]
441 #[serde(skip_serializing_if = "Option::is_none")]
442 pub next_token: Option<String>,
443 #[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 #[serde(rename = "id")]
454 pub id: String,
455 #[serde(rename = "maxResults")]
457 #[serde(skip_serializing_if = "Option::is_none")]
458 pub max_results: Option<i64>,
459 #[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 #[serde(rename = "nextToken")]
470 #[serde(skip_serializing_if = "Option::is_none")]
471 pub next_token: Option<String>,
472 #[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 #[serde(rename = "maxResults")]
483 #[serde(skip_serializing_if = "Option::is_none")]
484 pub max_results: Option<i64>,
485 #[serde(rename = "nextToken")]
487 #[serde(skip_serializing_if = "Option::is_none")]
488 pub next_token: Option<String>,
489 #[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 #[serde(rename = "nextToken")]
499 #[serde(skip_serializing_if = "Option::is_none")]
500 pub next_token: Option<String>,
501 #[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 #[serde(rename = "maxResults")]
511 #[serde(skip_serializing_if = "Option::is_none")]
512 pub max_results: Option<i64>,
513 #[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 #[serde(rename = "nextToken")]
524 #[serde(skip_serializing_if = "Option::is_none")]
525 pub next_token: Option<String>,
526 #[serde(rename = "userProfiles")]
528 pub user_profiles: Vec<UserProfileSummary>,
529}
530
531#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
533#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
534pub struct ProjectStatus {
535 #[serde(rename = "reason")]
537 #[serde(skip_serializing_if = "Option::is_none")]
538 pub reason: Option<String>,
539 #[serde(rename = "state")]
541 pub state: String,
542}
543
544#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
546#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
547pub struct ProjectSummary {
548 #[serde(rename = "projectArn")]
550 #[serde(skip_serializing_if = "Option::is_none")]
551 pub project_arn: Option<String>,
552 #[serde(rename = "projectId")]
554 #[serde(skip_serializing_if = "Option::is_none")]
555 pub project_id: Option<String>,
556}
557
558#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
560#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
561pub struct Resource {
562 #[serde(rename = "id")]
564 pub id: String,
565}
566
567#[derive(Clone, Debug, Default, PartialEq, Serialize)]
569#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
570pub struct S3Location {
571 #[serde(rename = "bucketKey")]
573 #[serde(skip_serializing_if = "Option::is_none")]
574 pub bucket_key: Option<String>,
575 #[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 #[serde(rename = "id")]
586 pub id: String,
587 #[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 #[serde(rename = "tags")]
597 #[serde(skip_serializing_if = "Option::is_none")]
598 pub tags: Option<::std::collections::HashMap<String, String>>,
599}
600
601#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
603#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
604pub struct TeamMember {
605 #[serde(rename = "projectRole")]
607 pub project_role: String,
608 #[serde(rename = "remoteAccessAllowed")]
610 #[serde(skip_serializing_if = "Option::is_none")]
611 pub remote_access_allowed: Option<bool>,
612 #[serde(rename = "userArn")]
614 pub user_arn: String,
615}
616
617#[derive(Clone, Debug, Default, PartialEq, Serialize)]
619#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
620pub struct Toolchain {
621 #[serde(rename = "roleArn")]
623 #[serde(skip_serializing_if = "Option::is_none")]
624 pub role_arn: Option<String>,
625 #[serde(rename = "source")]
627 pub source: ToolchainSource,
628 #[serde(rename = "stackParameters")]
630 #[serde(skip_serializing_if = "Option::is_none")]
631 pub stack_parameters: Option<::std::collections::HashMap<String, String>>,
632}
633
634#[derive(Clone, Debug, Default, PartialEq, Serialize)]
636#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
637pub struct ToolchainSource {
638 #[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 #[serde(rename = "id")]
648 pub id: String,
649 #[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 #[serde(rename = "description")]
663 #[serde(skip_serializing_if = "Option::is_none")]
664 pub description: Option<String>,
665 #[serde(rename = "id")]
667 pub id: String,
668 #[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 #[serde(rename = "projectId")]
683 pub project_id: String,
684 #[serde(rename = "projectRole")]
686 #[serde(skip_serializing_if = "Option::is_none")]
687 pub project_role: Option<String>,
688 #[serde(rename = "remoteAccessAllowed")]
690 #[serde(skip_serializing_if = "Option::is_none")]
691 pub remote_access_allowed: Option<bool>,
692 #[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 #[serde(rename = "projectRole")]
702 #[serde(skip_serializing_if = "Option::is_none")]
703 pub project_role: Option<String>,
704 #[serde(rename = "remoteAccessAllowed")]
706 #[serde(skip_serializing_if = "Option::is_none")]
707 pub remote_access_allowed: Option<bool>,
708 #[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 #[serde(rename = "displayName")]
719 #[serde(skip_serializing_if = "Option::is_none")]
720 pub display_name: Option<String>,
721 #[serde(rename = "emailAddress")]
723 #[serde(skip_serializing_if = "Option::is_none")]
724 pub email_address: Option<String>,
725 #[serde(rename = "sshPublicKey")]
727 #[serde(skip_serializing_if = "Option::is_none")]
728 pub ssh_public_key: Option<String>,
729 #[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 #[serde(rename = "createdTimestamp")]
739 #[serde(skip_serializing_if = "Option::is_none")]
740 pub created_timestamp: Option<f64>,
741 #[serde(rename = "displayName")]
743 #[serde(skip_serializing_if = "Option::is_none")]
744 pub display_name: Option<String>,
745 #[serde(rename = "emailAddress")]
747 #[serde(skip_serializing_if = "Option::is_none")]
748 pub email_address: Option<String>,
749 #[serde(rename = "lastModifiedTimestamp")]
751 #[serde(skip_serializing_if = "Option::is_none")]
752 pub last_modified_timestamp: Option<f64>,
753 #[serde(rename = "sshPublicKey")]
755 #[serde(skip_serializing_if = "Option::is_none")]
756 pub ssh_public_key: Option<String>,
757 #[serde(rename = "userArn")]
759 pub user_arn: String,
760}
761
762#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
764#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
765pub struct UserProfileSummary {
766 #[serde(rename = "displayName")]
768 #[serde(skip_serializing_if = "Option::is_none")]
769 pub display_name: Option<String>,
770 #[serde(rename = "emailAddress")]
772 #[serde(skip_serializing_if = "Option::is_none")]
773 pub email_address: Option<String>,
774 #[serde(rename = "sshPublicKey")]
776 #[serde(skip_serializing_if = "Option::is_none")]
777 pub ssh_public_key: Option<String>,
778 #[serde(rename = "userArn")]
780 #[serde(skip_serializing_if = "Option::is_none")]
781 pub user_arn: Option<String>,
782}
783
784#[derive(Debug, PartialEq)]
786pub enum AssociateTeamMemberError {
787 ConcurrentModification(String),
789 InvalidServiceRole(String),
791 LimitExceeded(String),
793 ProjectConfiguration(String),
795 ProjectNotFound(String),
797 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#[derive(Debug, PartialEq)]
856pub enum CreateProjectError {
857 ConcurrentModification(String),
859 InvalidServiceRole(String),
861 LimitExceeded(String),
863 ProjectAlreadyExists(String),
865 ProjectConfiguration(String),
867 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#[derive(Debug, PartialEq)]
918pub enum CreateUserProfileError {
919 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#[derive(Debug, PartialEq)]
950pub enum DeleteProjectError {
951 ConcurrentModification(String),
953 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#[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#[derive(Debug, PartialEq)]
1010pub enum DescribeProjectError {
1011 ConcurrentModification(String),
1013 InvalidServiceRole(String),
1015 ProjectConfiguration(String),
1017 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#[derive(Debug, PartialEq)]
1062pub enum DescribeUserProfileError {
1063 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#[derive(Debug, PartialEq)]
1094pub enum DisassociateTeamMemberError {
1095 ConcurrentModification(String),
1097 InvalidServiceRole(String),
1099 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#[derive(Debug, PartialEq)]
1144pub enum ListProjectsError {
1145 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#[derive(Debug, PartialEq)]
1174pub enum ListResourcesError {
1175 InvalidNextToken(String),
1177 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#[derive(Debug, PartialEq)]
1210pub enum ListTagsForProjectError {
1211 InvalidNextToken(String),
1213 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#[derive(Debug, PartialEq)]
1246pub enum ListTeamMembersError {
1247 InvalidNextToken(String),
1249 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#[derive(Debug, PartialEq)]
1282pub enum ListUserProfilesError {
1283 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#[derive(Debug, PartialEq)]
1312pub enum TagProjectError {
1313 ConcurrentModification(String),
1315 LimitExceeded(String),
1317 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#[derive(Debug, PartialEq)]
1354pub enum UntagProjectError {
1355 ConcurrentModification(String),
1357 LimitExceeded(String),
1359 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#[derive(Debug, PartialEq)]
1396pub enum UpdateProjectError {
1397 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#[derive(Debug, PartialEq)]
1426pub enum UpdateTeamMemberError {
1427 ConcurrentModification(String),
1429 InvalidServiceRole(String),
1431 LimitExceeded(String),
1433 ProjectConfiguration(String),
1435 ProjectNotFound(String),
1437 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#[derive(Debug, PartialEq)]
1490pub enum UpdateUserProfileError {
1491 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#[async_trait]
1522pub trait CodeStar {
1523 async fn associate_team_member(
1525 &self,
1526 input: AssociateTeamMemberRequest,
1527 ) -> Result<AssociateTeamMemberResult, RusotoError<AssociateTeamMemberError>>;
1528
1529 async fn create_project(
1531 &self,
1532 input: CreateProjectRequest,
1533 ) -> Result<CreateProjectResult, RusotoError<CreateProjectError>>;
1534
1535 async fn create_user_profile(
1537 &self,
1538 input: CreateUserProfileRequest,
1539 ) -> Result<CreateUserProfileResult, RusotoError<CreateUserProfileError>>;
1540
1541 async fn delete_project(
1543 &self,
1544 input: DeleteProjectRequest,
1545 ) -> Result<DeleteProjectResult, RusotoError<DeleteProjectError>>;
1546
1547 async fn delete_user_profile(
1549 &self,
1550 input: DeleteUserProfileRequest,
1551 ) -> Result<DeleteUserProfileResult, RusotoError<DeleteUserProfileError>>;
1552
1553 async fn describe_project(
1555 &self,
1556 input: DescribeProjectRequest,
1557 ) -> Result<DescribeProjectResult, RusotoError<DescribeProjectError>>;
1558
1559 async fn describe_user_profile(
1561 &self,
1562 input: DescribeUserProfileRequest,
1563 ) -> Result<DescribeUserProfileResult, RusotoError<DescribeUserProfileError>>;
1564
1565 async fn disassociate_team_member(
1567 &self,
1568 input: DisassociateTeamMemberRequest,
1569 ) -> Result<DisassociateTeamMemberResult, RusotoError<DisassociateTeamMemberError>>;
1570
1571 async fn list_projects(
1573 &self,
1574 input: ListProjectsRequest,
1575 ) -> Result<ListProjectsResult, RusotoError<ListProjectsError>>;
1576
1577 async fn list_resources(
1579 &self,
1580 input: ListResourcesRequest,
1581 ) -> Result<ListResourcesResult, RusotoError<ListResourcesError>>;
1582
1583 async fn list_tags_for_project(
1585 &self,
1586 input: ListTagsForProjectRequest,
1587 ) -> Result<ListTagsForProjectResult, RusotoError<ListTagsForProjectError>>;
1588
1589 async fn list_team_members(
1591 &self,
1592 input: ListTeamMembersRequest,
1593 ) -> Result<ListTeamMembersResult, RusotoError<ListTeamMembersError>>;
1594
1595 async fn list_user_profiles(
1597 &self,
1598 input: ListUserProfilesRequest,
1599 ) -> Result<ListUserProfilesResult, RusotoError<ListUserProfilesError>>;
1600
1601 async fn tag_project(
1603 &self,
1604 input: TagProjectRequest,
1605 ) -> Result<TagProjectResult, RusotoError<TagProjectError>>;
1606
1607 async fn untag_project(
1609 &self,
1610 input: UntagProjectRequest,
1611 ) -> Result<UntagProjectResult, RusotoError<UntagProjectError>>;
1612
1613 async fn update_project(
1615 &self,
1616 input: UpdateProjectRequest,
1617 ) -> Result<UpdateProjectResult, RusotoError<UpdateProjectError>>;
1618
1619 async fn update_team_member(
1621 &self,
1622 input: UpdateTeamMemberRequest,
1623 ) -> Result<UpdateTeamMemberResult, RusotoError<UpdateTeamMemberError>>;
1624
1625 async fn update_user_profile(
1627 &self,
1628 input: UpdateUserProfileRequest,
1629 ) -> Result<UpdateUserProfileResult, RusotoError<UpdateUserProfileError>>;
1630}
1631#[derive(Clone)]
1633pub struct CodeStarClient {
1634 client: Client,
1635 region: region::Region,
1636}
1637
1638impl CodeStarClient {
1639 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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}