All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ec2.model.CancelSpotFleetRequestsResult Maven / Gradle / Ivy

Go to download

The AWS Android SDK for Amazon EC2 module holds the client classes that are used for communicating with Amazon EC2 Service

There is a newer version: 2.79.0
Show newest version
/*
 * Copyright 2010-2016 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.ec2.model;

import java.io.Serializable;

/**
 * 

* Contains the output of CancelSpotFleetRequests. *

*/ public class CancelSpotFleetRequestsResult implements Serializable { /** * Information about the Spot fleet requests that are not successfully * canceled. */ private com.amazonaws.internal.ListWithAutoConstructFlag unsuccessfulFleetRequests; /** * Information about the Spot fleet requests that are successfully * canceled. */ private com.amazonaws.internal.ListWithAutoConstructFlag successfulFleetRequests; /** * Information about the Spot fleet requests that are not successfully * canceled. * * @return Information about the Spot fleet requests that are not successfully * canceled. */ public java.util.List getUnsuccessfulFleetRequests() { if (unsuccessfulFleetRequests == null) { unsuccessfulFleetRequests = new com.amazonaws.internal.ListWithAutoConstructFlag(); unsuccessfulFleetRequests.setAutoConstruct(true); } return unsuccessfulFleetRequests; } /** * Information about the Spot fleet requests that are not successfully * canceled. * * @param unsuccessfulFleetRequests Information about the Spot fleet requests that are not successfully * canceled. */ public void setUnsuccessfulFleetRequests(java.util.Collection unsuccessfulFleetRequests) { if (unsuccessfulFleetRequests == null) { this.unsuccessfulFleetRequests = null; return; } com.amazonaws.internal.ListWithAutoConstructFlag unsuccessfulFleetRequestsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(unsuccessfulFleetRequests.size()); unsuccessfulFleetRequestsCopy.addAll(unsuccessfulFleetRequests); this.unsuccessfulFleetRequests = unsuccessfulFleetRequestsCopy; } /** * Information about the Spot fleet requests that are not successfully * canceled. *

* Returns a reference to this object so that method calls can be chained together. * * @param unsuccessfulFleetRequests Information about the Spot fleet requests that are not successfully * canceled. * * @return A reference to this updated object so that method calls can be chained * together. */ public CancelSpotFleetRequestsResult withUnsuccessfulFleetRequests(CancelSpotFleetRequestsErrorItem... unsuccessfulFleetRequests) { if (getUnsuccessfulFleetRequests() == null) setUnsuccessfulFleetRequests(new java.util.ArrayList(unsuccessfulFleetRequests.length)); for (CancelSpotFleetRequestsErrorItem value : unsuccessfulFleetRequests) { getUnsuccessfulFleetRequests().add(value); } return this; } /** * Information about the Spot fleet requests that are not successfully * canceled. *

* Returns a reference to this object so that method calls can be chained together. * * @param unsuccessfulFleetRequests Information about the Spot fleet requests that are not successfully * canceled. * * @return A reference to this updated object so that method calls can be chained * together. */ public CancelSpotFleetRequestsResult withUnsuccessfulFleetRequests(java.util.Collection unsuccessfulFleetRequests) { if (unsuccessfulFleetRequests == null) { this.unsuccessfulFleetRequests = null; } else { com.amazonaws.internal.ListWithAutoConstructFlag unsuccessfulFleetRequestsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(unsuccessfulFleetRequests.size()); unsuccessfulFleetRequestsCopy.addAll(unsuccessfulFleetRequests); this.unsuccessfulFleetRequests = unsuccessfulFleetRequestsCopy; } return this; } /** * Information about the Spot fleet requests that are successfully * canceled. * * @return Information about the Spot fleet requests that are successfully * canceled. */ public java.util.List getSuccessfulFleetRequests() { if (successfulFleetRequests == null) { successfulFleetRequests = new com.amazonaws.internal.ListWithAutoConstructFlag(); successfulFleetRequests.setAutoConstruct(true); } return successfulFleetRequests; } /** * Information about the Spot fleet requests that are successfully * canceled. * * @param successfulFleetRequests Information about the Spot fleet requests that are successfully * canceled. */ public void setSuccessfulFleetRequests(java.util.Collection successfulFleetRequests) { if (successfulFleetRequests == null) { this.successfulFleetRequests = null; return; } com.amazonaws.internal.ListWithAutoConstructFlag successfulFleetRequestsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(successfulFleetRequests.size()); successfulFleetRequestsCopy.addAll(successfulFleetRequests); this.successfulFleetRequests = successfulFleetRequestsCopy; } /** * Information about the Spot fleet requests that are successfully * canceled. *

* Returns a reference to this object so that method calls can be chained together. * * @param successfulFleetRequests Information about the Spot fleet requests that are successfully * canceled. * * @return A reference to this updated object so that method calls can be chained * together. */ public CancelSpotFleetRequestsResult withSuccessfulFleetRequests(CancelSpotFleetRequestsSuccessItem... successfulFleetRequests) { if (getSuccessfulFleetRequests() == null) setSuccessfulFleetRequests(new java.util.ArrayList(successfulFleetRequests.length)); for (CancelSpotFleetRequestsSuccessItem value : successfulFleetRequests) { getSuccessfulFleetRequests().add(value); } return this; } /** * Information about the Spot fleet requests that are successfully * canceled. *

* Returns a reference to this object so that method calls can be chained together. * * @param successfulFleetRequests Information about the Spot fleet requests that are successfully * canceled. * * @return A reference to this updated object so that method calls can be chained * together. */ public CancelSpotFleetRequestsResult withSuccessfulFleetRequests(java.util.Collection successfulFleetRequests) { if (successfulFleetRequests == null) { this.successfulFleetRequests = null; } else { com.amazonaws.internal.ListWithAutoConstructFlag successfulFleetRequestsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag(successfulFleetRequests.size()); successfulFleetRequestsCopy.addAll(successfulFleetRequests); this.successfulFleetRequests = successfulFleetRequestsCopy; } return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getUnsuccessfulFleetRequests() != null) sb.append("UnsuccessfulFleetRequests: " + getUnsuccessfulFleetRequests() + ","); if (getSuccessfulFleetRequests() != null) sb.append("SuccessfulFleetRequests: " + getSuccessfulFleetRequests() ); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUnsuccessfulFleetRequests() == null) ? 0 : getUnsuccessfulFleetRequests().hashCode()); hashCode = prime * hashCode + ((getSuccessfulFleetRequests() == null) ? 0 : getSuccessfulFleetRequests().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CancelSpotFleetRequestsResult == false) return false; CancelSpotFleetRequestsResult other = (CancelSpotFleetRequestsResult)obj; if (other.getUnsuccessfulFleetRequests() == null ^ this.getUnsuccessfulFleetRequests() == null) return false; if (other.getUnsuccessfulFleetRequests() != null && other.getUnsuccessfulFleetRequests().equals(this.getUnsuccessfulFleetRequests()) == false) return false; if (other.getSuccessfulFleetRequests() == null ^ this.getSuccessfulFleetRequests() == null) return false; if (other.getSuccessfulFleetRequests() != null && other.getSuccessfulFleetRequests().equals(this.getSuccessfulFleetRequests()) == false) return false; return true; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy