#[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 ValidationExceptionReason {
#[allow(missing_docs)] CannotParse,
#[allow(missing_docs)] EncryptionKeyError,
#[allow(missing_docs)] FieldValidationFailed,
#[allow(missing_docs)] Other,
#[allow(missing_docs)] UnknownOperation,
Unknown(String),
}
impl std::convert::From<&str> for ValidationExceptionReason {
fn from(s: &str) -> Self {
match s {
"CANNOT_PARSE" => ValidationExceptionReason::CannotParse,
"ENCRYPTION_KEY_ERROR" => ValidationExceptionReason::EncryptionKeyError,
"FIELD_VALIDATION_FAILED" => ValidationExceptionReason::FieldValidationFailed,
"OTHER" => ValidationExceptionReason::Other,
"UNKNOWN_OPERATION" => ValidationExceptionReason::UnknownOperation,
other => ValidationExceptionReason::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ValidationExceptionReason {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ValidationExceptionReason::from(s))
}
}
impl ValidationExceptionReason {
pub fn as_str(&self) -> &str {
match self {
ValidationExceptionReason::CannotParse => "CANNOT_PARSE",
ValidationExceptionReason::EncryptionKeyError => "ENCRYPTION_KEY_ERROR",
ValidationExceptionReason::FieldValidationFailed => "FIELD_VALIDATION_FAILED",
ValidationExceptionReason::Other => "OTHER",
ValidationExceptionReason::UnknownOperation => "UNKNOWN_OPERATION",
ValidationExceptionReason::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"CANNOT_PARSE",
"ENCRYPTION_KEY_ERROR",
"FIELD_VALIDATION_FAILED",
"OTHER",
"UNKNOWN_OPERATION",
]
}
}
impl AsRef<str> for ValidationExceptionReason {
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 ResourceType {
#[allow(missing_docs)] Asset,
#[allow(missing_docs)] Domain,
#[allow(missing_docs)] Package,
#[allow(missing_docs)] PackageVersion,
#[allow(missing_docs)] Repository,
Unknown(String),
}
impl std::convert::From<&str> for ResourceType {
fn from(s: &str) -> Self {
match s {
"asset" => ResourceType::Asset,
"domain" => ResourceType::Domain,
"package" => ResourceType::Package,
"package-version" => ResourceType::PackageVersion,
"repository" => ResourceType::Repository,
other => ResourceType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ResourceType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ResourceType::from(s))
}
}
impl ResourceType {
pub fn as_str(&self) -> &str {
match self {
ResourceType::Asset => "asset",
ResourceType::Domain => "domain",
ResourceType::Package => "package",
ResourceType::PackageVersion => "package-version",
ResourceType::Repository => "repository",
ResourceType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"asset",
"domain",
"package",
"package-version",
"repository",
]
}
}
impl AsRef<str> for ResourceType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RepositoryDescription {
pub name: std::option::Option<std::string::String>,
pub administrator_account: std::option::Option<std::string::String>,
pub domain_name: std::option::Option<std::string::String>,
pub domain_owner: std::option::Option<std::string::String>,
pub arn: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub upstreams: std::option::Option<std::vec::Vec<crate::model::UpstreamRepositoryInfo>>,
pub external_connections:
std::option::Option<std::vec::Vec<crate::model::RepositoryExternalConnectionInfo>>,
}
impl RepositoryDescription {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn administrator_account(&self) -> std::option::Option<&str> {
self.administrator_account.as_deref()
}
pub fn domain_name(&self) -> std::option::Option<&str> {
self.domain_name.as_deref()
}
pub fn domain_owner(&self) -> std::option::Option<&str> {
self.domain_owner.as_deref()
}
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn upstreams(&self) -> std::option::Option<&[crate::model::UpstreamRepositoryInfo]> {
self.upstreams.as_deref()
}
pub fn external_connections(
&self,
) -> std::option::Option<&[crate::model::RepositoryExternalConnectionInfo]> {
self.external_connections.as_deref()
}
}
impl std::fmt::Debug for RepositoryDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RepositoryDescription");
formatter.field("name", &self.name);
formatter.field("administrator_account", &self.administrator_account);
formatter.field("domain_name", &self.domain_name);
formatter.field("domain_owner", &self.domain_owner);
formatter.field("arn", &self.arn);
formatter.field("description", &self.description);
formatter.field("upstreams", &self.upstreams);
formatter.field("external_connections", &self.external_connections);
formatter.finish()
}
}
pub mod repository_description {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) administrator_account: std::option::Option<std::string::String>,
pub(crate) domain_name: std::option::Option<std::string::String>,
pub(crate) domain_owner: std::option::Option<std::string::String>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) upstreams:
std::option::Option<std::vec::Vec<crate::model::UpstreamRepositoryInfo>>,
pub(crate) external_connections:
std::option::Option<std::vec::Vec<crate::model::RepositoryExternalConnectionInfo>>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn administrator_account(mut self, input: impl Into<std::string::String>) -> Self {
self.administrator_account = Some(input.into());
self
}
pub fn set_administrator_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.administrator_account = input;
self
}
pub fn domain_name(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_name = Some(input.into());
self
}
pub fn set_domain_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_name = input;
self
}
pub fn domain_owner(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_owner = Some(input.into());
self
}
pub fn set_domain_owner(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_owner = input;
self
}
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn upstreams(mut self, input: impl Into<crate::model::UpstreamRepositoryInfo>) -> Self {
let mut v = self.upstreams.unwrap_or_default();
v.push(input.into());
self.upstreams = Some(v);
self
}
pub fn set_upstreams(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::UpstreamRepositoryInfo>>,
) -> Self {
self.upstreams = input;
self
}
pub fn external_connections(
mut self,
input: impl Into<crate::model::RepositoryExternalConnectionInfo>,
) -> Self {
let mut v = self.external_connections.unwrap_or_default();
v.push(input.into());
self.external_connections = Some(v);
self
}
pub fn set_external_connections(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::RepositoryExternalConnectionInfo>,
>,
) -> Self {
self.external_connections = input;
self
}
pub fn build(self) -> crate::model::RepositoryDescription {
crate::model::RepositoryDescription {
name: self.name,
administrator_account: self.administrator_account,
domain_name: self.domain_name,
domain_owner: self.domain_owner,
arn: self.arn,
description: self.description,
upstreams: self.upstreams,
external_connections: self.external_connections,
}
}
}
}
impl RepositoryDescription {
pub fn builder() -> crate::model::repository_description::Builder {
crate::model::repository_description::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RepositoryExternalConnectionInfo {
pub external_connection_name: std::option::Option<std::string::String>,
pub package_format: std::option::Option<crate::model::PackageFormat>,
pub status: std::option::Option<crate::model::ExternalConnectionStatus>,
}
impl RepositoryExternalConnectionInfo {
pub fn external_connection_name(&self) -> std::option::Option<&str> {
self.external_connection_name.as_deref()
}
pub fn package_format(&self) -> std::option::Option<&crate::model::PackageFormat> {
self.package_format.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::ExternalConnectionStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for RepositoryExternalConnectionInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RepositoryExternalConnectionInfo");
formatter.field("external_connection_name", &self.external_connection_name);
formatter.field("package_format", &self.package_format);
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod repository_external_connection_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) external_connection_name: std::option::Option<std::string::String>,
pub(crate) package_format: std::option::Option<crate::model::PackageFormat>,
pub(crate) status: std::option::Option<crate::model::ExternalConnectionStatus>,
}
impl Builder {
pub fn external_connection_name(mut self, input: impl Into<std::string::String>) -> Self {
self.external_connection_name = Some(input.into());
self
}
pub fn set_external_connection_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.external_connection_name = input;
self
}
pub fn package_format(mut self, input: crate::model::PackageFormat) -> Self {
self.package_format = Some(input);
self
}
pub fn set_package_format(
mut self,
input: std::option::Option<crate::model::PackageFormat>,
) -> Self {
self.package_format = input;
self
}
pub fn status(mut self, input: crate::model::ExternalConnectionStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ExternalConnectionStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::RepositoryExternalConnectionInfo {
crate::model::RepositoryExternalConnectionInfo {
external_connection_name: self.external_connection_name,
package_format: self.package_format,
status: self.status,
}
}
}
}
impl RepositoryExternalConnectionInfo {
pub fn builder() -> crate::model::repository_external_connection_info::Builder {
crate::model::repository_external_connection_info::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 ExternalConnectionStatus {
#[allow(missing_docs)] Available,
Unknown(String),
}
impl std::convert::From<&str> for ExternalConnectionStatus {
fn from(s: &str) -> Self {
match s {
"Available" => ExternalConnectionStatus::Available,
other => ExternalConnectionStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ExternalConnectionStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ExternalConnectionStatus::from(s))
}
}
impl ExternalConnectionStatus {
pub fn as_str(&self) -> &str {
match self {
ExternalConnectionStatus::Available => "Available",
ExternalConnectionStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Available"]
}
}
impl AsRef<str> for ExternalConnectionStatus {
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 PackageFormat {
#[allow(missing_docs)] Maven,
#[allow(missing_docs)] Npm,
#[allow(missing_docs)] Nuget,
#[allow(missing_docs)] Pypi,
Unknown(String),
}
impl std::convert::From<&str> for PackageFormat {
fn from(s: &str) -> Self {
match s {
"maven" => PackageFormat::Maven,
"npm" => PackageFormat::Npm,
"nuget" => PackageFormat::Nuget,
"pypi" => PackageFormat::Pypi,
other => PackageFormat::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PackageFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PackageFormat::from(s))
}
}
impl PackageFormat {
pub fn as_str(&self) -> &str {
match self {
PackageFormat::Maven => "maven",
PackageFormat::Npm => "npm",
PackageFormat::Nuget => "nuget",
PackageFormat::Pypi => "pypi",
PackageFormat::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["maven", "npm", "nuget", "pypi"]
}
}
impl AsRef<str> for PackageFormat {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpstreamRepositoryInfo {
pub repository_name: std::option::Option<std::string::String>,
}
impl UpstreamRepositoryInfo {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
}
impl std::fmt::Debug for UpstreamRepositoryInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpstreamRepositoryInfo");
formatter.field("repository_name", &self.repository_name);
formatter.finish()
}
}
pub mod upstream_repository_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn build(self) -> crate::model::UpstreamRepositoryInfo {
crate::model::UpstreamRepositoryInfo {
repository_name: self.repository_name,
}
}
}
}
impl UpstreamRepositoryInfo {
pub fn builder() -> crate::model::upstream_repository_info::Builder {
crate::model::upstream_repository_info::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpstreamRepository {
pub repository_name: std::option::Option<std::string::String>,
}
impl UpstreamRepository {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
}
impl std::fmt::Debug for UpstreamRepository {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpstreamRepository");
formatter.field("repository_name", &self.repository_name);
formatter.finish()
}
}
pub mod upstream_repository {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn build(self) -> crate::model::UpstreamRepository {
crate::model::UpstreamRepository {
repository_name: self.repository_name,
}
}
}
}
impl UpstreamRepository {
pub fn builder() -> crate::model::upstream_repository::Builder {
crate::model::upstream_repository::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageVersionError {
pub error_code: std::option::Option<crate::model::PackageVersionErrorCode>,
pub error_message: std::option::Option<std::string::String>,
}
impl PackageVersionError {
pub fn error_code(&self) -> std::option::Option<&crate::model::PackageVersionErrorCode> {
self.error_code.as_ref()
}
pub fn error_message(&self) -> std::option::Option<&str> {
self.error_message.as_deref()
}
}
impl std::fmt::Debug for PackageVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageVersionError");
formatter.field("error_code", &self.error_code);
formatter.field("error_message", &self.error_message);
formatter.finish()
}
}
pub mod package_version_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) error_code: std::option::Option<crate::model::PackageVersionErrorCode>,
pub(crate) error_message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn error_code(mut self, input: crate::model::PackageVersionErrorCode) -> Self {
self.error_code = Some(input);
self
}
pub fn set_error_code(
mut self,
input: std::option::Option<crate::model::PackageVersionErrorCode>,
) -> Self {
self.error_code = input;
self
}
pub fn error_message(mut self, input: impl Into<std::string::String>) -> Self {
self.error_message = Some(input.into());
self
}
pub fn set_error_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.error_message = input;
self
}
pub fn build(self) -> crate::model::PackageVersionError {
crate::model::PackageVersionError {
error_code: self.error_code,
error_message: self.error_message,
}
}
}
}
impl PackageVersionError {
pub fn builder() -> crate::model::package_version_error::Builder {
crate::model::package_version_error::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 PackageVersionErrorCode {
#[allow(missing_docs)] AlreadyExists,
#[allow(missing_docs)] MismatchedRevision,
#[allow(missing_docs)] MismatchedStatus,
#[allow(missing_docs)] NotAllowed,
#[allow(missing_docs)] NotFound,
#[allow(missing_docs)] Skipped,
Unknown(String),
}
impl std::convert::From<&str> for PackageVersionErrorCode {
fn from(s: &str) -> Self {
match s {
"ALREADY_EXISTS" => PackageVersionErrorCode::AlreadyExists,
"MISMATCHED_REVISION" => PackageVersionErrorCode::MismatchedRevision,
"MISMATCHED_STATUS" => PackageVersionErrorCode::MismatchedStatus,
"NOT_ALLOWED" => PackageVersionErrorCode::NotAllowed,
"NOT_FOUND" => PackageVersionErrorCode::NotFound,
"SKIPPED" => PackageVersionErrorCode::Skipped,
other => PackageVersionErrorCode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PackageVersionErrorCode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PackageVersionErrorCode::from(s))
}
}
impl PackageVersionErrorCode {
pub fn as_str(&self) -> &str {
match self {
PackageVersionErrorCode::AlreadyExists => "ALREADY_EXISTS",
PackageVersionErrorCode::MismatchedRevision => "MISMATCHED_REVISION",
PackageVersionErrorCode::MismatchedStatus => "MISMATCHED_STATUS",
PackageVersionErrorCode::NotAllowed => "NOT_ALLOWED",
PackageVersionErrorCode::NotFound => "NOT_FOUND",
PackageVersionErrorCode::Skipped => "SKIPPED",
PackageVersionErrorCode::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"ALREADY_EXISTS",
"MISMATCHED_REVISION",
"MISMATCHED_STATUS",
"NOT_ALLOWED",
"NOT_FOUND",
"SKIPPED",
]
}
}
impl AsRef<str> for PackageVersionErrorCode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SuccessfulPackageVersionInfo {
pub revision: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::PackageVersionStatus>,
}
impl SuccessfulPackageVersionInfo {
pub fn revision(&self) -> std::option::Option<&str> {
self.revision.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::PackageVersionStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for SuccessfulPackageVersionInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SuccessfulPackageVersionInfo");
formatter.field("revision", &self.revision);
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod successful_package_version_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) revision: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::PackageVersionStatus>,
}
impl Builder {
pub fn revision(mut self, input: impl Into<std::string::String>) -> Self {
self.revision = Some(input.into());
self
}
pub fn set_revision(mut self, input: std::option::Option<std::string::String>) -> Self {
self.revision = input;
self
}
pub fn status(mut self, input: crate::model::PackageVersionStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::PackageVersionStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::SuccessfulPackageVersionInfo {
crate::model::SuccessfulPackageVersionInfo {
revision: self.revision,
status: self.status,
}
}
}
}
impl SuccessfulPackageVersionInfo {
pub fn builder() -> crate::model::successful_package_version_info::Builder {
crate::model::successful_package_version_info::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 PackageVersionStatus {
#[allow(missing_docs)] Archived,
#[allow(missing_docs)] Deleted,
#[allow(missing_docs)] Disposed,
#[allow(missing_docs)] Published,
#[allow(missing_docs)] Unfinished,
#[allow(missing_docs)] Unlisted,
Unknown(String),
}
impl std::convert::From<&str> for PackageVersionStatus {
fn from(s: &str) -> Self {
match s {
"Archived" => PackageVersionStatus::Archived,
"Deleted" => PackageVersionStatus::Deleted,
"Disposed" => PackageVersionStatus::Disposed,
"Published" => PackageVersionStatus::Published,
"Unfinished" => PackageVersionStatus::Unfinished,
"Unlisted" => PackageVersionStatus::Unlisted,
other => PackageVersionStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PackageVersionStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PackageVersionStatus::from(s))
}
}
impl PackageVersionStatus {
pub fn as_str(&self) -> &str {
match self {
PackageVersionStatus::Archived => "Archived",
PackageVersionStatus::Deleted => "Deleted",
PackageVersionStatus::Disposed => "Disposed",
PackageVersionStatus::Published => "Published",
PackageVersionStatus::Unfinished => "Unfinished",
PackageVersionStatus::Unlisted => "Unlisted",
PackageVersionStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"Archived",
"Deleted",
"Disposed",
"Published",
"Unfinished",
"Unlisted",
]
}
}
impl AsRef<str> for PackageVersionStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Tag {
pub key: std::option::Option<std::string::String>,
pub value: std::option::Option<std::string::String>,
}
impl Tag {
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
impl std::fmt::Debug for Tag {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Tag");
formatter.field("key", &self.key);
formatter.field("value", &self.value);
formatter.finish()
}
}
pub mod tag {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) value: std::option::Option<std::string::String>,
}
impl Builder {
pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
self.key = Some(input.into());
self
}
pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.key = input;
self
}
pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
self.value = Some(input.into());
self
}
pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
self.value = input;
self
}
pub fn build(self) -> crate::model::Tag {
crate::model::Tag {
key: self.key,
value: self.value,
}
}
}
}
impl Tag {
pub fn builder() -> crate::model::tag::Builder {
crate::model::tag::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourcePolicy {
pub resource_arn: std::option::Option<std::string::String>,
pub revision: std::option::Option<std::string::String>,
pub document: std::option::Option<std::string::String>,
}
impl ResourcePolicy {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn revision(&self) -> std::option::Option<&str> {
self.revision.as_deref()
}
pub fn document(&self) -> std::option::Option<&str> {
self.document.as_deref()
}
}
impl std::fmt::Debug for ResourcePolicy {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourcePolicy");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("revision", &self.revision);
formatter.field("document", &self.document);
formatter.finish()
}
}
pub mod resource_policy {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) revision: std::option::Option<std::string::String>,
pub(crate) document: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn revision(mut self, input: impl Into<std::string::String>) -> Self {
self.revision = Some(input.into());
self
}
pub fn set_revision(mut self, input: std::option::Option<std::string::String>) -> Self {
self.revision = input;
self
}
pub fn document(mut self, input: impl Into<std::string::String>) -> Self {
self.document = Some(input.into());
self
}
pub fn set_document(mut self, input: std::option::Option<std::string::String>) -> Self {
self.document = input;
self
}
pub fn build(self) -> crate::model::ResourcePolicy {
crate::model::ResourcePolicy {
resource_arn: self.resource_arn,
revision: self.revision,
document: self.document,
}
}
}
}
impl ResourcePolicy {
pub fn builder() -> crate::model::resource_policy::Builder {
crate::model::resource_policy::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RepositorySummary {
pub name: std::option::Option<std::string::String>,
pub administrator_account: std::option::Option<std::string::String>,
pub domain_name: std::option::Option<std::string::String>,
pub domain_owner: std::option::Option<std::string::String>,
pub arn: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
}
impl RepositorySummary {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn administrator_account(&self) -> std::option::Option<&str> {
self.administrator_account.as_deref()
}
pub fn domain_name(&self) -> std::option::Option<&str> {
self.domain_name.as_deref()
}
pub fn domain_owner(&self) -> std::option::Option<&str> {
self.domain_owner.as_deref()
}
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
impl std::fmt::Debug for RepositorySummary {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RepositorySummary");
formatter.field("name", &self.name);
formatter.field("administrator_account", &self.administrator_account);
formatter.field("domain_name", &self.domain_name);
formatter.field("domain_owner", &self.domain_owner);
formatter.field("arn", &self.arn);
formatter.field("description", &self.description);
formatter.finish()
}
}
pub mod repository_summary {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) administrator_account: std::option::Option<std::string::String>,
pub(crate) domain_name: std::option::Option<std::string::String>,
pub(crate) domain_owner: std::option::Option<std::string::String>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn administrator_account(mut self, input: impl Into<std::string::String>) -> Self {
self.administrator_account = Some(input.into());
self
}
pub fn set_administrator_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.administrator_account = input;
self
}
pub fn domain_name(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_name = Some(input.into());
self
}
pub fn set_domain_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_name = input;
self
}
pub fn domain_owner(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_owner = Some(input.into());
self
}
pub fn set_domain_owner(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_owner = input;
self
}
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn build(self) -> crate::model::RepositorySummary {
crate::model::RepositorySummary {
name: self.name,
administrator_account: self.administrator_account,
domain_name: self.domain_name,
domain_owner: self.domain_owner,
arn: self.arn,
description: self.description,
}
}
}
}
impl RepositorySummary {
pub fn builder() -> crate::model::repository_summary::Builder {
crate::model::repository_summary::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageVersionSummary {
pub version: std::option::Option<std::string::String>,
pub revision: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::PackageVersionStatus>,
}
impl PackageVersionSummary {
pub fn version(&self) -> std::option::Option<&str> {
self.version.as_deref()
}
pub fn revision(&self) -> std::option::Option<&str> {
self.revision.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::PackageVersionStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for PackageVersionSummary {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageVersionSummary");
formatter.field("version", &self.version);
formatter.field("revision", &self.revision);
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod package_version_summary {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) version: std::option::Option<std::string::String>,
pub(crate) revision: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::PackageVersionStatus>,
}
impl Builder {
pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
self.version = Some(input.into());
self
}
pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version = input;
self
}
pub fn revision(mut self, input: impl Into<std::string::String>) -> Self {
self.revision = Some(input.into());
self
}
pub fn set_revision(mut self, input: std::option::Option<std::string::String>) -> Self {
self.revision = input;
self
}
pub fn status(mut self, input: crate::model::PackageVersionStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::PackageVersionStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::PackageVersionSummary {
crate::model::PackageVersionSummary {
version: self.version,
revision: self.revision,
status: self.status,
}
}
}
}
impl PackageVersionSummary {
pub fn builder() -> crate::model::package_version_summary::Builder {
crate::model::package_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 PackageVersionSortType {
#[allow(missing_docs)] PublishedTime,
Unknown(String),
}
impl std::convert::From<&str> for PackageVersionSortType {
fn from(s: &str) -> Self {
match s {
"PUBLISHED_TIME" => PackageVersionSortType::PublishedTime,
other => PackageVersionSortType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PackageVersionSortType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PackageVersionSortType::from(s))
}
}
impl PackageVersionSortType {
pub fn as_str(&self) -> &str {
match self {
PackageVersionSortType::PublishedTime => "PUBLISHED_TIME",
PackageVersionSortType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["PUBLISHED_TIME"]
}
}
impl AsRef<str> for PackageVersionSortType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageDependency {
pub namespace: std::option::Option<std::string::String>,
pub package: std::option::Option<std::string::String>,
pub dependency_type: std::option::Option<std::string::String>,
pub version_requirement: std::option::Option<std::string::String>,
}
impl PackageDependency {
pub fn namespace(&self) -> std::option::Option<&str> {
self.namespace.as_deref()
}
pub fn package(&self) -> std::option::Option<&str> {
self.package.as_deref()
}
pub fn dependency_type(&self) -> std::option::Option<&str> {
self.dependency_type.as_deref()
}
pub fn version_requirement(&self) -> std::option::Option<&str> {
self.version_requirement.as_deref()
}
}
impl std::fmt::Debug for PackageDependency {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageDependency");
formatter.field("namespace", &self.namespace);
formatter.field("package", &self.package);
formatter.field("dependency_type", &self.dependency_type);
formatter.field("version_requirement", &self.version_requirement);
formatter.finish()
}
}
pub mod package_dependency {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) namespace: std::option::Option<std::string::String>,
pub(crate) package: std::option::Option<std::string::String>,
pub(crate) dependency_type: std::option::Option<std::string::String>,
pub(crate) version_requirement: std::option::Option<std::string::String>,
}
impl Builder {
pub fn namespace(mut self, input: impl Into<std::string::String>) -> Self {
self.namespace = Some(input.into());
self
}
pub fn set_namespace(mut self, input: std::option::Option<std::string::String>) -> Self {
self.namespace = input;
self
}
pub fn package(mut self, input: impl Into<std::string::String>) -> Self {
self.package = Some(input.into());
self
}
pub fn set_package(mut self, input: std::option::Option<std::string::String>) -> Self {
self.package = input;
self
}
pub fn dependency_type(mut self, input: impl Into<std::string::String>) -> Self {
self.dependency_type = Some(input.into());
self
}
pub fn set_dependency_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.dependency_type = input;
self
}
pub fn version_requirement(mut self, input: impl Into<std::string::String>) -> Self {
self.version_requirement = Some(input.into());
self
}
pub fn set_version_requirement(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.version_requirement = input;
self
}
pub fn build(self) -> crate::model::PackageDependency {
crate::model::PackageDependency {
namespace: self.namespace,
package: self.package,
dependency_type: self.dependency_type,
version_requirement: self.version_requirement,
}
}
}
}
impl PackageDependency {
pub fn builder() -> crate::model::package_dependency::Builder {
crate::model::package_dependency::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AssetSummary {
pub name: std::option::Option<std::string::String>,
pub size: std::option::Option<i64>,
pub hashes: std::option::Option<
std::collections::HashMap<crate::model::HashAlgorithm, std::string::String>,
>,
}
impl AssetSummary {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn size(&self) -> std::option::Option<i64> {
self.size
}
pub fn hashes(
&self,
) -> std::option::Option<
&std::collections::HashMap<crate::model::HashAlgorithm, std::string::String>,
> {
self.hashes.as_ref()
}
}
impl std::fmt::Debug for AssetSummary {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AssetSummary");
formatter.field("name", &self.name);
formatter.field("size", &self.size);
formatter.field("hashes", &self.hashes);
formatter.finish()
}
}
pub mod asset_summary {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) size: std::option::Option<i64>,
pub(crate) hashes: std::option::Option<
std::collections::HashMap<crate::model::HashAlgorithm, std::string::String>,
>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn size(mut self, input: i64) -> Self {
self.size = Some(input);
self
}
pub fn set_size(mut self, input: std::option::Option<i64>) -> Self {
self.size = input;
self
}
pub fn hashes(
mut self,
k: impl Into<crate::model::HashAlgorithm>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.hashes.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.hashes = Some(hash_map);
self
}
pub fn set_hashes(
mut self,
input: std::option::Option<
std::collections::HashMap<crate::model::HashAlgorithm, std::string::String>,
>,
) -> Self {
self.hashes = input;
self
}
pub fn build(self) -> crate::model::AssetSummary {
crate::model::AssetSummary {
name: self.name,
size: self.size,
hashes: self.hashes,
}
}
}
}
impl AssetSummary {
pub fn builder() -> crate::model::asset_summary::Builder {
crate::model::asset_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 HashAlgorithm {
#[allow(missing_docs)] Md5,
#[allow(missing_docs)] Sha1,
#[allow(missing_docs)] Sha256,
#[allow(missing_docs)] Sha512,
Unknown(String),
}
impl std::convert::From<&str> for HashAlgorithm {
fn from(s: &str) -> Self {
match s {
"MD5" => HashAlgorithm::Md5,
"SHA-1" => HashAlgorithm::Sha1,
"SHA-256" => HashAlgorithm::Sha256,
"SHA-512" => HashAlgorithm::Sha512,
other => HashAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HashAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HashAlgorithm::from(s))
}
}
impl HashAlgorithm {
pub fn as_str(&self) -> &str {
match self {
HashAlgorithm::Md5 => "MD5",
HashAlgorithm::Sha1 => "SHA-1",
HashAlgorithm::Sha256 => "SHA-256",
HashAlgorithm::Sha512 => "SHA-512",
HashAlgorithm::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["MD5", "SHA-1", "SHA-256", "SHA-512"]
}
}
impl AsRef<str> for HashAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageSummary {
pub format: std::option::Option<crate::model::PackageFormat>,
pub namespace: std::option::Option<std::string::String>,
pub package: std::option::Option<std::string::String>,
}
impl PackageSummary {
pub fn format(&self) -> std::option::Option<&crate::model::PackageFormat> {
self.format.as_ref()
}
pub fn namespace(&self) -> std::option::Option<&str> {
self.namespace.as_deref()
}
pub fn package(&self) -> std::option::Option<&str> {
self.package.as_deref()
}
}
impl std::fmt::Debug for PackageSummary {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageSummary");
formatter.field("format", &self.format);
formatter.field("namespace", &self.namespace);
formatter.field("package", &self.package);
formatter.finish()
}
}
pub mod package_summary {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) format: std::option::Option<crate::model::PackageFormat>,
pub(crate) namespace: std::option::Option<std::string::String>,
pub(crate) package: std::option::Option<std::string::String>,
}
impl Builder {
pub fn format(mut self, input: crate::model::PackageFormat) -> Self {
self.format = Some(input);
self
}
pub fn set_format(
mut self,
input: std::option::Option<crate::model::PackageFormat>,
) -> Self {
self.format = input;
self
}
pub fn namespace(mut self, input: impl Into<std::string::String>) -> Self {
self.namespace = Some(input.into());
self
}
pub fn set_namespace(mut self, input: std::option::Option<std::string::String>) -> Self {
self.namespace = input;
self
}
pub fn package(mut self, input: impl Into<std::string::String>) -> Self {
self.package = Some(input.into());
self
}
pub fn set_package(mut self, input: std::option::Option<std::string::String>) -> Self {
self.package = input;
self
}
pub fn build(self) -> crate::model::PackageSummary {
crate::model::PackageSummary {
format: self.format,
namespace: self.namespace,
package: self.package,
}
}
}
}
impl PackageSummary {
pub fn builder() -> crate::model::package_summary::Builder {
crate::model::package_summary::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DomainSummary {
pub name: std::option::Option<std::string::String>,
pub owner: std::option::Option<std::string::String>,
pub arn: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::DomainStatus>,
pub created_time: std::option::Option<aws_smithy_types::Instant>,
pub encryption_key: std::option::Option<std::string::String>,
}
impl DomainSummary {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn owner(&self) -> std::option::Option<&str> {
self.owner.as_deref()
}
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::DomainStatus> {
self.status.as_ref()
}
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::Instant> {
self.created_time.as_ref()
}
pub fn encryption_key(&self) -> std::option::Option<&str> {
self.encryption_key.as_deref()
}
}
impl std::fmt::Debug for DomainSummary {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DomainSummary");
formatter.field("name", &self.name);
formatter.field("owner", &self.owner);
formatter.field("arn", &self.arn);
formatter.field("status", &self.status);
formatter.field("created_time", &self.created_time);
formatter.field("encryption_key", &self.encryption_key);
formatter.finish()
}
}
pub mod domain_summary {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) owner: std::option::Option<std::string::String>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::DomainStatus>,
pub(crate) created_time: std::option::Option<aws_smithy_types::Instant>,
pub(crate) encryption_key: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn owner(mut self, input: impl Into<std::string::String>) -> Self {
self.owner = Some(input.into());
self
}
pub fn set_owner(mut self, input: std::option::Option<std::string::String>) -> Self {
self.owner = input;
self
}
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
pub fn status(mut self, input: crate::model::DomainStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::DomainStatus>,
) -> Self {
self.status = input;
self
}
pub fn created_time(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_time = Some(input);
self
}
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_time = input;
self
}
pub fn encryption_key(mut self, input: impl Into<std::string::String>) -> Self {
self.encryption_key = Some(input.into());
self
}
pub fn set_encryption_key(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.encryption_key = input;
self
}
pub fn build(self) -> crate::model::DomainSummary {
crate::model::DomainSummary {
name: self.name,
owner: self.owner,
arn: self.arn,
status: self.status,
created_time: self.created_time,
encryption_key: self.encryption_key,
}
}
}
}
impl DomainSummary {
pub fn builder() -> crate::model::domain_summary::Builder {
crate::model::domain_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 DomainStatus {
#[allow(missing_docs)] Active,
#[allow(missing_docs)] Deleted,
Unknown(String),
}
impl std::convert::From<&str> for DomainStatus {
fn from(s: &str) -> Self {
match s {
"Active" => DomainStatus::Active,
"Deleted" => DomainStatus::Deleted,
other => DomainStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DomainStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DomainStatus::from(s))
}
}
impl DomainStatus {
pub fn as_str(&self) -> &str {
match self {
DomainStatus::Active => "Active",
DomainStatus::Deleted => "Deleted",
DomainStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["Active", "Deleted"]
}
}
impl AsRef<str> for DomainStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageVersionDescription {
pub format: std::option::Option<crate::model::PackageFormat>,
pub namespace: std::option::Option<std::string::String>,
pub package_name: std::option::Option<std::string::String>,
pub display_name: std::option::Option<std::string::String>,
pub version: std::option::Option<std::string::String>,
pub summary: std::option::Option<std::string::String>,
pub home_page: std::option::Option<std::string::String>,
pub source_code_repository: std::option::Option<std::string::String>,
pub published_time: std::option::Option<aws_smithy_types::Instant>,
pub licenses: std::option::Option<std::vec::Vec<crate::model::LicenseInfo>>,
pub revision: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::PackageVersionStatus>,
}
impl PackageVersionDescription {
pub fn format(&self) -> std::option::Option<&crate::model::PackageFormat> {
self.format.as_ref()
}
pub fn namespace(&self) -> std::option::Option<&str> {
self.namespace.as_deref()
}
pub fn package_name(&self) -> std::option::Option<&str> {
self.package_name.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn version(&self) -> std::option::Option<&str> {
self.version.as_deref()
}
pub fn summary(&self) -> std::option::Option<&str> {
self.summary.as_deref()
}
pub fn home_page(&self) -> std::option::Option<&str> {
self.home_page.as_deref()
}
pub fn source_code_repository(&self) -> std::option::Option<&str> {
self.source_code_repository.as_deref()
}
pub fn published_time(&self) -> std::option::Option<&aws_smithy_types::Instant> {
self.published_time.as_ref()
}
pub fn licenses(&self) -> std::option::Option<&[crate::model::LicenseInfo]> {
self.licenses.as_deref()
}
pub fn revision(&self) -> std::option::Option<&str> {
self.revision.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::PackageVersionStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for PackageVersionDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageVersionDescription");
formatter.field("format", &self.format);
formatter.field("namespace", &self.namespace);
formatter.field("package_name", &self.package_name);
formatter.field("display_name", &self.display_name);
formatter.field("version", &self.version);
formatter.field("summary", &self.summary);
formatter.field("home_page", &self.home_page);
formatter.field("source_code_repository", &self.source_code_repository);
formatter.field("published_time", &self.published_time);
formatter.field("licenses", &self.licenses);
formatter.field("revision", &self.revision);
formatter.field("status", &self.status);
formatter.finish()
}
}
pub mod package_version_description {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) format: std::option::Option<crate::model::PackageFormat>,
pub(crate) namespace: std::option::Option<std::string::String>,
pub(crate) package_name: std::option::Option<std::string::String>,
pub(crate) display_name: std::option::Option<std::string::String>,
pub(crate) version: std::option::Option<std::string::String>,
pub(crate) summary: std::option::Option<std::string::String>,
pub(crate) home_page: std::option::Option<std::string::String>,
pub(crate) source_code_repository: std::option::Option<std::string::String>,
pub(crate) published_time: std::option::Option<aws_smithy_types::Instant>,
pub(crate) licenses: std::option::Option<std::vec::Vec<crate::model::LicenseInfo>>,
pub(crate) revision: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::PackageVersionStatus>,
}
impl Builder {
pub fn format(mut self, input: crate::model::PackageFormat) -> Self {
self.format = Some(input);
self
}
pub fn set_format(
mut self,
input: std::option::Option<crate::model::PackageFormat>,
) -> Self {
self.format = input;
self
}
pub fn namespace(mut self, input: impl Into<std::string::String>) -> Self {
self.namespace = Some(input.into());
self
}
pub fn set_namespace(mut self, input: std::option::Option<std::string::String>) -> Self {
self.namespace = input;
self
}
pub fn package_name(mut self, input: impl Into<std::string::String>) -> Self {
self.package_name = Some(input.into());
self
}
pub fn set_package_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.package_name = input;
self
}
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
self.version = Some(input.into());
self
}
pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version = input;
self
}
pub fn summary(mut self, input: impl Into<std::string::String>) -> Self {
self.summary = Some(input.into());
self
}
pub fn set_summary(mut self, input: std::option::Option<std::string::String>) -> Self {
self.summary = input;
self
}
pub fn home_page(mut self, input: impl Into<std::string::String>) -> Self {
self.home_page = Some(input.into());
self
}
pub fn set_home_page(mut self, input: std::option::Option<std::string::String>) -> Self {
self.home_page = input;
self
}
pub fn source_code_repository(mut self, input: impl Into<std::string::String>) -> Self {
self.source_code_repository = Some(input.into());
self
}
pub fn set_source_code_repository(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_code_repository = input;
self
}
pub fn published_time(mut self, input: aws_smithy_types::Instant) -> Self {
self.published_time = Some(input);
self
}
pub fn set_published_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.published_time = input;
self
}
pub fn licenses(mut self, input: impl Into<crate::model::LicenseInfo>) -> Self {
let mut v = self.licenses.unwrap_or_default();
v.push(input.into());
self.licenses = Some(v);
self
}
pub fn set_licenses(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LicenseInfo>>,
) -> Self {
self.licenses = input;
self
}
pub fn revision(mut self, input: impl Into<std::string::String>) -> Self {
self.revision = Some(input.into());
self
}
pub fn set_revision(mut self, input: std::option::Option<std::string::String>) -> Self {
self.revision = input;
self
}
pub fn status(mut self, input: crate::model::PackageVersionStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::PackageVersionStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(self) -> crate::model::PackageVersionDescription {
crate::model::PackageVersionDescription {
format: self.format,
namespace: self.namespace,
package_name: self.package_name,
display_name: self.display_name,
version: self.version,
summary: self.summary,
home_page: self.home_page,
source_code_repository: self.source_code_repository,
published_time: self.published_time,
licenses: self.licenses,
revision: self.revision,
status: self.status,
}
}
}
}
impl PackageVersionDescription {
pub fn builder() -> crate::model::package_version_description::Builder {
crate::model::package_version_description::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LicenseInfo {
pub name: std::option::Option<std::string::String>,
pub url: std::option::Option<std::string::String>,
}
impl LicenseInfo {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn url(&self) -> std::option::Option<&str> {
self.url.as_deref()
}
}
impl std::fmt::Debug for LicenseInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LicenseInfo");
formatter.field("name", &self.name);
formatter.field("url", &self.url);
formatter.finish()
}
}
pub mod license_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) url: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
self.url = Some(input.into());
self
}
pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.url = input;
self
}
pub fn build(self) -> crate::model::LicenseInfo {
crate::model::LicenseInfo {
name: self.name,
url: self.url,
}
}
}
}
impl LicenseInfo {
pub fn builder() -> crate::model::license_info::Builder {
crate::model::license_info::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DomainDescription {
pub name: std::option::Option<std::string::String>,
pub owner: std::option::Option<std::string::String>,
pub arn: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::DomainStatus>,
pub created_time: std::option::Option<aws_smithy_types::Instant>,
pub encryption_key: std::option::Option<std::string::String>,
pub repository_count: i32,
pub asset_size_bytes: i64,
pub s3_bucket_arn: std::option::Option<std::string::String>,
}
impl DomainDescription {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn owner(&self) -> std::option::Option<&str> {
self.owner.as_deref()
}
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::DomainStatus> {
self.status.as_ref()
}
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::Instant> {
self.created_time.as_ref()
}
pub fn encryption_key(&self) -> std::option::Option<&str> {
self.encryption_key.as_deref()
}
pub fn repository_count(&self) -> i32 {
self.repository_count
}
pub fn asset_size_bytes(&self) -> i64 {
self.asset_size_bytes
}
pub fn s3_bucket_arn(&self) -> std::option::Option<&str> {
self.s3_bucket_arn.as_deref()
}
}
impl std::fmt::Debug for DomainDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DomainDescription");
formatter.field("name", &self.name);
formatter.field("owner", &self.owner);
formatter.field("arn", &self.arn);
formatter.field("status", &self.status);
formatter.field("created_time", &self.created_time);
formatter.field("encryption_key", &self.encryption_key);
formatter.field("repository_count", &self.repository_count);
formatter.field("asset_size_bytes", &self.asset_size_bytes);
formatter.field("s3_bucket_arn", &self.s3_bucket_arn);
formatter.finish()
}
}
pub mod domain_description {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) owner: std::option::Option<std::string::String>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::DomainStatus>,
pub(crate) created_time: std::option::Option<aws_smithy_types::Instant>,
pub(crate) encryption_key: std::option::Option<std::string::String>,
pub(crate) repository_count: std::option::Option<i32>,
pub(crate) asset_size_bytes: std::option::Option<i64>,
pub(crate) s3_bucket_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn owner(mut self, input: impl Into<std::string::String>) -> Self {
self.owner = Some(input.into());
self
}
pub fn set_owner(mut self, input: std::option::Option<std::string::String>) -> Self {
self.owner = input;
self
}
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
pub fn status(mut self, input: crate::model::DomainStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::DomainStatus>,
) -> Self {
self.status = input;
self
}
pub fn created_time(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_time = Some(input);
self
}
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_time = input;
self
}
pub fn encryption_key(mut self, input: impl Into<std::string::String>) -> Self {
self.encryption_key = Some(input.into());
self
}
pub fn set_encryption_key(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.encryption_key = input;
self
}
pub fn repository_count(mut self, input: i32) -> Self {
self.repository_count = Some(input);
self
}
pub fn set_repository_count(mut self, input: std::option::Option<i32>) -> Self {
self.repository_count = input;
self
}
pub fn asset_size_bytes(mut self, input: i64) -> Self {
self.asset_size_bytes = Some(input);
self
}
pub fn set_asset_size_bytes(mut self, input: std::option::Option<i64>) -> Self {
self.asset_size_bytes = input;
self
}
pub fn s3_bucket_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.s3_bucket_arn = Some(input.into());
self
}
pub fn set_s3_bucket_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.s3_bucket_arn = input;
self
}
pub fn build(self) -> crate::model::DomainDescription {
crate::model::DomainDescription {
name: self.name,
owner: self.owner,
arn: self.arn,
status: self.status,
created_time: self.created_time,
encryption_key: self.encryption_key,
repository_count: self.repository_count.unwrap_or_default(),
asset_size_bytes: self.asset_size_bytes.unwrap_or_default(),
s3_bucket_arn: self.s3_bucket_arn,
}
}
}
}
impl DomainDescription {
pub fn builder() -> crate::model::domain_description::Builder {
crate::model::domain_description::Builder::default()
}
}