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;
 
 
Container for the parameters to the RebuildWorkspaces operation.

Rebuilds the specified WorkSpaces.

Rebuilding a WorkSpace is a potentially destructive action that can result in the loss of data. Rebuilding a WorkSpace causes the following to occur:

  • The system is restored to the image of the bundle that the WorkSpace is created from. Any applications that have been installed, or system settings that have been made since the WorkSpace was created will be lost.
  • The data drive (D drive) is re-created from the last automatic snapshot taken of the data drive. The current contents of the data drive are overwritten. Automatic snapshots of the data drive are taken every 12 hours, so the snapshot can be as much as 12 hours old.

To be able to rebuild a WorkSpace, the WorkSpace must have a State of AVAILABLE or ERROR .

NOTE: This operation is asynchronous and will return before the WorkSpaces have been completely rebuilt.

 
 public class RebuildWorkspacesRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
An array of structures that specify the WorkSpaces to rebuild.

Constraints:
Length: 1 - 1

 
An array of structures that specify the WorkSpaces to rebuild.

Constraints:
Length: 1 - 1

Returns:
An array of structures that specify the WorkSpaces to rebuild.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
An array of structures that specify the WorkSpaces to rebuild.

Constraints:
Length: 1 - 1

Parameters:
rebuildWorkspaceRequests An array of structures that specify the WorkSpaces to rebuild.
 
     public void setRebuildWorkspaceRequests(java.util.Collection<RebuildRequestrebuildWorkspaceRequests) {
         if (rebuildWorkspaceRequests == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<RebuildRequestrebuildWorkspaceRequestsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<RebuildRequest>(rebuildWorkspaceRequests.size());
         rebuildWorkspaceRequestsCopy.addAll(rebuildWorkspaceRequests);
         this. = rebuildWorkspaceRequestsCopy;
     }
    
    
An array of structures that specify the WorkSpaces to rebuild.

NOTE: This method appends the values to the existing list (if any). Use setRebuildWorkspaceRequests(java.util.Collection) or withRebuildWorkspaceRequests(java.util.Collection) if you want to override the existing values.

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

Constraints:
Length: 1 - 1

Parameters:
rebuildWorkspaceRequests An array of structures that specify the WorkSpaces to rebuild.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RebuildWorkspacesRequest withRebuildWorkspaceRequests(RebuildRequest... rebuildWorkspaceRequests) {
        if (getRebuildWorkspaceRequests() == nullsetRebuildWorkspaceRequests(new java.util.ArrayList<RebuildRequest>(rebuildWorkspaceRequests.length));
        for (RebuildRequest value : rebuildWorkspaceRequests) {
            getRebuildWorkspaceRequests().add(value);
        }
        return this;
    }
    
    
An array of structures that specify the WorkSpaces to rebuild.

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

Constraints:
Length: 1 - 1

Parameters:
rebuildWorkspaceRequests An array of structures that specify the WorkSpaces to rebuild.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (rebuildWorkspaceRequests == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<RebuildRequestrebuildWorkspaceRequestsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<RebuildRequest>(rebuildWorkspaceRequests.size());
            rebuildWorkspaceRequestsCopy.addAll(rebuildWorkspaceRequests);
            this. = rebuildWorkspaceRequestsCopy;
        }
        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 (getRebuildWorkspaceRequests() != nullsb.append("RebuildWorkspaceRequests: " + getRebuildWorkspaceRequests() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getRebuildWorkspaceRequests() == null) ? 0 : getRebuildWorkspaceRequests().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof RebuildWorkspacesRequest == falsereturn false;
        RebuildWorkspacesRequest other = (RebuildWorkspacesRequest)obj;
        
        if (other.getRebuildWorkspaceRequests() == null ^ this.getRebuildWorkspaceRequests() == nullreturn false;
        if (other.getRebuildWorkspaceRequests() != null && other.getRebuildWorkspaceRequests().equals(this.getRebuildWorkspaceRequests()) == falsereturn false
        return true;
    }
    
    @Override
    public RebuildWorkspacesRequest clone() {
        
            return (RebuildWorkspacesRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X