org.openapitools.client.model.SubscriptionUpdatePlanPatchResponse 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.SubscriptionItemListResponse;
import org.openapitools.jackson.nullable.JsonNullable;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* SubscriptionUpdatePlanPatchResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionUpdatePlanPatchResponse {
public static final String SERIALIZED_NAME_UNIQUE_TOKEN = "unique_token";
@SerializedName(SERIALIZED_NAME_UNIQUE_TOKEN)
private String uniqueToken;
public static final String SERIALIZED_NAME_PLAN_ID = "plan_id";
@SerializedName(SERIALIZED_NAME_PLAN_ID)
private String planId;
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_SUBSCRIPTION_ITEMS = "subscription_items";
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ITEMS)
private SubscriptionItemListResponse subscriptionItems;
public SubscriptionUpdatePlanPatchResponse() {
}
public SubscriptionUpdatePlanPatchResponse uniqueToken(String uniqueToken) {
this.uniqueToken = uniqueToken;
return this;
}
/**
* A unique string to represent the subscription plan in the order. The unique token is used to perform multiple actions against a newly added subscription plan. For example, if you want to add and update a product in the same order, assign a unique token to the newly added subscription plan and use that token in future order actions.
* @return uniqueToken
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "A unique string to represent the subscription plan in the order. The unique token is used to perform multiple actions against a newly added subscription plan. For example, if you want to add and update a product in the same order, assign a unique token to the newly added subscription plan and use that token in future order actions.")
public String getUniqueToken() {
return uniqueToken;
}
public void setUniqueToken(String uniqueToken) {
this.uniqueToken = uniqueToken;
}
public SubscriptionUpdatePlanPatchResponse planId(String planId) {
this.planId = planId;
return this;
}
/**
* The id of the subscription plan to be updated. It can be the latest version or any history version id.
* @return planId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The id of the subscription plan to be updated. It can be the latest version or any history version id.")
public String getPlanId() {
return planId;
}
public void setPlanId(String planId) {
this.planId = planId;
}
public SubscriptionUpdatePlanPatchResponse customFields(Map customFields) {
this.customFields = customFields;
return this;
}
public SubscriptionUpdatePlanPatchResponse 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;
}
public SubscriptionUpdatePlanPatchResponse subscriptionItems(SubscriptionItemListResponse subscriptionItems) {
this.subscriptionItems = subscriptionItems;
return this;
}
/**
* Get subscriptionItems
* @return subscriptionItems
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public SubscriptionItemListResponse getSubscriptionItems() {
return subscriptionItems;
}
public void setSubscriptionItems(SubscriptionItemListResponse subscriptionItems) {
this.subscriptionItems = subscriptionItems;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SubscriptionUpdatePlanPatchResponse subscriptionUpdatePlanPatchResponse = (SubscriptionUpdatePlanPatchResponse) o;
return Objects.equals(this.uniqueToken, subscriptionUpdatePlanPatchResponse.uniqueToken) &&
Objects.equals(this.planId, subscriptionUpdatePlanPatchResponse.planId) &&
Objects.equals(this.customFields, subscriptionUpdatePlanPatchResponse.customFields) &&
Objects.equals(this.subscriptionItems, subscriptionUpdatePlanPatchResponse.subscriptionItems);
}
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(uniqueToken, planId, customFields, subscriptionItems);
}
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 SubscriptionUpdatePlanPatchResponse {\n");
sb.append(" uniqueToken: ").append(toIndentedString(uniqueToken)).append("\n");
sb.append(" planId: ").append(toIndentedString(planId)).append("\n");
sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n");
sb.append(" subscriptionItems: ").append(toIndentedString(subscriptionItems)).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