use std::error::Error;
use std::fmt;
use async_trait::async_trait;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchDeleteBuildsInput {
#[serde(rename = "ids")]
pub ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchDeleteBuildsOutput {
#[serde(rename = "buildsDeleted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub builds_deleted: Option<Vec<String>>,
#[serde(rename = "buildsNotDeleted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub builds_not_deleted: Option<Vec<BuildNotDeleted>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchGetBuildsInput {
#[serde(rename = "ids")]
pub ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchGetBuildsOutput {
#[serde(rename = "builds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub builds: Option<Vec<Build>>,
#[serde(rename = "buildsNotFound")]
#[serde(skip_serializing_if = "Option::is_none")]
pub builds_not_found: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchGetProjectsInput {
#[serde(rename = "names")]
pub names: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchGetProjectsOutput {
#[serde(rename = "projects")]
#[serde(skip_serializing_if = "Option::is_none")]
pub projects: Option<Vec<Project>>,
#[serde(rename = "projectsNotFound")]
#[serde(skip_serializing_if = "Option::is_none")]
pub projects_not_found: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchGetReportGroupsInput {
#[serde(rename = "reportGroupArns")]
pub report_group_arns: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchGetReportGroupsOutput {
#[serde(rename = "reportGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_groups: Option<Vec<ReportGroup>>,
#[serde(rename = "reportGroupsNotFound")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_groups_not_found: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchGetReportsInput {
#[serde(rename = "reportArns")]
pub report_arns: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchGetReportsOutput {
#[serde(rename = "reports")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reports: Option<Vec<Report>>,
#[serde(rename = "reportsNotFound")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reports_not_found: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Build {
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "artifacts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub artifacts: Option<BuildArtifacts>,
#[serde(rename = "buildComplete")]
#[serde(skip_serializing_if = "Option::is_none")]
pub build_complete: Option<bool>,
#[serde(rename = "buildNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub build_number: Option<i64>,
#[serde(rename = "buildStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub build_status: Option<String>,
#[serde(rename = "cache")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache: Option<ProjectCache>,
#[serde(rename = "currentPhase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_phase: Option<String>,
#[serde(rename = "encryptionKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_key: Option<String>,
#[serde(rename = "endTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "environment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub environment: Option<ProjectEnvironment>,
#[serde(rename = "exportedEnvironmentVariables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exported_environment_variables: Option<Vec<ExportedEnvironmentVariable>>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "initiator")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initiator: Option<String>,
#[serde(rename = "logs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logs: Option<LogsLocation>,
#[serde(rename = "networkInterface")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface: Option<NetworkInterface>,
#[serde(rename = "phases")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phases: Option<Vec<BuildPhase>>,
#[serde(rename = "projectName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub project_name: Option<String>,
#[serde(rename = "queuedTimeoutInMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub queued_timeout_in_minutes: Option<i64>,
#[serde(rename = "reportArns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_arns: Option<Vec<String>>,
#[serde(rename = "resolvedSourceVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resolved_source_version: Option<String>,
#[serde(rename = "secondaryArtifacts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_artifacts: Option<Vec<BuildArtifacts>>,
#[serde(rename = "secondarySourceVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_source_versions: Option<Vec<ProjectSourceVersion>>,
#[serde(rename = "secondarySources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_sources: Option<Vec<ProjectSource>>,
#[serde(rename = "serviceRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role: Option<String>,
#[serde(rename = "source")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<ProjectSource>,
#[serde(rename = "sourceVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_version: Option<String>,
#[serde(rename = "startTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "timeoutInMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_minutes: Option<i64>,
#[serde(rename = "vpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<VpcConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BuildArtifacts {
#[serde(rename = "artifactIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub artifact_identifier: Option<String>,
#[serde(rename = "encryptionDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_disabled: Option<bool>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "md5sum")]
#[serde(skip_serializing_if = "Option::is_none")]
pub md_5sum: Option<String>,
#[serde(rename = "overrideArtifactName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub override_artifact_name: Option<bool>,
#[serde(rename = "sha256sum")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sha_25_6sum: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BuildNotDeleted {
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "statusCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BuildPhase {
#[serde(rename = "contexts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub contexts: Option<Vec<PhaseContext>>,
#[serde(rename = "durationInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration_in_seconds: Option<i64>,
#[serde(rename = "endTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "phaseStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phase_status: Option<String>,
#[serde(rename = "phaseType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phase_type: Option<String>,
#[serde(rename = "startTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CloudWatchLogsConfig {
#[serde(rename = "groupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
#[serde(rename = "status")]
pub status: String,
#[serde(rename = "streamName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateProjectInput {
#[serde(rename = "artifacts")]
pub artifacts: ProjectArtifacts,
#[serde(rename = "badgeEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub badge_enabled: Option<bool>,
#[serde(rename = "cache")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache: Option<ProjectCache>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "encryptionKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_key: Option<String>,
#[serde(rename = "environment")]
pub environment: ProjectEnvironment,
#[serde(rename = "logsConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logs_config: Option<LogsConfig>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "queuedTimeoutInMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub queued_timeout_in_minutes: Option<i64>,
#[serde(rename = "secondaryArtifacts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_artifacts: Option<Vec<ProjectArtifacts>>,
#[serde(rename = "secondarySourceVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_source_versions: Option<Vec<ProjectSourceVersion>>,
#[serde(rename = "secondarySources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_sources: Option<Vec<ProjectSource>>,
#[serde(rename = "serviceRole")]
pub service_role: String,
#[serde(rename = "source")]
pub source: ProjectSource,
#[serde(rename = "sourceVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_version: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "timeoutInMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_minutes: Option<i64>,
#[serde(rename = "vpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<VpcConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateProjectOutput {
#[serde(rename = "project")]
#[serde(skip_serializing_if = "Option::is_none")]
pub project: Option<Project>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateReportGroupInput {
#[serde(rename = "exportConfig")]
pub export_config: ReportExportConfig,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateReportGroupOutput {
#[serde(rename = "reportGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_group: Option<ReportGroup>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateWebhookInput {
#[serde(rename = "branchFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub branch_filter: Option<String>,
#[serde(rename = "filterGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_groups: Option<Vec<Vec<WebhookFilter>>>,
#[serde(rename = "projectName")]
pub project_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateWebhookOutput {
#[serde(rename = "webhook")]
#[serde(skip_serializing_if = "Option::is_none")]
pub webhook: Option<Webhook>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteProjectInput {
#[serde(rename = "name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteProjectOutput {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteReportGroupInput {
#[serde(rename = "arn")]
pub arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteReportGroupOutput {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteReportInput {
#[serde(rename = "arn")]
pub arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteReportOutput {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteResourcePolicyInput {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteResourcePolicyOutput {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteSourceCredentialsInput {
#[serde(rename = "arn")]
pub arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteSourceCredentialsOutput {
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteWebhookInput {
#[serde(rename = "projectName")]
pub project_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteWebhookOutput {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeTestCasesInput {
#[serde(rename = "filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option<TestCaseFilter>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "reportArn")]
pub report_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeTestCasesOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "testCases")]
#[serde(skip_serializing_if = "Option::is_none")]
pub test_cases: Option<Vec<TestCase>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct EnvironmentImage {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "versions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versions: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct EnvironmentLanguage {
#[serde(rename = "images")]
#[serde(skip_serializing_if = "Option::is_none")]
pub images: Option<Vec<EnvironmentImage>>,
#[serde(rename = "language")]
#[serde(skip_serializing_if = "Option::is_none")]
pub language: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct EnvironmentPlatform {
#[serde(rename = "languages")]
#[serde(skip_serializing_if = "Option::is_none")]
pub languages: Option<Vec<EnvironmentLanguage>>,
#[serde(rename = "platform")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EnvironmentVariable {
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ExportedEnvironmentVariable {
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetResourcePolicyInput {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetResourcePolicyOutput {
#[serde(rename = "policy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GitSubmodulesConfig {
#[serde(rename = "fetchSubmodules")]
pub fetch_submodules: bool,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ImportSourceCredentialsInput {
#[serde(rename = "authType")]
pub auth_type: String,
#[serde(rename = "serverType")]
pub server_type: String,
#[serde(rename = "shouldOverwrite")]
#[serde(skip_serializing_if = "Option::is_none")]
pub should_overwrite: Option<bool>,
#[serde(rename = "token")]
pub token: String,
#[serde(rename = "username")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ImportSourceCredentialsOutput {
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct InvalidateProjectCacheInput {
#[serde(rename = "projectName")]
pub project_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct InvalidateProjectCacheOutput {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListBuildsForProjectInput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "projectName")]
pub project_name: String,
#[serde(rename = "sortOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListBuildsForProjectOutput {
#[serde(rename = "ids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ids: Option<Vec<String>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListBuildsInput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "sortOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListBuildsOutput {
#[serde(rename = "ids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ids: Option<Vec<String>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListCuratedEnvironmentImagesInput {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListCuratedEnvironmentImagesOutput {
#[serde(rename = "platforms")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platforms: Option<Vec<EnvironmentPlatform>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListProjectsInput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "sortBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_by: Option<String>,
#[serde(rename = "sortOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListProjectsOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "projects")]
#[serde(skip_serializing_if = "Option::is_none")]
pub projects: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListReportGroupsInput {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "sortBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_by: Option<String>,
#[serde(rename = "sortOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListReportGroupsOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "reportGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_groups: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListReportsForReportGroupInput {
#[serde(rename = "filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option<ReportFilter>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "reportGroupArn")]
pub report_group_arn: String,
#[serde(rename = "sortOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListReportsForReportGroupOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "reports")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reports: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListReportsInput {
#[serde(rename = "filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option<ReportFilter>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "sortOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListReportsOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "reports")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reports: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListSharedProjectsInput {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "sortBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_by: Option<String>,
#[serde(rename = "sortOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListSharedProjectsOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "projects")]
#[serde(skip_serializing_if = "Option::is_none")]
pub projects: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListSharedReportGroupsInput {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "sortBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_by: Option<String>,
#[serde(rename = "sortOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListSharedReportGroupsOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "reportGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_groups: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListSourceCredentialsInput {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListSourceCredentialsOutput {
#[serde(rename = "sourceCredentialsInfos")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_credentials_infos: Option<Vec<SourceCredentialsInfo>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LogsConfig {
#[serde(rename = "cloudWatchLogs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_watch_logs: Option<CloudWatchLogsConfig>,
#[serde(rename = "s3Logs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_logs: Option<S3LogsConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct LogsLocation {
#[serde(rename = "cloudWatchLogs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_watch_logs: Option<CloudWatchLogsConfig>,
#[serde(rename = "cloudWatchLogsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_watch_logs_arn: Option<String>,
#[serde(rename = "deepLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deep_link: Option<String>,
#[serde(rename = "groupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
#[serde(rename = "s3DeepLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_deep_link: Option<String>,
#[serde(rename = "s3Logs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_logs: Option<S3LogsConfig>,
#[serde(rename = "s3LogsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_logs_arn: Option<String>,
#[serde(rename = "streamName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct NetworkInterface {
#[serde(rename = "networkInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface_id: Option<String>,
#[serde(rename = "subnetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PhaseContext {
#[serde(rename = "message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "statusCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Project {
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "artifacts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub artifacts: Option<ProjectArtifacts>,
#[serde(rename = "badge")]
#[serde(skip_serializing_if = "Option::is_none")]
pub badge: Option<ProjectBadge>,
#[serde(rename = "cache")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache: Option<ProjectCache>,
#[serde(rename = "created")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "encryptionKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_key: Option<String>,
#[serde(rename = "environment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub environment: Option<ProjectEnvironment>,
#[serde(rename = "lastModified")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified: Option<f64>,
#[serde(rename = "logsConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logs_config: Option<LogsConfig>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "queuedTimeoutInMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub queued_timeout_in_minutes: Option<i64>,
#[serde(rename = "secondaryArtifacts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_artifacts: Option<Vec<ProjectArtifacts>>,
#[serde(rename = "secondarySourceVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_source_versions: Option<Vec<ProjectSourceVersion>>,
#[serde(rename = "secondarySources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_sources: Option<Vec<ProjectSource>>,
#[serde(rename = "serviceRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role: Option<String>,
#[serde(rename = "source")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<ProjectSource>,
#[serde(rename = "sourceVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_version: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "timeoutInMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_minutes: Option<i64>,
#[serde(rename = "vpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<VpcConfig>,
#[serde(rename = "webhook")]
#[serde(skip_serializing_if = "Option::is_none")]
pub webhook: Option<Webhook>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ProjectArtifacts {
#[serde(rename = "artifactIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub artifact_identifier: Option<String>,
#[serde(rename = "encryptionDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_disabled: Option<bool>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "namespaceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub namespace_type: Option<String>,
#[serde(rename = "overrideArtifactName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub override_artifact_name: Option<bool>,
#[serde(rename = "packaging")]
#[serde(skip_serializing_if = "Option::is_none")]
pub packaging: Option<String>,
#[serde(rename = "path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ProjectBadge {
#[serde(rename = "badgeEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub badge_enabled: Option<bool>,
#[serde(rename = "badgeRequestUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub badge_request_url: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ProjectCache {
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "modes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub modes: Option<Vec<String>>,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ProjectEnvironment {
#[serde(rename = "certificate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate: Option<String>,
#[serde(rename = "computeType")]
pub compute_type: String,
#[serde(rename = "environmentVariables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub environment_variables: Option<Vec<EnvironmentVariable>>,
#[serde(rename = "image")]
pub image: String,
#[serde(rename = "imagePullCredentialsType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_pull_credentials_type: Option<String>,
#[serde(rename = "privilegedMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub privileged_mode: Option<bool>,
#[serde(rename = "registryCredential")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registry_credential: Option<RegistryCredential>,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ProjectSource {
#[serde(rename = "auth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth: Option<SourceAuth>,
#[serde(rename = "buildspec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub buildspec: Option<String>,
#[serde(rename = "gitCloneDepth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub git_clone_depth: Option<i64>,
#[serde(rename = "gitSubmodulesConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub git_submodules_config: Option<GitSubmodulesConfig>,
#[serde(rename = "insecureSsl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub insecure_ssl: Option<bool>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "reportBuildStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_build_status: Option<bool>,
#[serde(rename = "sourceIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_identifier: Option<String>,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ProjectSourceVersion {
#[serde(rename = "sourceIdentifier")]
pub source_identifier: String,
#[serde(rename = "sourceVersion")]
pub source_version: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutResourcePolicyInput {
#[serde(rename = "policy")]
pub policy: String,
#[serde(rename = "resourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutResourcePolicyOutput {
#[serde(rename = "resourceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RegistryCredential {
#[serde(rename = "credential")]
pub credential: String,
#[serde(rename = "credentialProvider")]
pub credential_provider: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Report {
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "created")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created: Option<f64>,
#[serde(rename = "executionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_id: Option<String>,
#[serde(rename = "expired")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expired: Option<f64>,
#[serde(rename = "exportConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_config: Option<ReportExportConfig>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "reportGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_group_arn: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "testSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub test_summary: Option<TestReportSummary>,
#[serde(rename = "truncated")]
#[serde(skip_serializing_if = "Option::is_none")]
pub truncated: Option<bool>,
#[serde(rename = "type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReportExportConfig {
#[serde(rename = "exportConfigType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_config_type: Option<String>,
#[serde(rename = "s3Destination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_destination: Option<S3ReportExportConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ReportFilter {
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ReportGroup {
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "created")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created: Option<f64>,
#[serde(rename = "exportConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_config: Option<ReportExportConfig>,
#[serde(rename = "lastModified")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified: Option<f64>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct S3LogsConfig {
#[serde(rename = "encryptionDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_disabled: Option<bool>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "status")]
pub status: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct S3ReportExportConfig {
#[serde(rename = "bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bucket: Option<String>,
#[serde(rename = "encryptionDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_disabled: Option<bool>,
#[serde(rename = "encryptionKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_key: Option<String>,
#[serde(rename = "packaging")]
#[serde(skip_serializing_if = "Option::is_none")]
pub packaging: Option<String>,
#[serde(rename = "path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SourceAuth {
#[serde(rename = "resource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource: Option<String>,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SourceCredentialsInfo {
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "authType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_type: Option<String>,
#[serde(rename = "serverType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct StartBuildInput {
#[serde(rename = "artifactsOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub artifacts_override: Option<ProjectArtifacts>,
#[serde(rename = "buildspecOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub buildspec_override: Option<String>,
#[serde(rename = "cacheOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_override: Option<ProjectCache>,
#[serde(rename = "certificateOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_override: Option<String>,
#[serde(rename = "computeTypeOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compute_type_override: Option<String>,
#[serde(rename = "encryptionKeyOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_key_override: Option<String>,
#[serde(rename = "environmentTypeOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub environment_type_override: Option<String>,
#[serde(rename = "environmentVariablesOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub environment_variables_override: Option<Vec<EnvironmentVariable>>,
#[serde(rename = "gitCloneDepthOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub git_clone_depth_override: Option<i64>,
#[serde(rename = "gitSubmodulesConfigOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub git_submodules_config_override: Option<GitSubmodulesConfig>,
#[serde(rename = "idempotencyToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idempotency_token: Option<String>,
#[serde(rename = "imageOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_override: Option<String>,
#[serde(rename = "imagePullCredentialsTypeOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_pull_credentials_type_override: Option<String>,
#[serde(rename = "insecureSslOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub insecure_ssl_override: Option<bool>,
#[serde(rename = "logsConfigOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logs_config_override: Option<LogsConfig>,
#[serde(rename = "privilegedModeOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub privileged_mode_override: Option<bool>,
#[serde(rename = "projectName")]
pub project_name: String,
#[serde(rename = "queuedTimeoutInMinutesOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub queued_timeout_in_minutes_override: Option<i64>,
#[serde(rename = "registryCredentialOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registry_credential_override: Option<RegistryCredential>,
#[serde(rename = "reportBuildStatusOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_build_status_override: Option<bool>,
#[serde(rename = "secondaryArtifactsOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_artifacts_override: Option<Vec<ProjectArtifacts>>,
#[serde(rename = "secondarySourcesOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_sources_override: Option<Vec<ProjectSource>>,
#[serde(rename = "secondarySourcesVersionOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_sources_version_override: Option<Vec<ProjectSourceVersion>>,
#[serde(rename = "serviceRoleOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role_override: Option<String>,
#[serde(rename = "sourceAuthOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_auth_override: Option<SourceAuth>,
#[serde(rename = "sourceLocationOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_location_override: Option<String>,
#[serde(rename = "sourceTypeOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_type_override: Option<String>,
#[serde(rename = "sourceVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_version: Option<String>,
#[serde(rename = "timeoutInMinutesOverride")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_minutes_override: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct StartBuildOutput {
#[serde(rename = "build")]
#[serde(skip_serializing_if = "Option::is_none")]
pub build: Option<Build>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct StopBuildInput {
#[serde(rename = "id")]
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct StopBuildOutput {
#[serde(rename = "build")]
#[serde(skip_serializing_if = "Option::is_none")]
pub build: Option<Build>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TestCase {
#[serde(rename = "durationInNanoSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration_in_nano_seconds: Option<i64>,
#[serde(rename = "expired")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expired: Option<f64>,
#[serde(rename = "message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "prefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefix: Option<String>,
#[serde(rename = "reportArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_arn: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "testRawDataPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub test_raw_data_path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TestCaseFilter {
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TestReportSummary {
#[serde(rename = "durationInNanoSeconds")]
pub duration_in_nano_seconds: i64,
#[serde(rename = "statusCounts")]
pub status_counts: ::std::collections::HashMap<String, i64>,
#[serde(rename = "total")]
pub total: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateProjectInput {
#[serde(rename = "artifacts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub artifacts: Option<ProjectArtifacts>,
#[serde(rename = "badgeEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub badge_enabled: Option<bool>,
#[serde(rename = "cache")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache: Option<ProjectCache>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "encryptionKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_key: Option<String>,
#[serde(rename = "environment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub environment: Option<ProjectEnvironment>,
#[serde(rename = "logsConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logs_config: Option<LogsConfig>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "queuedTimeoutInMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub queued_timeout_in_minutes: Option<i64>,
#[serde(rename = "secondaryArtifacts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_artifacts: Option<Vec<ProjectArtifacts>>,
#[serde(rename = "secondarySourceVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_source_versions: Option<Vec<ProjectSourceVersion>>,
#[serde(rename = "secondarySources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_sources: Option<Vec<ProjectSource>>,
#[serde(rename = "serviceRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role: Option<String>,
#[serde(rename = "source")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<ProjectSource>,
#[serde(rename = "sourceVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_version: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "timeoutInMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_minutes: Option<i64>,
#[serde(rename = "vpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<VpcConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateProjectOutput {
#[serde(rename = "project")]
#[serde(skip_serializing_if = "Option::is_none")]
pub project: Option<Project>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateReportGroupInput {
#[serde(rename = "arn")]
pub arn: String,
#[serde(rename = "exportConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_config: Option<ReportExportConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateReportGroupOutput {
#[serde(rename = "reportGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_group: Option<ReportGroup>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateWebhookInput {
#[serde(rename = "branchFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub branch_filter: Option<String>,
#[serde(rename = "filterGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_groups: Option<Vec<Vec<WebhookFilter>>>,
#[serde(rename = "projectName")]
pub project_name: String,
#[serde(rename = "rotateSecret")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rotate_secret: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateWebhookOutput {
#[serde(rename = "webhook")]
#[serde(skip_serializing_if = "Option::is_none")]
pub webhook: Option<Webhook>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VpcConfig {
#[serde(rename = "securityGroupIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group_ids: Option<Vec<String>>,
#[serde(rename = "subnets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnets: Option<Vec<String>>,
#[serde(rename = "vpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Webhook {
#[serde(rename = "branchFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub branch_filter: Option<String>,
#[serde(rename = "filterGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_groups: Option<Vec<Vec<WebhookFilter>>>,
#[serde(rename = "lastModifiedSecret")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_secret: Option<f64>,
#[serde(rename = "payloadUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub payload_url: Option<String>,
#[serde(rename = "secret")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secret: Option<String>,
#[serde(rename = "url")]
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebhookFilter {
#[serde(rename = "excludeMatchedPattern")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exclude_matched_pattern: Option<bool>,
#[serde(rename = "pattern")]
pub pattern: String,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Debug, PartialEq)]
pub enum BatchDeleteBuildsError {
InvalidInput(String),
}
impl BatchDeleteBuildsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchDeleteBuildsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(BatchDeleteBuildsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchDeleteBuildsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchDeleteBuildsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchDeleteBuildsError {}
#[derive(Debug, PartialEq)]
pub enum BatchGetBuildsError {
InvalidInput(String),
}
impl BatchGetBuildsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchGetBuildsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(BatchGetBuildsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchGetBuildsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchGetBuildsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchGetBuildsError {}
#[derive(Debug, PartialEq)]
pub enum BatchGetProjectsError {
InvalidInput(String),
}
impl BatchGetProjectsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchGetProjectsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(BatchGetProjectsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchGetProjectsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchGetProjectsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchGetProjectsError {}
#[derive(Debug, PartialEq)]
pub enum BatchGetReportGroupsError {
InvalidInput(String),
}
impl BatchGetReportGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchGetReportGroupsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(BatchGetReportGroupsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchGetReportGroupsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchGetReportGroupsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchGetReportGroupsError {}
#[derive(Debug, PartialEq)]
pub enum BatchGetReportsError {
InvalidInput(String),
}
impl BatchGetReportsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchGetReportsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(BatchGetReportsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchGetReportsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchGetReportsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchGetReportsError {}
#[derive(Debug, PartialEq)]
pub enum CreateProjectError {
AccountLimitExceeded(String),
InvalidInput(String),
ResourceAlreadyExists(String),
}
impl CreateProjectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateProjectError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccountLimitExceededException" => {
return RusotoError::Service(CreateProjectError::AccountLimitExceeded(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(CreateProjectError::InvalidInput(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateProjectError::ResourceAlreadyExists(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateProjectError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateProjectError::AccountLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateProjectError::InvalidInput(ref cause) => write!(f, "{}", cause),
CreateProjectError::ResourceAlreadyExists(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateProjectError {}
#[derive(Debug, PartialEq)]
pub enum CreateReportGroupError {
AccountLimitExceeded(String),
InvalidInput(String),
ResourceAlreadyExists(String),
}
impl CreateReportGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateReportGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccountLimitExceededException" => {
return RusotoError::Service(CreateReportGroupError::AccountLimitExceeded(
err.msg,
))
}
"InvalidInputException" => {
return RusotoError::Service(CreateReportGroupError::InvalidInput(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateReportGroupError::ResourceAlreadyExists(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateReportGroupError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateReportGroupError::AccountLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateReportGroupError::InvalidInput(ref cause) => write!(f, "{}", cause),
CreateReportGroupError::ResourceAlreadyExists(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateReportGroupError {}
#[derive(Debug, PartialEq)]
pub enum CreateWebhookError {
InvalidInput(String),
OAuthProvider(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
}
impl CreateWebhookError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateWebhookError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(CreateWebhookError::InvalidInput(err.msg))
}
"OAuthProviderException" => {
return RusotoError::Service(CreateWebhookError::OAuthProvider(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateWebhookError::ResourceAlreadyExists(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateWebhookError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateWebhookError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateWebhookError::InvalidInput(ref cause) => write!(f, "{}", cause),
CreateWebhookError::OAuthProvider(ref cause) => write!(f, "{}", cause),
CreateWebhookError::ResourceAlreadyExists(ref cause) => write!(f, "{}", cause),
CreateWebhookError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateWebhookError {}
#[derive(Debug, PartialEq)]
pub enum DeleteProjectError {
InvalidInput(String),
}
impl DeleteProjectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteProjectError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(DeleteProjectError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteProjectError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteProjectError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteProjectError {}
#[derive(Debug, PartialEq)]
pub enum DeleteReportError {
InvalidInput(String),
}
impl DeleteReportError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteReportError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(DeleteReportError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteReportError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteReportError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteReportError {}
#[derive(Debug, PartialEq)]
pub enum DeleteReportGroupError {
InvalidInput(String),
}
impl DeleteReportGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteReportGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(DeleteReportGroupError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteReportGroupError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteReportGroupError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteReportGroupError {}
#[derive(Debug, PartialEq)]
pub enum DeleteResourcePolicyError {
InvalidInput(String),
}
impl DeleteResourcePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteResourcePolicyError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(DeleteResourcePolicyError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteResourcePolicyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteResourcePolicyError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteResourcePolicyError {}
#[derive(Debug, PartialEq)]
pub enum DeleteSourceCredentialsError {
InvalidInput(String),
ResourceNotFound(String),
}
impl DeleteSourceCredentialsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSourceCredentialsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(DeleteSourceCredentialsError::InvalidInput(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteSourceCredentialsError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteSourceCredentialsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteSourceCredentialsError::InvalidInput(ref cause) => write!(f, "{}", cause),
DeleteSourceCredentialsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteSourceCredentialsError {}
#[derive(Debug, PartialEq)]
pub enum DeleteWebhookError {
InvalidInput(String),
OAuthProvider(String),
ResourceNotFound(String),
}
impl DeleteWebhookError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteWebhookError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(DeleteWebhookError::InvalidInput(err.msg))
}
"OAuthProviderException" => {
return RusotoError::Service(DeleteWebhookError::OAuthProvider(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteWebhookError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteWebhookError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteWebhookError::InvalidInput(ref cause) => write!(f, "{}", cause),
DeleteWebhookError::OAuthProvider(ref cause) => write!(f, "{}", cause),
DeleteWebhookError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteWebhookError {}
#[derive(Debug, PartialEq)]
pub enum DescribeTestCasesError {
InvalidInput(String),
ResourceNotFound(String),
}
impl DescribeTestCasesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTestCasesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(DescribeTestCasesError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeTestCasesError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeTestCasesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeTestCasesError::InvalidInput(ref cause) => write!(f, "{}", cause),
DescribeTestCasesError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeTestCasesError {}
#[derive(Debug, PartialEq)]
pub enum GetResourcePolicyError {
InvalidInput(String),
ResourceNotFound(String),
}
impl GetResourcePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetResourcePolicyError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(GetResourcePolicyError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetResourcePolicyError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetResourcePolicyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetResourcePolicyError::InvalidInput(ref cause) => write!(f, "{}", cause),
GetResourcePolicyError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetResourcePolicyError {}
#[derive(Debug, PartialEq)]
pub enum ImportSourceCredentialsError {
AccountLimitExceeded(String),
InvalidInput(String),
ResourceAlreadyExists(String),
}
impl ImportSourceCredentialsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ImportSourceCredentialsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccountLimitExceededException" => {
return RusotoError::Service(
ImportSourceCredentialsError::AccountLimitExceeded(err.msg),
)
}
"InvalidInputException" => {
return RusotoError::Service(ImportSourceCredentialsError::InvalidInput(
err.msg,
))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(
ImportSourceCredentialsError::ResourceAlreadyExists(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ImportSourceCredentialsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ImportSourceCredentialsError::AccountLimitExceeded(ref cause) => write!(f, "{}", cause),
ImportSourceCredentialsError::InvalidInput(ref cause) => write!(f, "{}", cause),
ImportSourceCredentialsError::ResourceAlreadyExists(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for ImportSourceCredentialsError {}
#[derive(Debug, PartialEq)]
pub enum InvalidateProjectCacheError {
InvalidInput(String),
ResourceNotFound(String),
}
impl InvalidateProjectCacheError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<InvalidateProjectCacheError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(InvalidateProjectCacheError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(InvalidateProjectCacheError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for InvalidateProjectCacheError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
InvalidateProjectCacheError::InvalidInput(ref cause) => write!(f, "{}", cause),
InvalidateProjectCacheError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for InvalidateProjectCacheError {}
#[derive(Debug, PartialEq)]
pub enum ListBuildsError {
InvalidInput(String),
}
impl ListBuildsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBuildsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(ListBuildsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListBuildsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListBuildsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListBuildsError {}
#[derive(Debug, PartialEq)]
pub enum ListBuildsForProjectError {
InvalidInput(String),
ResourceNotFound(String),
}
impl ListBuildsForProjectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBuildsForProjectError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(ListBuildsForProjectError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListBuildsForProjectError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListBuildsForProjectError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListBuildsForProjectError::InvalidInput(ref cause) => write!(f, "{}", cause),
ListBuildsForProjectError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListBuildsForProjectError {}
#[derive(Debug, PartialEq)]
pub enum ListCuratedEnvironmentImagesError {}
impl ListCuratedEnvironmentImagesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListCuratedEnvironmentImagesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListCuratedEnvironmentImagesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {}
}
}
impl Error for ListCuratedEnvironmentImagesError {}
#[derive(Debug, PartialEq)]
pub enum ListProjectsError {
InvalidInput(String),
}
impl ListProjectsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListProjectsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(ListProjectsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListProjectsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListProjectsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListProjectsError {}
#[derive(Debug, PartialEq)]
pub enum ListReportGroupsError {
InvalidInput(String),
}
impl ListReportGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListReportGroupsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(ListReportGroupsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListReportGroupsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListReportGroupsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListReportGroupsError {}
#[derive(Debug, PartialEq)]
pub enum ListReportsError {
InvalidInput(String),
}
impl ListReportsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListReportsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(ListReportsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListReportsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListReportsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListReportsError {}
#[derive(Debug, PartialEq)]
pub enum ListReportsForReportGroupError {
InvalidInput(String),
ResourceNotFound(String),
}
impl ListReportsForReportGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListReportsForReportGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(ListReportsForReportGroupError::InvalidInput(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListReportsForReportGroupError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListReportsForReportGroupError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListReportsForReportGroupError::InvalidInput(ref cause) => write!(f, "{}", cause),
ListReportsForReportGroupError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListReportsForReportGroupError {}
#[derive(Debug, PartialEq)]
pub enum ListSharedProjectsError {
InvalidInput(String),
}
impl ListSharedProjectsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSharedProjectsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(ListSharedProjectsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListSharedProjectsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListSharedProjectsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListSharedProjectsError {}
#[derive(Debug, PartialEq)]
pub enum ListSharedReportGroupsError {
InvalidInput(String),
}
impl ListSharedReportGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSharedReportGroupsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(ListSharedReportGroupsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListSharedReportGroupsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListSharedReportGroupsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListSharedReportGroupsError {}
#[derive(Debug, PartialEq)]
pub enum ListSourceCredentialsError {}
impl ListSourceCredentialsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSourceCredentialsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListSourceCredentialsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {}
}
}
impl Error for ListSourceCredentialsError {}
#[derive(Debug, PartialEq)]
pub enum PutResourcePolicyError {
InvalidInput(String),
ResourceNotFound(String),
}
impl PutResourcePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutResourcePolicyError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(PutResourcePolicyError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(PutResourcePolicyError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutResourcePolicyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutResourcePolicyError::InvalidInput(ref cause) => write!(f, "{}", cause),
PutResourcePolicyError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutResourcePolicyError {}
#[derive(Debug, PartialEq)]
pub enum StartBuildError {
AccountLimitExceeded(String),
InvalidInput(String),
ResourceNotFound(String),
}
impl StartBuildError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartBuildError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccountLimitExceededException" => {
return RusotoError::Service(StartBuildError::AccountLimitExceeded(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(StartBuildError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(StartBuildError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for StartBuildError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
StartBuildError::AccountLimitExceeded(ref cause) => write!(f, "{}", cause),
StartBuildError::InvalidInput(ref cause) => write!(f, "{}", cause),
StartBuildError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for StartBuildError {}
#[derive(Debug, PartialEq)]
pub enum StopBuildError {
InvalidInput(String),
ResourceNotFound(String),
}
impl StopBuildError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopBuildError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(StopBuildError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(StopBuildError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for StopBuildError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
StopBuildError::InvalidInput(ref cause) => write!(f, "{}", cause),
StopBuildError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for StopBuildError {}
#[derive(Debug, PartialEq)]
pub enum UpdateProjectError {
InvalidInput(String),
ResourceNotFound(String),
}
impl UpdateProjectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateProjectError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(UpdateProjectError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateProjectError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateProjectError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateProjectError::InvalidInput(ref cause) => write!(f, "{}", cause),
UpdateProjectError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateProjectError {}
#[derive(Debug, PartialEq)]
pub enum UpdateReportGroupError {
InvalidInput(String),
ResourceNotFound(String),
}
impl UpdateReportGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateReportGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(UpdateReportGroupError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateReportGroupError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateReportGroupError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateReportGroupError::InvalidInput(ref cause) => write!(f, "{}", cause),
UpdateReportGroupError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateReportGroupError {}
#[derive(Debug, PartialEq)]
pub enum UpdateWebhookError {
InvalidInput(String),
OAuthProvider(String),
ResourceNotFound(String),
}
impl UpdateWebhookError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateWebhookError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInputException" => {
return RusotoError::Service(UpdateWebhookError::InvalidInput(err.msg))
}
"OAuthProviderException" => {
return RusotoError::Service(UpdateWebhookError::OAuthProvider(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateWebhookError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateWebhookError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateWebhookError::InvalidInput(ref cause) => write!(f, "{}", cause),
UpdateWebhookError::OAuthProvider(ref cause) => write!(f, "{}", cause),
UpdateWebhookError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateWebhookError {}
#[async_trait]
pub trait CodeBuild {
async fn batch_delete_builds(
&self,
input: BatchDeleteBuildsInput,
) -> Result<BatchDeleteBuildsOutput, RusotoError<BatchDeleteBuildsError>>;
async fn batch_get_builds(
&self,
input: BatchGetBuildsInput,
) -> Result<BatchGetBuildsOutput, RusotoError<BatchGetBuildsError>>;
async fn batch_get_projects(
&self,
input: BatchGetProjectsInput,
) -> Result<BatchGetProjectsOutput, RusotoError<BatchGetProjectsError>>;
async fn batch_get_report_groups(
&self,
input: BatchGetReportGroupsInput,
) -> Result<BatchGetReportGroupsOutput, RusotoError<BatchGetReportGroupsError>>;
async fn batch_get_reports(
&self,
input: BatchGetReportsInput,
) -> Result<BatchGetReportsOutput, RusotoError<BatchGetReportsError>>;
async fn create_project(
&self,
input: CreateProjectInput,
) -> Result<CreateProjectOutput, RusotoError<CreateProjectError>>;
async fn create_report_group(
&self,
input: CreateReportGroupInput,
) -> Result<CreateReportGroupOutput, RusotoError<CreateReportGroupError>>;
async fn create_webhook(
&self,
input: CreateWebhookInput,
) -> Result<CreateWebhookOutput, RusotoError<CreateWebhookError>>;
async fn delete_project(
&self,
input: DeleteProjectInput,
) -> Result<DeleteProjectOutput, RusotoError<DeleteProjectError>>;
async fn delete_report(
&self,
input: DeleteReportInput,
) -> Result<DeleteReportOutput, RusotoError<DeleteReportError>>;
async fn delete_report_group(
&self,
input: DeleteReportGroupInput,
) -> Result<DeleteReportGroupOutput, RusotoError<DeleteReportGroupError>>;
async fn delete_resource_policy(
&self,
input: DeleteResourcePolicyInput,
) -> Result<DeleteResourcePolicyOutput, RusotoError<DeleteResourcePolicyError>>;
async fn delete_source_credentials(
&self,
input: DeleteSourceCredentialsInput,
) -> Result<DeleteSourceCredentialsOutput, RusotoError<DeleteSourceCredentialsError>>;
async fn delete_webhook(
&self,
input: DeleteWebhookInput,
) -> Result<DeleteWebhookOutput, RusotoError<DeleteWebhookError>>;
async fn describe_test_cases(
&self,
input: DescribeTestCasesInput,
) -> Result<DescribeTestCasesOutput, RusotoError<DescribeTestCasesError>>;
async fn get_resource_policy(
&self,
input: GetResourcePolicyInput,
) -> Result<GetResourcePolicyOutput, RusotoError<GetResourcePolicyError>>;
async fn import_source_credentials(
&self,
input: ImportSourceCredentialsInput,
) -> Result<ImportSourceCredentialsOutput, RusotoError<ImportSourceCredentialsError>>;
async fn invalidate_project_cache(
&self,
input: InvalidateProjectCacheInput,
) -> Result<InvalidateProjectCacheOutput, RusotoError<InvalidateProjectCacheError>>;
async fn list_builds(
&self,
input: ListBuildsInput,
) -> Result<ListBuildsOutput, RusotoError<ListBuildsError>>;
async fn list_builds_for_project(
&self,
input: ListBuildsForProjectInput,
) -> Result<ListBuildsForProjectOutput, RusotoError<ListBuildsForProjectError>>;
async fn list_curated_environment_images(
&self,
) -> Result<ListCuratedEnvironmentImagesOutput, RusotoError<ListCuratedEnvironmentImagesError>>;
async fn list_projects(
&self,
input: ListProjectsInput,
) -> Result<ListProjectsOutput, RusotoError<ListProjectsError>>;
async fn list_report_groups(
&self,
input: ListReportGroupsInput,
) -> Result<ListReportGroupsOutput, RusotoError<ListReportGroupsError>>;
async fn list_reports(
&self,
input: ListReportsInput,
) -> Result<ListReportsOutput, RusotoError<ListReportsError>>;
async fn list_reports_for_report_group(
&self,
input: ListReportsForReportGroupInput,
) -> Result<ListReportsForReportGroupOutput, RusotoError<ListReportsForReportGroupError>>;
async fn list_shared_projects(
&self,
input: ListSharedProjectsInput,
) -> Result<ListSharedProjectsOutput, RusotoError<ListSharedProjectsError>>;
async fn list_shared_report_groups(
&self,
input: ListSharedReportGroupsInput,
) -> Result<ListSharedReportGroupsOutput, RusotoError<ListSharedReportGroupsError>>;
async fn list_source_credentials(
&self,
) -> Result<ListSourceCredentialsOutput, RusotoError<ListSourceCredentialsError>>;
async fn put_resource_policy(
&self,
input: PutResourcePolicyInput,
) -> Result<PutResourcePolicyOutput, RusotoError<PutResourcePolicyError>>;
async fn start_build(
&self,
input: StartBuildInput,
) -> Result<StartBuildOutput, RusotoError<StartBuildError>>;
async fn stop_build(
&self,
input: StopBuildInput,
) -> Result<StopBuildOutput, RusotoError<StopBuildError>>;
async fn update_project(
&self,
input: UpdateProjectInput,
) -> Result<UpdateProjectOutput, RusotoError<UpdateProjectError>>;
async fn update_report_group(
&self,
input: UpdateReportGroupInput,
) -> Result<UpdateReportGroupOutput, RusotoError<UpdateReportGroupError>>;
async fn update_webhook(
&self,
input: UpdateWebhookInput,
) -> Result<UpdateWebhookOutput, RusotoError<UpdateWebhookError>>;
}
#[derive(Clone)]
pub struct CodeBuildClient {
client: Client,
region: region::Region,
}
impl CodeBuildClient {
pub fn new(region: region::Region) -> CodeBuildClient {
CodeBuildClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> CodeBuildClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
D: DispatchSignedRequest + Send + Sync + 'static,
{
CodeBuildClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
pub fn new_with_client(client: Client, region: region::Region) -> CodeBuildClient {
CodeBuildClient { client, region }
}
}
#[async_trait]
impl CodeBuild for CodeBuildClient {
async fn batch_delete_builds(
&self,
input: BatchDeleteBuildsInput,
) -> Result<BatchDeleteBuildsOutput, RusotoError<BatchDeleteBuildsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.BatchDeleteBuilds");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<BatchDeleteBuildsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(BatchDeleteBuildsError::from_response(response))
}
}
async fn batch_get_builds(
&self,
input: BatchGetBuildsInput,
) -> Result<BatchGetBuildsOutput, RusotoError<BatchGetBuildsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.BatchGetBuilds");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<BatchGetBuildsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(BatchGetBuildsError::from_response(response))
}
}
async fn batch_get_projects(
&self,
input: BatchGetProjectsInput,
) -> Result<BatchGetProjectsOutput, RusotoError<BatchGetProjectsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.BatchGetProjects");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<BatchGetProjectsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(BatchGetProjectsError::from_response(response))
}
}
async fn batch_get_report_groups(
&self,
input: BatchGetReportGroupsInput,
) -> Result<BatchGetReportGroupsOutput, RusotoError<BatchGetReportGroupsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.BatchGetReportGroups");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<BatchGetReportGroupsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(BatchGetReportGroupsError::from_response(response))
}
}
async fn batch_get_reports(
&self,
input: BatchGetReportsInput,
) -> Result<BatchGetReportsOutput, RusotoError<BatchGetReportsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.BatchGetReports");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<BatchGetReportsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(BatchGetReportsError::from_response(response))
}
}
async fn create_project(
&self,
input: CreateProjectInput,
) -> Result<CreateProjectOutput, RusotoError<CreateProjectError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.CreateProject");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<CreateProjectOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(CreateProjectError::from_response(response))
}
}
async fn create_report_group(
&self,
input: CreateReportGroupInput,
) -> Result<CreateReportGroupOutput, RusotoError<CreateReportGroupError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.CreateReportGroup");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<CreateReportGroupOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(CreateReportGroupError::from_response(response))
}
}
async fn create_webhook(
&self,
input: CreateWebhookInput,
) -> Result<CreateWebhookOutput, RusotoError<CreateWebhookError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.CreateWebhook");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<CreateWebhookOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(CreateWebhookError::from_response(response))
}
}
async fn delete_project(
&self,
input: DeleteProjectInput,
) -> Result<DeleteProjectOutput, RusotoError<DeleteProjectError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.DeleteProject");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<DeleteProjectOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(DeleteProjectError::from_response(response))
}
}
async fn delete_report(
&self,
input: DeleteReportInput,
) -> Result<DeleteReportOutput, RusotoError<DeleteReportError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.DeleteReport");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<DeleteReportOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(DeleteReportError::from_response(response))
}
}
async fn delete_report_group(
&self,
input: DeleteReportGroupInput,
) -> Result<DeleteReportGroupOutput, RusotoError<DeleteReportGroupError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.DeleteReportGroup");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<DeleteReportGroupOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(DeleteReportGroupError::from_response(response))
}
}
async fn delete_resource_policy(
&self,
input: DeleteResourcePolicyInput,
) -> Result<DeleteResourcePolicyOutput, RusotoError<DeleteResourcePolicyError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.DeleteResourcePolicy");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteResourcePolicyOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(DeleteResourcePolicyError::from_response(response))
}
}
async fn delete_source_credentials(
&self,
input: DeleteSourceCredentialsInput,
) -> Result<DeleteSourceCredentialsOutput, RusotoError<DeleteSourceCredentialsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.DeleteSourceCredentials");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteSourceCredentialsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(DeleteSourceCredentialsError::from_response(response))
}
}
async fn delete_webhook(
&self,
input: DeleteWebhookInput,
) -> Result<DeleteWebhookOutput, RusotoError<DeleteWebhookError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.DeleteWebhook");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<DeleteWebhookOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(DeleteWebhookError::from_response(response))
}
}
async fn describe_test_cases(
&self,
input: DescribeTestCasesInput,
) -> Result<DescribeTestCasesOutput, RusotoError<DescribeTestCasesError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.DescribeTestCases");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<DescribeTestCasesOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(DescribeTestCasesError::from_response(response))
}
}
async fn get_resource_policy(
&self,
input: GetResourcePolicyInput,
) -> Result<GetResourcePolicyOutput, RusotoError<GetResourcePolicyError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.GetResourcePolicy");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<GetResourcePolicyOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(GetResourcePolicyError::from_response(response))
}
}
async fn import_source_credentials(
&self,
input: ImportSourceCredentialsInput,
) -> Result<ImportSourceCredentialsOutput, RusotoError<ImportSourceCredentialsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.ImportSourceCredentials");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<ImportSourceCredentialsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ImportSourceCredentialsError::from_response(response))
}
}
async fn invalidate_project_cache(
&self,
input: InvalidateProjectCacheInput,
) -> Result<InvalidateProjectCacheOutput, RusotoError<InvalidateProjectCacheError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.InvalidateProjectCache");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<InvalidateProjectCacheOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(InvalidateProjectCacheError::from_response(response))
}
}
async fn list_builds(
&self,
input: ListBuildsInput,
) -> Result<ListBuildsOutput, RusotoError<ListBuildsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.ListBuilds");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<ListBuildsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ListBuildsError::from_response(response))
}
}
async fn list_builds_for_project(
&self,
input: ListBuildsForProjectInput,
) -> Result<ListBuildsForProjectOutput, RusotoError<ListBuildsForProjectError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.ListBuildsForProject");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<ListBuildsForProjectOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ListBuildsForProjectError::from_response(response))
}
}
async fn list_curated_environment_images(
&self,
) -> Result<ListCuratedEnvironmentImagesOutput, RusotoError<ListCuratedEnvironmentImagesError>>
{
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeBuild_20161006.ListCuratedEnvironmentImages",
);
request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<ListCuratedEnvironmentImagesOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ListCuratedEnvironmentImagesError::from_response(response))
}
}
async fn list_projects(
&self,
input: ListProjectsInput,
) -> Result<ListProjectsOutput, RusotoError<ListProjectsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.ListProjects");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<ListProjectsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ListProjectsError::from_response(response))
}
}
async fn list_report_groups(
&self,
input: ListReportGroupsInput,
) -> Result<ListReportGroupsOutput, RusotoError<ListReportGroupsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.ListReportGroups");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<ListReportGroupsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ListReportGroupsError::from_response(response))
}
}
async fn list_reports(
&self,
input: ListReportsInput,
) -> Result<ListReportsOutput, RusotoError<ListReportsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.ListReports");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<ListReportsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ListReportsError::from_response(response))
}
}
async fn list_reports_for_report_group(
&self,
input: ListReportsForReportGroupInput,
) -> Result<ListReportsForReportGroupOutput, RusotoError<ListReportsForReportGroupError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeBuild_20161006.ListReportsForReportGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<ListReportsForReportGroupOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ListReportsForReportGroupError::from_response(response))
}
}
async fn list_shared_projects(
&self,
input: ListSharedProjectsInput,
) -> Result<ListSharedProjectsOutput, RusotoError<ListSharedProjectsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.ListSharedProjects");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<ListSharedProjectsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ListSharedProjectsError::from_response(response))
}
}
async fn list_shared_report_groups(
&self,
input: ListSharedReportGroupsInput,
) -> Result<ListSharedReportGroupsOutput, RusotoError<ListSharedReportGroupsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.ListSharedReportGroups");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<ListSharedReportGroupsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ListSharedReportGroupsError::from_response(response))
}
}
async fn list_source_credentials(
&self,
) -> Result<ListSourceCredentialsOutput, RusotoError<ListSourceCredentialsError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.ListSourceCredentials");
request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response)
.deserialize::<ListSourceCredentialsOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(ListSourceCredentialsError::from_response(response))
}
}
async fn put_resource_policy(
&self,
input: PutResourcePolicyInput,
) -> Result<PutResourcePolicyOutput, RusotoError<PutResourcePolicyError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.PutResourcePolicy");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<PutResourcePolicyOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(PutResourcePolicyError::from_response(response))
}
}
async fn start_build(
&self,
input: StartBuildInput,
) -> Result<StartBuildOutput, RusotoError<StartBuildError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.StartBuild");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<StartBuildOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(StartBuildError::from_response(response))
}
}
async fn stop_build(
&self,
input: StopBuildInput,
) -> Result<StopBuildOutput, RusotoError<StopBuildError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.StopBuild");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<StopBuildOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(StopBuildError::from_response(response))
}
}
async fn update_project(
&self,
input: UpdateProjectInput,
) -> Result<UpdateProjectOutput, RusotoError<UpdateProjectError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.UpdateProject");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<UpdateProjectOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(UpdateProjectError::from_response(response))
}
}
async fn update_report_group(
&self,
input: UpdateReportGroupInput,
) -> Result<UpdateReportGroupOutput, RusotoError<UpdateReportGroupError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.UpdateReportGroup");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<UpdateReportGroupOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(UpdateReportGroupError::from_response(response))
}
}
async fn update_webhook(
&self,
input: UpdateWebhookInput,
) -> Result<UpdateWebhookOutput, RusotoError<UpdateWebhookError>> {
let mut request = SignedRequest::new("POST", "codebuild", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeBuild_20161006.UpdateWebhook");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
proto::json::ResponsePayload::new(&response).deserialize::<UpdateWebhookOutput, _>()
} else {
let try_response = response.buffer().await;
let response = try_response.map_err(RusotoError::HttpDispatch)?;
Err(UpdateWebhookError::from_response(response))
}
}
}