Struct aws_sdk_apprunner::model::source_configuration::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for SourceConfiguration
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn code_repository(self, input: CodeRepository) -> Self
pub fn code_repository(self, input: CodeRepository) -> Self
The description of a source code repository.
You must provide either this member or ImageRepository
(but not both).
sourcepub fn set_code_repository(self, input: Option<CodeRepository>) -> Self
pub fn set_code_repository(self, input: Option<CodeRepository>) -> Self
The description of a source code repository.
You must provide either this member or ImageRepository
(but not both).
Examples found in repository?
2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911
pub(crate) fn deser_structure_crate_model_source_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SourceConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::source_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"CodeRepository" => {
builder = builder.set_code_repository(
crate::json_deser::deser_structure_crate_model_code_repository(
tokens,
)?,
);
}
"ImageRepository" => {
builder = builder.set_image_repository(
crate::json_deser::deser_structure_crate_model_image_repository(tokens)?
);
}
"AutoDeploymentsEnabled" => {
builder = builder.set_auto_deployments_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"AuthenticationConfiguration" => {
builder = builder.set_authentication_configuration(
crate::json_deser::deser_structure_crate_model_authentication_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn image_repository(self, input: ImageRepository) -> Self
pub fn image_repository(self, input: ImageRepository) -> Self
The description of a source image repository.
You must provide either this member or CodeRepository
(but not both).
sourcepub fn set_image_repository(self, input: Option<ImageRepository>) -> Self
pub fn set_image_repository(self, input: Option<ImageRepository>) -> Self
The description of a source image repository.
You must provide either this member or CodeRepository
(but not both).
Examples found in repository?
2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911
pub(crate) fn deser_structure_crate_model_source_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SourceConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::source_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"CodeRepository" => {
builder = builder.set_code_repository(
crate::json_deser::deser_structure_crate_model_code_repository(
tokens,
)?,
);
}
"ImageRepository" => {
builder = builder.set_image_repository(
crate::json_deser::deser_structure_crate_model_image_repository(tokens)?
);
}
"AutoDeploymentsEnabled" => {
builder = builder.set_auto_deployments_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"AuthenticationConfiguration" => {
builder = builder.set_authentication_configuration(
crate::json_deser::deser_structure_crate_model_authentication_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn auto_deployments_enabled(self, input: bool) -> Self
pub fn auto_deployments_enabled(self, input: bool) -> Self
If true
, continuous integration from the source repository is enabled for the App Runner service. Each repository change (including any source code commit or new image version) starts a deployment.
Default: App Runner sets to false
for a source image that uses an ECR Public repository or an ECR repository that's in an Amazon Web Services account other than the one that the service is in. App Runner sets to true
in all other cases (which currently include a source code repository or a source image using a same-account ECR repository).
sourcepub fn set_auto_deployments_enabled(self, input: Option<bool>) -> Self
pub fn set_auto_deployments_enabled(self, input: Option<bool>) -> Self
If true
, continuous integration from the source repository is enabled for the App Runner service. Each repository change (including any source code commit or new image version) starts a deployment.
Default: App Runner sets to false
for a source image that uses an ECR Public repository or an ECR repository that's in an Amazon Web Services account other than the one that the service is in. App Runner sets to true
in all other cases (which currently include a source code repository or a source image using a same-account ECR repository).
Examples found in repository?
2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911
pub(crate) fn deser_structure_crate_model_source_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SourceConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::source_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"CodeRepository" => {
builder = builder.set_code_repository(
crate::json_deser::deser_structure_crate_model_code_repository(
tokens,
)?,
);
}
"ImageRepository" => {
builder = builder.set_image_repository(
crate::json_deser::deser_structure_crate_model_image_repository(tokens)?
);
}
"AutoDeploymentsEnabled" => {
builder = builder.set_auto_deployments_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"AuthenticationConfiguration" => {
builder = builder.set_authentication_configuration(
crate::json_deser::deser_structure_crate_model_authentication_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn authentication_configuration(
self,
input: AuthenticationConfiguration
) -> Self
pub fn authentication_configuration(
self,
input: AuthenticationConfiguration
) -> Self
Describes the resources that are needed to authenticate access to some source repositories.
sourcepub fn set_authentication_configuration(
self,
input: Option<AuthenticationConfiguration>
) -> Self
pub fn set_authentication_configuration(
self,
input: Option<AuthenticationConfiguration>
) -> Self
Describes the resources that are needed to authenticate access to some source repositories.
Examples found in repository?
2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911
pub(crate) fn deser_structure_crate_model_source_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SourceConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::source_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"CodeRepository" => {
builder = builder.set_code_repository(
crate::json_deser::deser_structure_crate_model_code_repository(
tokens,
)?,
);
}
"ImageRepository" => {
builder = builder.set_image_repository(
crate::json_deser::deser_structure_crate_model_image_repository(tokens)?
);
}
"AutoDeploymentsEnabled" => {
builder = builder.set_auto_deployments_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"AuthenticationConfiguration" => {
builder = builder.set_authentication_configuration(
crate::json_deser::deser_structure_crate_model_authentication_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn build(self) -> SourceConfiguration
pub fn build(self) -> SourceConfiguration
Consumes the builder and constructs a SourceConfiguration
.
Examples found in repository?
2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911
pub(crate) fn deser_structure_crate_model_source_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SourceConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::source_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"CodeRepository" => {
builder = builder.set_code_repository(
crate::json_deser::deser_structure_crate_model_code_repository(
tokens,
)?,
);
}
"ImageRepository" => {
builder = builder.set_image_repository(
crate::json_deser::deser_structure_crate_model_image_repository(tokens)?
);
}
"AutoDeploymentsEnabled" => {
builder = builder.set_auto_deployments_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"AuthenticationConfiguration" => {
builder = builder.set_authentication_configuration(
crate::json_deser::deser_structure_crate_model_authentication_configuration(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}