aws_sdk_location/operation/update_map/
_update_map_input.rs

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)]
5pub struct UpdateMapInput {
6    /// <p>The name of the map resource to update.</p>
7    pub map_name: ::std::option::Option<::std::string::String>,
8    /// <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
9    #[deprecated(note = "Deprecated. If included, the only allowed value is RequestBasedUsage.", since = "2022-02-01")]
10    pub pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
11    /// <p>Updates the description for the map resource.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13    /// <p>Updates the parts of the map configuration that can be updated, including the political view.</p>
14    pub configuration_update: ::std::option::Option<crate::types::MapConfigurationUpdate>,
15}
16impl UpdateMapInput {
17    /// <p>The name of the map resource to update.</p>
18    pub fn map_name(&self) -> ::std::option::Option<&str> {
19        self.map_name.as_deref()
20    }
21    /// <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
22    #[deprecated(note = "Deprecated. If included, the only allowed value is RequestBasedUsage.", since = "2022-02-01")]
23    pub fn pricing_plan(&self) -> ::std::option::Option<&crate::types::PricingPlan> {
24        self.pricing_plan.as_ref()
25    }
26    /// <p>Updates the description for the map resource.</p>
27    pub fn description(&self) -> ::std::option::Option<&str> {
28        self.description.as_deref()
29    }
30    /// <p>Updates the parts of the map configuration that can be updated, including the political view.</p>
31    pub fn configuration_update(&self) -> ::std::option::Option<&crate::types::MapConfigurationUpdate> {
32        self.configuration_update.as_ref()
33    }
34}
35impl UpdateMapInput {
36    /// Creates a new builder-style object to manufacture [`UpdateMapInput`](crate::operation::update_map::UpdateMapInput).
37    pub fn builder() -> crate::operation::update_map::builders::UpdateMapInputBuilder {
38        crate::operation::update_map::builders::UpdateMapInputBuilder::default()
39    }
40}
41
42/// A builder for [`UpdateMapInput`](crate::operation::update_map::UpdateMapInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct UpdateMapInputBuilder {
46    pub(crate) map_name: ::std::option::Option<::std::string::String>,
47    pub(crate) pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
48    pub(crate) description: ::std::option::Option<::std::string::String>,
49    pub(crate) configuration_update: ::std::option::Option<crate::types::MapConfigurationUpdate>,
50}
51impl UpdateMapInputBuilder {
52    /// <p>The name of the map resource to update.</p>
53    /// This field is required.
54    pub fn map_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.map_name = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The name of the map resource to update.</p>
59    pub fn set_map_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.map_name = input;
61        self
62    }
63    /// <p>The name of the map resource to update.</p>
64    pub fn get_map_name(&self) -> &::std::option::Option<::std::string::String> {
65        &self.map_name
66    }
67    /// <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
68    #[deprecated(note = "Deprecated. If included, the only allowed value is RequestBasedUsage.", since = "2022-02-01")]
69    pub fn pricing_plan(mut self, input: crate::types::PricingPlan) -> Self {
70        self.pricing_plan = ::std::option::Option::Some(input);
71        self
72    }
73    /// <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
74    #[deprecated(note = "Deprecated. If included, the only allowed value is RequestBasedUsage.", since = "2022-02-01")]
75    pub fn set_pricing_plan(mut self, input: ::std::option::Option<crate::types::PricingPlan>) -> Self {
76        self.pricing_plan = input;
77        self
78    }
79    /// <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
80    #[deprecated(note = "Deprecated. If included, the only allowed value is RequestBasedUsage.", since = "2022-02-01")]
81    pub fn get_pricing_plan(&self) -> &::std::option::Option<crate::types::PricingPlan> {
82        &self.pricing_plan
83    }
84    /// <p>Updates the description for the map resource.</p>
85    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.description = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>Updates the description for the map resource.</p>
90    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.description = input;
92        self
93    }
94    /// <p>Updates the description for the map resource.</p>
95    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
96        &self.description
97    }
98    /// <p>Updates the parts of the map configuration that can be updated, including the political view.</p>
99    pub fn configuration_update(mut self, input: crate::types::MapConfigurationUpdate) -> Self {
100        self.configuration_update = ::std::option::Option::Some(input);
101        self
102    }
103    /// <p>Updates the parts of the map configuration that can be updated, including the political view.</p>
104    pub fn set_configuration_update(mut self, input: ::std::option::Option<crate::types::MapConfigurationUpdate>) -> Self {
105        self.configuration_update = input;
106        self
107    }
108    /// <p>Updates the parts of the map configuration that can be updated, including the political view.</p>
109    pub fn get_configuration_update(&self) -> &::std::option::Option<crate::types::MapConfigurationUpdate> {
110        &self.configuration_update
111    }
112    /// Consumes the builder and constructs a [`UpdateMapInput`](crate::operation::update_map::UpdateMapInput).
113    pub fn build(self) -> ::std::result::Result<crate::operation::update_map::UpdateMapInput, ::aws_smithy_types::error::operation::BuildError> {
114        ::std::result::Result::Ok(crate::operation::update_map::UpdateMapInput {
115            map_name: self.map_name,
116            pricing_plan: self.pricing_plan,
117            description: self.description,
118            configuration_update: self.configuration_update,
119        })
120    }
121}