#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidationExceptionField {
pub name: std::option::Option<std::string::String>,
pub message: std::option::Option<std::string::String>,
}
impl ValidationExceptionField {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Debug for ValidationExceptionField {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ValidationExceptionField");
formatter.field("name", &self.name);
formatter.field("message", &self.message);
formatter.finish()
}
}
pub mod validation_exception_field {
#[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) message: 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 message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::model::ValidationExceptionField {
crate::model::ValidationExceptionField {
name: self.name,
message: self.message,
}
}
}
}
impl ValidationExceptionField {
pub fn builder() -> crate::model::validation_exception_field::Builder {
crate::model::validation_exception_field::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidationExceptionErrorArgument {
pub name: std::option::Option<std::string::String>,
pub value: std::option::Option<std::string::String>,
}
impl ValidationExceptionErrorArgument {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
impl std::fmt::Debug for ValidationExceptionErrorArgument {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ValidationExceptionErrorArgument");
formatter.field("name", &self.name);
formatter.field("value", &self.value);
formatter.finish()
}
}
pub mod validation_exception_error_argument {
#[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) value: 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 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::ValidationExceptionErrorArgument {
crate::model::ValidationExceptionErrorArgument {
name: self.name,
value: self.value,
}
}
}
}
impl ValidationExceptionErrorArgument {
pub fn builder() -> crate::model::validation_exception_error_argument::Builder {
crate::model::validation_exception_error_argument::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 ValidationExceptionReason {
#[allow(missing_docs)] CannotParse,
#[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,
"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::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",
"FIELD_VALIDATION_FAILED",
"OTHER",
"UNKNOWN_OPERATION",
]
}
}
impl AsRef<str> for ValidationExceptionReason {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConflictExceptionErrorArgument {
pub name: std::option::Option<std::string::String>,
pub value: std::option::Option<std::string::String>,
}
impl ConflictExceptionErrorArgument {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
impl std::fmt::Debug for ConflictExceptionErrorArgument {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConflictExceptionErrorArgument");
formatter.field("name", &self.name);
formatter.field("value", &self.value);
formatter.finish()
}
}
pub mod conflict_exception_error_argument {
#[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) value: 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 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::ConflictExceptionErrorArgument {
crate::model::ConflictExceptionErrorArgument {
name: self.name,
value: self.value,
}
}
}
}
impl ConflictExceptionErrorArgument {
pub fn builder() -> crate::model::conflict_exception_error_argument::Builder {
crate::model::conflict_exception_error_argument::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 DeviceStatus {
#[allow(missing_docs)] AwaitingProvisioning,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] Error,
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Succeeded,
Unknown(String),
}
impl std::convert::From<&str> for DeviceStatus {
fn from(s: &str) -> Self {
match s {
"AWAITING_PROVISIONING" => DeviceStatus::AwaitingProvisioning,
"DELETING" => DeviceStatus::Deleting,
"ERROR" => DeviceStatus::Error,
"FAILED" => DeviceStatus::Failed,
"PENDING" => DeviceStatus::Pending,
"SUCCEEDED" => DeviceStatus::Succeeded,
other => DeviceStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DeviceStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DeviceStatus::from(s))
}
}
impl DeviceStatus {
pub fn as_str(&self) -> &str {
match self {
DeviceStatus::AwaitingProvisioning => "AWAITING_PROVISIONING",
DeviceStatus::Deleting => "DELETING",
DeviceStatus::Error => "ERROR",
DeviceStatus::Failed => "FAILED",
DeviceStatus::Pending => "PENDING",
DeviceStatus::Succeeded => "SUCCEEDED",
DeviceStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"AWAITING_PROVISIONING",
"DELETING",
"ERROR",
"FAILED",
"PENDING",
"SUCCEEDED",
]
}
}
impl AsRef<str> for DeviceStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NetworkPayload {
pub ethernet0: std::option::Option<crate::model::EthernetPayload>,
pub ethernet1: std::option::Option<crate::model::EthernetPayload>,
}
impl NetworkPayload {
pub fn ethernet0(&self) -> std::option::Option<&crate::model::EthernetPayload> {
self.ethernet0.as_ref()
}
pub fn ethernet1(&self) -> std::option::Option<&crate::model::EthernetPayload> {
self.ethernet1.as_ref()
}
}
impl std::fmt::Debug for NetworkPayload {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NetworkPayload");
formatter.field("ethernet0", &self.ethernet0);
formatter.field("ethernet1", &self.ethernet1);
formatter.finish()
}
}
pub mod network_payload {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ethernet0: std::option::Option<crate::model::EthernetPayload>,
pub(crate) ethernet1: std::option::Option<crate::model::EthernetPayload>,
}
impl Builder {
pub fn ethernet0(mut self, input: crate::model::EthernetPayload) -> Self {
self.ethernet0 = Some(input);
self
}
pub fn set_ethernet0(
mut self,
input: std::option::Option<crate::model::EthernetPayload>,
) -> Self {
self.ethernet0 = input;
self
}
pub fn ethernet1(mut self, input: crate::model::EthernetPayload) -> Self {
self.ethernet1 = Some(input);
self
}
pub fn set_ethernet1(
mut self,
input: std::option::Option<crate::model::EthernetPayload>,
) -> Self {
self.ethernet1 = input;
self
}
pub fn build(self) -> crate::model::NetworkPayload {
crate::model::NetworkPayload {
ethernet0: self.ethernet0,
ethernet1: self.ethernet1,
}
}
}
}
impl NetworkPayload {
pub fn builder() -> crate::model::network_payload::Builder {
crate::model::network_payload::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EthernetPayload {
pub connection_type: std::option::Option<crate::model::ConnectionType>,
pub static_ip_connection_info: std::option::Option<crate::model::StaticIpConnectionInfo>,
}
impl EthernetPayload {
pub fn connection_type(&self) -> std::option::Option<&crate::model::ConnectionType> {
self.connection_type.as_ref()
}
pub fn static_ip_connection_info(
&self,
) -> std::option::Option<&crate::model::StaticIpConnectionInfo> {
self.static_ip_connection_info.as_ref()
}
}
impl std::fmt::Debug for EthernetPayload {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EthernetPayload");
formatter.field("connection_type", &self.connection_type);
formatter.field("static_ip_connection_info", &self.static_ip_connection_info);
formatter.finish()
}
}
pub mod ethernet_payload {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_type: std::option::Option<crate::model::ConnectionType>,
pub(crate) static_ip_connection_info:
std::option::Option<crate::model::StaticIpConnectionInfo>,
}
impl Builder {
pub fn connection_type(mut self, input: crate::model::ConnectionType) -> Self {
self.connection_type = Some(input);
self
}
pub fn set_connection_type(
mut self,
input: std::option::Option<crate::model::ConnectionType>,
) -> Self {
self.connection_type = input;
self
}
pub fn static_ip_connection_info(
mut self,
input: crate::model::StaticIpConnectionInfo,
) -> Self {
self.static_ip_connection_info = Some(input);
self
}
pub fn set_static_ip_connection_info(
mut self,
input: std::option::Option<crate::model::StaticIpConnectionInfo>,
) -> Self {
self.static_ip_connection_info = input;
self
}
pub fn build(self) -> crate::model::EthernetPayload {
crate::model::EthernetPayload {
connection_type: self.connection_type,
static_ip_connection_info: self.static_ip_connection_info,
}
}
}
}
impl EthernetPayload {
pub fn builder() -> crate::model::ethernet_payload::Builder {
crate::model::ethernet_payload::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StaticIpConnectionInfo {
pub ip_address: std::option::Option<std::string::String>,
pub mask: std::option::Option<std::string::String>,
pub dns: std::option::Option<std::vec::Vec<std::string::String>>,
pub default_gateway: std::option::Option<std::string::String>,
}
impl StaticIpConnectionInfo {
pub fn ip_address(&self) -> std::option::Option<&str> {
self.ip_address.as_deref()
}
pub fn mask(&self) -> std::option::Option<&str> {
self.mask.as_deref()
}
pub fn dns(&self) -> std::option::Option<&[std::string::String]> {
self.dns.as_deref()
}
pub fn default_gateway(&self) -> std::option::Option<&str> {
self.default_gateway.as_deref()
}
}
impl std::fmt::Debug for StaticIpConnectionInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StaticIpConnectionInfo");
formatter.field("ip_address", &self.ip_address);
formatter.field("mask", &self.mask);
formatter.field("dns", &self.dns);
formatter.field("default_gateway", &self.default_gateway);
formatter.finish()
}
}
pub mod static_ip_connection_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ip_address: std::option::Option<std::string::String>,
pub(crate) mask: std::option::Option<std::string::String>,
pub(crate) dns: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) default_gateway: std::option::Option<std::string::String>,
}
impl Builder {
pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
self.ip_address = Some(input.into());
self
}
pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_address = input;
self
}
pub fn mask(mut self, input: impl Into<std::string::String>) -> Self {
self.mask = Some(input.into());
self
}
pub fn set_mask(mut self, input: std::option::Option<std::string::String>) -> Self {
self.mask = input;
self
}
pub fn dns(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.dns.unwrap_or_default();
v.push(input.into());
self.dns = Some(v);
self
}
pub fn set_dns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.dns = input;
self
}
pub fn default_gateway(mut self, input: impl Into<std::string::String>) -> Self {
self.default_gateway = Some(input.into());
self
}
pub fn set_default_gateway(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.default_gateway = input;
self
}
pub fn build(self) -> crate::model::StaticIpConnectionInfo {
crate::model::StaticIpConnectionInfo {
ip_address: self.ip_address,
mask: self.mask,
dns: self.dns,
default_gateway: self.default_gateway,
}
}
}
}
impl StaticIpConnectionInfo {
pub fn builder() -> crate::model::static_ip_connection_info::Builder {
crate::model::static_ip_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 ConnectionType {
#[allow(missing_docs)] Dhcp,
#[allow(missing_docs)] StaticIp,
Unknown(String),
}
impl std::convert::From<&str> for ConnectionType {
fn from(s: &str) -> Self {
match s {
"DHCP" => ConnectionType::Dhcp,
"STATIC_IP" => ConnectionType::StaticIp,
other => ConnectionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ConnectionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ConnectionType::from(s))
}
}
impl ConnectionType {
pub fn as_str(&self) -> &str {
match self {
ConnectionType::Dhcp => "DHCP",
ConnectionType::StaticIp => "STATIC_IP",
ConnectionType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["DHCP", "STATIC_IP"]
}
}
impl AsRef<str> for ConnectionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageListItem {
pub package_id: std::option::Option<std::string::String>,
pub package_name: std::option::Option<std::string::String>,
pub arn: std::option::Option<std::string::String>,
pub created_time: std::option::Option<aws_smithy_types::DateTime>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl PackageListItem {
pub fn package_id(&self) -> std::option::Option<&str> {
self.package_id.as_deref()
}
pub fn package_name(&self) -> std::option::Option<&str> {
self.package_name.as_deref()
}
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_time.as_ref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for PackageListItem {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageListItem");
formatter.field("package_id", &self.package_id);
formatter.field("package_name", &self.package_name);
formatter.field("arn", &self.arn);
formatter.field("created_time", &self.created_time);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod package_list_item {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) package_id: std::option::Option<std::string::String>,
pub(crate) package_name: std::option::Option<std::string::String>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) created_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn package_id(mut self, input: impl Into<std::string::String>) -> Self {
self.package_id = Some(input.into());
self
}
pub fn set_package_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.package_id = 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 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 created_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_time = Some(input);
self
}
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_time = 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::PackageListItem {
crate::model::PackageListItem {
package_id: self.package_id,
package_name: self.package_name,
arn: self.arn,
created_time: self.created_time,
tags: self.tags,
}
}
}
}
impl PackageListItem {
pub fn builder() -> crate::model::package_list_item::Builder {
crate::model::package_list_item::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageImportJob {
pub job_id: std::option::Option<std::string::String>,
pub job_type: std::option::Option<crate::model::PackageImportJobType>,
pub status: std::option::Option<crate::model::PackageImportJobStatus>,
pub status_message: std::option::Option<std::string::String>,
pub created_time: std::option::Option<aws_smithy_types::DateTime>,
pub last_updated_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl PackageImportJob {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
pub fn job_type(&self) -> std::option::Option<&crate::model::PackageImportJobType> {
self.job_type.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::PackageImportJobStatus> {
self.status.as_ref()
}
pub fn status_message(&self) -> std::option::Option<&str> {
self.status_message.as_deref()
}
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_time.as_ref()
}
pub fn last_updated_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_updated_time.as_ref()
}
}
impl std::fmt::Debug for PackageImportJob {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageImportJob");
formatter.field("job_id", &self.job_id);
formatter.field("job_type", &self.job_type);
formatter.field("status", &self.status);
formatter.field("status_message", &self.status_message);
formatter.field("created_time", &self.created_time);
formatter.field("last_updated_time", &self.last_updated_time);
formatter.finish()
}
}
pub mod package_import_job {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
pub(crate) job_type: std::option::Option<crate::model::PackageImportJobType>,
pub(crate) status: std::option::Option<crate::model::PackageImportJobStatus>,
pub(crate) status_message: std::option::Option<std::string::String>,
pub(crate) created_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) last_updated_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.job_id = Some(input.into());
self
}
pub fn set_job_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_id = input;
self
}
pub fn job_type(mut self, input: crate::model::PackageImportJobType) -> Self {
self.job_type = Some(input);
self
}
pub fn set_job_type(
mut self,
input: std::option::Option<crate::model::PackageImportJobType>,
) -> Self {
self.job_type = input;
self
}
pub fn status(mut self, input: crate::model::PackageImportJobStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::PackageImportJobStatus>,
) -> Self {
self.status = input;
self
}
pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
self.status_message = Some(input.into());
self
}
pub fn set_status_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.status_message = input;
self
}
pub fn created_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_time = Some(input);
self
}
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_time = input;
self
}
pub fn last_updated_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_updated_time = Some(input);
self
}
pub fn set_last_updated_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_updated_time = input;
self
}
pub fn build(self) -> crate::model::PackageImportJob {
crate::model::PackageImportJob {
job_id: self.job_id,
job_type: self.job_type,
status: self.status,
status_message: self.status_message,
created_time: self.created_time,
last_updated_time: self.last_updated_time,
}
}
}
}
impl PackageImportJob {
pub fn builder() -> crate::model::package_import_job::Builder {
crate::model::package_import_job::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 PackageImportJobStatus {
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Succeeded,
Unknown(String),
}
impl std::convert::From<&str> for PackageImportJobStatus {
fn from(s: &str) -> Self {
match s {
"FAILED" => PackageImportJobStatus::Failed,
"PENDING" => PackageImportJobStatus::Pending,
"SUCCEEDED" => PackageImportJobStatus::Succeeded,
other => PackageImportJobStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PackageImportJobStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PackageImportJobStatus::from(s))
}
}
impl PackageImportJobStatus {
pub fn as_str(&self) -> &str {
match self {
PackageImportJobStatus::Failed => "FAILED",
PackageImportJobStatus::Pending => "PENDING",
PackageImportJobStatus::Succeeded => "SUCCEEDED",
PackageImportJobStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["FAILED", "PENDING", "SUCCEEDED"]
}
}
impl AsRef<str> for PackageImportJobStatus {
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 PackageImportJobType {
#[allow(missing_docs)] NodePackageVersion,
Unknown(String),
}
impl std::convert::From<&str> for PackageImportJobType {
fn from(s: &str) -> Self {
match s {
"NODE_PACKAGE_VERSION" => PackageImportJobType::NodePackageVersion,
other => PackageImportJobType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PackageImportJobType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PackageImportJobType::from(s))
}
}
impl PackageImportJobType {
pub fn as_str(&self) -> &str {
match self {
PackageImportJobType::NodePackageVersion => "NODE_PACKAGE_VERSION",
PackageImportJobType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["NODE_PACKAGE_VERSION"]
}
}
impl AsRef<str> for PackageImportJobType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Node {
pub node_id: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
pub category: std::option::Option<crate::model::NodeCategory>,
pub owner_account: std::option::Option<std::string::String>,
pub package_name: std::option::Option<std::string::String>,
pub package_id: std::option::Option<std::string::String>,
pub package_arn: std::option::Option<std::string::String>,
pub package_version: std::option::Option<std::string::String>,
pub patch_version: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub created_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Node {
pub fn node_id(&self) -> std::option::Option<&str> {
self.node_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn category(&self) -> std::option::Option<&crate::model::NodeCategory> {
self.category.as_ref()
}
pub fn owner_account(&self) -> std::option::Option<&str> {
self.owner_account.as_deref()
}
pub fn package_name(&self) -> std::option::Option<&str> {
self.package_name.as_deref()
}
pub fn package_id(&self) -> std::option::Option<&str> {
self.package_id.as_deref()
}
pub fn package_arn(&self) -> std::option::Option<&str> {
self.package_arn.as_deref()
}
pub fn package_version(&self) -> std::option::Option<&str> {
self.package_version.as_deref()
}
pub fn patch_version(&self) -> std::option::Option<&str> {
self.patch_version.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_time.as_ref()
}
}
impl std::fmt::Debug for Node {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Node");
formatter.field("node_id", &self.node_id);
formatter.field("name", &self.name);
formatter.field("category", &self.category);
formatter.field("owner_account", &self.owner_account);
formatter.field("package_name", &self.package_name);
formatter.field("package_id", &self.package_id);
formatter.field("package_arn", &self.package_arn);
formatter.field("package_version", &self.package_version);
formatter.field("patch_version", &self.patch_version);
formatter.field("description", &self.description);
formatter.field("created_time", &self.created_time);
formatter.finish()
}
}
pub mod node {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) node_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) category: std::option::Option<crate::model::NodeCategory>,
pub(crate) owner_account: std::option::Option<std::string::String>,
pub(crate) package_name: std::option::Option<std::string::String>,
pub(crate) package_id: std::option::Option<std::string::String>,
pub(crate) package_arn: std::option::Option<std::string::String>,
pub(crate) package_version: std::option::Option<std::string::String>,
pub(crate) patch_version: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) created_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn node_id(mut self, input: impl Into<std::string::String>) -> Self {
self.node_id = Some(input.into());
self
}
pub fn set_node_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.node_id = input;
self
}
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 category(mut self, input: crate::model::NodeCategory) -> Self {
self.category = Some(input);
self
}
pub fn set_category(
mut self,
input: std::option::Option<crate::model::NodeCategory>,
) -> Self {
self.category = input;
self
}
pub fn owner_account(mut self, input: impl Into<std::string::String>) -> Self {
self.owner_account = Some(input.into());
self
}
pub fn set_owner_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.owner_account = 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 package_id(mut self, input: impl Into<std::string::String>) -> Self {
self.package_id = Some(input.into());
self
}
pub fn set_package_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.package_id = input;
self
}
pub fn package_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.package_arn = Some(input.into());
self
}
pub fn set_package_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.package_arn = input;
self
}
pub fn package_version(mut self, input: impl Into<std::string::String>) -> Self {
self.package_version = Some(input.into());
self
}
pub fn set_package_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.package_version = input;
self
}
pub fn patch_version(mut self, input: impl Into<std::string::String>) -> Self {
self.patch_version = Some(input.into());
self
}
pub fn set_patch_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.patch_version = 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 created_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_time = Some(input);
self
}
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_time = input;
self
}
pub fn build(self) -> crate::model::Node {
crate::model::Node {
node_id: self.node_id,
name: self.name,
category: self.category,
owner_account: self.owner_account,
package_name: self.package_name,
package_id: self.package_id,
package_arn: self.package_arn,
package_version: self.package_version,
patch_version: self.patch_version,
description: self.description,
created_time: self.created_time,
}
}
}
}
impl Node {
pub fn builder() -> crate::model::node::Builder {
crate::model::node::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 NodeCategory {
#[allow(missing_docs)] BusinessLogic,
#[allow(missing_docs)] MediaSink,
#[allow(missing_docs)] MediaSource,
#[allow(missing_docs)] MlModel,
Unknown(String),
}
impl std::convert::From<&str> for NodeCategory {
fn from(s: &str) -> Self {
match s {
"BUSINESS_LOGIC" => NodeCategory::BusinessLogic,
"MEDIA_SINK" => NodeCategory::MediaSink,
"MEDIA_SOURCE" => NodeCategory::MediaSource,
"ML_MODEL" => NodeCategory::MlModel,
other => NodeCategory::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NodeCategory {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NodeCategory::from(s))
}
}
impl NodeCategory {
pub fn as_str(&self) -> &str {
match self {
NodeCategory::BusinessLogic => "BUSINESS_LOGIC",
NodeCategory::MediaSink => "MEDIA_SINK",
NodeCategory::MediaSource => "MEDIA_SOURCE",
NodeCategory::MlModel => "ML_MODEL",
NodeCategory::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["BUSINESS_LOGIC", "MEDIA_SINK", "MEDIA_SOURCE", "ML_MODEL"]
}
}
impl AsRef<str> for NodeCategory {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NodeFromTemplateJob {
pub job_id: std::option::Option<std::string::String>,
pub template_type: std::option::Option<crate::model::TemplateType>,
pub status: std::option::Option<crate::model::NodeFromTemplateJobStatus>,
pub status_message: std::option::Option<std::string::String>,
pub created_time: std::option::Option<aws_smithy_types::DateTime>,
pub node_name: std::option::Option<std::string::String>,
}
impl NodeFromTemplateJob {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
self.template_type.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::NodeFromTemplateJobStatus> {
self.status.as_ref()
}
pub fn status_message(&self) -> std::option::Option<&str> {
self.status_message.as_deref()
}
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_time.as_ref()
}
pub fn node_name(&self) -> std::option::Option<&str> {
self.node_name.as_deref()
}
}
impl std::fmt::Debug for NodeFromTemplateJob {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NodeFromTemplateJob");
formatter.field("job_id", &self.job_id);
formatter.field("template_type", &self.template_type);
formatter.field("status", &self.status);
formatter.field("status_message", &self.status_message);
formatter.field("created_time", &self.created_time);
formatter.field("node_name", &self.node_name);
formatter.finish()
}
}
pub mod node_from_template_job {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
pub(crate) status: std::option::Option<crate::model::NodeFromTemplateJobStatus>,
pub(crate) status_message: std::option::Option<std::string::String>,
pub(crate) created_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) node_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.job_id = Some(input.into());
self
}
pub fn set_job_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_id = input;
self
}
pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
self.template_type = Some(input);
self
}
pub fn set_template_type(
mut self,
input: std::option::Option<crate::model::TemplateType>,
) -> Self {
self.template_type = input;
self
}
pub fn status(mut self, input: crate::model::NodeFromTemplateJobStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::NodeFromTemplateJobStatus>,
) -> Self {
self.status = input;
self
}
pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
self.status_message = Some(input.into());
self
}
pub fn set_status_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.status_message = input;
self
}
pub fn created_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_time = Some(input);
self
}
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_time = input;
self
}
pub fn node_name(mut self, input: impl Into<std::string::String>) -> Self {
self.node_name = Some(input.into());
self
}
pub fn set_node_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.node_name = input;
self
}
pub fn build(self) -> crate::model::NodeFromTemplateJob {
crate::model::NodeFromTemplateJob {
job_id: self.job_id,
template_type: self.template_type,
status: self.status,
status_message: self.status_message,
created_time: self.created_time,
node_name: self.node_name,
}
}
}
}
impl NodeFromTemplateJob {
pub fn builder() -> crate::model::node_from_template_job::Builder {
crate::model::node_from_template_job::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 NodeFromTemplateJobStatus {
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Succeeded,
Unknown(String),
}
impl std::convert::From<&str> for NodeFromTemplateJobStatus {
fn from(s: &str) -> Self {
match s {
"FAILED" => NodeFromTemplateJobStatus::Failed,
"PENDING" => NodeFromTemplateJobStatus::Pending,
"SUCCEEDED" => NodeFromTemplateJobStatus::Succeeded,
other => NodeFromTemplateJobStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NodeFromTemplateJobStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NodeFromTemplateJobStatus::from(s))
}
}
impl NodeFromTemplateJobStatus {
pub fn as_str(&self) -> &str {
match self {
NodeFromTemplateJobStatus::Failed => "FAILED",
NodeFromTemplateJobStatus::Pending => "PENDING",
NodeFromTemplateJobStatus::Succeeded => "SUCCEEDED",
NodeFromTemplateJobStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["FAILED", "PENDING", "SUCCEEDED"]
}
}
impl AsRef<str> for NodeFromTemplateJobStatus {
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 TemplateType {
#[allow(missing_docs)] RtspCameraStream,
Unknown(String),
}
impl std::convert::From<&str> for TemplateType {
fn from(s: &str) -> Self {
match s {
"RTSP_CAMERA_STREAM" => TemplateType::RtspCameraStream,
other => TemplateType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TemplateType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TemplateType::from(s))
}
}
impl TemplateType {
pub fn as_str(&self) -> &str {
match self {
TemplateType::RtspCameraStream => "RTSP_CAMERA_STREAM",
TemplateType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["RTSP_CAMERA_STREAM"]
}
}
impl AsRef<str> for TemplateType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeviceJob {
pub device_name: std::option::Option<std::string::String>,
pub device_id: std::option::Option<std::string::String>,
pub job_id: std::option::Option<std::string::String>,
pub created_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl DeviceJob {
pub fn device_name(&self) -> std::option::Option<&str> {
self.device_name.as_deref()
}
pub fn device_id(&self) -> std::option::Option<&str> {
self.device_id.as_deref()
}
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_time.as_ref()
}
}
impl std::fmt::Debug for DeviceJob {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeviceJob");
formatter.field("device_name", &self.device_name);
formatter.field("device_id", &self.device_id);
formatter.field("job_id", &self.job_id);
formatter.field("created_time", &self.created_time);
formatter.finish()
}
}
pub mod device_job {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) device_name: std::option::Option<std::string::String>,
pub(crate) device_id: std::option::Option<std::string::String>,
pub(crate) job_id: std::option::Option<std::string::String>,
pub(crate) created_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
self.device_name = Some(input.into());
self
}
pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_name = input;
self
}
pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.device_id = Some(input.into());
self
}
pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_id = input;
self
}
pub fn job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.job_id = Some(input.into());
self
}
pub fn set_job_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_id = input;
self
}
pub fn created_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_time = Some(input);
self
}
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_time = input;
self
}
pub fn build(self) -> crate::model::DeviceJob {
crate::model::DeviceJob {
device_name: self.device_name,
device_id: self.device_id,
job_id: self.job_id,
created_time: self.created_time,
}
}
}
}
impl DeviceJob {
pub fn builder() -> crate::model::device_job::Builder {
crate::model::device_job::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Device {
pub device_id: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
pub created_time: std::option::Option<aws_smithy_types::DateTime>,
pub provisioning_status: std::option::Option<crate::model::DeviceStatus>,
pub last_updated_time: std::option::Option<aws_smithy_types::DateTime>,
pub lease_expiration_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Device {
pub fn device_id(&self) -> std::option::Option<&str> {
self.device_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_time.as_ref()
}
pub fn provisioning_status(&self) -> std::option::Option<&crate::model::DeviceStatus> {
self.provisioning_status.as_ref()
}
pub fn last_updated_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_updated_time.as_ref()
}
pub fn lease_expiration_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.lease_expiration_time.as_ref()
}
}
impl std::fmt::Debug for Device {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Device");
formatter.field("device_id", &self.device_id);
formatter.field("name", &self.name);
formatter.field("created_time", &self.created_time);
formatter.field("provisioning_status", &self.provisioning_status);
formatter.field("last_updated_time", &self.last_updated_time);
formatter.field("lease_expiration_time", &self.lease_expiration_time);
formatter.finish()
}
}
pub mod device {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) device_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) created_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) provisioning_status: std::option::Option<crate::model::DeviceStatus>,
pub(crate) last_updated_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) lease_expiration_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.device_id = Some(input.into());
self
}
pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_id = input;
self
}
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 created_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_time = Some(input);
self
}
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_time = input;
self
}
pub fn provisioning_status(mut self, input: crate::model::DeviceStatus) -> Self {
self.provisioning_status = Some(input);
self
}
pub fn set_provisioning_status(
mut self,
input: std::option::Option<crate::model::DeviceStatus>,
) -> Self {
self.provisioning_status = input;
self
}
pub fn last_updated_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_updated_time = Some(input);
self
}
pub fn set_last_updated_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_updated_time = input;
self
}
pub fn lease_expiration_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.lease_expiration_time = Some(input);
self
}
pub fn set_lease_expiration_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.lease_expiration_time = input;
self
}
pub fn build(self) -> crate::model::Device {
crate::model::Device {
device_id: self.device_id,
name: self.name,
created_time: self.created_time,
provisioning_status: self.provisioning_status,
last_updated_time: self.last_updated_time,
lease_expiration_time: self.lease_expiration_time,
}
}
}
}
impl Device {
pub fn builder() -> crate::model::device::Builder {
crate::model::device::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ApplicationInstance {
pub name: std::option::Option<std::string::String>,
pub application_instance_id: std::option::Option<std::string::String>,
pub default_runtime_context_device: std::option::Option<std::string::String>,
pub default_runtime_context_device_name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::ApplicationInstanceStatus>,
pub health_status: std::option::Option<crate::model::ApplicationInstanceHealthStatus>,
pub status_description: std::option::Option<std::string::String>,
pub created_time: std::option::Option<aws_smithy_types::DateTime>,
pub arn: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl ApplicationInstance {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn application_instance_id(&self) -> std::option::Option<&str> {
self.application_instance_id.as_deref()
}
pub fn default_runtime_context_device(&self) -> std::option::Option<&str> {
self.default_runtime_context_device.as_deref()
}
pub fn default_runtime_context_device_name(&self) -> std::option::Option<&str> {
self.default_runtime_context_device_name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::ApplicationInstanceStatus> {
self.status.as_ref()
}
pub fn health_status(
&self,
) -> std::option::Option<&crate::model::ApplicationInstanceHealthStatus> {
self.health_status.as_ref()
}
pub fn status_description(&self) -> std::option::Option<&str> {
self.status_description.as_deref()
}
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_time.as_ref()
}
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for ApplicationInstance {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ApplicationInstance");
formatter.field("name", &self.name);
formatter.field("application_instance_id", &self.application_instance_id);
formatter.field(
"default_runtime_context_device",
&self.default_runtime_context_device,
);
formatter.field(
"default_runtime_context_device_name",
&self.default_runtime_context_device_name,
);
formatter.field("description", &self.description);
formatter.field("status", &self.status);
formatter.field("health_status", &self.health_status);
formatter.field("status_description", &self.status_description);
formatter.field("created_time", &self.created_time);
formatter.field("arn", &self.arn);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod application_instance {
#[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) application_instance_id: std::option::Option<std::string::String>,
pub(crate) default_runtime_context_device: std::option::Option<std::string::String>,
pub(crate) default_runtime_context_device_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::ApplicationInstanceStatus>,
pub(crate) health_status:
std::option::Option<crate::model::ApplicationInstanceHealthStatus>,
pub(crate) status_description: std::option::Option<std::string::String>,
pub(crate) created_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) arn: 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 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 application_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.application_instance_id = Some(input.into());
self
}
pub fn set_application_instance_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_instance_id = input;
self
}
pub fn default_runtime_context_device(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.default_runtime_context_device = Some(input.into());
self
}
pub fn set_default_runtime_context_device(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.default_runtime_context_device = input;
self
}
pub fn default_runtime_context_device_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.default_runtime_context_device_name = Some(input.into());
self
}
pub fn set_default_runtime_context_device_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.default_runtime_context_device_name = 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 status(mut self, input: crate::model::ApplicationInstanceStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ApplicationInstanceStatus>,
) -> Self {
self.status = input;
self
}
pub fn health_status(
mut self,
input: crate::model::ApplicationInstanceHealthStatus,
) -> Self {
self.health_status = Some(input);
self
}
pub fn set_health_status(
mut self,
input: std::option::Option<crate::model::ApplicationInstanceHealthStatus>,
) -> Self {
self.health_status = input;
self
}
pub fn status_description(mut self, input: impl Into<std::string::String>) -> Self {
self.status_description = Some(input.into());
self
}
pub fn set_status_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.status_description = input;
self
}
pub fn created_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_time = Some(input);
self
}
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_time = 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 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::ApplicationInstance {
crate::model::ApplicationInstance {
name: self.name,
application_instance_id: self.application_instance_id,
default_runtime_context_device: self.default_runtime_context_device,
default_runtime_context_device_name: self.default_runtime_context_device_name,
description: self.description,
status: self.status,
health_status: self.health_status,
status_description: self.status_description,
created_time: self.created_time,
arn: self.arn,
tags: self.tags,
}
}
}
}
impl ApplicationInstance {
pub fn builder() -> crate::model::application_instance::Builder {
crate::model::application_instance::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 ApplicationInstanceHealthStatus {
#[allow(missing_docs)] Error,
#[allow(missing_docs)] NotAvailable,
#[allow(missing_docs)] Running,
Unknown(String),
}
impl std::convert::From<&str> for ApplicationInstanceHealthStatus {
fn from(s: &str) -> Self {
match s {
"ERROR" => ApplicationInstanceHealthStatus::Error,
"NOT_AVAILABLE" => ApplicationInstanceHealthStatus::NotAvailable,
"RUNNING" => ApplicationInstanceHealthStatus::Running,
other => ApplicationInstanceHealthStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ApplicationInstanceHealthStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ApplicationInstanceHealthStatus::from(s))
}
}
impl ApplicationInstanceHealthStatus {
pub fn as_str(&self) -> &str {
match self {
ApplicationInstanceHealthStatus::Error => "ERROR",
ApplicationInstanceHealthStatus::NotAvailable => "NOT_AVAILABLE",
ApplicationInstanceHealthStatus::Running => "RUNNING",
ApplicationInstanceHealthStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ERROR", "NOT_AVAILABLE", "RUNNING"]
}
}
impl AsRef<str> for ApplicationInstanceHealthStatus {
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 ApplicationInstanceStatus {
#[allow(missing_docs)] DeploymentError,
#[allow(missing_docs)] DeploymentInProgress,
#[allow(missing_docs)] DeploymentPending,
#[allow(missing_docs)] DeploymentRequested,
#[allow(missing_docs)] DeploymentSucceeded,
#[allow(missing_docs)] RemovalFailed,
#[allow(missing_docs)] RemovalInProgress,
#[allow(missing_docs)] RemovalPending,
#[allow(missing_docs)] RemovalRequested,
#[allow(missing_docs)] RemovalSucceeded,
Unknown(String),
}
impl std::convert::From<&str> for ApplicationInstanceStatus {
fn from(s: &str) -> Self {
match s {
"DEPLOYMENT_ERROR" => ApplicationInstanceStatus::DeploymentError,
"DEPLOYMENT_IN_PROGRESS" => ApplicationInstanceStatus::DeploymentInProgress,
"DEPLOYMENT_PENDING" => ApplicationInstanceStatus::DeploymentPending,
"DEPLOYMENT_REQUESTED" => ApplicationInstanceStatus::DeploymentRequested,
"DEPLOYMENT_SUCCEEDED" => ApplicationInstanceStatus::DeploymentSucceeded,
"REMOVAL_FAILED" => ApplicationInstanceStatus::RemovalFailed,
"REMOVAL_IN_PROGRESS" => ApplicationInstanceStatus::RemovalInProgress,
"REMOVAL_PENDING" => ApplicationInstanceStatus::RemovalPending,
"REMOVAL_REQUESTED" => ApplicationInstanceStatus::RemovalRequested,
"REMOVAL_SUCCEEDED" => ApplicationInstanceStatus::RemovalSucceeded,
other => ApplicationInstanceStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ApplicationInstanceStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ApplicationInstanceStatus::from(s))
}
}
impl ApplicationInstanceStatus {
pub fn as_str(&self) -> &str {
match self {
ApplicationInstanceStatus::DeploymentError => "DEPLOYMENT_ERROR",
ApplicationInstanceStatus::DeploymentInProgress => "DEPLOYMENT_IN_PROGRESS",
ApplicationInstanceStatus::DeploymentPending => "DEPLOYMENT_PENDING",
ApplicationInstanceStatus::DeploymentRequested => "DEPLOYMENT_REQUESTED",
ApplicationInstanceStatus::DeploymentSucceeded => "DEPLOYMENT_SUCCEEDED",
ApplicationInstanceStatus::RemovalFailed => "REMOVAL_FAILED",
ApplicationInstanceStatus::RemovalInProgress => "REMOVAL_IN_PROGRESS",
ApplicationInstanceStatus::RemovalPending => "REMOVAL_PENDING",
ApplicationInstanceStatus::RemovalRequested => "REMOVAL_REQUESTED",
ApplicationInstanceStatus::RemovalSucceeded => "REMOVAL_SUCCEEDED",
ApplicationInstanceStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"DEPLOYMENT_ERROR",
"DEPLOYMENT_IN_PROGRESS",
"DEPLOYMENT_PENDING",
"DEPLOYMENT_REQUESTED",
"DEPLOYMENT_SUCCEEDED",
"REMOVAL_FAILED",
"REMOVAL_IN_PROGRESS",
"REMOVAL_PENDING",
"REMOVAL_REQUESTED",
"REMOVAL_SUCCEEDED",
]
}
}
impl AsRef<str> for ApplicationInstanceStatus {
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 StatusFilter {
#[allow(missing_docs)] DeploymentError,
#[allow(missing_docs)] DeploymentSucceeded,
#[allow(missing_docs)] ProcessingDeployment,
#[allow(missing_docs)] ProcessingRemoval,
#[allow(missing_docs)] RemovalFailed,
#[allow(missing_docs)] RemovalSucceeded,
Unknown(String),
}
impl std::convert::From<&str> for StatusFilter {
fn from(s: &str) -> Self {
match s {
"DEPLOYMENT_ERROR" => StatusFilter::DeploymentError,
"DEPLOYMENT_SUCCEEDED" => StatusFilter::DeploymentSucceeded,
"PROCESSING_DEPLOYMENT" => StatusFilter::ProcessingDeployment,
"PROCESSING_REMOVAL" => StatusFilter::ProcessingRemoval,
"REMOVAL_FAILED" => StatusFilter::RemovalFailed,
"REMOVAL_SUCCEEDED" => StatusFilter::RemovalSucceeded,
other => StatusFilter::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for StatusFilter {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(StatusFilter::from(s))
}
}
impl StatusFilter {
pub fn as_str(&self) -> &str {
match self {
StatusFilter::DeploymentError => "DEPLOYMENT_ERROR",
StatusFilter::DeploymentSucceeded => "DEPLOYMENT_SUCCEEDED",
StatusFilter::ProcessingDeployment => "PROCESSING_DEPLOYMENT",
StatusFilter::ProcessingRemoval => "PROCESSING_REMOVAL",
StatusFilter::RemovalFailed => "REMOVAL_FAILED",
StatusFilter::RemovalSucceeded => "REMOVAL_SUCCEEDED",
StatusFilter::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"DEPLOYMENT_ERROR",
"DEPLOYMENT_SUCCEEDED",
"PROCESSING_DEPLOYMENT",
"PROCESSING_REMOVAL",
"REMOVAL_FAILED",
"REMOVAL_SUCCEEDED",
]
}
}
impl AsRef<str> for StatusFilter {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NodeInstance {
pub node_instance_id: std::option::Option<std::string::String>,
pub node_id: std::option::Option<std::string::String>,
pub package_name: std::option::Option<std::string::String>,
pub package_version: std::option::Option<std::string::String>,
pub package_patch_version: std::option::Option<std::string::String>,
pub node_name: std::option::Option<std::string::String>,
pub current_status: std::option::Option<crate::model::NodeInstanceStatus>,
}
impl NodeInstance {
pub fn node_instance_id(&self) -> std::option::Option<&str> {
self.node_instance_id.as_deref()
}
pub fn node_id(&self) -> std::option::Option<&str> {
self.node_id.as_deref()
}
pub fn package_name(&self) -> std::option::Option<&str> {
self.package_name.as_deref()
}
pub fn package_version(&self) -> std::option::Option<&str> {
self.package_version.as_deref()
}
pub fn package_patch_version(&self) -> std::option::Option<&str> {
self.package_patch_version.as_deref()
}
pub fn node_name(&self) -> std::option::Option<&str> {
self.node_name.as_deref()
}
pub fn current_status(&self) -> std::option::Option<&crate::model::NodeInstanceStatus> {
self.current_status.as_ref()
}
}
impl std::fmt::Debug for NodeInstance {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NodeInstance");
formatter.field("node_instance_id", &self.node_instance_id);
formatter.field("node_id", &self.node_id);
formatter.field("package_name", &self.package_name);
formatter.field("package_version", &self.package_version);
formatter.field("package_patch_version", &self.package_patch_version);
formatter.field("node_name", &self.node_name);
formatter.field("current_status", &self.current_status);
formatter.finish()
}
}
pub mod node_instance {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) node_instance_id: std::option::Option<std::string::String>,
pub(crate) node_id: std::option::Option<std::string::String>,
pub(crate) package_name: std::option::Option<std::string::String>,
pub(crate) package_version: std::option::Option<std::string::String>,
pub(crate) package_patch_version: std::option::Option<std::string::String>,
pub(crate) node_name: std::option::Option<std::string::String>,
pub(crate) current_status: std::option::Option<crate::model::NodeInstanceStatus>,
}
impl Builder {
pub fn node_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.node_instance_id = Some(input.into());
self
}
pub fn set_node_instance_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.node_instance_id = input;
self
}
pub fn node_id(mut self, input: impl Into<std::string::String>) -> Self {
self.node_id = Some(input.into());
self
}
pub fn set_node_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.node_id = 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 package_version(mut self, input: impl Into<std::string::String>) -> Self {
self.package_version = Some(input.into());
self
}
pub fn set_package_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.package_version = input;
self
}
pub fn package_patch_version(mut self, input: impl Into<std::string::String>) -> Self {
self.package_patch_version = Some(input.into());
self
}
pub fn set_package_patch_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.package_patch_version = input;
self
}
pub fn node_name(mut self, input: impl Into<std::string::String>) -> Self {
self.node_name = Some(input.into());
self
}
pub fn set_node_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.node_name = input;
self
}
pub fn current_status(mut self, input: crate::model::NodeInstanceStatus) -> Self {
self.current_status = Some(input);
self
}
pub fn set_current_status(
mut self,
input: std::option::Option<crate::model::NodeInstanceStatus>,
) -> Self {
self.current_status = input;
self
}
pub fn build(self) -> crate::model::NodeInstance {
crate::model::NodeInstance {
node_instance_id: self.node_instance_id,
node_id: self.node_id,
package_name: self.package_name,
package_version: self.package_version,
package_patch_version: self.package_patch_version,
node_name: self.node_name,
current_status: self.current_status,
}
}
}
}
impl NodeInstance {
pub fn builder() -> crate::model::node_instance::Builder {
crate::model::node_instance::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 NodeInstanceStatus {
#[allow(missing_docs)] Error,
#[allow(missing_docs)] NotAvailable,
#[allow(missing_docs)] Running,
Unknown(String),
}
impl std::convert::From<&str> for NodeInstanceStatus {
fn from(s: &str) -> Self {
match s {
"ERROR" => NodeInstanceStatus::Error,
"NOT_AVAILABLE" => NodeInstanceStatus::NotAvailable,
"RUNNING" => NodeInstanceStatus::Running,
other => NodeInstanceStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NodeInstanceStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NodeInstanceStatus::from(s))
}
}
impl NodeInstanceStatus {
pub fn as_str(&self) -> &str {
match self {
NodeInstanceStatus::Error => "ERROR",
NodeInstanceStatus::NotAvailable => "NOT_AVAILABLE",
NodeInstanceStatus::Running => "RUNNING",
NodeInstanceStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ERROR", "NOT_AVAILABLE", "RUNNING"]
}
}
impl AsRef<str> for NodeInstanceStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageObject {
pub name: std::option::Option<std::string::String>,
pub package_version: std::option::Option<std::string::String>,
pub patch_version: std::option::Option<std::string::String>,
}
impl PackageObject {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn package_version(&self) -> std::option::Option<&str> {
self.package_version.as_deref()
}
pub fn patch_version(&self) -> std::option::Option<&str> {
self.patch_version.as_deref()
}
}
impl std::fmt::Debug for PackageObject {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageObject");
formatter.field("name", &self.name);
formatter.field("package_version", &self.package_version);
formatter.field("patch_version", &self.patch_version);
formatter.finish()
}
}
pub mod package_object {
#[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) package_version: std::option::Option<std::string::String>,
pub(crate) patch_version: 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 package_version(mut self, input: impl Into<std::string::String>) -> Self {
self.package_version = Some(input.into());
self
}
pub fn set_package_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.package_version = input;
self
}
pub fn patch_version(mut self, input: impl Into<std::string::String>) -> Self {
self.patch_version = Some(input.into());
self
}
pub fn set_patch_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.patch_version = input;
self
}
pub fn build(self) -> crate::model::PackageObject {
crate::model::PackageObject {
name: self.name,
package_version: self.package_version,
patch_version: self.patch_version,
}
}
}
}
impl PackageObject {
pub fn builder() -> crate::model::package_object::Builder {
crate::model::package_object::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)] Deleting,
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] RegisterCompleted,
#[allow(missing_docs)] RegisterPending,
Unknown(String),
}
impl std::convert::From<&str> for PackageVersionStatus {
fn from(s: &str) -> Self {
match s {
"DELETING" => PackageVersionStatus::Deleting,
"FAILED" => PackageVersionStatus::Failed,
"REGISTER_COMPLETED" => PackageVersionStatus::RegisterCompleted,
"REGISTER_PENDING" => PackageVersionStatus::RegisterPending,
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::Deleting => "DELETING",
PackageVersionStatus::Failed => "FAILED",
PackageVersionStatus::RegisterCompleted => "REGISTER_COMPLETED",
PackageVersionStatus::RegisterPending => "REGISTER_PENDING",
PackageVersionStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"DELETING",
"FAILED",
"REGISTER_COMPLETED",
"REGISTER_PENDING",
]
}
}
impl AsRef<str> for PackageVersionStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct JobResourceTags {
pub resource_type: std::option::Option<crate::model::JobResourceType>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl JobResourceTags {
pub fn resource_type(&self) -> std::option::Option<&crate::model::JobResourceType> {
self.resource_type.as_ref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for JobResourceTags {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("JobResourceTags");
formatter.field("resource_type", &self.resource_type);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
pub mod job_resource_tags {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type: std::option::Option<crate::model::JobResourceType>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn resource_type(mut self, input: crate::model::JobResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::JobResourceType>,
) -> Self {
self.resource_type = 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::JobResourceTags {
crate::model::JobResourceTags {
resource_type: self.resource_type,
tags: self.tags,
}
}
}
}
impl JobResourceTags {
pub fn builder() -> crate::model::job_resource_tags::Builder {
crate::model::job_resource_tags::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 JobResourceType {
#[allow(missing_docs)] Package,
Unknown(String),
}
impl std::convert::From<&str> for JobResourceType {
fn from(s: &str) -> Self {
match s {
"PACKAGE" => JobResourceType::Package,
other => JobResourceType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for JobResourceType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(JobResourceType::from(s))
}
}
impl JobResourceType {
pub fn as_str(&self) -> &str {
match self {
JobResourceType::Package => "PACKAGE",
JobResourceType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["PACKAGE"]
}
}
impl AsRef<str> for JobResourceType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageImportJobOutput {
pub package_id: std::option::Option<std::string::String>,
pub package_version: std::option::Option<std::string::String>,
pub patch_version: std::option::Option<std::string::String>,
pub output_s3_location: std::option::Option<crate::model::OutPutS3Location>,
}
impl PackageImportJobOutput {
pub fn package_id(&self) -> std::option::Option<&str> {
self.package_id.as_deref()
}
pub fn package_version(&self) -> std::option::Option<&str> {
self.package_version.as_deref()
}
pub fn patch_version(&self) -> std::option::Option<&str> {
self.patch_version.as_deref()
}
pub fn output_s3_location(&self) -> std::option::Option<&crate::model::OutPutS3Location> {
self.output_s3_location.as_ref()
}
}
impl std::fmt::Debug for PackageImportJobOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageImportJobOutput");
formatter.field("package_id", &self.package_id);
formatter.field("package_version", &self.package_version);
formatter.field("patch_version", &self.patch_version);
formatter.field("output_s3_location", &self.output_s3_location);
formatter.finish()
}
}
pub mod package_import_job_output {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) package_id: std::option::Option<std::string::String>,
pub(crate) package_version: std::option::Option<std::string::String>,
pub(crate) patch_version: std::option::Option<std::string::String>,
pub(crate) output_s3_location: std::option::Option<crate::model::OutPutS3Location>,
}
impl Builder {
pub fn package_id(mut self, input: impl Into<std::string::String>) -> Self {
self.package_id = Some(input.into());
self
}
pub fn set_package_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.package_id = input;
self
}
pub fn package_version(mut self, input: impl Into<std::string::String>) -> Self {
self.package_version = Some(input.into());
self
}
pub fn set_package_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.package_version = input;
self
}
pub fn patch_version(mut self, input: impl Into<std::string::String>) -> Self {
self.patch_version = Some(input.into());
self
}
pub fn set_patch_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.patch_version = input;
self
}
pub fn output_s3_location(mut self, input: crate::model::OutPutS3Location) -> Self {
self.output_s3_location = Some(input);
self
}
pub fn set_output_s3_location(
mut self,
input: std::option::Option<crate::model::OutPutS3Location>,
) -> Self {
self.output_s3_location = input;
self
}
pub fn build(self) -> crate::model::PackageImportJobOutput {
crate::model::PackageImportJobOutput {
package_id: self.package_id,
package_version: self.package_version,
patch_version: self.patch_version,
output_s3_location: self.output_s3_location,
}
}
}
}
impl PackageImportJobOutput {
pub fn builder() -> crate::model::package_import_job_output::Builder {
crate::model::package_import_job_output::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OutPutS3Location {
pub bucket_name: std::option::Option<std::string::String>,
pub object_key: std::option::Option<std::string::String>,
}
impl OutPutS3Location {
pub fn bucket_name(&self) -> std::option::Option<&str> {
self.bucket_name.as_deref()
}
pub fn object_key(&self) -> std::option::Option<&str> {
self.object_key.as_deref()
}
}
impl std::fmt::Debug for OutPutS3Location {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OutPutS3Location");
formatter.field("bucket_name", &self.bucket_name);
formatter.field("object_key", &self.object_key);
formatter.finish()
}
}
pub mod out_put_s3_location {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bucket_name: std::option::Option<std::string::String>,
pub(crate) object_key: std::option::Option<std::string::String>,
}
impl Builder {
pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
self.bucket_name = Some(input.into());
self
}
pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bucket_name = input;
self
}
pub fn object_key(mut self, input: impl Into<std::string::String>) -> Self {
self.object_key = Some(input.into());
self
}
pub fn set_object_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.object_key = input;
self
}
pub fn build(self) -> crate::model::OutPutS3Location {
crate::model::OutPutS3Location {
bucket_name: self.bucket_name,
object_key: self.object_key,
}
}
}
}
impl OutPutS3Location {
pub fn builder() -> crate::model::out_put_s3_location::Builder {
crate::model::out_put_s3_location::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageImportJobOutputConfig {
pub package_version_output_config:
std::option::Option<crate::model::PackageVersionOutputConfig>,
}
impl PackageImportJobOutputConfig {
pub fn package_version_output_config(
&self,
) -> std::option::Option<&crate::model::PackageVersionOutputConfig> {
self.package_version_output_config.as_ref()
}
}
impl std::fmt::Debug for PackageImportJobOutputConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageImportJobOutputConfig");
formatter.field(
"package_version_output_config",
&self.package_version_output_config,
);
formatter.finish()
}
}
pub mod package_import_job_output_config {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) package_version_output_config:
std::option::Option<crate::model::PackageVersionOutputConfig>,
}
impl Builder {
pub fn package_version_output_config(
mut self,
input: crate::model::PackageVersionOutputConfig,
) -> Self {
self.package_version_output_config = Some(input);
self
}
pub fn set_package_version_output_config(
mut self,
input: std::option::Option<crate::model::PackageVersionOutputConfig>,
) -> Self {
self.package_version_output_config = input;
self
}
pub fn build(self) -> crate::model::PackageImportJobOutputConfig {
crate::model::PackageImportJobOutputConfig {
package_version_output_config: self.package_version_output_config,
}
}
}
}
impl PackageImportJobOutputConfig {
pub fn builder() -> crate::model::package_import_job_output_config::Builder {
crate::model::package_import_job_output_config::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageVersionOutputConfig {
pub package_name: std::option::Option<std::string::String>,
pub package_version: std::option::Option<std::string::String>,
pub mark_latest: std::option::Option<bool>,
}
impl PackageVersionOutputConfig {
pub fn package_name(&self) -> std::option::Option<&str> {
self.package_name.as_deref()
}
pub fn package_version(&self) -> std::option::Option<&str> {
self.package_version.as_deref()
}
pub fn mark_latest(&self) -> std::option::Option<bool> {
self.mark_latest
}
}
impl std::fmt::Debug for PackageVersionOutputConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageVersionOutputConfig");
formatter.field("package_name", &self.package_name);
formatter.field("package_version", &self.package_version);
formatter.field("mark_latest", &self.mark_latest);
formatter.finish()
}
}
pub mod package_version_output_config {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) package_name: std::option::Option<std::string::String>,
pub(crate) package_version: std::option::Option<std::string::String>,
pub(crate) mark_latest: std::option::Option<bool>,
}
impl Builder {
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 package_version(mut self, input: impl Into<std::string::String>) -> Self {
self.package_version = Some(input.into());
self
}
pub fn set_package_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.package_version = input;
self
}
pub fn mark_latest(mut self, input: bool) -> Self {
self.mark_latest = Some(input);
self
}
pub fn set_mark_latest(mut self, input: std::option::Option<bool>) -> Self {
self.mark_latest = input;
self
}
pub fn build(self) -> crate::model::PackageVersionOutputConfig {
crate::model::PackageVersionOutputConfig {
package_name: self.package_name,
package_version: self.package_version,
mark_latest: self.mark_latest,
}
}
}
}
impl PackageVersionOutputConfig {
pub fn builder() -> crate::model::package_version_output_config::Builder {
crate::model::package_version_output_config::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageImportJobInputConfig {
pub package_version_input_config: std::option::Option<crate::model::PackageVersionInputConfig>,
}
impl PackageImportJobInputConfig {
pub fn package_version_input_config(
&self,
) -> std::option::Option<&crate::model::PackageVersionInputConfig> {
self.package_version_input_config.as_ref()
}
}
impl std::fmt::Debug for PackageImportJobInputConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageImportJobInputConfig");
formatter.field(
"package_version_input_config",
&self.package_version_input_config,
);
formatter.finish()
}
}
pub mod package_import_job_input_config {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) package_version_input_config:
std::option::Option<crate::model::PackageVersionInputConfig>,
}
impl Builder {
pub fn package_version_input_config(
mut self,
input: crate::model::PackageVersionInputConfig,
) -> Self {
self.package_version_input_config = Some(input);
self
}
pub fn set_package_version_input_config(
mut self,
input: std::option::Option<crate::model::PackageVersionInputConfig>,
) -> Self {
self.package_version_input_config = input;
self
}
pub fn build(self) -> crate::model::PackageImportJobInputConfig {
crate::model::PackageImportJobInputConfig {
package_version_input_config: self.package_version_input_config,
}
}
}
}
impl PackageImportJobInputConfig {
pub fn builder() -> crate::model::package_import_job_input_config::Builder {
crate::model::package_import_job_input_config::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageVersionInputConfig {
pub s3_location: std::option::Option<crate::model::S3Location>,
}
impl PackageVersionInputConfig {
pub fn s3_location(&self) -> std::option::Option<&crate::model::S3Location> {
self.s3_location.as_ref()
}
}
impl std::fmt::Debug for PackageVersionInputConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PackageVersionInputConfig");
formatter.field("s3_location", &self.s3_location);
formatter.finish()
}
}
pub mod package_version_input_config {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) s3_location: std::option::Option<crate::model::S3Location>,
}
impl Builder {
pub fn s3_location(mut self, input: crate::model::S3Location) -> Self {
self.s3_location = Some(input);
self
}
pub fn set_s3_location(
mut self,
input: std::option::Option<crate::model::S3Location>,
) -> Self {
self.s3_location = input;
self
}
pub fn build(self) -> crate::model::PackageVersionInputConfig {
crate::model::PackageVersionInputConfig {
s3_location: self.s3_location,
}
}
}
}
impl PackageVersionInputConfig {
pub fn builder() -> crate::model::package_version_input_config::Builder {
crate::model::package_version_input_config::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3Location {
pub region: std::option::Option<std::string::String>,
pub bucket_name: std::option::Option<std::string::String>,
pub object_key: std::option::Option<std::string::String>,
}
impl S3Location {
pub fn region(&self) -> std::option::Option<&str> {
self.region.as_deref()
}
pub fn bucket_name(&self) -> std::option::Option<&str> {
self.bucket_name.as_deref()
}
pub fn object_key(&self) -> std::option::Option<&str> {
self.object_key.as_deref()
}
}
impl std::fmt::Debug for S3Location {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("S3Location");
formatter.field("region", &self.region);
formatter.field("bucket_name", &self.bucket_name);
formatter.field("object_key", &self.object_key);
formatter.finish()
}
}
pub mod s3_location {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) region: std::option::Option<std::string::String>,
pub(crate) bucket_name: std::option::Option<std::string::String>,
pub(crate) object_key: std::option::Option<std::string::String>,
}
impl Builder {
pub fn region(mut self, input: impl Into<std::string::String>) -> Self {
self.region = Some(input.into());
self
}
pub fn set_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.region = input;
self
}
pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
self.bucket_name = Some(input.into());
self
}
pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bucket_name = input;
self
}
pub fn object_key(mut self, input: impl Into<std::string::String>) -> Self {
self.object_key = Some(input.into());
self
}
pub fn set_object_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.object_key = input;
self
}
pub fn build(self) -> crate::model::S3Location {
crate::model::S3Location {
region: self.region,
bucket_name: self.bucket_name,
object_key: self.object_key,
}
}
}
}
impl S3Location {
pub fn builder() -> crate::model::s3_location::Builder {
crate::model::s3_location::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StorageLocation {
pub bucket: std::option::Option<std::string::String>,
pub repo_prefix_location: std::option::Option<std::string::String>,
pub generated_prefix_location: std::option::Option<std::string::String>,
pub binary_prefix_location: std::option::Option<std::string::String>,
pub manifest_prefix_location: std::option::Option<std::string::String>,
}
impl StorageLocation {
pub fn bucket(&self) -> std::option::Option<&str> {
self.bucket.as_deref()
}
pub fn repo_prefix_location(&self) -> std::option::Option<&str> {
self.repo_prefix_location.as_deref()
}
pub fn generated_prefix_location(&self) -> std::option::Option<&str> {
self.generated_prefix_location.as_deref()
}
pub fn binary_prefix_location(&self) -> std::option::Option<&str> {
self.binary_prefix_location.as_deref()
}
pub fn manifest_prefix_location(&self) -> std::option::Option<&str> {
self.manifest_prefix_location.as_deref()
}
}
impl std::fmt::Debug for StorageLocation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StorageLocation");
formatter.field("bucket", &self.bucket);
formatter.field("repo_prefix_location", &self.repo_prefix_location);
formatter.field("generated_prefix_location", &self.generated_prefix_location);
formatter.field("binary_prefix_location", &self.binary_prefix_location);
formatter.field("manifest_prefix_location", &self.manifest_prefix_location);
formatter.finish()
}
}
pub mod storage_location {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bucket: std::option::Option<std::string::String>,
pub(crate) repo_prefix_location: std::option::Option<std::string::String>,
pub(crate) generated_prefix_location: std::option::Option<std::string::String>,
pub(crate) binary_prefix_location: std::option::Option<std::string::String>,
pub(crate) manifest_prefix_location: std::option::Option<std::string::String>,
}
impl Builder {
pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.bucket = Some(input.into());
self
}
pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bucket = input;
self
}
pub fn repo_prefix_location(mut self, input: impl Into<std::string::String>) -> Self {
self.repo_prefix_location = Some(input.into());
self
}
pub fn set_repo_prefix_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repo_prefix_location = input;
self
}
pub fn generated_prefix_location(mut self, input: impl Into<std::string::String>) -> Self {
self.generated_prefix_location = Some(input.into());
self
}
pub fn set_generated_prefix_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.generated_prefix_location = input;
self
}
pub fn binary_prefix_location(mut self, input: impl Into<std::string::String>) -> Self {
self.binary_prefix_location = Some(input.into());
self
}
pub fn set_binary_prefix_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.binary_prefix_location = input;
self
}
pub fn manifest_prefix_location(mut self, input: impl Into<std::string::String>) -> Self {
self.manifest_prefix_location = Some(input.into());
self
}
pub fn set_manifest_prefix_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.manifest_prefix_location = input;
self
}
pub fn build(self) -> crate::model::StorageLocation {
crate::model::StorageLocation {
bucket: self.bucket,
repo_prefix_location: self.repo_prefix_location,
generated_prefix_location: self.generated_prefix_location,
binary_prefix_location: self.binary_prefix_location,
manifest_prefix_location: self.manifest_prefix_location,
}
}
}
}
impl StorageLocation {
pub fn builder() -> crate::model::storage_location::Builder {
crate::model::storage_location::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NodeInterface {
pub inputs: std::option::Option<std::vec::Vec<crate::model::NodeInputPort>>,
pub outputs: std::option::Option<std::vec::Vec<crate::model::NodeOutputPort>>,
}
impl NodeInterface {
pub fn inputs(&self) -> std::option::Option<&[crate::model::NodeInputPort]> {
self.inputs.as_deref()
}
pub fn outputs(&self) -> std::option::Option<&[crate::model::NodeOutputPort]> {
self.outputs.as_deref()
}
}
impl std::fmt::Debug for NodeInterface {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NodeInterface");
formatter.field("inputs", &self.inputs);
formatter.field("outputs", &self.outputs);
formatter.finish()
}
}
pub mod node_interface {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) inputs: std::option::Option<std::vec::Vec<crate::model::NodeInputPort>>,
pub(crate) outputs: std::option::Option<std::vec::Vec<crate::model::NodeOutputPort>>,
}
impl Builder {
pub fn inputs(mut self, input: crate::model::NodeInputPort) -> Self {
let mut v = self.inputs.unwrap_or_default();
v.push(input);
self.inputs = Some(v);
self
}
pub fn set_inputs(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::NodeInputPort>>,
) -> Self {
self.inputs = input;
self
}
pub fn outputs(mut self, input: crate::model::NodeOutputPort) -> Self {
let mut v = self.outputs.unwrap_or_default();
v.push(input);
self.outputs = Some(v);
self
}
pub fn set_outputs(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::NodeOutputPort>>,
) -> Self {
self.outputs = input;
self
}
pub fn build(self) -> crate::model::NodeInterface {
crate::model::NodeInterface {
inputs: self.inputs,
outputs: self.outputs,
}
}
}
}
impl NodeInterface {
pub fn builder() -> crate::model::node_interface::Builder {
crate::model::node_interface::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NodeOutputPort {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub r#type: std::option::Option<crate::model::PortType>,
}
impl NodeOutputPort {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::PortType> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for NodeOutputPort {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NodeOutputPort");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
pub mod node_output_port {
#[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) description: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::PortType>,
}
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 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 r#type(mut self, input: crate::model::PortType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::PortType>) -> Self {
self.r#type = input;
self
}
pub fn build(self) -> crate::model::NodeOutputPort {
crate::model::NodeOutputPort {
name: self.name,
description: self.description,
r#type: self.r#type,
}
}
}
}
impl NodeOutputPort {
pub fn builder() -> crate::model::node_output_port::Builder {
crate::model::node_output_port::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 PortType {
#[allow(missing_docs)] Boolean,
#[allow(missing_docs)] Float32,
#[allow(missing_docs)] Int32,
#[allow(missing_docs)] Media,
#[allow(missing_docs)] String,
Unknown(String),
}
impl std::convert::From<&str> for PortType {
fn from(s: &str) -> Self {
match s {
"BOOLEAN" => PortType::Boolean,
"FLOAT32" => PortType::Float32,
"INT32" => PortType::Int32,
"MEDIA" => PortType::Media,
"STRING" => PortType::String,
other => PortType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PortType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PortType::from(s))
}
}
impl PortType {
pub fn as_str(&self) -> &str {
match self {
PortType::Boolean => "BOOLEAN",
PortType::Float32 => "FLOAT32",
PortType::Int32 => "INT32",
PortType::Media => "MEDIA",
PortType::String => "STRING",
PortType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["BOOLEAN", "FLOAT32", "INT32", "MEDIA", "STRING"]
}
}
impl AsRef<str> for PortType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NodeInputPort {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub r#type: std::option::Option<crate::model::PortType>,
pub default_value: std::option::Option<std::string::String>,
pub max_connections: i32,
}
impl NodeInputPort {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::PortType> {
self.r#type.as_ref()
}
pub fn default_value(&self) -> std::option::Option<&str> {
self.default_value.as_deref()
}
pub fn max_connections(&self) -> i32 {
self.max_connections
}
}
impl std::fmt::Debug for NodeInputPort {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NodeInputPort");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("r#type", &self.r#type);
formatter.field("default_value", &self.default_value);
formatter.field("max_connections", &self.max_connections);
formatter.finish()
}
}
pub mod node_input_port {
#[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) description: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::PortType>,
pub(crate) default_value: std::option::Option<std::string::String>,
pub(crate) max_connections: std::option::Option<i32>,
}
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 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 r#type(mut self, input: crate::model::PortType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::PortType>) -> Self {
self.r#type = input;
self
}
pub fn default_value(mut self, input: impl Into<std::string::String>) -> Self {
self.default_value = Some(input.into());
self
}
pub fn set_default_value(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.default_value = input;
self
}
pub fn max_connections(mut self, input: i32) -> Self {
self.max_connections = Some(input);
self
}
pub fn set_max_connections(mut self, input: std::option::Option<i32>) -> Self {
self.max_connections = input;
self
}
pub fn build(self) -> crate::model::NodeInputPort {
crate::model::NodeInputPort {
name: self.name,
description: self.description,
r#type: self.r#type,
default_value: self.default_value,
max_connections: self.max_connections.unwrap_or_default(),
}
}
}
}
impl NodeInputPort {
pub fn builder() -> crate::model::node_input_port::Builder {
crate::model::node_input_port::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 UpdateProgress {
#[allow(missing_docs)] Completed,
#[allow(missing_docs)] Downloading,
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] InProgress,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Rebooting,
#[allow(missing_docs)] Verifying,
Unknown(String),
}
impl std::convert::From<&str> for UpdateProgress {
fn from(s: &str) -> Self {
match s {
"COMPLETED" => UpdateProgress::Completed,
"DOWNLOADING" => UpdateProgress::Downloading,
"FAILED" => UpdateProgress::Failed,
"IN_PROGRESS" => UpdateProgress::InProgress,
"PENDING" => UpdateProgress::Pending,
"REBOOTING" => UpdateProgress::Rebooting,
"VERIFYING" => UpdateProgress::Verifying,
other => UpdateProgress::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for UpdateProgress {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(UpdateProgress::from(s))
}
}
impl UpdateProgress {
pub fn as_str(&self) -> &str {
match self {
UpdateProgress::Completed => "COMPLETED",
UpdateProgress::Downloading => "DOWNLOADING",
UpdateProgress::Failed => "FAILED",
UpdateProgress::InProgress => "IN_PROGRESS",
UpdateProgress::Pending => "PENDING",
UpdateProgress::Rebooting => "REBOOTING",
UpdateProgress::Verifying => "VERIFYING",
UpdateProgress::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"COMPLETED",
"DOWNLOADING",
"FAILED",
"IN_PROGRESS",
"PENDING",
"REBOOTING",
"VERIFYING",
]
}
}
impl AsRef<str> for UpdateProgress {
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 DeviceType {
#[allow(missing_docs)] PanoramaAppliance,
#[allow(missing_docs)] PanoramaApplianceDeveloperKit,
Unknown(String),
}
impl std::convert::From<&str> for DeviceType {
fn from(s: &str) -> Self {
match s {
"PANORAMA_APPLIANCE" => DeviceType::PanoramaAppliance,
"PANORAMA_APPLIANCE_DEVELOPER_KIT" => DeviceType::PanoramaApplianceDeveloperKit,
other => DeviceType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DeviceType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DeviceType::from(s))
}
}
impl DeviceType {
pub fn as_str(&self) -> &str {
match self {
DeviceType::PanoramaAppliance => "PANORAMA_APPLIANCE",
DeviceType::PanoramaApplianceDeveloperKit => "PANORAMA_APPLIANCE_DEVELOPER_KIT",
DeviceType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["PANORAMA_APPLIANCE", "PANORAMA_APPLIANCE_DEVELOPER_KIT"]
}
}
impl AsRef<str> for DeviceType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NetworkStatus {
pub ethernet0_status: std::option::Option<crate::model::EthernetStatus>,
pub ethernet1_status: std::option::Option<crate::model::EthernetStatus>,
}
impl NetworkStatus {
pub fn ethernet0_status(&self) -> std::option::Option<&crate::model::EthernetStatus> {
self.ethernet0_status.as_ref()
}
pub fn ethernet1_status(&self) -> std::option::Option<&crate::model::EthernetStatus> {
self.ethernet1_status.as_ref()
}
}
impl std::fmt::Debug for NetworkStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NetworkStatus");
formatter.field("ethernet0_status", &self.ethernet0_status);
formatter.field("ethernet1_status", &self.ethernet1_status);
formatter.finish()
}
}
pub mod network_status {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ethernet0_status: std::option::Option<crate::model::EthernetStatus>,
pub(crate) ethernet1_status: std::option::Option<crate::model::EthernetStatus>,
}
impl Builder {
pub fn ethernet0_status(mut self, input: crate::model::EthernetStatus) -> Self {
self.ethernet0_status = Some(input);
self
}
pub fn set_ethernet0_status(
mut self,
input: std::option::Option<crate::model::EthernetStatus>,
) -> Self {
self.ethernet0_status = input;
self
}
pub fn ethernet1_status(mut self, input: crate::model::EthernetStatus) -> Self {
self.ethernet1_status = Some(input);
self
}
pub fn set_ethernet1_status(
mut self,
input: std::option::Option<crate::model::EthernetStatus>,
) -> Self {
self.ethernet1_status = input;
self
}
pub fn build(self) -> crate::model::NetworkStatus {
crate::model::NetworkStatus {
ethernet0_status: self.ethernet0_status,
ethernet1_status: self.ethernet1_status,
}
}
}
}
impl NetworkStatus {
pub fn builder() -> crate::model::network_status::Builder {
crate::model::network_status::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EthernetStatus {
pub ip_address: std::option::Option<std::string::String>,
pub connection_status: std::option::Option<crate::model::NetworkConnectionStatus>,
pub hw_address: std::option::Option<std::string::String>,
}
impl EthernetStatus {
pub fn ip_address(&self) -> std::option::Option<&str> {
self.ip_address.as_deref()
}
pub fn connection_status(&self) -> std::option::Option<&crate::model::NetworkConnectionStatus> {
self.connection_status.as_ref()
}
pub fn hw_address(&self) -> std::option::Option<&str> {
self.hw_address.as_deref()
}
}
impl std::fmt::Debug for EthernetStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EthernetStatus");
formatter.field("ip_address", &self.ip_address);
formatter.field("connection_status", &self.connection_status);
formatter.field("hw_address", &self.hw_address);
formatter.finish()
}
}
pub mod ethernet_status {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ip_address: std::option::Option<std::string::String>,
pub(crate) connection_status: std::option::Option<crate::model::NetworkConnectionStatus>,
pub(crate) hw_address: std::option::Option<std::string::String>,
}
impl Builder {
pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
self.ip_address = Some(input.into());
self
}
pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_address = input;
self
}
pub fn connection_status(mut self, input: crate::model::NetworkConnectionStatus) -> Self {
self.connection_status = Some(input);
self
}
pub fn set_connection_status(
mut self,
input: std::option::Option<crate::model::NetworkConnectionStatus>,
) -> Self {
self.connection_status = input;
self
}
pub fn hw_address(mut self, input: impl Into<std::string::String>) -> Self {
self.hw_address = Some(input.into());
self
}
pub fn set_hw_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.hw_address = input;
self
}
pub fn build(self) -> crate::model::EthernetStatus {
crate::model::EthernetStatus {
ip_address: self.ip_address,
connection_status: self.connection_status,
hw_address: self.hw_address,
}
}
}
}
impl EthernetStatus {
pub fn builder() -> crate::model::ethernet_status::Builder {
crate::model::ethernet_status::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 NetworkConnectionStatus {
#[allow(missing_docs)] Connected,
#[allow(missing_docs)] NotConnected,
Unknown(String),
}
impl std::convert::From<&str> for NetworkConnectionStatus {
fn from(s: &str) -> Self {
match s {
"CONNECTED" => NetworkConnectionStatus::Connected,
"NOT_CONNECTED" => NetworkConnectionStatus::NotConnected,
other => NetworkConnectionStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NetworkConnectionStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NetworkConnectionStatus::from(s))
}
}
impl NetworkConnectionStatus {
pub fn as_str(&self) -> &str {
match self {
NetworkConnectionStatus::Connected => "CONNECTED",
NetworkConnectionStatus::NotConnected => "NOT_CONNECTED",
NetworkConnectionStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["CONNECTED", "NOT_CONNECTED"]
}
}
impl AsRef<str> for NetworkConnectionStatus {
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 DeviceConnectionStatus {
#[allow(missing_docs)] AwaitingCredentials,
#[allow(missing_docs)] Error,
#[allow(missing_docs)] NotAvailable,
#[allow(missing_docs)] Offline,
#[allow(missing_docs)] Online,
Unknown(String),
}
impl std::convert::From<&str> for DeviceConnectionStatus {
fn from(s: &str) -> Self {
match s {
"AWAITING_CREDENTIALS" => DeviceConnectionStatus::AwaitingCredentials,
"ERROR" => DeviceConnectionStatus::Error,
"NOT_AVAILABLE" => DeviceConnectionStatus::NotAvailable,
"OFFLINE" => DeviceConnectionStatus::Offline,
"ONLINE" => DeviceConnectionStatus::Online,
other => DeviceConnectionStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DeviceConnectionStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DeviceConnectionStatus::from(s))
}
}
impl DeviceConnectionStatus {
pub fn as_str(&self) -> &str {
match self {
DeviceConnectionStatus::AwaitingCredentials => "AWAITING_CREDENTIALS",
DeviceConnectionStatus::Error => "ERROR",
DeviceConnectionStatus::NotAvailable => "NOT_AVAILABLE",
DeviceConnectionStatus::Offline => "OFFLINE",
DeviceConnectionStatus::Online => "ONLINE",
DeviceConnectionStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"AWAITING_CREDENTIALS",
"ERROR",
"NOT_AVAILABLE",
"OFFLINE",
"ONLINE",
]
}
}
impl AsRef<str> for DeviceConnectionStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum ManifestOverridesPayload {
PayloadData(std::string::String),
#[non_exhaustive]
Unknown,
}
impl ManifestOverridesPayload {
#[allow(irrefutable_let_patterns)]
pub fn as_payload_data(&self) -> std::result::Result<&std::string::String, &Self> {
if let ManifestOverridesPayload::PayloadData(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_payload_data(&self) -> bool {
self.as_payload_data().is_ok()
}
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum ManifestPayload {
PayloadData(std::string::String),
#[non_exhaustive]
Unknown,
}
impl ManifestPayload {
#[allow(irrefutable_let_patterns)]
pub fn as_payload_data(&self) -> std::result::Result<&std::string::String, &Self> {
if let ManifestPayload::PayloadData(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_payload_data(&self) -> bool {
self.as_payload_data().is_ok()
}
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Job {
pub job_id: std::option::Option<std::string::String>,
pub device_id: std::option::Option<std::string::String>,
}
impl Job {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
pub fn device_id(&self) -> std::option::Option<&str> {
self.device_id.as_deref()
}
}
impl std::fmt::Debug for Job {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Job");
formatter.field("job_id", &self.job_id);
formatter.field("device_id", &self.device_id);
formatter.finish()
}
}
pub mod job {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
pub(crate) device_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.job_id = Some(input.into());
self
}
pub fn set_job_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_id = input;
self
}
pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.device_id = Some(input.into());
self
}
pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_id = input;
self
}
pub fn build(self) -> crate::model::Job {
crate::model::Job {
job_id: self.job_id,
device_id: self.device_id,
}
}
}
}
impl Job {
pub fn builder() -> crate::model::job::Builder {
crate::model::job::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 JobType {
#[allow(missing_docs)] Ota,
Unknown(String),
}
impl std::convert::From<&str> for JobType {
fn from(s: &str) -> Self {
match s {
"OTA" => JobType::Ota,
other => JobType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for JobType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(JobType::from(s))
}
}
impl JobType {
pub fn as_str(&self) -> &str {
match self {
JobType::Ota => "OTA",
JobType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["OTA"]
}
}
impl AsRef<str> for JobType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeviceJobConfig {
pub ota_job_config: std::option::Option<crate::model::OtaJobConfig>,
}
impl DeviceJobConfig {
pub fn ota_job_config(&self) -> std::option::Option<&crate::model::OtaJobConfig> {
self.ota_job_config.as_ref()
}
}
impl std::fmt::Debug for DeviceJobConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeviceJobConfig");
formatter.field("ota_job_config", &self.ota_job_config);
formatter.finish()
}
}
pub mod device_job_config {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ota_job_config: std::option::Option<crate::model::OtaJobConfig>,
}
impl Builder {
pub fn ota_job_config(mut self, input: crate::model::OtaJobConfig) -> Self {
self.ota_job_config = Some(input);
self
}
pub fn set_ota_job_config(
mut self,
input: std::option::Option<crate::model::OtaJobConfig>,
) -> Self {
self.ota_job_config = input;
self
}
pub fn build(self) -> crate::model::DeviceJobConfig {
crate::model::DeviceJobConfig {
ota_job_config: self.ota_job_config,
}
}
}
}
impl DeviceJobConfig {
pub fn builder() -> crate::model::device_job_config::Builder {
crate::model::device_job_config::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OtaJobConfig {
pub image_version: std::option::Option<std::string::String>,
}
impl OtaJobConfig {
pub fn image_version(&self) -> std::option::Option<&str> {
self.image_version.as_deref()
}
}
impl std::fmt::Debug for OtaJobConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OtaJobConfig");
formatter.field("image_version", &self.image_version);
formatter.finish()
}
}
pub mod ota_job_config {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_version(mut self, input: impl Into<std::string::String>) -> Self {
self.image_version = Some(input.into());
self
}
pub fn set_image_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_version = input;
self
}
pub fn build(self) -> crate::model::OtaJobConfig {
crate::model::OtaJobConfig {
image_version: self.image_version,
}
}
}
}
impl OtaJobConfig {
pub fn builder() -> crate::model::ota_job_config::Builder {
crate::model::ota_job_config::Builder::default()
}
}