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.workspaces.model;
 

Contains information about a WorkSpace bundle.

 
 public class WorkspaceBundle implements SerializableCloneable {

    
The bundle identifier.

Constraints:
Pattern: ^wsb-[0-9a-z]{8,63}$

 
     private String bundleId;

    
The name of the bundle.

Constraints:
Length: 1 -

 
     private String name;

    
The owner of the bundle. This contains the owner's account identifier, or AMAZON if the bundle is provided by AWS.
 
     private String owner;

    
The bundle description.
 
     private String description;

    
A UserStorage object that specifies the amount of user storage that the bundle contains.
 
     private UserStorage userStorage;

    
A ComputeType object that specifies the compute type for the bundle.
 
     private ComputeType computeType;

    
The bundle identifier.

Constraints:
Pattern: ^wsb-[0-9a-z]{8,63}$

Returns:
The bundle identifier.
 
     public String getBundleId() {
         return ;
     }
    
    
The bundle identifier.

Constraints:
Pattern: ^wsb-[0-9a-z]{8,63}$

Parameters:
bundleId The bundle identifier.
 
     public void setBundleId(String bundleId) {
         this. = bundleId;
     }
    
    
The bundle identifier.

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

Constraints:
Pattern: ^wsb-[0-9a-z]{8,63}$

Parameters:
bundleId The bundle identifier.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkspaceBundle withBundleId(String bundleId) {
        this. = bundleId;
        return this;
    }

    
The name of the bundle.

Constraints:
Length: 1 -

Returns:
The name of the bundle.
    public String getName() {
        return ;
    }
    
    
The name of the bundle.

Constraints:
Length: 1 -

Parameters:
name The name of the bundle.
    public void setName(String name) {
        this. = name;
    }
    
    
The name of the bundle.

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

Constraints:
Length: 1 -

Parameters:
name The name of the bundle.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkspaceBundle withName(String name) {
        this. = name;
        return this;
    }

    
The owner of the bundle. This contains the owner's account identifier, or AMAZON if the bundle is provided by AWS.

Returns:
The owner of the bundle. This contains the owner's account identifier, or AMAZON if the bundle is provided by AWS.
    public String getOwner() {
        return ;
    }
    
    
The owner of the bundle. This contains the owner's account identifier, or AMAZON if the bundle is provided by AWS.

Parameters:
owner The owner of the bundle. This contains the owner's account identifier, or AMAZON if the bundle is provided by AWS.
    public void setOwner(String owner) {
        this. = owner;
    }
    
    
The owner of the bundle. This contains the owner's account identifier, or AMAZON if the bundle is provided by AWS.

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

Parameters:
owner The owner of the bundle. This contains the owner's account identifier, or AMAZON if the bundle is provided by AWS.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkspaceBundle withOwner(String owner) {
        this. = owner;
        return this;
    }

    
The bundle description.

Returns:
The bundle description.
    public String getDescription() {
        return ;
    }
    
    
The bundle description.

Parameters:
description The bundle description.
    public void setDescription(String description) {
        this. = description;
    }
    
    
The bundle description.

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

Parameters:
description The bundle description.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkspaceBundle withDescription(String description) {
        this. = description;
        return this;
    }

    
A UserStorage object that specifies the amount of user storage that the bundle contains.

Returns:
A UserStorage object that specifies the amount of user storage that the bundle contains.
    public UserStorage getUserStorage() {
        return ;
    }
    
    
A UserStorage object that specifies the amount of user storage that the bundle contains.

Parameters:
userStorage A UserStorage object that specifies the amount of user storage that the bundle contains.
    public void setUserStorage(UserStorage userStorage) {
        this. = userStorage;
    }
    
    
A UserStorage object that specifies the amount of user storage that the bundle contains.

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

Parameters:
userStorage A UserStorage object that specifies the amount of user storage that the bundle contains.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkspaceBundle withUserStorage(UserStorage userStorage) {
        this. = userStorage;
        return this;
    }

    
A ComputeType object that specifies the compute type for the bundle.

Returns:
A ComputeType object that specifies the compute type for the bundle.
    public ComputeType getComputeType() {
        return ;
    }
    
    
A ComputeType object that specifies the compute type for the bundle.

Parameters:
computeType A ComputeType object that specifies the compute type for the bundle.
    public void setComputeType(ComputeType computeType) {
        this. = computeType;
    }
    
    
A ComputeType object that specifies the compute type for the bundle.

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

Parameters:
computeType A ComputeType object that specifies the compute type for the bundle.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkspaceBundle withComputeType(ComputeType computeType) {
        this. = computeType;
        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 (getBundleId() != nullsb.append("BundleId: " + getBundleId() + ",");
        if (getName() != nullsb.append("Name: " + getName() + ",");
        if (getOwner() != nullsb.append("Owner: " + getOwner() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getUserStorage() != nullsb.append("UserStorage: " + getUserStorage() + ",");
        if (getComputeType() != nullsb.append("ComputeType: " + getComputeType() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getBundleId() == null) ? 0 : getBundleId().hashCode()); 
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getUserStorage() == null) ? 0 : getUserStorage().hashCode()); 
        hashCode = prime * hashCode + ((getComputeType() == null) ? 0 : getComputeType().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof WorkspaceBundle == falsereturn false;
        WorkspaceBundle other = (WorkspaceBundle)obj;
        
        if (other.getBundleId() == null ^ this.getBundleId() == nullreturn false;
        if (other.getBundleId() != null && other.getBundleId().equals(this.getBundleId()) == falsereturn false
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getOwner() == null ^ this.getOwner() == nullreturn false;
        if (other.getOwner() != null && other.getOwner().equals(this.getOwner()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getUserStorage() == null ^ this.getUserStorage() == nullreturn false;
        if (other.getUserStorage() != null && other.getUserStorage().equals(this.getUserStorage()) == falsereturn false
        if (other.getComputeType() == null ^ this.getComputeType() == nullreturn false;
        if (other.getComputeType() != null && other.getComputeType().equals(this.getComputeType()) == falsereturn false
        return true;
    }
    
    @Override
    public WorkspaceBundle clone() {
        try {
            return (WorkspaceBundlesuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X