/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.13.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.cloudera.api.swagger.model;

import java.util.Objects;
import java.util.Arrays;
import com.cloudera.api.swagger.model.ApiLicenseFeature;
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.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
 * Information about the Cloudera Manager license.
 */
@Schema(description = "Information about the Cloudera Manager license.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiLicense {
  @SerializedName("owner")
  private String owner = null;

  @SerializedName("uuid")
  private String uuid = null;

  @SerializedName("expiration")
  private String expiration = null;

  @SerializedName("features")
  private List<ApiLicenseFeature> features = null;

  @SerializedName("deactivationDate")
  private String deactivationDate = null;

  @SerializedName("startDate")
  private String startDate = null;

  public ApiLicense owner(String owner) {
    this.owner = owner;
    return this;
  }

   /**
   * The owner (organization name) of the license.
   * @return owner
  **/
  @Schema(description = "The owner (organization name) of the license.")
  public String getOwner() {
    return owner;
  }

  public void setOwner(String owner) {
    this.owner = owner;
  }

  public ApiLicense uuid(String uuid) {
    this.uuid = uuid;
    return this;
  }

   /**
   * A UUID of this license.
   * @return uuid
  **/
  @Schema(description = "A UUID of this license.")
  public String getUuid() {
    return uuid;
  }

  public void setUuid(String uuid) {
    this.uuid = uuid;
  }

  public ApiLicense expiration(String expiration) {
    this.expiration = expiration;
    return this;
  }

   /**
   * The expiration date.
   * @return expiration
  **/
  @Schema(description = "The expiration date.")
  public String getExpiration() {
    return expiration;
  }

  public void setExpiration(String expiration) {
    this.expiration = expiration;
  }

  public ApiLicense features(List<ApiLicenseFeature> features) {
    this.features = features;
    return this;
  }

  public ApiLicense addFeaturesItem(ApiLicenseFeature featuresItem) {
    if (this.features == null) {
      this.features = new ArrayList<>();
    }
    this.features.add(featuresItem);
    return this;
  }

   /**
   * Returns the list of available features as per the license
   * @return features
  **/
  @Schema(description = "Returns the list of available features as per the license")
  public List<ApiLicenseFeature> getFeatures() {
    return features;
  }

  public void setFeatures(List<ApiLicenseFeature> features) {
    this.features = features;
  }

  public ApiLicense deactivationDate(String deactivationDate) {
    this.deactivationDate = deactivationDate;
    return this;
  }

   /**
   * The deactivation date.
   * @return deactivationDate
  **/
  @Schema(description = "The deactivation date.")
  public String getDeactivationDate() {
    return deactivationDate;
  }

  public void setDeactivationDate(String deactivationDate) {
    this.deactivationDate = deactivationDate;
  }

  public ApiLicense startDate(String startDate) {
    this.startDate = startDate;
    return this;
  }

   /**
   * The start date.
   * @return startDate
  **/
  @Schema(description = "The start date.")
  public String getStartDate() {
    return startDate;
  }

  public void setStartDate(String startDate) {
    this.startDate = startDate;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiLicense apiLicense = (ApiLicense) o;
    return Objects.equals(this.owner, apiLicense.owner) &&
        Objects.equals(this.uuid, apiLicense.uuid) &&
        Objects.equals(this.expiration, apiLicense.expiration) &&
        Objects.equals(this.features, apiLicense.features) &&
        Objects.equals(this.deactivationDate, apiLicense.deactivationDate) &&
        Objects.equals(this.startDate, apiLicense.startDate);
  }

  @Override
  public int hashCode() {
    return Objects.hash(owner, uuid, expiration, features, deactivationDate, startDate);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiLicense {\n");
    
    sb.append("    owner: ").append(toIndentedString(owner)).append("\n");
    sb.append("    uuid: ").append(toIndentedString(uuid)).append("\n");
    sb.append("    expiration: ").append(toIndentedString(expiration)).append("\n");
    sb.append("    features: ").append(toIndentedString(features)).append("\n");
    sb.append("    deactivationDate: ").append(toIndentedString(deactivationDate)).append("\n");
    sb.append("    startDate: ").append(toIndentedString(startDate)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
