#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetWorkerOutput {
pub farm_id: ::std::string::String,
pub fleet_id: ::std::string::String,
pub worker_id: ::std::string::String,
pub host_properties: ::std::option::Option<crate::types::HostPropertiesResponse>,
pub status: crate::types::WorkerStatus,
pub log: ::std::option::Option<crate::types::LogConfiguration>,
pub created_at: ::aws_smithy_types::DateTime,
pub created_by: ::std::string::String,
pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub updated_by: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetWorkerOutput {
pub fn farm_id(&self) -> &str {
use std::ops::Deref;
self.farm_id.deref()
}
pub fn fleet_id(&self) -> &str {
use std::ops::Deref;
self.fleet_id.deref()
}
pub fn worker_id(&self) -> &str {
use std::ops::Deref;
self.worker_id.deref()
}
pub fn host_properties(&self) -> ::std::option::Option<&crate::types::HostPropertiesResponse> {
self.host_properties.as_ref()
}
pub fn status(&self) -> &crate::types::WorkerStatus {
&self.status
}
pub fn log(&self) -> ::std::option::Option<&crate::types::LogConfiguration> {
self.log.as_ref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn created_by(&self) -> &str {
use std::ops::Deref;
self.created_by.deref()
}
pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
pub fn updated_by(&self) -> ::std::option::Option<&str> {
self.updated_by.as_deref()
}
}
impl ::aws_types::request_id::RequestId for GetWorkerOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetWorkerOutput {
pub fn builder() -> crate::operation::get_worker::builders::GetWorkerOutputBuilder {
crate::operation::get_worker::builders::GetWorkerOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetWorkerOutputBuilder {
pub(crate) farm_id: ::std::option::Option<::std::string::String>,
pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
pub(crate) worker_id: ::std::option::Option<::std::string::String>,
pub(crate) host_properties: ::std::option::Option<crate::types::HostPropertiesResponse>,
pub(crate) status: ::std::option::Option<crate::types::WorkerStatus>,
pub(crate) log: ::std::option::Option<crate::types::LogConfiguration>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) created_by: ::std::option::Option<::std::string::String>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_by: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetWorkerOutputBuilder {
pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.farm_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.farm_id = input;
self
}
pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
&self.farm_id
}
pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.fleet_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.fleet_id = input;
self
}
pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
&self.fleet_id
}
pub fn worker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.worker_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_worker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.worker_id = input;
self
}
pub fn get_worker_id(&self) -> &::std::option::Option<::std::string::String> {
&self.worker_id
}
pub fn host_properties(mut self, input: crate::types::HostPropertiesResponse) -> Self {
self.host_properties = ::std::option::Option::Some(input);
self
}
pub fn set_host_properties(mut self, input: ::std::option::Option<crate::types::HostPropertiesResponse>) -> Self {
self.host_properties = input;
self
}
pub fn get_host_properties(&self) -> &::std::option::Option<crate::types::HostPropertiesResponse> {
&self.host_properties
}
pub fn status(mut self, input: crate::types::WorkerStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::WorkerStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::WorkerStatus> {
&self.status
}
pub fn log(mut self, input: crate::types::LogConfiguration) -> Self {
self.log = ::std::option::Option::Some(input);
self
}
pub fn set_log(mut self, input: ::std::option::Option<crate::types::LogConfiguration>) -> Self {
self.log = input;
self
}
pub fn get_log(&self) -> &::std::option::Option<crate::types::LogConfiguration> {
&self.log
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.created_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.created_by = input;
self
}
pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.created_by
}
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.updated_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.updated_by = input;
self
}
pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
&self.updated_by
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> ::std::result::Result<crate::operation::get_worker::GetWorkerOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_worker::GetWorkerOutput {
farm_id: self.farm_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"farm_id",
"farm_id was not specified but it is required when building GetWorkerOutput",
)
})?,
fleet_id: self.fleet_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"fleet_id",
"fleet_id was not specified but it is required when building GetWorkerOutput",
)
})?,
worker_id: self.worker_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"worker_id",
"worker_id was not specified but it is required when building GetWorkerOutput",
)
})?,
host_properties: self.host_properties,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building GetWorkerOutput",
)
})?,
log: self.log,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building GetWorkerOutput",
)
})?,
created_by: self.created_by.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_by",
"created_by was not specified but it is required when building GetWorkerOutput",
)
})?,
updated_at: self.updated_at,
updated_by: self.updated_by,
_request_id: self._request_id,
})
}
}