#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Type {
#[allow(missing_docs)] JsonSchemaDraft4,
#[allow(missing_docs)] OpenApi3,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Type {
fn from(s: &str) -> Self {
match s {
"JSONSchemaDraft4" => Type::JsonSchemaDraft4,
"OpenApi3" => Type::OpenApi3,
other => Type::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for Type {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Type::from(s))
}
}
impl Type {
pub fn as_str(&self) -> &str {
match self {
Type::JsonSchemaDraft4 => "JSONSchemaDraft4",
Type::OpenApi3 => "OpenApi3",
Type::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["JSONSchemaDraft4", "OpenApi3"]
}
}
impl AsRef<str> for Type {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DiscovererState {
#[allow(missing_docs)] Started,
#[allow(missing_docs)] Stopped,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DiscovererState {
fn from(s: &str) -> Self {
match s {
"STARTED" => DiscovererState::Started,
"STOPPED" => DiscovererState::Stopped,
other => DiscovererState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for DiscovererState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DiscovererState::from(s))
}
}
impl DiscovererState {
pub fn as_str(&self) -> &str {
match self {
DiscovererState::Started => "STARTED",
DiscovererState::Stopped => "STOPPED",
DiscovererState::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["STARTED", "STOPPED"]
}
}
impl AsRef<str> for DiscovererState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SearchSchemaSummary {
#[doc(hidden)]
pub registry_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub schema_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub schema_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub schema_versions:
std::option::Option<std::vec::Vec<crate::model::SearchSchemaVersionSummary>>,
}
impl SearchSchemaSummary {
pub fn registry_name(&self) -> std::option::Option<&str> {
self.registry_name.as_deref()
}
pub fn schema_arn(&self) -> std::option::Option<&str> {
self.schema_arn.as_deref()
}
pub fn schema_name(&self) -> std::option::Option<&str> {
self.schema_name.as_deref()
}
pub fn schema_versions(
&self,
) -> std::option::Option<&[crate::model::SearchSchemaVersionSummary]> {
self.schema_versions.as_deref()
}
}
pub mod search_schema_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) registry_name: std::option::Option<std::string::String>,
pub(crate) schema_arn: std::option::Option<std::string::String>,
pub(crate) schema_name: std::option::Option<std::string::String>,
pub(crate) schema_versions:
std::option::Option<std::vec::Vec<crate::model::SearchSchemaVersionSummary>>,
}
impl Builder {
pub fn registry_name(mut self, input: impl Into<std::string::String>) -> Self {
self.registry_name = Some(input.into());
self
}
pub fn set_registry_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.registry_name = input;
self
}
pub fn schema_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.schema_arn = Some(input.into());
self
}
pub fn set_schema_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.schema_arn = input;
self
}
pub fn schema_name(mut self, input: impl Into<std::string::String>) -> Self {
self.schema_name = Some(input.into());
self
}
pub fn set_schema_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.schema_name = input;
self
}
pub fn schema_versions(mut self, input: crate::model::SearchSchemaVersionSummary) -> Self {
let mut v = self.schema_versions.unwrap_or_default();
v.push(input);
self.schema_versions = Some(v);
self
}
pub fn set_schema_versions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::SearchSchemaVersionSummary>>,
) -> Self {
self.schema_versions = input;
self
}
pub fn build(self) -> crate::model::SearchSchemaSummary {
crate::model::SearchSchemaSummary {
registry_name: self.registry_name,
schema_arn: self.schema_arn,
schema_name: self.schema_name,
schema_versions: self.schema_versions,
}
}
}
}
impl SearchSchemaSummary {
pub fn builder() -> crate::model::search_schema_summary::Builder {
crate::model::search_schema_summary::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SearchSchemaVersionSummary {
#[doc(hidden)]
pub created_date: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub schema_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::Type>,
}
impl SearchSchemaVersionSummary {
pub fn created_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_date.as_ref()
}
pub fn schema_version(&self) -> std::option::Option<&str> {
self.schema_version.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::Type> {
self.r#type.as_ref()
}
}
pub mod search_schema_version_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) created_date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) schema_version: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::Type>,
}
impl Builder {
pub fn created_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_date = Some(input);
self
}
pub fn set_created_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_date = input;
self
}
pub fn schema_version(mut self, input: impl Into<std::string::String>) -> Self {
self.schema_version = Some(input.into());
self
}
pub fn set_schema_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.schema_version = input;
self
}
pub fn r#type(mut self, input: crate::model::Type) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::Type>) -> Self {
self.r#type = input;
self
}
pub fn build(self) -> crate::model::SearchSchemaVersionSummary {
crate::model::SearchSchemaVersionSummary {
created_date: self.created_date,
schema_version: self.schema_version,
r#type: self.r#type,
}
}
}
}
impl SearchSchemaVersionSummary {
pub fn builder() -> crate::model::search_schema_version_summary::Builder {
crate::model::search_schema_version_summary::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CodeGenerationStatus {
#[allow(missing_docs)] CreateComplete,
#[allow(missing_docs)] CreateFailed,
#[allow(missing_docs)] CreateInProgress,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CodeGenerationStatus {
fn from(s: &str) -> Self {
match s {
"CREATE_COMPLETE" => CodeGenerationStatus::CreateComplete,
"CREATE_FAILED" => CodeGenerationStatus::CreateFailed,
"CREATE_IN_PROGRESS" => CodeGenerationStatus::CreateInProgress,
other => {
CodeGenerationStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for CodeGenerationStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CodeGenerationStatus::from(s))
}
}
impl CodeGenerationStatus {
pub fn as_str(&self) -> &str {
match self {
CodeGenerationStatus::CreateComplete => "CREATE_COMPLETE",
CodeGenerationStatus::CreateFailed => "CREATE_FAILED",
CodeGenerationStatus::CreateInProgress => "CREATE_IN_PROGRESS",
CodeGenerationStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["CREATE_COMPLETE", "CREATE_FAILED", "CREATE_IN_PROGRESS"]
}
}
impl AsRef<str> for CodeGenerationStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SchemaVersionSummary {
#[doc(hidden)]
pub schema_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub schema_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub schema_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::Type>,
}
impl SchemaVersionSummary {
pub fn schema_arn(&self) -> std::option::Option<&str> {
self.schema_arn.as_deref()
}
pub fn schema_name(&self) -> std::option::Option<&str> {
self.schema_name.as_deref()
}
pub fn schema_version(&self) -> std::option::Option<&str> {
self.schema_version.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::Type> {
self.r#type.as_ref()
}
}
pub mod schema_version_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) schema_arn: std::option::Option<std::string::String>,
pub(crate) schema_name: std::option::Option<std::string::String>,
pub(crate) schema_version: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::Type>,
}
impl Builder {
pub fn schema_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.schema_arn = Some(input.into());
self
}
pub fn set_schema_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.schema_arn = input;
self
}
pub fn schema_name(mut self, input: impl Into<std::string::String>) -> Self {
self.schema_name = Some(input.into());
self
}
pub fn set_schema_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.schema_name = input;
self
}
pub fn schema_version(mut self, input: impl Into<std::string::String>) -> Self {
self.schema_version = Some(input.into());
self
}
pub fn set_schema_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.schema_version = input;
self
}
pub fn r#type(mut self, input: crate::model::Type) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::Type>) -> Self {
self.r#type = input;
self
}
pub fn build(self) -> crate::model::SchemaVersionSummary {
crate::model::SchemaVersionSummary {
schema_arn: self.schema_arn,
schema_name: self.schema_name,
schema_version: self.schema_version,
r#type: self.r#type,
}
}
}
}
impl SchemaVersionSummary {
pub fn builder() -> crate::model::schema_version_summary::Builder {
crate::model::schema_version_summary::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SchemaSummary {
#[doc(hidden)]
pub last_modified: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub schema_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub schema_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub version_count: i64,
}
impl SchemaSummary {
pub fn last_modified(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_modified.as_ref()
}
pub fn schema_arn(&self) -> std::option::Option<&str> {
self.schema_arn.as_deref()
}
pub fn schema_name(&self) -> std::option::Option<&str> {
self.schema_name.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn version_count(&self) -> i64 {
self.version_count
}
}
pub mod schema_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) last_modified: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) schema_arn: std::option::Option<std::string::String>,
pub(crate) schema_name: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) version_count: std::option::Option<i64>,
}
impl Builder {
pub fn last_modified(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_modified = Some(input);
self
}
pub fn set_last_modified(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_modified = input;
self
}
pub fn schema_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.schema_arn = Some(input.into());
self
}
pub fn set_schema_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.schema_arn = input;
self
}
pub fn schema_name(mut self, input: impl Into<std::string::String>) -> Self {
self.schema_name = Some(input.into());
self
}
pub fn set_schema_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.schema_name = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn version_count(mut self, input: i64) -> Self {
self.version_count = Some(input);
self
}
pub fn set_version_count(mut self, input: std::option::Option<i64>) -> Self {
self.version_count = input;
self
}
pub fn build(self) -> crate::model::SchemaSummary {
crate::model::SchemaSummary {
last_modified: self.last_modified,
schema_arn: self.schema_arn,
schema_name: self.schema_name,
tags: self.tags,
version_count: self.version_count.unwrap_or_default(),
}
}
}
}
impl SchemaSummary {
pub fn builder() -> crate::model::schema_summary::Builder {
crate::model::schema_summary::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RegistrySummary {
#[doc(hidden)]
pub registry_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub registry_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl RegistrySummary {
pub fn registry_arn(&self) -> std::option::Option<&str> {
self.registry_arn.as_deref()
}
pub fn registry_name(&self) -> std::option::Option<&str> {
self.registry_name.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
pub mod registry_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) registry_arn: std::option::Option<std::string::String>,
pub(crate) registry_name: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn registry_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.registry_arn = Some(input.into());
self
}
pub fn set_registry_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.registry_arn = input;
self
}
pub fn registry_name(mut self, input: impl Into<std::string::String>) -> Self {
self.registry_name = Some(input.into());
self
}
pub fn set_registry_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.registry_name = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::RegistrySummary {
crate::model::RegistrySummary {
registry_arn: self.registry_arn,
registry_name: self.registry_name,
tags: self.tags,
}
}
}
}
impl RegistrySummary {
pub fn builder() -> crate::model::registry_summary::Builder {
crate::model::registry_summary::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DiscovererSummary {
#[doc(hidden)]
pub discoverer_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub discoverer_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub source_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub state: std::option::Option<crate::model::DiscovererState>,
#[doc(hidden)]
pub cross_account: bool,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl DiscovererSummary {
pub fn discoverer_arn(&self) -> std::option::Option<&str> {
self.discoverer_arn.as_deref()
}
pub fn discoverer_id(&self) -> std::option::Option<&str> {
self.discoverer_id.as_deref()
}
pub fn source_arn(&self) -> std::option::Option<&str> {
self.source_arn.as_deref()
}
pub fn state(&self) -> std::option::Option<&crate::model::DiscovererState> {
self.state.as_ref()
}
pub fn cross_account(&self) -> bool {
self.cross_account
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
pub mod discoverer_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) discoverer_arn: std::option::Option<std::string::String>,
pub(crate) discoverer_id: std::option::Option<std::string::String>,
pub(crate) source_arn: std::option::Option<std::string::String>,
pub(crate) state: std::option::Option<crate::model::DiscovererState>,
pub(crate) cross_account: std::option::Option<bool>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn discoverer_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.discoverer_arn = Some(input.into());
self
}
pub fn set_discoverer_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.discoverer_arn = input;
self
}
pub fn discoverer_id(mut self, input: impl Into<std::string::String>) -> Self {
self.discoverer_id = Some(input.into());
self
}
pub fn set_discoverer_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.discoverer_id = input;
self
}
pub fn source_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.source_arn = Some(input.into());
self
}
pub fn set_source_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.source_arn = input;
self
}
pub fn state(mut self, input: crate::model::DiscovererState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::DiscovererState>,
) -> Self {
self.state = input;
self
}
pub fn cross_account(mut self, input: bool) -> Self {
self.cross_account = Some(input);
self
}
pub fn set_cross_account(mut self, input: std::option::Option<bool>) -> Self {
self.cross_account = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(self) -> crate::model::DiscovererSummary {
crate::model::DiscovererSummary {
discoverer_arn: self.discoverer_arn,
discoverer_id: self.discoverer_id,
source_arn: self.source_arn,
state: self.state,
cross_account: self.cross_account.unwrap_or_default(),
tags: self.tags,
}
}
}
}
impl DiscovererSummary {
pub fn builder() -> crate::model::discoverer_summary::Builder {
crate::model::discoverer_summary::Builder::default()
}
}