/*
 * WSO2 API Manager - Governance
 * This document specifies a **RESTful API** for WSO2 **API Manager** - Governance. 
 *
 * The version of the OpenAPI document: v1.1
 * Contact: architecture@wso2.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.wso2.am.integration.clients.governance.api.dto;

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 com.fasterxml.jackson.annotation.JsonCreator;
/**
* Detailed information about a ruleset.
*/
    @ApiModel(description = "Detailed information about a ruleset.")

public class RulesetInfoDTO {
        public static final String SERIALIZED_NAME_ID = "id";
        @SerializedName(SERIALIZED_NAME_ID)
            private String id;

        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;

            /**
* Category the rules included in ruleset.
*/
    @JsonAdapter(RuleCategoryEnum.Adapter.class)
public enum RuleCategoryEnum {
        SPECTRAL("SPECTRAL");

private String value;

RuleCategoryEnum(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static RuleCategoryEnum fromValue(String value) {
    for (RuleCategoryEnum b : RuleCategoryEnum.values()) {
    if (b.name().equals(value)) {
        return b;
    }
}
    throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

    public static class Adapter extends TypeAdapter<RuleCategoryEnum> {
    @Override
    public void write(final JsonWriter jsonWriter, final RuleCategoryEnum enumeration) throws IOException {
    jsonWriter.value(enumeration.getValue());
    }

    @Override
    public RuleCategoryEnum read(final JsonReader jsonReader) throws IOException {
    String value =  jsonReader.nextString();
    return RuleCategoryEnum.fromValue(value);
    }
    }
}

        public static final String SERIALIZED_NAME_RULE_CATEGORY = "ruleCategory";
        @SerializedName(SERIALIZED_NAME_RULE_CATEGORY)
            private RuleCategoryEnum ruleCategory;

            /**
* Context or area to which the ruleset applies.
*/
    @JsonAdapter(RuleTypeEnum.Adapter.class)
public enum RuleTypeEnum {
        API_METADATA("API_METADATA"),
        
        API_DEFINITION("API_DEFINITION"),
        
        API_DOCUMENTATION("API_DOCUMENTATION");

private String value;

RuleTypeEnum(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static RuleTypeEnum fromValue(String value) {
    for (RuleTypeEnum b : RuleTypeEnum.values()) {
    if (b.name().equals(value)) {
        return b;
    }
}
    throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

    public static class Adapter extends TypeAdapter<RuleTypeEnum> {
    @Override
    public void write(final JsonWriter jsonWriter, final RuleTypeEnum enumeration) throws IOException {
    jsonWriter.value(enumeration.getValue());
    }

    @Override
    public RuleTypeEnum read(final JsonReader jsonReader) throws IOException {
    String value =  jsonReader.nextString();
    return RuleTypeEnum.fromValue(value);
    }
    }
}

        public static final String SERIALIZED_NAME_RULE_TYPE = "ruleType";
        @SerializedName(SERIALIZED_NAME_RULE_TYPE)
            private RuleTypeEnum ruleType;

            /**
* The type of artifact that the ruleset validates.
*/
    @JsonAdapter(ArtifactTypeEnum.Adapter.class)
public enum ArtifactTypeEnum {
        REST_API("REST_API"),
        
        ASYNC_API("ASYNC_API"),
        
        MCP("MCP");

private String value;

ArtifactTypeEnum(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static ArtifactTypeEnum fromValue(String value) {
    for (ArtifactTypeEnum b : ArtifactTypeEnum.values()) {
    if (b.name().equals(value)) {
        return b;
    }
}
    throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

    public static class Adapter extends TypeAdapter<ArtifactTypeEnum> {
    @Override
    public void write(final JsonWriter jsonWriter, final ArtifactTypeEnum enumeration) throws IOException {
    jsonWriter.value(enumeration.getValue());
    }

    @Override
    public ArtifactTypeEnum read(final JsonReader jsonReader) throws IOException {
    String value =  jsonReader.nextString();
    return ArtifactTypeEnum.fromValue(value);
    }
    }
}

        public static final String SERIALIZED_NAME_ARTIFACT_TYPE = "artifactType";
        @SerializedName(SERIALIZED_NAME_ARTIFACT_TYPE)
            private ArtifactTypeEnum artifactType;

        public static final String SERIALIZED_NAME_DOCUMENTATION_LINK = "documentationLink";
        @SerializedName(SERIALIZED_NAME_DOCUMENTATION_LINK)
            private String documentationLink;

        public static final String SERIALIZED_NAME_PROVIDER = "provider";
        @SerializedName(SERIALIZED_NAME_PROVIDER)
            private String provider;

        public static final String SERIALIZED_NAME_CREATED_BY = "createdBy";
        @SerializedName(SERIALIZED_NAME_CREATED_BY)
            private String createdBy;

        public static final String SERIALIZED_NAME_CREATED_TIME = "createdTime";
        @SerializedName(SERIALIZED_NAME_CREATED_TIME)
            private String createdTime;

        public static final String SERIALIZED_NAME_UPDATED_BY = "updatedBy";
        @SerializedName(SERIALIZED_NAME_UPDATED_BY)
            private String updatedBy;

        public static final String SERIALIZED_NAME_UPDATED_TIME = "updatedTime";
        @SerializedName(SERIALIZED_NAME_UPDATED_TIME)
            private String updatedTime;


        public RulesetInfoDTO id(String id) {
        
        this.id = id;
        return this;
        }

    /**
        * UUID of the ruleset.
    * @return id
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(example = "123e4567-e89b-12d3-a456-426614174000", value = "UUID of the ruleset.")
    
    public String getId() {
        return id;
    }


    public void setId(String id) {
        this.id = id;
    }


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

    /**
        * Name of the ruleset.
    * @return name
    **/
      @ApiModelProperty(example = "API Security Ruleset", required = true, value = "Name of the ruleset.")
    
    public String getName() {
        return name;
    }


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


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

    /**
        * A brief description of the ruleset.
    * @return description
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(example = "A ruleset designed to enforce security standards for APIs.", value = "A brief description of the ruleset.")
    
    public String getDescription() {
        return description;
    }


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


        public RulesetInfoDTO ruleCategory(RuleCategoryEnum ruleCategory) {
        
        this.ruleCategory = ruleCategory;
        return this;
        }

    /**
        * Category the rules included in ruleset.
    * @return ruleCategory
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(example = "SPECTRAL", value = "Category the rules included in ruleset.")
    
    public RuleCategoryEnum getRuleCategory() {
        return ruleCategory;
    }


    public void setRuleCategory(RuleCategoryEnum ruleCategory) {
        this.ruleCategory = ruleCategory;
    }


        public RulesetInfoDTO ruleType(RuleTypeEnum ruleType) {
        
        this.ruleType = ruleType;
        return this;
        }

    /**
        * Context or area to which the ruleset applies.
    * @return ruleType
    **/
      @ApiModelProperty(example = "API_DEFINITION", required = true, value = "Context or area to which the ruleset applies.")
    
    public RuleTypeEnum getRuleType() {
        return ruleType;
    }


    public void setRuleType(RuleTypeEnum ruleType) {
        this.ruleType = ruleType;
    }


        public RulesetInfoDTO artifactType(ArtifactTypeEnum artifactType) {
        
        this.artifactType = artifactType;
        return this;
        }

    /**
        * The type of artifact that the ruleset validates.
    * @return artifactType
    **/
      @ApiModelProperty(example = "REST_API", required = true, value = "The type of artifact that the ruleset validates.")
    
    public ArtifactTypeEnum getArtifactType() {
        return artifactType;
    }


    public void setArtifactType(ArtifactTypeEnum artifactType) {
        this.artifactType = artifactType;
    }


        public RulesetInfoDTO documentationLink(String documentationLink) {
        
        this.documentationLink = documentationLink;
        return this;
        }

    /**
        * URL to the documentation related to the ruleset.
    * @return documentationLink
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(example = "https://example.com/docs/api-security-ruleset", value = "URL to the documentation related to the ruleset.")
    
    public String getDocumentationLink() {
        return documentationLink;
    }


    public void setDocumentationLink(String documentationLink) {
        this.documentationLink = documentationLink;
    }


        public RulesetInfoDTO provider(String provider) {
        
        this.provider = provider;
        return this;
        }

    /**
        * Entity or individual providing the ruleset.
    * @return provider
    **/
      @ApiModelProperty(example = "TechWave", required = true, value = "Entity or individual providing the ruleset.")
    
    public String getProvider() {
        return provider;
    }


    public void setProvider(String provider) {
        this.provider = provider;
    }


        public RulesetInfoDTO createdBy(String createdBy) {
        
        this.createdBy = createdBy;
        return this;
        }

    /**
        * Identifier of the user who created the ruleset.
    * @return createdBy
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(example = "admin@gmail.com", value = "Identifier of the user who created the ruleset.")
    
    public String getCreatedBy() {
        return createdBy;
    }


    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }


        public RulesetInfoDTO createdTime(String createdTime) {
        
        this.createdTime = createdTime;
        return this;
        }

    /**
        * Timestamp when the ruleset was created.
    * @return createdTime
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(example = "2024-08-01T12:00:00Z", value = "Timestamp when the ruleset was created.")
    
    public String getCreatedTime() {
        return createdTime;
    }


    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }


        public RulesetInfoDTO updatedBy(String updatedBy) {
        
        this.updatedBy = updatedBy;
        return this;
        }

    /**
        * Identifier of the user who last updated the ruleset.
    * @return updatedBy
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(example = "admin@gmail.com", value = "Identifier of the user who last updated the ruleset.")
    
    public String getUpdatedBy() {
        return updatedBy;
    }


    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }


        public RulesetInfoDTO updatedTime(String updatedTime) {
        
        this.updatedTime = updatedTime;
        return this;
        }

    /**
        * Timestamp when the ruleset was last updated.
    * @return updatedTime
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(example = "2024-08-02T12:00:00Z", value = "Timestamp when the ruleset was last updated.")
    
    public String getUpdatedTime() {
        return updatedTime;
    }


    public void setUpdatedTime(String updatedTime) {
        this.updatedTime = updatedTime;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
        return true;
        }
        if (o == null || getClass() != o.getClass()) {
        return false;
        }
            RulesetInfoDTO rulesetInfo = (RulesetInfoDTO) o;
            return Objects.equals(this.id, rulesetInfo.id) &&
            Objects.equals(this.name, rulesetInfo.name) &&
            Objects.equals(this.description, rulesetInfo.description) &&
            Objects.equals(this.ruleCategory, rulesetInfo.ruleCategory) &&
            Objects.equals(this.ruleType, rulesetInfo.ruleType) &&
            Objects.equals(this.artifactType, rulesetInfo.artifactType) &&
            Objects.equals(this.documentationLink, rulesetInfo.documentationLink) &&
            Objects.equals(this.provider, rulesetInfo.provider) &&
            Objects.equals(this.createdBy, rulesetInfo.createdBy) &&
            Objects.equals(this.createdTime, rulesetInfo.createdTime) &&
            Objects.equals(this.updatedBy, rulesetInfo.updatedBy) &&
            Objects.equals(this.updatedTime, rulesetInfo.updatedTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, description, ruleCategory, ruleType, artifactType, documentationLink, provider, createdBy, createdTime, updatedBy, updatedTime);
    }


@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RulesetInfoDTO {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    ruleCategory: ").append(toIndentedString(ruleCategory)).append("\n");
    sb.append("    ruleType: ").append(toIndentedString(ruleType)).append("\n");
    sb.append("    artifactType: ").append(toIndentedString(artifactType)).append("\n");
    sb.append("    documentationLink: ").append(toIndentedString(documentationLink)).append("\n");
    sb.append("    provider: ").append(toIndentedString(provider)).append("\n");
    sb.append("    createdBy: ").append(toIndentedString(createdBy)).append("\n");
    sb.append("    createdTime: ").append(toIndentedString(createdTime)).append("\n");
    sb.append("    updatedBy: ").append(toIndentedString(updatedBy)).append("\n");
    sb.append("    updatedTime: ").append(toIndentedString(updatedTime)).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    ");
}

}

