49 49 | pub fn efs_volume_configuration(&self) -> ::std::option::Option<&crate::types::EfsVolumeConfiguration> {
|
50 50 | self.efs_volume_configuration.as_ref()
|
51 51 | }
|
52 52 | /// <p>This parameter is specified when you use Amazon FSx for Windows File Server file system for task storage.</p>
|
53 53 | pub fn fsx_windows_file_server_volume_configuration(&self) -> ::std::option::Option<&crate::types::FSxWindowsFileServerVolumeConfiguration> {
|
54 54 | self.fsx_windows_file_server_volume_configuration.as_ref()
|
55 55 | }
|
56 56 | /// <p>Indicates whether the volume should be configured at launch time. This is used to create Amazon EBS volumes for standalone tasks or tasks created as part of a service. Each task definition revision may only have one volume configured at launch in the volume configuration.</p>
|
57 57 | /// <p>To configure a volume at launch time, use this task definition revision and specify a <code>volumeConfigurations</code> object when calling the <code>CreateService</code>, <code>UpdateService</code>, <code>RunTask</code> or <code>StartTask</code> APIs.</p>
|
58 58 | pub fn configured_at_launch(&self) -> ::std::option::Option<bool> {
|
59 59 | self.configured_at_launch
|
60 60 | }
|
61 61 | }
|
62 62 | static VOLUME_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
63 63 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ecs#Volume", "com.amazonaws.ecs", "Volume");
|
64 64 | static VOLUME_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
65 65 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ecs#Volume$name", "com.amazonaws.ecs", "Volume"),
|
66 66 | ::aws_smithy_schema::ShapeType::String,
|
67 67 | "name",
|
68 68 | 0,
|
69 69 | );
|
70 70 | static VOLUME_MEMBER_HOST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
71 71 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ecs#Volume$host", "com.amazonaws.ecs", "Volume"),
|
72 72 | ::aws_smithy_schema::ShapeType::Structure,
|
73 73 | "host",
|
74 74 | 1,
|
75 75 | );
|
76 76 | static VOLUME_MEMBER_DOCKER_VOLUME_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
77 77 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ecs#Volume$dockerVolumeConfiguration", "com.amazonaws.ecs", "Volume"),
|
78 78 | ::aws_smithy_schema::ShapeType::Structure,
|
79 - | "docker_volume_configuration",
|
79 + | "dockerVolumeConfiguration",
|
80 80 | 2,
|
81 81 | );
|
82 82 | static VOLUME_MEMBER_EFS_VOLUME_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
83 83 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ecs#Volume$efsVolumeConfiguration", "com.amazonaws.ecs", "Volume"),
|
84 84 | ::aws_smithy_schema::ShapeType::Structure,
|
85 - | "efs_volume_configuration",
|
85 + | "efsVolumeConfiguration",
|
86 86 | 3,
|
87 87 | );
|
88 88 | static VOLUME_MEMBER_FSX_WINDOWS_FILE_SERVER_VOLUME_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
89 89 | ::aws_smithy_schema::ShapeId::from_static(
|
90 90 | "com.amazonaws.ecs#Volume$fsxWindowsFileServerVolumeConfiguration",
|
91 91 | "com.amazonaws.ecs",
|
92 92 | "Volume",
|
93 93 | ),
|
94 94 | ::aws_smithy_schema::ShapeType::Structure,
|
95 - | "fsx_windows_file_server_volume_configuration",
|
95 + | "fsxWindowsFileServerVolumeConfiguration",
|
96 96 | 4,
|
97 97 | );
|
98 98 | static VOLUME_MEMBER_CONFIGURED_AT_LAUNCH: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
99 99 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ecs#Volume$configuredAtLaunch", "com.amazonaws.ecs", "Volume"),
|
100 100 | ::aws_smithy_schema::ShapeType::Boolean,
|
101 - | "configured_at_launch",
|
101 + | "configuredAtLaunch",
|
102 102 | 5,
|
103 103 | );
|
104 104 | static VOLUME_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
105 105 | VOLUME_SCHEMA_ID,
|
106 106 | ::aws_smithy_schema::ShapeType::Structure,
|
107 107 | &[
|
108 108 | &VOLUME_MEMBER_NAME,
|
109 109 | &VOLUME_MEMBER_HOST,
|
110 110 | &VOLUME_MEMBER_DOCKER_VOLUME_CONFIGURATION,
|
111 111 | &VOLUME_MEMBER_EFS_VOLUME_CONFIGURATION,
|
112 112 | &VOLUME_MEMBER_FSX_WINDOWS_FILE_SERVER_VOLUME_CONFIGURATION,
|
113 113 | &VOLUME_MEMBER_CONFIGURED_AT_LAUNCH,
|
114 114 | ],
|
115 115 | );
|
116 116 | impl Volume {
|
117 117 | /// The schema for this shape.
|
118 118 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &VOLUME_SCHEMA;
|
119 119 | }
|
120 120 | impl ::aws_smithy_schema::serde::SerializableStruct for Volume {
|
121 121 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
122 122 | fn serialize_members(
|
123 123 | &self,
|
124 124 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
125 125 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
126 126 | if let Some(ref val) = self.name {
|
127 127 | ser.write_string(&VOLUME_MEMBER_NAME, val)?;
|
128 128 | }
|
129 129 | if let Some(ref val) = self.host {
|
130 130 | ser.write_struct(&VOLUME_MEMBER_HOST, val)?;
|
131 131 | }
|
132 132 | if let Some(ref val) = self.docker_volume_configuration {
|
133 133 | ser.write_struct(&VOLUME_MEMBER_DOCKER_VOLUME_CONFIGURATION, val)?;
|
134 134 | }
|
135 135 | if let Some(ref val) = self.efs_volume_configuration {
|
136 136 | ser.write_struct(&VOLUME_MEMBER_EFS_VOLUME_CONFIGURATION, val)?;
|
137 137 | }
|
138 138 | if let Some(ref val) = self.fsx_windows_file_server_volume_configuration {
|
139 139 | ser.write_struct(&VOLUME_MEMBER_FSX_WINDOWS_FILE_SERVER_VOLUME_CONFIGURATION, val)?;
|
140 140 | }
|
141 141 | if let Some(ref val) = self.configured_at_launch {
|
142 142 | ser.write_boolean(&VOLUME_MEMBER_CONFIGURED_AT_LAUNCH, *val)?;
|
143 143 | }
|
144 144 | Ok(())
|
145 145 | }
|
146 146 | }
|
147 147 | impl Volume {
|
148 148 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
149 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
150 - | deserializer: &mut D,
|
149 + | pub fn deserialize(
|
150 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
151 151 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
152 152 | #[allow(unused_variables, unused_mut)]
|
153 153 | let mut builder = Self::builder();
|
154 154 | #[allow(
|
155 155 | unused_variables,
|
156 156 | unreachable_code,
|
157 157 | clippy::single_match,
|
158 158 | clippy::match_single_binding,
|
159 159 | clippy::diverging_sub_expression
|
160 160 | )]
|
161 - | deserializer.read_struct(&VOLUME_SCHEMA, (), |_, member, deser| {
|
161 + | deserializer.read_struct(&VOLUME_SCHEMA, &mut |member, deser| {
|
162 162 | match member.member_index() {
|
163 163 | Some(0) => {
|
164 164 | builder.name = Some(deser.read_string(member)?);
|
165 165 | }
|
166 166 | Some(1) => {
|
167 167 | builder.host = Some(crate::types::HostVolumeProperties::deserialize(deser)?);
|
168 168 | }
|
169 169 | Some(2) => {
|
170 170 | builder.docker_volume_configuration = Some(crate::types::DockerVolumeConfiguration::deserialize(deser)?);
|
171 171 | }
|
172 172 | Some(3) => {
|
173 173 | builder.efs_volume_configuration = Some(crate::types::EfsVolumeConfiguration::deserialize(deser)?);
|
174 174 | }
|
175 175 | Some(4) => {
|
176 176 | builder.fsx_windows_file_server_volume_configuration =
|
177 177 | Some(crate::types::FSxWindowsFileServerVolumeConfiguration::deserialize(deser)?);
|
178 178 | }
|
179 179 | Some(5) => {
|
180 180 | builder.configured_at_launch = Some(deser.read_boolean(member)?);
|
181 181 | }
|
182 182 | _ => {}
|
183 183 | }
|
184 184 | Ok(())
|
185 185 | })?;
|
186 186 | Ok(builder.build())
|
187 187 | }
|
188 188 | }
|
189 + | impl Volume {
|
190 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
191 + | pub fn deserialize_with_response(
|
192 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
193 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
194 + | _status: u16,
|
195 + | _body: &[u8],
|
196 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
197 + | Self::deserialize(deserializer)
|
198 + | }
|
199 + | }
|
189 200 | impl Volume {
|
190 201 | /// Creates a new builder-style object to manufacture [`Volume`](crate::types::Volume).
|
191 202 | pub fn builder() -> crate::types::builders::VolumeBuilder {
|
192 203 | crate::types::builders::VolumeBuilder::default()
|
193 204 | }
|
194 205 | }
|
195 206 |
|
196 207 | /// A builder for [`Volume`](crate::types::Volume).
|
197 208 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
198 209 | #[non_exhaustive]
|
199 210 | pub struct VolumeBuilder {
|
200 211 | pub(crate) name: ::std::option::Option<::std::string::String>,
|
201 212 | pub(crate) host: ::std::option::Option<crate::types::HostVolumeProperties>,
|
202 213 | pub(crate) docker_volume_configuration: ::std::option::Option<crate::types::DockerVolumeConfiguration>,
|
203 214 | pub(crate) efs_volume_configuration: ::std::option::Option<crate::types::EfsVolumeConfiguration>,
|
204 215 | pub(crate) fsx_windows_file_server_volume_configuration: ::std::option::Option<crate::types::FSxWindowsFileServerVolumeConfiguration>,
|
205 216 | pub(crate) configured_at_launch: ::std::option::Option<bool>,
|
206 217 | }
|
207 218 | impl VolumeBuilder {
|
208 219 | /// <p>The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p>
|
209 220 | /// <p>When using a volume configured at launch, the <code>name</code> is required and must also be specified as the volume name in the <code>ServiceVolumeConfiguration</code> or <code>TaskVolumeConfiguration</code> parameter when creating your service or standalone task.</p>
|
210 221 | /// <p>For all other types of volumes, this name is referenced in the <code>sourceVolume</code> parameter of the <code>mountPoints</code> object in the container definition.</p>
|
211 222 | /// <p>When a volume is using the <code>efsVolumeConfiguration</code>, the name is required.</p>
|
212 223 | pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
213 224 | self.name = ::std::option::Option::Some(input.into());
|
214 225 | self
|
215 226 | }
|
216 227 | /// <p>The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p>
|
217 228 | /// <p>When using a volume configured at launch, the <code>name</code> is required and must also be specified as the volume name in the <code>ServiceVolumeConfiguration</code> or <code>TaskVolumeConfiguration</code> parameter when creating your service or standalone task.</p>
|
218 229 | /// <p>For all other types of volumes, this name is referenced in the <code>sourceVolume</code> parameter of the <code>mountPoints</code> object in the container definition.</p>
|