aws_sdk_schemas/operation/describe_schema/
_describe_schema_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 DescribeSchemaInput {
6    /// <p>The name of the registry.</p>
7    pub registry_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the schema.</p>
9    pub schema_name: ::std::option::Option<::std::string::String>,
10    /// <p>Specifying this limits the results to only this schema version.</p>
11    pub schema_version: ::std::option::Option<::std::string::String>,
12}
13impl DescribeSchemaInput {
14    /// <p>The name of the registry.</p>
15    pub fn registry_name(&self) -> ::std::option::Option<&str> {
16        self.registry_name.as_deref()
17    }
18    /// <p>The name of the schema.</p>
19    pub fn schema_name(&self) -> ::std::option::Option<&str> {
20        self.schema_name.as_deref()
21    }
22    /// <p>Specifying this limits the results to only this schema version.</p>
23    pub fn schema_version(&self) -> ::std::option::Option<&str> {
24        self.schema_version.as_deref()
25    }
26}
27impl DescribeSchemaInput {
28    /// Creates a new builder-style object to manufacture [`DescribeSchemaInput`](crate::operation::describe_schema::DescribeSchemaInput).
29    pub fn builder() -> crate::operation::describe_schema::builders::DescribeSchemaInputBuilder {
30        crate::operation::describe_schema::builders::DescribeSchemaInputBuilder::default()
31    }
32}
33
34/// A builder for [`DescribeSchemaInput`](crate::operation::describe_schema::DescribeSchemaInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DescribeSchemaInputBuilder {
38    pub(crate) registry_name: ::std::option::Option<::std::string::String>,
39    pub(crate) schema_name: ::std::option::Option<::std::string::String>,
40    pub(crate) schema_version: ::std::option::Option<::std::string::String>,
41}
42impl DescribeSchemaInputBuilder {
43    /// <p>The name of the registry.</p>
44    /// This field is required.
45    pub fn registry_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.registry_name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The name of the registry.</p>
50    pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.registry_name = input;
52        self
53    }
54    /// <p>The name of the registry.</p>
55    pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.registry_name
57    }
58    /// <p>The name of the schema.</p>
59    /// This field is required.
60    pub fn schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.schema_name = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The name of the schema.</p>
65    pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.schema_name = input;
67        self
68    }
69    /// <p>The name of the schema.</p>
70    pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
71        &self.schema_name
72    }
73    /// <p>Specifying this limits the results to only this schema version.</p>
74    pub fn schema_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.schema_version = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>Specifying this limits the results to only this schema version.</p>
79    pub fn set_schema_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.schema_version = input;
81        self
82    }
83    /// <p>Specifying this limits the results to only this schema version.</p>
84    pub fn get_schema_version(&self) -> &::std::option::Option<::std::string::String> {
85        &self.schema_version
86    }
87    /// Consumes the builder and constructs a [`DescribeSchemaInput`](crate::operation::describe_schema::DescribeSchemaInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::describe_schema::DescribeSchemaInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::describe_schema::DescribeSchemaInput {
92            registry_name: self.registry_name,
93            schema_name: self.schema_name,
94            schema_version: self.schema_version,
95        })
96    }
97}