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

io.camunda.zeebe.management.cluster.ClusterConfigPatchRequestBrokers Maven / Gradle / Ivy

There is a newer version: 8.7.0-alpha1
Show newest version
package io.camunda.zeebe.management.cluster;

import java.net.URI;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;


import java.util.*;
import jakarta.annotation.Generated;

/**
 * Specify the required changes to the brokers. You can either provide the set of brokers to add and remove or the new count of brokers.
 */
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)

@Schema(name = "ClusterConfigPatchRequest_brokers", description = "Specify the required changes to the brokers. You can either provide the set of brokers to add and remove or the new count of brokers.")
@JsonTypeName("ClusterConfigPatchRequest_brokers")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-02T11:21:26.842697815Z[GMT]", comments = "Generator version: 7.8.0")
public class ClusterConfigPatchRequestBrokers {

  @Valid
  private List add = new ArrayList<>();

  @Valid
  private List remove = new ArrayList<>();

  private Integer count;

  public ClusterConfigPatchRequestBrokers add(List add) {
    this.add = add;
    return this;
  }

  public ClusterConfigPatchRequestBrokers addAddItem(Integer addItem) {
    if (this.add == null) {
      this.add = new ArrayList<>();
    }
    this.add.add(addItem);
    return this;
  }

  /**
   * List of brokers to add. Can be omitted if no brokers are added.
   * @return add
   */
  
  @Schema(name = "add", description = "List of brokers to add. Can be omitted if no brokers are added.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  @JsonProperty("add")
  public List getAdd() {
    return add;
  }

  public void setAdd(List add) {
    this.add = add;
  }

  public ClusterConfigPatchRequestBrokers remove(List remove) {
    this.remove = remove;
    return this;
  }

  public ClusterConfigPatchRequestBrokers addRemoveItem(Integer removeItem) {
    if (this.remove == null) {
      this.remove = new ArrayList<>();
    }
    this.remove.add(removeItem);
    return this;
  }

  /**
   * List of brokers to remove. Can be omitted if no brokers are removed.
   * @return remove
   */
  
  @Schema(name = "remove", description = "List of brokers to remove. Can be omitted if no brokers are removed.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  @JsonProperty("remove")
  public List getRemove() {
    return remove;
  }

  public void setRemove(List remove) {
    this.remove = remove;
  }

  public ClusterConfigPatchRequestBrokers count(Integer count) {
    this.count = count;
    return this;
  }

  /**
   * The new number of brokers. Can be omitted if the broker count is not changed or if the brokers to add or remove is provided.
   * @return count
   */
  
  @Schema(name = "count", example = "12", description = "The new number of brokers. Can be omitted if the broker count is not changed or if the brokers to add or remove is provided.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  @JsonProperty("count")
  public Integer getCount() {
    return count;
  }

  public void setCount(Integer count) {
    this.count = count;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ClusterConfigPatchRequestBrokers clusterConfigPatchRequestBrokers = (ClusterConfigPatchRequestBrokers) o;
    return Objects.equals(this.add, clusterConfigPatchRequestBrokers.add) &&
        Objects.equals(this.remove, clusterConfigPatchRequestBrokers.remove) &&
        Objects.equals(this.count, clusterConfigPatchRequestBrokers.count);
  }

  @Override
  public int hashCode() {
    return Objects.hash(add, remove, count);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ClusterConfigPatchRequestBrokers {\n");
    sb.append("    add: ").append(toIndentedString(add)).append("\n");
    sb.append("    remove: ").append(toIndentedString(remove)).append("\n");
    sb.append("    count: ").append(toIndentedString(count)).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