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 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
// 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 GetDeploymentOutput {
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the target IoT thing or thing group.</p>
pub target_arn: ::std::option::Option<::std::string::String>,
/// <p>The revision number of the deployment.</p>
pub revision_id: ::std::option::Option<::std::string::String>,
/// <p>The ID of the deployment.</p>
pub deployment_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the deployment.</p>
pub deployment_name: ::std::option::Option<::std::string::String>,
/// <p>The status of the deployment.</p>
pub deployment_status: ::std::option::Option<crate::types::DeploymentStatus>,
/// <p>The ID of the IoT job that applies the deployment to target devices.</p>
pub iot_job_id: ::std::option::Option<::std::string::String>,
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the IoT job that applies the deployment to target devices.</p>
pub iot_job_arn: ::std::option::Option<::std::string::String>,
/// <p>The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.</p>
pub components: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComponentDeploymentSpecification>>,
/// <p>The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.</p>
pub deployment_policies: ::std::option::Option<crate::types::DeploymentPolicies>,
/// <p>The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.</p>
pub iot_job_configuration: ::std::option::Option<crate::types::DeploymentIoTJobConfiguration>,
/// <p>The time at which the deployment was created, expressed in ISO 8601 format.</p>
pub creation_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Whether or not the deployment is the latest revision for its target.</p>
pub is_latest_for_target: bool,
/// <p>The parent deployment's target <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> within a subdeployment.</p>
pub parent_target_arn: ::std::option::Option<::std::string::String>,
/// <p>A list of key-value pairs that contain metadata for the resource. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html">Tag your resources</a> in the <i>IoT Greengrass V2 Developer Guide</i>.</p>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetDeploymentOutput {
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the target IoT thing or thing group.</p>
pub fn target_arn(&self) -> ::std::option::Option<&str> {
self.target_arn.as_deref()
}
/// <p>The revision number of the deployment.</p>
pub fn revision_id(&self) -> ::std::option::Option<&str> {
self.revision_id.as_deref()
}
/// <p>The ID of the deployment.</p>
pub fn deployment_id(&self) -> ::std::option::Option<&str> {
self.deployment_id.as_deref()
}
/// <p>The name of the deployment.</p>
pub fn deployment_name(&self) -> ::std::option::Option<&str> {
self.deployment_name.as_deref()
}
/// <p>The status of the deployment.</p>
pub fn deployment_status(&self) -> ::std::option::Option<&crate::types::DeploymentStatus> {
self.deployment_status.as_ref()
}
/// <p>The ID of the IoT job that applies the deployment to target devices.</p>
pub fn iot_job_id(&self) -> ::std::option::Option<&str> {
self.iot_job_id.as_deref()
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the IoT job that applies the deployment to target devices.</p>
pub fn iot_job_arn(&self) -> ::std::option::Option<&str> {
self.iot_job_arn.as_deref()
}
/// <p>The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.</p>
pub fn components(
&self,
) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ComponentDeploymentSpecification>> {
self.components.as_ref()
}
/// <p>The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.</p>
pub fn deployment_policies(&self) -> ::std::option::Option<&crate::types::DeploymentPolicies> {
self.deployment_policies.as_ref()
}
/// <p>The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.</p>
pub fn iot_job_configuration(&self) -> ::std::option::Option<&crate::types::DeploymentIoTJobConfiguration> {
self.iot_job_configuration.as_ref()
}
/// <p>The time at which the deployment was created, expressed in ISO 8601 format.</p>
pub fn creation_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.creation_timestamp.as_ref()
}
/// <p>Whether or not the deployment is the latest revision for its target.</p>
pub fn is_latest_for_target(&self) -> bool {
self.is_latest_for_target
}
/// <p>The parent deployment's target <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> within a subdeployment.</p>
pub fn parent_target_arn(&self) -> ::std::option::Option<&str> {
self.parent_target_arn.as_deref()
}
/// <p>A list of key-value pairs that contain metadata for the resource. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html">Tag your resources</a> in the <i>IoT Greengrass V2 Developer Guide</i>.</p>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetDeploymentOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetDeploymentOutput {
/// Creates a new builder-style object to manufacture [`GetDeploymentOutput`](crate::operation::get_deployment::GetDeploymentOutput).
pub fn builder() -> crate::operation::get_deployment::builders::GetDeploymentOutputBuilder {
crate::operation::get_deployment::builders::GetDeploymentOutputBuilder::default()
}
}
/// A builder for [`GetDeploymentOutput`](crate::operation::get_deployment::GetDeploymentOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetDeploymentOutputBuilder {
pub(crate) target_arn: ::std::option::Option<::std::string::String>,
pub(crate) revision_id: ::std::option::Option<::std::string::String>,
pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
pub(crate) deployment_name: ::std::option::Option<::std::string::String>,
pub(crate) deployment_status: ::std::option::Option<crate::types::DeploymentStatus>,
pub(crate) iot_job_id: ::std::option::Option<::std::string::String>,
pub(crate) iot_job_arn: ::std::option::Option<::std::string::String>,
pub(crate) components: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComponentDeploymentSpecification>>,
pub(crate) deployment_policies: ::std::option::Option<crate::types::DeploymentPolicies>,
pub(crate) iot_job_configuration: ::std::option::Option<crate::types::DeploymentIoTJobConfiguration>,
pub(crate) creation_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) is_latest_for_target: ::std::option::Option<bool>,
pub(crate) parent_target_arn: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetDeploymentOutputBuilder {
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the target IoT thing or thing group.</p>
pub fn target_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.target_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the target IoT thing or thing group.</p>
pub fn set_target_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.target_arn = input;
self
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the target IoT thing or thing group.</p>
pub fn get_target_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.target_arn
}
/// <p>The revision number of the deployment.</p>
pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.revision_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The revision number of the deployment.</p>
pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.revision_id = input;
self
}
/// <p>The revision number of the deployment.</p>
pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
&self.revision_id
}
/// <p>The ID of the deployment.</p>
pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.deployment_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the deployment.</p>
pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.deployment_id = input;
self
}
/// <p>The ID of the deployment.</p>
pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.deployment_id
}
/// <p>The name of the deployment.</p>
pub fn deployment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.deployment_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the deployment.</p>
pub fn set_deployment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.deployment_name = input;
self
}
/// <p>The name of the deployment.</p>
pub fn get_deployment_name(&self) -> &::std::option::Option<::std::string::String> {
&self.deployment_name
}
/// <p>The status of the deployment.</p>
pub fn deployment_status(mut self, input: crate::types::DeploymentStatus) -> Self {
self.deployment_status = ::std::option::Option::Some(input);
self
}
/// <p>The status of the deployment.</p>
pub fn set_deployment_status(mut self, input: ::std::option::Option<crate::types::DeploymentStatus>) -> Self {
self.deployment_status = input;
self
}
/// <p>The status of the deployment.</p>
pub fn get_deployment_status(&self) -> &::std::option::Option<crate::types::DeploymentStatus> {
&self.deployment_status
}
/// <p>The ID of the IoT job that applies the deployment to target devices.</p>
pub fn iot_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.iot_job_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the IoT job that applies the deployment to target devices.</p>
pub fn set_iot_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.iot_job_id = input;
self
}
/// <p>The ID of the IoT job that applies the deployment to target devices.</p>
pub fn get_iot_job_id(&self) -> &::std::option::Option<::std::string::String> {
&self.iot_job_id
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the IoT job that applies the deployment to target devices.</p>
pub fn iot_job_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.iot_job_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the IoT job that applies the deployment to target devices.</p>
pub fn set_iot_job_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.iot_job_arn = input;
self
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the IoT job that applies the deployment to target devices.</p>
pub fn get_iot_job_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.iot_job_arn
}
/// Adds a key-value pair to `components`.
///
/// To override the contents of this collection use [`set_components`](Self::set_components).
///
/// <p>The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.</p>
pub fn components(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ComponentDeploymentSpecification) -> Self {
let mut hash_map = self.components.unwrap_or_default();
hash_map.insert(k.into(), v);
self.components = ::std::option::Option::Some(hash_map);
self
}
/// <p>The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.</p>
pub fn set_components(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComponentDeploymentSpecification>>,
) -> Self {
self.components = input;
self
}
/// <p>The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.</p>
pub fn get_components(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComponentDeploymentSpecification>> {
&self.components
}
/// <p>The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.</p>
pub fn deployment_policies(mut self, input: crate::types::DeploymentPolicies) -> Self {
self.deployment_policies = ::std::option::Option::Some(input);
self
}
/// <p>The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.</p>
pub fn set_deployment_policies(mut self, input: ::std::option::Option<crate::types::DeploymentPolicies>) -> Self {
self.deployment_policies = input;
self
}
/// <p>The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.</p>
pub fn get_deployment_policies(&self) -> &::std::option::Option<crate::types::DeploymentPolicies> {
&self.deployment_policies
}
/// <p>The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.</p>
pub fn iot_job_configuration(mut self, input: crate::types::DeploymentIoTJobConfiguration) -> Self {
self.iot_job_configuration = ::std::option::Option::Some(input);
self
}
/// <p>The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.</p>
pub fn set_iot_job_configuration(mut self, input: ::std::option::Option<crate::types::DeploymentIoTJobConfiguration>) -> Self {
self.iot_job_configuration = input;
self
}
/// <p>The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.</p>
pub fn get_iot_job_configuration(&self) -> &::std::option::Option<crate::types::DeploymentIoTJobConfiguration> {
&self.iot_job_configuration
}
/// <p>The time at which the deployment was created, expressed in ISO 8601 format.</p>
pub fn creation_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_timestamp = ::std::option::Option::Some(input);
self
}
/// <p>The time at which the deployment was created, expressed in ISO 8601 format.</p>
pub fn set_creation_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_timestamp = input;
self
}
/// <p>The time at which the deployment was created, expressed in ISO 8601 format.</p>
pub fn get_creation_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_timestamp
}
/// <p>Whether or not the deployment is the latest revision for its target.</p>
pub fn is_latest_for_target(mut self, input: bool) -> Self {
self.is_latest_for_target = ::std::option::Option::Some(input);
self
}
/// <p>Whether or not the deployment is the latest revision for its target.</p>
pub fn set_is_latest_for_target(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_latest_for_target = input;
self
}
/// <p>Whether or not the deployment is the latest revision for its target.</p>
pub fn get_is_latest_for_target(&self) -> &::std::option::Option<bool> {
&self.is_latest_for_target
}
/// <p>The parent deployment's target <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> within a subdeployment.</p>
pub fn parent_target_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.parent_target_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The parent deployment's target <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> within a subdeployment.</p>
pub fn set_parent_target_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.parent_target_arn = input;
self
}
/// <p>The parent deployment's target <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> within a subdeployment.</p>
pub fn get_parent_target_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.parent_target_arn
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>A list of key-value pairs that contain metadata for the resource. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html">Tag your resources</a> in the <i>IoT Greengrass V2 Developer Guide</i>.</p>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>A list of key-value pairs that contain metadata for the resource. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html">Tag your resources</a> in the <i>IoT Greengrass V2 Developer Guide</i>.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <p>A list of key-value pairs that contain metadata for the resource. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html">Tag your resources</a> in the <i>IoT Greengrass V2 Developer Guide</i>.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetDeploymentOutput`](crate::operation::get_deployment::GetDeploymentOutput).
pub fn build(self) -> crate::operation::get_deployment::GetDeploymentOutput {
crate::operation::get_deployment::GetDeploymentOutput {
target_arn: self.target_arn,
revision_id: self.revision_id,
deployment_id: self.deployment_id,
deployment_name: self.deployment_name,
deployment_status: self.deployment_status,
iot_job_id: self.iot_job_id,
iot_job_arn: self.iot_job_arn,
components: self.components,
deployment_policies: self.deployment_policies,
iot_job_configuration: self.iot_job_configuration,
creation_timestamp: self.creation_timestamp,
is_latest_for_target: self.is_latest_for_target.unwrap_or_default(),
parent_target_arn: self.parent_target_arn,
tags: self.tags,
_request_id: self._request_id,
}
}
}