/*
 * 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 java.util.ArrayList;
import java.util.List;
import org.wso2.am.integration.clients.governance.api.dto.RuleValidationResultDTO;
import com.fasterxml.jackson.annotation.JsonCreator;
/**
* Result of the ruleset validation.
*/
    @ApiModel(description = "Result of the ruleset validation.")

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

            /**
* 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 static final String SERIALIZED_NAME_VIOLATED_RULES = "violatedRules";
        @SerializedName(SERIALIZED_NAME_VIOLATED_RULES)
            private List<RuleValidationResultDTO> violatedRules = null;

        public static final String SERIALIZED_NAME_FOLLOWED_RULES = "followedRules";
        @SerializedName(SERIALIZED_NAME_FOLLOWED_RULES)
            private List<RuleValidationResultDTO> followedRules = null;


        public RulesetValidationResultDTO 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 RulesetValidationResultDTO 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 RulesetValidationResultDTO 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;
    }


        public RulesetValidationResultDTO violatedRules(List<RuleValidationResultDTO> violatedRules) {
        
        this.violatedRules = violatedRules;
        return this;
        }

    /**
        * List of violated rules.
    * @return violatedRules
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(value = "List of violated rules.")
    
    public List<RuleValidationResultDTO> getViolatedRules() {
        return violatedRules;
    }


    public void setViolatedRules(List<RuleValidationResultDTO> violatedRules) {
        this.violatedRules = violatedRules;
    }


        public RulesetValidationResultDTO followedRules(List<RuleValidationResultDTO> followedRules) {
        
        this.followedRules = followedRules;
        return this;
        }

    /**
        * List of followed rules.
    * @return followedRules
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(value = "List of followed rules.")
    
    public List<RuleValidationResultDTO> getFollowedRules() {
        return followedRules;
    }


    public void setFollowedRules(List<RuleValidationResultDTO> followedRules) {
        this.followedRules = followedRules;
    }


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

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


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

}

