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

org.openapitools.client.model.SubscriptionAddPlanPatchRequest Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
* 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.StartOn;
import org.openapitools.client.model.SubscriptionPlanCreateRequest;

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * SubscriptionAddPlanPatchRequest
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionAddPlanPatchRequest {
  public static final String SERIALIZED_NAME_SUBSCRIPTION_PLAN = "subscription_plan";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_PLAN)
  private SubscriptionPlanCreateRequest subscriptionPlan;

  public static final String SERIALIZED_NAME_START_ON = "start_on";
  @SerializedName(SERIALIZED_NAME_START_ON)
  private StartOn startOn;

  public static final String SERIALIZED_NAME_CHANGE_REASON = "change_reason";
  @SerializedName(SERIALIZED_NAME_CHANGE_REASON)
  private String changeReason;

  public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "custom_fields";
  @SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
  @JsonAdapter(CustomFieldAdapter.class)
  private Map customFields = null;

  public SubscriptionAddPlanPatchRequest() { 
  }

  public SubscriptionAddPlanPatchRequest subscriptionPlan(SubscriptionPlanCreateRequest subscriptionPlan) {
    
    this.subscriptionPlan = subscriptionPlan;
    return this;
  }

   /**
   * Get subscriptionPlan
   * @return subscriptionPlan
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "")

  public SubscriptionPlanCreateRequest getSubscriptionPlan() {
    return subscriptionPlan;
  }


  public void setSubscriptionPlan(SubscriptionPlanCreateRequest subscriptionPlan) {
    this.subscriptionPlan = subscriptionPlan;
  }


  public SubscriptionAddPlanPatchRequest startOn(StartOn startOn) {
    
    this.startOn = startOn;
    return this;
  }

   /**
   * Get startOn
   * @return startOn
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public StartOn getStartOn() {
    return startOn;
  }


  public void setStartOn(StartOn startOn) {
    this.startOn = startOn;
  }


  public SubscriptionAddPlanPatchRequest changeReason(String changeReason) {
    
    this.changeReason = changeReason;
    return this;
  }

   /**
   * A brief description of the reason for this change.
   * @return changeReason
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "A brief description of the reason for this change.")

  public String getChangeReason() {
    return changeReason;
  }


  public void setChangeReason(String changeReason) {
    this.changeReason = changeReason;
  }


  public SubscriptionAddPlanPatchRequest customFields(Map customFields) {
    
    this.customFields = customFields;
    return this;
  }

  public SubscriptionAddPlanPatchRequest 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;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SubscriptionAddPlanPatchRequest subscriptionAddPlanPatchRequest = (SubscriptionAddPlanPatchRequest) o;
    return Objects.equals(this.subscriptionPlan, subscriptionAddPlanPatchRequest.subscriptionPlan) &&
        Objects.equals(this.startOn, subscriptionAddPlanPatchRequest.startOn) &&
        Objects.equals(this.changeReason, subscriptionAddPlanPatchRequest.changeReason) &&
        Objects.equals(this.customFields, subscriptionAddPlanPatchRequest.customFields);
  }

  @Override
  public int hashCode() {
    return Objects.hash(subscriptionPlan, startOn, changeReason, customFields);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SubscriptionAddPlanPatchRequest {\n");
    sb.append("    subscriptionPlan: ").append(toIndentedString(subscriptionPlan)).append("\n");
    sb.append("    startOn: ").append(toIndentedString(startOn)).append("\n");
    sb.append("    changeReason: ").append(toIndentedString(changeReason)).append("\n");
    sb.append("    customFields: ").append(toIndentedString(customFields)).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