1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetPlaceInput {
/// <p>The name of the place index resource that you want to use for the search.</p>
pub index_name: ::std::option::Option<::std::string::String>,
/// <p>The identifier of the place to find.</p>
pub place_id: ::std::option::Option<::std::string::String>,
/// <p>The preferred language used to return results. The value must be a valid <a href="https://tools.ietf.org/search/bcp47">BCP 47</a> language tag, for example, <code>en</code> for English.</p>
/// <p>This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.</p>
/// <p>For an example, we'll use the Greek language. You search for a location around Athens, Greece, with the <code>language</code> parameter set to <code>en</code>. The <code>city</code> in the results will most likely be returned as <code>Athens</code>.</p>
/// <p>If you set the <code>language</code> parameter to <code>el</code>, for Greek, then the <code>city</code> in the results will more likely be returned as <code>Αθήνα</code>.</p>
/// <p>If the data provider does not have a value for Greek, the result will be in a language that the provider does support.</p>
pub language: ::std::option::Option<::std::string::String>,
/// <p>The optional <a href="https://docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
pub key: ::std::option::Option<::std::string::String>,
}
impl GetPlaceInput {
/// <p>The name of the place index resource that you want to use for the search.</p>
pub fn index_name(&self) -> ::std::option::Option<&str> {
self.index_name.as_deref()
}
/// <p>The identifier of the place to find.</p>
pub fn place_id(&self) -> ::std::option::Option<&str> {
self.place_id.as_deref()
}
/// <p>The preferred language used to return results. The value must be a valid <a href="https://tools.ietf.org/search/bcp47">BCP 47</a> language tag, for example, <code>en</code> for English.</p>
/// <p>This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.</p>
/// <p>For an example, we'll use the Greek language. You search for a location around Athens, Greece, with the <code>language</code> parameter set to <code>en</code>. The <code>city</code> in the results will most likely be returned as <code>Athens</code>.</p>
/// <p>If you set the <code>language</code> parameter to <code>el</code>, for Greek, then the <code>city</code> in the results will more likely be returned as <code>Αθήνα</code>.</p>
/// <p>If the data provider does not have a value for Greek, the result will be in a language that the provider does support.</p>
pub fn language(&self) -> ::std::option::Option<&str> {
self.language.as_deref()
}
/// <p>The optional <a href="https://docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
pub fn key(&self) -> ::std::option::Option<&str> {
self.key.as_deref()
}
}
impl ::std::fmt::Debug for GetPlaceInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetPlaceInput");
formatter.field("index_name", &self.index_name);
formatter.field("place_id", &self.place_id);
formatter.field("language", &self.language);
formatter.field("key", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl GetPlaceInput {
/// Creates a new builder-style object to manufacture [`GetPlaceInput`](crate::operation::get_place::GetPlaceInput).
pub fn builder() -> crate::operation::get_place::builders::GetPlaceInputBuilder {
crate::operation::get_place::builders::GetPlaceInputBuilder::default()
}
}
/// A builder for [`GetPlaceInput`](crate::operation::get_place::GetPlaceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetPlaceInputBuilder {
pub(crate) index_name: ::std::option::Option<::std::string::String>,
pub(crate) place_id: ::std::option::Option<::std::string::String>,
pub(crate) language: ::std::option::Option<::std::string::String>,
pub(crate) key: ::std::option::Option<::std::string::String>,
}
impl GetPlaceInputBuilder {
/// <p>The name of the place index resource that you want to use for the search.</p>
/// This field is required.
pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.index_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the place index resource that you want to use for the search.</p>
pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.index_name = input;
self
}
/// <p>The name of the place index resource that you want to use for the search.</p>
pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
&self.index_name
}
/// <p>The identifier of the place to find.</p>
/// This field is required.
pub fn place_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.place_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the place to find.</p>
pub fn set_place_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.place_id = input;
self
}
/// <p>The identifier of the place to find.</p>
pub fn get_place_id(&self) -> &::std::option::Option<::std::string::String> {
&self.place_id
}
/// <p>The preferred language used to return results. The value must be a valid <a href="https://tools.ietf.org/search/bcp47">BCP 47</a> language tag, for example, <code>en</code> for English.</p>
/// <p>This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.</p>
/// <p>For an example, we'll use the Greek language. You search for a location around Athens, Greece, with the <code>language</code> parameter set to <code>en</code>. The <code>city</code> in the results will most likely be returned as <code>Athens</code>.</p>
/// <p>If you set the <code>language</code> parameter to <code>el</code>, for Greek, then the <code>city</code> in the results will more likely be returned as <code>Αθήνα</code>.</p>
/// <p>If the data provider does not have a value for Greek, the result will be in a language that the provider does support.</p>
pub fn language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.language = ::std::option::Option::Some(input.into());
self
}
/// <p>The preferred language used to return results. The value must be a valid <a href="https://tools.ietf.org/search/bcp47">BCP 47</a> language tag, for example, <code>en</code> for English.</p>
/// <p>This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.</p>
/// <p>For an example, we'll use the Greek language. You search for a location around Athens, Greece, with the <code>language</code> parameter set to <code>en</code>. The <code>city</code> in the results will most likely be returned as <code>Athens</code>.</p>
/// <p>If you set the <code>language</code> parameter to <code>el</code>, for Greek, then the <code>city</code> in the results will more likely be returned as <code>Αθήνα</code>.</p>
/// <p>If the data provider does not have a value for Greek, the result will be in a language that the provider does support.</p>
pub fn set_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.language = input;
self
}
/// <p>The preferred language used to return results. The value must be a valid <a href="https://tools.ietf.org/search/bcp47">BCP 47</a> language tag, for example, <code>en</code> for English.</p>
/// <p>This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.</p>
/// <p>For an example, we'll use the Greek language. You search for a location around Athens, Greece, with the <code>language</code> parameter set to <code>en</code>. The <code>city</code> in the results will most likely be returned as <code>Athens</code>.</p>
/// <p>If you set the <code>language</code> parameter to <code>el</code>, for Greek, then the <code>city</code> in the results will more likely be returned as <code>Αθήνα</code>.</p>
/// <p>If the data provider does not have a value for Greek, the result will be in a language that the provider does support.</p>
pub fn get_language(&self) -> &::std::option::Option<::std::string::String> {
&self.language
}
/// <p>The optional <a href="https://docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key = ::std::option::Option::Some(input.into());
self
}
/// <p>The optional <a href="https://docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key = input;
self
}
/// <p>The optional <a href="https://docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
&self.key
}
/// Consumes the builder and constructs a [`GetPlaceInput`](crate::operation::get_place::GetPlaceInput).
pub fn build(self) -> ::std::result::Result<crate::operation::get_place::GetPlaceInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_place::GetPlaceInput {
index_name: self.index_name,
place_id: self.place_id,
language: self.language,
key: self.key,
})
}
}
impl ::std::fmt::Debug for GetPlaceInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetPlaceInputBuilder");
formatter.field("index_name", &self.index_name);
formatter.field("place_id", &self.place_id);
formatter.field("language", &self.language);
formatter.field("key", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}