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

com.amazonaws.services.devicefarm.model.Offering Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Device Farm module holds the client classes that are used for communicating with AWS Device Farm

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 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.devicefarm.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Represents the metadata of a device offering. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Offering implements Serializable, Cloneable, StructuredPojo { /** *

* The ID that corresponds to a device offering. *

*/ private String id; /** *

* A string that describes the offering. *

*/ private String description; /** *

* The type of offering (for example, RECURRING) for a device. *

*/ private String type; /** *

* The platform of the device (for example, ANDROID or IOS). *

*/ private String platform; /** *

* Specifies whether there are recurring charges for the offering. *

*/ private java.util.List recurringCharges; /** *

* The ID that corresponds to a device offering. *

* * @param id * The ID that corresponds to a device offering. */ public void setId(String id) { this.id = id; } /** *

* The ID that corresponds to a device offering. *

* * @return The ID that corresponds to a device offering. */ public String getId() { return this.id; } /** *

* The ID that corresponds to a device offering. *

* * @param id * The ID that corresponds to a device offering. * @return Returns a reference to this object so that method calls can be chained together. */ public Offering withId(String id) { setId(id); return this; } /** *

* A string that describes the offering. *

* * @param description * A string that describes the offering. */ public void setDescription(String description) { this.description = description; } /** *

* A string that describes the offering. *

* * @return A string that describes the offering. */ public String getDescription() { return this.description; } /** *

* A string that describes the offering. *

* * @param description * A string that describes the offering. * @return Returns a reference to this object so that method calls can be chained together. */ public Offering withDescription(String description) { setDescription(description); return this; } /** *

* The type of offering (for example, RECURRING) for a device. *

* * @param type * The type of offering (for example, RECURRING) for a device. * @see OfferingType */ public void setType(String type) { this.type = type; } /** *

* The type of offering (for example, RECURRING) for a device. *

* * @return The type of offering (for example, RECURRING) for a device. * @see OfferingType */ public String getType() { return this.type; } /** *

* The type of offering (for example, RECURRING) for a device. *

* * @param type * The type of offering (for example, RECURRING) for a device. * @return Returns a reference to this object so that method calls can be chained together. * @see OfferingType */ public Offering withType(String type) { setType(type); return this; } /** *

* The type of offering (for example, RECURRING) for a device. *

* * @param type * The type of offering (for example, RECURRING) for a device. * @see OfferingType */ public void setType(OfferingType type) { withType(type); } /** *

* The type of offering (for example, RECURRING) for a device. *

* * @param type * The type of offering (for example, RECURRING) for a device. * @return Returns a reference to this object so that method calls can be chained together. * @see OfferingType */ public Offering withType(OfferingType type) { this.type = type.toString(); return this; } /** *

* The platform of the device (for example, ANDROID or IOS). *

* * @param platform * The platform of the device (for example, ANDROID or IOS). * @see DevicePlatform */ public void setPlatform(String platform) { this.platform = platform; } /** *

* The platform of the device (for example, ANDROID or IOS). *

* * @return The platform of the device (for example, ANDROID or IOS). * @see DevicePlatform */ public String getPlatform() { return this.platform; } /** *

* The platform of the device (for example, ANDROID or IOS). *

* * @param platform * The platform of the device (for example, ANDROID or IOS). * @return Returns a reference to this object so that method calls can be chained together. * @see DevicePlatform */ public Offering withPlatform(String platform) { setPlatform(platform); return this; } /** *

* The platform of the device (for example, ANDROID or IOS). *

* * @param platform * The platform of the device (for example, ANDROID or IOS). * @see DevicePlatform */ public void setPlatform(DevicePlatform platform) { withPlatform(platform); } /** *

* The platform of the device (for example, ANDROID or IOS). *

* * @param platform * The platform of the device (for example, ANDROID or IOS). * @return Returns a reference to this object so that method calls can be chained together. * @see DevicePlatform */ public Offering withPlatform(DevicePlatform platform) { this.platform = platform.toString(); return this; } /** *

* Specifies whether there are recurring charges for the offering. *

* * @return Specifies whether there are recurring charges for the offering. */ public java.util.List getRecurringCharges() { return recurringCharges; } /** *

* Specifies whether there are recurring charges for the offering. *

* * @param recurringCharges * Specifies whether there are recurring charges for the offering. */ public void setRecurringCharges(java.util.Collection recurringCharges) { if (recurringCharges == null) { this.recurringCharges = null; return; } this.recurringCharges = new java.util.ArrayList(recurringCharges); } /** *

* Specifies whether there are recurring charges for the offering. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRecurringCharges(java.util.Collection)} or {@link #withRecurringCharges(java.util.Collection)} if you * want to override the existing values. *

* * @param recurringCharges * Specifies whether there are recurring charges for the offering. * @return Returns a reference to this object so that method calls can be chained together. */ public Offering withRecurringCharges(RecurringCharge... recurringCharges) { if (this.recurringCharges == null) { setRecurringCharges(new java.util.ArrayList(recurringCharges.length)); } for (RecurringCharge ele : recurringCharges) { this.recurringCharges.add(ele); } return this; } /** *

* Specifies whether there are recurring charges for the offering. *

* * @param recurringCharges * Specifies whether there are recurring charges for the offering. * @return Returns a reference to this object so that method calls can be chained together. */ public Offering withRecurringCharges(java.util.Collection recurringCharges) { setRecurringCharges(recurringCharges); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getPlatform() != null) sb.append("Platform: ").append(getPlatform()).append(","); if (getRecurringCharges() != null) sb.append("RecurringCharges: ").append(getRecurringCharges()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Offering == false) return false; Offering other = (Offering) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getPlatform() == null ^ this.getPlatform() == null) return false; if (other.getPlatform() != null && other.getPlatform().equals(this.getPlatform()) == false) return false; if (other.getRecurringCharges() == null ^ this.getRecurringCharges() == null) return false; if (other.getRecurringCharges() != null && other.getRecurringCharges().equals(this.getRecurringCharges()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); hashCode = prime * hashCode + ((getRecurringCharges() == null) ? 0 : getRecurringCharges().hashCode()); return hashCode; } @Override public Offering clone() { try { return (Offering) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.devicefarm.model.transform.OfferingMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy