aws_sdk_glue/operation/get_user_defined_function/
_get_user_defined_function_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 GetUserDefinedFunctionInput {
6    /// <p>The ID of the Data Catalog where the function to be retrieved is located. If none is provided, the Amazon Web Services account ID is used by default.</p>
7    pub catalog_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the catalog database where the function is located.</p>
9    pub database_name: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the function.</p>
11    pub function_name: ::std::option::Option<::std::string::String>,
12}
13impl GetUserDefinedFunctionInput {
14    /// <p>The ID of the Data Catalog where the function to be retrieved is located. If none is provided, the Amazon Web Services account ID is used by default.</p>
15    pub fn catalog_id(&self) -> ::std::option::Option<&str> {
16        self.catalog_id.as_deref()
17    }
18    /// <p>The name of the catalog database where the function is located.</p>
19    pub fn database_name(&self) -> ::std::option::Option<&str> {
20        self.database_name.as_deref()
21    }
22    /// <p>The name of the function.</p>
23    pub fn function_name(&self) -> ::std::option::Option<&str> {
24        self.function_name.as_deref()
25    }
26}
27impl GetUserDefinedFunctionInput {
28    /// Creates a new builder-style object to manufacture [`GetUserDefinedFunctionInput`](crate::operation::get_user_defined_function::GetUserDefinedFunctionInput).
29    pub fn builder() -> crate::operation::get_user_defined_function::builders::GetUserDefinedFunctionInputBuilder {
30        crate::operation::get_user_defined_function::builders::GetUserDefinedFunctionInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetUserDefinedFunctionInput`](crate::operation::get_user_defined_function::GetUserDefinedFunctionInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetUserDefinedFunctionInputBuilder {
38    pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
39    pub(crate) database_name: ::std::option::Option<::std::string::String>,
40    pub(crate) function_name: ::std::option::Option<::std::string::String>,
41}
42impl GetUserDefinedFunctionInputBuilder {
43    /// <p>The ID of the Data Catalog where the function to be retrieved is located. If none is provided, the Amazon Web Services account ID is used by default.</p>
44    pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.catalog_id = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>The ID of the Data Catalog where the function to be retrieved is located. If none is provided, the Amazon Web Services account ID is used by default.</p>
49    pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.catalog_id = input;
51        self
52    }
53    /// <p>The ID of the Data Catalog where the function to be retrieved is located. If none is provided, the Amazon Web Services account ID is used by default.</p>
54    pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
55        &self.catalog_id
56    }
57    /// <p>The name of the catalog database where the function is located.</p>
58    /// This field is required.
59    pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.database_name = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The name of the catalog database where the function is located.</p>
64    pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.database_name = input;
66        self
67    }
68    /// <p>The name of the catalog database where the function is located.</p>
69    pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.database_name
71    }
72    /// <p>The name of the function.</p>
73    /// This field is required.
74    pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.function_name = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The name of the function.</p>
79    pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.function_name = input;
81        self
82    }
83    /// <p>The name of the function.</p>
84    pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
85        &self.function_name
86    }
87    /// Consumes the builder and constructs a [`GetUserDefinedFunctionInput`](crate::operation::get_user_defined_function::GetUserDefinedFunctionInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<
91        crate::operation::get_user_defined_function::GetUserDefinedFunctionInput,
92        ::aws_smithy_types::error::operation::BuildError,
93    > {
94        ::std::result::Result::Ok(crate::operation::get_user_defined_function::GetUserDefinedFunctionInput {
95            catalog_id: self.catalog_id,
96            database_name: self.database_name,
97            function_name: self.function_name,
98        })
99    }
100}