use std::fmt::Write;
pub mod associate_approval_rule_template_with_repository_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) approval_rule_template_name: std::option::Option<std::string::String>,
pub(crate) repository_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_name = Some(input.into());
self
}
pub fn set_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_name = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::AssociateApprovalRuleTemplateWithRepositoryInput,
aws_smithy_http::operation::BuildError,
> {
Ok(
crate::input::AssociateApprovalRuleTemplateWithRepositoryInput {
approval_rule_template_name: self.approval_rule_template_name,
repository_name: self.repository_name,
},
)
}
}
}
#[doc(hidden)]
pub type AssociateApprovalRuleTemplateWithRepositoryInputOperationOutputAlias =
crate::operation::AssociateApprovalRuleTemplateWithRepository;
#[doc(hidden)]
pub type AssociateApprovalRuleTemplateWithRepositoryInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl AssociateApprovalRuleTemplateWithRepositoryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateApprovalRuleTemplateWithRepository,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::AssociateApprovalRuleTemplateWithRepositoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateApprovalRuleTemplateWithRepositoryInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.AssociateApprovalRuleTemplateWithRepository",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_approval_rule_template_with_repository(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateApprovalRuleTemplateWithRepository::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateApprovalRuleTemplateWithRepository",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_approval_rule_template_with_repository_input::Builder
{
crate::input::associate_approval_rule_template_with_repository_input::Builder::default()
}
}
pub mod batch_associate_approval_rule_template_with_repositories_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) approval_rule_template_name: std::option::Option<std::string::String>,
pub(crate) repository_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_name = Some(input.into());
self
}
pub fn set_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_name = input;
self
}
pub fn repository_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.repository_names.unwrap_or_default();
v.push(input.into());
self.repository_names = Some(v);
self
}
pub fn set_repository_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.repository_names = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchAssociateApprovalRuleTemplateWithRepositoriesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(
crate::input::BatchAssociateApprovalRuleTemplateWithRepositoriesInput {
approval_rule_template_name: self.approval_rule_template_name,
repository_names: self.repository_names,
},
)
}
}
}
#[doc(hidden)]
pub type BatchAssociateApprovalRuleTemplateWithRepositoriesInputOperationOutputAlias =
crate::operation::BatchAssociateApprovalRuleTemplateWithRepositories;
#[doc(hidden)]
pub type BatchAssociateApprovalRuleTemplateWithRepositoriesInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl BatchAssociateApprovalRuleTemplateWithRepositoriesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchAssociateApprovalRuleTemplateWithRepositories,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::BatchAssociateApprovalRuleTemplateWithRepositoriesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchAssociateApprovalRuleTemplateWithRepositoriesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.BatchAssociateApprovalRuleTemplateWithRepositories",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_associate_approval_rule_template_with_repositories(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchAssociateApprovalRuleTemplateWithRepositories::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchAssociateApprovalRuleTemplateWithRepositories",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder(
) -> crate::input::batch_associate_approval_rule_template_with_repositories_input::Builder {
crate::input::batch_associate_approval_rule_template_with_repositories_input::Builder::default()
}
}
pub mod batch_describe_merge_conflicts_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) destination_commit_specifier: std::option::Option<std::string::String>,
pub(crate) source_commit_specifier: std::option::Option<std::string::String>,
pub(crate) merge_option: std::option::Option<crate::model::MergeOptionTypeEnum>,
pub(crate) max_merge_hunks: std::option::Option<i32>,
pub(crate) max_conflict_files: std::option::Option<i32>,
pub(crate) file_paths: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) conflict_detail_level:
std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub(crate) conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn destination_commit_specifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.destination_commit_specifier = Some(input.into());
self
}
pub fn set_destination_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_commit_specifier = input;
self
}
pub fn source_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_specifier = Some(input.into());
self
}
pub fn set_source_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_specifier = input;
self
}
pub fn merge_option(mut self, input: crate::model::MergeOptionTypeEnum) -> Self {
self.merge_option = Some(input);
self
}
pub fn set_merge_option(
mut self,
input: std::option::Option<crate::model::MergeOptionTypeEnum>,
) -> Self {
self.merge_option = input;
self
}
pub fn max_merge_hunks(mut self, input: i32) -> Self {
self.max_merge_hunks = Some(input);
self
}
pub fn set_max_merge_hunks(mut self, input: std::option::Option<i32>) -> Self {
self.max_merge_hunks = input;
self
}
pub fn max_conflict_files(mut self, input: i32) -> Self {
self.max_conflict_files = Some(input);
self
}
pub fn set_max_conflict_files(mut self, input: std::option::Option<i32>) -> Self {
self.max_conflict_files = input;
self
}
pub fn file_paths(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.file_paths.unwrap_or_default();
v.push(input.into());
self.file_paths = Some(v);
self
}
pub fn set_file_paths(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.file_paths = input;
self
}
pub fn conflict_detail_level(
mut self,
input: crate::model::ConflictDetailLevelTypeEnum,
) -> Self {
self.conflict_detail_level = Some(input);
self
}
pub fn set_conflict_detail_level(
mut self,
input: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
) -> Self {
self.conflict_detail_level = input;
self
}
pub fn conflict_resolution_strategy(
mut self,
input: crate::model::ConflictResolutionStrategyTypeEnum,
) -> Self {
self.conflict_resolution_strategy = Some(input);
self
}
pub fn set_conflict_resolution_strategy(
mut self,
input: std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
) -> Self {
self.conflict_resolution_strategy = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchDescribeMergeConflictsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchDescribeMergeConflictsInput {
repository_name: self.repository_name,
destination_commit_specifier: self.destination_commit_specifier,
source_commit_specifier: self.source_commit_specifier,
merge_option: self.merge_option,
max_merge_hunks: self.max_merge_hunks,
max_conflict_files: self.max_conflict_files,
file_paths: self.file_paths,
conflict_detail_level: self.conflict_detail_level,
conflict_resolution_strategy: self.conflict_resolution_strategy,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type BatchDescribeMergeConflictsInputOperationOutputAlias =
crate::operation::BatchDescribeMergeConflicts;
#[doc(hidden)]
pub type BatchDescribeMergeConflictsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl BatchDescribeMergeConflictsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchDescribeMergeConflicts,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::BatchDescribeMergeConflictsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchDescribeMergeConflictsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.BatchDescribeMergeConflicts",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_describe_merge_conflicts(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchDescribeMergeConflicts::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchDescribeMergeConflicts",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_describe_merge_conflicts_input::Builder {
crate::input::batch_describe_merge_conflicts_input::Builder::default()
}
}
pub mod batch_disassociate_approval_rule_template_from_repositories_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) approval_rule_template_name: std::option::Option<std::string::String>,
pub(crate) repository_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_name = Some(input.into());
self
}
pub fn set_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_name = input;
self
}
pub fn repository_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.repository_names.unwrap_or_default();
v.push(input.into());
self.repository_names = Some(v);
self
}
pub fn set_repository_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.repository_names = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchDisassociateApprovalRuleTemplateFromRepositoriesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(
crate::input::BatchDisassociateApprovalRuleTemplateFromRepositoriesInput {
approval_rule_template_name: self.approval_rule_template_name,
repository_names: self.repository_names,
},
)
}
}
}
#[doc(hidden)]
pub type BatchDisassociateApprovalRuleTemplateFromRepositoriesInputOperationOutputAlias =
crate::operation::BatchDisassociateApprovalRuleTemplateFromRepositories;
#[doc(hidden)]
pub type BatchDisassociateApprovalRuleTemplateFromRepositoriesInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl BatchDisassociateApprovalRuleTemplateFromRepositoriesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchDisassociateApprovalRuleTemplateFromRepositories,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::BatchDisassociateApprovalRuleTemplateFromRepositoriesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchDisassociateApprovalRuleTemplateFromRepositoriesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.BatchDisassociateApprovalRuleTemplateFromRepositories",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_disassociate_approval_rule_template_from_repositories(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchDisassociateApprovalRuleTemplateFromRepositories::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchDisassociateApprovalRuleTemplateFromRepositories",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder(
) -> crate::input::batch_disassociate_approval_rule_template_from_repositories_input::Builder
{
crate::input::batch_disassociate_approval_rule_template_from_repositories_input::Builder::default()
}
}
pub mod batch_get_commits_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) commit_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) repository_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn commit_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.commit_ids.unwrap_or_default();
v.push(input.into());
self.commit_ids = Some(v);
self
}
pub fn set_commit_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.commit_ids = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchGetCommitsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchGetCommitsInput {
commit_ids: self.commit_ids,
repository_name: self.repository_name,
})
}
}
}
#[doc(hidden)]
pub type BatchGetCommitsInputOperationOutputAlias = crate::operation::BatchGetCommits;
#[doc(hidden)]
pub type BatchGetCommitsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl BatchGetCommitsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchGetCommits,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::BatchGetCommitsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetCommitsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.BatchGetCommits",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_get_commits(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchGetCommits::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetCommits",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_get_commits_input::Builder {
crate::input::batch_get_commits_input::Builder::default()
}
}
pub mod batch_get_repositories_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn repository_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.repository_names.unwrap_or_default();
v.push(input.into());
self.repository_names = Some(v);
self
}
pub fn set_repository_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.repository_names = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchGetRepositoriesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchGetRepositoriesInput {
repository_names: self.repository_names,
})
}
}
}
#[doc(hidden)]
pub type BatchGetRepositoriesInputOperationOutputAlias = crate::operation::BatchGetRepositories;
#[doc(hidden)]
pub type BatchGetRepositoriesInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl BatchGetRepositoriesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchGetRepositories,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::BatchGetRepositoriesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetRepositoriesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.BatchGetRepositories",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_get_repositories(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchGetRepositories::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetRepositories",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_get_repositories_input::Builder {
crate::input::batch_get_repositories_input::Builder::default()
}
}
pub mod create_approval_rule_template_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) approval_rule_template_name: std::option::Option<std::string::String>,
pub(crate) approval_rule_template_content: std::option::Option<std::string::String>,
pub(crate) approval_rule_template_description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_name = Some(input.into());
self
}
pub fn set_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_name = input;
self
}
pub fn approval_rule_template_content(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_content = Some(input.into());
self
}
pub fn set_approval_rule_template_content(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_content = input;
self
}
pub fn approval_rule_template_description(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_description = Some(input.into());
self
}
pub fn set_approval_rule_template_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_description = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateApprovalRuleTemplateInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateApprovalRuleTemplateInput {
approval_rule_template_name: self.approval_rule_template_name,
approval_rule_template_content: self.approval_rule_template_content,
approval_rule_template_description: self.approval_rule_template_description,
})
}
}
}
#[doc(hidden)]
pub type CreateApprovalRuleTemplateInputOperationOutputAlias =
crate::operation::CreateApprovalRuleTemplate;
#[doc(hidden)]
pub type CreateApprovalRuleTemplateInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreateApprovalRuleTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateApprovalRuleTemplate,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreateApprovalRuleTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateApprovalRuleTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.CreateApprovalRuleTemplate",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_approval_rule_template(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateApprovalRuleTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateApprovalRuleTemplate",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_approval_rule_template_input::Builder {
crate::input::create_approval_rule_template_input::Builder::default()
}
}
pub mod create_branch_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) branch_name: std::option::Option<std::string::String>,
pub(crate) commit_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn branch_name(mut self, input: impl Into<std::string::String>) -> Self {
self.branch_name = Some(input.into());
self
}
pub fn set_branch_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.branch_name = input;
self
}
pub fn commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_id = Some(input.into());
self
}
pub fn set_commit_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.commit_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateBranchInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateBranchInput {
repository_name: self.repository_name,
branch_name: self.branch_name,
commit_id: self.commit_id,
})
}
}
}
#[doc(hidden)]
pub type CreateBranchInputOperationOutputAlias = crate::operation::CreateBranch;
#[doc(hidden)]
pub type CreateBranchInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreateBranchInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateBranch,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreateBranchInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateBranchInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.CreateBranch",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_branch(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateBranch::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateBranch",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_branch_input::Builder {
crate::input::create_branch_input::Builder::default()
}
}
pub mod create_commit_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) branch_name: std::option::Option<std::string::String>,
pub(crate) parent_commit_id: std::option::Option<std::string::String>,
pub(crate) author_name: std::option::Option<std::string::String>,
pub(crate) email: std::option::Option<std::string::String>,
pub(crate) commit_message: std::option::Option<std::string::String>,
pub(crate) keep_empty_folders: std::option::Option<bool>,
pub(crate) put_files: std::option::Option<std::vec::Vec<crate::model::PutFileEntry>>,
pub(crate) delete_files: std::option::Option<std::vec::Vec<crate::model::DeleteFileEntry>>,
pub(crate) set_file_modes:
std::option::Option<std::vec::Vec<crate::model::SetFileModeEntry>>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn branch_name(mut self, input: impl Into<std::string::String>) -> Self {
self.branch_name = Some(input.into());
self
}
pub fn set_branch_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.branch_name = input;
self
}
pub fn parent_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.parent_commit_id = Some(input.into());
self
}
pub fn set_parent_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.parent_commit_id = input;
self
}
pub fn author_name(mut self, input: impl Into<std::string::String>) -> Self {
self.author_name = Some(input.into());
self
}
pub fn set_author_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.author_name = input;
self
}
pub fn email(mut self, input: impl Into<std::string::String>) -> Self {
self.email = Some(input.into());
self
}
pub fn set_email(mut self, input: std::option::Option<std::string::String>) -> Self {
self.email = input;
self
}
pub fn commit_message(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_message = Some(input.into());
self
}
pub fn set_commit_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.commit_message = input;
self
}
pub fn keep_empty_folders(mut self, input: bool) -> Self {
self.keep_empty_folders = Some(input);
self
}
pub fn set_keep_empty_folders(mut self, input: std::option::Option<bool>) -> Self {
self.keep_empty_folders = input;
self
}
pub fn put_files(mut self, input: crate::model::PutFileEntry) -> Self {
let mut v = self.put_files.unwrap_or_default();
v.push(input);
self.put_files = Some(v);
self
}
pub fn set_put_files(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PutFileEntry>>,
) -> Self {
self.put_files = input;
self
}
pub fn delete_files(mut self, input: crate::model::DeleteFileEntry) -> Self {
let mut v = self.delete_files.unwrap_or_default();
v.push(input);
self.delete_files = Some(v);
self
}
pub fn set_delete_files(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::DeleteFileEntry>>,
) -> Self {
self.delete_files = input;
self
}
pub fn set_file_modes(mut self, input: crate::model::SetFileModeEntry) -> Self {
let mut v = self.set_file_modes.unwrap_or_default();
v.push(input);
self.set_file_modes = Some(v);
self
}
pub fn set_set_file_modes(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::SetFileModeEntry>>,
) -> Self {
self.set_file_modes = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateCommitInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateCommitInput {
repository_name: self.repository_name,
branch_name: self.branch_name,
parent_commit_id: self.parent_commit_id,
author_name: self.author_name,
email: self.email,
commit_message: self.commit_message,
keep_empty_folders: self.keep_empty_folders.unwrap_or_default(),
put_files: self.put_files,
delete_files: self.delete_files,
set_file_modes: self.set_file_modes,
})
}
}
}
#[doc(hidden)]
pub type CreateCommitInputOperationOutputAlias = crate::operation::CreateCommit;
#[doc(hidden)]
pub type CreateCommitInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreateCommitInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateCommit,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreateCommitInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateCommitInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.CreateCommit",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_commit(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateCommit::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateCommit",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_commit_input::Builder {
crate::input::create_commit_input::Builder::default()
}
}
pub mod create_pull_request_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) title: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) targets: std::option::Option<std::vec::Vec<crate::model::Target>>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
self.title = Some(input.into());
self
}
pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
self.title = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn targets(mut self, input: crate::model::Target) -> Self {
let mut v = self.targets.unwrap_or_default();
v.push(input);
self.targets = Some(v);
self
}
pub fn set_targets(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Target>>,
) -> Self {
self.targets = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreatePullRequestInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreatePullRequestInput {
title: self.title,
description: self.description,
targets: self.targets,
client_request_token: self.client_request_token,
})
}
}
}
#[doc(hidden)]
pub type CreatePullRequestInputOperationOutputAlias = crate::operation::CreatePullRequest;
#[doc(hidden)]
pub type CreatePullRequestInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreatePullRequestInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreatePullRequest,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreatePullRequestInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreatePullRequestInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.CreatePullRequest",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_pull_request(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreatePullRequest::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreatePullRequest",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_pull_request_input::Builder {
crate::input::create_pull_request_input::Builder::default()
}
}
pub mod create_pull_request_approval_rule_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) approval_rule_name: std::option::Option<std::string::String>,
pub(crate) approval_rule_content: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn approval_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.approval_rule_name = Some(input.into());
self
}
pub fn set_approval_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_name = input;
self
}
pub fn approval_rule_content(mut self, input: impl Into<std::string::String>) -> Self {
self.approval_rule_content = Some(input.into());
self
}
pub fn set_approval_rule_content(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_content = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreatePullRequestApprovalRuleInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreatePullRequestApprovalRuleInput {
pull_request_id: self.pull_request_id,
approval_rule_name: self.approval_rule_name,
approval_rule_content: self.approval_rule_content,
})
}
}
}
#[doc(hidden)]
pub type CreatePullRequestApprovalRuleInputOperationOutputAlias =
crate::operation::CreatePullRequestApprovalRule;
#[doc(hidden)]
pub type CreatePullRequestApprovalRuleInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl CreatePullRequestApprovalRuleInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreatePullRequestApprovalRule,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreatePullRequestApprovalRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreatePullRequestApprovalRuleInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.CreatePullRequestApprovalRule",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_pull_request_approval_rule(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreatePullRequestApprovalRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreatePullRequestApprovalRule",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_pull_request_approval_rule_input::Builder {
crate::input::create_pull_request_approval_rule_input::Builder::default()
}
}
pub mod create_repository_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) repository_description: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn repository_description(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_description = Some(input.into());
self
}
pub fn set_repository_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_description = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateRepositoryInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateRepositoryInput {
repository_name: self.repository_name,
repository_description: self.repository_description,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type CreateRepositoryInputOperationOutputAlias = crate::operation::CreateRepository;
#[doc(hidden)]
pub type CreateRepositoryInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreateRepositoryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateRepository,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreateRepositoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateRepositoryInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.CreateRepository",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_repository(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateRepository::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateRepository",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_repository_input::Builder {
crate::input::create_repository_input::Builder::default()
}
}
pub mod create_unreferenced_merge_commit_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) source_commit_specifier: std::option::Option<std::string::String>,
pub(crate) destination_commit_specifier: std::option::Option<std::string::String>,
pub(crate) merge_option: std::option::Option<crate::model::MergeOptionTypeEnum>,
pub(crate) conflict_detail_level:
std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub(crate) conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub(crate) author_name: std::option::Option<std::string::String>,
pub(crate) email: std::option::Option<std::string::String>,
pub(crate) commit_message: std::option::Option<std::string::String>,
pub(crate) keep_empty_folders: std::option::Option<bool>,
pub(crate) conflict_resolution: std::option::Option<crate::model::ConflictResolution>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn source_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_specifier = Some(input.into());
self
}
pub fn set_source_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_specifier = input;
self
}
pub fn destination_commit_specifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.destination_commit_specifier = Some(input.into());
self
}
pub fn set_destination_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_commit_specifier = input;
self
}
pub fn merge_option(mut self, input: crate::model::MergeOptionTypeEnum) -> Self {
self.merge_option = Some(input);
self
}
pub fn set_merge_option(
mut self,
input: std::option::Option<crate::model::MergeOptionTypeEnum>,
) -> Self {
self.merge_option = input;
self
}
pub fn conflict_detail_level(
mut self,
input: crate::model::ConflictDetailLevelTypeEnum,
) -> Self {
self.conflict_detail_level = Some(input);
self
}
pub fn set_conflict_detail_level(
mut self,
input: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
) -> Self {
self.conflict_detail_level = input;
self
}
pub fn conflict_resolution_strategy(
mut self,
input: crate::model::ConflictResolutionStrategyTypeEnum,
) -> Self {
self.conflict_resolution_strategy = Some(input);
self
}
pub fn set_conflict_resolution_strategy(
mut self,
input: std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
) -> Self {
self.conflict_resolution_strategy = input;
self
}
pub fn author_name(mut self, input: impl Into<std::string::String>) -> Self {
self.author_name = Some(input.into());
self
}
pub fn set_author_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.author_name = input;
self
}
pub fn email(mut self, input: impl Into<std::string::String>) -> Self {
self.email = Some(input.into());
self
}
pub fn set_email(mut self, input: std::option::Option<std::string::String>) -> Self {
self.email = input;
self
}
pub fn commit_message(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_message = Some(input.into());
self
}
pub fn set_commit_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.commit_message = input;
self
}
pub fn keep_empty_folders(mut self, input: bool) -> Self {
self.keep_empty_folders = Some(input);
self
}
pub fn set_keep_empty_folders(mut self, input: std::option::Option<bool>) -> Self {
self.keep_empty_folders = input;
self
}
pub fn conflict_resolution(mut self, input: crate::model::ConflictResolution) -> Self {
self.conflict_resolution = Some(input);
self
}
pub fn set_conflict_resolution(
mut self,
input: std::option::Option<crate::model::ConflictResolution>,
) -> Self {
self.conflict_resolution = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateUnreferencedMergeCommitInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateUnreferencedMergeCommitInput {
repository_name: self.repository_name,
source_commit_specifier: self.source_commit_specifier,
destination_commit_specifier: self.destination_commit_specifier,
merge_option: self.merge_option,
conflict_detail_level: self.conflict_detail_level,
conflict_resolution_strategy: self.conflict_resolution_strategy,
author_name: self.author_name,
email: self.email,
commit_message: self.commit_message,
keep_empty_folders: self.keep_empty_folders.unwrap_or_default(),
conflict_resolution: self.conflict_resolution,
})
}
}
}
#[doc(hidden)]
pub type CreateUnreferencedMergeCommitInputOperationOutputAlias =
crate::operation::CreateUnreferencedMergeCommit;
#[doc(hidden)]
pub type CreateUnreferencedMergeCommitInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl CreateUnreferencedMergeCommitInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateUnreferencedMergeCommit,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreateUnreferencedMergeCommitInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateUnreferencedMergeCommitInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.CreateUnreferencedMergeCommit",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_unreferenced_merge_commit(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateUnreferencedMergeCommit::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateUnreferencedMergeCommit",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_unreferenced_merge_commit_input::Builder {
crate::input::create_unreferenced_merge_commit_input::Builder::default()
}
}
pub mod delete_approval_rule_template_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) approval_rule_template_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_name = Some(input.into());
self
}
pub fn set_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteApprovalRuleTemplateInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteApprovalRuleTemplateInput {
approval_rule_template_name: self.approval_rule_template_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteApprovalRuleTemplateInputOperationOutputAlias =
crate::operation::DeleteApprovalRuleTemplate;
#[doc(hidden)]
pub type DeleteApprovalRuleTemplateInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteApprovalRuleTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteApprovalRuleTemplate,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteApprovalRuleTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteApprovalRuleTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.DeleteApprovalRuleTemplate",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_approval_rule_template(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteApprovalRuleTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteApprovalRuleTemplate",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_approval_rule_template_input::Builder {
crate::input::delete_approval_rule_template_input::Builder::default()
}
}
pub mod delete_branch_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) branch_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn branch_name(mut self, input: impl Into<std::string::String>) -> Self {
self.branch_name = Some(input.into());
self
}
pub fn set_branch_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.branch_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteBranchInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteBranchInput {
repository_name: self.repository_name,
branch_name: self.branch_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteBranchInputOperationOutputAlias = crate::operation::DeleteBranch;
#[doc(hidden)]
pub type DeleteBranchInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteBranchInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteBranch,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteBranchInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBranchInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.DeleteBranch",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_branch(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBranch::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBranch",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_branch_input::Builder {
crate::input::delete_branch_input::Builder::default()
}
}
pub mod delete_comment_content_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) comment_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn comment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.comment_id = Some(input.into());
self
}
pub fn set_comment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteCommentContentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteCommentContentInput {
comment_id: self.comment_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteCommentContentInputOperationOutputAlias = crate::operation::DeleteCommentContent;
#[doc(hidden)]
pub type DeleteCommentContentInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteCommentContentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteCommentContent,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteCommentContentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteCommentContentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.DeleteCommentContent",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_comment_content(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteCommentContent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteCommentContent",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_comment_content_input::Builder {
crate::input::delete_comment_content_input::Builder::default()
}
}
pub mod delete_file_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) branch_name: std::option::Option<std::string::String>,
pub(crate) file_path: std::option::Option<std::string::String>,
pub(crate) parent_commit_id: std::option::Option<std::string::String>,
pub(crate) keep_empty_folders: std::option::Option<bool>,
pub(crate) commit_message: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) email: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn branch_name(mut self, input: impl Into<std::string::String>) -> Self {
self.branch_name = Some(input.into());
self
}
pub fn set_branch_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.branch_name = input;
self
}
pub fn file_path(mut self, input: impl Into<std::string::String>) -> Self {
self.file_path = Some(input.into());
self
}
pub fn set_file_path(mut self, input: std::option::Option<std::string::String>) -> Self {
self.file_path = input;
self
}
pub fn parent_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.parent_commit_id = Some(input.into());
self
}
pub fn set_parent_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.parent_commit_id = input;
self
}
pub fn keep_empty_folders(mut self, input: bool) -> Self {
self.keep_empty_folders = Some(input);
self
}
pub fn set_keep_empty_folders(mut self, input: std::option::Option<bool>) -> Self {
self.keep_empty_folders = input;
self
}
pub fn commit_message(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_message = Some(input.into());
self
}
pub fn set_commit_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.commit_message = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn email(mut self, input: impl Into<std::string::String>) -> Self {
self.email = Some(input.into());
self
}
pub fn set_email(mut self, input: std::option::Option<std::string::String>) -> Self {
self.email = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteFileInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteFileInput {
repository_name: self.repository_name,
branch_name: self.branch_name,
file_path: self.file_path,
parent_commit_id: self.parent_commit_id,
keep_empty_folders: self.keep_empty_folders.unwrap_or_default(),
commit_message: self.commit_message,
name: self.name,
email: self.email,
})
}
}
}
#[doc(hidden)]
pub type DeleteFileInputOperationOutputAlias = crate::operation::DeleteFile;
#[doc(hidden)]
pub type DeleteFileInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteFileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteFile,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteFileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteFileInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.DeleteFile",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_file(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteFile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteFile",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_file_input::Builder {
crate::input::delete_file_input::Builder::default()
}
}
pub mod delete_pull_request_approval_rule_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) approval_rule_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn approval_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.approval_rule_name = Some(input.into());
self
}
pub fn set_approval_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeletePullRequestApprovalRuleInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeletePullRequestApprovalRuleInput {
pull_request_id: self.pull_request_id,
approval_rule_name: self.approval_rule_name,
})
}
}
}
#[doc(hidden)]
pub type DeletePullRequestApprovalRuleInputOperationOutputAlias =
crate::operation::DeletePullRequestApprovalRule;
#[doc(hidden)]
pub type DeletePullRequestApprovalRuleInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl DeletePullRequestApprovalRuleInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeletePullRequestApprovalRule,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeletePullRequestApprovalRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeletePullRequestApprovalRuleInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.DeletePullRequestApprovalRule",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_pull_request_approval_rule(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeletePullRequestApprovalRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeletePullRequestApprovalRule",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_pull_request_approval_rule_input::Builder {
crate::input::delete_pull_request_approval_rule_input::Builder::default()
}
}
pub mod delete_repository_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteRepositoryInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteRepositoryInput {
repository_name: self.repository_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteRepositoryInputOperationOutputAlias = crate::operation::DeleteRepository;
#[doc(hidden)]
pub type DeleteRepositoryInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteRepositoryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteRepository,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteRepositoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteRepositoryInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.DeleteRepository",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_repository(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteRepository::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteRepository",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_repository_input::Builder {
crate::input::delete_repository_input::Builder::default()
}
}
pub mod describe_merge_conflicts_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) destination_commit_specifier: std::option::Option<std::string::String>,
pub(crate) source_commit_specifier: std::option::Option<std::string::String>,
pub(crate) merge_option: std::option::Option<crate::model::MergeOptionTypeEnum>,
pub(crate) max_merge_hunks: std::option::Option<i32>,
pub(crate) file_path: std::option::Option<std::string::String>,
pub(crate) conflict_detail_level:
std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub(crate) conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn destination_commit_specifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.destination_commit_specifier = Some(input.into());
self
}
pub fn set_destination_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_commit_specifier = input;
self
}
pub fn source_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_specifier = Some(input.into());
self
}
pub fn set_source_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_specifier = input;
self
}
pub fn merge_option(mut self, input: crate::model::MergeOptionTypeEnum) -> Self {
self.merge_option = Some(input);
self
}
pub fn set_merge_option(
mut self,
input: std::option::Option<crate::model::MergeOptionTypeEnum>,
) -> Self {
self.merge_option = input;
self
}
pub fn max_merge_hunks(mut self, input: i32) -> Self {
self.max_merge_hunks = Some(input);
self
}
pub fn set_max_merge_hunks(mut self, input: std::option::Option<i32>) -> Self {
self.max_merge_hunks = input;
self
}
pub fn file_path(mut self, input: impl Into<std::string::String>) -> Self {
self.file_path = Some(input.into());
self
}
pub fn set_file_path(mut self, input: std::option::Option<std::string::String>) -> Self {
self.file_path = input;
self
}
pub fn conflict_detail_level(
mut self,
input: crate::model::ConflictDetailLevelTypeEnum,
) -> Self {
self.conflict_detail_level = Some(input);
self
}
pub fn set_conflict_detail_level(
mut self,
input: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
) -> Self {
self.conflict_detail_level = input;
self
}
pub fn conflict_resolution_strategy(
mut self,
input: crate::model::ConflictResolutionStrategyTypeEnum,
) -> Self {
self.conflict_resolution_strategy = Some(input);
self
}
pub fn set_conflict_resolution_strategy(
mut self,
input: std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
) -> Self {
self.conflict_resolution_strategy = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeMergeConflictsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeMergeConflictsInput {
repository_name: self.repository_name,
destination_commit_specifier: self.destination_commit_specifier,
source_commit_specifier: self.source_commit_specifier,
merge_option: self.merge_option,
max_merge_hunks: self.max_merge_hunks,
file_path: self.file_path,
conflict_detail_level: self.conflict_detail_level,
conflict_resolution_strategy: self.conflict_resolution_strategy,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type DescribeMergeConflictsInputOperationOutputAlias = crate::operation::DescribeMergeConflicts;
#[doc(hidden)]
pub type DescribeMergeConflictsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DescribeMergeConflictsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeMergeConflicts,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DescribeMergeConflictsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeMergeConflictsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.DescribeMergeConflicts",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_merge_conflicts(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeMergeConflicts::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeMergeConflicts",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_merge_conflicts_input::Builder {
crate::input::describe_merge_conflicts_input::Builder::default()
}
}
pub mod describe_pull_request_events_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) pull_request_event_type: std::option::Option<crate::model::PullRequestEventType>,
pub(crate) actor_arn: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn pull_request_event_type(
mut self,
input: crate::model::PullRequestEventType,
) -> Self {
self.pull_request_event_type = Some(input);
self
}
pub fn set_pull_request_event_type(
mut self,
input: std::option::Option<crate::model::PullRequestEventType>,
) -> Self {
self.pull_request_event_type = input;
self
}
pub fn actor_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.actor_arn = Some(input.into());
self
}
pub fn set_actor_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.actor_arn = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribePullRequestEventsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribePullRequestEventsInput {
pull_request_id: self.pull_request_id,
pull_request_event_type: self.pull_request_event_type,
actor_arn: self.actor_arn,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type DescribePullRequestEventsInputOperationOutputAlias =
crate::operation::DescribePullRequestEvents;
#[doc(hidden)]
pub type DescribePullRequestEventsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DescribePullRequestEventsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribePullRequestEvents,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DescribePullRequestEventsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribePullRequestEventsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.DescribePullRequestEvents",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_pull_request_events(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribePullRequestEvents::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribePullRequestEvents",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_pull_request_events_input::Builder {
crate::input::describe_pull_request_events_input::Builder::default()
}
}
pub mod disassociate_approval_rule_template_from_repository_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) approval_rule_template_name: std::option::Option<std::string::String>,
pub(crate) repository_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_name = Some(input.into());
self
}
pub fn set_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_name = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DisassociateApprovalRuleTemplateFromRepositoryInput,
aws_smithy_http::operation::BuildError,
> {
Ok(
crate::input::DisassociateApprovalRuleTemplateFromRepositoryInput {
approval_rule_template_name: self.approval_rule_template_name,
repository_name: self.repository_name,
},
)
}
}
}
#[doc(hidden)]
pub type DisassociateApprovalRuleTemplateFromRepositoryInputOperationOutputAlias =
crate::operation::DisassociateApprovalRuleTemplateFromRepository;
#[doc(hidden)]
pub type DisassociateApprovalRuleTemplateFromRepositoryInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl DisassociateApprovalRuleTemplateFromRepositoryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateApprovalRuleTemplateFromRepository,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateApprovalRuleTemplateFromRepositoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateApprovalRuleTemplateFromRepositoryInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.DisassociateApprovalRuleTemplateFromRepository",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_disassociate_approval_rule_template_from_repository(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateApprovalRuleTemplateFromRepository::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateApprovalRuleTemplateFromRepository",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder(
) -> crate::input::disassociate_approval_rule_template_from_repository_input::Builder {
crate::input::disassociate_approval_rule_template_from_repository_input::Builder::default()
}
}
pub mod evaluate_pull_request_approval_rules_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) revision_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn revision_id(mut self, input: impl Into<std::string::String>) -> Self {
self.revision_id = Some(input.into());
self
}
pub fn set_revision_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.revision_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::EvaluatePullRequestApprovalRulesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::EvaluatePullRequestApprovalRulesInput {
pull_request_id: self.pull_request_id,
revision_id: self.revision_id,
})
}
}
}
#[doc(hidden)]
pub type EvaluatePullRequestApprovalRulesInputOperationOutputAlias =
crate::operation::EvaluatePullRequestApprovalRules;
#[doc(hidden)]
pub type EvaluatePullRequestApprovalRulesInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl EvaluatePullRequestApprovalRulesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::EvaluatePullRequestApprovalRules,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::EvaluatePullRequestApprovalRulesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::EvaluatePullRequestApprovalRulesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.EvaluatePullRequestApprovalRules",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_evaluate_pull_request_approval_rules(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::EvaluatePullRequestApprovalRules::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"EvaluatePullRequestApprovalRules",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::evaluate_pull_request_approval_rules_input::Builder {
crate::input::evaluate_pull_request_approval_rules_input::Builder::default()
}
}
pub mod get_approval_rule_template_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) approval_rule_template_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_name = Some(input.into());
self
}
pub fn set_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetApprovalRuleTemplateInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetApprovalRuleTemplateInput {
approval_rule_template_name: self.approval_rule_template_name,
})
}
}
}
#[doc(hidden)]
pub type GetApprovalRuleTemplateInputOperationOutputAlias =
crate::operation::GetApprovalRuleTemplate;
#[doc(hidden)]
pub type GetApprovalRuleTemplateInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetApprovalRuleTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetApprovalRuleTemplate,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetApprovalRuleTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetApprovalRuleTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetApprovalRuleTemplate",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_approval_rule_template(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetApprovalRuleTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetApprovalRuleTemplate",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_approval_rule_template_input::Builder {
crate::input::get_approval_rule_template_input::Builder::default()
}
}
pub mod get_blob_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) blob_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn blob_id(mut self, input: impl Into<std::string::String>) -> Self {
self.blob_id = Some(input.into());
self
}
pub fn set_blob_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.blob_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::GetBlobInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::GetBlobInput {
repository_name: self.repository_name,
blob_id: self.blob_id,
})
}
}
}
#[doc(hidden)]
pub type GetBlobInputOperationOutputAlias = crate::operation::GetBlob;
#[doc(hidden)]
pub type GetBlobInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetBlobInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetBlob,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetBlobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetBlobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetBlob",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_blob(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::GetBlob::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetBlob",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_blob_input::Builder {
crate::input::get_blob_input::Builder::default()
}
}
pub mod get_branch_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) branch_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn branch_name(mut self, input: impl Into<std::string::String>) -> Self {
self.branch_name = Some(input.into());
self
}
pub fn set_branch_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.branch_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::GetBranchInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::GetBranchInput {
repository_name: self.repository_name,
branch_name: self.branch_name,
})
}
}
}
#[doc(hidden)]
pub type GetBranchInputOperationOutputAlias = crate::operation::GetBranch;
#[doc(hidden)]
pub type GetBranchInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetBranchInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetBranch,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetBranchInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetBranchInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetBranch",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_branch(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::GetBranch::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetBranch",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_branch_input::Builder {
crate::input::get_branch_input::Builder::default()
}
}
pub mod get_comment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) comment_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn comment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.comment_id = Some(input.into());
self
}
pub fn set_comment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetCommentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetCommentInput {
comment_id: self.comment_id,
})
}
}
}
#[doc(hidden)]
pub type GetCommentInputOperationOutputAlias = crate::operation::GetComment;
#[doc(hidden)]
pub type GetCommentInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetCommentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetComment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetCommentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetCommentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetComment",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_comment(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetComment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetComment",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_comment_input::Builder {
crate::input::get_comment_input::Builder::default()
}
}
pub mod get_comment_reactions_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) comment_id: std::option::Option<std::string::String>,
pub(crate) reaction_user_arn: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn comment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.comment_id = Some(input.into());
self
}
pub fn set_comment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment_id = input;
self
}
pub fn reaction_user_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.reaction_user_arn = Some(input.into());
self
}
pub fn set_reaction_user_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.reaction_user_arn = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetCommentReactionsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetCommentReactionsInput {
comment_id: self.comment_id,
reaction_user_arn: self.reaction_user_arn,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type GetCommentReactionsInputOperationOutputAlias = crate::operation::GetCommentReactions;
#[doc(hidden)]
pub type GetCommentReactionsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetCommentReactionsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetCommentReactions,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetCommentReactionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetCommentReactionsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetCommentReactions",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_comment_reactions(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetCommentReactions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetCommentReactions",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_comment_reactions_input::Builder {
crate::input::get_comment_reactions_input::Builder::default()
}
}
pub mod get_comments_for_compared_commit_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) before_commit_id: std::option::Option<std::string::String>,
pub(crate) after_commit_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn before_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.before_commit_id = Some(input.into());
self
}
pub fn set_before_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.before_commit_id = input;
self
}
pub fn after_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.after_commit_id = Some(input.into());
self
}
pub fn set_after_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.after_commit_id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetCommentsForComparedCommitInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetCommentsForComparedCommitInput {
repository_name: self.repository_name,
before_commit_id: self.before_commit_id,
after_commit_id: self.after_commit_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type GetCommentsForComparedCommitInputOperationOutputAlias =
crate::operation::GetCommentsForComparedCommit;
#[doc(hidden)]
pub type GetCommentsForComparedCommitInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl GetCommentsForComparedCommitInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetCommentsForComparedCommit,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetCommentsForComparedCommitInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetCommentsForComparedCommitInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetCommentsForComparedCommit",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_comments_for_compared_commit(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetCommentsForComparedCommit::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetCommentsForComparedCommit",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_comments_for_compared_commit_input::Builder {
crate::input::get_comments_for_compared_commit_input::Builder::default()
}
}
pub mod get_comments_for_pull_request_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) before_commit_id: std::option::Option<std::string::String>,
pub(crate) after_commit_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn before_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.before_commit_id = Some(input.into());
self
}
pub fn set_before_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.before_commit_id = input;
self
}
pub fn after_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.after_commit_id = Some(input.into());
self
}
pub fn set_after_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.after_commit_id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetCommentsForPullRequestInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetCommentsForPullRequestInput {
pull_request_id: self.pull_request_id,
repository_name: self.repository_name,
before_commit_id: self.before_commit_id,
after_commit_id: self.after_commit_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type GetCommentsForPullRequestInputOperationOutputAlias =
crate::operation::GetCommentsForPullRequest;
#[doc(hidden)]
pub type GetCommentsForPullRequestInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetCommentsForPullRequestInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetCommentsForPullRequest,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetCommentsForPullRequestInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetCommentsForPullRequestInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetCommentsForPullRequest",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_comments_for_pull_request(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetCommentsForPullRequest::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetCommentsForPullRequest",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_comments_for_pull_request_input::Builder {
crate::input::get_comments_for_pull_request_input::Builder::default()
}
}
pub mod get_commit_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) commit_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_id = Some(input.into());
self
}
pub fn set_commit_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.commit_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::GetCommitInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::GetCommitInput {
repository_name: self.repository_name,
commit_id: self.commit_id,
})
}
}
}
#[doc(hidden)]
pub type GetCommitInputOperationOutputAlias = crate::operation::GetCommit;
#[doc(hidden)]
pub type GetCommitInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetCommitInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetCommit,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetCommitInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetCommitInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetCommit",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_commit(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::GetCommit::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetCommit",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_commit_input::Builder {
crate::input::get_commit_input::Builder::default()
}
}
pub mod get_differences_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) before_commit_specifier: std::option::Option<std::string::String>,
pub(crate) after_commit_specifier: std::option::Option<std::string::String>,
pub(crate) before_path: std::option::Option<std::string::String>,
pub(crate) after_path: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn before_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.before_commit_specifier = Some(input.into());
self
}
pub fn set_before_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.before_commit_specifier = input;
self
}
pub fn after_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.after_commit_specifier = Some(input.into());
self
}
pub fn set_after_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.after_commit_specifier = input;
self
}
pub fn before_path(mut self, input: impl Into<std::string::String>) -> Self {
self.before_path = Some(input.into());
self
}
pub fn set_before_path(mut self, input: std::option::Option<std::string::String>) -> Self {
self.before_path = input;
self
}
pub fn after_path(mut self, input: impl Into<std::string::String>) -> Self {
self.after_path = Some(input.into());
self
}
pub fn set_after_path(mut self, input: std::option::Option<std::string::String>) -> Self {
self.after_path = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetDifferencesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetDifferencesInput {
repository_name: self.repository_name,
before_commit_specifier: self.before_commit_specifier,
after_commit_specifier: self.after_commit_specifier,
before_path: self.before_path,
after_path: self.after_path,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type GetDifferencesInputOperationOutputAlias = crate::operation::GetDifferences;
#[doc(hidden)]
pub type GetDifferencesInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetDifferencesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetDifferences,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetDifferencesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDifferencesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetDifferences",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_differences(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetDifferences::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDifferences",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_differences_input::Builder {
crate::input::get_differences_input::Builder::default()
}
}
pub mod get_file_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) commit_specifier: std::option::Option<std::string::String>,
pub(crate) file_path: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_specifier = Some(input.into());
self
}
pub fn set_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.commit_specifier = input;
self
}
pub fn file_path(mut self, input: impl Into<std::string::String>) -> Self {
self.file_path = Some(input.into());
self
}
pub fn set_file_path(mut self, input: std::option::Option<std::string::String>) -> Self {
self.file_path = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::GetFileInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::GetFileInput {
repository_name: self.repository_name,
commit_specifier: self.commit_specifier,
file_path: self.file_path,
})
}
}
}
#[doc(hidden)]
pub type GetFileInputOperationOutputAlias = crate::operation::GetFile;
#[doc(hidden)]
pub type GetFileInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetFileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetFile,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetFileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetFileInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetFile",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_file(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::GetFile::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetFile",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_file_input::Builder {
crate::input::get_file_input::Builder::default()
}
}
pub mod get_folder_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) commit_specifier: std::option::Option<std::string::String>,
pub(crate) folder_path: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_specifier = Some(input.into());
self
}
pub fn set_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.commit_specifier = input;
self
}
pub fn folder_path(mut self, input: impl Into<std::string::String>) -> Self {
self.folder_path = Some(input.into());
self
}
pub fn set_folder_path(mut self, input: std::option::Option<std::string::String>) -> Self {
self.folder_path = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::GetFolderInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::GetFolderInput {
repository_name: self.repository_name,
commit_specifier: self.commit_specifier,
folder_path: self.folder_path,
})
}
}
}
#[doc(hidden)]
pub type GetFolderInputOperationOutputAlias = crate::operation::GetFolder;
#[doc(hidden)]
pub type GetFolderInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetFolderInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetFolder,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetFolderInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetFolderInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetFolder",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_folder(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::GetFolder::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetFolder",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_folder_input::Builder {
crate::input::get_folder_input::Builder::default()
}
}
pub mod get_merge_commit_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) source_commit_specifier: std::option::Option<std::string::String>,
pub(crate) destination_commit_specifier: std::option::Option<std::string::String>,
pub(crate) conflict_detail_level:
std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub(crate) conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn source_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_specifier = Some(input.into());
self
}
pub fn set_source_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_specifier = input;
self
}
pub fn destination_commit_specifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.destination_commit_specifier = Some(input.into());
self
}
pub fn set_destination_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_commit_specifier = input;
self
}
pub fn conflict_detail_level(
mut self,
input: crate::model::ConflictDetailLevelTypeEnum,
) -> Self {
self.conflict_detail_level = Some(input);
self
}
pub fn set_conflict_detail_level(
mut self,
input: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
) -> Self {
self.conflict_detail_level = input;
self
}
pub fn conflict_resolution_strategy(
mut self,
input: crate::model::ConflictResolutionStrategyTypeEnum,
) -> Self {
self.conflict_resolution_strategy = Some(input);
self
}
pub fn set_conflict_resolution_strategy(
mut self,
input: std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
) -> Self {
self.conflict_resolution_strategy = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetMergeCommitInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetMergeCommitInput {
repository_name: self.repository_name,
source_commit_specifier: self.source_commit_specifier,
destination_commit_specifier: self.destination_commit_specifier,
conflict_detail_level: self.conflict_detail_level,
conflict_resolution_strategy: self.conflict_resolution_strategy,
})
}
}
}
#[doc(hidden)]
pub type GetMergeCommitInputOperationOutputAlias = crate::operation::GetMergeCommit;
#[doc(hidden)]
pub type GetMergeCommitInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetMergeCommitInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetMergeCommit,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetMergeCommitInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetMergeCommitInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetMergeCommit",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_merge_commit(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetMergeCommit::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetMergeCommit",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_merge_commit_input::Builder {
crate::input::get_merge_commit_input::Builder::default()
}
}
pub mod get_merge_conflicts_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) destination_commit_specifier: std::option::Option<std::string::String>,
pub(crate) source_commit_specifier: std::option::Option<std::string::String>,
pub(crate) merge_option: std::option::Option<crate::model::MergeOptionTypeEnum>,
pub(crate) conflict_detail_level:
std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub(crate) max_conflict_files: std::option::Option<i32>,
pub(crate) conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn destination_commit_specifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.destination_commit_specifier = Some(input.into());
self
}
pub fn set_destination_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_commit_specifier = input;
self
}
pub fn source_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_specifier = Some(input.into());
self
}
pub fn set_source_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_specifier = input;
self
}
pub fn merge_option(mut self, input: crate::model::MergeOptionTypeEnum) -> Self {
self.merge_option = Some(input);
self
}
pub fn set_merge_option(
mut self,
input: std::option::Option<crate::model::MergeOptionTypeEnum>,
) -> Self {
self.merge_option = input;
self
}
pub fn conflict_detail_level(
mut self,
input: crate::model::ConflictDetailLevelTypeEnum,
) -> Self {
self.conflict_detail_level = Some(input);
self
}
pub fn set_conflict_detail_level(
mut self,
input: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
) -> Self {
self.conflict_detail_level = input;
self
}
pub fn max_conflict_files(mut self, input: i32) -> Self {
self.max_conflict_files = Some(input);
self
}
pub fn set_max_conflict_files(mut self, input: std::option::Option<i32>) -> Self {
self.max_conflict_files = input;
self
}
pub fn conflict_resolution_strategy(
mut self,
input: crate::model::ConflictResolutionStrategyTypeEnum,
) -> Self {
self.conflict_resolution_strategy = Some(input);
self
}
pub fn set_conflict_resolution_strategy(
mut self,
input: std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
) -> Self {
self.conflict_resolution_strategy = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetMergeConflictsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetMergeConflictsInput {
repository_name: self.repository_name,
destination_commit_specifier: self.destination_commit_specifier,
source_commit_specifier: self.source_commit_specifier,
merge_option: self.merge_option,
conflict_detail_level: self.conflict_detail_level,
max_conflict_files: self.max_conflict_files,
conflict_resolution_strategy: self.conflict_resolution_strategy,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type GetMergeConflictsInputOperationOutputAlias = crate::operation::GetMergeConflicts;
#[doc(hidden)]
pub type GetMergeConflictsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetMergeConflictsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetMergeConflicts,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetMergeConflictsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetMergeConflictsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetMergeConflicts",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_merge_conflicts(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetMergeConflicts::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetMergeConflicts",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_merge_conflicts_input::Builder {
crate::input::get_merge_conflicts_input::Builder::default()
}
}
pub mod get_merge_options_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) source_commit_specifier: std::option::Option<std::string::String>,
pub(crate) destination_commit_specifier: std::option::Option<std::string::String>,
pub(crate) conflict_detail_level:
std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub(crate) conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn source_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_specifier = Some(input.into());
self
}
pub fn set_source_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_specifier = input;
self
}
pub fn destination_commit_specifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.destination_commit_specifier = Some(input.into());
self
}
pub fn set_destination_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_commit_specifier = input;
self
}
pub fn conflict_detail_level(
mut self,
input: crate::model::ConflictDetailLevelTypeEnum,
) -> Self {
self.conflict_detail_level = Some(input);
self
}
pub fn set_conflict_detail_level(
mut self,
input: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
) -> Self {
self.conflict_detail_level = input;
self
}
pub fn conflict_resolution_strategy(
mut self,
input: crate::model::ConflictResolutionStrategyTypeEnum,
) -> Self {
self.conflict_resolution_strategy = Some(input);
self
}
pub fn set_conflict_resolution_strategy(
mut self,
input: std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
) -> Self {
self.conflict_resolution_strategy = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetMergeOptionsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetMergeOptionsInput {
repository_name: self.repository_name,
source_commit_specifier: self.source_commit_specifier,
destination_commit_specifier: self.destination_commit_specifier,
conflict_detail_level: self.conflict_detail_level,
conflict_resolution_strategy: self.conflict_resolution_strategy,
})
}
}
}
#[doc(hidden)]
pub type GetMergeOptionsInputOperationOutputAlias = crate::operation::GetMergeOptions;
#[doc(hidden)]
pub type GetMergeOptionsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetMergeOptionsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetMergeOptions,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetMergeOptionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetMergeOptionsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetMergeOptions",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_merge_options(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetMergeOptions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetMergeOptions",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_merge_options_input::Builder {
crate::input::get_merge_options_input::Builder::default()
}
}
pub mod get_pull_request_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetPullRequestInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetPullRequestInput {
pull_request_id: self.pull_request_id,
})
}
}
}
#[doc(hidden)]
pub type GetPullRequestInputOperationOutputAlias = crate::operation::GetPullRequest;
#[doc(hidden)]
pub type GetPullRequestInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetPullRequestInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetPullRequest,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetPullRequestInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetPullRequestInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetPullRequest",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_pull_request(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetPullRequest::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetPullRequest",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_pull_request_input::Builder {
crate::input::get_pull_request_input::Builder::default()
}
}
pub mod get_pull_request_approval_states_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) revision_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn revision_id(mut self, input: impl Into<std::string::String>) -> Self {
self.revision_id = Some(input.into());
self
}
pub fn set_revision_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.revision_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetPullRequestApprovalStatesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetPullRequestApprovalStatesInput {
pull_request_id: self.pull_request_id,
revision_id: self.revision_id,
})
}
}
}
#[doc(hidden)]
pub type GetPullRequestApprovalStatesInputOperationOutputAlias =
crate::operation::GetPullRequestApprovalStates;
#[doc(hidden)]
pub type GetPullRequestApprovalStatesInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl GetPullRequestApprovalStatesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetPullRequestApprovalStates,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetPullRequestApprovalStatesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetPullRequestApprovalStatesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetPullRequestApprovalStates",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_pull_request_approval_states(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetPullRequestApprovalStates::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetPullRequestApprovalStates",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_pull_request_approval_states_input::Builder {
crate::input::get_pull_request_approval_states_input::Builder::default()
}
}
pub mod get_pull_request_override_state_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) revision_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn revision_id(mut self, input: impl Into<std::string::String>) -> Self {
self.revision_id = Some(input.into());
self
}
pub fn set_revision_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.revision_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetPullRequestOverrideStateInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetPullRequestOverrideStateInput {
pull_request_id: self.pull_request_id,
revision_id: self.revision_id,
})
}
}
}
#[doc(hidden)]
pub type GetPullRequestOverrideStateInputOperationOutputAlias =
crate::operation::GetPullRequestOverrideState;
#[doc(hidden)]
pub type GetPullRequestOverrideStateInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetPullRequestOverrideStateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetPullRequestOverrideState,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetPullRequestOverrideStateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetPullRequestOverrideStateInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetPullRequestOverrideState",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_pull_request_override_state(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetPullRequestOverrideState::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetPullRequestOverrideState",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_pull_request_override_state_input::Builder {
crate::input::get_pull_request_override_state_input::Builder::default()
}
}
pub mod get_repository_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetRepositoryInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetRepositoryInput {
repository_name: self.repository_name,
})
}
}
}
#[doc(hidden)]
pub type GetRepositoryInputOperationOutputAlias = crate::operation::GetRepository;
#[doc(hidden)]
pub type GetRepositoryInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetRepositoryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetRepository,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetRepositoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetRepositoryInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetRepository",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_repository(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetRepository::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetRepository",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_repository_input::Builder {
crate::input::get_repository_input::Builder::default()
}
}
pub mod get_repository_triggers_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetRepositoryTriggersInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetRepositoryTriggersInput {
repository_name: self.repository_name,
})
}
}
}
#[doc(hidden)]
pub type GetRepositoryTriggersInputOperationOutputAlias = crate::operation::GetRepositoryTriggers;
#[doc(hidden)]
pub type GetRepositoryTriggersInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetRepositoryTriggersInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetRepositoryTriggers,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetRepositoryTriggersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetRepositoryTriggersInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.GetRepositoryTriggers",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_repository_triggers(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetRepositoryTriggers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetRepositoryTriggers",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_repository_triggers_input::Builder {
crate::input::get_repository_triggers_input::Builder::default()
}
}
pub mod list_approval_rule_templates_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListApprovalRuleTemplatesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListApprovalRuleTemplatesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListApprovalRuleTemplatesInputOperationOutputAlias =
crate::operation::ListApprovalRuleTemplates;
#[doc(hidden)]
pub type ListApprovalRuleTemplatesInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListApprovalRuleTemplatesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListApprovalRuleTemplates,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListApprovalRuleTemplatesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListApprovalRuleTemplatesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.ListApprovalRuleTemplates",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_approval_rule_templates(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListApprovalRuleTemplates::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListApprovalRuleTemplates",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_approval_rule_templates_input::Builder {
crate::input::list_approval_rule_templates_input::Builder::default()
}
}
pub mod list_associated_approval_rule_templates_for_repository_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListAssociatedApprovalRuleTemplatesForRepositoryInput,
aws_smithy_http::operation::BuildError,
> {
Ok(
crate::input::ListAssociatedApprovalRuleTemplatesForRepositoryInput {
repository_name: self.repository_name,
next_token: self.next_token,
max_results: self.max_results,
},
)
}
}
}
#[doc(hidden)]
pub type ListAssociatedApprovalRuleTemplatesForRepositoryInputOperationOutputAlias =
crate::operation::ListAssociatedApprovalRuleTemplatesForRepository;
#[doc(hidden)]
pub type ListAssociatedApprovalRuleTemplatesForRepositoryInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl ListAssociatedApprovalRuleTemplatesForRepositoryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListAssociatedApprovalRuleTemplatesForRepository,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListAssociatedApprovalRuleTemplatesForRepositoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListAssociatedApprovalRuleTemplatesForRepositoryInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.ListAssociatedApprovalRuleTemplatesForRepository",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_associated_approval_rule_templates_for_repository(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListAssociatedApprovalRuleTemplatesForRepository::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListAssociatedApprovalRuleTemplatesForRepository",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder(
) -> crate::input::list_associated_approval_rule_templates_for_repository_input::Builder {
crate::input::list_associated_approval_rule_templates_for_repository_input::Builder::default(
)
}
}
pub mod list_branches_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListBranchesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListBranchesInput {
repository_name: self.repository_name,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListBranchesInputOperationOutputAlias = crate::operation::ListBranches;
#[doc(hidden)]
pub type ListBranchesInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListBranchesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListBranches,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListBranchesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListBranchesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.ListBranches",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_branches(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListBranches::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListBranches",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_branches_input::Builder {
crate::input::list_branches_input::Builder::default()
}
}
pub mod list_pull_requests_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) author_arn: std::option::Option<std::string::String>,
pub(crate) pull_request_status: std::option::Option<crate::model::PullRequestStatusEnum>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn author_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.author_arn = Some(input.into());
self
}
pub fn set_author_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.author_arn = input;
self
}
pub fn pull_request_status(mut self, input: crate::model::PullRequestStatusEnum) -> Self {
self.pull_request_status = Some(input);
self
}
pub fn set_pull_request_status(
mut self,
input: std::option::Option<crate::model::PullRequestStatusEnum>,
) -> Self {
self.pull_request_status = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListPullRequestsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListPullRequestsInput {
repository_name: self.repository_name,
author_arn: self.author_arn,
pull_request_status: self.pull_request_status,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListPullRequestsInputOperationOutputAlias = crate::operation::ListPullRequests;
#[doc(hidden)]
pub type ListPullRequestsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListPullRequestsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListPullRequests,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListPullRequestsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListPullRequestsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.ListPullRequests",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_pull_requests(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListPullRequests::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListPullRequests",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_pull_requests_input::Builder {
crate::input::list_pull_requests_input::Builder::default()
}
}
pub mod list_repositories_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) sort_by: std::option::Option<crate::model::SortByEnum>,
pub(crate) order: std::option::Option<crate::model::OrderEnum>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn sort_by(mut self, input: crate::model::SortByEnum) -> Self {
self.sort_by = Some(input);
self
}
pub fn set_sort_by(mut self, input: std::option::Option<crate::model::SortByEnum>) -> Self {
self.sort_by = input;
self
}
pub fn order(mut self, input: crate::model::OrderEnum) -> Self {
self.order = Some(input);
self
}
pub fn set_order(mut self, input: std::option::Option<crate::model::OrderEnum>) -> Self {
self.order = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListRepositoriesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListRepositoriesInput {
next_token: self.next_token,
sort_by: self.sort_by,
order: self.order,
})
}
}
}
#[doc(hidden)]
pub type ListRepositoriesInputOperationOutputAlias = crate::operation::ListRepositories;
#[doc(hidden)]
pub type ListRepositoriesInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListRepositoriesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListRepositories,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListRepositoriesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListRepositoriesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.ListRepositories",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_repositories(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListRepositories::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListRepositories",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_repositories_input::Builder {
crate::input::list_repositories_input::Builder::default()
}
}
pub mod list_repositories_for_approval_rule_template_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) approval_rule_template_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_name = Some(input.into());
self
}
pub fn set_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_name = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListRepositoriesForApprovalRuleTemplateInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListRepositoriesForApprovalRuleTemplateInput {
approval_rule_template_name: self.approval_rule_template_name,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListRepositoriesForApprovalRuleTemplateInputOperationOutputAlias =
crate::operation::ListRepositoriesForApprovalRuleTemplate;
#[doc(hidden)]
pub type ListRepositoriesForApprovalRuleTemplateInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl ListRepositoriesForApprovalRuleTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListRepositoriesForApprovalRuleTemplate,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListRepositoriesForApprovalRuleTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListRepositoriesForApprovalRuleTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.ListRepositoriesForApprovalRuleTemplate",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_repositories_for_approval_rule_template(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListRepositoriesForApprovalRuleTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListRepositoriesForApprovalRuleTemplate",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_repositories_for_approval_rule_template_input::Builder {
crate::input::list_repositories_for_approval_rule_template_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListTagsForResourceInputOperationOutputAlias = crate::operation::ListTagsForResource;
#[doc(hidden)]
pub type ListTagsForResourceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListTagsForResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsForResource,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTagsForResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.ListTagsForResource",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_tags_for_resource(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_tags_for_resource_input::Builder {
crate::input::list_tags_for_resource_input::Builder::default()
}
}
pub mod merge_branches_by_fast_forward_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) source_commit_specifier: std::option::Option<std::string::String>,
pub(crate) destination_commit_specifier: std::option::Option<std::string::String>,
pub(crate) target_branch: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn source_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_specifier = Some(input.into());
self
}
pub fn set_source_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_specifier = input;
self
}
pub fn destination_commit_specifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.destination_commit_specifier = Some(input.into());
self
}
pub fn set_destination_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_commit_specifier = input;
self
}
pub fn target_branch(mut self, input: impl Into<std::string::String>) -> Self {
self.target_branch = Some(input.into());
self
}
pub fn set_target_branch(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.target_branch = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::MergeBranchesByFastForwardInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::MergeBranchesByFastForwardInput {
repository_name: self.repository_name,
source_commit_specifier: self.source_commit_specifier,
destination_commit_specifier: self.destination_commit_specifier,
target_branch: self.target_branch,
})
}
}
}
#[doc(hidden)]
pub type MergeBranchesByFastForwardInputOperationOutputAlias =
crate::operation::MergeBranchesByFastForward;
#[doc(hidden)]
pub type MergeBranchesByFastForwardInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl MergeBranchesByFastForwardInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::MergeBranchesByFastForward,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::MergeBranchesByFastForwardInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::MergeBranchesByFastForwardInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.MergeBranchesByFastForward",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_merge_branches_by_fast_forward(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::MergeBranchesByFastForward::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"MergeBranchesByFastForward",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::merge_branches_by_fast_forward_input::Builder {
crate::input::merge_branches_by_fast_forward_input::Builder::default()
}
}
pub mod merge_branches_by_squash_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) source_commit_specifier: std::option::Option<std::string::String>,
pub(crate) destination_commit_specifier: std::option::Option<std::string::String>,
pub(crate) target_branch: std::option::Option<std::string::String>,
pub(crate) conflict_detail_level:
std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub(crate) conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub(crate) author_name: std::option::Option<std::string::String>,
pub(crate) email: std::option::Option<std::string::String>,
pub(crate) commit_message: std::option::Option<std::string::String>,
pub(crate) keep_empty_folders: std::option::Option<bool>,
pub(crate) conflict_resolution: std::option::Option<crate::model::ConflictResolution>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn source_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_specifier = Some(input.into());
self
}
pub fn set_source_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_specifier = input;
self
}
pub fn destination_commit_specifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.destination_commit_specifier = Some(input.into());
self
}
pub fn set_destination_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_commit_specifier = input;
self
}
pub fn target_branch(mut self, input: impl Into<std::string::String>) -> Self {
self.target_branch = Some(input.into());
self
}
pub fn set_target_branch(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.target_branch = input;
self
}
pub fn conflict_detail_level(
mut self,
input: crate::model::ConflictDetailLevelTypeEnum,
) -> Self {
self.conflict_detail_level = Some(input);
self
}
pub fn set_conflict_detail_level(
mut self,
input: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
) -> Self {
self.conflict_detail_level = input;
self
}
pub fn conflict_resolution_strategy(
mut self,
input: crate::model::ConflictResolutionStrategyTypeEnum,
) -> Self {
self.conflict_resolution_strategy = Some(input);
self
}
pub fn set_conflict_resolution_strategy(
mut self,
input: std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
) -> Self {
self.conflict_resolution_strategy = input;
self
}
pub fn author_name(mut self, input: impl Into<std::string::String>) -> Self {
self.author_name = Some(input.into());
self
}
pub fn set_author_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.author_name = input;
self
}
pub fn email(mut self, input: impl Into<std::string::String>) -> Self {
self.email = Some(input.into());
self
}
pub fn set_email(mut self, input: std::option::Option<std::string::String>) -> Self {
self.email = input;
self
}
pub fn commit_message(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_message = Some(input.into());
self
}
pub fn set_commit_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.commit_message = input;
self
}
pub fn keep_empty_folders(mut self, input: bool) -> Self {
self.keep_empty_folders = Some(input);
self
}
pub fn set_keep_empty_folders(mut self, input: std::option::Option<bool>) -> Self {
self.keep_empty_folders = input;
self
}
pub fn conflict_resolution(mut self, input: crate::model::ConflictResolution) -> Self {
self.conflict_resolution = Some(input);
self
}
pub fn set_conflict_resolution(
mut self,
input: std::option::Option<crate::model::ConflictResolution>,
) -> Self {
self.conflict_resolution = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::MergeBranchesBySquashInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::MergeBranchesBySquashInput {
repository_name: self.repository_name,
source_commit_specifier: self.source_commit_specifier,
destination_commit_specifier: self.destination_commit_specifier,
target_branch: self.target_branch,
conflict_detail_level: self.conflict_detail_level,
conflict_resolution_strategy: self.conflict_resolution_strategy,
author_name: self.author_name,
email: self.email,
commit_message: self.commit_message,
keep_empty_folders: self.keep_empty_folders.unwrap_or_default(),
conflict_resolution: self.conflict_resolution,
})
}
}
}
#[doc(hidden)]
pub type MergeBranchesBySquashInputOperationOutputAlias = crate::operation::MergeBranchesBySquash;
#[doc(hidden)]
pub type MergeBranchesBySquashInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl MergeBranchesBySquashInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::MergeBranchesBySquash,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::MergeBranchesBySquashInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::MergeBranchesBySquashInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.MergeBranchesBySquash",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_merge_branches_by_squash(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::MergeBranchesBySquash::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"MergeBranchesBySquash",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::merge_branches_by_squash_input::Builder {
crate::input::merge_branches_by_squash_input::Builder::default()
}
}
pub mod merge_branches_by_three_way_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) source_commit_specifier: std::option::Option<std::string::String>,
pub(crate) destination_commit_specifier: std::option::Option<std::string::String>,
pub(crate) target_branch: std::option::Option<std::string::String>,
pub(crate) conflict_detail_level:
std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub(crate) conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub(crate) author_name: std::option::Option<std::string::String>,
pub(crate) email: std::option::Option<std::string::String>,
pub(crate) commit_message: std::option::Option<std::string::String>,
pub(crate) keep_empty_folders: std::option::Option<bool>,
pub(crate) conflict_resolution: std::option::Option<crate::model::ConflictResolution>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn source_commit_specifier(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_specifier = Some(input.into());
self
}
pub fn set_source_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_specifier = input;
self
}
pub fn destination_commit_specifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.destination_commit_specifier = Some(input.into());
self
}
pub fn set_destination_commit_specifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_commit_specifier = input;
self
}
pub fn target_branch(mut self, input: impl Into<std::string::String>) -> Self {
self.target_branch = Some(input.into());
self
}
pub fn set_target_branch(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.target_branch = input;
self
}
pub fn conflict_detail_level(
mut self,
input: crate::model::ConflictDetailLevelTypeEnum,
) -> Self {
self.conflict_detail_level = Some(input);
self
}
pub fn set_conflict_detail_level(
mut self,
input: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
) -> Self {
self.conflict_detail_level = input;
self
}
pub fn conflict_resolution_strategy(
mut self,
input: crate::model::ConflictResolutionStrategyTypeEnum,
) -> Self {
self.conflict_resolution_strategy = Some(input);
self
}
pub fn set_conflict_resolution_strategy(
mut self,
input: std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
) -> Self {
self.conflict_resolution_strategy = input;
self
}
pub fn author_name(mut self, input: impl Into<std::string::String>) -> Self {
self.author_name = Some(input.into());
self
}
pub fn set_author_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.author_name = input;
self
}
pub fn email(mut self, input: impl Into<std::string::String>) -> Self {
self.email = Some(input.into());
self
}
pub fn set_email(mut self, input: std::option::Option<std::string::String>) -> Self {
self.email = input;
self
}
pub fn commit_message(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_message = Some(input.into());
self
}
pub fn set_commit_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.commit_message = input;
self
}
pub fn keep_empty_folders(mut self, input: bool) -> Self {
self.keep_empty_folders = Some(input);
self
}
pub fn set_keep_empty_folders(mut self, input: std::option::Option<bool>) -> Self {
self.keep_empty_folders = input;
self
}
pub fn conflict_resolution(mut self, input: crate::model::ConflictResolution) -> Self {
self.conflict_resolution = Some(input);
self
}
pub fn set_conflict_resolution(
mut self,
input: std::option::Option<crate::model::ConflictResolution>,
) -> Self {
self.conflict_resolution = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::MergeBranchesByThreeWayInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::MergeBranchesByThreeWayInput {
repository_name: self.repository_name,
source_commit_specifier: self.source_commit_specifier,
destination_commit_specifier: self.destination_commit_specifier,
target_branch: self.target_branch,
conflict_detail_level: self.conflict_detail_level,
conflict_resolution_strategy: self.conflict_resolution_strategy,
author_name: self.author_name,
email: self.email,
commit_message: self.commit_message,
keep_empty_folders: self.keep_empty_folders.unwrap_or_default(),
conflict_resolution: self.conflict_resolution,
})
}
}
}
#[doc(hidden)]
pub type MergeBranchesByThreeWayInputOperationOutputAlias =
crate::operation::MergeBranchesByThreeWay;
#[doc(hidden)]
pub type MergeBranchesByThreeWayInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl MergeBranchesByThreeWayInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::MergeBranchesByThreeWay,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::MergeBranchesByThreeWayInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::MergeBranchesByThreeWayInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.MergeBranchesByThreeWay",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_merge_branches_by_three_way(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::MergeBranchesByThreeWay::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"MergeBranchesByThreeWay",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::merge_branches_by_three_way_input::Builder {
crate::input::merge_branches_by_three_way_input::Builder::default()
}
}
pub mod merge_pull_request_by_fast_forward_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) source_commit_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn source_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_id = Some(input.into());
self
}
pub fn set_source_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::MergePullRequestByFastForwardInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::MergePullRequestByFastForwardInput {
pull_request_id: self.pull_request_id,
repository_name: self.repository_name,
source_commit_id: self.source_commit_id,
})
}
}
}
#[doc(hidden)]
pub type MergePullRequestByFastForwardInputOperationOutputAlias =
crate::operation::MergePullRequestByFastForward;
#[doc(hidden)]
pub type MergePullRequestByFastForwardInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl MergePullRequestByFastForwardInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::MergePullRequestByFastForward,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::MergePullRequestByFastForwardInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::MergePullRequestByFastForwardInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.MergePullRequestByFastForward",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_merge_pull_request_by_fast_forward(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::MergePullRequestByFastForward::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"MergePullRequestByFastForward",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::merge_pull_request_by_fast_forward_input::Builder {
crate::input::merge_pull_request_by_fast_forward_input::Builder::default()
}
}
pub mod merge_pull_request_by_squash_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) source_commit_id: std::option::Option<std::string::String>,
pub(crate) conflict_detail_level:
std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub(crate) conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub(crate) commit_message: std::option::Option<std::string::String>,
pub(crate) author_name: std::option::Option<std::string::String>,
pub(crate) email: std::option::Option<std::string::String>,
pub(crate) keep_empty_folders: std::option::Option<bool>,
pub(crate) conflict_resolution: std::option::Option<crate::model::ConflictResolution>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn source_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_id = Some(input.into());
self
}
pub fn set_source_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_id = input;
self
}
pub fn conflict_detail_level(
mut self,
input: crate::model::ConflictDetailLevelTypeEnum,
) -> Self {
self.conflict_detail_level = Some(input);
self
}
pub fn set_conflict_detail_level(
mut self,
input: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
) -> Self {
self.conflict_detail_level = input;
self
}
pub fn conflict_resolution_strategy(
mut self,
input: crate::model::ConflictResolutionStrategyTypeEnum,
) -> Self {
self.conflict_resolution_strategy = Some(input);
self
}
pub fn set_conflict_resolution_strategy(
mut self,
input: std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
) -> Self {
self.conflict_resolution_strategy = input;
self
}
pub fn commit_message(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_message = Some(input.into());
self
}
pub fn set_commit_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.commit_message = input;
self
}
pub fn author_name(mut self, input: impl Into<std::string::String>) -> Self {
self.author_name = Some(input.into());
self
}
pub fn set_author_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.author_name = input;
self
}
pub fn email(mut self, input: impl Into<std::string::String>) -> Self {
self.email = Some(input.into());
self
}
pub fn set_email(mut self, input: std::option::Option<std::string::String>) -> Self {
self.email = input;
self
}
pub fn keep_empty_folders(mut self, input: bool) -> Self {
self.keep_empty_folders = Some(input);
self
}
pub fn set_keep_empty_folders(mut self, input: std::option::Option<bool>) -> Self {
self.keep_empty_folders = input;
self
}
pub fn conflict_resolution(mut self, input: crate::model::ConflictResolution) -> Self {
self.conflict_resolution = Some(input);
self
}
pub fn set_conflict_resolution(
mut self,
input: std::option::Option<crate::model::ConflictResolution>,
) -> Self {
self.conflict_resolution = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::MergePullRequestBySquashInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::MergePullRequestBySquashInput {
pull_request_id: self.pull_request_id,
repository_name: self.repository_name,
source_commit_id: self.source_commit_id,
conflict_detail_level: self.conflict_detail_level,
conflict_resolution_strategy: self.conflict_resolution_strategy,
commit_message: self.commit_message,
author_name: self.author_name,
email: self.email,
keep_empty_folders: self.keep_empty_folders.unwrap_or_default(),
conflict_resolution: self.conflict_resolution,
})
}
}
}
#[doc(hidden)]
pub type MergePullRequestBySquashInputOperationOutputAlias =
crate::operation::MergePullRequestBySquash;
#[doc(hidden)]
pub type MergePullRequestBySquashInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl MergePullRequestBySquashInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::MergePullRequestBySquash,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::MergePullRequestBySquashInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::MergePullRequestBySquashInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.MergePullRequestBySquash",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_merge_pull_request_by_squash(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::MergePullRequestBySquash::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"MergePullRequestBySquash",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::merge_pull_request_by_squash_input::Builder {
crate::input::merge_pull_request_by_squash_input::Builder::default()
}
}
pub mod merge_pull_request_by_three_way_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) source_commit_id: std::option::Option<std::string::String>,
pub(crate) conflict_detail_level:
std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub(crate) conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub(crate) commit_message: std::option::Option<std::string::String>,
pub(crate) author_name: std::option::Option<std::string::String>,
pub(crate) email: std::option::Option<std::string::String>,
pub(crate) keep_empty_folders: std::option::Option<bool>,
pub(crate) conflict_resolution: std::option::Option<crate::model::ConflictResolution>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn source_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_commit_id = Some(input.into());
self
}
pub fn set_source_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_commit_id = input;
self
}
pub fn conflict_detail_level(
mut self,
input: crate::model::ConflictDetailLevelTypeEnum,
) -> Self {
self.conflict_detail_level = Some(input);
self
}
pub fn set_conflict_detail_level(
mut self,
input: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
) -> Self {
self.conflict_detail_level = input;
self
}
pub fn conflict_resolution_strategy(
mut self,
input: crate::model::ConflictResolutionStrategyTypeEnum,
) -> Self {
self.conflict_resolution_strategy = Some(input);
self
}
pub fn set_conflict_resolution_strategy(
mut self,
input: std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
) -> Self {
self.conflict_resolution_strategy = input;
self
}
pub fn commit_message(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_message = Some(input.into());
self
}
pub fn set_commit_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.commit_message = input;
self
}
pub fn author_name(mut self, input: impl Into<std::string::String>) -> Self {
self.author_name = Some(input.into());
self
}
pub fn set_author_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.author_name = input;
self
}
pub fn email(mut self, input: impl Into<std::string::String>) -> Self {
self.email = Some(input.into());
self
}
pub fn set_email(mut self, input: std::option::Option<std::string::String>) -> Self {
self.email = input;
self
}
pub fn keep_empty_folders(mut self, input: bool) -> Self {
self.keep_empty_folders = Some(input);
self
}
pub fn set_keep_empty_folders(mut self, input: std::option::Option<bool>) -> Self {
self.keep_empty_folders = input;
self
}
pub fn conflict_resolution(mut self, input: crate::model::ConflictResolution) -> Self {
self.conflict_resolution = Some(input);
self
}
pub fn set_conflict_resolution(
mut self,
input: std::option::Option<crate::model::ConflictResolution>,
) -> Self {
self.conflict_resolution = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::MergePullRequestByThreeWayInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::MergePullRequestByThreeWayInput {
pull_request_id: self.pull_request_id,
repository_name: self.repository_name,
source_commit_id: self.source_commit_id,
conflict_detail_level: self.conflict_detail_level,
conflict_resolution_strategy: self.conflict_resolution_strategy,
commit_message: self.commit_message,
author_name: self.author_name,
email: self.email,
keep_empty_folders: self.keep_empty_folders.unwrap_or_default(),
conflict_resolution: self.conflict_resolution,
})
}
}
}
#[doc(hidden)]
pub type MergePullRequestByThreeWayInputOperationOutputAlias =
crate::operation::MergePullRequestByThreeWay;
#[doc(hidden)]
pub type MergePullRequestByThreeWayInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl MergePullRequestByThreeWayInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::MergePullRequestByThreeWay,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::MergePullRequestByThreeWayInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::MergePullRequestByThreeWayInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.MergePullRequestByThreeWay",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_merge_pull_request_by_three_way(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::MergePullRequestByThreeWay::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"MergePullRequestByThreeWay",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::merge_pull_request_by_three_way_input::Builder {
crate::input::merge_pull_request_by_three_way_input::Builder::default()
}
}
pub mod override_pull_request_approval_rules_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) revision_id: std::option::Option<std::string::String>,
pub(crate) override_status: std::option::Option<crate::model::OverrideStatus>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn revision_id(mut self, input: impl Into<std::string::String>) -> Self {
self.revision_id = Some(input.into());
self
}
pub fn set_revision_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.revision_id = input;
self
}
pub fn override_status(mut self, input: crate::model::OverrideStatus) -> Self {
self.override_status = Some(input);
self
}
pub fn set_override_status(
mut self,
input: std::option::Option<crate::model::OverrideStatus>,
) -> Self {
self.override_status = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::OverridePullRequestApprovalRulesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::OverridePullRequestApprovalRulesInput {
pull_request_id: self.pull_request_id,
revision_id: self.revision_id,
override_status: self.override_status,
})
}
}
}
#[doc(hidden)]
pub type OverridePullRequestApprovalRulesInputOperationOutputAlias =
crate::operation::OverridePullRequestApprovalRules;
#[doc(hidden)]
pub type OverridePullRequestApprovalRulesInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl OverridePullRequestApprovalRulesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::OverridePullRequestApprovalRules,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::OverridePullRequestApprovalRulesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::OverridePullRequestApprovalRulesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.OverridePullRequestApprovalRules",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_override_pull_request_approval_rules(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::OverridePullRequestApprovalRules::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"OverridePullRequestApprovalRules",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::override_pull_request_approval_rules_input::Builder {
crate::input::override_pull_request_approval_rules_input::Builder::default()
}
}
pub mod post_comment_for_compared_commit_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) before_commit_id: std::option::Option<std::string::String>,
pub(crate) after_commit_id: std::option::Option<std::string::String>,
pub(crate) location: std::option::Option<crate::model::Location>,
pub(crate) content: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn before_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.before_commit_id = Some(input.into());
self
}
pub fn set_before_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.before_commit_id = input;
self
}
pub fn after_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.after_commit_id = Some(input.into());
self
}
pub fn set_after_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.after_commit_id = input;
self
}
pub fn location(mut self, input: crate::model::Location) -> Self {
self.location = Some(input);
self
}
pub fn set_location(mut self, input: std::option::Option<crate::model::Location>) -> Self {
self.location = input;
self
}
pub fn content(mut self, input: impl Into<std::string::String>) -> Self {
self.content = Some(input.into());
self
}
pub fn set_content(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PostCommentForComparedCommitInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PostCommentForComparedCommitInput {
repository_name: self.repository_name,
before_commit_id: self.before_commit_id,
after_commit_id: self.after_commit_id,
location: self.location,
content: self.content,
client_request_token: self.client_request_token,
})
}
}
}
#[doc(hidden)]
pub type PostCommentForComparedCommitInputOperationOutputAlias =
crate::operation::PostCommentForComparedCommit;
#[doc(hidden)]
pub type PostCommentForComparedCommitInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl PostCommentForComparedCommitInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PostCommentForComparedCommit,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::PostCommentForComparedCommitInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PostCommentForComparedCommitInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.PostCommentForComparedCommit",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_post_comment_for_compared_commit(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PostCommentForComparedCommit::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PostCommentForComparedCommit",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::post_comment_for_compared_commit_input::Builder {
crate::input::post_comment_for_compared_commit_input::Builder::default()
}
}
pub mod post_comment_for_pull_request_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) before_commit_id: std::option::Option<std::string::String>,
pub(crate) after_commit_id: std::option::Option<std::string::String>,
pub(crate) location: std::option::Option<crate::model::Location>,
pub(crate) content: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn before_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.before_commit_id = Some(input.into());
self
}
pub fn set_before_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.before_commit_id = input;
self
}
pub fn after_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.after_commit_id = Some(input.into());
self
}
pub fn set_after_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.after_commit_id = input;
self
}
pub fn location(mut self, input: crate::model::Location) -> Self {
self.location = Some(input);
self
}
pub fn set_location(mut self, input: std::option::Option<crate::model::Location>) -> Self {
self.location = input;
self
}
pub fn content(mut self, input: impl Into<std::string::String>) -> Self {
self.content = Some(input.into());
self
}
pub fn set_content(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PostCommentForPullRequestInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PostCommentForPullRequestInput {
pull_request_id: self.pull_request_id,
repository_name: self.repository_name,
before_commit_id: self.before_commit_id,
after_commit_id: self.after_commit_id,
location: self.location,
content: self.content,
client_request_token: self.client_request_token,
})
}
}
}
#[doc(hidden)]
pub type PostCommentForPullRequestInputOperationOutputAlias =
crate::operation::PostCommentForPullRequest;
#[doc(hidden)]
pub type PostCommentForPullRequestInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl PostCommentForPullRequestInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PostCommentForPullRequest,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::PostCommentForPullRequestInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PostCommentForPullRequestInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.PostCommentForPullRequest",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_post_comment_for_pull_request(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PostCommentForPullRequest::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PostCommentForPullRequest",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::post_comment_for_pull_request_input::Builder {
crate::input::post_comment_for_pull_request_input::Builder::default()
}
}
pub mod post_comment_reply_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) in_reply_to: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) content: std::option::Option<std::string::String>,
}
impl Builder {
pub fn in_reply_to(mut self, input: impl Into<std::string::String>) -> Self {
self.in_reply_to = Some(input.into());
self
}
pub fn set_in_reply_to(mut self, input: std::option::Option<std::string::String>) -> Self {
self.in_reply_to = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn content(mut self, input: impl Into<std::string::String>) -> Self {
self.content = Some(input.into());
self
}
pub fn set_content(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PostCommentReplyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PostCommentReplyInput {
in_reply_to: self.in_reply_to,
client_request_token: self.client_request_token,
content: self.content,
})
}
}
}
#[doc(hidden)]
pub type PostCommentReplyInputOperationOutputAlias = crate::operation::PostCommentReply;
#[doc(hidden)]
pub type PostCommentReplyInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl PostCommentReplyInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PostCommentReply,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::PostCommentReplyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PostCommentReplyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.PostCommentReply",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_post_comment_reply(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PostCommentReply::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PostCommentReply",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::post_comment_reply_input::Builder {
crate::input::post_comment_reply_input::Builder::default()
}
}
pub mod put_comment_reaction_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) comment_id: std::option::Option<std::string::String>,
pub(crate) reaction_value: std::option::Option<std::string::String>,
}
impl Builder {
pub fn comment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.comment_id = Some(input.into());
self
}
pub fn set_comment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment_id = input;
self
}
pub fn reaction_value(mut self, input: impl Into<std::string::String>) -> Self {
self.reaction_value = Some(input.into());
self
}
pub fn set_reaction_value(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.reaction_value = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutCommentReactionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutCommentReactionInput {
comment_id: self.comment_id,
reaction_value: self.reaction_value,
})
}
}
}
#[doc(hidden)]
pub type PutCommentReactionInputOperationOutputAlias = crate::operation::PutCommentReaction;
#[doc(hidden)]
pub type PutCommentReactionInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl PutCommentReactionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutCommentReaction,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::PutCommentReactionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutCommentReactionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.PutCommentReaction",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put_comment_reaction(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PutCommentReaction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutCommentReaction",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::put_comment_reaction_input::Builder {
crate::input::put_comment_reaction_input::Builder::default()
}
}
pub mod put_file_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) branch_name: std::option::Option<std::string::String>,
pub(crate) file_content: std::option::Option<aws_smithy_types::Blob>,
pub(crate) file_path: std::option::Option<std::string::String>,
pub(crate) file_mode: std::option::Option<crate::model::FileModeTypeEnum>,
pub(crate) parent_commit_id: std::option::Option<std::string::String>,
pub(crate) commit_message: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) email: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn branch_name(mut self, input: impl Into<std::string::String>) -> Self {
self.branch_name = Some(input.into());
self
}
pub fn set_branch_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.branch_name = input;
self
}
pub fn file_content(mut self, input: aws_smithy_types::Blob) -> Self {
self.file_content = Some(input);
self
}
pub fn set_file_content(
mut self,
input: std::option::Option<aws_smithy_types::Blob>,
) -> Self {
self.file_content = input;
self
}
pub fn file_path(mut self, input: impl Into<std::string::String>) -> Self {
self.file_path = Some(input.into());
self
}
pub fn set_file_path(mut self, input: std::option::Option<std::string::String>) -> Self {
self.file_path = input;
self
}
pub fn file_mode(mut self, input: crate::model::FileModeTypeEnum) -> Self {
self.file_mode = Some(input);
self
}
pub fn set_file_mode(
mut self,
input: std::option::Option<crate::model::FileModeTypeEnum>,
) -> Self {
self.file_mode = input;
self
}
pub fn parent_commit_id(mut self, input: impl Into<std::string::String>) -> Self {
self.parent_commit_id = Some(input.into());
self
}
pub fn set_parent_commit_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.parent_commit_id = input;
self
}
pub fn commit_message(mut self, input: impl Into<std::string::String>) -> Self {
self.commit_message = Some(input.into());
self
}
pub fn set_commit_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.commit_message = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn email(mut self, input: impl Into<std::string::String>) -> Self {
self.email = Some(input.into());
self
}
pub fn set_email(mut self, input: std::option::Option<std::string::String>) -> Self {
self.email = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::PutFileInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::PutFileInput {
repository_name: self.repository_name,
branch_name: self.branch_name,
file_content: self.file_content,
file_path: self.file_path,
file_mode: self.file_mode,
parent_commit_id: self.parent_commit_id,
commit_message: self.commit_message,
name: self.name,
email: self.email,
})
}
}
}
#[doc(hidden)]
pub type PutFileInputOperationOutputAlias = crate::operation::PutFile;
#[doc(hidden)]
pub type PutFileInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl PutFileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutFile,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::PutFileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutFileInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.PutFile",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put_file(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::PutFile::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutFile",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::put_file_input::Builder {
crate::input::put_file_input::Builder::default()
}
}
pub mod put_repository_triggers_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) triggers: std::option::Option<std::vec::Vec<crate::model::RepositoryTrigger>>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn triggers(mut self, input: crate::model::RepositoryTrigger) -> Self {
let mut v = self.triggers.unwrap_or_default();
v.push(input);
self.triggers = Some(v);
self
}
pub fn set_triggers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RepositoryTrigger>>,
) -> Self {
self.triggers = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutRepositoryTriggersInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutRepositoryTriggersInput {
repository_name: self.repository_name,
triggers: self.triggers,
})
}
}
}
#[doc(hidden)]
pub type PutRepositoryTriggersInputOperationOutputAlias = crate::operation::PutRepositoryTriggers;
#[doc(hidden)]
pub type PutRepositoryTriggersInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl PutRepositoryTriggersInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutRepositoryTriggers,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::PutRepositoryTriggersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutRepositoryTriggersInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.PutRepositoryTriggers",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put_repository_triggers(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PutRepositoryTriggers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutRepositoryTriggers",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::put_repository_triggers_input::Builder {
crate::input::put_repository_triggers_input::Builder::default()
}
}
pub mod tag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::TagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type TagResourceInputOperationOutputAlias = crate::operation::TagResource;
#[doc(hidden)]
pub type TagResourceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl TagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagResource,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.TagResource",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_tag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod test_repository_triggers_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) triggers: std::option::Option<std::vec::Vec<crate::model::RepositoryTrigger>>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn triggers(mut self, input: crate::model::RepositoryTrigger) -> Self {
let mut v = self.triggers.unwrap_or_default();
v.push(input);
self.triggers = Some(v);
self
}
pub fn set_triggers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RepositoryTrigger>>,
) -> Self {
self.triggers = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::TestRepositoryTriggersInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::TestRepositoryTriggersInput {
repository_name: self.repository_name,
triggers: self.triggers,
})
}
}
}
#[doc(hidden)]
pub type TestRepositoryTriggersInputOperationOutputAlias = crate::operation::TestRepositoryTriggers;
#[doc(hidden)]
pub type TestRepositoryTriggersInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl TestRepositoryTriggersInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TestRepositoryTriggers,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::TestRepositoryTriggersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TestRepositoryTriggersInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.TestRepositoryTriggers",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_test_repository_triggers(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TestRepositoryTriggers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TestRepositoryTriggers",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::test_repository_triggers_input::Builder {
crate::input::test_repository_triggers_input::Builder::default()
}
}
pub mod untag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UntagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
#[doc(hidden)]
pub type UntagResourceInputOperationOutputAlias = crate::operation::UntagResource;
#[doc(hidden)]
pub type UntagResourceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UntagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagResource,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UntagResource",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_untag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_approval_rule_template_content_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) approval_rule_template_name: std::option::Option<std::string::String>,
pub(crate) new_rule_content: std::option::Option<std::string::String>,
pub(crate) existing_rule_content_sha256: std::option::Option<std::string::String>,
}
impl Builder {
pub fn approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_name = Some(input.into());
self
}
pub fn set_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_name = input;
self
}
pub fn new_rule_content(mut self, input: impl Into<std::string::String>) -> Self {
self.new_rule_content = Some(input.into());
self
}
pub fn set_new_rule_content(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.new_rule_content = input;
self
}
pub fn existing_rule_content_sha256(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.existing_rule_content_sha256 = Some(input.into());
self
}
pub fn set_existing_rule_content_sha256(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.existing_rule_content_sha256 = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateApprovalRuleTemplateContentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateApprovalRuleTemplateContentInput {
approval_rule_template_name: self.approval_rule_template_name,
new_rule_content: self.new_rule_content,
existing_rule_content_sha256: self.existing_rule_content_sha256,
})
}
}
}
#[doc(hidden)]
pub type UpdateApprovalRuleTemplateContentInputOperationOutputAlias =
crate::operation::UpdateApprovalRuleTemplateContent;
#[doc(hidden)]
pub type UpdateApprovalRuleTemplateContentInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl UpdateApprovalRuleTemplateContentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateApprovalRuleTemplateContent,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateApprovalRuleTemplateContentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateApprovalRuleTemplateContentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdateApprovalRuleTemplateContent",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_approval_rule_template_content(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateApprovalRuleTemplateContent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateApprovalRuleTemplateContent",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_approval_rule_template_content_input::Builder {
crate::input::update_approval_rule_template_content_input::Builder::default()
}
}
pub mod update_approval_rule_template_description_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) approval_rule_template_name: std::option::Option<std::string::String>,
pub(crate) approval_rule_template_description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_name = Some(input.into());
self
}
pub fn set_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_name = input;
self
}
pub fn approval_rule_template_description(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.approval_rule_template_description = Some(input.into());
self
}
pub fn set_approval_rule_template_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_template_description = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateApprovalRuleTemplateDescriptionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateApprovalRuleTemplateDescriptionInput {
approval_rule_template_name: self.approval_rule_template_name,
approval_rule_template_description: self.approval_rule_template_description,
})
}
}
}
#[doc(hidden)]
pub type UpdateApprovalRuleTemplateDescriptionInputOperationOutputAlias =
crate::operation::UpdateApprovalRuleTemplateDescription;
#[doc(hidden)]
pub type UpdateApprovalRuleTemplateDescriptionInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl UpdateApprovalRuleTemplateDescriptionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateApprovalRuleTemplateDescription,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateApprovalRuleTemplateDescriptionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateApprovalRuleTemplateDescriptionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdateApprovalRuleTemplateDescription",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_approval_rule_template_description(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateApprovalRuleTemplateDescription::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateApprovalRuleTemplateDescription",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_approval_rule_template_description_input::Builder {
crate::input::update_approval_rule_template_description_input::Builder::default()
}
}
pub mod update_approval_rule_template_name_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) old_approval_rule_template_name: std::option::Option<std::string::String>,
pub(crate) new_approval_rule_template_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn old_approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.old_approval_rule_template_name = Some(input.into());
self
}
pub fn set_old_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.old_approval_rule_template_name = input;
self
}
pub fn new_approval_rule_template_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.new_approval_rule_template_name = Some(input.into());
self
}
pub fn set_new_approval_rule_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.new_approval_rule_template_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateApprovalRuleTemplateNameInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateApprovalRuleTemplateNameInput {
old_approval_rule_template_name: self.old_approval_rule_template_name,
new_approval_rule_template_name: self.new_approval_rule_template_name,
})
}
}
}
#[doc(hidden)]
pub type UpdateApprovalRuleTemplateNameInputOperationOutputAlias =
crate::operation::UpdateApprovalRuleTemplateName;
#[doc(hidden)]
pub type UpdateApprovalRuleTemplateNameInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl UpdateApprovalRuleTemplateNameInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateApprovalRuleTemplateName,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateApprovalRuleTemplateNameInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateApprovalRuleTemplateNameInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdateApprovalRuleTemplateName",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_approval_rule_template_name(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateApprovalRuleTemplateName::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateApprovalRuleTemplateName",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_approval_rule_template_name_input::Builder {
crate::input::update_approval_rule_template_name_input::Builder::default()
}
}
pub mod update_comment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) comment_id: std::option::Option<std::string::String>,
pub(crate) content: std::option::Option<std::string::String>,
}
impl Builder {
pub fn comment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.comment_id = Some(input.into());
self
}
pub fn set_comment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment_id = input;
self
}
pub fn content(mut self, input: impl Into<std::string::String>) -> Self {
self.content = Some(input.into());
self
}
pub fn set_content(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateCommentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateCommentInput {
comment_id: self.comment_id,
content: self.content,
})
}
}
}
#[doc(hidden)]
pub type UpdateCommentInputOperationOutputAlias = crate::operation::UpdateComment;
#[doc(hidden)]
pub type UpdateCommentInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateCommentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateComment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateCommentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateCommentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdateComment",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_comment(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateComment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateComment",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_comment_input::Builder {
crate::input::update_comment_input::Builder::default()
}
}
pub mod update_default_branch_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) default_branch_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn default_branch_name(mut self, input: impl Into<std::string::String>) -> Self {
self.default_branch_name = Some(input.into());
self
}
pub fn set_default_branch_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.default_branch_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateDefaultBranchInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateDefaultBranchInput {
repository_name: self.repository_name,
default_branch_name: self.default_branch_name,
})
}
}
}
#[doc(hidden)]
pub type UpdateDefaultBranchInputOperationOutputAlias = crate::operation::UpdateDefaultBranch;
#[doc(hidden)]
pub type UpdateDefaultBranchInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateDefaultBranchInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateDefaultBranch,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateDefaultBranchInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateDefaultBranchInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdateDefaultBranch",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_default_branch(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateDefaultBranch::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateDefaultBranch",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_default_branch_input::Builder {
crate::input::update_default_branch_input::Builder::default()
}
}
pub mod update_pull_request_approval_rule_content_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) approval_rule_name: std::option::Option<std::string::String>,
pub(crate) existing_rule_content_sha256: std::option::Option<std::string::String>,
pub(crate) new_rule_content: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn approval_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.approval_rule_name = Some(input.into());
self
}
pub fn set_approval_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.approval_rule_name = input;
self
}
pub fn existing_rule_content_sha256(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.existing_rule_content_sha256 = Some(input.into());
self
}
pub fn set_existing_rule_content_sha256(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.existing_rule_content_sha256 = input;
self
}
pub fn new_rule_content(mut self, input: impl Into<std::string::String>) -> Self {
self.new_rule_content = Some(input.into());
self
}
pub fn set_new_rule_content(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.new_rule_content = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdatePullRequestApprovalRuleContentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdatePullRequestApprovalRuleContentInput {
pull_request_id: self.pull_request_id,
approval_rule_name: self.approval_rule_name,
existing_rule_content_sha256: self.existing_rule_content_sha256,
new_rule_content: self.new_rule_content,
})
}
}
}
#[doc(hidden)]
pub type UpdatePullRequestApprovalRuleContentInputOperationOutputAlias =
crate::operation::UpdatePullRequestApprovalRuleContent;
#[doc(hidden)]
pub type UpdatePullRequestApprovalRuleContentInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl UpdatePullRequestApprovalRuleContentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdatePullRequestApprovalRuleContent,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdatePullRequestApprovalRuleContentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdatePullRequestApprovalRuleContentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdatePullRequestApprovalRuleContent",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_pull_request_approval_rule_content(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdatePullRequestApprovalRuleContent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdatePullRequestApprovalRuleContent",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_pull_request_approval_rule_content_input::Builder {
crate::input::update_pull_request_approval_rule_content_input::Builder::default()
}
}
pub mod update_pull_request_approval_state_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) revision_id: std::option::Option<std::string::String>,
pub(crate) approval_state: std::option::Option<crate::model::ApprovalState>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn revision_id(mut self, input: impl Into<std::string::String>) -> Self {
self.revision_id = Some(input.into());
self
}
pub fn set_revision_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.revision_id = input;
self
}
pub fn approval_state(mut self, input: crate::model::ApprovalState) -> Self {
self.approval_state = Some(input);
self
}
pub fn set_approval_state(
mut self,
input: std::option::Option<crate::model::ApprovalState>,
) -> Self {
self.approval_state = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdatePullRequestApprovalStateInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdatePullRequestApprovalStateInput {
pull_request_id: self.pull_request_id,
revision_id: self.revision_id,
approval_state: self.approval_state,
})
}
}
}
#[doc(hidden)]
pub type UpdatePullRequestApprovalStateInputOperationOutputAlias =
crate::operation::UpdatePullRequestApprovalState;
#[doc(hidden)]
pub type UpdatePullRequestApprovalStateInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl UpdatePullRequestApprovalStateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdatePullRequestApprovalState,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdatePullRequestApprovalStateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdatePullRequestApprovalStateInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdatePullRequestApprovalState",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_pull_request_approval_state(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdatePullRequestApprovalState::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdatePullRequestApprovalState",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_pull_request_approval_state_input::Builder {
crate::input::update_pull_request_approval_state_input::Builder::default()
}
}
pub mod update_pull_request_description_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdatePullRequestDescriptionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdatePullRequestDescriptionInput {
pull_request_id: self.pull_request_id,
description: self.description,
})
}
}
}
#[doc(hidden)]
pub type UpdatePullRequestDescriptionInputOperationOutputAlias =
crate::operation::UpdatePullRequestDescription;
#[doc(hidden)]
pub type UpdatePullRequestDescriptionInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl UpdatePullRequestDescriptionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdatePullRequestDescription,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdatePullRequestDescriptionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdatePullRequestDescriptionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdatePullRequestDescription",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_pull_request_description(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdatePullRequestDescription::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdatePullRequestDescription",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_pull_request_description_input::Builder {
crate::input::update_pull_request_description_input::Builder::default()
}
}
pub mod update_pull_request_status_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) pull_request_status: std::option::Option<crate::model::PullRequestStatusEnum>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn pull_request_status(mut self, input: crate::model::PullRequestStatusEnum) -> Self {
self.pull_request_status = Some(input);
self
}
pub fn set_pull_request_status(
mut self,
input: std::option::Option<crate::model::PullRequestStatusEnum>,
) -> Self {
self.pull_request_status = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdatePullRequestStatusInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdatePullRequestStatusInput {
pull_request_id: self.pull_request_id,
pull_request_status: self.pull_request_status,
})
}
}
}
#[doc(hidden)]
pub type UpdatePullRequestStatusInputOperationOutputAlias =
crate::operation::UpdatePullRequestStatus;
#[doc(hidden)]
pub type UpdatePullRequestStatusInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdatePullRequestStatusInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdatePullRequestStatus,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdatePullRequestStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdatePullRequestStatusInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdatePullRequestStatus",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_pull_request_status(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdatePullRequestStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdatePullRequestStatus",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_pull_request_status_input::Builder {
crate::input::update_pull_request_status_input::Builder::default()
}
}
pub mod update_pull_request_title_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pull_request_id: std::option::Option<std::string::String>,
pub(crate) title: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pull_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.pull_request_id = Some(input.into());
self
}
pub fn set_pull_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pull_request_id = input;
self
}
pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
self.title = Some(input.into());
self
}
pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
self.title = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdatePullRequestTitleInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdatePullRequestTitleInput {
pull_request_id: self.pull_request_id,
title: self.title,
})
}
}
}
#[doc(hidden)]
pub type UpdatePullRequestTitleInputOperationOutputAlias = crate::operation::UpdatePullRequestTitle;
#[doc(hidden)]
pub type UpdatePullRequestTitleInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdatePullRequestTitleInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdatePullRequestTitle,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdatePullRequestTitleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdatePullRequestTitleInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdatePullRequestTitle",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_pull_request_title(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdatePullRequestTitle::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdatePullRequestTitle",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_pull_request_title_input::Builder {
crate::input::update_pull_request_title_input::Builder::default()
}
}
pub mod update_repository_description_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) repository_description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn repository_description(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_description = Some(input.into());
self
}
pub fn set_repository_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_description = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateRepositoryDescriptionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateRepositoryDescriptionInput {
repository_name: self.repository_name,
repository_description: self.repository_description,
})
}
}
}
#[doc(hidden)]
pub type UpdateRepositoryDescriptionInputOperationOutputAlias =
crate::operation::UpdateRepositoryDescription;
#[doc(hidden)]
pub type UpdateRepositoryDescriptionInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateRepositoryDescriptionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateRepositoryDescription,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateRepositoryDescriptionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateRepositoryDescriptionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdateRepositoryDescription",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_repository_description(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateRepositoryDescription::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateRepositoryDescription",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_repository_description_input::Builder {
crate::input::update_repository_description_input::Builder::default()
}
}
pub mod update_repository_name_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) old_name: std::option::Option<std::string::String>,
pub(crate) new_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn old_name(mut self, input: impl Into<std::string::String>) -> Self {
self.old_name = Some(input.into());
self
}
pub fn set_old_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.old_name = input;
self
}
pub fn new_name(mut self, input: impl Into<std::string::String>) -> Self {
self.new_name = Some(input.into());
self
}
pub fn set_new_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.new_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateRepositoryNameInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateRepositoryNameInput {
old_name: self.old_name,
new_name: self.new_name,
})
}
}
}
#[doc(hidden)]
pub type UpdateRepositoryNameInputOperationOutputAlias = crate::operation::UpdateRepositoryName;
#[doc(hidden)]
pub type UpdateRepositoryNameInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateRepositoryNameInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateRepositoryName,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateRepositoryNameInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateRepositoryNameInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeCommit_20150413.UpdateRepositoryName",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_repository_name(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateRepositoryName::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateRepositoryName",
"codecommit",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_repository_name_input::Builder {
crate::input::update_repository_name_input::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateRepositoryNameInput {
pub old_name: std::option::Option<std::string::String>,
pub new_name: std::option::Option<std::string::String>,
}
impl UpdateRepositoryNameInput {
pub fn old_name(&self) -> std::option::Option<&str> {
self.old_name.as_deref()
}
pub fn new_name(&self) -> std::option::Option<&str> {
self.new_name.as_deref()
}
}
impl std::fmt::Debug for UpdateRepositoryNameInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateRepositoryNameInput");
formatter.field("old_name", &self.old_name);
formatter.field("new_name", &self.new_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateRepositoryDescriptionInput {
pub repository_name: std::option::Option<std::string::String>,
pub repository_description: std::option::Option<std::string::String>,
}
impl UpdateRepositoryDescriptionInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn repository_description(&self) -> std::option::Option<&str> {
self.repository_description.as_deref()
}
}
impl std::fmt::Debug for UpdateRepositoryDescriptionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateRepositoryDescriptionInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("repository_description", &self.repository_description);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdatePullRequestTitleInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub title: std::option::Option<std::string::String>,
}
impl UpdatePullRequestTitleInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn title(&self) -> std::option::Option<&str> {
self.title.as_deref()
}
}
impl std::fmt::Debug for UpdatePullRequestTitleInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdatePullRequestTitleInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("title", &self.title);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdatePullRequestStatusInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub pull_request_status: std::option::Option<crate::model::PullRequestStatusEnum>,
}
impl UpdatePullRequestStatusInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn pull_request_status(&self) -> std::option::Option<&crate::model::PullRequestStatusEnum> {
self.pull_request_status.as_ref()
}
}
impl std::fmt::Debug for UpdatePullRequestStatusInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdatePullRequestStatusInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("pull_request_status", &self.pull_request_status);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdatePullRequestDescriptionInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
}
impl UpdatePullRequestDescriptionInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
impl std::fmt::Debug for UpdatePullRequestDescriptionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdatePullRequestDescriptionInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("description", &self.description);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdatePullRequestApprovalStateInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub revision_id: std::option::Option<std::string::String>,
pub approval_state: std::option::Option<crate::model::ApprovalState>,
}
impl UpdatePullRequestApprovalStateInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn revision_id(&self) -> std::option::Option<&str> {
self.revision_id.as_deref()
}
pub fn approval_state(&self) -> std::option::Option<&crate::model::ApprovalState> {
self.approval_state.as_ref()
}
}
impl std::fmt::Debug for UpdatePullRequestApprovalStateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdatePullRequestApprovalStateInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("revision_id", &self.revision_id);
formatter.field("approval_state", &self.approval_state);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdatePullRequestApprovalRuleContentInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub approval_rule_name: std::option::Option<std::string::String>,
pub existing_rule_content_sha256: std::option::Option<std::string::String>,
pub new_rule_content: std::option::Option<std::string::String>,
}
impl UpdatePullRequestApprovalRuleContentInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn approval_rule_name(&self) -> std::option::Option<&str> {
self.approval_rule_name.as_deref()
}
pub fn existing_rule_content_sha256(&self) -> std::option::Option<&str> {
self.existing_rule_content_sha256.as_deref()
}
pub fn new_rule_content(&self) -> std::option::Option<&str> {
self.new_rule_content.as_deref()
}
}
impl std::fmt::Debug for UpdatePullRequestApprovalRuleContentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdatePullRequestApprovalRuleContentInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("approval_rule_name", &self.approval_rule_name);
formatter.field(
"existing_rule_content_sha256",
&self.existing_rule_content_sha256,
);
formatter.field("new_rule_content", &self.new_rule_content);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateDefaultBranchInput {
pub repository_name: std::option::Option<std::string::String>,
pub default_branch_name: std::option::Option<std::string::String>,
}
impl UpdateDefaultBranchInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn default_branch_name(&self) -> std::option::Option<&str> {
self.default_branch_name.as_deref()
}
}
impl std::fmt::Debug for UpdateDefaultBranchInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateDefaultBranchInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("default_branch_name", &self.default_branch_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateCommentInput {
pub comment_id: std::option::Option<std::string::String>,
pub content: std::option::Option<std::string::String>,
}
impl UpdateCommentInput {
pub fn comment_id(&self) -> std::option::Option<&str> {
self.comment_id.as_deref()
}
pub fn content(&self) -> std::option::Option<&str> {
self.content.as_deref()
}
}
impl std::fmt::Debug for UpdateCommentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateCommentInput");
formatter.field("comment_id", &self.comment_id);
formatter.field("content", &self.content);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateApprovalRuleTemplateNameInput {
pub old_approval_rule_template_name: std::option::Option<std::string::String>,
pub new_approval_rule_template_name: std::option::Option<std::string::String>,
}
impl UpdateApprovalRuleTemplateNameInput {
pub fn old_approval_rule_template_name(&self) -> std::option::Option<&str> {
self.old_approval_rule_template_name.as_deref()
}
pub fn new_approval_rule_template_name(&self) -> std::option::Option<&str> {
self.new_approval_rule_template_name.as_deref()
}
}
impl std::fmt::Debug for UpdateApprovalRuleTemplateNameInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateApprovalRuleTemplateNameInput");
formatter.field(
"old_approval_rule_template_name",
&self.old_approval_rule_template_name,
);
formatter.field(
"new_approval_rule_template_name",
&self.new_approval_rule_template_name,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateApprovalRuleTemplateDescriptionInput {
pub approval_rule_template_name: std::option::Option<std::string::String>,
pub approval_rule_template_description: std::option::Option<std::string::String>,
}
impl UpdateApprovalRuleTemplateDescriptionInput {
pub fn approval_rule_template_name(&self) -> std::option::Option<&str> {
self.approval_rule_template_name.as_deref()
}
pub fn approval_rule_template_description(&self) -> std::option::Option<&str> {
self.approval_rule_template_description.as_deref()
}
}
impl std::fmt::Debug for UpdateApprovalRuleTemplateDescriptionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateApprovalRuleTemplateDescriptionInput");
formatter.field(
"approval_rule_template_name",
&self.approval_rule_template_name,
);
formatter.field(
"approval_rule_template_description",
&self.approval_rule_template_description,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateApprovalRuleTemplateContentInput {
pub approval_rule_template_name: std::option::Option<std::string::String>,
pub new_rule_content: std::option::Option<std::string::String>,
pub existing_rule_content_sha256: std::option::Option<std::string::String>,
}
impl UpdateApprovalRuleTemplateContentInput {
pub fn approval_rule_template_name(&self) -> std::option::Option<&str> {
self.approval_rule_template_name.as_deref()
}
pub fn new_rule_content(&self) -> std::option::Option<&str> {
self.new_rule_content.as_deref()
}
pub fn existing_rule_content_sha256(&self) -> std::option::Option<&str> {
self.existing_rule_content_sha256.as_deref()
}
}
impl std::fmt::Debug for UpdateApprovalRuleTemplateContentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateApprovalRuleTemplateContentInput");
formatter.field(
"approval_rule_template_name",
&self.approval_rule_template_name,
);
formatter.field("new_rule_content", &self.new_rule_content);
formatter.field(
"existing_rule_content_sha256",
&self.existing_rule_content_sha256,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_keys(&self) -> std::option::Option<&[std::string::String]> {
self.tag_keys.as_deref()
}
}
impl std::fmt::Debug for UntagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UntagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tag_keys", &self.tag_keys);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TestRepositoryTriggersInput {
pub repository_name: std::option::Option<std::string::String>,
pub triggers: std::option::Option<std::vec::Vec<crate::model::RepositoryTrigger>>,
}
impl TestRepositoryTriggersInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn triggers(&self) -> std::option::Option<&[crate::model::RepositoryTrigger]> {
self.triggers.as_deref()
}
}
impl std::fmt::Debug for TestRepositoryTriggersInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TestRepositoryTriggersInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("triggers", &self.triggers);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for TagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutRepositoryTriggersInput {
pub repository_name: std::option::Option<std::string::String>,
pub triggers: std::option::Option<std::vec::Vec<crate::model::RepositoryTrigger>>,
}
impl PutRepositoryTriggersInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn triggers(&self) -> std::option::Option<&[crate::model::RepositoryTrigger]> {
self.triggers.as_deref()
}
}
impl std::fmt::Debug for PutRepositoryTriggersInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutRepositoryTriggersInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("triggers", &self.triggers);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutFileInput {
pub repository_name: std::option::Option<std::string::String>,
pub branch_name: std::option::Option<std::string::String>,
pub file_content: std::option::Option<aws_smithy_types::Blob>,
pub file_path: std::option::Option<std::string::String>,
pub file_mode: std::option::Option<crate::model::FileModeTypeEnum>,
pub parent_commit_id: std::option::Option<std::string::String>,
pub commit_message: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
pub email: std::option::Option<std::string::String>,
}
impl PutFileInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn branch_name(&self) -> std::option::Option<&str> {
self.branch_name.as_deref()
}
pub fn file_content(&self) -> std::option::Option<&aws_smithy_types::Blob> {
self.file_content.as_ref()
}
pub fn file_path(&self) -> std::option::Option<&str> {
self.file_path.as_deref()
}
pub fn file_mode(&self) -> std::option::Option<&crate::model::FileModeTypeEnum> {
self.file_mode.as_ref()
}
pub fn parent_commit_id(&self) -> std::option::Option<&str> {
self.parent_commit_id.as_deref()
}
pub fn commit_message(&self) -> std::option::Option<&str> {
self.commit_message.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn email(&self) -> std::option::Option<&str> {
self.email.as_deref()
}
}
impl std::fmt::Debug for PutFileInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutFileInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("branch_name", &self.branch_name);
formatter.field("file_content", &self.file_content);
formatter.field("file_path", &self.file_path);
formatter.field("file_mode", &self.file_mode);
formatter.field("parent_commit_id", &self.parent_commit_id);
formatter.field("commit_message", &self.commit_message);
formatter.field("name", &self.name);
formatter.field("email", &self.email);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutCommentReactionInput {
pub comment_id: std::option::Option<std::string::String>,
pub reaction_value: std::option::Option<std::string::String>,
}
impl PutCommentReactionInput {
pub fn comment_id(&self) -> std::option::Option<&str> {
self.comment_id.as_deref()
}
pub fn reaction_value(&self) -> std::option::Option<&str> {
self.reaction_value.as_deref()
}
}
impl std::fmt::Debug for PutCommentReactionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutCommentReactionInput");
formatter.field("comment_id", &self.comment_id);
formatter.field("reaction_value", &self.reaction_value);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PostCommentReplyInput {
pub in_reply_to: std::option::Option<std::string::String>,
pub client_request_token: std::option::Option<std::string::String>,
pub content: std::option::Option<std::string::String>,
}
impl PostCommentReplyInput {
pub fn in_reply_to(&self) -> std::option::Option<&str> {
self.in_reply_to.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn content(&self) -> std::option::Option<&str> {
self.content.as_deref()
}
}
impl std::fmt::Debug for PostCommentReplyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PostCommentReplyInput");
formatter.field("in_reply_to", &self.in_reply_to);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("content", &self.content);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PostCommentForPullRequestInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub repository_name: std::option::Option<std::string::String>,
pub before_commit_id: std::option::Option<std::string::String>,
pub after_commit_id: std::option::Option<std::string::String>,
pub location: std::option::Option<crate::model::Location>,
pub content: std::option::Option<std::string::String>,
pub client_request_token: std::option::Option<std::string::String>,
}
impl PostCommentForPullRequestInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn before_commit_id(&self) -> std::option::Option<&str> {
self.before_commit_id.as_deref()
}
pub fn after_commit_id(&self) -> std::option::Option<&str> {
self.after_commit_id.as_deref()
}
pub fn location(&self) -> std::option::Option<&crate::model::Location> {
self.location.as_ref()
}
pub fn content(&self) -> std::option::Option<&str> {
self.content.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
impl std::fmt::Debug for PostCommentForPullRequestInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PostCommentForPullRequestInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("repository_name", &self.repository_name);
formatter.field("before_commit_id", &self.before_commit_id);
formatter.field("after_commit_id", &self.after_commit_id);
formatter.field("location", &self.location);
formatter.field("content", &self.content);
formatter.field("client_request_token", &self.client_request_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PostCommentForComparedCommitInput {
pub repository_name: std::option::Option<std::string::String>,
pub before_commit_id: std::option::Option<std::string::String>,
pub after_commit_id: std::option::Option<std::string::String>,
pub location: std::option::Option<crate::model::Location>,
pub content: std::option::Option<std::string::String>,
pub client_request_token: std::option::Option<std::string::String>,
}
impl PostCommentForComparedCommitInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn before_commit_id(&self) -> std::option::Option<&str> {
self.before_commit_id.as_deref()
}
pub fn after_commit_id(&self) -> std::option::Option<&str> {
self.after_commit_id.as_deref()
}
pub fn location(&self) -> std::option::Option<&crate::model::Location> {
self.location.as_ref()
}
pub fn content(&self) -> std::option::Option<&str> {
self.content.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
impl std::fmt::Debug for PostCommentForComparedCommitInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PostCommentForComparedCommitInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("before_commit_id", &self.before_commit_id);
formatter.field("after_commit_id", &self.after_commit_id);
formatter.field("location", &self.location);
formatter.field("content", &self.content);
formatter.field("client_request_token", &self.client_request_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OverridePullRequestApprovalRulesInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub revision_id: std::option::Option<std::string::String>,
pub override_status: std::option::Option<crate::model::OverrideStatus>,
}
impl OverridePullRequestApprovalRulesInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn revision_id(&self) -> std::option::Option<&str> {
self.revision_id.as_deref()
}
pub fn override_status(&self) -> std::option::Option<&crate::model::OverrideStatus> {
self.override_status.as_ref()
}
}
impl std::fmt::Debug for OverridePullRequestApprovalRulesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OverridePullRequestApprovalRulesInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("revision_id", &self.revision_id);
formatter.field("override_status", &self.override_status);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MergePullRequestByThreeWayInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub repository_name: std::option::Option<std::string::String>,
pub source_commit_id: std::option::Option<std::string::String>,
pub conflict_detail_level: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub commit_message: std::option::Option<std::string::String>,
pub author_name: std::option::Option<std::string::String>,
pub email: std::option::Option<std::string::String>,
pub keep_empty_folders: bool,
pub conflict_resolution: std::option::Option<crate::model::ConflictResolution>,
}
impl MergePullRequestByThreeWayInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn source_commit_id(&self) -> std::option::Option<&str> {
self.source_commit_id.as_deref()
}
pub fn conflict_detail_level(
&self,
) -> std::option::Option<&crate::model::ConflictDetailLevelTypeEnum> {
self.conflict_detail_level.as_ref()
}
pub fn conflict_resolution_strategy(
&self,
) -> std::option::Option<&crate::model::ConflictResolutionStrategyTypeEnum> {
self.conflict_resolution_strategy.as_ref()
}
pub fn commit_message(&self) -> std::option::Option<&str> {
self.commit_message.as_deref()
}
pub fn author_name(&self) -> std::option::Option<&str> {
self.author_name.as_deref()
}
pub fn email(&self) -> std::option::Option<&str> {
self.email.as_deref()
}
pub fn keep_empty_folders(&self) -> bool {
self.keep_empty_folders
}
pub fn conflict_resolution(&self) -> std::option::Option<&crate::model::ConflictResolution> {
self.conflict_resolution.as_ref()
}
}
impl std::fmt::Debug for MergePullRequestByThreeWayInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MergePullRequestByThreeWayInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("repository_name", &self.repository_name);
formatter.field("source_commit_id", &self.source_commit_id);
formatter.field("conflict_detail_level", &self.conflict_detail_level);
formatter.field(
"conflict_resolution_strategy",
&self.conflict_resolution_strategy,
);
formatter.field("commit_message", &self.commit_message);
formatter.field("author_name", &self.author_name);
formatter.field("email", &self.email);
formatter.field("keep_empty_folders", &self.keep_empty_folders);
formatter.field("conflict_resolution", &self.conflict_resolution);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MergePullRequestBySquashInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub repository_name: std::option::Option<std::string::String>,
pub source_commit_id: std::option::Option<std::string::String>,
pub conflict_detail_level: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub commit_message: std::option::Option<std::string::String>,
pub author_name: std::option::Option<std::string::String>,
pub email: std::option::Option<std::string::String>,
pub keep_empty_folders: bool,
pub conflict_resolution: std::option::Option<crate::model::ConflictResolution>,
}
impl MergePullRequestBySquashInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn source_commit_id(&self) -> std::option::Option<&str> {
self.source_commit_id.as_deref()
}
pub fn conflict_detail_level(
&self,
) -> std::option::Option<&crate::model::ConflictDetailLevelTypeEnum> {
self.conflict_detail_level.as_ref()
}
pub fn conflict_resolution_strategy(
&self,
) -> std::option::Option<&crate::model::ConflictResolutionStrategyTypeEnum> {
self.conflict_resolution_strategy.as_ref()
}
pub fn commit_message(&self) -> std::option::Option<&str> {
self.commit_message.as_deref()
}
pub fn author_name(&self) -> std::option::Option<&str> {
self.author_name.as_deref()
}
pub fn email(&self) -> std::option::Option<&str> {
self.email.as_deref()
}
pub fn keep_empty_folders(&self) -> bool {
self.keep_empty_folders
}
pub fn conflict_resolution(&self) -> std::option::Option<&crate::model::ConflictResolution> {
self.conflict_resolution.as_ref()
}
}
impl std::fmt::Debug for MergePullRequestBySquashInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MergePullRequestBySquashInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("repository_name", &self.repository_name);
formatter.field("source_commit_id", &self.source_commit_id);
formatter.field("conflict_detail_level", &self.conflict_detail_level);
formatter.field(
"conflict_resolution_strategy",
&self.conflict_resolution_strategy,
);
formatter.field("commit_message", &self.commit_message);
formatter.field("author_name", &self.author_name);
formatter.field("email", &self.email);
formatter.field("keep_empty_folders", &self.keep_empty_folders);
formatter.field("conflict_resolution", &self.conflict_resolution);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MergePullRequestByFastForwardInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub repository_name: std::option::Option<std::string::String>,
pub source_commit_id: std::option::Option<std::string::String>,
}
impl MergePullRequestByFastForwardInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn source_commit_id(&self) -> std::option::Option<&str> {
self.source_commit_id.as_deref()
}
}
impl std::fmt::Debug for MergePullRequestByFastForwardInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MergePullRequestByFastForwardInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("repository_name", &self.repository_name);
formatter.field("source_commit_id", &self.source_commit_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MergeBranchesByThreeWayInput {
pub repository_name: std::option::Option<std::string::String>,
pub source_commit_specifier: std::option::Option<std::string::String>,
pub destination_commit_specifier: std::option::Option<std::string::String>,
pub target_branch: std::option::Option<std::string::String>,
pub conflict_detail_level: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub author_name: std::option::Option<std::string::String>,
pub email: std::option::Option<std::string::String>,
pub commit_message: std::option::Option<std::string::String>,
pub keep_empty_folders: bool,
pub conflict_resolution: std::option::Option<crate::model::ConflictResolution>,
}
impl MergeBranchesByThreeWayInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn source_commit_specifier(&self) -> std::option::Option<&str> {
self.source_commit_specifier.as_deref()
}
pub fn destination_commit_specifier(&self) -> std::option::Option<&str> {
self.destination_commit_specifier.as_deref()
}
pub fn target_branch(&self) -> std::option::Option<&str> {
self.target_branch.as_deref()
}
pub fn conflict_detail_level(
&self,
) -> std::option::Option<&crate::model::ConflictDetailLevelTypeEnum> {
self.conflict_detail_level.as_ref()
}
pub fn conflict_resolution_strategy(
&self,
) -> std::option::Option<&crate::model::ConflictResolutionStrategyTypeEnum> {
self.conflict_resolution_strategy.as_ref()
}
pub fn author_name(&self) -> std::option::Option<&str> {
self.author_name.as_deref()
}
pub fn email(&self) -> std::option::Option<&str> {
self.email.as_deref()
}
pub fn commit_message(&self) -> std::option::Option<&str> {
self.commit_message.as_deref()
}
pub fn keep_empty_folders(&self) -> bool {
self.keep_empty_folders
}
pub fn conflict_resolution(&self) -> std::option::Option<&crate::model::ConflictResolution> {
self.conflict_resolution.as_ref()
}
}
impl std::fmt::Debug for MergeBranchesByThreeWayInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MergeBranchesByThreeWayInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("source_commit_specifier", &self.source_commit_specifier);
formatter.field(
"destination_commit_specifier",
&self.destination_commit_specifier,
);
formatter.field("target_branch", &self.target_branch);
formatter.field("conflict_detail_level", &self.conflict_detail_level);
formatter.field(
"conflict_resolution_strategy",
&self.conflict_resolution_strategy,
);
formatter.field("author_name", &self.author_name);
formatter.field("email", &self.email);
formatter.field("commit_message", &self.commit_message);
formatter.field("keep_empty_folders", &self.keep_empty_folders);
formatter.field("conflict_resolution", &self.conflict_resolution);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MergeBranchesBySquashInput {
pub repository_name: std::option::Option<std::string::String>,
pub source_commit_specifier: std::option::Option<std::string::String>,
pub destination_commit_specifier: std::option::Option<std::string::String>,
pub target_branch: std::option::Option<std::string::String>,
pub conflict_detail_level: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub author_name: std::option::Option<std::string::String>,
pub email: std::option::Option<std::string::String>,
pub commit_message: std::option::Option<std::string::String>,
pub keep_empty_folders: bool,
pub conflict_resolution: std::option::Option<crate::model::ConflictResolution>,
}
impl MergeBranchesBySquashInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn source_commit_specifier(&self) -> std::option::Option<&str> {
self.source_commit_specifier.as_deref()
}
pub fn destination_commit_specifier(&self) -> std::option::Option<&str> {
self.destination_commit_specifier.as_deref()
}
pub fn target_branch(&self) -> std::option::Option<&str> {
self.target_branch.as_deref()
}
pub fn conflict_detail_level(
&self,
) -> std::option::Option<&crate::model::ConflictDetailLevelTypeEnum> {
self.conflict_detail_level.as_ref()
}
pub fn conflict_resolution_strategy(
&self,
) -> std::option::Option<&crate::model::ConflictResolutionStrategyTypeEnum> {
self.conflict_resolution_strategy.as_ref()
}
pub fn author_name(&self) -> std::option::Option<&str> {
self.author_name.as_deref()
}
pub fn email(&self) -> std::option::Option<&str> {
self.email.as_deref()
}
pub fn commit_message(&self) -> std::option::Option<&str> {
self.commit_message.as_deref()
}
pub fn keep_empty_folders(&self) -> bool {
self.keep_empty_folders
}
pub fn conflict_resolution(&self) -> std::option::Option<&crate::model::ConflictResolution> {
self.conflict_resolution.as_ref()
}
}
impl std::fmt::Debug for MergeBranchesBySquashInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MergeBranchesBySquashInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("source_commit_specifier", &self.source_commit_specifier);
formatter.field(
"destination_commit_specifier",
&self.destination_commit_specifier,
);
formatter.field("target_branch", &self.target_branch);
formatter.field("conflict_detail_level", &self.conflict_detail_level);
formatter.field(
"conflict_resolution_strategy",
&self.conflict_resolution_strategy,
);
formatter.field("author_name", &self.author_name);
formatter.field("email", &self.email);
formatter.field("commit_message", &self.commit_message);
formatter.field("keep_empty_folders", &self.keep_empty_folders);
formatter.field("conflict_resolution", &self.conflict_resolution);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MergeBranchesByFastForwardInput {
pub repository_name: std::option::Option<std::string::String>,
pub source_commit_specifier: std::option::Option<std::string::String>,
pub destination_commit_specifier: std::option::Option<std::string::String>,
pub target_branch: std::option::Option<std::string::String>,
}
impl MergeBranchesByFastForwardInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn source_commit_specifier(&self) -> std::option::Option<&str> {
self.source_commit_specifier.as_deref()
}
pub fn destination_commit_specifier(&self) -> std::option::Option<&str> {
self.destination_commit_specifier.as_deref()
}
pub fn target_branch(&self) -> std::option::Option<&str> {
self.target_branch.as_deref()
}
}
impl std::fmt::Debug for MergeBranchesByFastForwardInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MergeBranchesByFastForwardInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("source_commit_specifier", &self.source_commit_specifier);
formatter.field(
"destination_commit_specifier",
&self.destination_commit_specifier,
);
formatter.field("target_branch", &self.target_branch);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListTagsForResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListTagsForResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListTagsForResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListTagsForResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListRepositoriesForApprovalRuleTemplateInput {
pub approval_rule_template_name: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListRepositoriesForApprovalRuleTemplateInput {
pub fn approval_rule_template_name(&self) -> std::option::Option<&str> {
self.approval_rule_template_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListRepositoriesForApprovalRuleTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListRepositoriesForApprovalRuleTemplateInput");
formatter.field(
"approval_rule_template_name",
&self.approval_rule_template_name,
);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListRepositoriesInput {
pub next_token: std::option::Option<std::string::String>,
pub sort_by: std::option::Option<crate::model::SortByEnum>,
pub order: std::option::Option<crate::model::OrderEnum>,
}
impl ListRepositoriesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn sort_by(&self) -> std::option::Option<&crate::model::SortByEnum> {
self.sort_by.as_ref()
}
pub fn order(&self) -> std::option::Option<&crate::model::OrderEnum> {
self.order.as_ref()
}
}
impl std::fmt::Debug for ListRepositoriesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListRepositoriesInput");
formatter.field("next_token", &self.next_token);
formatter.field("sort_by", &self.sort_by);
formatter.field("order", &self.order);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListPullRequestsInput {
pub repository_name: std::option::Option<std::string::String>,
pub author_arn: std::option::Option<std::string::String>,
pub pull_request_status: std::option::Option<crate::model::PullRequestStatusEnum>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListPullRequestsInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn author_arn(&self) -> std::option::Option<&str> {
self.author_arn.as_deref()
}
pub fn pull_request_status(&self) -> std::option::Option<&crate::model::PullRequestStatusEnum> {
self.pull_request_status.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListPullRequestsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListPullRequestsInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("author_arn", &self.author_arn);
formatter.field("pull_request_status", &self.pull_request_status);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListBranchesInput {
pub repository_name: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListBranchesInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListBranchesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListBranchesInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListAssociatedApprovalRuleTemplatesForRepositoryInput {
pub repository_name: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListAssociatedApprovalRuleTemplatesForRepositoryInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListAssociatedApprovalRuleTemplatesForRepositoryInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListAssociatedApprovalRuleTemplatesForRepositoryInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListApprovalRuleTemplatesInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListApprovalRuleTemplatesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListApprovalRuleTemplatesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListApprovalRuleTemplatesInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetRepositoryTriggersInput {
pub repository_name: std::option::Option<std::string::String>,
}
impl GetRepositoryTriggersInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
}
impl std::fmt::Debug for GetRepositoryTriggersInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetRepositoryTriggersInput");
formatter.field("repository_name", &self.repository_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetRepositoryInput {
pub repository_name: std::option::Option<std::string::String>,
}
impl GetRepositoryInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
}
impl std::fmt::Debug for GetRepositoryInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetRepositoryInput");
formatter.field("repository_name", &self.repository_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetPullRequestOverrideStateInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub revision_id: std::option::Option<std::string::String>,
}
impl GetPullRequestOverrideStateInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn revision_id(&self) -> std::option::Option<&str> {
self.revision_id.as_deref()
}
}
impl std::fmt::Debug for GetPullRequestOverrideStateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetPullRequestOverrideStateInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("revision_id", &self.revision_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetPullRequestApprovalStatesInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub revision_id: std::option::Option<std::string::String>,
}
impl GetPullRequestApprovalStatesInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn revision_id(&self) -> std::option::Option<&str> {
self.revision_id.as_deref()
}
}
impl std::fmt::Debug for GetPullRequestApprovalStatesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetPullRequestApprovalStatesInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("revision_id", &self.revision_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetPullRequestInput {
pub pull_request_id: std::option::Option<std::string::String>,
}
impl GetPullRequestInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
}
impl std::fmt::Debug for GetPullRequestInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetPullRequestInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetMergeOptionsInput {
pub repository_name: std::option::Option<std::string::String>,
pub source_commit_specifier: std::option::Option<std::string::String>,
pub destination_commit_specifier: std::option::Option<std::string::String>,
pub conflict_detail_level: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
}
impl GetMergeOptionsInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn source_commit_specifier(&self) -> std::option::Option<&str> {
self.source_commit_specifier.as_deref()
}
pub fn destination_commit_specifier(&self) -> std::option::Option<&str> {
self.destination_commit_specifier.as_deref()
}
pub fn conflict_detail_level(
&self,
) -> std::option::Option<&crate::model::ConflictDetailLevelTypeEnum> {
self.conflict_detail_level.as_ref()
}
pub fn conflict_resolution_strategy(
&self,
) -> std::option::Option<&crate::model::ConflictResolutionStrategyTypeEnum> {
self.conflict_resolution_strategy.as_ref()
}
}
impl std::fmt::Debug for GetMergeOptionsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetMergeOptionsInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("source_commit_specifier", &self.source_commit_specifier);
formatter.field(
"destination_commit_specifier",
&self.destination_commit_specifier,
);
formatter.field("conflict_detail_level", &self.conflict_detail_level);
formatter.field(
"conflict_resolution_strategy",
&self.conflict_resolution_strategy,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetMergeConflictsInput {
pub repository_name: std::option::Option<std::string::String>,
pub destination_commit_specifier: std::option::Option<std::string::String>,
pub source_commit_specifier: std::option::Option<std::string::String>,
pub merge_option: std::option::Option<crate::model::MergeOptionTypeEnum>,
pub conflict_detail_level: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub max_conflict_files: std::option::Option<i32>,
pub conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub next_token: std::option::Option<std::string::String>,
}
impl GetMergeConflictsInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn destination_commit_specifier(&self) -> std::option::Option<&str> {
self.destination_commit_specifier.as_deref()
}
pub fn source_commit_specifier(&self) -> std::option::Option<&str> {
self.source_commit_specifier.as_deref()
}
pub fn merge_option(&self) -> std::option::Option<&crate::model::MergeOptionTypeEnum> {
self.merge_option.as_ref()
}
pub fn conflict_detail_level(
&self,
) -> std::option::Option<&crate::model::ConflictDetailLevelTypeEnum> {
self.conflict_detail_level.as_ref()
}
pub fn max_conflict_files(&self) -> std::option::Option<i32> {
self.max_conflict_files
}
pub fn conflict_resolution_strategy(
&self,
) -> std::option::Option<&crate::model::ConflictResolutionStrategyTypeEnum> {
self.conflict_resolution_strategy.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for GetMergeConflictsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetMergeConflictsInput");
formatter.field("repository_name", &self.repository_name);
formatter.field(
"destination_commit_specifier",
&self.destination_commit_specifier,
);
formatter.field("source_commit_specifier", &self.source_commit_specifier);
formatter.field("merge_option", &self.merge_option);
formatter.field("conflict_detail_level", &self.conflict_detail_level);
formatter.field("max_conflict_files", &self.max_conflict_files);
formatter.field(
"conflict_resolution_strategy",
&self.conflict_resolution_strategy,
);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetMergeCommitInput {
pub repository_name: std::option::Option<std::string::String>,
pub source_commit_specifier: std::option::Option<std::string::String>,
pub destination_commit_specifier: std::option::Option<std::string::String>,
pub conflict_detail_level: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
}
impl GetMergeCommitInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn source_commit_specifier(&self) -> std::option::Option<&str> {
self.source_commit_specifier.as_deref()
}
pub fn destination_commit_specifier(&self) -> std::option::Option<&str> {
self.destination_commit_specifier.as_deref()
}
pub fn conflict_detail_level(
&self,
) -> std::option::Option<&crate::model::ConflictDetailLevelTypeEnum> {
self.conflict_detail_level.as_ref()
}
pub fn conflict_resolution_strategy(
&self,
) -> std::option::Option<&crate::model::ConflictResolutionStrategyTypeEnum> {
self.conflict_resolution_strategy.as_ref()
}
}
impl std::fmt::Debug for GetMergeCommitInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetMergeCommitInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("source_commit_specifier", &self.source_commit_specifier);
formatter.field(
"destination_commit_specifier",
&self.destination_commit_specifier,
);
formatter.field("conflict_detail_level", &self.conflict_detail_level);
formatter.field(
"conflict_resolution_strategy",
&self.conflict_resolution_strategy,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetFolderInput {
pub repository_name: std::option::Option<std::string::String>,
pub commit_specifier: std::option::Option<std::string::String>,
pub folder_path: std::option::Option<std::string::String>,
}
impl GetFolderInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn commit_specifier(&self) -> std::option::Option<&str> {
self.commit_specifier.as_deref()
}
pub fn folder_path(&self) -> std::option::Option<&str> {
self.folder_path.as_deref()
}
}
impl std::fmt::Debug for GetFolderInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetFolderInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("commit_specifier", &self.commit_specifier);
formatter.field("folder_path", &self.folder_path);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetFileInput {
pub repository_name: std::option::Option<std::string::String>,
pub commit_specifier: std::option::Option<std::string::String>,
pub file_path: std::option::Option<std::string::String>,
}
impl GetFileInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn commit_specifier(&self) -> std::option::Option<&str> {
self.commit_specifier.as_deref()
}
pub fn file_path(&self) -> std::option::Option<&str> {
self.file_path.as_deref()
}
}
impl std::fmt::Debug for GetFileInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetFileInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("commit_specifier", &self.commit_specifier);
formatter.field("file_path", &self.file_path);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetDifferencesInput {
pub repository_name: std::option::Option<std::string::String>,
pub before_commit_specifier: std::option::Option<std::string::String>,
pub after_commit_specifier: std::option::Option<std::string::String>,
pub before_path: std::option::Option<std::string::String>,
pub after_path: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl GetDifferencesInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn before_commit_specifier(&self) -> std::option::Option<&str> {
self.before_commit_specifier.as_deref()
}
pub fn after_commit_specifier(&self) -> std::option::Option<&str> {
self.after_commit_specifier.as_deref()
}
pub fn before_path(&self) -> std::option::Option<&str> {
self.before_path.as_deref()
}
pub fn after_path(&self) -> std::option::Option<&str> {
self.after_path.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for GetDifferencesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetDifferencesInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("before_commit_specifier", &self.before_commit_specifier);
formatter.field("after_commit_specifier", &self.after_commit_specifier);
formatter.field("before_path", &self.before_path);
formatter.field("after_path", &self.after_path);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetCommitInput {
pub repository_name: std::option::Option<std::string::String>,
pub commit_id: std::option::Option<std::string::String>,
}
impl GetCommitInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn commit_id(&self) -> std::option::Option<&str> {
self.commit_id.as_deref()
}
}
impl std::fmt::Debug for GetCommitInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetCommitInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("commit_id", &self.commit_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetCommentsForPullRequestInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub repository_name: std::option::Option<std::string::String>,
pub before_commit_id: std::option::Option<std::string::String>,
pub after_commit_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl GetCommentsForPullRequestInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn before_commit_id(&self) -> std::option::Option<&str> {
self.before_commit_id.as_deref()
}
pub fn after_commit_id(&self) -> std::option::Option<&str> {
self.after_commit_id.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for GetCommentsForPullRequestInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetCommentsForPullRequestInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("repository_name", &self.repository_name);
formatter.field("before_commit_id", &self.before_commit_id);
formatter.field("after_commit_id", &self.after_commit_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetCommentsForComparedCommitInput {
pub repository_name: std::option::Option<std::string::String>,
pub before_commit_id: std::option::Option<std::string::String>,
pub after_commit_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl GetCommentsForComparedCommitInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn before_commit_id(&self) -> std::option::Option<&str> {
self.before_commit_id.as_deref()
}
pub fn after_commit_id(&self) -> std::option::Option<&str> {
self.after_commit_id.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for GetCommentsForComparedCommitInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetCommentsForComparedCommitInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("before_commit_id", &self.before_commit_id);
formatter.field("after_commit_id", &self.after_commit_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetCommentReactionsInput {
pub comment_id: std::option::Option<std::string::String>,
pub reaction_user_arn: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl GetCommentReactionsInput {
pub fn comment_id(&self) -> std::option::Option<&str> {
self.comment_id.as_deref()
}
pub fn reaction_user_arn(&self) -> std::option::Option<&str> {
self.reaction_user_arn.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for GetCommentReactionsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetCommentReactionsInput");
formatter.field("comment_id", &self.comment_id);
formatter.field("reaction_user_arn", &self.reaction_user_arn);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetCommentInput {
pub comment_id: std::option::Option<std::string::String>,
}
impl GetCommentInput {
pub fn comment_id(&self) -> std::option::Option<&str> {
self.comment_id.as_deref()
}
}
impl std::fmt::Debug for GetCommentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetCommentInput");
formatter.field("comment_id", &self.comment_id);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetBranchInput {
pub repository_name: std::option::Option<std::string::String>,
pub branch_name: std::option::Option<std::string::String>,
}
impl GetBranchInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn branch_name(&self) -> std::option::Option<&str> {
self.branch_name.as_deref()
}
}
impl std::fmt::Debug for GetBranchInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetBranchInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("branch_name", &self.branch_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetBlobInput {
pub repository_name: std::option::Option<std::string::String>,
pub blob_id: std::option::Option<std::string::String>,
}
impl GetBlobInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn blob_id(&self) -> std::option::Option<&str> {
self.blob_id.as_deref()
}
}
impl std::fmt::Debug for GetBlobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetBlobInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("blob_id", &self.blob_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetApprovalRuleTemplateInput {
pub approval_rule_template_name: std::option::Option<std::string::String>,
}
impl GetApprovalRuleTemplateInput {
pub fn approval_rule_template_name(&self) -> std::option::Option<&str> {
self.approval_rule_template_name.as_deref()
}
}
impl std::fmt::Debug for GetApprovalRuleTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetApprovalRuleTemplateInput");
formatter.field(
"approval_rule_template_name",
&self.approval_rule_template_name,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EvaluatePullRequestApprovalRulesInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub revision_id: std::option::Option<std::string::String>,
}
impl EvaluatePullRequestApprovalRulesInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn revision_id(&self) -> std::option::Option<&str> {
self.revision_id.as_deref()
}
}
impl std::fmt::Debug for EvaluatePullRequestApprovalRulesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EvaluatePullRequestApprovalRulesInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("revision_id", &self.revision_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DisassociateApprovalRuleTemplateFromRepositoryInput {
pub approval_rule_template_name: std::option::Option<std::string::String>,
pub repository_name: std::option::Option<std::string::String>,
}
impl DisassociateApprovalRuleTemplateFromRepositoryInput {
pub fn approval_rule_template_name(&self) -> std::option::Option<&str> {
self.approval_rule_template_name.as_deref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
}
impl std::fmt::Debug for DisassociateApprovalRuleTemplateFromRepositoryInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DisassociateApprovalRuleTemplateFromRepositoryInput");
formatter.field(
"approval_rule_template_name",
&self.approval_rule_template_name,
);
formatter.field("repository_name", &self.repository_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribePullRequestEventsInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub pull_request_event_type: std::option::Option<crate::model::PullRequestEventType>,
pub actor_arn: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl DescribePullRequestEventsInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn pull_request_event_type(
&self,
) -> std::option::Option<&crate::model::PullRequestEventType> {
self.pull_request_event_type.as_ref()
}
pub fn actor_arn(&self) -> std::option::Option<&str> {
self.actor_arn.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for DescribePullRequestEventsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribePullRequestEventsInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("pull_request_event_type", &self.pull_request_event_type);
formatter.field("actor_arn", &self.actor_arn);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeMergeConflictsInput {
pub repository_name: std::option::Option<std::string::String>,
pub destination_commit_specifier: std::option::Option<std::string::String>,
pub source_commit_specifier: std::option::Option<std::string::String>,
pub merge_option: std::option::Option<crate::model::MergeOptionTypeEnum>,
pub max_merge_hunks: std::option::Option<i32>,
pub file_path: std::option::Option<std::string::String>,
pub conflict_detail_level: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeMergeConflictsInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn destination_commit_specifier(&self) -> std::option::Option<&str> {
self.destination_commit_specifier.as_deref()
}
pub fn source_commit_specifier(&self) -> std::option::Option<&str> {
self.source_commit_specifier.as_deref()
}
pub fn merge_option(&self) -> std::option::Option<&crate::model::MergeOptionTypeEnum> {
self.merge_option.as_ref()
}
pub fn max_merge_hunks(&self) -> std::option::Option<i32> {
self.max_merge_hunks
}
pub fn file_path(&self) -> std::option::Option<&str> {
self.file_path.as_deref()
}
pub fn conflict_detail_level(
&self,
) -> std::option::Option<&crate::model::ConflictDetailLevelTypeEnum> {
self.conflict_detail_level.as_ref()
}
pub fn conflict_resolution_strategy(
&self,
) -> std::option::Option<&crate::model::ConflictResolutionStrategyTypeEnum> {
self.conflict_resolution_strategy.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for DescribeMergeConflictsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeMergeConflictsInput");
formatter.field("repository_name", &self.repository_name);
formatter.field(
"destination_commit_specifier",
&self.destination_commit_specifier,
);
formatter.field("source_commit_specifier", &self.source_commit_specifier);
formatter.field("merge_option", &self.merge_option);
formatter.field("max_merge_hunks", &self.max_merge_hunks);
formatter.field("file_path", &self.file_path);
formatter.field("conflict_detail_level", &self.conflict_detail_level);
formatter.field(
"conflict_resolution_strategy",
&self.conflict_resolution_strategy,
);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteRepositoryInput {
pub repository_name: std::option::Option<std::string::String>,
}
impl DeleteRepositoryInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
}
impl std::fmt::Debug for DeleteRepositoryInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteRepositoryInput");
formatter.field("repository_name", &self.repository_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeletePullRequestApprovalRuleInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub approval_rule_name: std::option::Option<std::string::String>,
}
impl DeletePullRequestApprovalRuleInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn approval_rule_name(&self) -> std::option::Option<&str> {
self.approval_rule_name.as_deref()
}
}
impl std::fmt::Debug for DeletePullRequestApprovalRuleInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeletePullRequestApprovalRuleInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("approval_rule_name", &self.approval_rule_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteFileInput {
pub repository_name: std::option::Option<std::string::String>,
pub branch_name: std::option::Option<std::string::String>,
pub file_path: std::option::Option<std::string::String>,
pub parent_commit_id: std::option::Option<std::string::String>,
pub keep_empty_folders: bool,
pub commit_message: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
pub email: std::option::Option<std::string::String>,
}
impl DeleteFileInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn branch_name(&self) -> std::option::Option<&str> {
self.branch_name.as_deref()
}
pub fn file_path(&self) -> std::option::Option<&str> {
self.file_path.as_deref()
}
pub fn parent_commit_id(&self) -> std::option::Option<&str> {
self.parent_commit_id.as_deref()
}
pub fn keep_empty_folders(&self) -> bool {
self.keep_empty_folders
}
pub fn commit_message(&self) -> std::option::Option<&str> {
self.commit_message.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn email(&self) -> std::option::Option<&str> {
self.email.as_deref()
}
}
impl std::fmt::Debug for DeleteFileInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteFileInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("branch_name", &self.branch_name);
formatter.field("file_path", &self.file_path);
formatter.field("parent_commit_id", &self.parent_commit_id);
formatter.field("keep_empty_folders", &self.keep_empty_folders);
formatter.field("commit_message", &self.commit_message);
formatter.field("name", &self.name);
formatter.field("email", &self.email);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteCommentContentInput {
pub comment_id: std::option::Option<std::string::String>,
}
impl DeleteCommentContentInput {
pub fn comment_id(&self) -> std::option::Option<&str> {
self.comment_id.as_deref()
}
}
impl std::fmt::Debug for DeleteCommentContentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteCommentContentInput");
formatter.field("comment_id", &self.comment_id);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBranchInput {
pub repository_name: std::option::Option<std::string::String>,
pub branch_name: std::option::Option<std::string::String>,
}
impl DeleteBranchInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn branch_name(&self) -> std::option::Option<&str> {
self.branch_name.as_deref()
}
}
impl std::fmt::Debug for DeleteBranchInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteBranchInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("branch_name", &self.branch_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteApprovalRuleTemplateInput {
pub approval_rule_template_name: std::option::Option<std::string::String>,
}
impl DeleteApprovalRuleTemplateInput {
pub fn approval_rule_template_name(&self) -> std::option::Option<&str> {
self.approval_rule_template_name.as_deref()
}
}
impl std::fmt::Debug for DeleteApprovalRuleTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteApprovalRuleTemplateInput");
formatter.field(
"approval_rule_template_name",
&self.approval_rule_template_name,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateUnreferencedMergeCommitInput {
pub repository_name: std::option::Option<std::string::String>,
pub source_commit_specifier: std::option::Option<std::string::String>,
pub destination_commit_specifier: std::option::Option<std::string::String>,
pub merge_option: std::option::Option<crate::model::MergeOptionTypeEnum>,
pub conflict_detail_level: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub author_name: std::option::Option<std::string::String>,
pub email: std::option::Option<std::string::String>,
pub commit_message: std::option::Option<std::string::String>,
pub keep_empty_folders: bool,
pub conflict_resolution: std::option::Option<crate::model::ConflictResolution>,
}
impl CreateUnreferencedMergeCommitInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn source_commit_specifier(&self) -> std::option::Option<&str> {
self.source_commit_specifier.as_deref()
}
pub fn destination_commit_specifier(&self) -> std::option::Option<&str> {
self.destination_commit_specifier.as_deref()
}
pub fn merge_option(&self) -> std::option::Option<&crate::model::MergeOptionTypeEnum> {
self.merge_option.as_ref()
}
pub fn conflict_detail_level(
&self,
) -> std::option::Option<&crate::model::ConflictDetailLevelTypeEnum> {
self.conflict_detail_level.as_ref()
}
pub fn conflict_resolution_strategy(
&self,
) -> std::option::Option<&crate::model::ConflictResolutionStrategyTypeEnum> {
self.conflict_resolution_strategy.as_ref()
}
pub fn author_name(&self) -> std::option::Option<&str> {
self.author_name.as_deref()
}
pub fn email(&self) -> std::option::Option<&str> {
self.email.as_deref()
}
pub fn commit_message(&self) -> std::option::Option<&str> {
self.commit_message.as_deref()
}
pub fn keep_empty_folders(&self) -> bool {
self.keep_empty_folders
}
pub fn conflict_resolution(&self) -> std::option::Option<&crate::model::ConflictResolution> {
self.conflict_resolution.as_ref()
}
}
impl std::fmt::Debug for CreateUnreferencedMergeCommitInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateUnreferencedMergeCommitInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("source_commit_specifier", &self.source_commit_specifier);
formatter.field(
"destination_commit_specifier",
&self.destination_commit_specifier,
);
formatter.field("merge_option", &self.merge_option);
formatter.field("conflict_detail_level", &self.conflict_detail_level);
formatter.field(
"conflict_resolution_strategy",
&self.conflict_resolution_strategy,
);
formatter.field("author_name", &self.author_name);
formatter.field("email", &self.email);
formatter.field("commit_message", &self.commit_message);
formatter.field("keep_empty_folders", &self.keep_empty_folders);
formatter.field("conflict_resolution", &self.conflict_resolution);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateRepositoryInput {
pub repository_name: std::option::Option<std::string::String>,
pub repository_description: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateRepositoryInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn repository_description(&self) -> std::option::Option<&str> {
self.repository_description.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for CreateRepositoryInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateRepositoryInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("repository_description", &self.repository_description);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreatePullRequestApprovalRuleInput {
pub pull_request_id: std::option::Option<std::string::String>,
pub approval_rule_name: std::option::Option<std::string::String>,
pub approval_rule_content: std::option::Option<std::string::String>,
}
impl CreatePullRequestApprovalRuleInput {
pub fn pull_request_id(&self) -> std::option::Option<&str> {
self.pull_request_id.as_deref()
}
pub fn approval_rule_name(&self) -> std::option::Option<&str> {
self.approval_rule_name.as_deref()
}
pub fn approval_rule_content(&self) -> std::option::Option<&str> {
self.approval_rule_content.as_deref()
}
}
impl std::fmt::Debug for CreatePullRequestApprovalRuleInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreatePullRequestApprovalRuleInput");
formatter.field("pull_request_id", &self.pull_request_id);
formatter.field("approval_rule_name", &self.approval_rule_name);
formatter.field("approval_rule_content", &self.approval_rule_content);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreatePullRequestInput {
pub title: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub targets: std::option::Option<std::vec::Vec<crate::model::Target>>,
pub client_request_token: std::option::Option<std::string::String>,
}
impl CreatePullRequestInput {
pub fn title(&self) -> std::option::Option<&str> {
self.title.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn targets(&self) -> std::option::Option<&[crate::model::Target]> {
self.targets.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
impl std::fmt::Debug for CreatePullRequestInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreatePullRequestInput");
formatter.field("title", &self.title);
formatter.field("description", &self.description);
formatter.field("targets", &self.targets);
formatter.field("client_request_token", &self.client_request_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateCommitInput {
pub repository_name: std::option::Option<std::string::String>,
pub branch_name: std::option::Option<std::string::String>,
pub parent_commit_id: std::option::Option<std::string::String>,
pub author_name: std::option::Option<std::string::String>,
pub email: std::option::Option<std::string::String>,
pub commit_message: std::option::Option<std::string::String>,
pub keep_empty_folders: bool,
pub put_files: std::option::Option<std::vec::Vec<crate::model::PutFileEntry>>,
pub delete_files: std::option::Option<std::vec::Vec<crate::model::DeleteFileEntry>>,
pub set_file_modes: std::option::Option<std::vec::Vec<crate::model::SetFileModeEntry>>,
}
impl CreateCommitInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn branch_name(&self) -> std::option::Option<&str> {
self.branch_name.as_deref()
}
pub fn parent_commit_id(&self) -> std::option::Option<&str> {
self.parent_commit_id.as_deref()
}
pub fn author_name(&self) -> std::option::Option<&str> {
self.author_name.as_deref()
}
pub fn email(&self) -> std::option::Option<&str> {
self.email.as_deref()
}
pub fn commit_message(&self) -> std::option::Option<&str> {
self.commit_message.as_deref()
}
pub fn keep_empty_folders(&self) -> bool {
self.keep_empty_folders
}
pub fn put_files(&self) -> std::option::Option<&[crate::model::PutFileEntry]> {
self.put_files.as_deref()
}
pub fn delete_files(&self) -> std::option::Option<&[crate::model::DeleteFileEntry]> {
self.delete_files.as_deref()
}
pub fn set_file_modes(&self) -> std::option::Option<&[crate::model::SetFileModeEntry]> {
self.set_file_modes.as_deref()
}
}
impl std::fmt::Debug for CreateCommitInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateCommitInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("branch_name", &self.branch_name);
formatter.field("parent_commit_id", &self.parent_commit_id);
formatter.field("author_name", &self.author_name);
formatter.field("email", &self.email);
formatter.field("commit_message", &self.commit_message);
formatter.field("keep_empty_folders", &self.keep_empty_folders);
formatter.field("put_files", &self.put_files);
formatter.field("delete_files", &self.delete_files);
formatter.field("set_file_modes", &self.set_file_modes);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateBranchInput {
pub repository_name: std::option::Option<std::string::String>,
pub branch_name: std::option::Option<std::string::String>,
pub commit_id: std::option::Option<std::string::String>,
}
impl CreateBranchInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn branch_name(&self) -> std::option::Option<&str> {
self.branch_name.as_deref()
}
pub fn commit_id(&self) -> std::option::Option<&str> {
self.commit_id.as_deref()
}
}
impl std::fmt::Debug for CreateBranchInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateBranchInput");
formatter.field("repository_name", &self.repository_name);
formatter.field("branch_name", &self.branch_name);
formatter.field("commit_id", &self.commit_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateApprovalRuleTemplateInput {
pub approval_rule_template_name: std::option::Option<std::string::String>,
pub approval_rule_template_content: std::option::Option<std::string::String>,
pub approval_rule_template_description: std::option::Option<std::string::String>,
}
impl CreateApprovalRuleTemplateInput {
pub fn approval_rule_template_name(&self) -> std::option::Option<&str> {
self.approval_rule_template_name.as_deref()
}
pub fn approval_rule_template_content(&self) -> std::option::Option<&str> {
self.approval_rule_template_content.as_deref()
}
pub fn approval_rule_template_description(&self) -> std::option::Option<&str> {
self.approval_rule_template_description.as_deref()
}
}
impl std::fmt::Debug for CreateApprovalRuleTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateApprovalRuleTemplateInput");
formatter.field(
"approval_rule_template_name",
&self.approval_rule_template_name,
);
formatter.field(
"approval_rule_template_content",
&self.approval_rule_template_content,
);
formatter.field(
"approval_rule_template_description",
&self.approval_rule_template_description,
);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchGetRepositoriesInput {
pub repository_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchGetRepositoriesInput {
pub fn repository_names(&self) -> std::option::Option<&[std::string::String]> {
self.repository_names.as_deref()
}
}
impl std::fmt::Debug for BatchGetRepositoriesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchGetRepositoriesInput");
formatter.field("repository_names", &self.repository_names);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchGetCommitsInput {
pub commit_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub repository_name: std::option::Option<std::string::String>,
}
impl BatchGetCommitsInput {
pub fn commit_ids(&self) -> std::option::Option<&[std::string::String]> {
self.commit_ids.as_deref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
}
impl std::fmt::Debug for BatchGetCommitsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchGetCommitsInput");
formatter.field("commit_ids", &self.commit_ids);
formatter.field("repository_name", &self.repository_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchDisassociateApprovalRuleTemplateFromRepositoriesInput {
pub approval_rule_template_name: std::option::Option<std::string::String>,
pub repository_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchDisassociateApprovalRuleTemplateFromRepositoriesInput {
pub fn approval_rule_template_name(&self) -> std::option::Option<&str> {
self.approval_rule_template_name.as_deref()
}
pub fn repository_names(&self) -> std::option::Option<&[std::string::String]> {
self.repository_names.as_deref()
}
}
impl std::fmt::Debug for BatchDisassociateApprovalRuleTemplateFromRepositoriesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter =
f.debug_struct("BatchDisassociateApprovalRuleTemplateFromRepositoriesInput");
formatter.field(
"approval_rule_template_name",
&self.approval_rule_template_name,
);
formatter.field("repository_names", &self.repository_names);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchDescribeMergeConflictsInput {
pub repository_name: std::option::Option<std::string::String>,
pub destination_commit_specifier: std::option::Option<std::string::String>,
pub source_commit_specifier: std::option::Option<std::string::String>,
pub merge_option: std::option::Option<crate::model::MergeOptionTypeEnum>,
pub max_merge_hunks: std::option::Option<i32>,
pub max_conflict_files: std::option::Option<i32>,
pub file_paths: std::option::Option<std::vec::Vec<std::string::String>>,
pub conflict_detail_level: std::option::Option<crate::model::ConflictDetailLevelTypeEnum>,
pub conflict_resolution_strategy:
std::option::Option<crate::model::ConflictResolutionStrategyTypeEnum>,
pub next_token: std::option::Option<std::string::String>,
}
impl BatchDescribeMergeConflictsInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn destination_commit_specifier(&self) -> std::option::Option<&str> {
self.destination_commit_specifier.as_deref()
}
pub fn source_commit_specifier(&self) -> std::option::Option<&str> {
self.source_commit_specifier.as_deref()
}
pub fn merge_option(&self) -> std::option::Option<&crate::model::MergeOptionTypeEnum> {
self.merge_option.as_ref()
}
pub fn max_merge_hunks(&self) -> std::option::Option<i32> {
self.max_merge_hunks
}
pub fn max_conflict_files(&self) -> std::option::Option<i32> {
self.max_conflict_files
}
pub fn file_paths(&self) -> std::option::Option<&[std::string::String]> {
self.file_paths.as_deref()
}
pub fn conflict_detail_level(
&self,
) -> std::option::Option<&crate::model::ConflictDetailLevelTypeEnum> {
self.conflict_detail_level.as_ref()
}
pub fn conflict_resolution_strategy(
&self,
) -> std::option::Option<&crate::model::ConflictResolutionStrategyTypeEnum> {
self.conflict_resolution_strategy.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for BatchDescribeMergeConflictsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchDescribeMergeConflictsInput");
formatter.field("repository_name", &self.repository_name);
formatter.field(
"destination_commit_specifier",
&self.destination_commit_specifier,
);
formatter.field("source_commit_specifier", &self.source_commit_specifier);
formatter.field("merge_option", &self.merge_option);
formatter.field("max_merge_hunks", &self.max_merge_hunks);
formatter.field("max_conflict_files", &self.max_conflict_files);
formatter.field("file_paths", &self.file_paths);
formatter.field("conflict_detail_level", &self.conflict_detail_level);
formatter.field(
"conflict_resolution_strategy",
&self.conflict_resolution_strategy,
);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchAssociateApprovalRuleTemplateWithRepositoriesInput {
pub approval_rule_template_name: std::option::Option<std::string::String>,
pub repository_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchAssociateApprovalRuleTemplateWithRepositoriesInput {
pub fn approval_rule_template_name(&self) -> std::option::Option<&str> {
self.approval_rule_template_name.as_deref()
}
pub fn repository_names(&self) -> std::option::Option<&[std::string::String]> {
self.repository_names.as_deref()
}
}
impl std::fmt::Debug for BatchAssociateApprovalRuleTemplateWithRepositoriesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter =
f.debug_struct("BatchAssociateApprovalRuleTemplateWithRepositoriesInput");
formatter.field(
"approval_rule_template_name",
&self.approval_rule_template_name,
);
formatter.field("repository_names", &self.repository_names);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AssociateApprovalRuleTemplateWithRepositoryInput {
pub approval_rule_template_name: std::option::Option<std::string::String>,
pub repository_name: std::option::Option<std::string::String>,
}
impl AssociateApprovalRuleTemplateWithRepositoryInput {
pub fn approval_rule_template_name(&self) -> std::option::Option<&str> {
self.approval_rule_template_name.as_deref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
}
impl std::fmt::Debug for AssociateApprovalRuleTemplateWithRepositoryInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AssociateApprovalRuleTemplateWithRepositoryInput");
formatter.field(
"approval_rule_template_name",
&self.approval_rule_template_name,
);
formatter.field("repository_name", &self.repository_name);
formatter.finish()
}
}