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

io.harness.cf.model.Variation Maven / Gradle / Ivy

The newest version!
/*
 * Harness feature flag service client apis
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package io.harness.cf.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.io.Serializable;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

/**
 * A variation of a flag that can be returned to a target
 */
@ApiModel(description = "A variation of a flag that can be returned to a target")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-04T14:30:44.890314Z[GMT]")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Variation implements Serializable {
  private static final long serialVersionUID = 1L;

  public static final String SERIALIZED_NAME_IDENTIFIER = "identifier";
  @SerializedName(SERIALIZED_NAME_IDENTIFIER)
  private String identifier;

  public static final String SERIALIZED_NAME_VALUE = "value";
  @SerializedName(SERIALIZED_NAME_VALUE)
  private String value;

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;


  public Variation identifier(String identifier) {
    
    this.identifier = identifier;
    return this;
  }

   /**
   * The unique identifier for the variation
   * @return identifier
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "off-variation", required = true, value = "The unique identifier for the variation")

  public String getIdentifier() {
    return identifier;
  }


  public void setIdentifier(String identifier) {
    this.identifier = identifier;
  }


  public Variation value(String value) {
    
    this.value = value;
    return this;
  }

   /**
   * The variation value to serve such as true or false for a boolean flag
   * @return value
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "true", required = true, value = "The variation value to serve such as true or false for a boolean flag")

  public String getValue() {
    return value;
  }


  public void setValue(String value) {
    this.value = value;
  }


  public Variation name(String name) {
    
    this.name = name;
    return this;
  }

   /**
   * The user friendly name of the variation
   * @return name
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Off VAriation", value = "The user friendly name of the variation")

  public String getName() {
    return name;
  }


  public void setName(String name) {
    this.name = name;
  }


  public Variation description(String description) {
    
    this.description = description;
    return this;
  }

   /**
   * A description of the variation
   * @return description
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "A description of the variation")

  public String getDescription() {
    return description;
  }


  public void setDescription(String description) {
    this.description = description;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Variation variation = (Variation) o;
    return Objects.equals(this.identifier, variation.identifier) &&
        Objects.equals(this.value, variation.value) &&
        Objects.equals(this.name, variation.name) &&
        Objects.equals(this.description, variation.description);
  }

  @Override
  public int hashCode() {
    return Objects.hash(identifier, value, name, description);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Variation {\n");
    sb.append("    identifier: ").append(toIndentedString(identifier)).append("\n");
    sb.append("    value: ").append(toIndentedString(value)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).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 - 2024 Weber Informatics LLC | Privacy Policy