AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/get_parameters_by_path/_get_parameters_by_path_input.rs

@@ -0,1 +0,408 @@
           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 GetParametersByPathInput {
           6  +
    /// <p>The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. For the API call to succeed, the last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Here is an example of a hierarchy: <code>/Finance/Prod/IAD/WinServ2016/license33 </code></p>
           7  +
    pub path: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>Retrieve all parameters within a hierarchy.</p><important>
           9  +
    /// <p>If a user has access to a path, then the user can access all levels of that path. For example, if a user has permission to access path <code>/a</code>, then the user can also access <code>/a/b</code>. Even if a user has explicitly been denied access in IAM for parameter <code>/a/b</code>, they can still call the GetParametersByPath API operation recursively for <code>/a</code> and view <code>/a/b</code>.</p>
          10  +
    /// </important>
          11  +
    pub recursive: ::std::option::Option<bool>,
          12  +
    /// <p>Filters to limit the request results.</p><note>
          13  +
    /// <p>The following <code>Key</code> values are supported for <code>GetParametersByPath</code>: <code>Type</code>, <code>KeyId</code>, and <code>Label</code>.</p>
          14  +
    /// <p>The following <code>Key</code> values aren't supported for <code>GetParametersByPath</code>: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
          15  +
    /// </note>
          16  +
    pub parameter_filters: ::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>>,
          17  +
    /// <p>Retrieve all parameters in a hierarchy with their value decrypted.</p>
          18  +
    pub with_decryption: ::std::option::Option<bool>,
          19  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
          20  +
    pub max_results: ::std::option::Option<i32>,
          21  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
          22  +
    pub next_token: ::std::option::Option<::std::string::String>,
          23  +
}
          24  +
impl GetParametersByPathInput {
          25  +
    /// <p>The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. For the API call to succeed, the last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Here is an example of a hierarchy: <code>/Finance/Prod/IAD/WinServ2016/license33 </code></p>
          26  +
    pub fn path(&self) -> ::std::option::Option<&str> {
          27  +
        self.path.as_deref()
          28  +
    }
          29  +
    /// <p>Retrieve all parameters within a hierarchy.</p><important>
          30  +
    /// <p>If a user has access to a path, then the user can access all levels of that path. For example, if a user has permission to access path <code>/a</code>, then the user can also access <code>/a/b</code>. Even if a user has explicitly been denied access in IAM for parameter <code>/a/b</code>, they can still call the GetParametersByPath API operation recursively for <code>/a</code> and view <code>/a/b</code>.</p>
          31  +
    /// </important>
          32  +
    pub fn recursive(&self) -> ::std::option::Option<bool> {
          33  +
        self.recursive
          34  +
    }
          35  +
    /// <p>Filters to limit the request results.</p><note>
          36  +
    /// <p>The following <code>Key</code> values are supported for <code>GetParametersByPath</code>: <code>Type</code>, <code>KeyId</code>, and <code>Label</code>.</p>
          37  +
    /// <p>The following <code>Key</code> values aren't supported for <code>GetParametersByPath</code>: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
          38  +
    /// </note>
          39  +
    ///
          40  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameter_filters.is_none()`.
          41  +
    pub fn parameter_filters(&self) -> &[crate::types::ParameterStringFilter] {
          42  +
        self.parameter_filters.as_deref().unwrap_or_default()
          43  +
    }
          44  +
    /// <p>Retrieve all parameters in a hierarchy with their value decrypted.</p>
          45  +
    pub fn with_decryption(&self) -> ::std::option::Option<bool> {
          46  +
        self.with_decryption
          47  +
    }
          48  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
          49  +
    pub fn max_results(&self) -> ::std::option::Option<i32> {
          50  +
        self.max_results
          51  +
    }
          52  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
          53  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          54  +
        self.next_token.as_deref()
          55  +
    }
          56  +
}
          57  +
static GETPARAMETERSBYPATHINPUT_MEMBER_PATH: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          58  +
    ::aws_smithy_schema::ShapeId::from_parts(
          59  +
        "com.amazonaws.ssm.synthetic#GetParametersByPathInput$Path",
          60  +
        "com.amazonaws.ssm.synthetic",
          61  +
        "GetParametersByPathInput",
          62  +
    ),
          63  +
    ::aws_smithy_schema::ShapeType::String,
          64  +
    "Path",
          65  +
    0,
          66  +
);
          67  +
static GETPARAMETERSBYPATHINPUT_MEMBER_RECURSIVE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          68  +
    ::aws_smithy_schema::ShapeId::from_parts(
          69  +
        "com.amazonaws.ssm.synthetic#GetParametersByPathInput$Recursive",
          70  +
        "com.amazonaws.ssm.synthetic",
          71  +
        "GetParametersByPathInput",
          72  +
    ),
          73  +
    ::aws_smithy_schema::ShapeType::Boolean,
          74  +
    "Recursive",
          75  +
    1,
          76  +
);
          77  +
static GETPARAMETERSBYPATHINPUT_MEMBER_PARAMETER_FILTERS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          78  +
    ::aws_smithy_schema::ShapeId::from_parts(
          79  +
        "com.amazonaws.ssm#ParameterStringFilterList$member",
          80  +
        "com.amazonaws.ssm",
          81  +
        "ParameterStringFilterList",
          82  +
    ),
          83  +
    ::aws_smithy_schema::ShapeType::Structure,
          84  +
    "member",
          85  +
    0,
          86  +
);
          87  +
static GETPARAMETERSBYPATHINPUT_MEMBER_PARAMETER_FILTERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          88  +
    ::aws_smithy_schema::ShapeId::from_parts(
          89  +
        "com.amazonaws.ssm.synthetic#GetParametersByPathInput$ParameterFilters",
          90  +
        "com.amazonaws.ssm.synthetic",
          91  +
        "GetParametersByPathInput",
          92  +
    ),
          93  +
    ::aws_smithy_schema::ShapeType::List,
          94  +
    "ParameterFilters",
          95  +
    2,
          96  +
)
          97  +
.with_list_member(&GETPARAMETERSBYPATHINPUT_MEMBER_PARAMETER_FILTERS_MEMBER);
          98  +
static GETPARAMETERSBYPATHINPUT_MEMBER_WITH_DECRYPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          99  +
    ::aws_smithy_schema::ShapeId::from_parts(
         100  +
        "com.amazonaws.ssm.synthetic#GetParametersByPathInput$WithDecryption",
         101  +
        "com.amazonaws.ssm.synthetic",
         102  +
        "GetParametersByPathInput",
         103  +
    ),
         104  +
    ::aws_smithy_schema::ShapeType::Boolean,
         105  +
    "WithDecryption",
         106  +
    3,
         107  +
);
         108  +
static GETPARAMETERSBYPATHINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         109  +
    ::aws_smithy_schema::ShapeId::from_parts(
         110  +
        "com.amazonaws.ssm.synthetic#GetParametersByPathInput$MaxResults",
         111  +
        "com.amazonaws.ssm.synthetic",
         112  +
        "GetParametersByPathInput",
         113  +
    ),
         114  +
    ::aws_smithy_schema::ShapeType::Integer,
         115  +
    "MaxResults",
         116  +
    4,
         117  +
);
         118  +
static GETPARAMETERSBYPATHINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         119  +
    ::aws_smithy_schema::ShapeId::from_parts(
         120  +
        "com.amazonaws.ssm.synthetic#GetParametersByPathInput$NextToken",
         121  +
        "com.amazonaws.ssm.synthetic",
         122  +
        "GetParametersByPathInput",
         123  +
    ),
         124  +
    ::aws_smithy_schema::ShapeType::String,
         125  +
    "NextToken",
         126  +
    5,
         127  +
);
         128  +
static GETPARAMETERSBYPATHINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         129  +
    ::aws_smithy_schema::ShapeId::from_parts(
         130  +
        "com.amazonaws.ssm.synthetic#GetParametersByPathInput",
         131  +
        "com.amazonaws.ssm.synthetic",
         132  +
        "GetParametersByPathInput",
         133  +
    ),
         134  +
    ::aws_smithy_schema::ShapeType::Structure,
         135  +
    &[
         136  +
        &GETPARAMETERSBYPATHINPUT_MEMBER_PATH,
         137  +
        &GETPARAMETERSBYPATHINPUT_MEMBER_RECURSIVE,
         138  +
        &GETPARAMETERSBYPATHINPUT_MEMBER_PARAMETER_FILTERS,
         139  +
        &GETPARAMETERSBYPATHINPUT_MEMBER_WITH_DECRYPTION,
         140  +
        &GETPARAMETERSBYPATHINPUT_MEMBER_MAX_RESULTS,
         141  +
        &GETPARAMETERSBYPATHINPUT_MEMBER_NEXT_TOKEN,
         142  +
    ],
         143  +
)
         144  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         145  +
.with_original_name("GetParametersByPathRequest");
         146  +
impl GetParametersByPathInput {
         147  +
    /// The schema for this shape.
         148  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETPARAMETERSBYPATHINPUT_SCHEMA;
         149  +
}
         150  +
impl ::aws_smithy_schema::serde::SerializableStruct for GetParametersByPathInput {
         151  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         152  +
    fn serialize_members(
         153  +
        &self,
         154  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         155  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         156  +
        if let Some(ref val) = self.path {
         157  +
            ser.write_string(&GETPARAMETERSBYPATHINPUT_MEMBER_PATH, val)?;
         158  +
        }
         159  +
        if let Some(ref val) = self.recursive {
         160  +
            ser.write_boolean(&GETPARAMETERSBYPATHINPUT_MEMBER_RECURSIVE, *val)?;
         161  +
        }
         162  +
        if let Some(ref val) = self.parameter_filters {
         163  +
            ser.write_list(
         164  +
                &GETPARAMETERSBYPATHINPUT_MEMBER_PARAMETER_FILTERS,
         165  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         166  +
                    for item in val {
         167  +
                        ser.write_struct(crate::types::ParameterStringFilter::SCHEMA, item)?;
         168  +
                    }
         169  +
                    Ok(())
         170  +
                },
         171  +
            )?;
         172  +
        }
         173  +
        if let Some(ref val) = self.with_decryption {
         174  +
            ser.write_boolean(&GETPARAMETERSBYPATHINPUT_MEMBER_WITH_DECRYPTION, *val)?;
         175  +
        }
         176  +
        if let Some(ref val) = self.max_results {
         177  +
            ser.write_integer(&GETPARAMETERSBYPATHINPUT_MEMBER_MAX_RESULTS, *val)?;
         178  +
        }
         179  +
        if let Some(ref val) = self.next_token {
         180  +
            ser.write_string(&GETPARAMETERSBYPATHINPUT_MEMBER_NEXT_TOKEN, val)?;
         181  +
        }
         182  +
        Ok(())
         183  +
    }
         184  +
}
         185  +
impl GetParametersByPathInput {
         186  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         187  +
    pub fn deserialize(
         188  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         189  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         190  +
        #[allow(unused_variables, unused_mut)]
         191  +
        let mut builder = Self::builder();
         192  +
        #[allow(
         193  +
            unused_variables,
         194  +
            unreachable_code,
         195  +
            clippy::single_match,
         196  +
            clippy::match_single_binding,
         197  +
            clippy::diverging_sub_expression
         198  +
        )]
         199  +
        deserializer.read_struct(&GETPARAMETERSBYPATHINPUT_SCHEMA, &mut |member, deser| {
         200  +
            match member.member_index() {
         201  +
                Some(0) => {
         202  +
                    if deser.is_null() {
         203  +
                        deser.read_null()?;
         204  +
                    } else {
         205  +
                        builder.path = Some(deser.read_string(member)?);
         206  +
                    }
         207  +
                }
         208  +
                Some(1) => {
         209  +
                    if deser.is_null() {
         210  +
                        deser.read_null()?;
         211  +
                    } else {
         212  +
                        builder.recursive = Some(deser.read_boolean(member)?);
         213  +
                    }
         214  +
                }
         215  +
                Some(2) => {
         216  +
                    if deser.is_null() {
         217  +
                        deser.read_null()?;
         218  +
                    } else {
         219  +
                        builder.parameter_filters = Some({
         220  +
                            let mut container = Vec::new();
         221  +
                            deser.read_list(member, &mut |deser| {
         222  +
                                container.push(crate::types::ParameterStringFilter::deserialize(deser)?);
         223  +
                                Ok(())
         224  +
                            })?;
         225  +
                            container
         226  +
                        });
         227  +
                    }
         228  +
                }
         229  +
                Some(3) => {
         230  +
                    if deser.is_null() {
         231  +
                        deser.read_null()?;
         232  +
                    } else {
         233  +
                        builder.with_decryption = Some(deser.read_boolean(member)?);
         234  +
                    }
         235  +
                }
         236  +
                Some(4) => {
         237  +
                    if deser.is_null() {
         238  +
                        deser.read_null()?;
         239  +
                    } else {
         240  +
                        builder.max_results = Some(deser.read_integer(member)?);
         241  +
                    }
         242  +
                }
         243  +
                Some(5) => {
         244  +
                    if deser.is_null() {
         245  +
                        deser.read_null()?;
         246  +
                    } else {
         247  +
                        builder.next_token = Some(deser.read_string(member)?);
         248  +
                    }
         249  +
                }
         250  +
                _ => {}
         251  +
            }
         252  +
            Ok(())
         253  +
        })?;
         254  +
        builder.path = builder.path.or(Some(String::new()));
         255  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         256  +
    }
         257  +
}
         258  +
impl GetParametersByPathInput {
         259  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         260  +
    pub fn deserialize_with_response(
         261  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         262  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         263  +
        _status: u16,
         264  +
        _body: &[u8],
         265  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         266  +
        Self::deserialize(deserializer)
         267  +
    }
         268  +
}
         269  +
impl GetParametersByPathInput {
         270  +
    /// Creates a new builder-style object to manufacture [`GetParametersByPathInput`](crate::operation::get_parameters_by_path::GetParametersByPathInput).
         271  +
    pub fn builder() -> crate::operation::get_parameters_by_path::builders::GetParametersByPathInputBuilder {
         272  +
        crate::operation::get_parameters_by_path::builders::GetParametersByPathInputBuilder::default()
         273  +
    }
         274  +
}
         275  +
         276  +
/// A builder for [`GetParametersByPathInput`](crate::operation::get_parameters_by_path::GetParametersByPathInput).
         277  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         278  +
#[non_exhaustive]
         279  +
pub struct GetParametersByPathInputBuilder {
         280  +
    pub(crate) path: ::std::option::Option<::std::string::String>,
         281  +
    pub(crate) recursive: ::std::option::Option<bool>,
         282  +
    pub(crate) parameter_filters: ::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>>,
         283  +
    pub(crate) with_decryption: ::std::option::Option<bool>,
         284  +
    pub(crate) max_results: ::std::option::Option<i32>,
         285  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         286  +
}
         287  +
impl GetParametersByPathInputBuilder {
         288  +
    /// <p>The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. For the API call to succeed, the last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Here is an example of a hierarchy: <code>/Finance/Prod/IAD/WinServ2016/license33 </code></p>
         289  +
    /// This field is required.
         290  +
    pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         291  +
        self.path = ::std::option::Option::Some(input.into());
         292  +
        self
         293  +
    }
         294  +
    /// <p>The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. For the API call to succeed, the last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Here is an example of a hierarchy: <code>/Finance/Prod/IAD/WinServ2016/license33 </code></p>
         295  +
    pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         296  +
        self.path = input;
         297  +
        self
         298  +
    }
         299  +
    /// <p>The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. For the API call to succeed, the last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Here is an example of a hierarchy: <code>/Finance/Prod/IAD/WinServ2016/license33 </code></p>
         300  +
    pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
         301  +
        &self.path
         302  +
    }
         303  +
    /// <p>Retrieve all parameters within a hierarchy.</p><important>
         304  +
    /// <p>If a user has access to a path, then the user can access all levels of that path. For example, if a user has permission to access path <code>/a</code>, then the user can also access <code>/a/b</code>. Even if a user has explicitly been denied access in IAM for parameter <code>/a/b</code>, they can still call the GetParametersByPath API operation recursively for <code>/a</code> and view <code>/a/b</code>.</p>
         305  +
    /// </important>
         306  +
    pub fn recursive(mut self, input: bool) -> Self {
         307  +
        self.recursive = ::std::option::Option::Some(input);
         308  +
        self
         309  +
    }
         310  +
    /// <p>Retrieve all parameters within a hierarchy.</p><important>
         311  +
    /// <p>If a user has access to a path, then the user can access all levels of that path. For example, if a user has permission to access path <code>/a</code>, then the user can also access <code>/a/b</code>. Even if a user has explicitly been denied access in IAM for parameter <code>/a/b</code>, they can still call the GetParametersByPath API operation recursively for <code>/a</code> and view <code>/a/b</code>.</p>
         312  +
    /// </important>
         313  +
    pub fn set_recursive(mut self, input: ::std::option::Option<bool>) -> Self {
         314  +
        self.recursive = input;
         315  +
        self
         316  +
    }
         317  +
    /// <p>Retrieve all parameters within a hierarchy.</p><important>
         318  +
    /// <p>If a user has access to a path, then the user can access all levels of that path. For example, if a user has permission to access path <code>/a</code>, then the user can also access <code>/a/b</code>. Even if a user has explicitly been denied access in IAM for parameter <code>/a/b</code>, they can still call the GetParametersByPath API operation recursively for <code>/a</code> and view <code>/a/b</code>.</p>
         319  +
    /// </important>
         320  +
    pub fn get_recursive(&self) -> &::std::option::Option<bool> {
         321  +
        &self.recursive
         322  +
    }
         323  +
    /// Appends an item to `parameter_filters`.
         324  +
    ///
         325  +
    /// To override the contents of this collection use [`set_parameter_filters`](Self::set_parameter_filters).
         326  +
    ///
         327  +
    /// <p>Filters to limit the request results.</p><note>
         328  +
    /// <p>The following <code>Key</code> values are supported for <code>GetParametersByPath</code>: <code>Type</code>, <code>KeyId</code>, and <code>Label</code>.</p>
         329  +
    /// <p>The following <code>Key</code> values aren't supported for <code>GetParametersByPath</code>: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
         330  +
    /// </note>
         331  +
    pub fn parameter_filters(mut self, input: crate::types::ParameterStringFilter) -> Self {
         332  +
        let mut v = self.parameter_filters.unwrap_or_default();
         333  +
        v.push(input);
         334  +
        self.parameter_filters = ::std::option::Option::Some(v);
         335  +
        self
         336  +
    }
         337  +
    /// <p>Filters to limit the request results.</p><note>
         338  +
    /// <p>The following <code>Key</code> values are supported for <code>GetParametersByPath</code>: <code>Type</code>, <code>KeyId</code>, and <code>Label</code>.</p>
         339  +
    /// <p>The following <code>Key</code> values aren't supported for <code>GetParametersByPath</code>: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
         340  +
    /// </note>
         341  +
    pub fn set_parameter_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>>) -> Self {
         342  +
        self.parameter_filters = input;
         343  +
        self
         344  +
    }
         345  +
    /// <p>Filters to limit the request results.</p><note>
         346  +
    /// <p>The following <code>Key</code> values are supported for <code>GetParametersByPath</code>: <code>Type</code>, <code>KeyId</code>, and <code>Label</code>.</p>
         347  +
    /// <p>The following <code>Key</code> values aren't supported for <code>GetParametersByPath</code>: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
         348  +
    /// </note>
         349  +
    pub fn get_parameter_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>> {
         350  +
        &self.parameter_filters
         351  +
    }
         352  +
    /// <p>Retrieve all parameters in a hierarchy with their value decrypted.</p>
         353  +
    pub fn with_decryption(mut self, input: bool) -> Self {
         354  +
        self.with_decryption = ::std::option::Option::Some(input);
         355  +
        self
         356  +
    }
         357  +
    /// <p>Retrieve all parameters in a hierarchy with their value decrypted.</p>
         358  +
    pub fn set_with_decryption(mut self, input: ::std::option::Option<bool>) -> Self {
         359  +
        self.with_decryption = input;
         360  +
        self
         361  +
    }
         362  +
    /// <p>Retrieve all parameters in a hierarchy with their value decrypted.</p>
         363  +
    pub fn get_with_decryption(&self) -> &::std::option::Option<bool> {
         364  +
        &self.with_decryption
         365  +
    }
         366  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         367  +
    pub fn max_results(mut self, input: i32) -> Self {
         368  +
        self.max_results = ::std::option::Option::Some(input);
         369  +
        self
         370  +
    }
         371  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         372  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         373  +
        self.max_results = input;
         374  +
        self
         375  +
    }
         376  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         377  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         378  +
        &self.max_results
         379  +
    }
         380  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         381  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         382  +
        self.next_token = ::std::option::Option::Some(input.into());
         383  +
        self
         384  +
    }
         385  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         386  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         387  +
        self.next_token = input;
         388  +
        self
         389  +
    }
         390  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         391  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         392  +
        &self.next_token
         393  +
    }
         394  +
    /// Consumes the builder and constructs a [`GetParametersByPathInput`](crate::operation::get_parameters_by_path::GetParametersByPathInput).
         395  +
    pub fn build(
         396  +
        self,
         397  +
    ) -> ::std::result::Result<crate::operation::get_parameters_by_path::GetParametersByPathInput, ::aws_smithy_types::error::operation::BuildError>
         398  +
    {
         399  +
        ::std::result::Result::Ok(crate::operation::get_parameters_by_path::GetParametersByPathInput {
         400  +
            path: self.path,
         401  +
            recursive: self.recursive,
         402  +
            parameter_filters: self.parameter_filters,
         403  +
            with_decryption: self.with_decryption,
         404  +
            max_results: self.max_results,
         405  +
            next_token: self.next_token,
         406  +
        })
         407  +
    }
         408  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/get_parameters_by_path/_get_parameters_by_path_output.rs

@@ -0,1 +0,269 @@
           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 GetParametersByPathOutput {
           6  +
    /// <p>A list of parameters found in the specified hierarchy.</p>
           7  +
    pub parameters: ::std::option::Option<::std::vec::Vec<crate::types::Parameter>>,
           8  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
           9  +
    pub next_token: ::std::option::Option<::std::string::String>,
          10  +
    _request_id: Option<String>,
          11  +
}
          12  +
impl GetParametersByPathOutput {
          13  +
    /// <p>A list of parameters found in the specified hierarchy.</p>
          14  +
    ///
          15  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameters.is_none()`.
          16  +
    pub fn parameters(&self) -> &[crate::types::Parameter] {
          17  +
        self.parameters.as_deref().unwrap_or_default()
          18  +
    }
          19  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
          20  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          21  +
        self.next_token.as_deref()
          22  +
    }
          23  +
}
          24  +
static GETPARAMETERSBYPATHOUTPUT_MEMBER_PARAMETERS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          25  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterList$member", "com.amazonaws.ssm", "ParameterList"),
          26  +
    ::aws_smithy_schema::ShapeType::Structure,
          27  +
    "member",
          28  +
    0,
          29  +
);
          30  +
static GETPARAMETERSBYPATHOUTPUT_MEMBER_PARAMETERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          31  +
    ::aws_smithy_schema::ShapeId::from_parts(
          32  +
        "com.amazonaws.ssm.synthetic#GetParametersByPathOutput$Parameters",
          33  +
        "com.amazonaws.ssm.synthetic",
          34  +
        "GetParametersByPathOutput",
          35  +
    ),
          36  +
    ::aws_smithy_schema::ShapeType::List,
          37  +
    "Parameters",
          38  +
    0,
          39  +
)
          40  +
.with_list_member(&GETPARAMETERSBYPATHOUTPUT_MEMBER_PARAMETERS_MEMBER);
          41  +
static GETPARAMETERSBYPATHOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          42  +
    ::aws_smithy_schema::ShapeId::from_parts(
          43  +
        "com.amazonaws.ssm.synthetic#GetParametersByPathOutput$NextToken",
          44  +
        "com.amazonaws.ssm.synthetic",
          45  +
        "GetParametersByPathOutput",
          46  +
    ),
          47  +
    ::aws_smithy_schema::ShapeType::String,
          48  +
    "NextToken",
          49  +
    1,
          50  +
);
          51  +
static GETPARAMETERSBYPATHOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          52  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          53  +
    ::aws_smithy_schema::ShapeType::String,
          54  +
    "request_id",
          55  +
    2,
          56  +
)
          57  +
.with_http_header("x-amzn-requestid");
          58  +
static GETPARAMETERSBYPATHOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts(
          60  +
        "com.amazonaws.ssm.synthetic#GetParametersByPathOutput",
          61  +
        "com.amazonaws.ssm.synthetic",
          62  +
        "GetParametersByPathOutput",
          63  +
    ),
          64  +
    ::aws_smithy_schema::ShapeType::Structure,
          65  +
    &[
          66  +
        &GETPARAMETERSBYPATHOUTPUT_MEMBER_PARAMETERS,
          67  +
        &GETPARAMETERSBYPATHOUTPUT_MEMBER_NEXT_TOKEN,
          68  +
        &GETPARAMETERSBYPATHOUTPUT_MEMBER__REQUEST_ID,
          69  +
    ],
          70  +
)
          71  +
.with_original_name("GetParametersByPathResult");
          72  +
impl GetParametersByPathOutput {
          73  +
    /// The schema for this shape.
          74  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETPARAMETERSBYPATHOUTPUT_SCHEMA;
          75  +
}
          76  +
impl ::aws_smithy_schema::serde::SerializableStruct for GetParametersByPathOutput {
          77  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          78  +
    fn serialize_members(
          79  +
        &self,
          80  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          81  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          82  +
        if let Some(ref val) = self.parameters {
          83  +
            ser.write_list(
          84  +
                &GETPARAMETERSBYPATHOUTPUT_MEMBER_PARAMETERS,
          85  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          86  +
                    for item in val {
          87  +
                        ser.write_struct(crate::types::Parameter::SCHEMA, item)?;
          88  +
                    }
          89  +
                    Ok(())
          90  +
                },
          91  +
            )?;
          92  +
        }
          93  +
        if let Some(ref val) = self.next_token {
          94  +
            ser.write_string(&GETPARAMETERSBYPATHOUTPUT_MEMBER_NEXT_TOKEN, val)?;
          95  +
        }
          96  +
        Ok(())
          97  +
    }
          98  +
}
          99  +
impl GetParametersByPathOutput {
         100  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         101  +
    pub fn deserialize(
         102  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         103  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         104  +
        #[allow(unused_variables, unused_mut)]
         105  +
        let mut builder = Self::builder();
         106  +
        #[allow(
         107  +
            unused_variables,
         108  +
            unreachable_code,
         109  +
            clippy::single_match,
         110  +
            clippy::match_single_binding,
         111  +
            clippy::diverging_sub_expression
         112  +
        )]
         113  +
        deserializer.read_struct(&GETPARAMETERSBYPATHOUTPUT_SCHEMA, &mut |member, deser| {
         114  +
            match member.member_index() {
         115  +
                Some(0) => {
         116  +
                    if deser.is_null() {
         117  +
                        deser.read_null()?;
         118  +
                    } else {
         119  +
                        builder.parameters = Some({
         120  +
                            let mut container = Vec::new();
         121  +
                            deser.read_list(member, &mut |deser| {
         122  +
                                container.push(crate::types::Parameter::deserialize(deser)?);
         123  +
                                Ok(())
         124  +
                            })?;
         125  +
                            container
         126  +
                        });
         127  +
                    }
         128  +
                }
         129  +
                Some(1) => {
         130  +
                    if deser.is_null() {
         131  +
                        deser.read_null()?;
         132  +
                    } else {
         133  +
                        builder.next_token = Some(deser.read_string(member)?);
         134  +
                    }
         135  +
                }
         136  +
                Some(2) => {
         137  +
                    builder._request_id = Some(deser.read_string(member)?);
         138  +
                }
         139  +
                _ => {}
         140  +
            }
         141  +
            Ok(())
         142  +
        })?;
         143  +
        Ok(builder.build())
         144  +
    }
         145  +
}
         146  +
impl GetParametersByPathOutput {
         147  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         148  +
    /// Header-bound members are read directly from headers, avoiding runtime
         149  +
    /// member iteration overhead. Body members are read via the deserializer.
         150  +
    pub fn deserialize_with_response(
         151  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         152  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         153  +
        _status: u16,
         154  +
        _body: &[u8],
         155  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         156  +
        #[allow(unused_variables, unused_mut)]
         157  +
        let mut builder = Self::builder();
         158  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         159  +
            builder._request_id = Some(val.to_string());
         160  +
        }
         161  +
         162  +
        #[allow(
         163  +
            unused_variables,
         164  +
            unreachable_code,
         165  +
            clippy::single_match,
         166  +
            clippy::match_single_binding,
         167  +
            clippy::diverging_sub_expression
         168  +
        )]
         169  +
        deserializer.read_struct(&GETPARAMETERSBYPATHOUTPUT_SCHEMA, &mut |member, deser| {
         170  +
            match member.member_index() {
         171  +
                Some(0) => {
         172  +
                    builder.parameters = Some({
         173  +
                        let mut container = Vec::new();
         174  +
                        deser.read_list(member, &mut |deser| {
         175  +
                            container.push(crate::types::Parameter::deserialize(deser)?);
         176  +
                            Ok(())
         177  +
                        })?;
         178  +
                        container
         179  +
                    });
         180  +
                }
         181  +
                Some(1) => {
         182  +
                    builder.next_token = Some(deser.read_string(member)?);
         183  +
                }
         184  +
                _ => {}
         185  +
            }
         186  +
            Ok(())
         187  +
        })?;
         188  +
        Ok(builder.build())
         189  +
    }
         190  +
}
         191  +
impl ::aws_types::request_id::RequestId for GetParametersByPathOutput {
         192  +
    fn request_id(&self) -> Option<&str> {
         193  +
        self._request_id.as_deref()
         194  +
    }
         195  +
}
         196  +
impl GetParametersByPathOutput {
         197  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         198  +
        self._request_id = request_id;
         199  +
        self
         200  +
    }
         201  +
}
         202  +
impl GetParametersByPathOutput {
         203  +
    /// Creates a new builder-style object to manufacture [`GetParametersByPathOutput`](crate::operation::get_parameters_by_path::GetParametersByPathOutput).
         204  +
    pub fn builder() -> crate::operation::get_parameters_by_path::builders::GetParametersByPathOutputBuilder {
         205  +
        crate::operation::get_parameters_by_path::builders::GetParametersByPathOutputBuilder::default()
         206  +
    }
         207  +
}
         208  +
         209  +
/// A builder for [`GetParametersByPathOutput`](crate::operation::get_parameters_by_path::GetParametersByPathOutput).
         210  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         211  +
#[non_exhaustive]
         212  +
pub struct GetParametersByPathOutputBuilder {
         213  +
    pub(crate) parameters: ::std::option::Option<::std::vec::Vec<crate::types::Parameter>>,
         214  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         215  +
    _request_id: Option<String>,
         216  +
}
         217  +
impl GetParametersByPathOutputBuilder {
         218  +
    /// Appends an item to `parameters`.
         219  +
    ///
         220  +
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
         221  +
    ///
         222  +
    /// <p>A list of parameters found in the specified hierarchy.</p>
         223  +
    pub fn parameters(mut self, input: crate::types::Parameter) -> Self {
         224  +
        let mut v = self.parameters.unwrap_or_default();
         225  +
        v.push(input);
         226  +
        self.parameters = ::std::option::Option::Some(v);
         227  +
        self
         228  +
    }
         229  +
    /// <p>A list of parameters found in the specified hierarchy.</p>
         230  +
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Parameter>>) -> Self {
         231  +
        self.parameters = input;
         232  +
        self
         233  +
    }
         234  +
    /// <p>A list of parameters found in the specified hierarchy.</p>
         235  +
    pub fn get_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Parameter>> {
         236  +
        &self.parameters
         237  +
    }
         238  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
         239  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         240  +
        self.next_token = ::std::option::Option::Some(input.into());
         241  +
        self
         242  +
    }
         243  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
         244  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         245  +
        self.next_token = input;
         246  +
        self
         247  +
    }
         248  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
         249  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         250  +
        &self.next_token
         251  +
    }
         252  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         253  +
        self._request_id = Some(request_id.into());
         254  +
        self
         255  +
    }
         256  +
         257  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         258  +
        self._request_id = request_id;
         259  +
        self
         260  +
    }
         261  +
    /// Consumes the builder and constructs a [`GetParametersByPathOutput`](crate::operation::get_parameters_by_path::GetParametersByPathOutput).
         262  +
    pub fn build(self) -> crate::operation::get_parameters_by_path::GetParametersByPathOutput {
         263  +
        crate::operation::get_parameters_by_path::GetParametersByPathOutput {
         264  +
            parameters: self.parameters,
         265  +
            next_token: self.next_token,
         266  +
            _request_id: self._request_id,
         267  +
        }
         268  +
    }
         269  +
}

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

@@ -0,1 +0,223 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::get_parameters_by_path::_get_parameters_by_path_input::GetParametersByPathInputBuilder;
           3  +
           4  +
pub use crate::operation::get_parameters_by_path::_get_parameters_by_path_output::GetParametersByPathOutputBuilder;
           5  +
           6  +
impl crate::operation::get_parameters_by_path::builders::GetParametersByPathInputBuilder {
           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::get_parameters_by_path::GetParametersByPathOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::get_parameters_by_path::GetParametersByPathError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.get_parameters_by_path();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `GetParametersByPath`.
          24  +
///
          25  +
/// <p>Retrieve information about one or more parameters under a specified level in a hierarchy.</p>
          26  +
/// <p>Request results are returned on a best-effort basis. If you specify <code>MaxResults</code> in the request, the response includes information up to the limit specified. The number of items returned, however, can be between zero and the value of <code>MaxResults</code>. If the service reaches an internal limit while processing the results, it stops the operation and returns the matching values up to that point and a <code>NextToken</code>. You can specify the <code>NextToken</code> in a subsequent call to get the next set of results.</p>
          27  +
/// <p>Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a <code>ValidationException</code> error.</p>
          28  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          29  +
pub struct GetParametersByPathFluentBuilder {
          30  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          31  +
    inner: crate::operation::get_parameters_by_path::builders::GetParametersByPathInputBuilder,
          32  +
    config_override: ::std::option::Option<crate::config::Builder>,
          33  +
}
          34  +
impl
          35  +
    crate::client::customize::internal::CustomizableSend<
          36  +
        crate::operation::get_parameters_by_path::GetParametersByPathOutput,
          37  +
        crate::operation::get_parameters_by_path::GetParametersByPathError,
          38  +
    > for GetParametersByPathFluentBuilder
          39  +
{
          40  +
    fn send(
          41  +
        self,
          42  +
        config_override: crate::config::Builder,
          43  +
    ) -> crate::client::customize::internal::BoxFuture<
          44  +
        crate::client::customize::internal::SendResult<
          45  +
            crate::operation::get_parameters_by_path::GetParametersByPathOutput,
          46  +
            crate::operation::get_parameters_by_path::GetParametersByPathError,
          47  +
        >,
          48  +
    > {
          49  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          50  +
    }
          51  +
}
          52  +
impl GetParametersByPathFluentBuilder {
          53  +
    /// Creates a new `GetParametersByPathFluentBuilder`.
          54  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          55  +
        Self {
          56  +
            handle,
          57  +
            inner: ::std::default::Default::default(),
          58  +
            config_override: ::std::option::Option::None,
          59  +
        }
          60  +
    }
          61  +
    /// Access the GetParametersByPath as a reference.
          62  +
    pub fn as_input(&self) -> &crate::operation::get_parameters_by_path::builders::GetParametersByPathInputBuilder {
          63  +
        &self.inner
          64  +
    }
          65  +
    /// Sends the request and returns the response.
          66  +
    ///
          67  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          68  +
    /// can be matched against.
          69  +
    ///
          70  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          71  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          72  +
    /// set when configuring the client.
          73  +
    pub async fn send(
          74  +
        self,
          75  +
    ) -> ::std::result::Result<
          76  +
        crate::operation::get_parameters_by_path::GetParametersByPathOutput,
          77  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          78  +
            crate::operation::get_parameters_by_path::GetParametersByPathError,
          79  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          80  +
        >,
          81  +
    > {
          82  +
        let input = self
          83  +
            .inner
          84  +
            .build()
          85  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          86  +
        let runtime_plugins = crate::operation::get_parameters_by_path::GetParametersByPath::operation_runtime_plugins(
          87  +
            self.handle.runtime_plugins.clone(),
          88  +
            &self.handle.conf,
          89  +
            self.config_override,
          90  +
        );
          91  +
        crate::operation::get_parameters_by_path::GetParametersByPath::orchestrate(&runtime_plugins, input).await
          92  +
    }
          93  +
          94  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          95  +
    pub fn customize(
          96  +
        self,
          97  +
    ) -> crate::client::customize::CustomizableOperation<
          98  +
        crate::operation::get_parameters_by_path::GetParametersByPathOutput,
          99  +
        crate::operation::get_parameters_by_path::GetParametersByPathError,
         100  +
        Self,
         101  +
    > {
         102  +
        crate::client::customize::CustomizableOperation::new(self)
         103  +
    }
         104  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         105  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         106  +
        self
         107  +
    }
         108  +
         109  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         110  +
        self.config_override = config_override;
         111  +
        self
         112  +
    }
         113  +
    /// Create a paginator for this request
         114  +
    ///
         115  +
    /// Paginators are used by calling [`send().await`](crate::operation::get_parameters_by_path::paginator::GetParametersByPathPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         116  +
    pub fn into_paginator(self) -> crate::operation::get_parameters_by_path::paginator::GetParametersByPathPaginator {
         117  +
        crate::operation::get_parameters_by_path::paginator::GetParametersByPathPaginator::new(self.handle, self.inner)
         118  +
    }
         119  +
    /// <p>The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. For the API call to succeed, the last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Here is an example of a hierarchy: <code>/Finance/Prod/IAD/WinServ2016/license33 </code></p>
         120  +
    pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         121  +
        self.inner = self.inner.path(input.into());
         122  +
        self
         123  +
    }
         124  +
    /// <p>The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. For the API call to succeed, the last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Here is an example of a hierarchy: <code>/Finance/Prod/IAD/WinServ2016/license33 </code></p>
         125  +
    pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         126  +
        self.inner = self.inner.set_path(input);
         127  +
        self
         128  +
    }
         129  +
    /// <p>The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. For the API call to succeed, the last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Here is an example of a hierarchy: <code>/Finance/Prod/IAD/WinServ2016/license33 </code></p>
         130  +
    pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
         131  +
        self.inner.get_path()
         132  +
    }
         133  +
    /// <p>Retrieve all parameters within a hierarchy.</p><important>
         134  +
    /// <p>If a user has access to a path, then the user can access all levels of that path. For example, if a user has permission to access path <code>/a</code>, then the user can also access <code>/a/b</code>. Even if a user has explicitly been denied access in IAM for parameter <code>/a/b</code>, they can still call the GetParametersByPath API operation recursively for <code>/a</code> and view <code>/a/b</code>.</p>
         135  +
    /// </important>
         136  +
    pub fn recursive(mut self, input: bool) -> Self {
         137  +
        self.inner = self.inner.recursive(input);
         138  +
        self
         139  +
    }
         140  +
    /// <p>Retrieve all parameters within a hierarchy.</p><important>
         141  +
    /// <p>If a user has access to a path, then the user can access all levels of that path. For example, if a user has permission to access path <code>/a</code>, then the user can also access <code>/a/b</code>. Even if a user has explicitly been denied access in IAM for parameter <code>/a/b</code>, they can still call the GetParametersByPath API operation recursively for <code>/a</code> and view <code>/a/b</code>.</p>
         142  +
    /// </important>
         143  +
    pub fn set_recursive(mut self, input: ::std::option::Option<bool>) -> Self {
         144  +
        self.inner = self.inner.set_recursive(input);
         145  +
        self
         146  +
    }
         147  +
    /// <p>Retrieve all parameters within a hierarchy.</p><important>
         148  +
    /// <p>If a user has access to a path, then the user can access all levels of that path. For example, if a user has permission to access path <code>/a</code>, then the user can also access <code>/a/b</code>. Even if a user has explicitly been denied access in IAM for parameter <code>/a/b</code>, they can still call the GetParametersByPath API operation recursively for <code>/a</code> and view <code>/a/b</code>.</p>
         149  +
    /// </important>
         150  +
    pub fn get_recursive(&self) -> &::std::option::Option<bool> {
         151  +
        self.inner.get_recursive()
         152  +
    }
         153  +
    ///
         154  +
    /// Appends an item to `ParameterFilters`.
         155  +
    ///
         156  +
    /// To override the contents of this collection use [`set_parameter_filters`](Self::set_parameter_filters).
         157  +
    ///
         158  +
    /// <p>Filters to limit the request results.</p><note>
         159  +
    /// <p>The following <code>Key</code> values are supported for <code>GetParametersByPath</code>: <code>Type</code>, <code>KeyId</code>, and <code>Label</code>.</p>
         160  +
    /// <p>The following <code>Key</code> values aren't supported for <code>GetParametersByPath</code>: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
         161  +
    /// </note>
         162  +
    pub fn parameter_filters(mut self, input: crate::types::ParameterStringFilter) -> Self {
         163  +
        self.inner = self.inner.parameter_filters(input);
         164  +
        self
         165  +
    }
         166  +
    /// <p>Filters to limit the request results.</p><note>
         167  +
    /// <p>The following <code>Key</code> values are supported for <code>GetParametersByPath</code>: <code>Type</code>, <code>KeyId</code>, and <code>Label</code>.</p>
         168  +
    /// <p>The following <code>Key</code> values aren't supported for <code>GetParametersByPath</code>: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
         169  +
    /// </note>
         170  +
    pub fn set_parameter_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>>) -> Self {
         171  +
        self.inner = self.inner.set_parameter_filters(input);
         172  +
        self
         173  +
    }
         174  +
    /// <p>Filters to limit the request results.</p><note>
         175  +
    /// <p>The following <code>Key</code> values are supported for <code>GetParametersByPath</code>: <code>Type</code>, <code>KeyId</code>, and <code>Label</code>.</p>
         176  +
    /// <p>The following <code>Key</code> values aren't supported for <code>GetParametersByPath</code>: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
         177  +
    /// </note>
         178  +
    pub fn get_parameter_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>> {
         179  +
        self.inner.get_parameter_filters()
         180  +
    }
         181  +
    /// <p>Retrieve all parameters in a hierarchy with their value decrypted.</p>
         182  +
    pub fn with_decryption(mut self, input: bool) -> Self {
         183  +
        self.inner = self.inner.with_decryption(input);
         184  +
        self
         185  +
    }
         186  +
    /// <p>Retrieve all parameters in a hierarchy with their value decrypted.</p>
         187  +
    pub fn set_with_decryption(mut self, input: ::std::option::Option<bool>) -> Self {
         188  +
        self.inner = self.inner.set_with_decryption(input);
         189  +
        self
         190  +
    }
         191  +
    /// <p>Retrieve all parameters in a hierarchy with their value decrypted.</p>
         192  +
    pub fn get_with_decryption(&self) -> &::std::option::Option<bool> {
         193  +
        self.inner.get_with_decryption()
         194  +
    }
         195  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         196  +
    pub fn max_results(mut self, input: i32) -> Self {
         197  +
        self.inner = self.inner.max_results(input);
         198  +
        self
         199  +
    }
         200  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         201  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         202  +
        self.inner = self.inner.set_max_results(input);
         203  +
        self
         204  +
    }
         205  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         206  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         207  +
        self.inner.get_max_results()
         208  +
    }
         209  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         210  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         211  +
        self.inner = self.inner.next_token(input.into());
         212  +
        self
         213  +
    }
         214  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         215  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         216  +
        self.inner = self.inner.set_next_token(input);
         217  +
        self
         218  +
    }
         219  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         220  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         221  +
        self.inner.get_next_token()
         222  +
    }
         223  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/get_parameters_by_path/paginator.rs

@@ -0,1 +0,109 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`GetParametersByPath`](crate::operation::get_parameters_by_path::GetParametersByPath)
           3  +
pub struct GetParametersByPathPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::get_parameters_by_path::builders::GetParametersByPathInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl GetParametersByPathPaginator {
          10  +
    /// Create a new paginator-wrapper
          11  +
    pub(crate) fn new(
          12  +
        handle: std::sync::Arc<crate::client::Handle>,
          13  +
        builder: crate::operation::get_parameters_by_path::builders::GetParametersByPathInputBuilder,
          14  +
    ) -> Self {
          15  +
        Self {
          16  +
            handle,
          17  +
            builder,
          18  +
            stop_on_duplicate_token: true,
          19  +
        }
          20  +
    }
          21  +
          22  +
    /// Set the page size
          23  +
    ///
          24  +
    /// _Note: this method will override any previously set value for `max_results`_
          25  +
    pub fn page_size(mut self, limit: i32) -> Self {
          26  +
        self.builder.max_results = ::std::option::Option::Some(limit);
          27  +
        self
          28  +
    }
          29  +
          30  +
    /// Stop paginating when the service returns the same pagination token twice in a row.
          31  +
    ///
          32  +
    /// Defaults to true.
          33  +
    ///
          34  +
    /// For certain operations, it may be useful to continue on duplicate token. For example,
          35  +
    /// if an operation is for tailing a log file in real-time, then continuing may be desired.
          36  +
    /// This option can be set to `false` to accommodate these use cases.
          37  +
    pub fn stop_on_duplicate_token(mut self, stop_on_duplicate_token: bool) -> Self {
          38  +
        self.stop_on_duplicate_token = stop_on_duplicate_token;
          39  +
        self
          40  +
    }
          41  +
          42  +
    /// Create the pagination stream
          43  +
    ///
          44  +
    /// _Note:_ No requests will be dispatched until the stream is used
          45  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
          46  +
    pub fn send(
          47  +
        self,
          48  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
          49  +
        ::std::result::Result<
          50  +
            crate::operation::get_parameters_by_path::GetParametersByPathOutput,
          51  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          52  +
                crate::operation::get_parameters_by_path::GetParametersByPathError,
          53  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          54  +
            >,
          55  +
        >,
          56  +
    > {
          57  +
        // Move individual fields out of self for the borrow checker
          58  +
        let builder = self.builder;
          59  +
        let handle = self.handle;
          60  +
        let runtime_plugins = crate::operation::get_parameters_by_path::GetParametersByPath::operation_runtime_plugins(
          61  +
            handle.runtime_plugins.clone(),
          62  +
            &handle.conf,
          63  +
            ::std::option::Option::None,
          64  +
        )
          65  +
        .with_operation_plugin(crate::sdk_feature_tracker::paginator::PaginatorFeatureTrackerRuntimePlugin::new());
          66  +
        ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new(
          67  +
            move |tx| {
          68  +
                ::std::boxed::Box::pin(async move {
          69  +
                    // Build the input for the first time. If required fields are missing, this is where we'll produce an early error.
          70  +
                    let mut input = match builder
          71  +
                        .build()
          72  +
                        .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
          73  +
                    {
          74  +
                        ::std::result::Result::Ok(input) => input,
          75  +
                        ::std::result::Result::Err(e) => {
          76  +
                            let _ = tx.send(::std::result::Result::Err(e)).await;
          77  +
                            return;
          78  +
                        }
          79  +
                    };
          80  +
                    loop {
          81  +
                        let resp = crate::operation::get_parameters_by_path::GetParametersByPath::orchestrate(&runtime_plugins, input.clone()).await;
          82  +
                        // If the input member is None or it was an error
          83  +
                        let done = match resp {
          84  +
                            ::std::result::Result::Ok(ref resp) => {
          85  +
                                let new_token = crate::lens::reflens_get_parameters_by_path_output_output_next_token(resp);
          86  +
                                // Pagination is exhausted when the next token is an empty string
          87  +
                                let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
          88  +
                                if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token {
          89  +
                                    true
          90  +
                                } else {
          91  +
                                    input.next_token = new_token.cloned();
          92  +
                                    is_empty
          93  +
                                }
          94  +
                            }
          95  +
                            ::std::result::Result::Err(_) => true,
          96  +
                        };
          97  +
                        if tx.send(resp).await.is_err() {
          98  +
                            // receiving end was dropped
          99  +
                            return;
         100  +
                        }
         101  +
                        if done {
         102  +
                            return;
         103  +
                        }
         104  +
                    }
         105  +
                })
         106  +
            },
         107  +
        ))
         108  +
    }
         109  +
}