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

jp.co.freee.accounting.models.DealRenews Maven / Gradle / Ivy

The newest version!
/*
 * freee API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package jp.co.freee.accounting.models;

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 jp.co.freee.accounting.models.DealDetails1;

/**
 * DealRenews
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class DealRenews {
  public static final String SERIALIZED_NAME_DETAILS = "details";
  @SerializedName(SERIALIZED_NAME_DETAILS)
  private List details = new ArrayList<>();

  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private Long id;

  public static final String SERIALIZED_NAME_RENEW_TARGET_ID = "renew_target_id";
  @SerializedName(SERIALIZED_NAME_RENEW_TARGET_ID)
  private Long renewTargetId;

  /**
   * +更新の対象行タイプ
   */
  @JsonAdapter(RenewTargetTypeEnum.Adapter.class)
  public enum RenewTargetTypeEnum {
    DETAIL("detail"),
    
    ACCRUAL("accrual"),
    
    RENEW("renew");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static RenewTargetTypeEnum fromValue(String value) {
      for (RenewTargetTypeEnum b : RenewTargetTypeEnum.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 RenewTargetTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

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

  public static final String SERIALIZED_NAME_RENEW_TARGET_TYPE = "renew_target_type";
  @SerializedName(SERIALIZED_NAME_RENEW_TARGET_TYPE)
  private RenewTargetTypeEnum renewTargetType;

  public static final String SERIALIZED_NAME_UPDATE_DATE = "update_date";
  @SerializedName(SERIALIZED_NAME_UPDATE_DATE)
  private String updateDate;

  public DealRenews() { 
  }

  public DealRenews details(List details) {
    
    this.details = details;
    return this;
  }

  public DealRenews addDetailsItem(DealDetails1 detailsItem) {
    this.details.add(detailsItem);
    return this;
  }

   /**
   * +更新の明細行一覧(配列)
   * @return details
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "+更新の明細行一覧(配列)")

  public List getDetails() {
    return details;
  }


  public void setDetails(List details) {
    this.details = details;
  }


  public DealRenews id(Long id) {
    
    this.id = id;
    return this;
  }

   /**
   * +更新行ID
   * minimum: 1
   * maximum: 9223372036854775807
   * @return id
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "11", required = true, value = "+更新行ID")

  public Long getId() {
    return id;
  }


  public void setId(Long id) {
    this.id = id;
  }


  public DealRenews renewTargetId(Long renewTargetId) {
    
    this.renewTargetId = renewTargetId;
    return this;
  }

   /**
   * +更新の対象行ID
   * minimum: 1
   * maximum: 9223372036854775807
   * @return renewTargetId
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "12", required = true, value = "+更新の対象行ID")

  public Long getRenewTargetId() {
    return renewTargetId;
  }


  public void setRenewTargetId(Long renewTargetId) {
    this.renewTargetId = renewTargetId;
  }


  public DealRenews renewTargetType(RenewTargetTypeEnum renewTargetType) {
    
    this.renewTargetType = renewTargetType;
    return this;
  }

   /**
   * +更新の対象行タイプ
   * @return renewTargetType
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "detail", required = true, value = "+更新の対象行タイプ")

  public RenewTargetTypeEnum getRenewTargetType() {
    return renewTargetType;
  }


  public void setRenewTargetType(RenewTargetTypeEnum renewTargetType) {
    this.renewTargetType = renewTargetType;
  }


  public DealRenews updateDate(String updateDate) {
    
    this.updateDate = updateDate;
    return this;
  }

   /**
   * 更新日 (yyyy-mm-dd)
   * @return updateDate
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "2019-12-17", required = true, value = "更新日 (yyyy-mm-dd)")

  public String getUpdateDate() {
    return updateDate;
  }


  public void setUpdateDate(String updateDate) {
    this.updateDate = updateDate;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DealRenews dealRenews = (DealRenews) o;
    return Objects.equals(this.details, dealRenews.details) &&
        Objects.equals(this.id, dealRenews.id) &&
        Objects.equals(this.renewTargetId, dealRenews.renewTargetId) &&
        Objects.equals(this.renewTargetType, dealRenews.renewTargetType) &&
        Objects.equals(this.updateDate, dealRenews.updateDate);
  }

  @Override
  public int hashCode() {
    return Objects.hash(details, id, renewTargetId, renewTargetType, updateDate);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DealRenews {\n");
    sb.append("    details: ").append(toIndentedString(details)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    renewTargetId: ").append(toIndentedString(renewTargetId)).append("\n");
    sb.append("    renewTargetType: ").append(toIndentedString(renewTargetType)).append("\n");
    sb.append("    updateDate: ").append(toIndentedString(updateDate)).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