use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchGetRepositoriesInput {
#[serde(rename = "repositoryNames")]
pub repository_names: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchGetRepositoriesOutput {
#[serde(rename = "repositories")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repositories: Option<Vec<RepositoryMetadata>>,
#[serde(rename = "repositoriesNotFound")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repositories_not_found: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BlobMetadata {
#[serde(rename = "blobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub blob_id: Option<String>,
#[serde(rename = "mode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mode: Option<String>,
#[serde(rename = "path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BranchInfo {
#[serde(rename = "branchName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub branch_name: Option<String>,
#[serde(rename = "commitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub commit_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Comment {
#[serde(rename = "authorArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub author_arn: Option<String>,
#[serde(rename = "clientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "commentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment_id: Option<String>,
#[serde(rename = "content")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "deleted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deleted: Option<bool>,
#[serde(rename = "inReplyTo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub in_reply_to: Option<String>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CommentsForComparedCommit {
#[serde(rename = "afterBlobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_blob_id: Option<String>,
#[serde(rename = "afterCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_commit_id: Option<String>,
#[serde(rename = "beforeBlobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_blob_id: Option<String>,
#[serde(rename = "beforeCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_commit_id: Option<String>,
#[serde(rename = "comments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comments: Option<Vec<Comment>>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<Location>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CommentsForPullRequest {
#[serde(rename = "afterBlobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_blob_id: Option<String>,
#[serde(rename = "afterCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_commit_id: Option<String>,
#[serde(rename = "beforeBlobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_blob_id: Option<String>,
#[serde(rename = "beforeCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_commit_id: Option<String>,
#[serde(rename = "comments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comments: Option<Vec<Comment>>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<Location>,
#[serde(rename = "pullRequestId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_id: Option<String>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Commit {
#[serde(rename = "additionalData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_data: Option<String>,
#[serde(rename = "author")]
#[serde(skip_serializing_if = "Option::is_none")]
pub author: Option<UserInfo>,
#[serde(rename = "commitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub commit_id: Option<String>,
#[serde(rename = "committer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub committer: Option<UserInfo>,
#[serde(rename = "message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "parents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parents: Option<Vec<String>>,
#[serde(rename = "treeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tree_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateBranchInput {
#[serde(rename = "branchName")]
pub branch_name: String,
#[serde(rename = "commitId")]
pub commit_id: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateCommitInput {
#[serde(rename = "authorName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub author_name: Option<String>,
#[serde(rename = "branchName")]
pub branch_name: String,
#[serde(rename = "commitMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub commit_message: Option<String>,
#[serde(rename = "deleteFiles")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_files: Option<Vec<DeleteFileEntry>>,
#[serde(rename = "email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "keepEmptyFolders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub keep_empty_folders: Option<bool>,
#[serde(rename = "parentCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_commit_id: Option<String>,
#[serde(rename = "putFiles")]
#[serde(skip_serializing_if = "Option::is_none")]
pub put_files: Option<Vec<PutFileEntry>>,
#[serde(rename = "repositoryName")]
pub repository_name: String,
#[serde(rename = "setFileModes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub set_file_modes: Option<Vec<SetFileModeEntry>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateCommitOutput {
#[serde(rename = "commitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub commit_id: Option<String>,
#[serde(rename = "filesAdded")]
#[serde(skip_serializing_if = "Option::is_none")]
pub files_added: Option<Vec<FileMetadata>>,
#[serde(rename = "filesDeleted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub files_deleted: Option<Vec<FileMetadata>>,
#[serde(rename = "filesUpdated")]
#[serde(skip_serializing_if = "Option::is_none")]
pub files_updated: Option<Vec<FileMetadata>>,
#[serde(rename = "treeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tree_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreatePullRequestInput {
#[serde(rename = "clientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "targets")]
pub targets: Vec<Target>,
#[serde(rename = "title")]
pub title: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreatePullRequestOutput {
#[serde(rename = "pullRequest")]
pub pull_request: PullRequest,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateRepositoryInput {
#[serde(rename = "repositoryDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_description: Option<String>,
#[serde(rename = "repositoryName")]
pub repository_name: String,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateRepositoryOutput {
#[serde(rename = "repositoryMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_metadata: Option<RepositoryMetadata>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteBranchInput {
#[serde(rename = "branchName")]
pub branch_name: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteBranchOutput {
#[serde(rename = "deletedBranch")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deleted_branch: Option<BranchInfo>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteCommentContentInput {
#[serde(rename = "commentId")]
pub comment_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteCommentContentOutput {
#[serde(rename = "comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<Comment>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteFileEntry {
#[serde(rename = "filePath")]
pub file_path: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteFileInput {
#[serde(rename = "branchName")]
pub branch_name: String,
#[serde(rename = "commitMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub commit_message: Option<String>,
#[serde(rename = "email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "filePath")]
pub file_path: String,
#[serde(rename = "keepEmptyFolders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub keep_empty_folders: Option<bool>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "parentCommitId")]
pub parent_commit_id: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteFileOutput {
#[serde(rename = "blobId")]
pub blob_id: String,
#[serde(rename = "commitId")]
pub commit_id: String,
#[serde(rename = "filePath")]
pub file_path: String,
#[serde(rename = "treeId")]
pub tree_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteRepositoryInput {
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteRepositoryOutput {
#[serde(rename = "repositoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribePullRequestEventsInput {
#[serde(rename = "actorArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub actor_arn: Option<String>,
#[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 = "pullRequestEventType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_event_type: Option<String>,
#[serde(rename = "pullRequestId")]
pub pull_request_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribePullRequestEventsOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "pullRequestEvents")]
pub pull_request_events: Vec<PullRequestEvent>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Difference {
#[serde(rename = "afterBlob")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_blob: Option<BlobMetadata>,
#[serde(rename = "beforeBlob")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_blob: Option<BlobMetadata>,
#[serde(rename = "changeType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub change_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct File {
#[serde(rename = "absolutePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub absolute_path: Option<String>,
#[serde(rename = "blobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub blob_id: Option<String>,
#[serde(rename = "fileMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_mode: Option<String>,
#[serde(rename = "relativePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub relative_path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FileMetadata {
#[serde(rename = "absolutePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub absolute_path: Option<String>,
#[serde(rename = "blobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub blob_id: Option<String>,
#[serde(rename = "fileMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_mode: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Folder {
#[serde(rename = "absolutePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub absolute_path: Option<String>,
#[serde(rename = "relativePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub relative_path: Option<String>,
#[serde(rename = "treeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tree_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetBlobInput {
#[serde(rename = "blobId")]
pub blob_id: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetBlobOutput {
#[serde(rename = "content")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
pub content: bytes::Bytes,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetBranchInput {
#[serde(rename = "branchName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub branch_name: Option<String>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetBranchOutput {
#[serde(rename = "branch")]
#[serde(skip_serializing_if = "Option::is_none")]
pub branch: Option<BranchInfo>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetCommentInput {
#[serde(rename = "commentId")]
pub comment_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetCommentOutput {
#[serde(rename = "comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<Comment>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetCommentsForComparedCommitInput {
#[serde(rename = "afterCommitId")]
pub after_commit_id: String,
#[serde(rename = "beforeCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_commit_id: Option<String>,
#[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 = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetCommentsForComparedCommitOutput {
#[serde(rename = "commentsForComparedCommitData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comments_for_compared_commit_data: Option<Vec<CommentsForComparedCommit>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetCommentsForPullRequestInput {
#[serde(rename = "afterCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_commit_id: Option<String>,
#[serde(rename = "beforeCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_commit_id: Option<String>,
#[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 = "pullRequestId")]
pub pull_request_id: String,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetCommentsForPullRequestOutput {
#[serde(rename = "commentsForPullRequestData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comments_for_pull_request_data: Option<Vec<CommentsForPullRequest>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetCommitInput {
#[serde(rename = "commitId")]
pub commit_id: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetCommitOutput {
#[serde(rename = "commit")]
pub commit: Commit,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDifferencesInput {
#[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 = "afterCommitSpecifier")]
pub after_commit_specifier: String,
#[serde(rename = "afterPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_path: Option<String>,
#[serde(rename = "beforeCommitSpecifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_commit_specifier: Option<String>,
#[serde(rename = "beforePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_path: Option<String>,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDifferencesOutput {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "differences")]
#[serde(skip_serializing_if = "Option::is_none")]
pub differences: Option<Vec<Difference>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetFileInput {
#[serde(rename = "commitSpecifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub commit_specifier: Option<String>,
#[serde(rename = "filePath")]
pub file_path: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetFileOutput {
#[serde(rename = "blobId")]
pub blob_id: String,
#[serde(rename = "commitId")]
pub commit_id: String,
#[serde(rename = "fileContent")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
pub file_content: bytes::Bytes,
#[serde(rename = "fileMode")]
pub file_mode: String,
#[serde(rename = "filePath")]
pub file_path: String,
#[serde(rename = "fileSize")]
pub file_size: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetFolderInput {
#[serde(rename = "commitSpecifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub commit_specifier: Option<String>,
#[serde(rename = "folderPath")]
pub folder_path: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetFolderOutput {
#[serde(rename = "commitId")]
pub commit_id: String,
#[serde(rename = "files")]
#[serde(skip_serializing_if = "Option::is_none")]
pub files: Option<Vec<File>>,
#[serde(rename = "folderPath")]
pub folder_path: String,
#[serde(rename = "subFolders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sub_folders: Option<Vec<Folder>>,
#[serde(rename = "subModules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sub_modules: Option<Vec<SubModule>>,
#[serde(rename = "symbolicLinks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub symbolic_links: Option<Vec<SymbolicLink>>,
#[serde(rename = "treeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tree_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetMergeConflictsInput {
#[serde(rename = "destinationCommitSpecifier")]
pub destination_commit_specifier: String,
#[serde(rename = "mergeOption")]
pub merge_option: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
#[serde(rename = "sourceCommitSpecifier")]
pub source_commit_specifier: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetMergeConflictsOutput {
#[serde(rename = "destinationCommitId")]
pub destination_commit_id: String,
#[serde(rename = "mergeable")]
pub mergeable: bool,
#[serde(rename = "sourceCommitId")]
pub source_commit_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetPullRequestInput {
#[serde(rename = "pullRequestId")]
pub pull_request_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetPullRequestOutput {
#[serde(rename = "pullRequest")]
pub pull_request: PullRequest,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetRepositoryInput {
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetRepositoryOutput {
#[serde(rename = "repositoryMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_metadata: Option<RepositoryMetadata>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetRepositoryTriggersInput {
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetRepositoryTriggersOutput {
#[serde(rename = "configurationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configuration_id: Option<String>,
#[serde(rename = "triggers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub triggers: Option<Vec<RepositoryTrigger>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListBranchesInput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListBranchesOutput {
#[serde(rename = "branches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub branches: Option<Vec<String>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListPullRequestsInput {
#[serde(rename = "authorArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub author_arn: Option<String>,
#[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 = "pullRequestStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_status: Option<String>,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListPullRequestsOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "pullRequestIds")]
pub pull_request_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListRepositoriesInput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "order")]
#[serde(skip_serializing_if = "Option::is_none")]
pub order: Option<String>,
#[serde(rename = "sortBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_by: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListRepositoriesOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "repositories")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repositories: Option<Vec<RepositoryNameIdPair>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceInput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "resourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Location {
#[serde(rename = "filePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_path: Option<String>,
#[serde(rename = "filePosition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_position: Option<i64>,
#[serde(rename = "relativeFileVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub relative_file_version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct MergeMetadata {
#[serde(rename = "isMerged")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_merged: Option<bool>,
#[serde(rename = "mergedBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub merged_by: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct MergePullRequestByFastForwardInput {
#[serde(rename = "pullRequestId")]
pub pull_request_id: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
#[serde(rename = "sourceCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_commit_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct MergePullRequestByFastForwardOutput {
#[serde(rename = "pullRequest")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request: Option<PullRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PostCommentForComparedCommitInput {
#[serde(rename = "afterCommitId")]
pub after_commit_id: String,
#[serde(rename = "beforeCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_commit_id: Option<String>,
#[serde(rename = "clientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "content")]
pub content: String,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<Location>,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PostCommentForComparedCommitOutput {
#[serde(rename = "afterBlobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_blob_id: Option<String>,
#[serde(rename = "afterCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_commit_id: Option<String>,
#[serde(rename = "beforeBlobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_blob_id: Option<String>,
#[serde(rename = "beforeCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_commit_id: Option<String>,
#[serde(rename = "comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<Comment>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<Location>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PostCommentForPullRequestInput {
#[serde(rename = "afterCommitId")]
pub after_commit_id: String,
#[serde(rename = "beforeCommitId")]
pub before_commit_id: String,
#[serde(rename = "clientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "content")]
pub content: String,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<Location>,
#[serde(rename = "pullRequestId")]
pub pull_request_id: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PostCommentForPullRequestOutput {
#[serde(rename = "afterBlobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_blob_id: Option<String>,
#[serde(rename = "afterCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_commit_id: Option<String>,
#[serde(rename = "beforeBlobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_blob_id: Option<String>,
#[serde(rename = "beforeCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_commit_id: Option<String>,
#[serde(rename = "comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<Comment>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<Location>,
#[serde(rename = "pullRequestId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_id: Option<String>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PostCommentReplyInput {
#[serde(rename = "clientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "content")]
pub content: String,
#[serde(rename = "inReplyTo")]
pub in_reply_to: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PostCommentReplyOutput {
#[serde(rename = "comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<Comment>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PullRequest {
#[serde(rename = "authorArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub author_arn: Option<String>,
#[serde(rename = "clientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "lastActivityDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_activity_date: Option<f64>,
#[serde(rename = "pullRequestId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_id: Option<String>,
#[serde(rename = "pullRequestStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_status: Option<String>,
#[serde(rename = "pullRequestTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_targets: Option<Vec<PullRequestTarget>>,
#[serde(rename = "title")]
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PullRequestCreatedEventMetadata {
#[serde(rename = "destinationCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_commit_id: Option<String>,
#[serde(rename = "mergeBase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub merge_base: Option<String>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
#[serde(rename = "sourceCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_commit_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PullRequestEvent {
#[serde(rename = "actorArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub actor_arn: Option<String>,
#[serde(rename = "eventDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_date: Option<f64>,
#[serde(rename = "pullRequestCreatedEventMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_created_event_metadata: Option<PullRequestCreatedEventMetadata>,
#[serde(rename = "pullRequestEventType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_event_type: Option<String>,
#[serde(rename = "pullRequestId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_id: Option<String>,
#[serde(rename = "pullRequestMergedStateChangedEventMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_merged_state_changed_event_metadata:
Option<PullRequestMergedStateChangedEventMetadata>,
#[serde(rename = "pullRequestSourceReferenceUpdatedEventMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_source_reference_updated_event_metadata:
Option<PullRequestSourceReferenceUpdatedEventMetadata>,
#[serde(rename = "pullRequestStatusChangedEventMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_status_changed_event_metadata: Option<PullRequestStatusChangedEventMetadata>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PullRequestMergedStateChangedEventMetadata {
#[serde(rename = "destinationReference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_reference: Option<String>,
#[serde(rename = "mergeMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub merge_metadata: Option<MergeMetadata>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PullRequestSourceReferenceUpdatedEventMetadata {
#[serde(rename = "afterCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub after_commit_id: Option<String>,
#[serde(rename = "beforeCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub before_commit_id: Option<String>,
#[serde(rename = "mergeBase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub merge_base: Option<String>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PullRequestStatusChangedEventMetadata {
#[serde(rename = "pullRequestStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PullRequestTarget {
#[serde(rename = "destinationCommit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_commit: Option<String>,
#[serde(rename = "destinationReference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_reference: Option<String>,
#[serde(rename = "mergeBase")]
#[serde(skip_serializing_if = "Option::is_none")]
pub merge_base: Option<String>,
#[serde(rename = "mergeMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub merge_metadata: Option<MergeMetadata>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
#[serde(rename = "sourceCommit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_commit: Option<String>,
#[serde(rename = "sourceReference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_reference: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutFileEntry {
#[serde(rename = "fileContent")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_content: Option<bytes::Bytes>,
#[serde(rename = "fileMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_mode: Option<String>,
#[serde(rename = "filePath")]
pub file_path: String,
#[serde(rename = "sourceFile")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_file: Option<SourceFileSpecifier>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutFileInput {
#[serde(rename = "branchName")]
pub branch_name: String,
#[serde(rename = "commitMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub commit_message: Option<String>,
#[serde(rename = "email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "fileContent")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
pub file_content: bytes::Bytes,
#[serde(rename = "fileMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_mode: Option<String>,
#[serde(rename = "filePath")]
pub file_path: String,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "parentCommitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_commit_id: Option<String>,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutFileOutput {
#[serde(rename = "blobId")]
pub blob_id: String,
#[serde(rename = "commitId")]
pub commit_id: String,
#[serde(rename = "treeId")]
pub tree_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutRepositoryTriggersInput {
#[serde(rename = "repositoryName")]
pub repository_name: String,
#[serde(rename = "triggers")]
pub triggers: Vec<RepositoryTrigger>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutRepositoryTriggersOutput {
#[serde(rename = "configurationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configuration_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RepositoryMetadata {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "accountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "cloneUrlHttp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub clone_url_http: Option<String>,
#[serde(rename = "cloneUrlSsh")]
#[serde(skip_serializing_if = "Option::is_none")]
pub clone_url_ssh: Option<String>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "defaultBranch")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_branch: Option<String>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "repositoryDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_description: Option<String>,
#[serde(rename = "repositoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_id: Option<String>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RepositoryNameIdPair {
#[serde(rename = "repositoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_id: Option<String>,
#[serde(rename = "repositoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RepositoryTrigger {
#[serde(rename = "branches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub branches: Option<Vec<String>>,
#[serde(rename = "customData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_data: Option<String>,
#[serde(rename = "destinationArn")]
pub destination_arn: String,
#[serde(rename = "events")]
pub events: Vec<String>,
#[serde(rename = "name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RepositoryTriggerExecutionFailure {
#[serde(rename = "failureMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failure_message: Option<String>,
#[serde(rename = "trigger")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trigger: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetFileModeEntry {
#[serde(rename = "fileMode")]
pub file_mode: String,
#[serde(rename = "filePath")]
pub file_path: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SourceFileSpecifier {
#[serde(rename = "filePath")]
pub file_path: String,
#[serde(rename = "isMove")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_move: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SubModule {
#[serde(rename = "absolutePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub absolute_path: Option<String>,
#[serde(rename = "commitId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub commit_id: Option<String>,
#[serde(rename = "relativePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub relative_path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SymbolicLink {
#[serde(rename = "absolutePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub absolute_path: Option<String>,
#[serde(rename = "blobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub blob_id: Option<String>,
#[serde(rename = "fileMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_mode: Option<String>,
#[serde(rename = "relativePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub relative_path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TagResourceInput {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tags")]
pub tags: ::std::collections::HashMap<String, String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct Target {
#[serde(rename = "destinationReference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_reference: Option<String>,
#[serde(rename = "repositoryName")]
pub repository_name: String,
#[serde(rename = "sourceReference")]
pub source_reference: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TestRepositoryTriggersInput {
#[serde(rename = "repositoryName")]
pub repository_name: String,
#[serde(rename = "triggers")]
pub triggers: Vec<RepositoryTrigger>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TestRepositoryTriggersOutput {
#[serde(rename = "failedExecutions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_executions: Option<Vec<RepositoryTriggerExecutionFailure>>,
#[serde(rename = "successfulExecutions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub successful_executions: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UntagResourceInput {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateCommentInput {
#[serde(rename = "commentId")]
pub comment_id: String,
#[serde(rename = "content")]
pub content: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateCommentOutput {
#[serde(rename = "comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<Comment>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDefaultBranchInput {
#[serde(rename = "defaultBranchName")]
pub default_branch_name: String,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdatePullRequestDescriptionInput {
#[serde(rename = "description")]
pub description: String,
#[serde(rename = "pullRequestId")]
pub pull_request_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdatePullRequestDescriptionOutput {
#[serde(rename = "pullRequest")]
pub pull_request: PullRequest,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdatePullRequestStatusInput {
#[serde(rename = "pullRequestId")]
pub pull_request_id: String,
#[serde(rename = "pullRequestStatus")]
pub pull_request_status: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdatePullRequestStatusOutput {
#[serde(rename = "pullRequest")]
pub pull_request: PullRequest,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdatePullRequestTitleInput {
#[serde(rename = "pullRequestId")]
pub pull_request_id: String,
#[serde(rename = "title")]
pub title: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdatePullRequestTitleOutput {
#[serde(rename = "pullRequest")]
pub pull_request: PullRequest,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateRepositoryDescriptionInput {
#[serde(rename = "repositoryDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub repository_description: Option<String>,
#[serde(rename = "repositoryName")]
pub repository_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateRepositoryNameInput {
#[serde(rename = "newName")]
pub new_name: String,
#[serde(rename = "oldName")]
pub old_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UserInfo {
#[serde(rename = "date")]
#[serde(skip_serializing_if = "Option::is_none")]
pub date: Option<String>,
#[serde(rename = "email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum BatchGetRepositoriesError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidRepositoryName(String),
MaximumRepositoryNamesExceeded(String),
RepositoryNamesRequired(String),
}
impl BatchGetRepositoriesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchGetRepositoriesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
BatchGetRepositoriesError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
BatchGetRepositoriesError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(BatchGetRepositoriesError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(BatchGetRepositoriesError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
BatchGetRepositoriesError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(BatchGetRepositoriesError::InvalidRepositoryName(
err.msg,
))
}
"MaximumRepositoryNamesExceededException" => {
return RusotoError::Service(
BatchGetRepositoriesError::MaximumRepositoryNamesExceeded(err.msg),
)
}
"RepositoryNamesRequiredException" => {
return RusotoError::Service(
BatchGetRepositoriesError::RepositoryNamesRequired(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for BatchGetRepositoriesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchGetRepositoriesError {
fn description(&self) -> &str {
match *self {
BatchGetRepositoriesError::EncryptionIntegrityChecksFailed(ref cause) => cause,
BatchGetRepositoriesError::EncryptionKeyAccessDenied(ref cause) => cause,
BatchGetRepositoriesError::EncryptionKeyDisabled(ref cause) => cause,
BatchGetRepositoriesError::EncryptionKeyNotFound(ref cause) => cause,
BatchGetRepositoriesError::EncryptionKeyUnavailable(ref cause) => cause,
BatchGetRepositoriesError::InvalidRepositoryName(ref cause) => cause,
BatchGetRepositoriesError::MaximumRepositoryNamesExceeded(ref cause) => cause,
BatchGetRepositoriesError::RepositoryNamesRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateBranchError {
BranchNameExists(String),
BranchNameRequired(String),
CommitDoesNotExist(String),
CommitIdRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidBranchName(String),
InvalidCommitId(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl CreateBranchError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBranchError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"BranchNameExistsException" => {
return RusotoError::Service(CreateBranchError::BranchNameExists(err.msg))
}
"BranchNameRequiredException" => {
return RusotoError::Service(CreateBranchError::BranchNameRequired(err.msg))
}
"CommitDoesNotExistException" => {
return RusotoError::Service(CreateBranchError::CommitDoesNotExist(err.msg))
}
"CommitIdRequiredException" => {
return RusotoError::Service(CreateBranchError::CommitIdRequired(err.msg))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
CreateBranchError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(CreateBranchError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(CreateBranchError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(CreateBranchError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(CreateBranchError::EncryptionKeyUnavailable(
err.msg,
))
}
"InvalidBranchNameException" => {
return RusotoError::Service(CreateBranchError::InvalidBranchName(err.msg))
}
"InvalidCommitIdException" => {
return RusotoError::Service(CreateBranchError::InvalidCommitId(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(CreateBranchError::InvalidRepositoryName(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(CreateBranchError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(CreateBranchError::RepositoryNameRequired(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateBranchError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateBranchError {
fn description(&self) -> &str {
match *self {
CreateBranchError::BranchNameExists(ref cause) => cause,
CreateBranchError::BranchNameRequired(ref cause) => cause,
CreateBranchError::CommitDoesNotExist(ref cause) => cause,
CreateBranchError::CommitIdRequired(ref cause) => cause,
CreateBranchError::EncryptionIntegrityChecksFailed(ref cause) => cause,
CreateBranchError::EncryptionKeyAccessDenied(ref cause) => cause,
CreateBranchError::EncryptionKeyDisabled(ref cause) => cause,
CreateBranchError::EncryptionKeyNotFound(ref cause) => cause,
CreateBranchError::EncryptionKeyUnavailable(ref cause) => cause,
CreateBranchError::InvalidBranchName(ref cause) => cause,
CreateBranchError::InvalidCommitId(ref cause) => cause,
CreateBranchError::InvalidRepositoryName(ref cause) => cause,
CreateBranchError::RepositoryDoesNotExist(ref cause) => cause,
CreateBranchError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateCommitError {
BranchDoesNotExist(String),
BranchNameIsTagName(String),
BranchNameRequired(String),
CommitMessageLengthExceeded(String),
DirectoryNameConflictsWithFileName(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
FileContentAndSourceFileSpecified(String),
FileContentSizeLimitExceeded(String),
FileDoesNotExist(String),
FileEntryRequired(String),
FileModeRequired(String),
FileNameConflictsWithDirectoryName(String),
FilePathConflictsWithSubmodulePath(String),
FolderContentSizeLimitExceeded(String),
InvalidBranchName(String),
InvalidDeletionParameter(String),
InvalidEmail(String),
InvalidFileMode(String),
InvalidParentCommitId(String),
InvalidPath(String),
InvalidRepositoryName(String),
MaximumFileEntriesExceeded(String),
NameLengthExceeded(String),
NoChange(String),
ParentCommitDoesNotExist(String),
ParentCommitIdOutdated(String),
ParentCommitIdRequired(String),
PathRequired(String),
PutFileEntryConflict(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
RestrictedSourceFile(String),
SamePathRequest(String),
SourceFileOrContentRequired(String),
}
impl CreateCommitError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCommitError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"BranchDoesNotExistException" => {
return RusotoError::Service(CreateCommitError::BranchDoesNotExist(err.msg))
}
"BranchNameIsTagNameException" => {
return RusotoError::Service(CreateCommitError::BranchNameIsTagName(err.msg))
}
"BranchNameRequiredException" => {
return RusotoError::Service(CreateCommitError::BranchNameRequired(err.msg))
}
"CommitMessageLengthExceededException" => {
return RusotoError::Service(CreateCommitError::CommitMessageLengthExceeded(
err.msg,
))
}
"DirectoryNameConflictsWithFileNameException" => {
return RusotoError::Service(
CreateCommitError::DirectoryNameConflictsWithFileName(err.msg),
)
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
CreateCommitError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(CreateCommitError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(CreateCommitError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(CreateCommitError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(CreateCommitError::EncryptionKeyUnavailable(
err.msg,
))
}
"FileContentAndSourceFileSpecifiedException" => {
return RusotoError::Service(
CreateCommitError::FileContentAndSourceFileSpecified(err.msg),
)
}
"FileContentSizeLimitExceededException" => {
return RusotoError::Service(CreateCommitError::FileContentSizeLimitExceeded(
err.msg,
))
}
"FileDoesNotExistException" => {
return RusotoError::Service(CreateCommitError::FileDoesNotExist(err.msg))
}
"FileEntryRequiredException" => {
return RusotoError::Service(CreateCommitError::FileEntryRequired(err.msg))
}
"FileModeRequiredException" => {
return RusotoError::Service(CreateCommitError::FileModeRequired(err.msg))
}
"FileNameConflictsWithDirectoryNameException" => {
return RusotoError::Service(
CreateCommitError::FileNameConflictsWithDirectoryName(err.msg),
)
}
"FilePathConflictsWithSubmodulePathException" => {
return RusotoError::Service(
CreateCommitError::FilePathConflictsWithSubmodulePath(err.msg),
)
}
"FolderContentSizeLimitExceededException" => {
return RusotoError::Service(CreateCommitError::FolderContentSizeLimitExceeded(
err.msg,
))
}
"InvalidBranchNameException" => {
return RusotoError::Service(CreateCommitError::InvalidBranchName(err.msg))
}
"InvalidDeletionParameterException" => {
return RusotoError::Service(CreateCommitError::InvalidDeletionParameter(
err.msg,
))
}
"InvalidEmailException" => {
return RusotoError::Service(CreateCommitError::InvalidEmail(err.msg))
}
"InvalidFileModeException" => {
return RusotoError::Service(CreateCommitError::InvalidFileMode(err.msg))
}
"InvalidParentCommitIdException" => {
return RusotoError::Service(CreateCommitError::InvalidParentCommitId(err.msg))
}
"InvalidPathException" => {
return RusotoError::Service(CreateCommitError::InvalidPath(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(CreateCommitError::InvalidRepositoryName(err.msg))
}
"MaximumFileEntriesExceededException" => {
return RusotoError::Service(CreateCommitError::MaximumFileEntriesExceeded(
err.msg,
))
}
"NameLengthExceededException" => {
return RusotoError::Service(CreateCommitError::NameLengthExceeded(err.msg))
}
"NoChangeException" => {
return RusotoError::Service(CreateCommitError::NoChange(err.msg))
}
"ParentCommitDoesNotExistException" => {
return RusotoError::Service(CreateCommitError::ParentCommitDoesNotExist(
err.msg,
))
}
"ParentCommitIdOutdatedException" => {
return RusotoError::Service(CreateCommitError::ParentCommitIdOutdated(err.msg))
}
"ParentCommitIdRequiredException" => {
return RusotoError::Service(CreateCommitError::ParentCommitIdRequired(err.msg))
}
"PathRequiredException" => {
return RusotoError::Service(CreateCommitError::PathRequired(err.msg))
}
"PutFileEntryConflictException" => {
return RusotoError::Service(CreateCommitError::PutFileEntryConflict(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(CreateCommitError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(CreateCommitError::RepositoryNameRequired(err.msg))
}
"RestrictedSourceFileException" => {
return RusotoError::Service(CreateCommitError::RestrictedSourceFile(err.msg))
}
"SamePathRequestException" => {
return RusotoError::Service(CreateCommitError::SamePathRequest(err.msg))
}
"SourceFileOrContentRequiredException" => {
return RusotoError::Service(CreateCommitError::SourceFileOrContentRequired(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateCommitError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateCommitError {
fn description(&self) -> &str {
match *self {
CreateCommitError::BranchDoesNotExist(ref cause) => cause,
CreateCommitError::BranchNameIsTagName(ref cause) => cause,
CreateCommitError::BranchNameRequired(ref cause) => cause,
CreateCommitError::CommitMessageLengthExceeded(ref cause) => cause,
CreateCommitError::DirectoryNameConflictsWithFileName(ref cause) => cause,
CreateCommitError::EncryptionIntegrityChecksFailed(ref cause) => cause,
CreateCommitError::EncryptionKeyAccessDenied(ref cause) => cause,
CreateCommitError::EncryptionKeyDisabled(ref cause) => cause,
CreateCommitError::EncryptionKeyNotFound(ref cause) => cause,
CreateCommitError::EncryptionKeyUnavailable(ref cause) => cause,
CreateCommitError::FileContentAndSourceFileSpecified(ref cause) => cause,
CreateCommitError::FileContentSizeLimitExceeded(ref cause) => cause,
CreateCommitError::FileDoesNotExist(ref cause) => cause,
CreateCommitError::FileEntryRequired(ref cause) => cause,
CreateCommitError::FileModeRequired(ref cause) => cause,
CreateCommitError::FileNameConflictsWithDirectoryName(ref cause) => cause,
CreateCommitError::FilePathConflictsWithSubmodulePath(ref cause) => cause,
CreateCommitError::FolderContentSizeLimitExceeded(ref cause) => cause,
CreateCommitError::InvalidBranchName(ref cause) => cause,
CreateCommitError::InvalidDeletionParameter(ref cause) => cause,
CreateCommitError::InvalidEmail(ref cause) => cause,
CreateCommitError::InvalidFileMode(ref cause) => cause,
CreateCommitError::InvalidParentCommitId(ref cause) => cause,
CreateCommitError::InvalidPath(ref cause) => cause,
CreateCommitError::InvalidRepositoryName(ref cause) => cause,
CreateCommitError::MaximumFileEntriesExceeded(ref cause) => cause,
CreateCommitError::NameLengthExceeded(ref cause) => cause,
CreateCommitError::NoChange(ref cause) => cause,
CreateCommitError::ParentCommitDoesNotExist(ref cause) => cause,
CreateCommitError::ParentCommitIdOutdated(ref cause) => cause,
CreateCommitError::ParentCommitIdRequired(ref cause) => cause,
CreateCommitError::PathRequired(ref cause) => cause,
CreateCommitError::PutFileEntryConflict(ref cause) => cause,
CreateCommitError::RepositoryDoesNotExist(ref cause) => cause,
CreateCommitError::RepositoryNameRequired(ref cause) => cause,
CreateCommitError::RestrictedSourceFile(ref cause) => cause,
CreateCommitError::SamePathRequest(ref cause) => cause,
CreateCommitError::SourceFileOrContentRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePullRequestError {
ClientRequestTokenRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
IdempotencyParameterMismatch(String),
InvalidClientRequestToken(String),
InvalidDescription(String),
InvalidReferenceName(String),
InvalidRepositoryName(String),
InvalidTarget(String),
InvalidTargets(String),
InvalidTitle(String),
MaximumOpenPullRequestsExceeded(String),
MultipleRepositoriesInPullRequest(String),
ReferenceDoesNotExist(String),
ReferenceNameRequired(String),
ReferenceTypeNotSupported(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
SourceAndDestinationAreSame(String),
TargetRequired(String),
TargetsRequired(String),
TitleRequired(String),
}
impl CreatePullRequestError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePullRequestError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientRequestTokenRequiredException" => {
return RusotoError::Service(
CreatePullRequestError::ClientRequestTokenRequired(err.msg),
)
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
CreatePullRequestError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(CreatePullRequestError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(CreatePullRequestError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(CreatePullRequestError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(CreatePullRequestError::EncryptionKeyUnavailable(
err.msg,
))
}
"IdempotencyParameterMismatchException" => {
return RusotoError::Service(
CreatePullRequestError::IdempotencyParameterMismatch(err.msg),
)
}
"InvalidClientRequestTokenException" => {
return RusotoError::Service(CreatePullRequestError::InvalidClientRequestToken(
err.msg,
))
}
"InvalidDescriptionException" => {
return RusotoError::Service(CreatePullRequestError::InvalidDescription(
err.msg,
))
}
"InvalidReferenceNameException" => {
return RusotoError::Service(CreatePullRequestError::InvalidReferenceName(
err.msg,
))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(CreatePullRequestError::InvalidRepositoryName(
err.msg,
))
}
"InvalidTargetException" => {
return RusotoError::Service(CreatePullRequestError::InvalidTarget(err.msg))
}
"InvalidTargetsException" => {
return RusotoError::Service(CreatePullRequestError::InvalidTargets(err.msg))
}
"InvalidTitleException" => {
return RusotoError::Service(CreatePullRequestError::InvalidTitle(err.msg))
}
"MaximumOpenPullRequestsExceededException" => {
return RusotoError::Service(
CreatePullRequestError::MaximumOpenPullRequestsExceeded(err.msg),
)
}
"MultipleRepositoriesInPullRequestException" => {
return RusotoError::Service(
CreatePullRequestError::MultipleRepositoriesInPullRequest(err.msg),
)
}
"ReferenceDoesNotExistException" => {
return RusotoError::Service(CreatePullRequestError::ReferenceDoesNotExist(
err.msg,
))
}
"ReferenceNameRequiredException" => {
return RusotoError::Service(CreatePullRequestError::ReferenceNameRequired(
err.msg,
))
}
"ReferenceTypeNotSupportedException" => {
return RusotoError::Service(CreatePullRequestError::ReferenceTypeNotSupported(
err.msg,
))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(CreatePullRequestError::RepositoryDoesNotExist(
err.msg,
))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(CreatePullRequestError::RepositoryNameRequired(
err.msg,
))
}
"SourceAndDestinationAreSameException" => {
return RusotoError::Service(
CreatePullRequestError::SourceAndDestinationAreSame(err.msg),
)
}
"TargetRequiredException" => {
return RusotoError::Service(CreatePullRequestError::TargetRequired(err.msg))
}
"TargetsRequiredException" => {
return RusotoError::Service(CreatePullRequestError::TargetsRequired(err.msg))
}
"TitleRequiredException" => {
return RusotoError::Service(CreatePullRequestError::TitleRequired(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreatePullRequestError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePullRequestError {
fn description(&self) -> &str {
match *self {
CreatePullRequestError::ClientRequestTokenRequired(ref cause) => cause,
CreatePullRequestError::EncryptionIntegrityChecksFailed(ref cause) => cause,
CreatePullRequestError::EncryptionKeyAccessDenied(ref cause) => cause,
CreatePullRequestError::EncryptionKeyDisabled(ref cause) => cause,
CreatePullRequestError::EncryptionKeyNotFound(ref cause) => cause,
CreatePullRequestError::EncryptionKeyUnavailable(ref cause) => cause,
CreatePullRequestError::IdempotencyParameterMismatch(ref cause) => cause,
CreatePullRequestError::InvalidClientRequestToken(ref cause) => cause,
CreatePullRequestError::InvalidDescription(ref cause) => cause,
CreatePullRequestError::InvalidReferenceName(ref cause) => cause,
CreatePullRequestError::InvalidRepositoryName(ref cause) => cause,
CreatePullRequestError::InvalidTarget(ref cause) => cause,
CreatePullRequestError::InvalidTargets(ref cause) => cause,
CreatePullRequestError::InvalidTitle(ref cause) => cause,
CreatePullRequestError::MaximumOpenPullRequestsExceeded(ref cause) => cause,
CreatePullRequestError::MultipleRepositoriesInPullRequest(ref cause) => cause,
CreatePullRequestError::ReferenceDoesNotExist(ref cause) => cause,
CreatePullRequestError::ReferenceNameRequired(ref cause) => cause,
CreatePullRequestError::ReferenceTypeNotSupported(ref cause) => cause,
CreatePullRequestError::RepositoryDoesNotExist(ref cause) => cause,
CreatePullRequestError::RepositoryNameRequired(ref cause) => cause,
CreatePullRequestError::SourceAndDestinationAreSame(ref cause) => cause,
CreatePullRequestError::TargetRequired(ref cause) => cause,
CreatePullRequestError::TargetsRequired(ref cause) => cause,
CreatePullRequestError::TitleRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateRepositoryError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidRepositoryDescription(String),
InvalidRepositoryName(String),
InvalidSystemTagUsage(String),
InvalidTagsMap(String),
RepositoryLimitExceeded(String),
RepositoryNameExists(String),
RepositoryNameRequired(String),
TagPolicy(String),
TooManyTags(String),
}
impl CreateRepositoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRepositoryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
CreateRepositoryError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(CreateRepositoryError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(CreateRepositoryError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(CreateRepositoryError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(CreateRepositoryError::EncryptionKeyUnavailable(
err.msg,
))
}
"InvalidRepositoryDescriptionException" => {
return RusotoError::Service(
CreateRepositoryError::InvalidRepositoryDescription(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(CreateRepositoryError::InvalidRepositoryName(
err.msg,
))
}
"InvalidSystemTagUsageException" => {
return RusotoError::Service(CreateRepositoryError::InvalidSystemTagUsage(
err.msg,
))
}
"InvalidTagsMapException" => {
return RusotoError::Service(CreateRepositoryError::InvalidTagsMap(err.msg))
}
"RepositoryLimitExceededException" => {
return RusotoError::Service(CreateRepositoryError::RepositoryLimitExceeded(
err.msg,
))
}
"RepositoryNameExistsException" => {
return RusotoError::Service(CreateRepositoryError::RepositoryNameExists(
err.msg,
))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(CreateRepositoryError::RepositoryNameRequired(
err.msg,
))
}
"TagPolicyException" => {
return RusotoError::Service(CreateRepositoryError::TagPolicy(err.msg))
}
"TooManyTagsException" => {
return RusotoError::Service(CreateRepositoryError::TooManyTags(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateRepositoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateRepositoryError {
fn description(&self) -> &str {
match *self {
CreateRepositoryError::EncryptionIntegrityChecksFailed(ref cause) => cause,
CreateRepositoryError::EncryptionKeyAccessDenied(ref cause) => cause,
CreateRepositoryError::EncryptionKeyDisabled(ref cause) => cause,
CreateRepositoryError::EncryptionKeyNotFound(ref cause) => cause,
CreateRepositoryError::EncryptionKeyUnavailable(ref cause) => cause,
CreateRepositoryError::InvalidRepositoryDescription(ref cause) => cause,
CreateRepositoryError::InvalidRepositoryName(ref cause) => cause,
CreateRepositoryError::InvalidSystemTagUsage(ref cause) => cause,
CreateRepositoryError::InvalidTagsMap(ref cause) => cause,
CreateRepositoryError::RepositoryLimitExceeded(ref cause) => cause,
CreateRepositoryError::RepositoryNameExists(ref cause) => cause,
CreateRepositoryError::RepositoryNameRequired(ref cause) => cause,
CreateRepositoryError::TagPolicy(ref cause) => cause,
CreateRepositoryError::TooManyTags(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteBranchError {
BranchNameRequired(String),
DefaultBranchCannotBeDeleted(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidBranchName(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl DeleteBranchError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBranchError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"BranchNameRequiredException" => {
return RusotoError::Service(DeleteBranchError::BranchNameRequired(err.msg))
}
"DefaultBranchCannotBeDeletedException" => {
return RusotoError::Service(DeleteBranchError::DefaultBranchCannotBeDeleted(
err.msg,
))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
DeleteBranchError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(DeleteBranchError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(DeleteBranchError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(DeleteBranchError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(DeleteBranchError::EncryptionKeyUnavailable(
err.msg,
))
}
"InvalidBranchNameException" => {
return RusotoError::Service(DeleteBranchError::InvalidBranchName(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(DeleteBranchError::InvalidRepositoryName(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(DeleteBranchError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(DeleteBranchError::RepositoryNameRequired(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteBranchError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteBranchError {
fn description(&self) -> &str {
match *self {
DeleteBranchError::BranchNameRequired(ref cause) => cause,
DeleteBranchError::DefaultBranchCannotBeDeleted(ref cause) => cause,
DeleteBranchError::EncryptionIntegrityChecksFailed(ref cause) => cause,
DeleteBranchError::EncryptionKeyAccessDenied(ref cause) => cause,
DeleteBranchError::EncryptionKeyDisabled(ref cause) => cause,
DeleteBranchError::EncryptionKeyNotFound(ref cause) => cause,
DeleteBranchError::EncryptionKeyUnavailable(ref cause) => cause,
DeleteBranchError::InvalidBranchName(ref cause) => cause,
DeleteBranchError::InvalidRepositoryName(ref cause) => cause,
DeleteBranchError::RepositoryDoesNotExist(ref cause) => cause,
DeleteBranchError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteCommentContentError {
CommentDeleted(String),
CommentDoesNotExist(String),
CommentIdRequired(String),
InvalidCommentId(String),
}
impl DeleteCommentContentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteCommentContentError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CommentDeletedException" => {
return RusotoError::Service(DeleteCommentContentError::CommentDeleted(err.msg))
}
"CommentDoesNotExistException" => {
return RusotoError::Service(DeleteCommentContentError::CommentDoesNotExist(
err.msg,
))
}
"CommentIdRequiredException" => {
return RusotoError::Service(DeleteCommentContentError::CommentIdRequired(
err.msg,
))
}
"InvalidCommentIdException" => {
return RusotoError::Service(DeleteCommentContentError::InvalidCommentId(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteCommentContentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteCommentContentError {
fn description(&self) -> &str {
match *self {
DeleteCommentContentError::CommentDeleted(ref cause) => cause,
DeleteCommentContentError::CommentDoesNotExist(ref cause) => cause,
DeleteCommentContentError::CommentIdRequired(ref cause) => cause,
DeleteCommentContentError::InvalidCommentId(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteFileError {
BranchDoesNotExist(String),
BranchNameIsTagName(String),
BranchNameRequired(String),
CommitMessageLengthExceeded(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
FileDoesNotExist(String),
InvalidBranchName(String),
InvalidEmail(String),
InvalidParentCommitId(String),
InvalidPath(String),
InvalidRepositoryName(String),
NameLengthExceeded(String),
ParentCommitDoesNotExist(String),
ParentCommitIdOutdated(String),
ParentCommitIdRequired(String),
PathRequired(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl DeleteFileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFileError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"BranchDoesNotExistException" => {
return RusotoError::Service(DeleteFileError::BranchDoesNotExist(err.msg))
}
"BranchNameIsTagNameException" => {
return RusotoError::Service(DeleteFileError::BranchNameIsTagName(err.msg))
}
"BranchNameRequiredException" => {
return RusotoError::Service(DeleteFileError::BranchNameRequired(err.msg))
}
"CommitMessageLengthExceededException" => {
return RusotoError::Service(DeleteFileError::CommitMessageLengthExceeded(
err.msg,
))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(DeleteFileError::EncryptionIntegrityChecksFailed(
err.msg,
))
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(DeleteFileError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(DeleteFileError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(DeleteFileError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(DeleteFileError::EncryptionKeyUnavailable(err.msg))
}
"FileDoesNotExistException" => {
return RusotoError::Service(DeleteFileError::FileDoesNotExist(err.msg))
}
"InvalidBranchNameException" => {
return RusotoError::Service(DeleteFileError::InvalidBranchName(err.msg))
}
"InvalidEmailException" => {
return RusotoError::Service(DeleteFileError::InvalidEmail(err.msg))
}
"InvalidParentCommitIdException" => {
return RusotoError::Service(DeleteFileError::InvalidParentCommitId(err.msg))
}
"InvalidPathException" => {
return RusotoError::Service(DeleteFileError::InvalidPath(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(DeleteFileError::InvalidRepositoryName(err.msg))
}
"NameLengthExceededException" => {
return RusotoError::Service(DeleteFileError::NameLengthExceeded(err.msg))
}
"ParentCommitDoesNotExistException" => {
return RusotoError::Service(DeleteFileError::ParentCommitDoesNotExist(err.msg))
}
"ParentCommitIdOutdatedException" => {
return RusotoError::Service(DeleteFileError::ParentCommitIdOutdated(err.msg))
}
"ParentCommitIdRequiredException" => {
return RusotoError::Service(DeleteFileError::ParentCommitIdRequired(err.msg))
}
"PathRequiredException" => {
return RusotoError::Service(DeleteFileError::PathRequired(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(DeleteFileError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(DeleteFileError::RepositoryNameRequired(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteFileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteFileError {
fn description(&self) -> &str {
match *self {
DeleteFileError::BranchDoesNotExist(ref cause) => cause,
DeleteFileError::BranchNameIsTagName(ref cause) => cause,
DeleteFileError::BranchNameRequired(ref cause) => cause,
DeleteFileError::CommitMessageLengthExceeded(ref cause) => cause,
DeleteFileError::EncryptionIntegrityChecksFailed(ref cause) => cause,
DeleteFileError::EncryptionKeyAccessDenied(ref cause) => cause,
DeleteFileError::EncryptionKeyDisabled(ref cause) => cause,
DeleteFileError::EncryptionKeyNotFound(ref cause) => cause,
DeleteFileError::EncryptionKeyUnavailable(ref cause) => cause,
DeleteFileError::FileDoesNotExist(ref cause) => cause,
DeleteFileError::InvalidBranchName(ref cause) => cause,
DeleteFileError::InvalidEmail(ref cause) => cause,
DeleteFileError::InvalidParentCommitId(ref cause) => cause,
DeleteFileError::InvalidPath(ref cause) => cause,
DeleteFileError::InvalidRepositoryName(ref cause) => cause,
DeleteFileError::NameLengthExceeded(ref cause) => cause,
DeleteFileError::ParentCommitDoesNotExist(ref cause) => cause,
DeleteFileError::ParentCommitIdOutdated(ref cause) => cause,
DeleteFileError::ParentCommitIdRequired(ref cause) => cause,
DeleteFileError::PathRequired(ref cause) => cause,
DeleteFileError::RepositoryDoesNotExist(ref cause) => cause,
DeleteFileError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRepositoryError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidRepositoryName(String),
RepositoryNameRequired(String),
}
impl DeleteRepositoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRepositoryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
DeleteRepositoryError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(DeleteRepositoryError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(DeleteRepositoryError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(DeleteRepositoryError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(DeleteRepositoryError::EncryptionKeyUnavailable(
err.msg,
))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(DeleteRepositoryError::InvalidRepositoryName(
err.msg,
))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(DeleteRepositoryError::RepositoryNameRequired(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteRepositoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRepositoryError {
fn description(&self) -> &str {
match *self {
DeleteRepositoryError::EncryptionIntegrityChecksFailed(ref cause) => cause,
DeleteRepositoryError::EncryptionKeyAccessDenied(ref cause) => cause,
DeleteRepositoryError::EncryptionKeyDisabled(ref cause) => cause,
DeleteRepositoryError::EncryptionKeyNotFound(ref cause) => cause,
DeleteRepositoryError::EncryptionKeyUnavailable(ref cause) => cause,
DeleteRepositoryError::InvalidRepositoryName(ref cause) => cause,
DeleteRepositoryError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribePullRequestEventsError {
ActorDoesNotExist(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidActorArn(String),
InvalidContinuationToken(String),
InvalidMaxResults(String),
InvalidPullRequestEventType(String),
InvalidPullRequestId(String),
PullRequestDoesNotExist(String),
PullRequestIdRequired(String),
}
impl DescribePullRequestEventsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribePullRequestEventsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ActorDoesNotExistException" => {
return RusotoError::Service(DescribePullRequestEventsError::ActorDoesNotExist(
err.msg,
))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
DescribePullRequestEventsError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
DescribePullRequestEventsError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(
DescribePullRequestEventsError::EncryptionKeyDisabled(err.msg),
)
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(
DescribePullRequestEventsError::EncryptionKeyNotFound(err.msg),
)
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
DescribePullRequestEventsError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidActorArnException" => {
return RusotoError::Service(DescribePullRequestEventsError::InvalidActorArn(
err.msg,
))
}
"InvalidContinuationTokenException" => {
return RusotoError::Service(
DescribePullRequestEventsError::InvalidContinuationToken(err.msg),
)
}
"InvalidMaxResultsException" => {
return RusotoError::Service(DescribePullRequestEventsError::InvalidMaxResults(
err.msg,
))
}
"InvalidPullRequestEventTypeException" => {
return RusotoError::Service(
DescribePullRequestEventsError::InvalidPullRequestEventType(err.msg),
)
}
"InvalidPullRequestIdException" => {
return RusotoError::Service(
DescribePullRequestEventsError::InvalidPullRequestId(err.msg),
)
}
"PullRequestDoesNotExistException" => {
return RusotoError::Service(
DescribePullRequestEventsError::PullRequestDoesNotExist(err.msg),
)
}
"PullRequestIdRequiredException" => {
return RusotoError::Service(
DescribePullRequestEventsError::PullRequestIdRequired(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribePullRequestEventsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribePullRequestEventsError {
fn description(&self) -> &str {
match *self {
DescribePullRequestEventsError::ActorDoesNotExist(ref cause) => cause,
DescribePullRequestEventsError::EncryptionIntegrityChecksFailed(ref cause) => cause,
DescribePullRequestEventsError::EncryptionKeyAccessDenied(ref cause) => cause,
DescribePullRequestEventsError::EncryptionKeyDisabled(ref cause) => cause,
DescribePullRequestEventsError::EncryptionKeyNotFound(ref cause) => cause,
DescribePullRequestEventsError::EncryptionKeyUnavailable(ref cause) => cause,
DescribePullRequestEventsError::InvalidActorArn(ref cause) => cause,
DescribePullRequestEventsError::InvalidContinuationToken(ref cause) => cause,
DescribePullRequestEventsError::InvalidMaxResults(ref cause) => cause,
DescribePullRequestEventsError::InvalidPullRequestEventType(ref cause) => cause,
DescribePullRequestEventsError::InvalidPullRequestId(ref cause) => cause,
DescribePullRequestEventsError::PullRequestDoesNotExist(ref cause) => cause,
DescribePullRequestEventsError::PullRequestIdRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetBlobError {
BlobIdDoesNotExist(String),
BlobIdRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
FileTooLarge(String),
InvalidBlobId(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl GetBlobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBlobError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"BlobIdDoesNotExistException" => {
return RusotoError::Service(GetBlobError::BlobIdDoesNotExist(err.msg))
}
"BlobIdRequiredException" => {
return RusotoError::Service(GetBlobError::BlobIdRequired(err.msg))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(GetBlobError::EncryptionIntegrityChecksFailed(
err.msg,
))
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(GetBlobError::EncryptionKeyAccessDenied(err.msg))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(GetBlobError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(GetBlobError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(GetBlobError::EncryptionKeyUnavailable(err.msg))
}
"FileTooLargeException" => {
return RusotoError::Service(GetBlobError::FileTooLarge(err.msg))
}
"InvalidBlobIdException" => {
return RusotoError::Service(GetBlobError::InvalidBlobId(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(GetBlobError::InvalidRepositoryName(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(GetBlobError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(GetBlobError::RepositoryNameRequired(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetBlobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetBlobError {
fn description(&self) -> &str {
match *self {
GetBlobError::BlobIdDoesNotExist(ref cause) => cause,
GetBlobError::BlobIdRequired(ref cause) => cause,
GetBlobError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetBlobError::EncryptionKeyAccessDenied(ref cause) => cause,
GetBlobError::EncryptionKeyDisabled(ref cause) => cause,
GetBlobError::EncryptionKeyNotFound(ref cause) => cause,
GetBlobError::EncryptionKeyUnavailable(ref cause) => cause,
GetBlobError::FileTooLarge(ref cause) => cause,
GetBlobError::InvalidBlobId(ref cause) => cause,
GetBlobError::InvalidRepositoryName(ref cause) => cause,
GetBlobError::RepositoryDoesNotExist(ref cause) => cause,
GetBlobError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetBranchError {
BranchDoesNotExist(String),
BranchNameRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidBranchName(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl GetBranchError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBranchError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"BranchDoesNotExistException" => {
return RusotoError::Service(GetBranchError::BranchDoesNotExist(err.msg))
}
"BranchNameRequiredException" => {
return RusotoError::Service(GetBranchError::BranchNameRequired(err.msg))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(GetBranchError::EncryptionIntegrityChecksFailed(
err.msg,
))
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(GetBranchError::EncryptionKeyAccessDenied(err.msg))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(GetBranchError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(GetBranchError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(GetBranchError::EncryptionKeyUnavailable(err.msg))
}
"InvalidBranchNameException" => {
return RusotoError::Service(GetBranchError::InvalidBranchName(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(GetBranchError::InvalidRepositoryName(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(GetBranchError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(GetBranchError::RepositoryNameRequired(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetBranchError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetBranchError {
fn description(&self) -> &str {
match *self {
GetBranchError::BranchDoesNotExist(ref cause) => cause,
GetBranchError::BranchNameRequired(ref cause) => cause,
GetBranchError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetBranchError::EncryptionKeyAccessDenied(ref cause) => cause,
GetBranchError::EncryptionKeyDisabled(ref cause) => cause,
GetBranchError::EncryptionKeyNotFound(ref cause) => cause,
GetBranchError::EncryptionKeyUnavailable(ref cause) => cause,
GetBranchError::InvalidBranchName(ref cause) => cause,
GetBranchError::InvalidRepositoryName(ref cause) => cause,
GetBranchError::RepositoryDoesNotExist(ref cause) => cause,
GetBranchError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCommentError {
CommentDeleted(String),
CommentDoesNotExist(String),
CommentIdRequired(String),
InvalidCommentId(String),
}
impl GetCommentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCommentError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CommentDeletedException" => {
return RusotoError::Service(GetCommentError::CommentDeleted(err.msg))
}
"CommentDoesNotExistException" => {
return RusotoError::Service(GetCommentError::CommentDoesNotExist(err.msg))
}
"CommentIdRequiredException" => {
return RusotoError::Service(GetCommentError::CommentIdRequired(err.msg))
}
"InvalidCommentIdException" => {
return RusotoError::Service(GetCommentError::InvalidCommentId(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetCommentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCommentError {
fn description(&self) -> &str {
match *self {
GetCommentError::CommentDeleted(ref cause) => cause,
GetCommentError::CommentDoesNotExist(ref cause) => cause,
GetCommentError::CommentIdRequired(ref cause) => cause,
GetCommentError::InvalidCommentId(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCommentsForComparedCommitError {
CommitDoesNotExist(String),
CommitIdRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidCommitId(String),
InvalidContinuationToken(String),
InvalidMaxResults(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl GetCommentsForComparedCommitError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetCommentsForComparedCommitError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CommitDoesNotExistException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::CommitDoesNotExist(err.msg),
)
}
"CommitIdRequiredException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::CommitIdRequired(err.msg),
)
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::EncryptionKeyDisabled(err.msg),
)
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::EncryptionKeyNotFound(err.msg),
)
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidCommitIdException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::InvalidCommitId(err.msg),
)
}
"InvalidContinuationTokenException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::InvalidContinuationToken(err.msg),
)
}
"InvalidMaxResultsException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::InvalidMaxResults(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::InvalidRepositoryName(err.msg),
)
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::RepositoryDoesNotExist(err.msg),
)
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(
GetCommentsForComparedCommitError::RepositoryNameRequired(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetCommentsForComparedCommitError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCommentsForComparedCommitError {
fn description(&self) -> &str {
match *self {
GetCommentsForComparedCommitError::CommitDoesNotExist(ref cause) => cause,
GetCommentsForComparedCommitError::CommitIdRequired(ref cause) => cause,
GetCommentsForComparedCommitError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetCommentsForComparedCommitError::EncryptionKeyAccessDenied(ref cause) => cause,
GetCommentsForComparedCommitError::EncryptionKeyDisabled(ref cause) => cause,
GetCommentsForComparedCommitError::EncryptionKeyNotFound(ref cause) => cause,
GetCommentsForComparedCommitError::EncryptionKeyUnavailable(ref cause) => cause,
GetCommentsForComparedCommitError::InvalidCommitId(ref cause) => cause,
GetCommentsForComparedCommitError::InvalidContinuationToken(ref cause) => cause,
GetCommentsForComparedCommitError::InvalidMaxResults(ref cause) => cause,
GetCommentsForComparedCommitError::InvalidRepositoryName(ref cause) => cause,
GetCommentsForComparedCommitError::RepositoryDoesNotExist(ref cause) => cause,
GetCommentsForComparedCommitError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCommentsForPullRequestError {
CommitDoesNotExist(String),
CommitIdRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidCommitId(String),
InvalidContinuationToken(String),
InvalidMaxResults(String),
InvalidPullRequestId(String),
InvalidRepositoryName(String),
PullRequestDoesNotExist(String),
PullRequestIdRequired(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
RepositoryNotAssociatedWithPullRequest(String),
}
impl GetCommentsForPullRequestError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCommentsForPullRequestError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CommitDoesNotExistException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::CommitDoesNotExist(err.msg),
)
}
"CommitIdRequiredException" => {
return RusotoError::Service(GetCommentsForPullRequestError::CommitIdRequired(
err.msg,
))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::EncryptionKeyDisabled(err.msg),
)
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::EncryptionKeyNotFound(err.msg),
)
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidCommitIdException" => {
return RusotoError::Service(GetCommentsForPullRequestError::InvalidCommitId(
err.msg,
))
}
"InvalidContinuationTokenException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::InvalidContinuationToken(err.msg),
)
}
"InvalidMaxResultsException" => {
return RusotoError::Service(GetCommentsForPullRequestError::InvalidMaxResults(
err.msg,
))
}
"InvalidPullRequestIdException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::InvalidPullRequestId(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::InvalidRepositoryName(err.msg),
)
}
"PullRequestDoesNotExistException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::PullRequestDoesNotExist(err.msg),
)
}
"PullRequestIdRequiredException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::PullRequestIdRequired(err.msg),
)
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::RepositoryDoesNotExist(err.msg),
)
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::RepositoryNameRequired(err.msg),
)
}
"RepositoryNotAssociatedWithPullRequestException" => {
return RusotoError::Service(
GetCommentsForPullRequestError::RepositoryNotAssociatedWithPullRequest(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetCommentsForPullRequestError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCommentsForPullRequestError {
fn description(&self) -> &str {
match *self {
GetCommentsForPullRequestError::CommitDoesNotExist(ref cause) => cause,
GetCommentsForPullRequestError::CommitIdRequired(ref cause) => cause,
GetCommentsForPullRequestError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetCommentsForPullRequestError::EncryptionKeyAccessDenied(ref cause) => cause,
GetCommentsForPullRequestError::EncryptionKeyDisabled(ref cause) => cause,
GetCommentsForPullRequestError::EncryptionKeyNotFound(ref cause) => cause,
GetCommentsForPullRequestError::EncryptionKeyUnavailable(ref cause) => cause,
GetCommentsForPullRequestError::InvalidCommitId(ref cause) => cause,
GetCommentsForPullRequestError::InvalidContinuationToken(ref cause) => cause,
GetCommentsForPullRequestError::InvalidMaxResults(ref cause) => cause,
GetCommentsForPullRequestError::InvalidPullRequestId(ref cause) => cause,
GetCommentsForPullRequestError::InvalidRepositoryName(ref cause) => cause,
GetCommentsForPullRequestError::PullRequestDoesNotExist(ref cause) => cause,
GetCommentsForPullRequestError::PullRequestIdRequired(ref cause) => cause,
GetCommentsForPullRequestError::RepositoryDoesNotExist(ref cause) => cause,
GetCommentsForPullRequestError::RepositoryNameRequired(ref cause) => cause,
GetCommentsForPullRequestError::RepositoryNotAssociatedWithPullRequest(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCommitError {
CommitIdDoesNotExist(String),
CommitIdRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidCommitId(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl GetCommitError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCommitError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CommitIdDoesNotExistException" => {
return RusotoError::Service(GetCommitError::CommitIdDoesNotExist(err.msg))
}
"CommitIdRequiredException" => {
return RusotoError::Service(GetCommitError::CommitIdRequired(err.msg))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(GetCommitError::EncryptionIntegrityChecksFailed(
err.msg,
))
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(GetCommitError::EncryptionKeyAccessDenied(err.msg))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(GetCommitError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(GetCommitError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(GetCommitError::EncryptionKeyUnavailable(err.msg))
}
"InvalidCommitIdException" => {
return RusotoError::Service(GetCommitError::InvalidCommitId(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(GetCommitError::InvalidRepositoryName(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(GetCommitError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(GetCommitError::RepositoryNameRequired(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetCommitError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCommitError {
fn description(&self) -> &str {
match *self {
GetCommitError::CommitIdDoesNotExist(ref cause) => cause,
GetCommitError::CommitIdRequired(ref cause) => cause,
GetCommitError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetCommitError::EncryptionKeyAccessDenied(ref cause) => cause,
GetCommitError::EncryptionKeyDisabled(ref cause) => cause,
GetCommitError::EncryptionKeyNotFound(ref cause) => cause,
GetCommitError::EncryptionKeyUnavailable(ref cause) => cause,
GetCommitError::InvalidCommitId(ref cause) => cause,
GetCommitError::InvalidRepositoryName(ref cause) => cause,
GetCommitError::RepositoryDoesNotExist(ref cause) => cause,
GetCommitError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDifferencesError {
CommitDoesNotExist(String),
CommitRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidCommit(String),
InvalidCommitId(String),
InvalidContinuationToken(String),
InvalidMaxResults(String),
InvalidPath(String),
InvalidRepositoryName(String),
PathDoesNotExist(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl GetDifferencesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDifferencesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CommitDoesNotExistException" => {
return RusotoError::Service(GetDifferencesError::CommitDoesNotExist(err.msg))
}
"CommitRequiredException" => {
return RusotoError::Service(GetDifferencesError::CommitRequired(err.msg))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
GetDifferencesError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(GetDifferencesError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(GetDifferencesError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(GetDifferencesError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(GetDifferencesError::EncryptionKeyUnavailable(
err.msg,
))
}
"InvalidCommitException" => {
return RusotoError::Service(GetDifferencesError::InvalidCommit(err.msg))
}
"InvalidCommitIdException" => {
return RusotoError::Service(GetDifferencesError::InvalidCommitId(err.msg))
}
"InvalidContinuationTokenException" => {
return RusotoError::Service(GetDifferencesError::InvalidContinuationToken(
err.msg,
))
}
"InvalidMaxResultsException" => {
return RusotoError::Service(GetDifferencesError::InvalidMaxResults(err.msg))
}
"InvalidPathException" => {
return RusotoError::Service(GetDifferencesError::InvalidPath(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(GetDifferencesError::InvalidRepositoryName(
err.msg,
))
}
"PathDoesNotExistException" => {
return RusotoError::Service(GetDifferencesError::PathDoesNotExist(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(GetDifferencesError::RepositoryDoesNotExist(
err.msg,
))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(GetDifferencesError::RepositoryNameRequired(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDifferencesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDifferencesError {
fn description(&self) -> &str {
match *self {
GetDifferencesError::CommitDoesNotExist(ref cause) => cause,
GetDifferencesError::CommitRequired(ref cause) => cause,
GetDifferencesError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetDifferencesError::EncryptionKeyAccessDenied(ref cause) => cause,
GetDifferencesError::EncryptionKeyDisabled(ref cause) => cause,
GetDifferencesError::EncryptionKeyNotFound(ref cause) => cause,
GetDifferencesError::EncryptionKeyUnavailable(ref cause) => cause,
GetDifferencesError::InvalidCommit(ref cause) => cause,
GetDifferencesError::InvalidCommitId(ref cause) => cause,
GetDifferencesError::InvalidContinuationToken(ref cause) => cause,
GetDifferencesError::InvalidMaxResults(ref cause) => cause,
GetDifferencesError::InvalidPath(ref cause) => cause,
GetDifferencesError::InvalidRepositoryName(ref cause) => cause,
GetDifferencesError::PathDoesNotExist(ref cause) => cause,
GetDifferencesError::RepositoryDoesNotExist(ref cause) => cause,
GetDifferencesError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetFileError {
CommitDoesNotExist(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
FileDoesNotExist(String),
FileTooLarge(String),
InvalidCommit(String),
InvalidPath(String),
InvalidRepositoryName(String),
PathRequired(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl GetFileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFileError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CommitDoesNotExistException" => {
return RusotoError::Service(GetFileError::CommitDoesNotExist(err.msg))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(GetFileError::EncryptionIntegrityChecksFailed(
err.msg,
))
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(GetFileError::EncryptionKeyAccessDenied(err.msg))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(GetFileError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(GetFileError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(GetFileError::EncryptionKeyUnavailable(err.msg))
}
"FileDoesNotExistException" => {
return RusotoError::Service(GetFileError::FileDoesNotExist(err.msg))
}
"FileTooLargeException" => {
return RusotoError::Service(GetFileError::FileTooLarge(err.msg))
}
"InvalidCommitException" => {
return RusotoError::Service(GetFileError::InvalidCommit(err.msg))
}
"InvalidPathException" => {
return RusotoError::Service(GetFileError::InvalidPath(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(GetFileError::InvalidRepositoryName(err.msg))
}
"PathRequiredException" => {
return RusotoError::Service(GetFileError::PathRequired(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(GetFileError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(GetFileError::RepositoryNameRequired(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetFileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetFileError {
fn description(&self) -> &str {
match *self {
GetFileError::CommitDoesNotExist(ref cause) => cause,
GetFileError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetFileError::EncryptionKeyAccessDenied(ref cause) => cause,
GetFileError::EncryptionKeyDisabled(ref cause) => cause,
GetFileError::EncryptionKeyNotFound(ref cause) => cause,
GetFileError::EncryptionKeyUnavailable(ref cause) => cause,
GetFileError::FileDoesNotExist(ref cause) => cause,
GetFileError::FileTooLarge(ref cause) => cause,
GetFileError::InvalidCommit(ref cause) => cause,
GetFileError::InvalidPath(ref cause) => cause,
GetFileError::InvalidRepositoryName(ref cause) => cause,
GetFileError::PathRequired(ref cause) => cause,
GetFileError::RepositoryDoesNotExist(ref cause) => cause,
GetFileError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetFolderError {
CommitDoesNotExist(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
FolderDoesNotExist(String),
InvalidCommit(String),
InvalidPath(String),
InvalidRepositoryName(String),
PathRequired(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl GetFolderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFolderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CommitDoesNotExistException" => {
return RusotoError::Service(GetFolderError::CommitDoesNotExist(err.msg))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(GetFolderError::EncryptionIntegrityChecksFailed(
err.msg,
))
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(GetFolderError::EncryptionKeyAccessDenied(err.msg))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(GetFolderError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(GetFolderError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(GetFolderError::EncryptionKeyUnavailable(err.msg))
}
"FolderDoesNotExistException" => {
return RusotoError::Service(GetFolderError::FolderDoesNotExist(err.msg))
}
"InvalidCommitException" => {
return RusotoError::Service(GetFolderError::InvalidCommit(err.msg))
}
"InvalidPathException" => {
return RusotoError::Service(GetFolderError::InvalidPath(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(GetFolderError::InvalidRepositoryName(err.msg))
}
"PathRequiredException" => {
return RusotoError::Service(GetFolderError::PathRequired(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(GetFolderError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(GetFolderError::RepositoryNameRequired(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetFolderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetFolderError {
fn description(&self) -> &str {
match *self {
GetFolderError::CommitDoesNotExist(ref cause) => cause,
GetFolderError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetFolderError::EncryptionKeyAccessDenied(ref cause) => cause,
GetFolderError::EncryptionKeyDisabled(ref cause) => cause,
GetFolderError::EncryptionKeyNotFound(ref cause) => cause,
GetFolderError::EncryptionKeyUnavailable(ref cause) => cause,
GetFolderError::FolderDoesNotExist(ref cause) => cause,
GetFolderError::InvalidCommit(ref cause) => cause,
GetFolderError::InvalidPath(ref cause) => cause,
GetFolderError::InvalidRepositoryName(ref cause) => cause,
GetFolderError::PathRequired(ref cause) => cause,
GetFolderError::RepositoryDoesNotExist(ref cause) => cause,
GetFolderError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetMergeConflictsError {
CommitDoesNotExist(String),
CommitRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidCommit(String),
InvalidDestinationCommitSpecifier(String),
InvalidMergeOption(String),
InvalidRepositoryName(String),
InvalidSourceCommitSpecifier(String),
MergeOptionRequired(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
TipsDivergenceExceeded(String),
}
impl GetMergeConflictsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetMergeConflictsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CommitDoesNotExistException" => {
return RusotoError::Service(GetMergeConflictsError::CommitDoesNotExist(
err.msg,
))
}
"CommitRequiredException" => {
return RusotoError::Service(GetMergeConflictsError::CommitRequired(err.msg))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
GetMergeConflictsError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(GetMergeConflictsError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(GetMergeConflictsError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(GetMergeConflictsError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(GetMergeConflictsError::EncryptionKeyUnavailable(
err.msg,
))
}
"InvalidCommitException" => {
return RusotoError::Service(GetMergeConflictsError::InvalidCommit(err.msg))
}
"InvalidDestinationCommitSpecifierException" => {
return RusotoError::Service(
GetMergeConflictsError::InvalidDestinationCommitSpecifier(err.msg),
)
}
"InvalidMergeOptionException" => {
return RusotoError::Service(GetMergeConflictsError::InvalidMergeOption(
err.msg,
))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(GetMergeConflictsError::InvalidRepositoryName(
err.msg,
))
}
"InvalidSourceCommitSpecifierException" => {
return RusotoError::Service(
GetMergeConflictsError::InvalidSourceCommitSpecifier(err.msg),
)
}
"MergeOptionRequiredException" => {
return RusotoError::Service(GetMergeConflictsError::MergeOptionRequired(
err.msg,
))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(GetMergeConflictsError::RepositoryDoesNotExist(
err.msg,
))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(GetMergeConflictsError::RepositoryNameRequired(
err.msg,
))
}
"TipsDivergenceExceededException" => {
return RusotoError::Service(GetMergeConflictsError::TipsDivergenceExceeded(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetMergeConflictsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetMergeConflictsError {
fn description(&self) -> &str {
match *self {
GetMergeConflictsError::CommitDoesNotExist(ref cause) => cause,
GetMergeConflictsError::CommitRequired(ref cause) => cause,
GetMergeConflictsError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetMergeConflictsError::EncryptionKeyAccessDenied(ref cause) => cause,
GetMergeConflictsError::EncryptionKeyDisabled(ref cause) => cause,
GetMergeConflictsError::EncryptionKeyNotFound(ref cause) => cause,
GetMergeConflictsError::EncryptionKeyUnavailable(ref cause) => cause,
GetMergeConflictsError::InvalidCommit(ref cause) => cause,
GetMergeConflictsError::InvalidDestinationCommitSpecifier(ref cause) => cause,
GetMergeConflictsError::InvalidMergeOption(ref cause) => cause,
GetMergeConflictsError::InvalidRepositoryName(ref cause) => cause,
GetMergeConflictsError::InvalidSourceCommitSpecifier(ref cause) => cause,
GetMergeConflictsError::MergeOptionRequired(ref cause) => cause,
GetMergeConflictsError::RepositoryDoesNotExist(ref cause) => cause,
GetMergeConflictsError::RepositoryNameRequired(ref cause) => cause,
GetMergeConflictsError::TipsDivergenceExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetPullRequestError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidPullRequestId(String),
PullRequestDoesNotExist(String),
PullRequestIdRequired(String),
}
impl GetPullRequestError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPullRequestError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
GetPullRequestError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(GetPullRequestError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(GetPullRequestError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(GetPullRequestError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(GetPullRequestError::EncryptionKeyUnavailable(
err.msg,
))
}
"InvalidPullRequestIdException" => {
return RusotoError::Service(GetPullRequestError::InvalidPullRequestId(err.msg))
}
"PullRequestDoesNotExistException" => {
return RusotoError::Service(GetPullRequestError::PullRequestDoesNotExist(
err.msg,
))
}
"PullRequestIdRequiredException" => {
return RusotoError::Service(GetPullRequestError::PullRequestIdRequired(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetPullRequestError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetPullRequestError {
fn description(&self) -> &str {
match *self {
GetPullRequestError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetPullRequestError::EncryptionKeyAccessDenied(ref cause) => cause,
GetPullRequestError::EncryptionKeyDisabled(ref cause) => cause,
GetPullRequestError::EncryptionKeyNotFound(ref cause) => cause,
GetPullRequestError::EncryptionKeyUnavailable(ref cause) => cause,
GetPullRequestError::InvalidPullRequestId(ref cause) => cause,
GetPullRequestError::PullRequestDoesNotExist(ref cause) => cause,
GetPullRequestError::PullRequestIdRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRepositoryError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl GetRepositoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRepositoryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
GetRepositoryError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(GetRepositoryError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(GetRepositoryError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(GetRepositoryError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(GetRepositoryError::EncryptionKeyUnavailable(
err.msg,
))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(GetRepositoryError::InvalidRepositoryName(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(GetRepositoryError::RepositoryDoesNotExist(
err.msg,
))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(GetRepositoryError::RepositoryNameRequired(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRepositoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRepositoryError {
fn description(&self) -> &str {
match *self {
GetRepositoryError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetRepositoryError::EncryptionKeyAccessDenied(ref cause) => cause,
GetRepositoryError::EncryptionKeyDisabled(ref cause) => cause,
GetRepositoryError::EncryptionKeyNotFound(ref cause) => cause,
GetRepositoryError::EncryptionKeyUnavailable(ref cause) => cause,
GetRepositoryError::InvalidRepositoryName(ref cause) => cause,
GetRepositoryError::RepositoryDoesNotExist(ref cause) => cause,
GetRepositoryError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRepositoryTriggersError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl GetRepositoryTriggersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRepositoryTriggersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
GetRepositoryTriggersError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
GetRepositoryTriggersError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(GetRepositoryTriggersError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(GetRepositoryTriggersError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
GetRepositoryTriggersError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(GetRepositoryTriggersError::InvalidRepositoryName(
err.msg,
))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(
GetRepositoryTriggersError::RepositoryDoesNotExist(err.msg),
)
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(
GetRepositoryTriggersError::RepositoryNameRequired(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRepositoryTriggersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRepositoryTriggersError {
fn description(&self) -> &str {
match *self {
GetRepositoryTriggersError::EncryptionIntegrityChecksFailed(ref cause) => cause,
GetRepositoryTriggersError::EncryptionKeyAccessDenied(ref cause) => cause,
GetRepositoryTriggersError::EncryptionKeyDisabled(ref cause) => cause,
GetRepositoryTriggersError::EncryptionKeyNotFound(ref cause) => cause,
GetRepositoryTriggersError::EncryptionKeyUnavailable(ref cause) => cause,
GetRepositoryTriggersError::InvalidRepositoryName(ref cause) => cause,
GetRepositoryTriggersError::RepositoryDoesNotExist(ref cause) => cause,
GetRepositoryTriggersError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListBranchesError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidContinuationToken(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl ListBranchesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBranchesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
ListBranchesError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(ListBranchesError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(ListBranchesError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(ListBranchesError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(ListBranchesError::EncryptionKeyUnavailable(
err.msg,
))
}
"InvalidContinuationTokenException" => {
return RusotoError::Service(ListBranchesError::InvalidContinuationToken(
err.msg,
))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(ListBranchesError::InvalidRepositoryName(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(ListBranchesError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(ListBranchesError::RepositoryNameRequired(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListBranchesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListBranchesError {
fn description(&self) -> &str {
match *self {
ListBranchesError::EncryptionIntegrityChecksFailed(ref cause) => cause,
ListBranchesError::EncryptionKeyAccessDenied(ref cause) => cause,
ListBranchesError::EncryptionKeyDisabled(ref cause) => cause,
ListBranchesError::EncryptionKeyNotFound(ref cause) => cause,
ListBranchesError::EncryptionKeyUnavailable(ref cause) => cause,
ListBranchesError::InvalidContinuationToken(ref cause) => cause,
ListBranchesError::InvalidRepositoryName(ref cause) => cause,
ListBranchesError::RepositoryDoesNotExist(ref cause) => cause,
ListBranchesError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPullRequestsError {
AuthorDoesNotExist(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidAuthorArn(String),
InvalidContinuationToken(String),
InvalidMaxResults(String),
InvalidPullRequestStatus(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl ListPullRequestsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPullRequestsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorDoesNotExistException" => {
return RusotoError::Service(ListPullRequestsError::AuthorDoesNotExist(err.msg))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
ListPullRequestsError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(ListPullRequestsError::EncryptionKeyAccessDenied(
err.msg,
))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(ListPullRequestsError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(ListPullRequestsError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(ListPullRequestsError::EncryptionKeyUnavailable(
err.msg,
))
}
"InvalidAuthorArnException" => {
return RusotoError::Service(ListPullRequestsError::InvalidAuthorArn(err.msg))
}
"InvalidContinuationTokenException" => {
return RusotoError::Service(ListPullRequestsError::InvalidContinuationToken(
err.msg,
))
}
"InvalidMaxResultsException" => {
return RusotoError::Service(ListPullRequestsError::InvalidMaxResults(err.msg))
}
"InvalidPullRequestStatusException" => {
return RusotoError::Service(ListPullRequestsError::InvalidPullRequestStatus(
err.msg,
))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(ListPullRequestsError::InvalidRepositoryName(
err.msg,
))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(ListPullRequestsError::RepositoryDoesNotExist(
err.msg,
))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(ListPullRequestsError::RepositoryNameRequired(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListPullRequestsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPullRequestsError {
fn description(&self) -> &str {
match *self {
ListPullRequestsError::AuthorDoesNotExist(ref cause) => cause,
ListPullRequestsError::EncryptionIntegrityChecksFailed(ref cause) => cause,
ListPullRequestsError::EncryptionKeyAccessDenied(ref cause) => cause,
ListPullRequestsError::EncryptionKeyDisabled(ref cause) => cause,
ListPullRequestsError::EncryptionKeyNotFound(ref cause) => cause,
ListPullRequestsError::EncryptionKeyUnavailable(ref cause) => cause,
ListPullRequestsError::InvalidAuthorArn(ref cause) => cause,
ListPullRequestsError::InvalidContinuationToken(ref cause) => cause,
ListPullRequestsError::InvalidMaxResults(ref cause) => cause,
ListPullRequestsError::InvalidPullRequestStatus(ref cause) => cause,
ListPullRequestsError::InvalidRepositoryName(ref cause) => cause,
ListPullRequestsError::RepositoryDoesNotExist(ref cause) => cause,
ListPullRequestsError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListRepositoriesError {
InvalidContinuationToken(String),
InvalidOrder(String),
InvalidSortBy(String),
}
impl ListRepositoriesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRepositoriesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidContinuationTokenException" => {
return RusotoError::Service(ListRepositoriesError::InvalidContinuationToken(
err.msg,
))
}
"InvalidOrderException" => {
return RusotoError::Service(ListRepositoriesError::InvalidOrder(err.msg))
}
"InvalidSortByException" => {
return RusotoError::Service(ListRepositoriesError::InvalidSortBy(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListRepositoriesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListRepositoriesError {
fn description(&self) -> &str {
match *self {
ListRepositoriesError::InvalidContinuationToken(ref cause) => cause,
ListRepositoriesError::InvalidOrder(ref cause) => cause,
ListRepositoriesError::InvalidSortBy(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
InvalidRepositoryName(String),
InvalidResourceArn(String),
RepositoryDoesNotExist(String),
ResourceArnRequired(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidRepositoryNameException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidRepositoryName(
err.msg,
))
}
"InvalidResourceArnException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidResourceArn(
err.msg,
))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(ListTagsForResourceError::RepositoryDoesNotExist(
err.msg,
))
}
"ResourceArnRequiredException" => {
return RusotoError::Service(ListTagsForResourceError::ResourceArnRequired(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::InvalidRepositoryName(ref cause) => cause,
ListTagsForResourceError::InvalidResourceArn(ref cause) => cause,
ListTagsForResourceError::RepositoryDoesNotExist(ref cause) => cause,
ListTagsForResourceError::ResourceArnRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum MergePullRequestByFastForwardError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidCommitId(String),
InvalidPullRequestId(String),
InvalidRepositoryName(String),
ManualMergeRequired(String),
PullRequestAlreadyClosed(String),
PullRequestDoesNotExist(String),
PullRequestIdRequired(String),
ReferenceDoesNotExist(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
TipOfSourceReferenceIsDifferent(String),
}
impl MergePullRequestByFastForwardError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<MergePullRequestByFastForwardError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::EncryptionIntegrityChecksFailed(
err.msg,
),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::EncryptionKeyDisabled(err.msg),
)
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::EncryptionKeyNotFound(err.msg),
)
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidCommitIdException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::InvalidCommitId(err.msg),
)
}
"InvalidPullRequestIdException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::InvalidPullRequestId(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::InvalidRepositoryName(err.msg),
)
}
"ManualMergeRequiredException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::ManualMergeRequired(err.msg),
)
}
"PullRequestAlreadyClosedException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::PullRequestAlreadyClosed(err.msg),
)
}
"PullRequestDoesNotExistException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::PullRequestDoesNotExist(err.msg),
)
}
"PullRequestIdRequiredException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::PullRequestIdRequired(err.msg),
)
}
"ReferenceDoesNotExistException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::ReferenceDoesNotExist(err.msg),
)
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::RepositoryDoesNotExist(err.msg),
)
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::RepositoryNameRequired(err.msg),
)
}
"TipOfSourceReferenceIsDifferentException" => {
return RusotoError::Service(
MergePullRequestByFastForwardError::TipOfSourceReferenceIsDifferent(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for MergePullRequestByFastForwardError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for MergePullRequestByFastForwardError {
fn description(&self) -> &str {
match *self {
MergePullRequestByFastForwardError::EncryptionIntegrityChecksFailed(ref cause) => cause,
MergePullRequestByFastForwardError::EncryptionKeyAccessDenied(ref cause) => cause,
MergePullRequestByFastForwardError::EncryptionKeyDisabled(ref cause) => cause,
MergePullRequestByFastForwardError::EncryptionKeyNotFound(ref cause) => cause,
MergePullRequestByFastForwardError::EncryptionKeyUnavailable(ref cause) => cause,
MergePullRequestByFastForwardError::InvalidCommitId(ref cause) => cause,
MergePullRequestByFastForwardError::InvalidPullRequestId(ref cause) => cause,
MergePullRequestByFastForwardError::InvalidRepositoryName(ref cause) => cause,
MergePullRequestByFastForwardError::ManualMergeRequired(ref cause) => cause,
MergePullRequestByFastForwardError::PullRequestAlreadyClosed(ref cause) => cause,
MergePullRequestByFastForwardError::PullRequestDoesNotExist(ref cause) => cause,
MergePullRequestByFastForwardError::PullRequestIdRequired(ref cause) => cause,
MergePullRequestByFastForwardError::ReferenceDoesNotExist(ref cause) => cause,
MergePullRequestByFastForwardError::RepositoryDoesNotExist(ref cause) => cause,
MergePullRequestByFastForwardError::RepositoryNameRequired(ref cause) => cause,
MergePullRequestByFastForwardError::TipOfSourceReferenceIsDifferent(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PostCommentForComparedCommitError {
BeforeCommitIdAndAfterCommitIdAreSame(String),
ClientRequestTokenRequired(String),
CommentContentRequired(String),
CommentContentSizeLimitExceeded(String),
CommitDoesNotExist(String),
CommitIdRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
IdempotencyParameterMismatch(String),
InvalidClientRequestToken(String),
InvalidCommitId(String),
InvalidFileLocation(String),
InvalidFilePosition(String),
InvalidPath(String),
InvalidRelativeFileVersionEnum(String),
InvalidRepositoryName(String),
PathDoesNotExist(String),
PathRequired(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl PostCommentForComparedCommitError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PostCommentForComparedCommitError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"BeforeCommitIdAndAfterCommitIdAreSameException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::BeforeCommitIdAndAfterCommitIdAreSame(
err.msg,
),
)
}
"ClientRequestTokenRequiredException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::ClientRequestTokenRequired(err.msg),
)
}
"CommentContentRequiredException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::CommentContentRequired(err.msg),
)
}
"CommentContentSizeLimitExceededException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::CommentContentSizeLimitExceeded(err.msg),
)
}
"CommitDoesNotExistException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::CommitDoesNotExist(err.msg),
)
}
"CommitIdRequiredException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::CommitIdRequired(err.msg),
)
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::EncryptionKeyDisabled(err.msg),
)
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::EncryptionKeyNotFound(err.msg),
)
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::EncryptionKeyUnavailable(err.msg),
)
}
"IdempotencyParameterMismatchException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::IdempotencyParameterMismatch(err.msg),
)
}
"InvalidClientRequestTokenException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::InvalidClientRequestToken(err.msg),
)
}
"InvalidCommitIdException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::InvalidCommitId(err.msg),
)
}
"InvalidFileLocationException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::InvalidFileLocation(err.msg),
)
}
"InvalidFilePositionException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::InvalidFilePosition(err.msg),
)
}
"InvalidPathException" => {
return RusotoError::Service(PostCommentForComparedCommitError::InvalidPath(
err.msg,
))
}
"InvalidRelativeFileVersionEnumException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::InvalidRelativeFileVersionEnum(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::InvalidRepositoryName(err.msg),
)
}
"PathDoesNotExistException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::PathDoesNotExist(err.msg),
)
}
"PathRequiredException" => {
return RusotoError::Service(PostCommentForComparedCommitError::PathRequired(
err.msg,
))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::RepositoryDoesNotExist(err.msg),
)
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(
PostCommentForComparedCommitError::RepositoryNameRequired(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PostCommentForComparedCommitError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PostCommentForComparedCommitError {
fn description(&self) -> &str {
match *self {
PostCommentForComparedCommitError::BeforeCommitIdAndAfterCommitIdAreSame(ref cause) => {
cause
}
PostCommentForComparedCommitError::ClientRequestTokenRequired(ref cause) => cause,
PostCommentForComparedCommitError::CommentContentRequired(ref cause) => cause,
PostCommentForComparedCommitError::CommentContentSizeLimitExceeded(ref cause) => cause,
PostCommentForComparedCommitError::CommitDoesNotExist(ref cause) => cause,
PostCommentForComparedCommitError::CommitIdRequired(ref cause) => cause,
PostCommentForComparedCommitError::EncryptionIntegrityChecksFailed(ref cause) => cause,
PostCommentForComparedCommitError::EncryptionKeyAccessDenied(ref cause) => cause,
PostCommentForComparedCommitError::EncryptionKeyDisabled(ref cause) => cause,
PostCommentForComparedCommitError::EncryptionKeyNotFound(ref cause) => cause,
PostCommentForComparedCommitError::EncryptionKeyUnavailable(ref cause) => cause,
PostCommentForComparedCommitError::IdempotencyParameterMismatch(ref cause) => cause,
PostCommentForComparedCommitError::InvalidClientRequestToken(ref cause) => cause,
PostCommentForComparedCommitError::InvalidCommitId(ref cause) => cause,
PostCommentForComparedCommitError::InvalidFileLocation(ref cause) => cause,
PostCommentForComparedCommitError::InvalidFilePosition(ref cause) => cause,
PostCommentForComparedCommitError::InvalidPath(ref cause) => cause,
PostCommentForComparedCommitError::InvalidRelativeFileVersionEnum(ref cause) => cause,
PostCommentForComparedCommitError::InvalidRepositoryName(ref cause) => cause,
PostCommentForComparedCommitError::PathDoesNotExist(ref cause) => cause,
PostCommentForComparedCommitError::PathRequired(ref cause) => cause,
PostCommentForComparedCommitError::RepositoryDoesNotExist(ref cause) => cause,
PostCommentForComparedCommitError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PostCommentForPullRequestError {
BeforeCommitIdAndAfterCommitIdAreSame(String),
ClientRequestTokenRequired(String),
CommentContentRequired(String),
CommentContentSizeLimitExceeded(String),
CommitDoesNotExist(String),
CommitIdRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
IdempotencyParameterMismatch(String),
InvalidClientRequestToken(String),
InvalidCommitId(String),
InvalidFileLocation(String),
InvalidFilePosition(String),
InvalidPath(String),
InvalidPullRequestId(String),
InvalidRelativeFileVersionEnum(String),
InvalidRepositoryName(String),
PathDoesNotExist(String),
PathRequired(String),
PullRequestDoesNotExist(String),
PullRequestIdRequired(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
RepositoryNotAssociatedWithPullRequest(String),
}
impl PostCommentForPullRequestError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PostCommentForPullRequestError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"BeforeCommitIdAndAfterCommitIdAreSameException" => {
return RusotoError::Service(
PostCommentForPullRequestError::BeforeCommitIdAndAfterCommitIdAreSame(
err.msg,
),
)
}
"ClientRequestTokenRequiredException" => {
return RusotoError::Service(
PostCommentForPullRequestError::ClientRequestTokenRequired(err.msg),
)
}
"CommentContentRequiredException" => {
return RusotoError::Service(
PostCommentForPullRequestError::CommentContentRequired(err.msg),
)
}
"CommentContentSizeLimitExceededException" => {
return RusotoError::Service(
PostCommentForPullRequestError::CommentContentSizeLimitExceeded(err.msg),
)
}
"CommitDoesNotExistException" => {
return RusotoError::Service(
PostCommentForPullRequestError::CommitDoesNotExist(err.msg),
)
}
"CommitIdRequiredException" => {
return RusotoError::Service(PostCommentForPullRequestError::CommitIdRequired(
err.msg,
))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
PostCommentForPullRequestError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
PostCommentForPullRequestError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(
PostCommentForPullRequestError::EncryptionKeyDisabled(err.msg),
)
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(
PostCommentForPullRequestError::EncryptionKeyNotFound(err.msg),
)
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
PostCommentForPullRequestError::EncryptionKeyUnavailable(err.msg),
)
}
"IdempotencyParameterMismatchException" => {
return RusotoError::Service(
PostCommentForPullRequestError::IdempotencyParameterMismatch(err.msg),
)
}
"InvalidClientRequestTokenException" => {
return RusotoError::Service(
PostCommentForPullRequestError::InvalidClientRequestToken(err.msg),
)
}
"InvalidCommitIdException" => {
return RusotoError::Service(PostCommentForPullRequestError::InvalidCommitId(
err.msg,
))
}
"InvalidFileLocationException" => {
return RusotoError::Service(
PostCommentForPullRequestError::InvalidFileLocation(err.msg),
)
}
"InvalidFilePositionException" => {
return RusotoError::Service(
PostCommentForPullRequestError::InvalidFilePosition(err.msg),
)
}
"InvalidPathException" => {
return RusotoError::Service(PostCommentForPullRequestError::InvalidPath(
err.msg,
))
}
"InvalidPullRequestIdException" => {
return RusotoError::Service(
PostCommentForPullRequestError::InvalidPullRequestId(err.msg),
)
}
"InvalidRelativeFileVersionEnumException" => {
return RusotoError::Service(
PostCommentForPullRequestError::InvalidRelativeFileVersionEnum(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(
PostCommentForPullRequestError::InvalidRepositoryName(err.msg),
)
}
"PathDoesNotExistException" => {
return RusotoError::Service(PostCommentForPullRequestError::PathDoesNotExist(
err.msg,
))
}
"PathRequiredException" => {
return RusotoError::Service(PostCommentForPullRequestError::PathRequired(
err.msg,
))
}
"PullRequestDoesNotExistException" => {
return RusotoError::Service(
PostCommentForPullRequestError::PullRequestDoesNotExist(err.msg),
)
}
"PullRequestIdRequiredException" => {
return RusotoError::Service(
PostCommentForPullRequestError::PullRequestIdRequired(err.msg),
)
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(
PostCommentForPullRequestError::RepositoryDoesNotExist(err.msg),
)
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(
PostCommentForPullRequestError::RepositoryNameRequired(err.msg),
)
}
"RepositoryNotAssociatedWithPullRequestException" => {
return RusotoError::Service(
PostCommentForPullRequestError::RepositoryNotAssociatedWithPullRequest(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PostCommentForPullRequestError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PostCommentForPullRequestError {
fn description(&self) -> &str {
match *self {
PostCommentForPullRequestError::BeforeCommitIdAndAfterCommitIdAreSame(ref cause) => {
cause
}
PostCommentForPullRequestError::ClientRequestTokenRequired(ref cause) => cause,
PostCommentForPullRequestError::CommentContentRequired(ref cause) => cause,
PostCommentForPullRequestError::CommentContentSizeLimitExceeded(ref cause) => cause,
PostCommentForPullRequestError::CommitDoesNotExist(ref cause) => cause,
PostCommentForPullRequestError::CommitIdRequired(ref cause) => cause,
PostCommentForPullRequestError::EncryptionIntegrityChecksFailed(ref cause) => cause,
PostCommentForPullRequestError::EncryptionKeyAccessDenied(ref cause) => cause,
PostCommentForPullRequestError::EncryptionKeyDisabled(ref cause) => cause,
PostCommentForPullRequestError::EncryptionKeyNotFound(ref cause) => cause,
PostCommentForPullRequestError::EncryptionKeyUnavailable(ref cause) => cause,
PostCommentForPullRequestError::IdempotencyParameterMismatch(ref cause) => cause,
PostCommentForPullRequestError::InvalidClientRequestToken(ref cause) => cause,
PostCommentForPullRequestError::InvalidCommitId(ref cause) => cause,
PostCommentForPullRequestError::InvalidFileLocation(ref cause) => cause,
PostCommentForPullRequestError::InvalidFilePosition(ref cause) => cause,
PostCommentForPullRequestError::InvalidPath(ref cause) => cause,
PostCommentForPullRequestError::InvalidPullRequestId(ref cause) => cause,
PostCommentForPullRequestError::InvalidRelativeFileVersionEnum(ref cause) => cause,
PostCommentForPullRequestError::InvalidRepositoryName(ref cause) => cause,
PostCommentForPullRequestError::PathDoesNotExist(ref cause) => cause,
PostCommentForPullRequestError::PathRequired(ref cause) => cause,
PostCommentForPullRequestError::PullRequestDoesNotExist(ref cause) => cause,
PostCommentForPullRequestError::PullRequestIdRequired(ref cause) => cause,
PostCommentForPullRequestError::RepositoryDoesNotExist(ref cause) => cause,
PostCommentForPullRequestError::RepositoryNameRequired(ref cause) => cause,
PostCommentForPullRequestError::RepositoryNotAssociatedWithPullRequest(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum PostCommentReplyError {
ClientRequestTokenRequired(String),
CommentContentRequired(String),
CommentContentSizeLimitExceeded(String),
CommentDoesNotExist(String),
CommentIdRequired(String),
IdempotencyParameterMismatch(String),
InvalidClientRequestToken(String),
InvalidCommentId(String),
}
impl PostCommentReplyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PostCommentReplyError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientRequestTokenRequiredException" => {
return RusotoError::Service(PostCommentReplyError::ClientRequestTokenRequired(
err.msg,
))
}
"CommentContentRequiredException" => {
return RusotoError::Service(PostCommentReplyError::CommentContentRequired(
err.msg,
))
}
"CommentContentSizeLimitExceededException" => {
return RusotoError::Service(
PostCommentReplyError::CommentContentSizeLimitExceeded(err.msg),
)
}
"CommentDoesNotExistException" => {
return RusotoError::Service(PostCommentReplyError::CommentDoesNotExist(
err.msg,
))
}
"CommentIdRequiredException" => {
return RusotoError::Service(PostCommentReplyError::CommentIdRequired(err.msg))
}
"IdempotencyParameterMismatchException" => {
return RusotoError::Service(
PostCommentReplyError::IdempotencyParameterMismatch(err.msg),
)
}
"InvalidClientRequestTokenException" => {
return RusotoError::Service(PostCommentReplyError::InvalidClientRequestToken(
err.msg,
))
}
"InvalidCommentIdException" => {
return RusotoError::Service(PostCommentReplyError::InvalidCommentId(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PostCommentReplyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PostCommentReplyError {
fn description(&self) -> &str {
match *self {
PostCommentReplyError::ClientRequestTokenRequired(ref cause) => cause,
PostCommentReplyError::CommentContentRequired(ref cause) => cause,
PostCommentReplyError::CommentContentSizeLimitExceeded(ref cause) => cause,
PostCommentReplyError::CommentDoesNotExist(ref cause) => cause,
PostCommentReplyError::CommentIdRequired(ref cause) => cause,
PostCommentReplyError::IdempotencyParameterMismatch(ref cause) => cause,
PostCommentReplyError::InvalidClientRequestToken(ref cause) => cause,
PostCommentReplyError::InvalidCommentId(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutFileError {
BranchDoesNotExist(String),
BranchNameIsTagName(String),
BranchNameRequired(String),
CommitMessageLengthExceeded(String),
DirectoryNameConflictsWithFileName(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
FileContentRequired(String),
FileContentSizeLimitExceeded(String),
FileNameConflictsWithDirectoryName(String),
FilePathConflictsWithSubmodulePath(String),
FolderContentSizeLimitExceeded(String),
InvalidBranchName(String),
InvalidDeletionParameter(String),
InvalidEmail(String),
InvalidFileMode(String),
InvalidParentCommitId(String),
InvalidPath(String),
InvalidRepositoryName(String),
NameLengthExceeded(String),
ParentCommitDoesNotExist(String),
ParentCommitIdOutdated(String),
ParentCommitIdRequired(String),
PathRequired(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
SameFileContent(String),
}
impl PutFileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutFileError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"BranchDoesNotExistException" => {
return RusotoError::Service(PutFileError::BranchDoesNotExist(err.msg))
}
"BranchNameIsTagNameException" => {
return RusotoError::Service(PutFileError::BranchNameIsTagName(err.msg))
}
"BranchNameRequiredException" => {
return RusotoError::Service(PutFileError::BranchNameRequired(err.msg))
}
"CommitMessageLengthExceededException" => {
return RusotoError::Service(PutFileError::CommitMessageLengthExceeded(err.msg))
}
"DirectoryNameConflictsWithFileNameException" => {
return RusotoError::Service(PutFileError::DirectoryNameConflictsWithFileName(
err.msg,
))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(PutFileError::EncryptionIntegrityChecksFailed(
err.msg,
))
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(PutFileError::EncryptionKeyAccessDenied(err.msg))
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(PutFileError::EncryptionKeyDisabled(err.msg))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(PutFileError::EncryptionKeyNotFound(err.msg))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(PutFileError::EncryptionKeyUnavailable(err.msg))
}
"FileContentRequiredException" => {
return RusotoError::Service(PutFileError::FileContentRequired(err.msg))
}
"FileContentSizeLimitExceededException" => {
return RusotoError::Service(PutFileError::FileContentSizeLimitExceeded(
err.msg,
))
}
"FileNameConflictsWithDirectoryNameException" => {
return RusotoError::Service(PutFileError::FileNameConflictsWithDirectoryName(
err.msg,
))
}
"FilePathConflictsWithSubmodulePathException" => {
return RusotoError::Service(PutFileError::FilePathConflictsWithSubmodulePath(
err.msg,
))
}
"FolderContentSizeLimitExceededException" => {
return RusotoError::Service(PutFileError::FolderContentSizeLimitExceeded(
err.msg,
))
}
"InvalidBranchNameException" => {
return RusotoError::Service(PutFileError::InvalidBranchName(err.msg))
}
"InvalidDeletionParameterException" => {
return RusotoError::Service(PutFileError::InvalidDeletionParameter(err.msg))
}
"InvalidEmailException" => {
return RusotoError::Service(PutFileError::InvalidEmail(err.msg))
}
"InvalidFileModeException" => {
return RusotoError::Service(PutFileError::InvalidFileMode(err.msg))
}
"InvalidParentCommitIdException" => {
return RusotoError::Service(PutFileError::InvalidParentCommitId(err.msg))
}
"InvalidPathException" => {
return RusotoError::Service(PutFileError::InvalidPath(err.msg))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(PutFileError::InvalidRepositoryName(err.msg))
}
"NameLengthExceededException" => {
return RusotoError::Service(PutFileError::NameLengthExceeded(err.msg))
}
"ParentCommitDoesNotExistException" => {
return RusotoError::Service(PutFileError::ParentCommitDoesNotExist(err.msg))
}
"ParentCommitIdOutdatedException" => {
return RusotoError::Service(PutFileError::ParentCommitIdOutdated(err.msg))
}
"ParentCommitIdRequiredException" => {
return RusotoError::Service(PutFileError::ParentCommitIdRequired(err.msg))
}
"PathRequiredException" => {
return RusotoError::Service(PutFileError::PathRequired(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(PutFileError::RepositoryDoesNotExist(err.msg))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(PutFileError::RepositoryNameRequired(err.msg))
}
"SameFileContentException" => {
return RusotoError::Service(PutFileError::SameFileContent(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutFileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutFileError {
fn description(&self) -> &str {
match *self {
PutFileError::BranchDoesNotExist(ref cause) => cause,
PutFileError::BranchNameIsTagName(ref cause) => cause,
PutFileError::BranchNameRequired(ref cause) => cause,
PutFileError::CommitMessageLengthExceeded(ref cause) => cause,
PutFileError::DirectoryNameConflictsWithFileName(ref cause) => cause,
PutFileError::EncryptionIntegrityChecksFailed(ref cause) => cause,
PutFileError::EncryptionKeyAccessDenied(ref cause) => cause,
PutFileError::EncryptionKeyDisabled(ref cause) => cause,
PutFileError::EncryptionKeyNotFound(ref cause) => cause,
PutFileError::EncryptionKeyUnavailable(ref cause) => cause,
PutFileError::FileContentRequired(ref cause) => cause,
PutFileError::FileContentSizeLimitExceeded(ref cause) => cause,
PutFileError::FileNameConflictsWithDirectoryName(ref cause) => cause,
PutFileError::FilePathConflictsWithSubmodulePath(ref cause) => cause,
PutFileError::FolderContentSizeLimitExceeded(ref cause) => cause,
PutFileError::InvalidBranchName(ref cause) => cause,
PutFileError::InvalidDeletionParameter(ref cause) => cause,
PutFileError::InvalidEmail(ref cause) => cause,
PutFileError::InvalidFileMode(ref cause) => cause,
PutFileError::InvalidParentCommitId(ref cause) => cause,
PutFileError::InvalidPath(ref cause) => cause,
PutFileError::InvalidRepositoryName(ref cause) => cause,
PutFileError::NameLengthExceeded(ref cause) => cause,
PutFileError::ParentCommitDoesNotExist(ref cause) => cause,
PutFileError::ParentCommitIdOutdated(ref cause) => cause,
PutFileError::ParentCommitIdRequired(ref cause) => cause,
PutFileError::PathRequired(ref cause) => cause,
PutFileError::RepositoryDoesNotExist(ref cause) => cause,
PutFileError::RepositoryNameRequired(ref cause) => cause,
PutFileError::SameFileContent(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutRepositoryTriggersError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidRepositoryName(String),
InvalidRepositoryTriggerBranchName(String),
InvalidRepositoryTriggerCustomData(String),
InvalidRepositoryTriggerDestinationArn(String),
InvalidRepositoryTriggerEvents(String),
InvalidRepositoryTriggerName(String),
InvalidRepositoryTriggerRegion(String),
MaximumBranchesExceeded(String),
MaximumRepositoryTriggersExceeded(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
RepositoryTriggerBranchNameListRequired(String),
RepositoryTriggerDestinationArnRequired(String),
RepositoryTriggerEventsListRequired(String),
RepositoryTriggerNameRequired(String),
RepositoryTriggersListRequired(String),
}
impl PutRepositoryTriggersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutRepositoryTriggersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
PutRepositoryTriggersError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
PutRepositoryTriggersError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(PutRepositoryTriggersError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(PutRepositoryTriggersError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
PutRepositoryTriggersError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(PutRepositoryTriggersError::InvalidRepositoryName(
err.msg,
))
}
"InvalidRepositoryTriggerBranchNameException" => {
return RusotoError::Service(
PutRepositoryTriggersError::InvalidRepositoryTriggerBranchName(err.msg),
)
}
"InvalidRepositoryTriggerCustomDataException" => {
return RusotoError::Service(
PutRepositoryTriggersError::InvalidRepositoryTriggerCustomData(err.msg),
)
}
"InvalidRepositoryTriggerDestinationArnException" => {
return RusotoError::Service(
PutRepositoryTriggersError::InvalidRepositoryTriggerDestinationArn(err.msg),
)
}
"InvalidRepositoryTriggerEventsException" => {
return RusotoError::Service(
PutRepositoryTriggersError::InvalidRepositoryTriggerEvents(err.msg),
)
}
"InvalidRepositoryTriggerNameException" => {
return RusotoError::Service(
PutRepositoryTriggersError::InvalidRepositoryTriggerName(err.msg),
)
}
"InvalidRepositoryTriggerRegionException" => {
return RusotoError::Service(
PutRepositoryTriggersError::InvalidRepositoryTriggerRegion(err.msg),
)
}
"MaximumBranchesExceededException" => {
return RusotoError::Service(
PutRepositoryTriggersError::MaximumBranchesExceeded(err.msg),
)
}
"MaximumRepositoryTriggersExceededException" => {
return RusotoError::Service(
PutRepositoryTriggersError::MaximumRepositoryTriggersExceeded(err.msg),
)
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(
PutRepositoryTriggersError::RepositoryDoesNotExist(err.msg),
)
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(
PutRepositoryTriggersError::RepositoryNameRequired(err.msg),
)
}
"RepositoryTriggerBranchNameListRequiredException" => {
return RusotoError::Service(
PutRepositoryTriggersError::RepositoryTriggerBranchNameListRequired(
err.msg,
),
)
}
"RepositoryTriggerDestinationArnRequiredException" => {
return RusotoError::Service(
PutRepositoryTriggersError::RepositoryTriggerDestinationArnRequired(
err.msg,
),
)
}
"RepositoryTriggerEventsListRequiredException" => {
return RusotoError::Service(
PutRepositoryTriggersError::RepositoryTriggerEventsListRequired(err.msg),
)
}
"RepositoryTriggerNameRequiredException" => {
return RusotoError::Service(
PutRepositoryTriggersError::RepositoryTriggerNameRequired(err.msg),
)
}
"RepositoryTriggersListRequiredException" => {
return RusotoError::Service(
PutRepositoryTriggersError::RepositoryTriggersListRequired(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutRepositoryTriggersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutRepositoryTriggersError {
fn description(&self) -> &str {
match *self {
PutRepositoryTriggersError::EncryptionIntegrityChecksFailed(ref cause) => cause,
PutRepositoryTriggersError::EncryptionKeyAccessDenied(ref cause) => cause,
PutRepositoryTriggersError::EncryptionKeyDisabled(ref cause) => cause,
PutRepositoryTriggersError::EncryptionKeyNotFound(ref cause) => cause,
PutRepositoryTriggersError::EncryptionKeyUnavailable(ref cause) => cause,
PutRepositoryTriggersError::InvalidRepositoryName(ref cause) => cause,
PutRepositoryTriggersError::InvalidRepositoryTriggerBranchName(ref cause) => cause,
PutRepositoryTriggersError::InvalidRepositoryTriggerCustomData(ref cause) => cause,
PutRepositoryTriggersError::InvalidRepositoryTriggerDestinationArn(ref cause) => cause,
PutRepositoryTriggersError::InvalidRepositoryTriggerEvents(ref cause) => cause,
PutRepositoryTriggersError::InvalidRepositoryTriggerName(ref cause) => cause,
PutRepositoryTriggersError::InvalidRepositoryTriggerRegion(ref cause) => cause,
PutRepositoryTriggersError::MaximumBranchesExceeded(ref cause) => cause,
PutRepositoryTriggersError::MaximumRepositoryTriggersExceeded(ref cause) => cause,
PutRepositoryTriggersError::RepositoryDoesNotExist(ref cause) => cause,
PutRepositoryTriggersError::RepositoryNameRequired(ref cause) => cause,
PutRepositoryTriggersError::RepositoryTriggerBranchNameListRequired(ref cause) => cause,
PutRepositoryTriggersError::RepositoryTriggerDestinationArnRequired(ref cause) => cause,
PutRepositoryTriggersError::RepositoryTriggerEventsListRequired(ref cause) => cause,
PutRepositoryTriggersError::RepositoryTriggerNameRequired(ref cause) => cause,
PutRepositoryTriggersError::RepositoryTriggersListRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
InvalidRepositoryName(String),
InvalidResourceArn(String),
InvalidSystemTagUsage(String),
InvalidTagsMap(String),
RepositoryDoesNotExist(String),
ResourceArnRequired(String),
TagPolicy(String),
TagsMapRequired(String),
TooManyTags(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidRepositoryNameException" => {
return RusotoError::Service(TagResourceError::InvalidRepositoryName(err.msg))
}
"InvalidResourceArnException" => {
return RusotoError::Service(TagResourceError::InvalidResourceArn(err.msg))
}
"InvalidSystemTagUsageException" => {
return RusotoError::Service(TagResourceError::InvalidSystemTagUsage(err.msg))
}
"InvalidTagsMapException" => {
return RusotoError::Service(TagResourceError::InvalidTagsMap(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(TagResourceError::RepositoryDoesNotExist(err.msg))
}
"ResourceArnRequiredException" => {
return RusotoError::Service(TagResourceError::ResourceArnRequired(err.msg))
}
"TagPolicyException" => {
return RusotoError::Service(TagResourceError::TagPolicy(err.msg))
}
"TagsMapRequiredException" => {
return RusotoError::Service(TagResourceError::TagsMapRequired(err.msg))
}
"TooManyTagsException" => {
return RusotoError::Service(TagResourceError::TooManyTags(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagResourceError {
fn description(&self) -> &str {
match *self {
TagResourceError::InvalidRepositoryName(ref cause) => cause,
TagResourceError::InvalidResourceArn(ref cause) => cause,
TagResourceError::InvalidSystemTagUsage(ref cause) => cause,
TagResourceError::InvalidTagsMap(ref cause) => cause,
TagResourceError::RepositoryDoesNotExist(ref cause) => cause,
TagResourceError::ResourceArnRequired(ref cause) => cause,
TagResourceError::TagPolicy(ref cause) => cause,
TagResourceError::TagsMapRequired(ref cause) => cause,
TagResourceError::TooManyTags(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TestRepositoryTriggersError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidRepositoryName(String),
InvalidRepositoryTriggerBranchName(String),
InvalidRepositoryTriggerCustomData(String),
InvalidRepositoryTriggerDestinationArn(String),
InvalidRepositoryTriggerEvents(String),
InvalidRepositoryTriggerName(String),
InvalidRepositoryTriggerRegion(String),
MaximumBranchesExceeded(String),
MaximumRepositoryTriggersExceeded(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
RepositoryTriggerBranchNameListRequired(String),
RepositoryTriggerDestinationArnRequired(String),
RepositoryTriggerEventsListRequired(String),
RepositoryTriggerNameRequired(String),
RepositoryTriggersListRequired(String),
}
impl TestRepositoryTriggersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TestRepositoryTriggersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
TestRepositoryTriggersError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
TestRepositoryTriggersError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(
TestRepositoryTriggersError::EncryptionKeyDisabled(err.msg),
)
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(
TestRepositoryTriggersError::EncryptionKeyNotFound(err.msg),
)
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
TestRepositoryTriggersError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(
TestRepositoryTriggersError::InvalidRepositoryName(err.msg),
)
}
"InvalidRepositoryTriggerBranchNameException" => {
return RusotoError::Service(
TestRepositoryTriggersError::InvalidRepositoryTriggerBranchName(err.msg),
)
}
"InvalidRepositoryTriggerCustomDataException" => {
return RusotoError::Service(
TestRepositoryTriggersError::InvalidRepositoryTriggerCustomData(err.msg),
)
}
"InvalidRepositoryTriggerDestinationArnException" => {
return RusotoError::Service(
TestRepositoryTriggersError::InvalidRepositoryTriggerDestinationArn(
err.msg,
),
)
}
"InvalidRepositoryTriggerEventsException" => {
return RusotoError::Service(
TestRepositoryTriggersError::InvalidRepositoryTriggerEvents(err.msg),
)
}
"InvalidRepositoryTriggerNameException" => {
return RusotoError::Service(
TestRepositoryTriggersError::InvalidRepositoryTriggerName(err.msg),
)
}
"InvalidRepositoryTriggerRegionException" => {
return RusotoError::Service(
TestRepositoryTriggersError::InvalidRepositoryTriggerRegion(err.msg),
)
}
"MaximumBranchesExceededException" => {
return RusotoError::Service(
TestRepositoryTriggersError::MaximumBranchesExceeded(err.msg),
)
}
"MaximumRepositoryTriggersExceededException" => {
return RusotoError::Service(
TestRepositoryTriggersError::MaximumRepositoryTriggersExceeded(err.msg),
)
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(
TestRepositoryTriggersError::RepositoryDoesNotExist(err.msg),
)
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(
TestRepositoryTriggersError::RepositoryNameRequired(err.msg),
)
}
"RepositoryTriggerBranchNameListRequiredException" => {
return RusotoError::Service(
TestRepositoryTriggersError::RepositoryTriggerBranchNameListRequired(
err.msg,
),
)
}
"RepositoryTriggerDestinationArnRequiredException" => {
return RusotoError::Service(
TestRepositoryTriggersError::RepositoryTriggerDestinationArnRequired(
err.msg,
),
)
}
"RepositoryTriggerEventsListRequiredException" => {
return RusotoError::Service(
TestRepositoryTriggersError::RepositoryTriggerEventsListRequired(err.msg),
)
}
"RepositoryTriggerNameRequiredException" => {
return RusotoError::Service(
TestRepositoryTriggersError::RepositoryTriggerNameRequired(err.msg),
)
}
"RepositoryTriggersListRequiredException" => {
return RusotoError::Service(
TestRepositoryTriggersError::RepositoryTriggersListRequired(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TestRepositoryTriggersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TestRepositoryTriggersError {
fn description(&self) -> &str {
match *self {
TestRepositoryTriggersError::EncryptionIntegrityChecksFailed(ref cause) => cause,
TestRepositoryTriggersError::EncryptionKeyAccessDenied(ref cause) => cause,
TestRepositoryTriggersError::EncryptionKeyDisabled(ref cause) => cause,
TestRepositoryTriggersError::EncryptionKeyNotFound(ref cause) => cause,
TestRepositoryTriggersError::EncryptionKeyUnavailable(ref cause) => cause,
TestRepositoryTriggersError::InvalidRepositoryName(ref cause) => cause,
TestRepositoryTriggersError::InvalidRepositoryTriggerBranchName(ref cause) => cause,
TestRepositoryTriggersError::InvalidRepositoryTriggerCustomData(ref cause) => cause,
TestRepositoryTriggersError::InvalidRepositoryTriggerDestinationArn(ref cause) => cause,
TestRepositoryTriggersError::InvalidRepositoryTriggerEvents(ref cause) => cause,
TestRepositoryTriggersError::InvalidRepositoryTriggerName(ref cause) => cause,
TestRepositoryTriggersError::InvalidRepositoryTriggerRegion(ref cause) => cause,
TestRepositoryTriggersError::MaximumBranchesExceeded(ref cause) => cause,
TestRepositoryTriggersError::MaximumRepositoryTriggersExceeded(ref cause) => cause,
TestRepositoryTriggersError::RepositoryDoesNotExist(ref cause) => cause,
TestRepositoryTriggersError::RepositoryNameRequired(ref cause) => cause,
TestRepositoryTriggersError::RepositoryTriggerBranchNameListRequired(ref cause) => {
cause
}
TestRepositoryTriggersError::RepositoryTriggerDestinationArnRequired(ref cause) => {
cause
}
TestRepositoryTriggersError::RepositoryTriggerEventsListRequired(ref cause) => cause,
TestRepositoryTriggersError::RepositoryTriggerNameRequired(ref cause) => cause,
TestRepositoryTriggersError::RepositoryTriggersListRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
InvalidRepositoryName(String),
InvalidResourceArn(String),
InvalidSystemTagUsage(String),
InvalidTagKeysList(String),
RepositoryDoesNotExist(String),
ResourceArnRequired(String),
TagKeysListRequired(String),
TagPolicy(String),
TooManyTags(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidRepositoryNameException" => {
return RusotoError::Service(UntagResourceError::InvalidRepositoryName(err.msg))
}
"InvalidResourceArnException" => {
return RusotoError::Service(UntagResourceError::InvalidResourceArn(err.msg))
}
"InvalidSystemTagUsageException" => {
return RusotoError::Service(UntagResourceError::InvalidSystemTagUsage(err.msg))
}
"InvalidTagKeysListException" => {
return RusotoError::Service(UntagResourceError::InvalidTagKeysList(err.msg))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(UntagResourceError::RepositoryDoesNotExist(
err.msg,
))
}
"ResourceArnRequiredException" => {
return RusotoError::Service(UntagResourceError::ResourceArnRequired(err.msg))
}
"TagKeysListRequiredException" => {
return RusotoError::Service(UntagResourceError::TagKeysListRequired(err.msg))
}
"TagPolicyException" => {
return RusotoError::Service(UntagResourceError::TagPolicy(err.msg))
}
"TooManyTagsException" => {
return RusotoError::Service(UntagResourceError::TooManyTags(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagResourceError {
fn description(&self) -> &str {
match *self {
UntagResourceError::InvalidRepositoryName(ref cause) => cause,
UntagResourceError::InvalidResourceArn(ref cause) => cause,
UntagResourceError::InvalidSystemTagUsage(ref cause) => cause,
UntagResourceError::InvalidTagKeysList(ref cause) => cause,
UntagResourceError::RepositoryDoesNotExist(ref cause) => cause,
UntagResourceError::ResourceArnRequired(ref cause) => cause,
UntagResourceError::TagKeysListRequired(ref cause) => cause,
UntagResourceError::TagPolicy(ref cause) => cause,
UntagResourceError::TooManyTags(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateCommentError {
CommentContentRequired(String),
CommentContentSizeLimitExceeded(String),
CommentDeleted(String),
CommentDoesNotExist(String),
CommentIdRequired(String),
CommentNotCreatedByCaller(String),
InvalidCommentId(String),
}
impl UpdateCommentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateCommentError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"CommentContentRequiredException" => {
return RusotoError::Service(UpdateCommentError::CommentContentRequired(
err.msg,
))
}
"CommentContentSizeLimitExceededException" => {
return RusotoError::Service(
UpdateCommentError::CommentContentSizeLimitExceeded(err.msg),
)
}
"CommentDeletedException" => {
return RusotoError::Service(UpdateCommentError::CommentDeleted(err.msg))
}
"CommentDoesNotExistException" => {
return RusotoError::Service(UpdateCommentError::CommentDoesNotExist(err.msg))
}
"CommentIdRequiredException" => {
return RusotoError::Service(UpdateCommentError::CommentIdRequired(err.msg))
}
"CommentNotCreatedByCallerException" => {
return RusotoError::Service(UpdateCommentError::CommentNotCreatedByCaller(
err.msg,
))
}
"InvalidCommentIdException" => {
return RusotoError::Service(UpdateCommentError::InvalidCommentId(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateCommentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateCommentError {
fn description(&self) -> &str {
match *self {
UpdateCommentError::CommentContentRequired(ref cause) => cause,
UpdateCommentError::CommentContentSizeLimitExceeded(ref cause) => cause,
UpdateCommentError::CommentDeleted(ref cause) => cause,
UpdateCommentError::CommentDoesNotExist(ref cause) => cause,
UpdateCommentError::CommentIdRequired(ref cause) => cause,
UpdateCommentError::CommentNotCreatedByCaller(ref cause) => cause,
UpdateCommentError::InvalidCommentId(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDefaultBranchError {
BranchDoesNotExist(String),
BranchNameRequired(String),
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidBranchName(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl UpdateDefaultBranchError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDefaultBranchError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"BranchDoesNotExistException" => {
return RusotoError::Service(UpdateDefaultBranchError::BranchDoesNotExist(
err.msg,
))
}
"BranchNameRequiredException" => {
return RusotoError::Service(UpdateDefaultBranchError::BranchNameRequired(
err.msg,
))
}
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
UpdateDefaultBranchError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
UpdateDefaultBranchError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(UpdateDefaultBranchError::EncryptionKeyDisabled(
err.msg,
))
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(UpdateDefaultBranchError::EncryptionKeyNotFound(
err.msg,
))
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
UpdateDefaultBranchError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidBranchNameException" => {
return RusotoError::Service(UpdateDefaultBranchError::InvalidBranchName(
err.msg,
))
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(UpdateDefaultBranchError::InvalidRepositoryName(
err.msg,
))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(UpdateDefaultBranchError::RepositoryDoesNotExist(
err.msg,
))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(UpdateDefaultBranchError::RepositoryNameRequired(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDefaultBranchError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDefaultBranchError {
fn description(&self) -> &str {
match *self {
UpdateDefaultBranchError::BranchDoesNotExist(ref cause) => cause,
UpdateDefaultBranchError::BranchNameRequired(ref cause) => cause,
UpdateDefaultBranchError::EncryptionIntegrityChecksFailed(ref cause) => cause,
UpdateDefaultBranchError::EncryptionKeyAccessDenied(ref cause) => cause,
UpdateDefaultBranchError::EncryptionKeyDisabled(ref cause) => cause,
UpdateDefaultBranchError::EncryptionKeyNotFound(ref cause) => cause,
UpdateDefaultBranchError::EncryptionKeyUnavailable(ref cause) => cause,
UpdateDefaultBranchError::InvalidBranchName(ref cause) => cause,
UpdateDefaultBranchError::InvalidRepositoryName(ref cause) => cause,
UpdateDefaultBranchError::RepositoryDoesNotExist(ref cause) => cause,
UpdateDefaultBranchError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdatePullRequestDescriptionError {
InvalidDescription(String),
InvalidPullRequestId(String),
PullRequestAlreadyClosed(String),
PullRequestDoesNotExist(String),
PullRequestIdRequired(String),
}
impl UpdatePullRequestDescriptionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdatePullRequestDescriptionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidDescriptionException" => {
return RusotoError::Service(
UpdatePullRequestDescriptionError::InvalidDescription(err.msg),
)
}
"InvalidPullRequestIdException" => {
return RusotoError::Service(
UpdatePullRequestDescriptionError::InvalidPullRequestId(err.msg),
)
}
"PullRequestAlreadyClosedException" => {
return RusotoError::Service(
UpdatePullRequestDescriptionError::PullRequestAlreadyClosed(err.msg),
)
}
"PullRequestDoesNotExistException" => {
return RusotoError::Service(
UpdatePullRequestDescriptionError::PullRequestDoesNotExist(err.msg),
)
}
"PullRequestIdRequiredException" => {
return RusotoError::Service(
UpdatePullRequestDescriptionError::PullRequestIdRequired(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdatePullRequestDescriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdatePullRequestDescriptionError {
fn description(&self) -> &str {
match *self {
UpdatePullRequestDescriptionError::InvalidDescription(ref cause) => cause,
UpdatePullRequestDescriptionError::InvalidPullRequestId(ref cause) => cause,
UpdatePullRequestDescriptionError::PullRequestAlreadyClosed(ref cause) => cause,
UpdatePullRequestDescriptionError::PullRequestDoesNotExist(ref cause) => cause,
UpdatePullRequestDescriptionError::PullRequestIdRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdatePullRequestStatusError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidPullRequestId(String),
InvalidPullRequestStatus(String),
InvalidPullRequestStatusUpdate(String),
PullRequestDoesNotExist(String),
PullRequestIdRequired(String),
PullRequestStatusRequired(String),
}
impl UpdatePullRequestStatusError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdatePullRequestStatusError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::EncryptionKeyDisabled(err.msg),
)
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::EncryptionKeyNotFound(err.msg),
)
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidPullRequestIdException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::InvalidPullRequestId(err.msg),
)
}
"InvalidPullRequestStatusException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::InvalidPullRequestStatus(err.msg),
)
}
"InvalidPullRequestStatusUpdateException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::InvalidPullRequestStatusUpdate(err.msg),
)
}
"PullRequestDoesNotExistException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::PullRequestDoesNotExist(err.msg),
)
}
"PullRequestIdRequiredException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::PullRequestIdRequired(err.msg),
)
}
"PullRequestStatusRequiredException" => {
return RusotoError::Service(
UpdatePullRequestStatusError::PullRequestStatusRequired(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdatePullRequestStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdatePullRequestStatusError {
fn description(&self) -> &str {
match *self {
UpdatePullRequestStatusError::EncryptionIntegrityChecksFailed(ref cause) => cause,
UpdatePullRequestStatusError::EncryptionKeyAccessDenied(ref cause) => cause,
UpdatePullRequestStatusError::EncryptionKeyDisabled(ref cause) => cause,
UpdatePullRequestStatusError::EncryptionKeyNotFound(ref cause) => cause,
UpdatePullRequestStatusError::EncryptionKeyUnavailable(ref cause) => cause,
UpdatePullRequestStatusError::InvalidPullRequestId(ref cause) => cause,
UpdatePullRequestStatusError::InvalidPullRequestStatus(ref cause) => cause,
UpdatePullRequestStatusError::InvalidPullRequestStatusUpdate(ref cause) => cause,
UpdatePullRequestStatusError::PullRequestDoesNotExist(ref cause) => cause,
UpdatePullRequestStatusError::PullRequestIdRequired(ref cause) => cause,
UpdatePullRequestStatusError::PullRequestStatusRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdatePullRequestTitleError {
InvalidPullRequestId(String),
InvalidTitle(String),
PullRequestAlreadyClosed(String),
PullRequestDoesNotExist(String),
PullRequestIdRequired(String),
TitleRequired(String),
}
impl UpdatePullRequestTitleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdatePullRequestTitleError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidPullRequestIdException" => {
return RusotoError::Service(UpdatePullRequestTitleError::InvalidPullRequestId(
err.msg,
))
}
"InvalidTitleException" => {
return RusotoError::Service(UpdatePullRequestTitleError::InvalidTitle(err.msg))
}
"PullRequestAlreadyClosedException" => {
return RusotoError::Service(
UpdatePullRequestTitleError::PullRequestAlreadyClosed(err.msg),
)
}
"PullRequestDoesNotExistException" => {
return RusotoError::Service(
UpdatePullRequestTitleError::PullRequestDoesNotExist(err.msg),
)
}
"PullRequestIdRequiredException" => {
return RusotoError::Service(
UpdatePullRequestTitleError::PullRequestIdRequired(err.msg),
)
}
"TitleRequiredException" => {
return RusotoError::Service(UpdatePullRequestTitleError::TitleRequired(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdatePullRequestTitleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdatePullRequestTitleError {
fn description(&self) -> &str {
match *self {
UpdatePullRequestTitleError::InvalidPullRequestId(ref cause) => cause,
UpdatePullRequestTitleError::InvalidTitle(ref cause) => cause,
UpdatePullRequestTitleError::PullRequestAlreadyClosed(ref cause) => cause,
UpdatePullRequestTitleError::PullRequestDoesNotExist(ref cause) => cause,
UpdatePullRequestTitleError::PullRequestIdRequired(ref cause) => cause,
UpdatePullRequestTitleError::TitleRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateRepositoryDescriptionError {
EncryptionIntegrityChecksFailed(String),
EncryptionKeyAccessDenied(String),
EncryptionKeyDisabled(String),
EncryptionKeyNotFound(String),
EncryptionKeyUnavailable(String),
InvalidRepositoryDescription(String),
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameRequired(String),
}
impl UpdateRepositoryDescriptionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateRepositoryDescriptionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"EncryptionIntegrityChecksFailedException" => {
return RusotoError::Service(
UpdateRepositoryDescriptionError::EncryptionIntegrityChecksFailed(err.msg),
)
}
"EncryptionKeyAccessDeniedException" => {
return RusotoError::Service(
UpdateRepositoryDescriptionError::EncryptionKeyAccessDenied(err.msg),
)
}
"EncryptionKeyDisabledException" => {
return RusotoError::Service(
UpdateRepositoryDescriptionError::EncryptionKeyDisabled(err.msg),
)
}
"EncryptionKeyNotFoundException" => {
return RusotoError::Service(
UpdateRepositoryDescriptionError::EncryptionKeyNotFound(err.msg),
)
}
"EncryptionKeyUnavailableException" => {
return RusotoError::Service(
UpdateRepositoryDescriptionError::EncryptionKeyUnavailable(err.msg),
)
}
"InvalidRepositoryDescriptionException" => {
return RusotoError::Service(
UpdateRepositoryDescriptionError::InvalidRepositoryDescription(err.msg),
)
}
"InvalidRepositoryNameException" => {
return RusotoError::Service(
UpdateRepositoryDescriptionError::InvalidRepositoryName(err.msg),
)
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(
UpdateRepositoryDescriptionError::RepositoryDoesNotExist(err.msg),
)
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(
UpdateRepositoryDescriptionError::RepositoryNameRequired(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateRepositoryDescriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRepositoryDescriptionError {
fn description(&self) -> &str {
match *self {
UpdateRepositoryDescriptionError::EncryptionIntegrityChecksFailed(ref cause) => cause,
UpdateRepositoryDescriptionError::EncryptionKeyAccessDenied(ref cause) => cause,
UpdateRepositoryDescriptionError::EncryptionKeyDisabled(ref cause) => cause,
UpdateRepositoryDescriptionError::EncryptionKeyNotFound(ref cause) => cause,
UpdateRepositoryDescriptionError::EncryptionKeyUnavailable(ref cause) => cause,
UpdateRepositoryDescriptionError::InvalidRepositoryDescription(ref cause) => cause,
UpdateRepositoryDescriptionError::InvalidRepositoryName(ref cause) => cause,
UpdateRepositoryDescriptionError::RepositoryDoesNotExist(ref cause) => cause,
UpdateRepositoryDescriptionError::RepositoryNameRequired(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateRepositoryNameError {
InvalidRepositoryName(String),
RepositoryDoesNotExist(String),
RepositoryNameExists(String),
RepositoryNameRequired(String),
}
impl UpdateRepositoryNameError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRepositoryNameError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidRepositoryNameException" => {
return RusotoError::Service(UpdateRepositoryNameError::InvalidRepositoryName(
err.msg,
))
}
"RepositoryDoesNotExistException" => {
return RusotoError::Service(UpdateRepositoryNameError::RepositoryDoesNotExist(
err.msg,
))
}
"RepositoryNameExistsException" => {
return RusotoError::Service(UpdateRepositoryNameError::RepositoryNameExists(
err.msg,
))
}
"RepositoryNameRequiredException" => {
return RusotoError::Service(UpdateRepositoryNameError::RepositoryNameRequired(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateRepositoryNameError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRepositoryNameError {
fn description(&self) -> &str {
match *self {
UpdateRepositoryNameError::InvalidRepositoryName(ref cause) => cause,
UpdateRepositoryNameError::RepositoryDoesNotExist(ref cause) => cause,
UpdateRepositoryNameError::RepositoryNameExists(ref cause) => cause,
UpdateRepositoryNameError::RepositoryNameRequired(ref cause) => cause,
}
}
}
pub trait CodeCommit {
fn batch_get_repositories(
&self,
input: BatchGetRepositoriesInput,
) -> RusotoFuture<BatchGetRepositoriesOutput, BatchGetRepositoriesError>;
fn create_branch(&self, input: CreateBranchInput) -> RusotoFuture<(), CreateBranchError>;
fn create_commit(
&self,
input: CreateCommitInput,
) -> RusotoFuture<CreateCommitOutput, CreateCommitError>;
fn create_pull_request(
&self,
input: CreatePullRequestInput,
) -> RusotoFuture<CreatePullRequestOutput, CreatePullRequestError>;
fn create_repository(
&self,
input: CreateRepositoryInput,
) -> RusotoFuture<CreateRepositoryOutput, CreateRepositoryError>;
fn delete_branch(
&self,
input: DeleteBranchInput,
) -> RusotoFuture<DeleteBranchOutput, DeleteBranchError>;
fn delete_comment_content(
&self,
input: DeleteCommentContentInput,
) -> RusotoFuture<DeleteCommentContentOutput, DeleteCommentContentError>;
fn delete_file(
&self,
input: DeleteFileInput,
) -> RusotoFuture<DeleteFileOutput, DeleteFileError>;
fn delete_repository(
&self,
input: DeleteRepositoryInput,
) -> RusotoFuture<DeleteRepositoryOutput, DeleteRepositoryError>;
fn describe_pull_request_events(
&self,
input: DescribePullRequestEventsInput,
) -> RusotoFuture<DescribePullRequestEventsOutput, DescribePullRequestEventsError>;
fn get_blob(&self, input: GetBlobInput) -> RusotoFuture<GetBlobOutput, GetBlobError>;
fn get_branch(&self, input: GetBranchInput) -> RusotoFuture<GetBranchOutput, GetBranchError>;
fn get_comment(
&self,
input: GetCommentInput,
) -> RusotoFuture<GetCommentOutput, GetCommentError>;
fn get_comments_for_compared_commit(
&self,
input: GetCommentsForComparedCommitInput,
) -> RusotoFuture<GetCommentsForComparedCommitOutput, GetCommentsForComparedCommitError>;
fn get_comments_for_pull_request(
&self,
input: GetCommentsForPullRequestInput,
) -> RusotoFuture<GetCommentsForPullRequestOutput, GetCommentsForPullRequestError>;
fn get_commit(&self, input: GetCommitInput) -> RusotoFuture<GetCommitOutput, GetCommitError>;
fn get_differences(
&self,
input: GetDifferencesInput,
) -> RusotoFuture<GetDifferencesOutput, GetDifferencesError>;
fn get_file(&self, input: GetFileInput) -> RusotoFuture<GetFileOutput, GetFileError>;
fn get_folder(&self, input: GetFolderInput) -> RusotoFuture<GetFolderOutput, GetFolderError>;
fn get_merge_conflicts(
&self,
input: GetMergeConflictsInput,
) -> RusotoFuture<GetMergeConflictsOutput, GetMergeConflictsError>;
fn get_pull_request(
&self,
input: GetPullRequestInput,
) -> RusotoFuture<GetPullRequestOutput, GetPullRequestError>;
fn get_repository(
&self,
input: GetRepositoryInput,
) -> RusotoFuture<GetRepositoryOutput, GetRepositoryError>;
fn get_repository_triggers(
&self,
input: GetRepositoryTriggersInput,
) -> RusotoFuture<GetRepositoryTriggersOutput, GetRepositoryTriggersError>;
fn list_branches(
&self,
input: ListBranchesInput,
) -> RusotoFuture<ListBranchesOutput, ListBranchesError>;
fn list_pull_requests(
&self,
input: ListPullRequestsInput,
) -> RusotoFuture<ListPullRequestsOutput, ListPullRequestsError>;
fn list_repositories(
&self,
input: ListRepositoriesInput,
) -> RusotoFuture<ListRepositoriesOutput, ListRepositoriesError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceInput,
) -> RusotoFuture<ListTagsForResourceOutput, ListTagsForResourceError>;
fn merge_pull_request_by_fast_forward(
&self,
input: MergePullRequestByFastForwardInput,
) -> RusotoFuture<MergePullRequestByFastForwardOutput, MergePullRequestByFastForwardError>;
fn post_comment_for_compared_commit(
&self,
input: PostCommentForComparedCommitInput,
) -> RusotoFuture<PostCommentForComparedCommitOutput, PostCommentForComparedCommitError>;
fn post_comment_for_pull_request(
&self,
input: PostCommentForPullRequestInput,
) -> RusotoFuture<PostCommentForPullRequestOutput, PostCommentForPullRequestError>;
fn post_comment_reply(
&self,
input: PostCommentReplyInput,
) -> RusotoFuture<PostCommentReplyOutput, PostCommentReplyError>;
fn put_file(&self, input: PutFileInput) -> RusotoFuture<PutFileOutput, PutFileError>;
fn put_repository_triggers(
&self,
input: PutRepositoryTriggersInput,
) -> RusotoFuture<PutRepositoryTriggersOutput, PutRepositoryTriggersError>;
fn tag_resource(&self, input: TagResourceInput) -> RusotoFuture<(), TagResourceError>;
fn test_repository_triggers(
&self,
input: TestRepositoryTriggersInput,
) -> RusotoFuture<TestRepositoryTriggersOutput, TestRepositoryTriggersError>;
fn untag_resource(&self, input: UntagResourceInput) -> RusotoFuture<(), UntagResourceError>;
fn update_comment(
&self,
input: UpdateCommentInput,
) -> RusotoFuture<UpdateCommentOutput, UpdateCommentError>;
fn update_default_branch(
&self,
input: UpdateDefaultBranchInput,
) -> RusotoFuture<(), UpdateDefaultBranchError>;
fn update_pull_request_description(
&self,
input: UpdatePullRequestDescriptionInput,
) -> RusotoFuture<UpdatePullRequestDescriptionOutput, UpdatePullRequestDescriptionError>;
fn update_pull_request_status(
&self,
input: UpdatePullRequestStatusInput,
) -> RusotoFuture<UpdatePullRequestStatusOutput, UpdatePullRequestStatusError>;
fn update_pull_request_title(
&self,
input: UpdatePullRequestTitleInput,
) -> RusotoFuture<UpdatePullRequestTitleOutput, UpdatePullRequestTitleError>;
fn update_repository_description(
&self,
input: UpdateRepositoryDescriptionInput,
) -> RusotoFuture<(), UpdateRepositoryDescriptionError>;
fn update_repository_name(
&self,
input: UpdateRepositoryNameInput,
) -> RusotoFuture<(), UpdateRepositoryNameError>;
}
#[derive(Clone)]
pub struct CodeCommitClient {
client: Client,
region: region::Region,
}
impl CodeCommitClient {
pub fn new(region: region::Region) -> CodeCommitClient {
CodeCommitClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> CodeCommitClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
CodeCommitClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl CodeCommit for CodeCommitClient {
fn batch_get_repositories(
&self,
input: BatchGetRepositoriesInput,
) -> RusotoFuture<BatchGetRepositoriesOutput, BatchGetRepositoriesError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.BatchGetRepositories");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<BatchGetRepositoriesOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(BatchGetRepositoriesError::from_response(response))
}),
)
}
})
}
fn create_branch(&self, input: CreateBranchInput) -> RusotoFuture<(), CreateBranchError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.CreateBranch");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateBranchError::from_response(response))),
)
}
})
}
fn create_commit(
&self,
input: CreateCommitInput,
) -> RusotoFuture<CreateCommitOutput, CreateCommitError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.CreateCommit");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateCommitOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateCommitError::from_response(response))),
)
}
})
}
fn create_pull_request(
&self,
input: CreatePullRequestInput,
) -> RusotoFuture<CreatePullRequestOutput, CreatePullRequestError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.CreatePullRequest");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreatePullRequestOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreatePullRequestError::from_response(response))),
)
}
})
}
fn create_repository(
&self,
input: CreateRepositoryInput,
) -> RusotoFuture<CreateRepositoryOutput, CreateRepositoryError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.CreateRepository");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateRepositoryOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateRepositoryError::from_response(response))),
)
}
})
}
fn delete_branch(
&self,
input: DeleteBranchInput,
) -> RusotoFuture<DeleteBranchOutput, DeleteBranchError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.DeleteBranch");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteBranchOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteBranchError::from_response(response))),
)
}
})
}
fn delete_comment_content(
&self,
input: DeleteCommentContentInput,
) -> RusotoFuture<DeleteCommentContentOutput, DeleteCommentContentError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.DeleteCommentContent");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteCommentContentOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteCommentContentError::from_response(response))
}),
)
}
})
}
fn delete_file(
&self,
input: DeleteFileInput,
) -> RusotoFuture<DeleteFileOutput, DeleteFileError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.DeleteFile");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteFileOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteFileError::from_response(response))),
)
}
})
}
fn delete_repository(
&self,
input: DeleteRepositoryInput,
) -> RusotoFuture<DeleteRepositoryOutput, DeleteRepositoryError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.DeleteRepository");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteRepositoryOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteRepositoryError::from_response(response))),
)
}
})
}
fn describe_pull_request_events(
&self,
input: DescribePullRequestEventsInput,
) -> RusotoFuture<DescribePullRequestEventsOutput, DescribePullRequestEventsError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeCommit_20150413.DescribePullRequestEvents",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribePullRequestEventsOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribePullRequestEventsError::from_response(response))
}))
}
})
}
fn get_blob(&self, input: GetBlobInput) -> RusotoFuture<GetBlobOutput, GetBlobError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetBlob");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<GetBlobOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetBlobError::from_response(response))),
)
}
})
}
fn get_branch(&self, input: GetBranchInput) -> RusotoFuture<GetBranchOutput, GetBranchError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetBranch");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<GetBranchOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetBranchError::from_response(response))),
)
}
})
}
fn get_comment(
&self,
input: GetCommentInput,
) -> RusotoFuture<GetCommentOutput, GetCommentError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetComment");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetCommentOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetCommentError::from_response(response))),
)
}
})
}
fn get_comments_for_compared_commit(
&self,
input: GetCommentsForComparedCommitInput,
) -> RusotoFuture<GetCommentsForComparedCommitOutput, GetCommentsForComparedCommitError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeCommit_20150413.GetCommentsForComparedCommit",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetCommentsForComparedCommitOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetCommentsForComparedCommitError::from_response(response))
}))
}
})
}
fn get_comments_for_pull_request(
&self,
input: GetCommentsForPullRequestInput,
) -> RusotoFuture<GetCommentsForPullRequestOutput, GetCommentsForPullRequestError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeCommit_20150413.GetCommentsForPullRequest",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetCommentsForPullRequestOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetCommentsForPullRequestError::from_response(response))
}))
}
})
}
fn get_commit(&self, input: GetCommitInput) -> RusotoFuture<GetCommitOutput, GetCommitError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetCommit");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<GetCommitOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetCommitError::from_response(response))),
)
}
})
}
fn get_differences(
&self,
input: GetDifferencesInput,
) -> RusotoFuture<GetDifferencesOutput, GetDifferencesError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetDifferences");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetDifferencesOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDifferencesError::from_response(response))),
)
}
})
}
fn get_file(&self, input: GetFileInput) -> RusotoFuture<GetFileOutput, GetFileError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetFile");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<GetFileOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetFileError::from_response(response))),
)
}
})
}
fn get_folder(&self, input: GetFolderInput) -> RusotoFuture<GetFolderOutput, GetFolderError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetFolder");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<GetFolderOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetFolderError::from_response(response))),
)
}
})
}
fn get_merge_conflicts(
&self,
input: GetMergeConflictsInput,
) -> RusotoFuture<GetMergeConflictsOutput, GetMergeConflictsError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetMergeConflicts");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetMergeConflictsOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetMergeConflictsError::from_response(response))),
)
}
})
}
fn get_pull_request(
&self,
input: GetPullRequestInput,
) -> RusotoFuture<GetPullRequestOutput, GetPullRequestError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetPullRequest");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetPullRequestOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetPullRequestError::from_response(response))),
)
}
})
}
fn get_repository(
&self,
input: GetRepositoryInput,
) -> RusotoFuture<GetRepositoryOutput, GetRepositoryError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetRepository");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetRepositoryOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetRepositoryError::from_response(response))),
)
}
})
}
fn get_repository_triggers(
&self,
input: GetRepositoryTriggersInput,
) -> RusotoFuture<GetRepositoryTriggersOutput, GetRepositoryTriggersError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.GetRepositoryTriggers");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetRepositoryTriggersOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetRepositoryTriggersError::from_response(response))
}),
)
}
})
}
fn list_branches(
&self,
input: ListBranchesInput,
) -> RusotoFuture<ListBranchesOutput, ListBranchesError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.ListBranches");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListBranchesOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListBranchesError::from_response(response))),
)
}
})
}
fn list_pull_requests(
&self,
input: ListPullRequestsInput,
) -> RusotoFuture<ListPullRequestsOutput, ListPullRequestsError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.ListPullRequests");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListPullRequestsOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListPullRequestsError::from_response(response))),
)
}
})
}
fn list_repositories(
&self,
input: ListRepositoriesInput,
) -> RusotoFuture<ListRepositoriesOutput, ListRepositoriesError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.ListRepositories");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListRepositoriesOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListRepositoriesError::from_response(response))),
)
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceInput,
) -> RusotoFuture<ListTagsForResourceOutput, ListTagsForResourceError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.ListTagsForResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForResourceOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
)
}
})
}
fn merge_pull_request_by_fast_forward(
&self,
input: MergePullRequestByFastForwardInput,
) -> RusotoFuture<MergePullRequestByFastForwardOutput, MergePullRequestByFastForwardError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeCommit_20150413.MergePullRequestByFastForward",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<MergePullRequestByFastForwardOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(MergePullRequestByFastForwardError::from_response(response))
}))
}
})
}
fn post_comment_for_compared_commit(
&self,
input: PostCommentForComparedCommitInput,
) -> RusotoFuture<PostCommentForComparedCommitOutput, PostCommentForComparedCommitError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeCommit_20150413.PostCommentForComparedCommit",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<PostCommentForComparedCommitOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(PostCommentForComparedCommitError::from_response(response))
}))
}
})
}
fn post_comment_for_pull_request(
&self,
input: PostCommentForPullRequestInput,
) -> RusotoFuture<PostCommentForPullRequestOutput, PostCommentForPullRequestError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeCommit_20150413.PostCommentForPullRequest",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<PostCommentForPullRequestOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(PostCommentForPullRequestError::from_response(response))
}))
}
})
}
fn post_comment_reply(
&self,
input: PostCommentReplyInput,
) -> RusotoFuture<PostCommentReplyOutput, PostCommentReplyError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.PostCommentReply");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<PostCommentReplyOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PostCommentReplyError::from_response(response))),
)
}
})
}
fn put_file(&self, input: PutFileInput) -> RusotoFuture<PutFileOutput, PutFileError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.PutFile");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<PutFileOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutFileError::from_response(response))),
)
}
})
}
fn put_repository_triggers(
&self,
input: PutRepositoryTriggersInput,
) -> RusotoFuture<PutRepositoryTriggersOutput, PutRepositoryTriggersError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.PutRepositoryTriggers");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<PutRepositoryTriggersOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(PutRepositoryTriggersError::from_response(response))
}),
)
}
})
}
fn tag_resource(&self, input: TagResourceInput) -> RusotoFuture<(), TagResourceError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.TagResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TagResourceError::from_response(response))),
)
}
})
}
fn test_repository_triggers(
&self,
input: TestRepositoryTriggersInput,
) -> RusotoFuture<TestRepositoryTriggersOutput, TestRepositoryTriggersError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.TestRepositoryTriggers");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<TestRepositoryTriggersOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(TestRepositoryTriggersError::from_response(response))
}),
)
}
})
}
fn untag_resource(&self, input: UntagResourceInput) -> RusotoFuture<(), UntagResourceError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.UntagResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UntagResourceError::from_response(response))),
)
}
})
}
fn update_comment(
&self,
input: UpdateCommentInput,
) -> RusotoFuture<UpdateCommentOutput, UpdateCommentError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.UpdateComment");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateCommentOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateCommentError::from_response(response))),
)
}
})
}
fn update_default_branch(
&self,
input: UpdateDefaultBranchInput,
) -> RusotoFuture<(), UpdateDefaultBranchError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.UpdateDefaultBranch");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateDefaultBranchError::from_response(response))
}),
)
}
})
}
fn update_pull_request_description(
&self,
input: UpdatePullRequestDescriptionInput,
) -> RusotoFuture<UpdatePullRequestDescriptionOutput, UpdatePullRequestDescriptionError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeCommit_20150413.UpdatePullRequestDescription",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdatePullRequestDescriptionOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdatePullRequestDescriptionError::from_response(response))
}))
}
})
}
fn update_pull_request_status(
&self,
input: UpdatePullRequestStatusInput,
) -> RusotoFuture<UpdatePullRequestStatusOutput, UpdatePullRequestStatusError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeCommit_20150413.UpdatePullRequestStatus",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdatePullRequestStatusOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdatePullRequestStatusError::from_response(response))
}))
}
})
}
fn update_pull_request_title(
&self,
input: UpdatePullRequestTitleInput,
) -> RusotoFuture<UpdatePullRequestTitleOutput, UpdatePullRequestTitleError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.UpdatePullRequestTitle");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdatePullRequestTitleOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdatePullRequestTitleError::from_response(response))
}),
)
}
})
}
fn update_repository_description(
&self,
input: UpdateRepositoryDescriptionInput,
) -> RusotoFuture<(), UpdateRepositoryDescriptionError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"CodeCommit_20150413.UpdateRepositoryDescription",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateRepositoryDescriptionError::from_response(response))
}))
}
})
}
fn update_repository_name(
&self,
input: UpdateRepositoryNameInput,
) -> RusotoFuture<(), UpdateRepositoryNameError> {
let mut request = SignedRequest::new("POST", "codecommit", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "CodeCommit_20150413.UpdateRepositoryName");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(future::ok(::std::mem::drop(response)))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateRepositoryNameError::from_response(response))
}),
)
}
})
}
}