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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateServiceInput {
    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
    pub service_arn: ::std::option::Option<::std::string::String>,
    /// <p>The source configuration to apply to the App Runner service.</p>
    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
    pub source_configuration: ::std::option::Option<crate::types::SourceConfiguration>,
    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
    pub instance_configuration: ::std::option::Option<crate::types::InstanceConfiguration>,
    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
    pub auto_scaling_configuration_arn: ::std::option::Option<::std::string::String>,
    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
    pub health_check_configuration: ::std::option::Option<crate::types::HealthCheckConfiguration>,
    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
    pub network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
    /// <p>The observability configuration of your service.</p>
    pub observability_configuration: ::std::option::Option<crate::types::ServiceObservabilityConfiguration>,
}
impl UpdateServiceInput {
    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
    pub fn service_arn(&self) -> ::std::option::Option<&str> {
        self.service_arn.as_deref()
    }
    /// <p>The source configuration to apply to the App Runner service.</p>
    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
    pub fn source_configuration(&self) -> ::std::option::Option<&crate::types::SourceConfiguration> {
        self.source_configuration.as_ref()
    }
    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
    pub fn instance_configuration(&self) -> ::std::option::Option<&crate::types::InstanceConfiguration> {
        self.instance_configuration.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
    pub fn auto_scaling_configuration_arn(&self) -> ::std::option::Option<&str> {
        self.auto_scaling_configuration_arn.as_deref()
    }
    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
    pub fn health_check_configuration(&self) -> ::std::option::Option<&crate::types::HealthCheckConfiguration> {
        self.health_check_configuration.as_ref()
    }
    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
    pub fn network_configuration(&self) -> ::std::option::Option<&crate::types::NetworkConfiguration> {
        self.network_configuration.as_ref()
    }
    /// <p>The observability configuration of your service.</p>
    pub fn observability_configuration(&self) -> ::std::option::Option<&crate::types::ServiceObservabilityConfiguration> {
        self.observability_configuration.as_ref()
    }
}
impl UpdateServiceInput {
    /// Creates a new builder-style object to manufacture [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
    pub fn builder() -> crate::operation::update_service::builders::UpdateServiceInputBuilder {
        crate::operation::update_service::builders::UpdateServiceInputBuilder::default()
    }
}

/// A builder for [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateServiceInputBuilder {
    pub(crate) service_arn: ::std::option::Option<::std::string::String>,
    pub(crate) source_configuration: ::std::option::Option<crate::types::SourceConfiguration>,
    pub(crate) instance_configuration: ::std::option::Option<crate::types::InstanceConfiguration>,
    pub(crate) auto_scaling_configuration_arn: ::std::option::Option<::std::string::String>,
    pub(crate) health_check_configuration: ::std::option::Option<crate::types::HealthCheckConfiguration>,
    pub(crate) network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
    pub(crate) observability_configuration: ::std::option::Option<crate::types::ServiceObservabilityConfiguration>,
}
impl UpdateServiceInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
    /// This field is required.
    pub fn service_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
    pub fn set_service_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
    pub fn get_service_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_arn
    }
    /// <p>The source configuration to apply to the App Runner service.</p>
    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
    pub fn source_configuration(mut self, input: crate::types::SourceConfiguration) -> Self {
        self.source_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The source configuration to apply to the App Runner service.</p>
    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
    pub fn set_source_configuration(mut self, input: ::std::option::Option<crate::types::SourceConfiguration>) -> Self {
        self.source_configuration = input;
        self
    }
    /// <p>The source configuration to apply to the App Runner service.</p>
    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
    pub fn get_source_configuration(&self) -> &::std::option::Option<crate::types::SourceConfiguration> {
        &self.source_configuration
    }
    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
    pub fn instance_configuration(mut self, input: crate::types::InstanceConfiguration) -> Self {
        self.instance_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
    pub fn set_instance_configuration(mut self, input: ::std::option::Option<crate::types::InstanceConfiguration>) -> Self {
        self.instance_configuration = input;
        self
    }
    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
    pub fn get_instance_configuration(&self) -> &::std::option::Option<crate::types::InstanceConfiguration> {
        &self.instance_configuration
    }
    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
    pub fn auto_scaling_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.auto_scaling_configuration_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
    pub fn set_auto_scaling_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.auto_scaling_configuration_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
    pub fn get_auto_scaling_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.auto_scaling_configuration_arn
    }
    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
    pub fn health_check_configuration(mut self, input: crate::types::HealthCheckConfiguration) -> Self {
        self.health_check_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
    pub fn set_health_check_configuration(mut self, input: ::std::option::Option<crate::types::HealthCheckConfiguration>) -> Self {
        self.health_check_configuration = input;
        self
    }
    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
    pub fn get_health_check_configuration(&self) -> &::std::option::Option<crate::types::HealthCheckConfiguration> {
        &self.health_check_configuration
    }
    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
    pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
        self.network_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
        self.network_configuration = input;
        self
    }
    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
        &self.network_configuration
    }
    /// <p>The observability configuration of your service.</p>
    pub fn observability_configuration(mut self, input: crate::types::ServiceObservabilityConfiguration) -> Self {
        self.observability_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The observability configuration of your service.</p>
    pub fn set_observability_configuration(mut self, input: ::std::option::Option<crate::types::ServiceObservabilityConfiguration>) -> Self {
        self.observability_configuration = input;
        self
    }
    /// <p>The observability configuration of your service.</p>
    pub fn get_observability_configuration(&self) -> &::std::option::Option<crate::types::ServiceObservabilityConfiguration> {
        &self.observability_configuration
    }
    /// Consumes the builder and constructs a [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_service::UpdateServiceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_service::UpdateServiceInput {
            service_arn: self.service_arn,
            source_configuration: self.source_configuration,
            instance_configuration: self.instance_configuration,
            auto_scaling_configuration_arn: self.auto_scaling_configuration_arn,
            health_check_configuration: self.health_check_configuration,
            network_configuration: self.network_configuration,
            observability_configuration: self.observability_configuration,
        })
    }
}