All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
io.camunda.zeebe.management.cluster.Operation Maven / Gradle / Ivy
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.JsonValue;
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;
/**
* Operation
*/
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-02T11:21:27.419777225Z[GMT]", comments = "Generator version: 7.8.0")
public class Operation {
/**
* Gets or Sets operation
*/
public enum OperationEnum {
BROKER_ADD("BROKER_ADD"),
BROKER_REMOVE("BROKER_REMOVE"),
PARTITION_JOIN("PARTITION_JOIN"),
PARTITION_LEAVE("PARTITION_LEAVE"),
PARTITION_RECONFIGURE_PRIORITY("PARTITION_RECONFIGURE_PRIORITY"),
PARTITION_FORCE_RECONFIGURE("PARTITION_FORCE_RECONFIGURE"),
BROKER_FORCE_REMOVE("BROKER_FORCE_REMOVE"),
UNKNOWN("UNKNOWN"),
PARTITION_DISABLE_EXPORTER("PARTITION_DISABLE_EXPORTER"),
PARTITION_ENABLE_EXPORTER("PARTITION_ENABLE_EXPORTER");
private String value;
OperationEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OperationEnum fromValue(String value) {
for (OperationEnum b : OperationEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private OperationEnum operation;
private Integer brokerId;
private Integer partitionId;
private Integer priority;
@Valid
private List brokers = new ArrayList<>();
private String exporterId;
public Operation operation(OperationEnum operation) {
this.operation = operation;
return this;
}
/**
* Get operation
* @return operation
*/
@Schema(name = "operation", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("operation")
public OperationEnum getOperation() {
return operation;
}
public void setOperation(OperationEnum operation) {
this.operation = operation;
}
public Operation brokerId(Integer brokerId) {
this.brokerId = brokerId;
return this;
}
/**
* The ID of a broker, starting from 0
* @return brokerId
*/
@Schema(name = "brokerId", example = "0", description = "The ID of a broker, starting from 0", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("brokerId")
public Integer getBrokerId() {
return brokerId;
}
public void setBrokerId(Integer brokerId) {
this.brokerId = brokerId;
}
public Operation partitionId(Integer partitionId) {
this.partitionId = partitionId;
return this;
}
/**
* The ID of a partition, starting from 1
* @return partitionId
*/
@Schema(name = "partitionId", example = "1", description = "The ID of a partition, starting from 1", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("partitionId")
public Integer getPartitionId() {
return partitionId;
}
public void setPartitionId(Integer partitionId) {
this.partitionId = partitionId;
}
public Operation priority(Integer priority) {
this.priority = priority;
return this;
}
/**
* The priority of the partition
* @return priority
*/
@Schema(name = "priority", example = "3", description = "The priority of the partition", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("priority")
public Integer getPriority() {
return priority;
}
public void setPriority(Integer priority) {
this.priority = priority;
}
public Operation brokers(List brokers) {
this.brokers = brokers;
return this;
}
public Operation addBrokersItem(Integer brokersItem) {
if (this.brokers == null) {
this.brokers = new ArrayList<>();
}
this.brokers.add(brokersItem);
return this;
}
/**
* Get brokers
* @return brokers
*/
@Schema(name = "brokers", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("brokers")
public List getBrokers() {
return brokers;
}
public void setBrokers(List brokers) {
this.brokers = brokers;
}
public Operation exporterId(String exporterId) {
this.exporterId = exporterId;
return this;
}
/**
* The ID of an exporter
* @return exporterId
*/
@Schema(name = "exporterId", example = "my-exporter", description = "The ID of an exporter", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("exporterId")
public String getExporterId() {
return exporterId;
}
public void setExporterId(String exporterId) {
this.exporterId = exporterId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Operation operation = (Operation) o;
return Objects.equals(this.operation, operation.operation) &&
Objects.equals(this.brokerId, operation.brokerId) &&
Objects.equals(this.partitionId, operation.partitionId) &&
Objects.equals(this.priority, operation.priority) &&
Objects.equals(this.brokers, operation.brokers) &&
Objects.equals(this.exporterId, operation.exporterId);
}
@Override
public int hashCode() {
return Objects.hash(operation, brokerId, partitionId, priority, brokers, exporterId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Operation {\n");
sb.append(" operation: ").append(toIndentedString(operation)).append("\n");
sb.append(" brokerId: ").append(toIndentedString(brokerId)).append("\n");
sb.append(" partitionId: ").append(toIndentedString(partitionId)).append("\n");
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
sb.append(" brokers: ").append(toIndentedString(brokers)).append("\n");
sb.append(" exporterId: ").append(toIndentedString(exporterId)).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 ");
}
}