aws-sdk-location 0.26.0

AWS SDK for Amazon Location Service
Documentation
// 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,
        })
    }
}