io.harness.cf.model.WeightedVariation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ff-java-server-sdk Show documentation
Show all versions of ff-java-server-sdk Show documentation
Harness Feature Flag Java Server SDK
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 and the weighting it should receive as part of a percentage rollout
*/
@ApiModel(description = "A variation and the weighting it should receive as part of a percentage rollout")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-04T14:30:44.890314Z[GMT]")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WeightedVariation implements Serializable {
private static final long serialVersionUID = 1L;
public static final String SERIALIZED_NAME_VARIATION = "variation";
@SerializedName(SERIALIZED_NAME_VARIATION)
private String variation;
public static final String SERIALIZED_NAME_WEIGHT = "weight";
@SerializedName(SERIALIZED_NAME_WEIGHT)
private Integer weight;
public WeightedVariation variation(String variation) {
this.variation = variation;
return this;
}
/**
* The variation identifier
* @return variation
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "off-variation", required = true, value = "The variation identifier")
public String getVariation() {
return variation;
}
public void setVariation(String variation) {
this.variation = variation;
}
public WeightedVariation weight(Integer weight) {
this.weight = weight;
return this;
}
/**
* The weight to be given to the variation in percent
* @return weight
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "50", required = true, value = "The weight to be given to the variation in percent")
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WeightedVariation weightedVariation = (WeightedVariation) o;
return Objects.equals(this.variation, weightedVariation.variation) &&
Objects.equals(this.weight, weightedVariation.weight);
}
@Override
public int hashCode() {
return Objects.hash(variation, weight);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class WeightedVariation {\n");
sb.append(" variation: ").append(toIndentedString(variation)).append("\n");
sb.append(" weight: ").append(toIndentedString(weight)).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