/*
 * 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;
/**
* Result of the ruleset validation.
*/
    @ApiModel(description = "Result of the ruleset validation.")

public class RulesetValidationResultWithoutRulesDTO {
        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;

            /**
* 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;

            /**
* Status of the ruleset validation.
*/
    @JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
        PASSED("PASSED"),
        
        FAILED("FAILED"),
        
        UNAPPLIED("UNAPPLIED");

private String value;

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

public String getValue() {
return value;
}

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

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

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

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

        public static final String SERIALIZED_NAME_STATUS = "status";
        @SerializedName(SERIALIZED_NAME_STATUS)
            private StatusEnum status;


        public RulesetValidationResultWithoutRulesDTO 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 RulesetValidationResultWithoutRulesDTO name(String name) {
        
        this.name = name;
        return this;
        }

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


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


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

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


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


        public RulesetValidationResultWithoutRulesDTO status(StatusEnum status) {
        
        this.status = status;
        return this;
        }

    /**
        * Status of the ruleset validation.
    * @return status
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(example = "PASSED", value = "Status of the ruleset validation.")
    
    public StatusEnum getStatus() {
        return status;
    }


    public void setStatus(StatusEnum status) {
        this.status = status;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
        return true;
        }
        if (o == null || getClass() != o.getClass()) {
        return false;
        }
            RulesetValidationResultWithoutRulesDTO rulesetValidationResultWithoutRules = (RulesetValidationResultWithoutRulesDTO) o;
            return Objects.equals(this.id, rulesetValidationResultWithoutRules.id) &&
            Objects.equals(this.name, rulesetValidationResultWithoutRules.name) &&
            Objects.equals(this.ruleType, rulesetValidationResultWithoutRules.ruleType) &&
            Objects.equals(this.status, rulesetValidationResultWithoutRules.status);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, ruleType, status);
    }


@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RulesetValidationResultWithoutRulesDTO {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    ruleType: ").append(toIndentedString(ruleType)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).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    ");
}

}

