content: /*
   * Copyright (c) 2020-2025 Airbyte, Inc., all rights reserved.
   */
  
  package io.airbyte.config;
  
  import com.fasterxml.jackson.annotation.JsonAnyGetter;
  import com.fasterxml.jackson.annotation.JsonAnySetter;
  import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonIgnore;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyDescription;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonValue;
  import jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.HashMap;
  import java.util.Map;
  import java.util.Objects;
  import java.util.UUID;
  
  /**
   * OrganizationPaymentConfig
   * <p>
   * Organization Payment Config
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "organizationId",
    "payment_provider_id",
    "subscription_status",
    "payment_status",
    "grace_period_end_at",
    "usage_category_override",
    "created_at",
    "updated_at"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class OrganizationPaymentConfig implements Serializable {
  
    /**
     * ID of the associated organization (Required)
     *
     */
    @JsonProperty("organizationId")
    @JsonPropertyDescription("ID of the associated organization")
    private UUID organizationId;
    /**
     * ID of the external payment provider (ex. a Stripe Customer ID)
     *
     */
    @JsonProperty("payment_provider_id")
    @JsonPropertyDescription("ID of the external payment provider (ex. a Stripe Customer ID)")
    private String paymentProviderId;
    /**
     * SubscriptionStatus
     * <p>
     * Subscription Status for an Organization Payment Config
     *
     */
    @JsonProperty("subscription_status")
    @JsonPropertyDescription("Subscription Status for an Organization Payment Config")
    private SubscriptionStatus subscriptionStatus;
    /**
     * PaymentStatus
     * <p>
     * Payment Status for an Organization Payment Config (Required)
     *
     */
    @JsonProperty("payment_status")
    @JsonPropertyDescription("Payment Status for an Organization Payment Config")
    private PaymentStatus paymentStatus;
    /**
     * If set, the date at which the organization's grace period ends and syncs will be disabled
     *
     */
    @JsonProperty("grace_period_end_at")
    @JsonPropertyDescription("If set, the date at which the organization's grace period ends and syncs will be disabled")
    private Long gracePeriodEndAt;
    /**
     * UsageCategoryOverride
     * <p>
     * Usage Category Override for an Organization Payment Config
     *
     */
    @JsonProperty("usage_category_override")
    @JsonPropertyDescription("Usage Category Override for an Organization Payment Config")
    private UsageCategoryOverride usageCategoryOverride;
    /**
     * Creation timestamp of the organization payment config (Required)
     *
     */
    @JsonProperty("created_at")
    @JsonPropertyDescription("Creation timestamp of the organization payment config")
    private Long createdAt;
    /**
     * Last updated timestamp of the organization payment config (Required)
     *
     */
    @JsonProperty("updated_at")
    @JsonPropertyDescription("Last updated timestamp of the organization payment config")
    private Long updatedAt;
    @JsonIgnore
    private final Map<String, Object> additionalProperties = new HashMap<>();
    private final static long serialVersionUID = 6309595225917460622L;
  
    /**
     * ID of the associated organization (Required)
     *
     */
    @JsonProperty("organizationId")
    public UUID getOrganizationId() {
      return organizationId;
    }
  
    /**
     * ID of the associated organization (Required)
     *
     */
    @JsonProperty("organizationId")
    public void setOrganizationId(UUID organizationId) {
      this.organizationId = organizationId;
    }
  
    public OrganizationPaymentConfig withOrganizationId(UUID organizationId) {
      this.organizationId = organizationId;
      return this;
    }
  
    /**
     * ID of the external payment provider (ex. a Stripe Customer ID)
     *
     */
    @JsonProperty("payment_provider_id")
    public String getPaymentProviderId() {
      return paymentProviderId;
    }
  
    /**
     * ID of the external payment provider (ex. a Stripe Customer ID)
     *
     */
    @JsonProperty("payment_provider_id")
    public void setPaymentProviderId(String paymentProviderId) {
      this.paymentProviderId = paymentProviderId;
    }
  
    public OrganizationPaymentConfig withPaymentProviderId(String paymentProviderId) {
      this.paymentProviderId = paymentProviderId;
      return this;
    }
  
    /**
     * SubscriptionStatus
     * <p>
     * Subscription Status for an Organization Payment Config
     *
     */
    @JsonProperty("subscription_status")
    public SubscriptionStatus getSubscriptionStatus() {
      return subscriptionStatus;
    }
  
    /**
     * SubscriptionStatus
     * <p>
     * Subscription Status for an Organization Payment Config
     *
     */
    @JsonProperty("subscription_status")
    public void setSubscriptionStatus(SubscriptionStatus subscriptionStatus) {
      this.subscriptionStatus = subscriptionStatus;
    }
  
    public OrganizationPaymentConfig withSubscriptionStatus(SubscriptionStatus subscriptionStatus) {
      this.subscriptionStatus = subscriptionStatus;
      return this;
    }
  
    /**
     * PaymentStatus
     * <p>
     * Payment Status for an Organization Payment Config (Required)
     *
     */
    @JsonProperty("payment_status")
    public PaymentStatus getPaymentStatus() {
      return paymentStatus;
    }
  
    /**
     * PaymentStatus
     * <p>
     * Payment Status for an Organization Payment Config (Required)
     *
     */
    @JsonProperty("payment_status")
    public void setPaymentStatus(PaymentStatus paymentStatus) {
      this.paymentStatus = paymentStatus;
    }
  
    public OrganizationPaymentConfig withPaymentStatus(PaymentStatus paymentStatus) {
      this.paymentStatus = paymentStatus;
      return this;
    }
  
    /**
     * If set, the date at which the organization's grace period ends and syncs will be disabled
     *
     */
    @JsonProperty("grace_period_end_at")
    public Long getGracePeriodEndAt() {
      return gracePeriodEndAt;
    }
  
    /**
     * If set, the date at which the organization's grace period ends and syncs will be disabled
     *
     */
    @JsonProperty("grace_period_end_at")
    public void setGracePeriodEndAt(Long gracePeriodEndAt) {
      this.gracePeriodEndAt = gracePeriodEndAt;
    }
  
    public OrganizationPaymentConfig withGracePeriodEndAt(Long gracePeriodEndAt) {
      this.gracePeriodEndAt = gracePeriodEndAt;
      return this;
    }
  
    /**
     * UsageCategoryOverride
     * <p>
     * Usage Category Override for an Organization Payment Config
     *
     */
    @JsonProperty("usage_category_override")
    public UsageCategoryOverride getUsageCategoryOverride() {
      return usageCategoryOverride;
    }
  
    /**
     * UsageCategoryOverride
     * <p>
     * Usage Category Override for an Organization Payment Config
     *
     */
    @JsonProperty("usage_category_override")
    public void setUsageCategoryOverride(UsageCategoryOverride usageCategoryOverride) {
      this.usageCategoryOverride = usageCategoryOverride;
    }
  
    public OrganizationPaymentConfig withUsageCategoryOverride(UsageCategoryOverride usageCategoryOverride) {
      this.usageCategoryOverride = usageCategoryOverride;
      return this;
    }
  
    /**
     * Creation timestamp of the organization payment config (Required)
     *
     */
    @JsonProperty("created_at")
    public Long getCreatedAt() {
      return createdAt;
    }
  
    /**
     * Creation timestamp of the organization payment config (Required)
     *
     */
    @JsonProperty("created_at")
    public void setCreatedAt(Long createdAt) {
      this.createdAt = createdAt;
    }
  
    public OrganizationPaymentConfig withCreatedAt(Long createdAt) {
      this.createdAt = createdAt;
      return this;
    }
  
    /**
     * Last updated timestamp of the organization payment config (Required)
     *
     */
    @JsonProperty("updated_at")
    public Long getUpdatedAt() {
      return updatedAt;
    }
  
    /**
     * Last updated timestamp of the organization payment config (Required)
     *
     */
    @JsonProperty("updated_at")
    public void setUpdatedAt(Long updatedAt) {
      this.updatedAt = updatedAt;
    }
  
    public OrganizationPaymentConfig withUpdatedAt(Long updatedAt) {
      this.updatedAt = updatedAt;
      return this;
    }
  
    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
      return this.additionalProperties;
    }
  
    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
    }
  
    public OrganizationPaymentConfig withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(OrganizationPaymentConfig.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("organizationId");
      sb.append('=');
      sb.append(((this.organizationId == null) ? "<null>" : this.organizationId));
      sb.append(',');
      sb.append("paymentProviderId");
      sb.append('=');
      sb.append(((this.paymentProviderId == null) ? "<null>" : this.paymentProviderId));
      sb.append(',');
      sb.append("subscriptionStatus");
      sb.append('=');
      sb.append(((this.subscriptionStatus == null) ? "<null>" : this.subscriptionStatus));
      sb.append(',');
      sb.append("paymentStatus");
      sb.append('=');
      sb.append(((this.paymentStatus == null) ? "<null>" : this.paymentStatus));
      sb.append(',');
      sb.append("gracePeriodEndAt");
      sb.append('=');
      sb.append(((this.gracePeriodEndAt == null) ? "<null>" : this.gracePeriodEndAt));
      sb.append(',');
      sb.append("usageCategoryOverride");
      sb.append('=');
      sb.append(((this.usageCategoryOverride == null) ? "<null>" : this.usageCategoryOverride));
      sb.append(',');
      sb.append("createdAt");
      sb.append('=');
      sb.append(((this.createdAt == null) ? "<null>" : this.createdAt));
      sb.append(',');
      sb.append("updatedAt");
      sb.append('=');
      sb.append(((this.updatedAt == null) ? "<null>" : this.updatedAt));
      sb.append(',');
      sb.append("additionalProperties");
      sb.append('=');
      sb.append(this.additionalProperties);
      sb.append(',');
      if (sb.charAt((sb.length() - 1)) == ',') {
        sb.setCharAt((sb.length() - 1), ']');
      } else {
        sb.append(']');
      }
      return sb.toString();
    }
  
    @Override
    public int hashCode() {
      int result = 1;
      result = ((result * 31) + ((this.organizationId == null) ? 0 : this.organizationId.hashCode()));
      result = ((result * 31) + ((this.createdAt == null) ? 0 : this.createdAt.hashCode()));
      result = ((result * 31) + ((this.subscriptionStatus == null) ? 0 : this.subscriptionStatus.hashCode()));
      result = ((result * 31) + ((this.usageCategoryOverride == null) ? 0 : this.usageCategoryOverride.hashCode()));
      result = ((result * 31) + ((this.gracePeriodEndAt == null) ? 0 : this.gracePeriodEndAt.hashCode()));
      result = result * 31 + this.additionalProperties.hashCode();
      result = ((result * 31) + ((this.paymentProviderId == null) ? 0 : this.paymentProviderId.hashCode()));
      result = ((result * 31) + ((this.paymentStatus == null) ? 0 : this.paymentStatus.hashCode()));
      result = ((result * 31) + ((this.updatedAt == null) ? 0 : this.updatedAt.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if (!(other instanceof OrganizationPaymentConfig)) {
        return false;
      }
      OrganizationPaymentConfig rhs = ((OrganizationPaymentConfig) other);
      return (((((((((Objects.equals(this.organizationId, rhs.organizationId))
          && (Objects.equals(this.createdAt, rhs.createdAt)))
          && (Objects.equals(this.subscriptionStatus, rhs.subscriptionStatus)))
          && (Objects.equals(this.usageCategoryOverride, rhs.usageCategoryOverride)))
          && (Objects.equals(this.gracePeriodEndAt, rhs.gracePeriodEndAt)))
          && (Objects.equals(this.additionalProperties, rhs.additionalProperties)))
          && (Objects.equals(this.paymentProviderId, rhs.paymentProviderId)))
          && (Objects.equals(this.paymentStatus, rhs.paymentStatus)))
          && (Objects.equals(this.updatedAt, rhs.updatedAt)));
    }
  
    /**
     * PaymentStatus
     * <p>
     * Payment Status for an Organization Payment Config
     *
     */
    public enum PaymentStatus {
  
      UNINITIALIZED("uninitialized"),
      OKAY("okay"),
      GRACE_PERIOD("grace_period"),
      DISABLED("disabled"),
      LOCKED("locked"),
      MANUAL("manual");
  
      private final String value;
      private final static Map<String, PaymentStatus> CONSTANTS = new HashMap<>();
  
      static {
        for (PaymentStatus c : values()) {
          CONSTANTS.put(c.value, c);
        }
      }
  
      PaymentStatus(String value) {
        this.value = value;
      }
  
      @Override
      public String toString() {
        return this.value;
      }
  
      @JsonValue
      public String value() {
        return this.value;
      }
  
      @JsonCreator
      public static PaymentStatus fromValue(String value) {
        PaymentStatus constant = CONSTANTS.get(value);
        if (constant == null) {
          throw new IllegalArgumentException(value);
        } else {
          return constant;
        }
      }
  
    }
  
    /**
     * SubscriptionStatus
     * <p>
     * Subscription Status for an Organization Payment Config
     *
     */
    public enum SubscriptionStatus {
  
      PRE_SUBSCRIPTION("pre_subscription"),
      SUBSCRIBED("subscribed"),
      UNSUBSCRIBED("unsubscribed");
  
      private final String value;
      private final static Map<String, SubscriptionStatus> CONSTANTS = new HashMap<>();
  
      static {
        for (SubscriptionStatus c : values()) {
          CONSTANTS.put(c.value, c);
        }
      }
  
      SubscriptionStatus(String value) {
        this.value = value;
      }
  
      @Override
      public String toString() {
        return this.value;
      }
  
      @JsonValue
      public String value() {
        return this.value;
      }
  
      @JsonCreator
      public static SubscriptionStatus fromValue(String value) {
        SubscriptionStatus constant = CONSTANTS.get(value);
        if (constant == null) {
          throw new IllegalArgumentException(value);
        } else {
          return constant;
        }
      }
  
    }
  
    /**
     * UsageCategoryOverride
     * <p>
     * Usage Category Override for an Organization Payment Config
     *
     */
    public enum UsageCategoryOverride {
  
      FREE("free"),
      INTERNAL("internal");
  
      private final String value;
      private final static Map<String, UsageCategoryOverride> CONSTANTS = new HashMap<>();
  
      static {
        for (UsageCategoryOverride c : values()) {
          CONSTANTS.put(c.value, c);
        }
      }
  
      UsageCategoryOverride(String value) {
        this.value = value;
      }
  
      @Override
      public String toString() {
        return this.value;
      }
  
      @JsonValue
      public String value() {
        return this.value;
      }
  
      @JsonCreator
      public static UsageCategoryOverride fromValue(String value) {
        UsageCategoryOverride constant = CONSTANTS.get(value);
        if (constant == null) {
          throw new IllegalArgumentException(value);
        } else {
          return constant;
        }
      }
  
    }
  
  }
  