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

org.openapitools.client.model.SubscriptionTermPatchResponse 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 org.openapitools.client.model.Term;
import org.openapitools.jackson.nullable.JsonNullable;

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * Term information of the subscription.
 */
@ApiModel(description = "Term information of the subscription.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionTermPatchResponse {
  public static final String SERIALIZED_NAME_CURRENT_TERM = "current_term";
  @SerializedName(SERIALIZED_NAME_CURRENT_TERM)
  private Term currentTerm;

  public static final String SERIALIZED_NAME_RENEWAL_TERM = "renewal_term";
  @SerializedName(SERIALIZED_NAME_RENEWAL_TERM)
  private Term renewalTerm;

  public static final String SERIALIZED_NAME_AUTO_RENEW = "auto_renew";
  @SerializedName(SERIALIZED_NAME_AUTO_RENEW)
  private Boolean autoRenew;

  public SubscriptionTermPatchResponse() { 
  }

  public SubscriptionTermPatchResponse currentTerm(Term currentTerm) {
    
    this.currentTerm = currentTerm;
    return this;
  }

   /**
   * Current term information for the subscription.
   * @return currentTerm
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Current term information for the subscription.")

  public Term getCurrentTerm() {
    return currentTerm;
  }


  public void setCurrentTerm(Term currentTerm) {
    this.currentTerm = currentTerm;
  }


  public SubscriptionTermPatchResponse renewalTerm(Term renewalTerm) {
    
    this.renewalTerm = renewalTerm;
    return this;
  }

   /**
   * Renewal term information for the subscription.
   * @return renewalTerm
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Renewal term information for the subscription.")

  public Term getRenewalTerm() {
    return renewalTerm;
  }


  public void setRenewalTerm(Term renewalTerm) {
    this.renewalTerm = renewalTerm;
  }


  public SubscriptionTermPatchResponse autoRenew(Boolean autoRenew) {
    
    this.autoRenew = autoRenew;
    return this;
  }

   /**
   * If true, the subscription automatically renews at the end of the current term.
   * @return autoRenew
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If true, the subscription automatically renews at the end of the current term.")

  public Boolean getAutoRenew() {
    return autoRenew;
  }


  public void setAutoRenew(Boolean autoRenew) {
    this.autoRenew = autoRenew;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SubscriptionTermPatchResponse subscriptionTermPatchResponse = (SubscriptionTermPatchResponse) o;
    return Objects.equals(this.currentTerm, subscriptionTermPatchResponse.currentTerm) &&
        Objects.equals(this.renewalTerm, subscriptionTermPatchResponse.renewalTerm) &&
        Objects.equals(this.autoRenew, subscriptionTermPatchResponse.autoRenew);
  }

  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(currentTerm, renewalTerm, autoRenew);
  }

  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 SubscriptionTermPatchResponse {\n");
    sb.append("    currentTerm: ").append(toIndentedString(currentTerm)).append("\n");
    sb.append("    renewalTerm: ").append(toIndentedString(renewalTerm)).append("\n");
    sb.append("    autoRenew: ").append(toIndentedString(autoRenew)).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