package com.muse.dto; 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 org.springframework.lang.Nullable; import java.io.Serializable; 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; /** * 灰度规则摘要 */ @Schema(name = "GrayRulesSummary", description = "灰度规则摘要") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T16:47:40.290595+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0") public class GrayRulesSummary implements Serializable { private static final long serialVersionUID = 1L; /** * 灰度策略 */ public enum StrategyEnum { TENANT_WHITELIST("tenant_whitelist"), PERCENTAGE("percentage"), USER_WHITELIST("user_whitelist"); private final String value; StrategyEnum(String value) { this.value = value; } @JsonValue public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } @JsonCreator public static StrategyEnum fromValue(String value) { for (StrategyEnum b : StrategyEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } private @Nullable StrategyEnum strategy; private @Nullable String scope; private @Nullable String rollbackEntry; public GrayRulesSummary strategy(@Nullable StrategyEnum strategy) { this.strategy = strategy; return this; } /** * 灰度策略 * @return strategy */ @Schema(name = "strategy", description = "灰度策略", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("strategy") public @Nullable StrategyEnum getStrategy() { return strategy; } @JsonProperty("strategy") public void setStrategy(@Nullable StrategyEnum strategy) { this.strategy = strategy; } public GrayRulesSummary scope(@Nullable String scope) { this.scope = scope; return this; } /** * 灰度范围描述 * @return scope */ @Schema(name = "scope", description = "灰度范围描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("scope") public @Nullable String getScope() { return scope; } @JsonProperty("scope") public void setScope(@Nullable String scope) { this.scope = scope; } public GrayRulesSummary rollbackEntry(@Nullable String rollbackEntry) { this.rollbackEntry = rollbackEntry; return this; } /** * 回滚入口说明 * @return rollbackEntry */ @Schema(name = "rollbackEntry", description = "回滚入口说明", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("rollbackEntry") public @Nullable String getRollbackEntry() { return rollbackEntry; } @JsonProperty("rollbackEntry") public void setRollbackEntry(@Nullable String rollbackEntry) { this.rollbackEntry = rollbackEntry; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GrayRulesSummary grayRulesSummary = (GrayRulesSummary) o; return Objects.equals(this.strategy, grayRulesSummary.strategy) && Objects.equals(this.scope, grayRulesSummary.scope) && Objects.equals(this.rollbackEntry, grayRulesSummary.rollbackEntry); } @Override public int hashCode() { return Objects.hash(strategy, scope, rollbackEntry); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GrayRulesSummary {\n"); sb.append(" strategy: ").append(toIndentedString(strategy)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" rollbackEntry: ").append(toIndentedString(rollbackEntry)).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(@Nullable Object o) { return o == null ? "null" : o.toString().replace("\n", "\n "); } }