Skip to main content

aws_sdk_glue/types/
_schema_id.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The unique ID of the schema in the Glue schema registry.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SchemaId {
7    /// <p>The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
8    pub schema_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
10    pub schema_name: ::std::option::Option<::std::string::String>,
11    /// <p>The name of the schema registry that contains the schema.</p>
12    pub registry_name: ::std::option::Option<::std::string::String>,
13}
14impl SchemaId {
15    /// <p>The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
16    pub fn schema_arn(&self) -> ::std::option::Option<&str> {
17        self.schema_arn.as_deref()
18    }
19    /// <p>The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
20    pub fn schema_name(&self) -> ::std::option::Option<&str> {
21        self.schema_name.as_deref()
22    }
23    /// <p>The name of the schema registry that contains the schema.</p>
24    pub fn registry_name(&self) -> ::std::option::Option<&str> {
25        self.registry_name.as_deref()
26    }
27}
28impl SchemaId {
29    /// Creates a new builder-style object to manufacture [`SchemaId`](crate::types::SchemaId).
30    pub fn builder() -> crate::types::builders::SchemaIdBuilder {
31        crate::types::builders::SchemaIdBuilder::default()
32    }
33}
34
35/// A builder for [`SchemaId`](crate::types::SchemaId).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct SchemaIdBuilder {
39    pub(crate) schema_arn: ::std::option::Option<::std::string::String>,
40    pub(crate) schema_name: ::std::option::Option<::std::string::String>,
41    pub(crate) registry_name: ::std::option::Option<::std::string::String>,
42}
43impl SchemaIdBuilder {
44    /// <p>The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
45    pub fn schema_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.schema_arn = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
50    pub fn set_schema_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.schema_arn = input;
52        self
53    }
54    /// <p>The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
55    pub fn get_schema_arn(&self) -> &::std::option::Option<::std::string::String> {
56        &self.schema_arn
57    }
58    /// <p>The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
59    pub fn schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.schema_name = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
64    pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.schema_name = input;
66        self
67    }
68    /// <p>The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
69    pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.schema_name
71    }
72    /// <p>The name of the schema registry that contains the schema.</p>
73    pub fn registry_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.registry_name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The name of the schema registry that contains the schema.</p>
78    pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.registry_name = input;
80        self
81    }
82    /// <p>The name of the schema registry that contains the schema.</p>
83    pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.registry_name
85    }
86    /// Consumes the builder and constructs a [`SchemaId`](crate::types::SchemaId).
87    pub fn build(self) -> crate::types::SchemaId {
88        crate::types::SchemaId {
89            schema_arn: self.schema_arn,
90            schema_name: self.schema_name,
91            registry_name: self.registry_name,
92        }
93    }
94}