org.openapitools.client.model.SubscriptionPlan Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zuora-sdk-java Show documentation
Show all versions of zuora-sdk-java Show documentation
The SDK of JAVA language for Zuora pricing system
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.CustomObject;
import org.openapitools.client.model.ListCustomObjectResponse;
import org.openapitools.client.model.Plan;
import org.openapitools.client.model.Product;
import org.openapitools.client.model.Subscription;
import org.openapitools.client.model.SubscriptionItemListResponse;
import org.openapitools.jackson.nullable.JsonNullable;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* Subscription plan information.
*/
@ApiModel(description = "Subscription plan information.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionPlan {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private String id;
public static final String SERIALIZED_NAME_UPDATED_BY_ID = "updated_by_id";
@SerializedName(SERIALIZED_NAME_UPDATED_BY_ID)
private String updatedById;
public static final String SERIALIZED_NAME_UPDATED_TIME = "updated_time";
@SerializedName(SERIALIZED_NAME_UPDATED_TIME)
private OffsetDateTime updatedTime;
public static final String SERIALIZED_NAME_CREATED_BY_ID = "created_by_id";
@SerializedName(SERIALIZED_NAME_CREATED_BY_ID)
private String createdById;
public static final String SERIALIZED_NAME_CREATED_TIME = "created_time";
@SerializedName(SERIALIZED_NAME_CREATED_TIME)
private OffsetDateTime createdTime;
public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "custom_fields";
@SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
@JsonAdapter(CustomFieldAdapter.class)
private Map customFields = null;
public static final String SERIALIZED_NAME_CUSTOM_OBJECTS = "custom_objects";
@SerializedName(SERIALIZED_NAME_CUSTOM_OBJECTS)
private Map customObjects = null;
public static final String SERIALIZED_NAME_SUBSCRIPTION = "subscription";
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION)
private Subscription subscription;
public static final String SERIALIZED_NAME_SUBSCRIPTION_ID = "subscription_id";
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID)
private String subscriptionId;
public static final String SERIALIZED_NAME_PRODUCT_ID = "product_id";
@SerializedName(SERIALIZED_NAME_PRODUCT_ID)
private String productId;
public static final String SERIALIZED_NAME_PLAN_ID = "plan_id";
@SerializedName(SERIALIZED_NAME_PLAN_ID)
private String planId;
public static final String SERIALIZED_NAME_PLAN = "plan";
@SerializedName(SERIALIZED_NAME_PLAN)
private Plan plan;
public static final String SERIALIZED_NAME_PRODUCT = "product";
@SerializedName(SERIALIZED_NAME_PRODUCT)
private Product product;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public static final String SERIALIZED_NAME_SUBSCRIPTION_ITEMS = "subscription_items";
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ITEMS)
private SubscriptionItemListResponse subscriptionItems;
public static final String SERIALIZED_NAME_SUBSCRIPTION_PLAN_NUMBER = "subscription_plan_number";
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION_PLAN_NUMBER)
private String subscriptionPlanNumber;
public SubscriptionPlan() {
}
public SubscriptionPlan(
String id,
String updatedById,
OffsetDateTime updatedTime,
String createdById,
OffsetDateTime createdTime,
Map customObjects,
SubscriptionItemListResponse subscriptionItems
) {
this();
this.id = id;
this.updatedById = updatedById;
this.updatedTime = updatedTime;
this.createdById = createdById;
this.createdTime = createdTime;
this.customObjects = customObjects;
this.subscriptionItems = subscriptionItems;
}
/**
* Unique identifier for the object.
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Unique identifier for the object.")
public String getId() {
return id;
}
/**
* Unique identifier of the Zuora user who last updated the object
* @return updatedById
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Unique identifier of the Zuora user who last updated the object")
public String getUpdatedById() {
return updatedById;
}
/**
* The date and time when the object was last updated in ISO 8601 UTC format.
* @return updatedTime
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The date and time when the object was last updated in ISO 8601 UTC format.")
public OffsetDateTime getUpdatedTime() {
return updatedTime;
}
/**
* Unique identifier of the Zuora user who created the object
* @return createdById
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Unique identifier of the Zuora user who created the object")
public String getCreatedById() {
return createdById;
}
/**
* The date and time when the object was created in ISO 8601 UTC format.
* @return createdTime
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The date and time when the object was created in ISO 8601 UTC format.")
public OffsetDateTime getCreatedTime() {
return createdTime;
}
public SubscriptionPlan customFields(Map customFields) {
this.customFields = customFields;
return this;
}
public SubscriptionPlan putCustomFieldsItem(String key, String customFieldsItem) {
if (this.customFields == null) {
this.customFields = new HashMap();
}
this.customFields.put(key, customFieldsItem);
return this;
}
/**
* Set of user-defined fields associated with this object. Useful for storing additional information about the object in a structured format.
* @return customFields
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Set of user-defined fields associated with this object. Useful for storing additional information about the object in a structured format.")
public Map getCustomFields() {
return customFields;
}
public void setCustomFields(Map customFields) {
this.customFields = customFields;
}
/**
* The custom objects associated with a Zuora standard object.
* @return customObjects
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The custom objects associated with a Zuora standard object.")
public Map getCustomObjects() {
return customObjects;
}
public SubscriptionPlan subscription(Subscription subscription) {
this.subscription = subscription;
return this;
}
/**
* The subscription to which this subscription plan belongs.
* @return subscription
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The subscription to which this subscription plan belongs.")
public Subscription getSubscription() {
return subscription;
}
public void setSubscription(Subscription subscription) {
this.subscription = subscription;
}
public SubscriptionPlan subscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
return this;
}
/**
* Identifier of the subscription this subscription plan belongs to.
* @return subscriptionId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Identifier of the subscription this subscription plan belongs to.")
public String getSubscriptionId() {
return subscriptionId;
}
public void setSubscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
}
public SubscriptionPlan productId(String productId) {
this.productId = productId;
return this;
}
/**
* Identifier of the product associated with this subscription plan.
* @return productId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Identifier of the product associated with this subscription plan.")
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public SubscriptionPlan planId(String planId) {
this.planId = planId;
return this;
}
/**
* Identifier of the plan associated with this subscription plan.
* @return planId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Identifier of the plan associated with this subscription plan.")
public String getPlanId() {
return planId;
}
public void setPlanId(String planId) {
this.planId = planId;
}
public SubscriptionPlan plan(Plan plan) {
this.plan = plan;
return this;
}
/**
* The plan object associated with this subscription plan.
* @return plan
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The plan object associated with this subscription plan.")
public Plan getPlan() {
return plan;
}
public void setPlan(Plan plan) {
this.plan = plan;
}
public SubscriptionPlan product(Product product) {
this.product = product;
return this;
}
/**
* The product associated with the subscription plan.
* @return product
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The product associated with the subscription plan.")
public Product getProduct() {
return product;
}
public void setProduct(Product product) {
this.product = product;
}
public SubscriptionPlan name(String name) {
this.name = name;
return this;
}
/**
* The name of the subscription plan.
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The name of the subscription plan.")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
* List of subscription items.
* @return subscriptionItems
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "List of subscription items.")
public SubscriptionItemListResponse getSubscriptionItems() {
return subscriptionItems;
}
public SubscriptionPlan subscriptionPlanNumber(String subscriptionPlanNumber) {
this.subscriptionPlanNumber = subscriptionPlanNumber;
return this;
}
/**
* Human-readable number of the subscription plan.
* @return subscriptionPlanNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Human-readable number of the subscription plan.")
public String getSubscriptionPlanNumber() {
return subscriptionPlanNumber;
}
public void setSubscriptionPlanNumber(String subscriptionPlanNumber) {
this.subscriptionPlanNumber = subscriptionPlanNumber;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SubscriptionPlan subscriptionPlan = (SubscriptionPlan) o;
return Objects.equals(this.id, subscriptionPlan.id) &&
Objects.equals(this.updatedById, subscriptionPlan.updatedById) &&
Objects.equals(this.updatedTime, subscriptionPlan.updatedTime) &&
Objects.equals(this.createdById, subscriptionPlan.createdById) &&
Objects.equals(this.createdTime, subscriptionPlan.createdTime) &&
Objects.equals(this.customFields, subscriptionPlan.customFields) &&
Objects.equals(this.customObjects, subscriptionPlan.customObjects) &&
Objects.equals(this.subscription, subscriptionPlan.subscription) &&
Objects.equals(this.subscriptionId, subscriptionPlan.subscriptionId) &&
Objects.equals(this.productId, subscriptionPlan.productId) &&
Objects.equals(this.planId, subscriptionPlan.planId) &&
Objects.equals(this.plan, subscriptionPlan.plan) &&
Objects.equals(this.product, subscriptionPlan.product) &&
Objects.equals(this.name, subscriptionPlan.name) &&
Objects.equals(this.subscriptionItems, subscriptionPlan.subscriptionItems) &&
Objects.equals(this.subscriptionPlanNumber, subscriptionPlan.subscriptionPlanNumber);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(id, updatedById, updatedTime, createdById, createdTime, customFields, customObjects, subscription, subscriptionId, productId, planId, plan, product, name, subscriptionItems, subscriptionPlanNumber);
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SubscriptionPlan {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" updatedById: ").append(toIndentedString(updatedById)).append("\n");
sb.append(" updatedTime: ").append(toIndentedString(updatedTime)).append("\n");
sb.append(" createdById: ").append(toIndentedString(createdById)).append("\n");
sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n");
sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n");
sb.append(" customObjects: ").append(toIndentedString(customObjects)).append("\n");
sb.append(" subscription: ").append(toIndentedString(subscription)).append("\n");
sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n");
sb.append(" productId: ").append(toIndentedString(productId)).append("\n");
sb.append(" planId: ").append(toIndentedString(planId)).append("\n");
sb.append(" plan: ").append(toIndentedString(plan)).append("\n");
sb.append(" product: ").append(toIndentedString(product)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" subscriptionItems: ").append(toIndentedString(subscriptionItems)).append("\n");
sb.append(" subscriptionPlanNumber: ").append(toIndentedString(subscriptionPlanNumber)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy