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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The unique ID of the schema in the Glue schema registry.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SchemaId {
/// <p>The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
pub schema_arn: ::std::option::Option<::std::string::String>,
/// <p>The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
pub schema_name: ::std::option::Option<::std::string::String>,
/// <p>The name of the schema registry that contains the schema.</p>
pub registry_name: ::std::option::Option<::std::string::String>,
}
impl SchemaId {
/// <p>The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
pub fn schema_arn(&self) -> ::std::option::Option<&str> {
self.schema_arn.as_deref()
}
/// <p>The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
pub fn schema_name(&self) -> ::std::option::Option<&str> {
self.schema_name.as_deref()
}
/// <p>The name of the schema registry that contains the schema.</p>
pub fn registry_name(&self) -> ::std::option::Option<&str> {
self.registry_name.as_deref()
}
}
impl SchemaId {
/// Creates a new builder-style object to manufacture [`SchemaId`](crate::types::SchemaId).
pub fn builder() -> crate::types::builders::SchemaIdBuilder {
crate::types::builders::SchemaIdBuilder::default()
}
}
/// A builder for [`SchemaId`](crate::types::SchemaId).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SchemaIdBuilder {
pub(crate) schema_arn: ::std::option::Option<::std::string::String>,
pub(crate) schema_name: ::std::option::Option<::std::string::String>,
pub(crate) registry_name: ::std::option::Option<::std::string::String>,
}
impl SchemaIdBuilder {
/// <p>The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
pub fn schema_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.schema_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
pub fn set_schema_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.schema_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
pub fn get_schema_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.schema_arn
}
/// <p>The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
pub fn schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.schema_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.schema_name = input;
self
}
/// <p>The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p>
pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
&self.schema_name
}
/// <p>The name of the schema registry that contains the schema.</p>
pub fn registry_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.registry_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the schema registry that contains the schema.</p>
pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.registry_name = input;
self
}
/// <p>The name of the schema registry that contains the schema.</p>
pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
&self.registry_name
}
/// Consumes the builder and constructs a [`SchemaId`](crate::types::SchemaId).
pub fn build(self) -> crate::types::SchemaId {
crate::types::SchemaId {
schema_arn: self.schema_arn,
schema_name: self.schema_name,
registry_name: self.registry_name,
}
}
}