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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetPlaceInput {
/// <p>The name of the place index resource that you want to use for the search.</p>
#[doc(hidden)]
pub index_name: std::option::Option<std::string::String>,
/// <p>The identifier of the place to find.</p>
#[doc(hidden)]
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>
#[doc(hidden)]
pub language: 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()
}
}
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).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
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>,
}
impl GetPlaceInputBuilder {
/// <p>The name of the place index resource that you want to use for the search.</p>
pub fn index_name(mut self, input: impl Into<std::string::String>) -> Self {
self.index_name = 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 identifier of the place to find.</p>
pub fn place_id(mut self, input: impl Into<std::string::String>) -> Self {
self.place_id = 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 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 Into<std::string::String>) -> Self {
self.language = 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
}
/// Consumes the builder and constructs a [`GetPlaceInput`](crate::operation::get_place::GetPlaceInput).
pub fn build(
self,
) -> Result<
crate::operation::get_place::GetPlaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::get_place::GetPlaceInput {
index_name: self.index_name,
place_id: self.place_id,
language: self.language,
})
}
}