1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ModifyHostsInput {
/// <p>Specify whether to enable or disable auto-placement.</p>
pub auto_placement: ::std::option::Option<crate::types::AutoPlacement>,
/// <p>The IDs of the Dedicated Hosts to modify.</p>
pub host_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html"> Host recovery</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub host_recovery: ::std::option::Option<crate::types::HostRecovery>,
/// <p>Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.</p>
/// <p>If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify <b>InstanceFamily</b> instead. You cannot specify <b>InstanceType</b> and <b>InstanceFamily</b> in the same request.</p>
pub instance_type: ::std::option::Option<::std::string::String>,
/// <p>Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.</p>
/// <p>If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify <b>InstanceType</b> instead. You cannot specify <b>InstanceFamily</b> and <b>InstanceType</b> in the same request.</p>
pub instance_family: ::std::option::Option<::std::string::String>,
/// <p>Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-maintenance.html"> Host maintenance</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub host_maintenance: ::std::option::Option<crate::types::HostMaintenance>,
}
impl ModifyHostsInput {
/// <p>Specify whether to enable or disable auto-placement.</p>
pub fn auto_placement(&self) -> ::std::option::Option<&crate::types::AutoPlacement> {
self.auto_placement.as_ref()
}
/// <p>The IDs of the Dedicated Hosts to modify.</p>
pub fn host_ids(&self) -> ::std::option::Option<&[::std::string::String]> {
self.host_ids.as_deref()
}
/// <p>Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html"> Host recovery</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn host_recovery(&self) -> ::std::option::Option<&crate::types::HostRecovery> {
self.host_recovery.as_ref()
}
/// <p>Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.</p>
/// <p>If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify <b>InstanceFamily</b> instead. You cannot specify <b>InstanceType</b> and <b>InstanceFamily</b> in the same request.</p>
pub fn instance_type(&self) -> ::std::option::Option<&str> {
self.instance_type.as_deref()
}
/// <p>Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.</p>
/// <p>If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify <b>InstanceType</b> instead. You cannot specify <b>InstanceFamily</b> and <b>InstanceType</b> in the same request.</p>
pub fn instance_family(&self) -> ::std::option::Option<&str> {
self.instance_family.as_deref()
}
/// <p>Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-maintenance.html"> Host maintenance</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn host_maintenance(&self) -> ::std::option::Option<&crate::types::HostMaintenance> {
self.host_maintenance.as_ref()
}
}
impl ModifyHostsInput {
/// Creates a new builder-style object to manufacture [`ModifyHostsInput`](crate::operation::modify_hosts::ModifyHostsInput).
pub fn builder() -> crate::operation::modify_hosts::builders::ModifyHostsInputBuilder {
crate::operation::modify_hosts::builders::ModifyHostsInputBuilder::default()
}
}
/// A builder for [`ModifyHostsInput`](crate::operation::modify_hosts::ModifyHostsInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ModifyHostsInputBuilder {
pub(crate) auto_placement: ::std::option::Option<crate::types::AutoPlacement>,
pub(crate) host_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) host_recovery: ::std::option::Option<crate::types::HostRecovery>,
pub(crate) instance_type: ::std::option::Option<::std::string::String>,
pub(crate) instance_family: ::std::option::Option<::std::string::String>,
pub(crate) host_maintenance: ::std::option::Option<crate::types::HostMaintenance>,
}
impl ModifyHostsInputBuilder {
/// <p>Specify whether to enable or disable auto-placement.</p>
pub fn auto_placement(mut self, input: crate::types::AutoPlacement) -> Self {
self.auto_placement = ::std::option::Option::Some(input);
self
}
/// <p>Specify whether to enable or disable auto-placement.</p>
pub fn set_auto_placement(mut self, input: ::std::option::Option<crate::types::AutoPlacement>) -> Self {
self.auto_placement = input;
self
}
/// <p>Specify whether to enable or disable auto-placement.</p>
pub fn get_auto_placement(&self) -> &::std::option::Option<crate::types::AutoPlacement> {
&self.auto_placement
}
/// Appends an item to `host_ids`.
///
/// To override the contents of this collection use [`set_host_ids`](Self::set_host_ids).
///
/// <p>The IDs of the Dedicated Hosts to modify.</p>
pub fn host_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.host_ids.unwrap_or_default();
v.push(input.into());
self.host_ids = ::std::option::Option::Some(v);
self
}
/// <p>The IDs of the Dedicated Hosts to modify.</p>
pub fn set_host_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.host_ids = input;
self
}
/// <p>The IDs of the Dedicated Hosts to modify.</p>
pub fn get_host_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.host_ids
}
/// <p>Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html"> Host recovery</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn host_recovery(mut self, input: crate::types::HostRecovery) -> Self {
self.host_recovery = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html"> Host recovery</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_host_recovery(mut self, input: ::std::option::Option<crate::types::HostRecovery>) -> Self {
self.host_recovery = input;
self
}
/// <p>Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html"> Host recovery</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn get_host_recovery(&self) -> &::std::option::Option<crate::types::HostRecovery> {
&self.host_recovery
}
/// <p>Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.</p>
/// <p>If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify <b>InstanceFamily</b> instead. You cannot specify <b>InstanceType</b> and <b>InstanceFamily</b> in the same request.</p>
pub fn instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_type = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.</p>
/// <p>If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify <b>InstanceFamily</b> instead. You cannot specify <b>InstanceType</b> and <b>InstanceFamily</b> in the same request.</p>
pub fn set_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_type = input;
self
}
/// <p>Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.</p>
/// <p>If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify <b>InstanceFamily</b> instead. You cannot specify <b>InstanceType</b> and <b>InstanceFamily</b> in the same request.</p>
pub fn get_instance_type(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_type
}
/// <p>Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.</p>
/// <p>If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify <b>InstanceType</b> instead. You cannot specify <b>InstanceFamily</b> and <b>InstanceType</b> in the same request.</p>
pub fn instance_family(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_family = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.</p>
/// <p>If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify <b>InstanceType</b> instead. You cannot specify <b>InstanceFamily</b> and <b>InstanceType</b> in the same request.</p>
pub fn set_instance_family(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_family = input;
self
}
/// <p>Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.</p>
/// <p>If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify <b>InstanceType</b> instead. You cannot specify <b>InstanceFamily</b> and <b>InstanceType</b> in the same request.</p>
pub fn get_instance_family(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_family
}
/// <p>Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-maintenance.html"> Host maintenance</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn host_maintenance(mut self, input: crate::types::HostMaintenance) -> Self {
self.host_maintenance = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-maintenance.html"> Host maintenance</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_host_maintenance(mut self, input: ::std::option::Option<crate::types::HostMaintenance>) -> Self {
self.host_maintenance = input;
self
}
/// <p>Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-maintenance.html"> Host maintenance</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn get_host_maintenance(&self) -> &::std::option::Option<crate::types::HostMaintenance> {
&self.host_maintenance
}
/// Consumes the builder and constructs a [`ModifyHostsInput`](crate::operation::modify_hosts::ModifyHostsInput).
pub fn build(self) -> ::std::result::Result<crate::operation::modify_hosts::ModifyHostsInput, ::aws_smithy_http::operation::error::BuildError> {
::std::result::Result::Ok(crate::operation::modify_hosts::ModifyHostsInput {
auto_placement: self.auto_placement,
host_ids: self.host_ids,
host_recovery: self.host_recovery,
instance_type: self.instance_type,
instance_family: self.instance_family,
host_maintenance: self.host_maintenance,
})
}
}