#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Container {
pub container_arn: ::std::option::Option<::std::string::String>,
pub task_arn: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub image: ::std::option::Option<::std::string::String>,
pub image_digest: ::std::option::Option<::std::string::String>,
pub runtime_id: ::std::option::Option<::std::string::String>,
pub last_status: ::std::option::Option<::std::string::String>,
pub exit_code: ::std::option::Option<i32>,
pub reason: ::std::option::Option<::std::string::String>,
pub network_bindings: ::std::option::Option<::std::vec::Vec<crate::types::NetworkBinding>>,
pub network_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>>,
pub health_status: ::std::option::Option<crate::types::HealthStatus>,
pub managed_agents: ::std::option::Option<::std::vec::Vec<crate::types::ManagedAgent>>,
pub cpu: ::std::option::Option<::std::string::String>,
pub memory: ::std::option::Option<::std::string::String>,
pub memory_reservation: ::std::option::Option<::std::string::String>,
pub gpu_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Container {
pub fn container_arn(&self) -> ::std::option::Option<&str> {
self.container_arn.as_deref()
}
pub fn task_arn(&self) -> ::std::option::Option<&str> {
self.task_arn.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn image(&self) -> ::std::option::Option<&str> {
self.image.as_deref()
}
pub fn image_digest(&self) -> ::std::option::Option<&str> {
self.image_digest.as_deref()
}
pub fn runtime_id(&self) -> ::std::option::Option<&str> {
self.runtime_id.as_deref()
}
pub fn last_status(&self) -> ::std::option::Option<&str> {
self.last_status.as_deref()
}
pub fn exit_code(&self) -> ::std::option::Option<i32> {
self.exit_code
}
pub fn reason(&self) -> ::std::option::Option<&str> {
self.reason.as_deref()
}
pub fn network_bindings(&self) -> &[crate::types::NetworkBinding] {
self.network_bindings.as_deref().unwrap_or_default()
}
pub fn network_interfaces(&self) -> &[crate::types::NetworkInterface] {
self.network_interfaces.as_deref().unwrap_or_default()
}
pub fn health_status(&self) -> ::std::option::Option<&crate::types::HealthStatus> {
self.health_status.as_ref()
}
pub fn managed_agents(&self) -> &[crate::types::ManagedAgent] {
self.managed_agents.as_deref().unwrap_or_default()
}
pub fn cpu(&self) -> ::std::option::Option<&str> {
self.cpu.as_deref()
}
pub fn memory(&self) -> ::std::option::Option<&str> {
self.memory.as_deref()
}
pub fn memory_reservation(&self) -> ::std::option::Option<&str> {
self.memory_reservation.as_deref()
}
pub fn gpu_ids(&self) -> &[::std::string::String] {
self.gpu_ids.as_deref().unwrap_or_default()
}
}
impl Container {
pub fn builder() -> crate::types::builders::ContainerBuilder {
crate::types::builders::ContainerBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ContainerBuilder {
pub(crate) container_arn: ::std::option::Option<::std::string::String>,
pub(crate) task_arn: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) image: ::std::option::Option<::std::string::String>,
pub(crate) image_digest: ::std::option::Option<::std::string::String>,
pub(crate) runtime_id: ::std::option::Option<::std::string::String>,
pub(crate) last_status: ::std::option::Option<::std::string::String>,
pub(crate) exit_code: ::std::option::Option<i32>,
pub(crate) reason: ::std::option::Option<::std::string::String>,
pub(crate) network_bindings: ::std::option::Option<::std::vec::Vec<crate::types::NetworkBinding>>,
pub(crate) network_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>>,
pub(crate) health_status: ::std::option::Option<crate::types::HealthStatus>,
pub(crate) managed_agents: ::std::option::Option<::std::vec::Vec<crate::types::ManagedAgent>>,
pub(crate) cpu: ::std::option::Option<::std::string::String>,
pub(crate) memory: ::std::option::Option<::std::string::String>,
pub(crate) memory_reservation: ::std::option::Option<::std::string::String>,
pub(crate) gpu_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ContainerBuilder {
pub fn container_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.container_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_container_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.container_arn = input;
self
}
pub fn get_container_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.container_arn
}
pub fn task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.task_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.task_arn = input;
self
}
pub fn get_task_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.task_arn
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn image(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.image = ::std::option::Option::Some(input.into());
self
}
pub fn set_image(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.image = input;
self
}
pub fn get_image(&self) -> &::std::option::Option<::std::string::String> {
&self.image
}
pub fn image_digest(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.image_digest = ::std::option::Option::Some(input.into());
self
}
pub fn set_image_digest(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.image_digest = input;
self
}
pub fn get_image_digest(&self) -> &::std::option::Option<::std::string::String> {
&self.image_digest
}
pub fn runtime_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.runtime_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_runtime_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.runtime_id = input;
self
}
pub fn get_runtime_id(&self) -> &::std::option::Option<::std::string::String> {
&self.runtime_id
}
pub fn last_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_status = ::std::option::Option::Some(input.into());
self
}
pub fn set_last_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_status = input;
self
}
pub fn get_last_status(&self) -> &::std::option::Option<::std::string::String> {
&self.last_status
}
pub fn exit_code(mut self, input: i32) -> Self {
self.exit_code = ::std::option::Option::Some(input);
self
}
pub fn set_exit_code(mut self, input: ::std::option::Option<i32>) -> Self {
self.exit_code = input;
self
}
pub fn get_exit_code(&self) -> &::std::option::Option<i32> {
&self.exit_code
}
pub fn reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.reason = ::std::option::Option::Some(input.into());
self
}
pub fn set_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.reason = input;
self
}
pub fn get_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.reason
}
pub fn network_bindings(mut self, input: crate::types::NetworkBinding) -> Self {
let mut v = self.network_bindings.unwrap_or_default();
v.push(input);
self.network_bindings = ::std::option::Option::Some(v);
self
}
pub fn set_network_bindings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NetworkBinding>>) -> Self {
self.network_bindings = input;
self
}
pub fn get_network_bindings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NetworkBinding>> {
&self.network_bindings
}
pub fn network_interfaces(mut self, input: crate::types::NetworkInterface) -> Self {
let mut v = self.network_interfaces.unwrap_or_default();
v.push(input);
self.network_interfaces = ::std::option::Option::Some(v);
self
}
pub fn set_network_interfaces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>>) -> Self {
self.network_interfaces = input;
self
}
pub fn get_network_interfaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>> {
&self.network_interfaces
}
pub fn health_status(mut self, input: crate::types::HealthStatus) -> Self {
self.health_status = ::std::option::Option::Some(input);
self
}
pub fn set_health_status(mut self, input: ::std::option::Option<crate::types::HealthStatus>) -> Self {
self.health_status = input;
self
}
pub fn get_health_status(&self) -> &::std::option::Option<crate::types::HealthStatus> {
&self.health_status
}
pub fn managed_agents(mut self, input: crate::types::ManagedAgent) -> Self {
let mut v = self.managed_agents.unwrap_or_default();
v.push(input);
self.managed_agents = ::std::option::Option::Some(v);
self
}
pub fn set_managed_agents(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ManagedAgent>>) -> Self {
self.managed_agents = input;
self
}
pub fn get_managed_agents(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ManagedAgent>> {
&self.managed_agents
}
pub fn cpu(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cpu = ::std::option::Option::Some(input.into());
self
}
pub fn set_cpu(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cpu = input;
self
}
pub fn get_cpu(&self) -> &::std::option::Option<::std::string::String> {
&self.cpu
}
pub fn memory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.memory = ::std::option::Option::Some(input.into());
self
}
pub fn set_memory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.memory = input;
self
}
pub fn get_memory(&self) -> &::std::option::Option<::std::string::String> {
&self.memory
}
pub fn memory_reservation(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.memory_reservation = ::std::option::Option::Some(input.into());
self
}
pub fn set_memory_reservation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.memory_reservation = input;
self
}
pub fn get_memory_reservation(&self) -> &::std::option::Option<::std::string::String> {
&self.memory_reservation
}
pub fn gpu_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.gpu_ids.unwrap_or_default();
v.push(input.into());
self.gpu_ids = ::std::option::Option::Some(v);
self
}
pub fn set_gpu_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.gpu_ids = input;
self
}
pub fn get_gpu_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.gpu_ids
}
pub fn build(self) -> crate::types::Container {
crate::types::Container {
container_arn: self.container_arn,
task_arn: self.task_arn,
name: self.name,
image: self.image,
image_digest: self.image_digest,
runtime_id: self.runtime_id,
last_status: self.last_status,
exit_code: self.exit_code,
reason: self.reason,
network_bindings: self.network_bindings,
network_interfaces: self.network_interfaces,
health_status: self.health_status,
managed_agents: self.managed_agents,
cpu: self.cpu,
memory: self.memory,
memory_reservation: self.memory_reservation,
gpu_ids: self.gpu_ids,
}
}
}