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 the result of the CreateWorkspaces operation.

 
 public class CreateWorkspacesResult implements SerializableCloneable {

    
An array of structures that represent the WorkSpaces that could not be created.
 
An array of structures that represent the WorkSpaces that were created.

Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

 
An array of structures that represent the WorkSpaces that could not be created.

Returns:
An array of structures that represent the WorkSpaces that could not be created.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
An array of structures that represent the WorkSpaces that could not be created.

Parameters:
failedRequests An array of structures that represent the WorkSpaces that could not be created.
 
     public void setFailedRequests(java.util.Collection<FailedCreateWorkspaceRequestfailedRequests) {
         if (failedRequests == null) {
             this. = null;
             return;
         }
         failedRequestsCopy.addAll(failedRequests);
         this. = failedRequestsCopy;
     }
    
    
An array of structures that represent the WorkSpaces that could not be created.

NOTE: This method appends the values to the existing list (if any). Use setFailedRequests(java.util.Collection) or withFailedRequests(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.

Parameters:
failedRequests An array of structures that represent the WorkSpaces that could not be created.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         if (getFailedRequests() == nullsetFailedRequests(new java.util.ArrayList<FailedCreateWorkspaceRequest>(failedRequests.length));
         for (FailedCreateWorkspaceRequest value : failedRequests) {
             getFailedRequests().add(value);
         }
         return this;
     }
    
    
An array of structures that represent the WorkSpaces that could not be created.

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

Parameters:
failedRequests An array of structures that represent the WorkSpaces that could not be created.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (failedRequests == null) {
            this. = null;
        } else {
            failedRequestsCopy.addAll(failedRequests);
            this. = failedRequestsCopy;
        }
        return this;
    }

    
An array of structures that represent the WorkSpaces that were created.

Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

Returns:
An array of structures that represent the WorkSpaces that were created.

Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
An array of structures that represent the WorkSpaces that were created.

Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

Parameters:
pendingRequests An array of structures that represent the WorkSpaces that were created.

Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

    public void setPendingRequests(java.util.Collection<WorkspacependingRequests) {
        if (pendingRequests == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<WorkspacependingRequestsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Workspace>(pendingRequests.size());
        pendingRequestsCopy.addAll(pendingRequests);
        this. = pendingRequestsCopy;
    }
    
    
An array of structures that represent the WorkSpaces that were created.

Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

NOTE: This method appends the values to the existing list (if any). Use setPendingRequests(java.util.Collection) or withPendingRequests(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.

Parameters:
pendingRequests An array of structures that represent the WorkSpaces that were created.

Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateWorkspacesResult withPendingRequests(Workspace... pendingRequests) {
        if (getPendingRequests() == nullsetPendingRequests(new java.util.ArrayList<Workspace>(pendingRequests.length));
        for (Workspace value : pendingRequests) {
            getPendingRequests().add(value);
        }
        return this;
    }
    
    
An array of structures that represent the WorkSpaces that were created.

Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

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

Parameters:
pendingRequests An array of structures that represent the WorkSpaces that were created.

Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

Returns:
A reference to this updated object so that method calls can be chained together.
        if (pendingRequests == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<WorkspacependingRequestsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Workspace>(pendingRequests.size());
            pendingRequestsCopy.addAll(pendingRequests);
            this. = pendingRequestsCopy;
        }
        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 (getFailedRequests() != nullsb.append("FailedRequests: " + getFailedRequests() + ",");
        if (getPendingRequests() != nullsb.append("PendingRequests: " + getPendingRequests() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getFailedRequests() == null) ? 0 : getFailedRequests().hashCode()); 
        hashCode = prime * hashCode + ((getPendingRequests() == null) ? 0 : getPendingRequests().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateWorkspacesResult == falsereturn false;
        CreateWorkspacesResult other = (CreateWorkspacesResult)obj;
        
        if (other.getFailedRequests() == null ^ this.getFailedRequests() == nullreturn false;
        if (other.getFailedRequests() != null && other.getFailedRequests().equals(this.getFailedRequests()) == falsereturn false
        if (other.getPendingRequests() == null ^ this.getPendingRequests() == nullreturn false;
        if (other.getPendingRequests() != null && other.getPendingRequests().equals(this.getPendingRequests()) == falsereturn false
        return true;
    }
    
    @Override
    public CreateWorkspacesResult clone() {
        try {
            return (CreateWorkspacesResultsuper.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