aws_sdk_amplify/operation/start_deployment/_start_deployment_input.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The request structure for the start a deployment request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartDeploymentInput {
/// <p>The unique ID for an Amplify app.</p>
pub app_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the branch to use for the deployment job.</p>
pub branch_name: ::std::option::Option<::std::string::String>,
/// <p>The job ID for this deployment that is generated by the <code>CreateDeployment</code> request.</p>
pub job_id: ::std::option::Option<::std::string::String>,
/// <p>The source URL for the deployment that is used when calling <code>StartDeployment</code> without <code>CreateDeployment</code>. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>
pub source_url: ::std::option::Option<::std::string::String>,
/// <p>The type of source specified by the <code>sourceURL</code>. If the value is <code>ZIP</code>, the source is a .zip file. If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and prefix. If no value is specified, the default is <code>ZIP</code>.</p>
pub source_url_type: ::std::option::Option<crate::types::SourceUrlType>,
}
impl StartDeploymentInput {
/// <p>The unique ID for an Amplify app.</p>
pub fn app_id(&self) -> ::std::option::Option<&str> {
self.app_id.as_deref()
}
/// <p>The name of the branch to use for the deployment job.</p>
pub fn branch_name(&self) -> ::std::option::Option<&str> {
self.branch_name.as_deref()
}
/// <p>The job ID for this deployment that is generated by the <code>CreateDeployment</code> request.</p>
pub fn job_id(&self) -> ::std::option::Option<&str> {
self.job_id.as_deref()
}
/// <p>The source URL for the deployment that is used when calling <code>StartDeployment</code> without <code>CreateDeployment</code>. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>
pub fn source_url(&self) -> ::std::option::Option<&str> {
self.source_url.as_deref()
}
/// <p>The type of source specified by the <code>sourceURL</code>. If the value is <code>ZIP</code>, the source is a .zip file. If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and prefix. If no value is specified, the default is <code>ZIP</code>.</p>
pub fn source_url_type(&self) -> ::std::option::Option<&crate::types::SourceUrlType> {
self.source_url_type.as_ref()
}
}
impl StartDeploymentInput {
/// Creates a new builder-style object to manufacture [`StartDeploymentInput`](crate::operation::start_deployment::StartDeploymentInput).
pub fn builder() -> crate::operation::start_deployment::builders::StartDeploymentInputBuilder {
crate::operation::start_deployment::builders::StartDeploymentInputBuilder::default()
}
}
/// A builder for [`StartDeploymentInput`](crate::operation::start_deployment::StartDeploymentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartDeploymentInputBuilder {
pub(crate) app_id: ::std::option::Option<::std::string::String>,
pub(crate) branch_name: ::std::option::Option<::std::string::String>,
pub(crate) job_id: ::std::option::Option<::std::string::String>,
pub(crate) source_url: ::std::option::Option<::std::string::String>,
pub(crate) source_url_type: ::std::option::Option<crate::types::SourceUrlType>,
}
impl StartDeploymentInputBuilder {
/// <p>The unique ID for an Amplify app.</p>
/// This field is required.
pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.app_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique ID for an Amplify app.</p>
pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.app_id = input;
self
}
/// <p>The unique ID for an Amplify app.</p>
pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
&self.app_id
}
/// <p>The name of the branch to use for the deployment job.</p>
/// This field is required.
pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.branch_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the branch to use for the deployment job.</p>
pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.branch_name = input;
self
}
/// <p>The name of the branch to use for the deployment job.</p>
pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
&self.branch_name
}
/// <p>The job ID for this deployment that is generated by the <code>CreateDeployment</code> request.</p>
pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.job_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The job ID for this deployment that is generated by the <code>CreateDeployment</code> request.</p>
pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.job_id = input;
self
}
/// <p>The job ID for this deployment that is generated by the <code>CreateDeployment</code> request.</p>
pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
&self.job_id
}
/// <p>The source URL for the deployment that is used when calling <code>StartDeployment</code> without <code>CreateDeployment</code>. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>
pub fn source_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_url = ::std::option::Option::Some(input.into());
self
}
/// <p>The source URL for the deployment that is used when calling <code>StartDeployment</code> without <code>CreateDeployment</code>. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>
pub fn set_source_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_url = input;
self
}
/// <p>The source URL for the deployment that is used when calling <code>StartDeployment</code> without <code>CreateDeployment</code>. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>
pub fn get_source_url(&self) -> &::std::option::Option<::std::string::String> {
&self.source_url
}
/// <p>The type of source specified by the <code>sourceURL</code>. If the value is <code>ZIP</code>, the source is a .zip file. If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and prefix. If no value is specified, the default is <code>ZIP</code>.</p>
pub fn source_url_type(mut self, input: crate::types::SourceUrlType) -> Self {
self.source_url_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of source specified by the <code>sourceURL</code>. If the value is <code>ZIP</code>, the source is a .zip file. If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and prefix. If no value is specified, the default is <code>ZIP</code>.</p>
pub fn set_source_url_type(mut self, input: ::std::option::Option<crate::types::SourceUrlType>) -> Self {
self.source_url_type = input;
self
}
/// <p>The type of source specified by the <code>sourceURL</code>. If the value is <code>ZIP</code>, the source is a .zip file. If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and prefix. If no value is specified, the default is <code>ZIP</code>.</p>
pub fn get_source_url_type(&self) -> &::std::option::Option<crate::types::SourceUrlType> {
&self.source_url_type
}
/// Consumes the builder and constructs a [`StartDeploymentInput`](crate::operation::start_deployment::StartDeploymentInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::start_deployment::StartDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::start_deployment::StartDeploymentInput {
app_id: self.app_id,
branch_name: self.branch_name,
job_id: self.job_id,
source_url: self.source_url,
source_url_type: self.source_url_type,
})
}
}