#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateWorkerInput {
pub farm_id: ::std::option::Option<::std::string::String>,
pub fleet_id: ::std::option::Option<::std::string::String>,
pub host_properties: ::std::option::Option<crate::types::HostPropertiesRequest>,
pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateWorkerInput {
pub fn farm_id(&self) -> ::std::option::Option<&str> {
self.farm_id.as_deref()
}
pub fn fleet_id(&self) -> ::std::option::Option<&str> {
self.fleet_id.as_deref()
}
pub fn host_properties(&self) -> ::std::option::Option<&crate::types::HostPropertiesRequest> {
self.host_properties.as_ref()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl CreateWorkerInput {
pub fn builder() -> crate::operation::create_worker::builders::CreateWorkerInputBuilder {
crate::operation::create_worker::builders::CreateWorkerInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateWorkerInputBuilder {
pub(crate) farm_id: ::std::option::Option<::std::string::String>,
pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
pub(crate) host_properties: ::std::option::Option<crate::types::HostPropertiesRequest>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateWorkerInputBuilder {
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 host_properties(mut self, input: crate::types::HostPropertiesRequest) -> Self {
self.host_properties = ::std::option::Option::Some(input);
self
}
pub fn set_host_properties(mut self, input: ::std::option::Option<crate::types::HostPropertiesRequest>) -> Self {
self.host_properties = input;
self
}
pub fn get_host_properties(&self) -> &::std::option::Option<crate::types::HostPropertiesRequest> {
&self.host_properties
}
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_worker::CreateWorkerInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_worker::CreateWorkerInput {
farm_id: self.farm_id,
fleet_id: self.fleet_id,
host_properties: self.host_properties,
client_token: self.client_token,
})
}
}