AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/register_target_with_maintenance_window/_register_target_with_maintenance_window_input.rs

@@ -0,1 +0,630 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
           5  +
pub struct RegisterTargetWithMaintenanceWindowInput {
           6  +
    /// <p>The ID of the maintenance window the target should be registered with.</p>
           7  +
    pub window_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The type of target being registered with the maintenance window.</p>
           9  +
    pub resource_type: ::std::option::Option<crate::types::MaintenanceWindowResourceType>,
          10  +
    /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
          11  +
    /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
          12  +
    /// </note>
          13  +
    /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
          14  +
    /// <p><b>Example 1</b>: Specify managed node IDs</p>
          15  +
    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
          16  +
    /// ,
          17  +
    /// <instance-id-2>
          18  +
    /// ,
          19  +
    /// <instance-id-3></instance-id-3>
          20  +
    /// </instance-id-2>
          21  +
    /// </instance-id-1></code></p>
          22  +
    /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
          23  +
    /// <p><code>Key=tag:<my-tag-key>
          24  +
    /// ,Values=
          25  +
    /// <my-tag-value-1>
          26  +
    /// ,
          27  +
    /// <my-tag-value-2></my-tag-value-2>
          28  +
    /// </my-tag-value-1>
          29  +
    /// </my-tag-key></code></p>
          30  +
    /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
          31  +
    /// <p><code>Key=tag-key,Values=<my-tag-key-1>
          32  +
    /// ,
          33  +
    /// <my-tag-key-2></my-tag-key-2>
          34  +
    /// </my-tag-key-1></code></p>
          35  +
    /// <p><b>Example 4</b>: Use resource group names</p>
          36  +
    /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
          37  +
    /// <p><b>Example 5</b>: Use filters for resource group types</p>
          38  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
          39  +
    /// ,
          40  +
    /// <resource-type-2></resource-type-2>
          41  +
    /// </resource-type-1></code></p><note>
          42  +
    /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
          43  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
          44  +
    /// </note>
          45  +
    /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          46  +
    pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
          47  +
    /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
          48  +
    pub owner_information: ::std::option::Option<::std::string::String>,
          49  +
    /// <p>An optional name for the target.</p>
          50  +
    pub name: ::std::option::Option<::std::string::String>,
          51  +
    /// <p>An optional description for the target.</p>
          52  +
    pub description: ::std::option::Option<::std::string::String>,
          53  +
    /// <p>User-provided idempotency token.</p>
          54  +
    pub client_token: ::std::option::Option<::std::string::String>,
          55  +
}
          56  +
impl RegisterTargetWithMaintenanceWindowInput {
          57  +
    /// <p>The ID of the maintenance window the target should be registered with.</p>
          58  +
    pub fn window_id(&self) -> ::std::option::Option<&str> {
          59  +
        self.window_id.as_deref()
          60  +
    }
          61  +
    /// <p>The type of target being registered with the maintenance window.</p>
          62  +
    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowResourceType> {
          63  +
        self.resource_type.as_ref()
          64  +
    }
          65  +
    /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
          66  +
    /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
          67  +
    /// </note>
          68  +
    /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
          69  +
    /// <p><b>Example 1</b>: Specify managed node IDs</p>
          70  +
    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
          71  +
    /// ,
          72  +
    /// <instance-id-2>
          73  +
    /// ,
          74  +
    /// <instance-id-3></instance-id-3>
          75  +
    /// </instance-id-2>
          76  +
    /// </instance-id-1></code></p>
          77  +
    /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
          78  +
    /// <p><code>Key=tag:<my-tag-key>
          79  +
    /// ,Values=
          80  +
    /// <my-tag-value-1>
          81  +
    /// ,
          82  +
    /// <my-tag-value-2></my-tag-value-2>
          83  +
    /// </my-tag-value-1>
          84  +
    /// </my-tag-key></code></p>
          85  +
    /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
          86  +
    /// <p><code>Key=tag-key,Values=<my-tag-key-1>
          87  +
    /// ,
          88  +
    /// <my-tag-key-2></my-tag-key-2>
          89  +
    /// </my-tag-key-1></code></p>
          90  +
    /// <p><b>Example 4</b>: Use resource group names</p>
          91  +
    /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
          92  +
    /// <p><b>Example 5</b>: Use filters for resource group types</p>
          93  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
          94  +
    /// ,
          95  +
    /// <resource-type-2></resource-type-2>
          96  +
    /// </resource-type-1></code></p><note>
          97  +
    /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
          98  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
          99  +
    /// </note>
         100  +
    /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         101  +
    ///
         102  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.targets.is_none()`.
         103  +
    pub fn targets(&self) -> &[crate::types::Target] {
         104  +
        self.targets.as_deref().unwrap_or_default()
         105  +
    }
         106  +
    /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
         107  +
    pub fn owner_information(&self) -> ::std::option::Option<&str> {
         108  +
        self.owner_information.as_deref()
         109  +
    }
         110  +
    /// <p>An optional name for the target.</p>
         111  +
    pub fn name(&self) -> ::std::option::Option<&str> {
         112  +
        self.name.as_deref()
         113  +
    }
         114  +
    /// <p>An optional description for the target.</p>
         115  +
    pub fn description(&self) -> ::std::option::Option<&str> {
         116  +
        self.description.as_deref()
         117  +
    }
         118  +
    /// <p>User-provided idempotency token.</p>
         119  +
    pub fn client_token(&self) -> ::std::option::Option<&str> {
         120  +
        self.client_token.as_deref()
         121  +
    }
         122  +
}
         123  +
impl ::std::fmt::Debug for RegisterTargetWithMaintenanceWindowInput {
         124  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         125  +
        let mut formatter = f.debug_struct("RegisterTargetWithMaintenanceWindowInput");
         126  +
        formatter.field("window_id", &self.window_id);
         127  +
        formatter.field("resource_type", &self.resource_type);
         128  +
        formatter.field("targets", &self.targets);
         129  +
        formatter.field("owner_information", &"*** Sensitive Data Redacted ***");
         130  +
        formatter.field("name", &self.name);
         131  +
        formatter.field("description", &"*** Sensitive Data Redacted ***");
         132  +
        formatter.field("client_token", &self.client_token);
         133  +
        formatter.finish()
         134  +
    }
         135  +
}
         136  +
static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         137  +
    ::aws_smithy_schema::ShapeId::from_parts(
         138  +
        "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$WindowId",
         139  +
        "com.amazonaws.ssm.synthetic",
         140  +
        "RegisterTargetWithMaintenanceWindowInput",
         141  +
    ),
         142  +
    ::aws_smithy_schema::ShapeType::String,
         143  +
    "WindowId",
         144  +
    0,
         145  +
);
         146  +
static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         147  +
    ::aws_smithy_schema::ShapeId::from_parts(
         148  +
        "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$ResourceType",
         149  +
        "com.amazonaws.ssm.synthetic",
         150  +
        "RegisterTargetWithMaintenanceWindowInput",
         151  +
    ),
         152  +
    ::aws_smithy_schema::ShapeType::String,
         153  +
    "ResourceType",
         154  +
    1,
         155  +
);
         156  +
static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         157  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Targets$member", "com.amazonaws.ssm", "Targets"),
         158  +
    ::aws_smithy_schema::ShapeType::Structure,
         159  +
    "member",
         160  +
    0,
         161  +
);
         162  +
static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         163  +
    ::aws_smithy_schema::ShapeId::from_parts(
         164  +
        "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$Targets",
         165  +
        "com.amazonaws.ssm.synthetic",
         166  +
        "RegisterTargetWithMaintenanceWindowInput",
         167  +
    ),
         168  +
    ::aws_smithy_schema::ShapeType::List,
         169  +
    "Targets",
         170  +
    2,
         171  +
)
         172  +
.with_list_member(&REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS_MEMBER);
         173  +
static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_OWNER_INFORMATION: ::aws_smithy_schema::Schema<'static> =
         174  +
    ::aws_smithy_schema::Schema::new_member(
         175  +
        ::aws_smithy_schema::ShapeId::from_parts(
         176  +
            "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$OwnerInformation",
         177  +
            "com.amazonaws.ssm.synthetic",
         178  +
            "RegisterTargetWithMaintenanceWindowInput",
         179  +
        ),
         180  +
        ::aws_smithy_schema::ShapeType::String,
         181  +
        "OwnerInformation",
         182  +
        3,
         183  +
    );
         184  +
static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         185  +
    ::aws_smithy_schema::ShapeId::from_parts(
         186  +
        "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$Name",
         187  +
        "com.amazonaws.ssm.synthetic",
         188  +
        "RegisterTargetWithMaintenanceWindowInput",
         189  +
    ),
         190  +
    ::aws_smithy_schema::ShapeType::String,
         191  +
    "Name",
         192  +
    4,
         193  +
);
         194  +
static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         195  +
    ::aws_smithy_schema::ShapeId::from_parts(
         196  +
        "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$Description",
         197  +
        "com.amazonaws.ssm.synthetic",
         198  +
        "RegisterTargetWithMaintenanceWindowInput",
         199  +
    ),
         200  +
    ::aws_smithy_schema::ShapeType::String,
         201  +
    "Description",
         202  +
    5,
         203  +
);
         204  +
static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         205  +
    ::aws_smithy_schema::ShapeId::from_parts(
         206  +
        "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$ClientToken",
         207  +
        "com.amazonaws.ssm.synthetic",
         208  +
        "RegisterTargetWithMaintenanceWindowInput",
         209  +
    ),
         210  +
    ::aws_smithy_schema::ShapeType::String,
         211  +
    "ClientToken",
         212  +
    6,
         213  +
);
         214  +
static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         215  +
    ::aws_smithy_schema::ShapeId::from_parts(
         216  +
        "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput",
         217  +
        "com.amazonaws.ssm.synthetic",
         218  +
        "RegisterTargetWithMaintenanceWindowInput",
         219  +
    ),
         220  +
    ::aws_smithy_schema::ShapeType::Structure,
         221  +
    &[
         222  +
        &REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID,
         223  +
        &REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_RESOURCE_TYPE,
         224  +
        &REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS,
         225  +
        &REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_OWNER_INFORMATION,
         226  +
        &REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_NAME,
         227  +
        &REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION,
         228  +
        &REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_CLIENT_TOKEN,
         229  +
    ],
         230  +
)
         231  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         232  +
.with_original_name("RegisterTargetWithMaintenanceWindowRequest");
         233  +
impl RegisterTargetWithMaintenanceWindowInput {
         234  +
    /// The schema for this shape.
         235  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_SCHEMA;
         236  +
}
         237  +
impl ::aws_smithy_schema::serde::SerializableStruct for RegisterTargetWithMaintenanceWindowInput {
         238  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         239  +
    fn serialize_members(
         240  +
        &self,
         241  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         242  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         243  +
        if let Some(ref val) = self.window_id {
         244  +
            ser.write_string(&REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID, val)?;
         245  +
        }
         246  +
        if let Some(ref val) = self.resource_type {
         247  +
            ser.write_string(&REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_RESOURCE_TYPE, val.as_str())?;
         248  +
        }
         249  +
        if let Some(ref val) = self.targets {
         250  +
            ser.write_list(
         251  +
                &REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS,
         252  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         253  +
                    for item in val {
         254  +
                        ser.write_struct(crate::types::Target::SCHEMA, item)?;
         255  +
                    }
         256  +
                    Ok(())
         257  +
                },
         258  +
            )?;
         259  +
        }
         260  +
        if let Some(ref val) = self.owner_information {
         261  +
            ser.write_string(&REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_OWNER_INFORMATION, val)?;
         262  +
        }
         263  +
        if let Some(ref val) = self.name {
         264  +
            ser.write_string(&REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_NAME, val)?;
         265  +
        }
         266  +
        if let Some(ref val) = self.description {
         267  +
            ser.write_string(&REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION, val)?;
         268  +
        }
         269  +
        if let Some(ref val) = self.client_token {
         270  +
            ser.write_string(&REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_CLIENT_TOKEN, val)?;
         271  +
        }
         272  +
        Ok(())
         273  +
    }
         274  +
}
         275  +
impl RegisterTargetWithMaintenanceWindowInput {
         276  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         277  +
    pub fn deserialize(
         278  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         279  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         280  +
        #[allow(unused_variables, unused_mut)]
         281  +
        let mut builder = Self::builder();
         282  +
        #[allow(
         283  +
            unused_variables,
         284  +
            unreachable_code,
         285  +
            clippy::single_match,
         286  +
            clippy::match_single_binding,
         287  +
            clippy::diverging_sub_expression
         288  +
        )]
         289  +
        deserializer.read_struct(&REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_SCHEMA, &mut |member, deser| {
         290  +
            match member.member_index() {
         291  +
                Some(0) => {
         292  +
                    if deser.is_null() {
         293  +
                        deser.read_null()?;
         294  +
                    } else {
         295  +
                        builder.window_id = Some(deser.read_string(member)?);
         296  +
                    }
         297  +
                }
         298  +
                Some(1) => {
         299  +
                    if deser.is_null() {
         300  +
                        deser.read_null()?;
         301  +
                    } else {
         302  +
                        builder.resource_type = Some(crate::types::MaintenanceWindowResourceType::from(deser.read_string(member)?.as_str()));
         303  +
                    }
         304  +
                }
         305  +
                Some(2) => {
         306  +
                    if deser.is_null() {
         307  +
                        deser.read_null()?;
         308  +
                    } else {
         309  +
                        builder.targets = Some({
         310  +
                            let mut container = Vec::new();
         311  +
                            deser.read_list(member, &mut |deser| {
         312  +
                                container.push(crate::types::Target::deserialize(deser)?);
         313  +
                                Ok(())
         314  +
                            })?;
         315  +
                            container
         316  +
                        });
         317  +
                    }
         318  +
                }
         319  +
                Some(3) => {
         320  +
                    if deser.is_null() {
         321  +
                        deser.read_null()?;
         322  +
                    } else {
         323  +
                        builder.owner_information = Some(deser.read_string(member)?);
         324  +
                    }
         325  +
                }
         326  +
                Some(4) => {
         327  +
                    if deser.is_null() {
         328  +
                        deser.read_null()?;
         329  +
                    } else {
         330  +
                        builder.name = Some(deser.read_string(member)?);
         331  +
                    }
         332  +
                }
         333  +
                Some(5) => {
         334  +
                    if deser.is_null() {
         335  +
                        deser.read_null()?;
         336  +
                    } else {
         337  +
                        builder.description = Some(deser.read_string(member)?);
         338  +
                    }
         339  +
                }
         340  +
                Some(6) => {
         341  +
                    if deser.is_null() {
         342  +
                        deser.read_null()?;
         343  +
                    } else {
         344  +
                        builder.client_token = Some(deser.read_string(member)?);
         345  +
                    }
         346  +
                }
         347  +
                _ => {}
         348  +
            }
         349  +
            Ok(())
         350  +
        })?;
         351  +
        builder.window_id = builder.window_id.or(Some(String::new()));
         352  +
        builder.targets = builder.targets.or(Some(Vec::new()));
         353  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         354  +
    }
         355  +
}
         356  +
impl RegisterTargetWithMaintenanceWindowInput {
         357  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         358  +
    pub fn deserialize_with_response(
         359  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         360  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         361  +
        _status: u16,
         362  +
        _body: &[u8],
         363  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         364  +
        Self::deserialize(deserializer)
         365  +
    }
         366  +
}
         367  +
impl RegisterTargetWithMaintenanceWindowInput {
         368  +
    /// Creates a new builder-style object to manufacture [`RegisterTargetWithMaintenanceWindowInput`](crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowInput).
         369  +
    pub fn builder() -> crate::operation::register_target_with_maintenance_window::builders::RegisterTargetWithMaintenanceWindowInputBuilder {
         370  +
        crate::operation::register_target_with_maintenance_window::builders::RegisterTargetWithMaintenanceWindowInputBuilder::default()
         371  +
    }
         372  +
}
         373  +
         374  +
/// A builder for [`RegisterTargetWithMaintenanceWindowInput`](crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowInput).
         375  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
         376  +
#[non_exhaustive]
         377  +
pub struct RegisterTargetWithMaintenanceWindowInputBuilder {
         378  +
    pub(crate) window_id: ::std::option::Option<::std::string::String>,
         379  +
    pub(crate) resource_type: ::std::option::Option<crate::types::MaintenanceWindowResourceType>,
         380  +
    pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
         381  +
    pub(crate) owner_information: ::std::option::Option<::std::string::String>,
         382  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         383  +
    pub(crate) description: ::std::option::Option<::std::string::String>,
         384  +
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
         385  +
}
         386  +
impl RegisterTargetWithMaintenanceWindowInputBuilder {
         387  +
    /// <p>The ID of the maintenance window the target should be registered with.</p>
         388  +
    /// This field is required.
         389  +
    pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         390  +
        self.window_id = ::std::option::Option::Some(input.into());
         391  +
        self
         392  +
    }
         393  +
    /// <p>The ID of the maintenance window the target should be registered with.</p>
         394  +
    pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         395  +
        self.window_id = input;
         396  +
        self
         397  +
    }
         398  +
    /// <p>The ID of the maintenance window the target should be registered with.</p>
         399  +
    pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
         400  +
        &self.window_id
         401  +
    }
         402  +
    /// <p>The type of target being registered with the maintenance window.</p>
         403  +
    /// This field is required.
         404  +
    pub fn resource_type(mut self, input: crate::types::MaintenanceWindowResourceType) -> Self {
         405  +
        self.resource_type = ::std::option::Option::Some(input);
         406  +
        self
         407  +
    }
         408  +
    /// <p>The type of target being registered with the maintenance window.</p>
         409  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowResourceType>) -> Self {
         410  +
        self.resource_type = input;
         411  +
        self
         412  +
    }
         413  +
    /// <p>The type of target being registered with the maintenance window.</p>
         414  +
    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::MaintenanceWindowResourceType> {
         415  +
        &self.resource_type
         416  +
    }
         417  +
    /// Appends an item to `targets`.
         418  +
    ///
         419  +
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
         420  +
    ///
         421  +
    /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
         422  +
    /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
         423  +
    /// </note>
         424  +
    /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
         425  +
    /// <p><b>Example 1</b>: Specify managed node IDs</p>
         426  +
    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
         427  +
    /// ,
         428  +
    /// <instance-id-2>
         429  +
    /// ,
         430  +
    /// <instance-id-3></instance-id-3>
         431  +
    /// </instance-id-2>
         432  +
    /// </instance-id-1></code></p>
         433  +
    /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
         434  +
    /// <p><code>Key=tag:<my-tag-key>
         435  +
    /// ,Values=
         436  +
    /// <my-tag-value-1>
         437  +
    /// ,
         438  +
    /// <my-tag-value-2></my-tag-value-2>
         439  +
    /// </my-tag-value-1>
         440  +
    /// </my-tag-key></code></p>
         441  +
    /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
         442  +
    /// <p><code>Key=tag-key,Values=<my-tag-key-1>
         443  +
    /// ,
         444  +
    /// <my-tag-key-2></my-tag-key-2>
         445  +
    /// </my-tag-key-1></code></p>
         446  +
    /// <p><b>Example 4</b>: Use resource group names</p>
         447  +
    /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
         448  +
    /// <p><b>Example 5</b>: Use filters for resource group types</p>
         449  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
         450  +
    /// ,
         451  +
    /// <resource-type-2></resource-type-2>
         452  +
    /// </resource-type-1></code></p><note>
         453  +
    /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
         454  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
         455  +
    /// </note>
         456  +
    /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         457  +
    pub fn targets(mut self, input: crate::types::Target) -> Self {
         458  +
        let mut v = self.targets.unwrap_or_default();
         459  +
        v.push(input);
         460  +
        self.targets = ::std::option::Option::Some(v);
         461  +
        self
         462  +
    }
         463  +
    /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
         464  +
    /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
         465  +
    /// </note>
         466  +
    /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
         467  +
    /// <p><b>Example 1</b>: Specify managed node IDs</p>
         468  +
    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
         469  +
    /// ,
         470  +
    /// <instance-id-2>
         471  +
    /// ,
         472  +
    /// <instance-id-3></instance-id-3>
         473  +
    /// </instance-id-2>
         474  +
    /// </instance-id-1></code></p>
         475  +
    /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
         476  +
    /// <p><code>Key=tag:<my-tag-key>
         477  +
    /// ,Values=
         478  +
    /// <my-tag-value-1>
         479  +
    /// ,
         480  +
    /// <my-tag-value-2></my-tag-value-2>
         481  +
    /// </my-tag-value-1>
         482  +
    /// </my-tag-key></code></p>
         483  +
    /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
         484  +
    /// <p><code>Key=tag-key,Values=<my-tag-key-1>
         485  +
    /// ,
         486  +
    /// <my-tag-key-2></my-tag-key-2>
         487  +
    /// </my-tag-key-1></code></p>
         488  +
    /// <p><b>Example 4</b>: Use resource group names</p>
         489  +
    /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
         490  +
    /// <p><b>Example 5</b>: Use filters for resource group types</p>
         491  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
         492  +
    /// ,
         493  +
    /// <resource-type-2></resource-type-2>
         494  +
    /// </resource-type-1></code></p><note>
         495  +
    /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
         496  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
         497  +
    /// </note>
         498  +
    /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         499  +
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
         500  +
        self.targets = input;
         501  +
        self
         502  +
    }
         503  +
    /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
         504  +
    /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
         505  +
    /// </note>
         506  +
    /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
         507  +
    /// <p><b>Example 1</b>: Specify managed node IDs</p>
         508  +
    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
         509  +
    /// ,
         510  +
    /// <instance-id-2>
         511  +
    /// ,
         512  +
    /// <instance-id-3></instance-id-3>
         513  +
    /// </instance-id-2>
         514  +
    /// </instance-id-1></code></p>
         515  +
    /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
         516  +
    /// <p><code>Key=tag:<my-tag-key>
         517  +
    /// ,Values=
         518  +
    /// <my-tag-value-1>
         519  +
    /// ,
         520  +
    /// <my-tag-value-2></my-tag-value-2>
         521  +
    /// </my-tag-value-1>
         522  +
    /// </my-tag-key></code></p>
         523  +
    /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
         524  +
    /// <p><code>Key=tag-key,Values=<my-tag-key-1>
         525  +
    /// ,
         526  +
    /// <my-tag-key-2></my-tag-key-2>
         527  +
    /// </my-tag-key-1></code></p>
         528  +
    /// <p><b>Example 4</b>: Use resource group names</p>
         529  +
    /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
         530  +
    /// <p><b>Example 5</b>: Use filters for resource group types</p>
         531  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
         532  +
    /// ,
         533  +
    /// <resource-type-2></resource-type-2>
         534  +
    /// </resource-type-1></code></p><note>
         535  +
    /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
         536  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
         537  +
    /// </note>
         538  +
    /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         539  +
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
         540  +
        &self.targets
         541  +
    }
         542  +
    /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
         543  +
    pub fn owner_information(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         544  +
        self.owner_information = ::std::option::Option::Some(input.into());
         545  +
        self
         546  +
    }
         547  +
    /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
         548  +
    pub fn set_owner_information(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         549  +
        self.owner_information = input;
         550  +
        self
         551  +
    }
         552  +
    /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
         553  +
    pub fn get_owner_information(&self) -> &::std::option::Option<::std::string::String> {
         554  +
        &self.owner_information
         555  +
    }
         556  +
    /// <p>An optional name for the target.</p>
         557  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         558  +
        self.name = ::std::option::Option::Some(input.into());
         559  +
        self
         560  +
    }
         561  +
    /// <p>An optional name for the target.</p>
         562  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         563  +
        self.name = input;
         564  +
        self
         565  +
    }
         566  +
    /// <p>An optional name for the target.</p>
         567  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         568  +
        &self.name
         569  +
    }
         570  +
    /// <p>An optional description for the target.</p>
         571  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         572  +
        self.description = ::std::option::Option::Some(input.into());
         573  +
        self
         574  +
    }
         575  +
    /// <p>An optional description for the target.</p>
         576  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         577  +
        self.description = input;
         578  +
        self
         579  +
    }
         580  +
    /// <p>An optional description for the target.</p>
         581  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         582  +
        &self.description
         583  +
    }
         584  +
    /// <p>User-provided idempotency token.</p>
         585  +
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         586  +
        self.client_token = ::std::option::Option::Some(input.into());
         587  +
        self
         588  +
    }
         589  +
    /// <p>User-provided idempotency token.</p>
         590  +
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         591  +
        self.client_token = input;
         592  +
        self
         593  +
    }
         594  +
    /// <p>User-provided idempotency token.</p>
         595  +
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
         596  +
        &self.client_token
         597  +
    }
         598  +
    /// Consumes the builder and constructs a [`RegisterTargetWithMaintenanceWindowInput`](crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowInput).
         599  +
    pub fn build(
         600  +
        self,
         601  +
    ) -> ::std::result::Result<
         602  +
        crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowInput,
         603  +
        ::aws_smithy_types::error::operation::BuildError,
         604  +
    > {
         605  +
        ::std::result::Result::Ok(
         606  +
            crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowInput {
         607  +
                window_id: self.window_id,
         608  +
                resource_type: self.resource_type,
         609  +
                targets: self.targets,
         610  +
                owner_information: self.owner_information,
         611  +
                name: self.name,
         612  +
                description: self.description,
         613  +
                client_token: self.client_token,
         614  +
            },
         615  +
        )
         616  +
    }
         617  +
}
         618  +
impl ::std::fmt::Debug for RegisterTargetWithMaintenanceWindowInputBuilder {
         619  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         620  +
        let mut formatter = f.debug_struct("RegisterTargetWithMaintenanceWindowInputBuilder");
         621  +
        formatter.field("window_id", &self.window_id);
         622  +
        formatter.field("resource_type", &self.resource_type);
         623  +
        formatter.field("targets", &self.targets);
         624  +
        formatter.field("owner_information", &"*** Sensitive Data Redacted ***");
         625  +
        formatter.field("name", &self.name);
         626  +
        formatter.field("description", &"*** Sensitive Data Redacted ***");
         627  +
        formatter.field("client_token", &self.client_token);
         628  +
        formatter.finish()
         629  +
    }
         630  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/register_target_with_maintenance_window/_register_target_with_maintenance_window_output.rs

@@ -0,1 +0,187 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct RegisterTargetWithMaintenanceWindowOutput {
           6  +
    /// <p>The ID of the target definition in this maintenance window.</p>
           7  +
    pub window_target_id: ::std::option::Option<::std::string::String>,
           8  +
    _request_id: Option<String>,
           9  +
}
          10  +
impl RegisterTargetWithMaintenanceWindowOutput {
          11  +
    /// <p>The ID of the target definition in this maintenance window.</p>
          12  +
    pub fn window_target_id(&self) -> ::std::option::Option<&str> {
          13  +
        self.window_target_id.as_deref()
          14  +
    }
          15  +
}
          16  +
static REGISTERTARGETWITHMAINTENANCEWINDOWOUTPUT_MEMBER_WINDOW_TARGET_ID: ::aws_smithy_schema::Schema<'static> =
          17  +
    ::aws_smithy_schema::Schema::new_member(
          18  +
        ::aws_smithy_schema::ShapeId::from_parts(
          19  +
            "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowOutput$WindowTargetId",
          20  +
            "com.amazonaws.ssm.synthetic",
          21  +
            "RegisterTargetWithMaintenanceWindowOutput",
          22  +
        ),
          23  +
        ::aws_smithy_schema::ShapeType::String,
          24  +
        "WindowTargetId",
          25  +
        0,
          26  +
    );
          27  +
static REGISTERTARGETWITHMAINTENANCEWINDOWOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          28  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          29  +
    ::aws_smithy_schema::ShapeType::String,
          30  +
    "request_id",
          31  +
    1,
          32  +
)
          33  +
.with_http_header("x-amzn-requestid");
          34  +
static REGISTERTARGETWITHMAINTENANCEWINDOWOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          35  +
    ::aws_smithy_schema::ShapeId::from_parts(
          36  +
        "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowOutput",
          37  +
        "com.amazonaws.ssm.synthetic",
          38  +
        "RegisterTargetWithMaintenanceWindowOutput",
          39  +
    ),
          40  +
    ::aws_smithy_schema::ShapeType::Structure,
          41  +
    &[
          42  +
        &REGISTERTARGETWITHMAINTENANCEWINDOWOUTPUT_MEMBER_WINDOW_TARGET_ID,
          43  +
        &REGISTERTARGETWITHMAINTENANCEWINDOWOUTPUT_MEMBER__REQUEST_ID,
          44  +
    ],
          45  +
)
          46  +
.with_original_name("RegisterTargetWithMaintenanceWindowResult");
          47  +
impl RegisterTargetWithMaintenanceWindowOutput {
          48  +
    /// The schema for this shape.
          49  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &REGISTERTARGETWITHMAINTENANCEWINDOWOUTPUT_SCHEMA;
          50  +
}
          51  +
impl ::aws_smithy_schema::serde::SerializableStruct for RegisterTargetWithMaintenanceWindowOutput {
          52  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          53  +
    fn serialize_members(
          54  +
        &self,
          55  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          56  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          57  +
        if let Some(ref val) = self.window_target_id {
          58  +
            ser.write_string(&REGISTERTARGETWITHMAINTENANCEWINDOWOUTPUT_MEMBER_WINDOW_TARGET_ID, val)?;
          59  +
        }
          60  +
        Ok(())
          61  +
    }
          62  +
}
          63  +
impl RegisterTargetWithMaintenanceWindowOutput {
          64  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          65  +
    pub fn deserialize(
          66  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          67  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          68  +
        #[allow(unused_variables, unused_mut)]
          69  +
        let mut builder = Self::builder();
          70  +
        #[allow(
          71  +
            unused_variables,
          72  +
            unreachable_code,
          73  +
            clippy::single_match,
          74  +
            clippy::match_single_binding,
          75  +
            clippy::diverging_sub_expression
          76  +
        )]
          77  +
        deserializer.read_struct(&REGISTERTARGETWITHMAINTENANCEWINDOWOUTPUT_SCHEMA, &mut |member, deser| {
          78  +
            match member.member_index() {
          79  +
                Some(0) => {
          80  +
                    if deser.is_null() {
          81  +
                        deser.read_null()?;
          82  +
                    } else {
          83  +
                        builder.window_target_id = Some(deser.read_string(member)?);
          84  +
                    }
          85  +
                }
          86  +
                Some(1) => {
          87  +
                    builder._request_id = Some(deser.read_string(member)?);
          88  +
                }
          89  +
                _ => {}
          90  +
            }
          91  +
            Ok(())
          92  +
        })?;
          93  +
        Ok(builder.build())
          94  +
    }
          95  +
}
          96  +
impl RegisterTargetWithMaintenanceWindowOutput {
          97  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          98  +
    /// Header-bound members are read directly from headers, avoiding runtime
          99  +
    /// member iteration overhead. Body members are read via the deserializer.
         100  +
    pub fn deserialize_with_response(
         101  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         102  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         103  +
        _status: u16,
         104  +
        _body: &[u8],
         105  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         106  +
        #[allow(unused_variables, unused_mut)]
         107  +
        let mut builder = Self::builder();
         108  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         109  +
            builder._request_id = Some(val.to_string());
         110  +
        }
         111  +
         112  +
        #[allow(
         113  +
            unused_variables,
         114  +
            unreachable_code,
         115  +
            clippy::single_match,
         116  +
            clippy::match_single_binding,
         117  +
            clippy::diverging_sub_expression
         118  +
        )]
         119  +
        deserializer.read_struct(&REGISTERTARGETWITHMAINTENANCEWINDOWOUTPUT_SCHEMA, &mut |member, deser| {
         120  +
            match member.member_index() {
         121  +
                Some(0) => {
         122  +
                    builder.window_target_id = Some(deser.read_string(member)?);
         123  +
                }
         124  +
                _ => {}
         125  +
            }
         126  +
            Ok(())
         127  +
        })?;
         128  +
        Ok(builder.build())
         129  +
    }
         130  +
}
         131  +
impl ::aws_types::request_id::RequestId for RegisterTargetWithMaintenanceWindowOutput {
         132  +
    fn request_id(&self) -> Option<&str> {
         133  +
        self._request_id.as_deref()
         134  +
    }
         135  +
}
         136  +
impl RegisterTargetWithMaintenanceWindowOutput {
         137  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         138  +
        self._request_id = request_id;
         139  +
        self
         140  +
    }
         141  +
}
         142  +
impl RegisterTargetWithMaintenanceWindowOutput {
         143  +
    /// Creates a new builder-style object to manufacture [`RegisterTargetWithMaintenanceWindowOutput`](crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowOutput).
         144  +
    pub fn builder() -> crate::operation::register_target_with_maintenance_window::builders::RegisterTargetWithMaintenanceWindowOutputBuilder {
         145  +
        crate::operation::register_target_with_maintenance_window::builders::RegisterTargetWithMaintenanceWindowOutputBuilder::default()
         146  +
    }
         147  +
}
         148  +
         149  +
/// A builder for [`RegisterTargetWithMaintenanceWindowOutput`](crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowOutput).
         150  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         151  +
#[non_exhaustive]
         152  +
pub struct RegisterTargetWithMaintenanceWindowOutputBuilder {
         153  +
    pub(crate) window_target_id: ::std::option::Option<::std::string::String>,
         154  +
    _request_id: Option<String>,
         155  +
}
         156  +
impl RegisterTargetWithMaintenanceWindowOutputBuilder {
         157  +
    /// <p>The ID of the target definition in this maintenance window.</p>
         158  +
    pub fn window_target_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         159  +
        self.window_target_id = ::std::option::Option::Some(input.into());
         160  +
        self
         161  +
    }
         162  +
    /// <p>The ID of the target definition in this maintenance window.</p>
         163  +
    pub fn set_window_target_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         164  +
        self.window_target_id = input;
         165  +
        self
         166  +
    }
         167  +
    /// <p>The ID of the target definition in this maintenance window.</p>
         168  +
    pub fn get_window_target_id(&self) -> &::std::option::Option<::std::string::String> {
         169  +
        &self.window_target_id
         170  +
    }
         171  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         172  +
        self._request_id = Some(request_id.into());
         173  +
        self
         174  +
    }
         175  +
         176  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         177  +
        self._request_id = request_id;
         178  +
        self
         179  +
    }
         180  +
    /// Consumes the builder and constructs a [`RegisterTargetWithMaintenanceWindowOutput`](crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowOutput).
         181  +
    pub fn build(self) -> crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowOutput {
         182  +
        crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowOutput {
         183  +
            window_target_id: self.window_target_id,
         184  +
            _request_id: self._request_id,
         185  +
        }
         186  +
    }
         187  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/register_target_with_maintenance_window/builders.rs

@@ -0,1 +0,320 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::register_target_with_maintenance_window::_register_target_with_maintenance_window_input::RegisterTargetWithMaintenanceWindowInputBuilder;
           3  +
           4  +
pub use crate::operation::register_target_with_maintenance_window::_register_target_with_maintenance_window_output::RegisterTargetWithMaintenanceWindowOutputBuilder;
           5  +
           6  +
impl crate::operation::register_target_with_maintenance_window::builders::RegisterTargetWithMaintenanceWindowInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.register_target_with_maintenance_window();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `RegisterTargetWithMaintenanceWindow`.
          24  +
///
          25  +
/// <p>Registers a target with a maintenance window.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct RegisterTargetWithMaintenanceWindowFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::register_target_with_maintenance_window::builders::RegisterTargetWithMaintenanceWindowInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowOutput,
          35  +
        crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowError,
          36  +
    > for RegisterTargetWithMaintenanceWindowFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowOutput,
          44  +
            crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl RegisterTargetWithMaintenanceWindowFluentBuilder {
          51  +
    /// Creates a new `RegisterTargetWithMaintenanceWindowFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the RegisterTargetWithMaintenanceWindow as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::register_target_with_maintenance_window::builders::RegisterTargetWithMaintenanceWindowInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins =
          85  +
            crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindow::operation_runtime_plugins(
          86  +
                self.handle.runtime_plugins.clone(),
          87  +
                &self.handle.conf,
          88  +
                self.config_override,
          89  +
            );
          90  +
        crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindow::orchestrate(&runtime_plugins, input).await
          91  +
    }
          92  +
          93  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          94  +
    pub fn customize(
          95  +
        self,
          96  +
    ) -> crate::client::customize::CustomizableOperation<
          97  +
        crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowOutput,
          98  +
        crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowError,
          99  +
        Self,
         100  +
    > {
         101  +
        crate::client::customize::CustomizableOperation::new(self)
         102  +
    }
         103  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         104  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         105  +
        self
         106  +
    }
         107  +
         108  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         109  +
        self.config_override = config_override;
         110  +
        self
         111  +
    }
         112  +
    /// <p>The ID of the maintenance window the target should be registered with.</p>
         113  +
    pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         114  +
        self.inner = self.inner.window_id(input.into());
         115  +
        self
         116  +
    }
         117  +
    /// <p>The ID of the maintenance window the target should be registered with.</p>
         118  +
    pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         119  +
        self.inner = self.inner.set_window_id(input);
         120  +
        self
         121  +
    }
         122  +
    /// <p>The ID of the maintenance window the target should be registered with.</p>
         123  +
    pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
         124  +
        self.inner.get_window_id()
         125  +
    }
         126  +
    /// <p>The type of target being registered with the maintenance window.</p>
         127  +
    pub fn resource_type(mut self, input: crate::types::MaintenanceWindowResourceType) -> Self {
         128  +
        self.inner = self.inner.resource_type(input);
         129  +
        self
         130  +
    }
         131  +
    /// <p>The type of target being registered with the maintenance window.</p>
         132  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowResourceType>) -> Self {
         133  +
        self.inner = self.inner.set_resource_type(input);
         134  +
        self
         135  +
    }
         136  +
    /// <p>The type of target being registered with the maintenance window.</p>
         137  +
    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::MaintenanceWindowResourceType> {
         138  +
        self.inner.get_resource_type()
         139  +
    }
         140  +
    ///
         141  +
    /// Appends an item to `Targets`.
         142  +
    ///
         143  +
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
         144  +
    ///
         145  +
    /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
         146  +
    /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
         147  +
    /// </note>
         148  +
    /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
         149  +
    /// <p><b>Example 1</b>: Specify managed node IDs</p>
         150  +
    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
         151  +
    /// ,
         152  +
    /// <instance-id-2>
         153  +
    /// ,
         154  +
    /// <instance-id-3></instance-id-3>
         155  +
    /// </instance-id-2>
         156  +
    /// </instance-id-1></code></p>
         157  +
    /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
         158  +
    /// <p><code>Key=tag:<my-tag-key>
         159  +
    /// ,Values=
         160  +
    /// <my-tag-value-1>
         161  +
    /// ,
         162  +
    /// <my-tag-value-2></my-tag-value-2>
         163  +
    /// </my-tag-value-1>
         164  +
    /// </my-tag-key></code></p>
         165  +
    /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
         166  +
    /// <p><code>Key=tag-key,Values=<my-tag-key-1>
         167  +
    /// ,
         168  +
    /// <my-tag-key-2></my-tag-key-2>
         169  +
    /// </my-tag-key-1></code></p>
         170  +
    /// <p><b>Example 4</b>: Use resource group names</p>
         171  +
    /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
         172  +
    /// <p><b>Example 5</b>: Use filters for resource group types</p>
         173  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
         174  +
    /// ,
         175  +
    /// <resource-type-2></resource-type-2>
         176  +
    /// </resource-type-1></code></p><note>
         177  +
    /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
         178  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
         179  +
    /// </note>
         180  +
    /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         181  +
    pub fn targets(mut self, input: crate::types::Target) -> Self {
         182  +
        self.inner = self.inner.targets(input);
         183  +
        self
         184  +
    }
         185  +
    /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
         186  +
    /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
         187  +
    /// </note>
         188  +
    /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
         189  +
    /// <p><b>Example 1</b>: Specify managed node IDs</p>
         190  +
    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
         191  +
    /// ,
         192  +
    /// <instance-id-2>
         193  +
    /// ,
         194  +
    /// <instance-id-3></instance-id-3>
         195  +
    /// </instance-id-2>
         196  +
    /// </instance-id-1></code></p>
         197  +
    /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
         198  +
    /// <p><code>Key=tag:<my-tag-key>
         199  +
    /// ,Values=
         200  +
    /// <my-tag-value-1>
         201  +
    /// ,
         202  +
    /// <my-tag-value-2></my-tag-value-2>
         203  +
    /// </my-tag-value-1>
         204  +
    /// </my-tag-key></code></p>
         205  +
    /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
         206  +
    /// <p><code>Key=tag-key,Values=<my-tag-key-1>
         207  +
    /// ,
         208  +
    /// <my-tag-key-2></my-tag-key-2>
         209  +
    /// </my-tag-key-1></code></p>
         210  +
    /// <p><b>Example 4</b>: Use resource group names</p>
         211  +
    /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
         212  +
    /// <p><b>Example 5</b>: Use filters for resource group types</p>
         213  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
         214  +
    /// ,
         215  +
    /// <resource-type-2></resource-type-2>
         216  +
    /// </resource-type-1></code></p><note>
         217  +
    /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
         218  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
         219  +
    /// </note>
         220  +
    /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         221  +
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
         222  +
        self.inner = self.inner.set_targets(input);
         223  +
        self
         224  +
    }
         225  +
    /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
         226  +
    /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
         227  +
    /// </note>
         228  +
    /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
         229  +
    /// <p><b>Example 1</b>: Specify managed node IDs</p>
         230  +
    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
         231  +
    /// ,
         232  +
    /// <instance-id-2>
         233  +
    /// ,
         234  +
    /// <instance-id-3></instance-id-3>
         235  +
    /// </instance-id-2>
         236  +
    /// </instance-id-1></code></p>
         237  +
    /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
         238  +
    /// <p><code>Key=tag:<my-tag-key>
         239  +
    /// ,Values=
         240  +
    /// <my-tag-value-1>
         241  +
    /// ,
         242  +
    /// <my-tag-value-2></my-tag-value-2>
         243  +
    /// </my-tag-value-1>
         244  +
    /// </my-tag-key></code></p>
         245  +
    /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
         246  +
    /// <p><code>Key=tag-key,Values=<my-tag-key-1>
         247  +
    /// ,
         248  +
    /// <my-tag-key-2></my-tag-key-2>
         249  +
    /// </my-tag-key-1></code></p>
         250  +
    /// <p><b>Example 4</b>: Use resource group names</p>
         251  +
    /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
         252  +
    /// <p><b>Example 5</b>: Use filters for resource group types</p>
         253  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
         254  +
    /// ,
         255  +
    /// <resource-type-2></resource-type-2>
         256  +
    /// </resource-type-1></code></p><note>
         257  +
    /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
         258  +
    /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
         259  +
    /// </note>
         260  +
    /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         261  +
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
         262  +
        self.inner.get_targets()
         263  +
    }
         264  +
    /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
         265  +
    pub fn owner_information(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         266  +
        self.inner = self.inner.owner_information(input.into());
         267  +
        self
         268  +
    }
         269  +
    /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
         270  +
    pub fn set_owner_information(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         271  +
        self.inner = self.inner.set_owner_information(input);
         272  +
        self
         273  +
    }
         274  +
    /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
         275  +
    pub fn get_owner_information(&self) -> &::std::option::Option<::std::string::String> {
         276  +
        self.inner.get_owner_information()
         277  +
    }
         278  +
    /// <p>An optional name for the target.</p>
         279  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         280  +
        self.inner = self.inner.name(input.into());
         281  +
        self
         282  +
    }
         283  +
    /// <p>An optional name for the target.</p>
         284  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         285  +
        self.inner = self.inner.set_name(input);
         286  +
        self
         287  +
    }
         288  +
    /// <p>An optional name for the target.</p>
         289  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         290  +
        self.inner.get_name()
         291  +
    }
         292  +
    /// <p>An optional description for the target.</p>
         293  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         294  +
        self.inner = self.inner.description(input.into());
         295  +
        self
         296  +
    }
         297  +
    /// <p>An optional description for the target.</p>
         298  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         299  +
        self.inner = self.inner.set_description(input);
         300  +
        self
         301  +
    }
         302  +
    /// <p>An optional description for the target.</p>
         303  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         304  +
        self.inner.get_description()
         305  +
    }
         306  +
    /// <p>User-provided idempotency token.</p>
         307  +
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         308  +
        self.inner = self.inner.client_token(input.into());
         309  +
        self
         310  +
    }
         311  +
    /// <p>User-provided idempotency token.</p>
         312  +
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         313  +
        self.inner = self.inner.set_client_token(input);
         314  +
        self
         315  +
    }
         316  +
    /// <p>User-provided idempotency token.</p>
         317  +
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
         318  +
        self.inner.get_client_token()
         319  +
    }
         320  +
}