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

org.openapitools.client.model.SubscriptionPreviewActionsResponse 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.ArrayList;
import java.util.List;
import org.openapitools.client.model.SubscriptionItemPreviewResponse;

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * SubscriptionPreviewActionsResponse
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionPreviewActionsResponse {
  public static final String SERIALIZED_NAME_ACTION_ID = "action_id";
  @SerializedName(SERIALIZED_NAME_ACTION_ID)
  private String actionId;

  /**
   * The action associated with this metric.
   */
  @JsonAdapter(ActionEnum.Adapter.class)
  public enum ActionEnum {
    CREATE_SUBSCRIPTION("create_subscription"),
    
    TERMS("terms"),
    
    ADD_SUBSCRIPTION_PLAN("add_subscription_plan"),
    
    UPDATE_SUBSCRIPTION_PLAN("update_subscription_plan"),
    
    REMOVE_SUBSCRIPTION_PLAN("remove_subscription_plan"),
    
    RENEW("renew"),
    
    CANCEL("cancel"),
    
    OWNER_TRANSFER("owner_transfer"),
    
    PAUSE("pause"),
    
    RESUME("resume"),
    
    REPLACE_SUBSCRIPTION_PLAN("replace_subscription_plan"),
    
    UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

    private String value;

    ActionEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static ActionEnum fromValue(String value) {
      for (ActionEnum b : ActionEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final ActionEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public ActionEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return ActionEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_ACTION = "action";
  @SerializedName(SERIALIZED_NAME_ACTION)
  private ActionEnum action;

  public static final String SERIALIZED_NAME_SEQUENCE = "sequence";
  @SerializedName(SERIALIZED_NAME_SEQUENCE)
  private Integer sequence;

  public static final String SERIALIZED_NAME_SUBSCRIPTION_ITEMS = "subscription_items";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ITEMS)
  private List subscriptionItems = null;

  public SubscriptionPreviewActionsResponse() { 
  }

  public SubscriptionPreviewActionsResponse actionId(String actionId) {
    
    this.actionId = actionId;
    return this;
  }

   /**
   * Identifier of the action.
   * @return actionId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Identifier of the action.")

  public String getActionId() {
    return actionId;
  }


  public void setActionId(String actionId) {
    this.actionId = actionId;
  }


  public SubscriptionPreviewActionsResponse action(ActionEnum action) {
    
    this.action = action;
    return this;
  }

   /**
   * The action associated with this metric.
   * @return action
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The action associated with this metric.")

  public ActionEnum getAction() {
    return action;
  }


  public void setAction(ActionEnum action) {
    this.action = action;
  }


  public SubscriptionPreviewActionsResponse sequence(Integer sequence) {
    
    this.sequence = sequence;
    return this;
  }

   /**
   * The sequence number of the action.
   * @return sequence
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The sequence number of the action.")

  public Integer getSequence() {
    return sequence;
  }


  public void setSequence(Integer sequence) {
    this.sequence = sequence;
  }


  public SubscriptionPreviewActionsResponse subscriptionItems(List subscriptionItems) {
    
    this.subscriptionItems = subscriptionItems;
    return this;
  }

  public SubscriptionPreviewActionsResponse addSubscriptionItemsItem(SubscriptionItemPreviewResponse subscriptionItemsItem) {
    if (this.subscriptionItems == null) {
      this.subscriptionItems = new ArrayList();
    }
    this.subscriptionItems.add(subscriptionItemsItem);
    return this;
  }

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

  public List getSubscriptionItems() {
    return subscriptionItems;
  }


  public void setSubscriptionItems(List subscriptionItems) {
    this.subscriptionItems = subscriptionItems;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SubscriptionPreviewActionsResponse subscriptionPreviewActionsResponse = (SubscriptionPreviewActionsResponse) o;
    return Objects.equals(this.actionId, subscriptionPreviewActionsResponse.actionId) &&
        Objects.equals(this.action, subscriptionPreviewActionsResponse.action) &&
        Objects.equals(this.sequence, subscriptionPreviewActionsResponse.sequence) &&
        Objects.equals(this.subscriptionItems, subscriptionPreviewActionsResponse.subscriptionItems);
  }

  @Override
  public int hashCode() {
    return Objects.hash(actionId, action, sequence, subscriptionItems);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SubscriptionPreviewActionsResponse {\n");
    sb.append("    actionId: ").append(toIndentedString(actionId)).append("\n");
    sb.append("    action: ").append(toIndentedString(action)).append("\n");
    sb.append("    sequence: ").append(toIndentedString(sequence)).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