// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A JSON object containing one or more of the following fields:</p>
/// <ul>
/// <li>
/// <p><code>ActivateGatewayInput$ActivationKey</code></p></li>
/// <li>
/// <p><code>ActivateGatewayInput$GatewayName</code></p></li>
/// <li>
/// <p><code>ActivateGatewayInput$GatewayRegion</code></p></li>
/// <li>
/// <p><code>ActivateGatewayInput$GatewayTimezone</code></p></li>
/// <li>
/// <p><code>ActivateGatewayInput$GatewayType</code></p></li>
/// <li>
/// <p><code>ActivateGatewayInput$MediumChangerType</code></p></li>
/// <li>
/// <p><code>ActivateGatewayInput$TapeDriveType</code></p></li>
/// </ul>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ActivateGatewayInput {
/// <p>Your gateway activation key. You can obtain the activation key by sending an HTTP GET request with redirects enabled to the gateway IP address (port 80). The redirect URL returned in the response provides you the activation key for your gateway in the query string parameter <code>activationKey</code>. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the <code>ActivateGateway</code> API call determine the actual configuration of your gateway.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/storagegateway/latest/userguide/get-activation-key.html">Getting activation key</a> in the <i>Storage Gateway User Guide</i>.</p>
pub activation_key: ::std::option::Option<::std::string::String>,
/// <p>The name you configured for your gateway.</p>
pub gateway_name: ::std::option::Option<::std::string::String>,
/// <p>A value that indicates the time zone you want to set for the gateway. The time zone is of the format "GMT", "GMT-hr:mm", or "GMT+hr:mm". For example, GMT indicates Greenwich Mean Time without any offset. GMT-4:00 indicates the time is 4 hours behind GMT. GMT+2:00 indicates the time is 2 hours ahead of GMT. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.</p>
pub gateway_timezone: ::std::option::Option<::std::string::String>,
/// <p>A value that indicates the Amazon Web Services Region where you want to store your data. The gateway Amazon Web Services Region specified must be the same Amazon Web Services Region as the Amazon Web Services Region in your <code>Host</code> header in the request. For more information about available Amazon Web Services Regions and endpoints for Storage Gateway, see <a href="https://docs.aws.amazon.com/general/latest/gr/sg.html"> Storage Gateway endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
/// <p>Valid Values: See <a href="https://docs.aws.amazon.com/general/latest/gr/sg.html"> Storage Gateway endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
pub gateway_region: ::std::option::Option<::std::string::String>,
/// <p>A value that defines the type of gateway to activate. The type specified is critical to all later functions of the gateway and cannot be changed after activation. The default value is <code>CACHED</code>.</p><important>
/// <p>Amazon FSx File Gateway is no longer available to new customers. Existing customers of FSx File Gateway can continue to use the service normally. For capabilities similar to FSx File Gateway, visit <a href="https://aws.amazon.com/blogs/storage/switch-your-file-share-access-from-amazon-fsx-file-gateway-to-amazon-fsx-for-windows-file-server/">this blog post</a>.</p>
/// </important>
/// <p>Valid Values: <code>STORED</code> | <code>CACHED</code> | <code>VTL</code> | <code>FILE_S3</code> | <code>FILE_FSX_SMB</code></p>
pub gateway_type: ::std::option::Option<::std::string::String>,
/// <p>The value that indicates the type of tape drive to use for tape gateway. This field is optional.</p>
/// <p>Valid Values: <code>IBM-ULT3580-TD5</code></p>
pub tape_drive_type: ::std::option::Option<::std::string::String>,
/// <p>The value that indicates the type of medium changer to use for tape gateway. This field is optional.</p>
/// <p>Valid Values: <code>STK-L700</code> | <code>AWS-Gateway-VTL</code> | <code>IBM-03584L32-0402</code></p>
pub medium_changer_type: ::std::option::Option<::std::string::String>,
/// <p>A list of up to 50 tags that you can assign to the gateway. Each tag is a key-value pair.</p><note>
/// <p>Valid characters for key and value are letters, spaces, and numbers that can be represented in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256 characters.</p>
/// </note>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl ActivateGatewayInput {
/// <p>Your gateway activation key. You can obtain the activation key by sending an HTTP GET request with redirects enabled to the gateway IP address (port 80). The redirect URL returned in the response provides you the activation key for your gateway in the query string parameter <code>activationKey</code>. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the <code>ActivateGateway</code> API call determine the actual configuration of your gateway.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/storagegateway/latest/userguide/get-activation-key.html">Getting activation key</a> in the <i>Storage Gateway User Guide</i>.</p>
pub fn activation_key(&self) -> ::std::option::Option<&str> {
self.activation_key.as_deref()
}
/// <p>The name you configured for your gateway.</p>
pub fn gateway_name(&self) -> ::std::option::Option<&str> {
self.gateway_name.as_deref()
}
/// <p>A value that indicates the time zone you want to set for the gateway. The time zone is of the format "GMT", "GMT-hr:mm", or "GMT+hr:mm". For example, GMT indicates Greenwich Mean Time without any offset. GMT-4:00 indicates the time is 4 hours behind GMT. GMT+2:00 indicates the time is 2 hours ahead of GMT. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.</p>
pub fn gateway_timezone(&self) -> ::std::option::Option<&str> {
self.gateway_timezone.as_deref()
}
/// <p>A value that indicates the Amazon Web Services Region where you want to store your data. The gateway Amazon Web Services Region specified must be the same Amazon Web Services Region as the Amazon Web Services Region in your <code>Host</code> header in the request. For more information about available Amazon Web Services Regions and endpoints for Storage Gateway, see <a href="https://docs.aws.amazon.com/general/latest/gr/sg.html"> Storage Gateway endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
/// <p>Valid Values: See <a href="https://docs.aws.amazon.com/general/latest/gr/sg.html"> Storage Gateway endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
pub fn gateway_region(&self) -> ::std::option::Option<&str> {
self.gateway_region.as_deref()
}
/// <p>A value that defines the type of gateway to activate. The type specified is critical to all later functions of the gateway and cannot be changed after activation. The default value is <code>CACHED</code>.</p><important>
/// <p>Amazon FSx File Gateway is no longer available to new customers. Existing customers of FSx File Gateway can continue to use the service normally. For capabilities similar to FSx File Gateway, visit <a href="https://aws.amazon.com/blogs/storage/switch-your-file-share-access-from-amazon-fsx-file-gateway-to-amazon-fsx-for-windows-file-server/">this blog post</a>.</p>
/// </important>
/// <p>Valid Values: <code>STORED</code> | <code>CACHED</code> | <code>VTL</code> | <code>FILE_S3</code> | <code>FILE_FSX_SMB</code></p>
pub fn gateway_type(&self) -> ::std::option::Option<&str> {
self.gateway_type.as_deref()
}
/// <p>The value that indicates the type of tape drive to use for tape gateway. This field is optional.</p>
/// <p>Valid Values: <code>IBM-ULT3580-TD5</code></p>
pub fn tape_drive_type(&self) -> ::std::option::Option<&str> {
self.tape_drive_type.as_deref()
}
/// <p>The value that indicates the type of medium changer to use for tape gateway. This field is optional.</p>
/// <p>Valid Values: <code>STK-L700</code> | <code>AWS-Gateway-VTL</code> | <code>IBM-03584L32-0402</code></p>
pub fn medium_changer_type(&self) -> ::std::option::Option<&str> {
self.medium_changer_type.as_deref()
}
/// <p>A list of up to 50 tags that you can assign to the gateway. Each tag is a key-value pair.</p><note>
/// <p>Valid characters for key and value are letters, spaces, and numbers that can be represented in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256 characters.</p>
/// </note>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
}
impl ActivateGatewayInput {
/// Creates a new builder-style object to manufacture [`ActivateGatewayInput`](crate::operation::activate_gateway::ActivateGatewayInput).
pub fn builder() -> crate::operation::activate_gateway::builders::ActivateGatewayInputBuilder {
crate::operation::activate_gateway::builders::ActivateGatewayInputBuilder::default()
}
}
/// A builder for [`ActivateGatewayInput`](crate::operation::activate_gateway::ActivateGatewayInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ActivateGatewayInputBuilder {
pub(crate) activation_key: ::std::option::Option<::std::string::String>,
pub(crate) gateway_name: ::std::option::Option<::std::string::String>,
pub(crate) gateway_timezone: ::std::option::Option<::std::string::String>,
pub(crate) gateway_region: ::std::option::Option<::std::string::String>,
pub(crate) gateway_type: ::std::option::Option<::std::string::String>,
pub(crate) tape_drive_type: ::std::option::Option<::std::string::String>,
pub(crate) medium_changer_type: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl ActivateGatewayInputBuilder {
/// <p>Your gateway activation key. You can obtain the activation key by sending an HTTP GET request with redirects enabled to the gateway IP address (port 80). The redirect URL returned in the response provides you the activation key for your gateway in the query string parameter <code>activationKey</code>. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the <code>ActivateGateway</code> API call determine the actual configuration of your gateway.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/storagegateway/latest/userguide/get-activation-key.html">Getting activation key</a> in the <i>Storage Gateway User Guide</i>.</p>
/// This field is required.
pub fn activation_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.activation_key = ::std::option::Option::Some(input.into());
self
}
/// <p>Your gateway activation key. You can obtain the activation key by sending an HTTP GET request with redirects enabled to the gateway IP address (port 80). The redirect URL returned in the response provides you the activation key for your gateway in the query string parameter <code>activationKey</code>. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the <code>ActivateGateway</code> API call determine the actual configuration of your gateway.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/storagegateway/latest/userguide/get-activation-key.html">Getting activation key</a> in the <i>Storage Gateway User Guide</i>.</p>
pub fn set_activation_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.activation_key = input;
self
}
/// <p>Your gateway activation key. You can obtain the activation key by sending an HTTP GET request with redirects enabled to the gateway IP address (port 80). The redirect URL returned in the response provides you the activation key for your gateway in the query string parameter <code>activationKey</code>. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the <code>ActivateGateway</code> API call determine the actual configuration of your gateway.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/storagegateway/latest/userguide/get-activation-key.html">Getting activation key</a> in the <i>Storage Gateway User Guide</i>.</p>
pub fn get_activation_key(&self) -> &::std::option::Option<::std::string::String> {
&self.activation_key
}
/// <p>The name you configured for your gateway.</p>
/// This field is required.
pub fn gateway_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.gateway_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name you configured for your gateway.</p>
pub fn set_gateway_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.gateway_name = input;
self
}
/// <p>The name you configured for your gateway.</p>
pub fn get_gateway_name(&self) -> &::std::option::Option<::std::string::String> {
&self.gateway_name
}
/// <p>A value that indicates the time zone you want to set for the gateway. The time zone is of the format "GMT", "GMT-hr:mm", or "GMT+hr:mm". For example, GMT indicates Greenwich Mean Time without any offset. GMT-4:00 indicates the time is 4 hours behind GMT. GMT+2:00 indicates the time is 2 hours ahead of GMT. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.</p>
/// This field is required.
pub fn gateway_timezone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.gateway_timezone = ::std::option::Option::Some(input.into());
self
}
/// <p>A value that indicates the time zone you want to set for the gateway. The time zone is of the format "GMT", "GMT-hr:mm", or "GMT+hr:mm". For example, GMT indicates Greenwich Mean Time without any offset. GMT-4:00 indicates the time is 4 hours behind GMT. GMT+2:00 indicates the time is 2 hours ahead of GMT. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.</p>
pub fn set_gateway_timezone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.gateway_timezone = input;
self
}
/// <p>A value that indicates the time zone you want to set for the gateway. The time zone is of the format "GMT", "GMT-hr:mm", or "GMT+hr:mm". For example, GMT indicates Greenwich Mean Time without any offset. GMT-4:00 indicates the time is 4 hours behind GMT. GMT+2:00 indicates the time is 2 hours ahead of GMT. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.</p>
pub fn get_gateway_timezone(&self) -> &::std::option::Option<::std::string::String> {
&self.gateway_timezone
}
/// <p>A value that indicates the Amazon Web Services Region where you want to store your data. The gateway Amazon Web Services Region specified must be the same Amazon Web Services Region as the Amazon Web Services Region in your <code>Host</code> header in the request. For more information about available Amazon Web Services Regions and endpoints for Storage Gateway, see <a href="https://docs.aws.amazon.com/general/latest/gr/sg.html"> Storage Gateway endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
/// <p>Valid Values: See <a href="https://docs.aws.amazon.com/general/latest/gr/sg.html"> Storage Gateway endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
/// This field is required.
pub fn gateway_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.gateway_region = ::std::option::Option::Some(input.into());
self
}
/// <p>A value that indicates the Amazon Web Services Region where you want to store your data. The gateway Amazon Web Services Region specified must be the same Amazon Web Services Region as the Amazon Web Services Region in your <code>Host</code> header in the request. For more information about available Amazon Web Services Regions and endpoints for Storage Gateway, see <a href="https://docs.aws.amazon.com/general/latest/gr/sg.html"> Storage Gateway endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
/// <p>Valid Values: See <a href="https://docs.aws.amazon.com/general/latest/gr/sg.html"> Storage Gateway endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
pub fn set_gateway_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.gateway_region = input;
self
}
/// <p>A value that indicates the Amazon Web Services Region where you want to store your data. The gateway Amazon Web Services Region specified must be the same Amazon Web Services Region as the Amazon Web Services Region in your <code>Host</code> header in the request. For more information about available Amazon Web Services Regions and endpoints for Storage Gateway, see <a href="https://docs.aws.amazon.com/general/latest/gr/sg.html"> Storage Gateway endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
/// <p>Valid Values: See <a href="https://docs.aws.amazon.com/general/latest/gr/sg.html"> Storage Gateway endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
pub fn get_gateway_region(&self) -> &::std::option::Option<::std::string::String> {
&self.gateway_region
}
/// <p>A value that defines the type of gateway to activate. The type specified is critical to all later functions of the gateway and cannot be changed after activation. The default value is <code>CACHED</code>.</p><important>
/// <p>Amazon FSx File Gateway is no longer available to new customers. Existing customers of FSx File Gateway can continue to use the service normally. For capabilities similar to FSx File Gateway, visit <a href="https://aws.amazon.com/blogs/storage/switch-your-file-share-access-from-amazon-fsx-file-gateway-to-amazon-fsx-for-windows-file-server/">this blog post</a>.</p>
/// </important>
/// <p>Valid Values: <code>STORED</code> | <code>CACHED</code> | <code>VTL</code> | <code>FILE_S3</code> | <code>FILE_FSX_SMB</code></p>
pub fn gateway_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.gateway_type = ::std::option::Option::Some(input.into());
self
}
/// <p>A value that defines the type of gateway to activate. The type specified is critical to all later functions of the gateway and cannot be changed after activation. The default value is <code>CACHED</code>.</p><important>
/// <p>Amazon FSx File Gateway is no longer available to new customers. Existing customers of FSx File Gateway can continue to use the service normally. For capabilities similar to FSx File Gateway, visit <a href="https://aws.amazon.com/blogs/storage/switch-your-file-share-access-from-amazon-fsx-file-gateway-to-amazon-fsx-for-windows-file-server/">this blog post</a>.</p>
/// </important>
/// <p>Valid Values: <code>STORED</code> | <code>CACHED</code> | <code>VTL</code> | <code>FILE_S3</code> | <code>FILE_FSX_SMB</code></p>
pub fn set_gateway_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.gateway_type = input;
self
}
/// <p>A value that defines the type of gateway to activate. The type specified is critical to all later functions of the gateway and cannot be changed after activation. The default value is <code>CACHED</code>.</p><important>
/// <p>Amazon FSx File Gateway is no longer available to new customers. Existing customers of FSx File Gateway can continue to use the service normally. For capabilities similar to FSx File Gateway, visit <a href="https://aws.amazon.com/blogs/storage/switch-your-file-share-access-from-amazon-fsx-file-gateway-to-amazon-fsx-for-windows-file-server/">this blog post</a>.</p>
/// </important>
/// <p>Valid Values: <code>STORED</code> | <code>CACHED</code> | <code>VTL</code> | <code>FILE_S3</code> | <code>FILE_FSX_SMB</code></p>
pub fn get_gateway_type(&self) -> &::std::option::Option<::std::string::String> {
&self.gateway_type
}
/// <p>The value that indicates the type of tape drive to use for tape gateway. This field is optional.</p>
/// <p>Valid Values: <code>IBM-ULT3580-TD5</code></p>
pub fn tape_drive_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.tape_drive_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The value that indicates the type of tape drive to use for tape gateway. This field is optional.</p>
/// <p>Valid Values: <code>IBM-ULT3580-TD5</code></p>
pub fn set_tape_drive_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.tape_drive_type = input;
self
}
/// <p>The value that indicates the type of tape drive to use for tape gateway. This field is optional.</p>
/// <p>Valid Values: <code>IBM-ULT3580-TD5</code></p>
pub fn get_tape_drive_type(&self) -> &::std::option::Option<::std::string::String> {
&self.tape_drive_type
}
/// <p>The value that indicates the type of medium changer to use for tape gateway. This field is optional.</p>
/// <p>Valid Values: <code>STK-L700</code> | <code>AWS-Gateway-VTL</code> | <code>IBM-03584L32-0402</code></p>
pub fn medium_changer_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.medium_changer_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The value that indicates the type of medium changer to use for tape gateway. This field is optional.</p>
/// <p>Valid Values: <code>STK-L700</code> | <code>AWS-Gateway-VTL</code> | <code>IBM-03584L32-0402</code></p>
pub fn set_medium_changer_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.medium_changer_type = input;
self
}
/// <p>The value that indicates the type of medium changer to use for tape gateway. This field is optional.</p>
/// <p>Valid Values: <code>STK-L700</code> | <code>AWS-Gateway-VTL</code> | <code>IBM-03584L32-0402</code></p>
pub fn get_medium_changer_type(&self) -> &::std::option::Option<::std::string::String> {
&self.medium_changer_type
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>A list of up to 50 tags that you can assign to the gateway. Each tag is a key-value pair.</p><note>
/// <p>Valid characters for key and value are letters, spaces, and numbers that can be represented in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256 characters.</p>
/// </note>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>A list of up to 50 tags that you can assign to the gateway. Each tag is a key-value pair.</p><note>
/// <p>Valid characters for key and value are letters, spaces, and numbers that can be represented in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256 characters.</p>
/// </note>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>A list of up to 50 tags that you can assign to the gateway. Each tag is a key-value pair.</p><note>
/// <p>Valid characters for key and value are letters, spaces, and numbers that can be represented in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256 characters.</p>
/// </note>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// Consumes the builder and constructs a [`ActivateGatewayInput`](crate::operation::activate_gateway::ActivateGatewayInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::activate_gateway::ActivateGatewayInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::activate_gateway::ActivateGatewayInput {
activation_key: self.activation_key,
gateway_name: self.gateway_name,
gateway_timezone: self.gateway_timezone,
gateway_region: self.gateway_region,
gateway_type: self.gateway_type,
tape_drive_type: self.tape_drive_type,
medium_changer_type: self.medium_changer_type,
tags: self.tags,
})
}
}