Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.storagegateway.model;
 
 
Container for the parameters to the ActivateGateway operation.

This operation activates the gateway you previously deployed on your host. For more information, see Activate the AWS Storage Gateway . In the activation process, you specify information such as the region you want to use for storing snapshots, the time zone for scheduled snapshots the gateway snapshot schedule window, an activation key, and a name for your gateway. The activation process also associates your gateway with your account; for more information, see UpdateGatewayInformation.

NOTE:You must turn on the gateway VM before you can activate your gateway.

 
 public class ActivateGatewayRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
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 activationKey. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the ActivateGateway API call determine the actual configuration of your gateway.

Constraints:
Length: 1 - 50

 
     private String activationKey;

    
A unique identifier for your gateway. This name becomes part of the gateway Amazon Resources Name (ARN) which is what you use as an input to other operations.

Constraints:
Length: 2 - 255
Pattern: ^[ -\.0-\[\]-~]*[!-\.0-\[\]-~][ -\.0-\[\]-~]*$

 
     private String gatewayName;

    
One of the values that indicates the time zone you want to set for the gateway. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.

Constraints:
Length: 3 - 10

 
     private String gatewayTimezone;

    
One of the values that indicates the region where you want to store the snapshot backups. The gateway region specified must be the same region as the region in your Host header in the request. For more information about available regions and endpoints for AWS Storage Gateway, see Regions and Endpoints in the Amazon Web Services Glossary.

Valid Values: "us-east-1", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-northeast-1", "ap-southeast-1", "ap-southeast-2", "sa-east-1"

Constraints:
Length: 1 - 25

 
     private String gatewayRegion;

    
One of the values 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 STORED.

Constraints:
Length: 2 - 20

    private String gatewayType;

    
The value that indicates the type of tape drive to use for gateway-VTL. This field is optional.

Valid Values: "IBM-ULT3580-TD5"

Constraints:
Length: 2 - 50

    private String tapeDriveType;

    
The value that indicates the type of medium changer to use for gateway-VTL. This field is optional.

Valid Values: "STK-L700", "AWS-Gateway-VTL"

Constraints:
Length: 2 - 50

    private String mediumChangerType;

    
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 activationKey. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the ActivateGateway API call determine the actual configuration of your gateway.

Constraints:
Length: 1 - 50

Returns:
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 activationKey. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the ActivateGateway API call determine the actual configuration of your gateway.
    public String getActivationKey() {
        return ;
    }
    
    
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 activationKey. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the ActivateGateway API call determine the actual configuration of your gateway.

Constraints:
Length: 1 - 50

Parameters:
activationKey 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 activationKey. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the ActivateGateway API call determine the actual configuration of your gateway.
    public void setActivationKey(String activationKey) {
        this. = activationKey;
    }
    
    
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 activationKey. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the ActivateGateway API call determine the actual configuration of your gateway.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 50

Parameters:
activationKey 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 activationKey. It may also include other activation-related parameters, however, these are merely defaults -- the arguments you pass to the ActivateGateway API call determine the actual configuration of your gateway.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ActivateGatewayRequest withActivationKey(String activationKey) {
        this. = activationKey;
        return this;
    }

    
A unique identifier for your gateway. This name becomes part of the gateway Amazon Resources Name (ARN) which is what you use as an input to other operations.

Constraints:
Length: 2 - 255
Pattern: ^[ -\.0-\[\]-~]*[!-\.0-\[\]-~][ -\.0-\[\]-~]*$

Returns:
A unique identifier for your gateway. This name becomes part of the gateway Amazon Resources Name (ARN) which is what you use as an input to other operations.
    public String getGatewayName() {
        return ;
    }
    
    
A unique identifier for your gateway. This name becomes part of the gateway Amazon Resources Name (ARN) which is what you use as an input to other operations.

Constraints:
Length: 2 - 255
Pattern: ^[ -\.0-\[\]-~]*[!-\.0-\[\]-~][ -\.0-\[\]-~]*$

Parameters:
gatewayName A unique identifier for your gateway. This name becomes part of the gateway Amazon Resources Name (ARN) which is what you use as an input to other operations.
    public void setGatewayName(String gatewayName) {
        this. = gatewayName;
    }
    
    
A unique identifier for your gateway. This name becomes part of the gateway Amazon Resources Name (ARN) which is what you use as an input to other operations.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 2 - 255
Pattern: ^[ -\.0-\[\]-~]*[!-\.0-\[\]-~][ -\.0-\[\]-~]*$

Parameters:
gatewayName A unique identifier for your gateway. This name becomes part of the gateway Amazon Resources Name (ARN) which is what you use as an input to other operations.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ActivateGatewayRequest withGatewayName(String gatewayName) {
        this. = gatewayName;
        return this;
    }

    
One of the values that indicates the time zone you want to set for the gateway. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.

Constraints:
Length: 3 - 10

Returns:
One of the values that indicates the time zone you want to set for the gateway. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.
    public String getGatewayTimezone() {
        return ;
    }
    
    
One of the values that indicates the time zone you want to set for the gateway. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.

Constraints:
Length: 3 - 10

Parameters:
gatewayTimezone One of the values that indicates the time zone you want to set for the gateway. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.
    public void setGatewayTimezone(String gatewayTimezone) {
        this. = gatewayTimezone;
    }
    
    
One of the values that indicates the time zone you want to set for the gateway. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 3 - 10

Parameters:
gatewayTimezone One of the values that indicates the time zone you want to set for the gateway. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ActivateGatewayRequest withGatewayTimezone(String gatewayTimezone) {
        this. = gatewayTimezone;
        return this;
    }

    
One of the values that indicates the region where you want to store the snapshot backups. The gateway region specified must be the same region as the region in your Host header in the request. For more information about available regions and endpoints for AWS Storage Gateway, see Regions and Endpoints in the Amazon Web Services Glossary.

Valid Values: "us-east-1", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-northeast-1", "ap-southeast-1", "ap-southeast-2", "sa-east-1"

Constraints:
Length: 1 - 25

Returns:
One of the values that indicates the region where you want to store the snapshot backups. The gateway region specified must be the same region as the region in your Host header in the request. For more information about available regions and endpoints for AWS Storage Gateway, see Regions and Endpoints in the Amazon Web Services Glossary.

Valid Values: "us-east-1", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-northeast-1", "ap-southeast-1", "ap-southeast-2", "sa-east-1"

    public String getGatewayRegion() {
        return ;
    }
    
    
One of the values that indicates the region where you want to store the snapshot backups. The gateway region specified must be the same region as the region in your Host header in the request. For more information about available regions and endpoints for AWS Storage Gateway, see Regions and Endpoints in the Amazon Web Services Glossary.

Valid Values: "us-east-1", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-northeast-1", "ap-southeast-1", "ap-southeast-2", "sa-east-1"

Constraints:
Length: 1 - 25

Parameters:
gatewayRegion One of the values that indicates the region where you want to store the snapshot backups. The gateway region specified must be the same region as the region in your Host header in the request. For more information about available regions and endpoints for AWS Storage Gateway, see Regions and Endpoints in the Amazon Web Services Glossary.

Valid Values: "us-east-1", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-northeast-1", "ap-southeast-1", "ap-southeast-2", "sa-east-1"

    public void setGatewayRegion(String gatewayRegion) {
        this. = gatewayRegion;
    }
    
    
One of the values that indicates the region where you want to store the snapshot backups. The gateway region specified must be the same region as the region in your Host header in the request. For more information about available regions and endpoints for AWS Storage Gateway, see Regions and Endpoints in the Amazon Web Services Glossary.

Valid Values: "us-east-1", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-northeast-1", "ap-southeast-1", "ap-southeast-2", "sa-east-1"

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 25

Parameters:
gatewayRegion One of the values that indicates the region where you want to store the snapshot backups. The gateway region specified must be the same region as the region in your Host header in the request. For more information about available regions and endpoints for AWS Storage Gateway, see Regions and Endpoints in the Amazon Web Services Glossary.

Valid Values: "us-east-1", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-northeast-1", "ap-southeast-1", "ap-southeast-2", "sa-east-1"

Returns:
A reference to this updated object so that method calls can be chained together.
    public ActivateGatewayRequest withGatewayRegion(String gatewayRegion) {
        this. = gatewayRegion;
        return this;
    }

    
One of the values 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 STORED.

Constraints:
Length: 2 - 20

Returns:
One of the values 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 STORED.
    public String getGatewayType() {
        return ;
    }
    
    
One of the values 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 STORED.

Constraints:
Length: 2 - 20

Parameters:
gatewayType One of the values 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 STORED.
    public void setGatewayType(String gatewayType) {
        this. = gatewayType;
    }
    
    
One of the values 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 STORED.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 2 - 20

Parameters:
gatewayType One of the values 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 STORED.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ActivateGatewayRequest withGatewayType(String gatewayType) {
        this. = gatewayType;
        return this;
    }

    
The value that indicates the type of tape drive to use for gateway-VTL. This field is optional.

Valid Values: "IBM-ULT3580-TD5"

Constraints:
Length: 2 - 50

Returns:
The value that indicates the type of tape drive to use for gateway-VTL. This field is optional.

Valid Values: "IBM-ULT3580-TD5"

    public String getTapeDriveType() {
        return ;
    }
    
    
The value that indicates the type of tape drive to use for gateway-VTL. This field is optional.

Valid Values: "IBM-ULT3580-TD5"

Constraints:
Length: 2 - 50

Parameters:
tapeDriveType The value that indicates the type of tape drive to use for gateway-VTL. This field is optional.

Valid Values: "IBM-ULT3580-TD5"

    public void setTapeDriveType(String tapeDriveType) {
        this. = tapeDriveType;
    }
    
    
The value that indicates the type of tape drive to use for gateway-VTL. This field is optional.

Valid Values: "IBM-ULT3580-TD5"

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 2 - 50

Parameters:
tapeDriveType The value that indicates the type of tape drive to use for gateway-VTL. This field is optional.

Valid Values: "IBM-ULT3580-TD5"

Returns:
A reference to this updated object so that method calls can be chained together.
    public ActivateGatewayRequest withTapeDriveType(String tapeDriveType) {
        this. = tapeDriveType;
        return this;
    }

    
The value that indicates the type of medium changer to use for gateway-VTL. This field is optional.

Valid Values: "STK-L700", "AWS-Gateway-VTL"

Constraints:
Length: 2 - 50

Returns:
The value that indicates the type of medium changer to use for gateway-VTL. This field is optional.

Valid Values: "STK-L700", "AWS-Gateway-VTL"

    public String getMediumChangerType() {
        return ;
    }
    
    
The value that indicates the type of medium changer to use for gateway-VTL. This field is optional.

Valid Values: "STK-L700", "AWS-Gateway-VTL"

Constraints:
Length: 2 - 50

Parameters:
mediumChangerType The value that indicates the type of medium changer to use for gateway-VTL. This field is optional.

Valid Values: "STK-L700", "AWS-Gateway-VTL"

    public void setMediumChangerType(String mediumChangerType) {
        this. = mediumChangerType;
    }
    
    
The value that indicates the type of medium changer to use for gateway-VTL. This field is optional.

Valid Values: "STK-L700", "AWS-Gateway-VTL"

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 2 - 50

Parameters:
mediumChangerType The value that indicates the type of medium changer to use for gateway-VTL. This field is optional.

Valid Values: "STK-L700", "AWS-Gateway-VTL"

Returns:
A reference to this updated object so that method calls can be chained together.
    public ActivateGatewayRequest withMediumChangerType(String mediumChangerType) {
        this. = mediumChangerType;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getActivationKey() != nullsb.append("ActivationKey: " + getActivationKey() + ",");
        if (getGatewayName() != nullsb.append("GatewayName: " + getGatewayName() + ",");
        if (getGatewayTimezone() != nullsb.append("GatewayTimezone: " + getGatewayTimezone() + ",");
        if (getGatewayRegion() != nullsb.append("GatewayRegion: " + getGatewayRegion() + ",");
        if (getGatewayType() != nullsb.append("GatewayType: " + getGatewayType() + ",");
        if (getTapeDriveType() != nullsb.append("TapeDriveType: " + getTapeDriveType() + ",");
        if (getMediumChangerType() != nullsb.append("MediumChangerType: " + getMediumChangerType() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getActivationKey() == null) ? 0 : getActivationKey().hashCode()); 
        hashCode = prime * hashCode + ((getGatewayName() == null) ? 0 : getGatewayName().hashCode()); 
        hashCode = prime * hashCode + ((getGatewayTimezone() == null) ? 0 : getGatewayTimezone().hashCode()); 
        hashCode = prime * hashCode + ((getGatewayRegion() == null) ? 0 : getGatewayRegion().hashCode()); 
        hashCode = prime * hashCode + ((getGatewayType() == null) ? 0 : getGatewayType().hashCode()); 
        hashCode = prime * hashCode + ((getTapeDriveType() == null) ? 0 : getTapeDriveType().hashCode()); 
        hashCode = prime * hashCode + ((getMediumChangerType() == null) ? 0 : getMediumChangerType().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ActivateGatewayRequest == falsereturn false;
        ActivateGatewayRequest other = (ActivateGatewayRequest)obj;
        
        if (other.getActivationKey() == null ^ this.getActivationKey() == nullreturn false;
        if (other.getActivationKey() != null && other.getActivationKey().equals(this.getActivationKey()) == falsereturn false
        if (other.getGatewayName() == null ^ this.getGatewayName() == nullreturn false;
        if (other.getGatewayName() != null && other.getGatewayName().equals(this.getGatewayName()) == falsereturn false
        if (other.getGatewayTimezone() == null ^ this.getGatewayTimezone() == nullreturn false;
        if (other.getGatewayTimezone() != null && other.getGatewayTimezone().equals(this.getGatewayTimezone()) == falsereturn false
        if (other.getGatewayRegion() == null ^ this.getGatewayRegion() == nullreturn false;
        if (other.getGatewayRegion() != null && other.getGatewayRegion().equals(this.getGatewayRegion()) == falsereturn false
        if (other.getGatewayType() == null ^ this.getGatewayType() == nullreturn false;
        if (other.getGatewayType() != null && other.getGatewayType().equals(this.getGatewayType()) == falsereturn false
        if (other.getTapeDriveType() == null ^ this.getTapeDriveType() == nullreturn false;
        if (other.getTapeDriveType() != null && other.getTapeDriveType().equals(this.getTapeDriveType()) == falsereturn false
        if (other.getMediumChangerType() == null ^ this.getMediumChangerType() == nullreturn false;
        if (other.getMediumChangerType() != null && other.getMediumChangerType().equals(this.getMediumChangerType()) == falsereturn false
        return true;
    }
    
    @Override
    public ActivateGatewayRequest clone() {
        
            return (ActivateGatewayRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X