/*
 * 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.ArtifactInfoDTO;
import org.wso2.am.integration.clients.governance.api.dto.PolicyAdherenceSummaryDTO;
import org.wso2.am.integration.clients.governance.api.dto.SeverityBasedRuleViolationCountDTO;
import com.fasterxml.jackson.annotation.JsonCreator;
/**
* Provides compliance status of an artifact.
*/
    @ApiModel(description = "Provides compliance status of an artifact.")

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

            /**
* Status of the API&#39;s governance compliance.
*/
    @JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
        COMPLIANT("COMPLIANT"),
        
        NON_COMPLIANT("NON-COMPLIANT"),
        
        NOT_APPLICABLE("NOT-APPLICABLE"),
        
        PENDING("PENDING");

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_INFO = "info";
        @SerializedName(SERIALIZED_NAME_INFO)
            private ArtifactInfoDTO info;

        public static final String SERIALIZED_NAME_POLICY_ADHERENCE_SUMMARY = "policyAdherenceSummary";
        @SerializedName(SERIALIZED_NAME_POLICY_ADHERENCE_SUMMARY)
            private PolicyAdherenceSummaryDTO policyAdherenceSummary;

        public static final String SERIALIZED_NAME_SEVERITY_BASED_RULE_VIOLATION_SUMMARY = "severityBasedRuleViolationSummary";
        @SerializedName(SERIALIZED_NAME_SEVERITY_BASED_RULE_VIOLATION_SUMMARY)
            private List<SeverityBasedRuleViolationCountDTO> severityBasedRuleViolationSummary = null;


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

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


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


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

    /**
        * Status of the API&#39;s governance compliance.
    * @return status
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(example = "COMPLIANT", value = "Status of the API's governance compliance.")
    
    public StatusEnum getStatus() {
        return status;
    }


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


        public ArtifactComplianceStatusDTO info(ArtifactInfoDTO info) {
        
        this.info = info;
        return this;
        }

    /**
        * Get info
    * @return info
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(value = "")
    
    public ArtifactInfoDTO getInfo() {
        return info;
    }


    public void setInfo(ArtifactInfoDTO info) {
        this.info = info;
    }


        public ArtifactComplianceStatusDTO policyAdherenceSummary(PolicyAdherenceSummaryDTO policyAdherenceSummary) {
        
        this.policyAdherenceSummary = policyAdherenceSummary;
        return this;
        }

    /**
        * Get policyAdherenceSummary
    * @return policyAdherenceSummary
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(value = "")
    
    public PolicyAdherenceSummaryDTO getPolicyAdherenceSummary() {
        return policyAdherenceSummary;
    }


    public void setPolicyAdherenceSummary(PolicyAdherenceSummaryDTO policyAdherenceSummary) {
        this.policyAdherenceSummary = policyAdherenceSummary;
    }


        public ArtifactComplianceStatusDTO severityBasedRuleViolationSummary(List<SeverityBasedRuleViolationCountDTO> severityBasedRuleViolationSummary) {
        
        this.severityBasedRuleViolationSummary = severityBasedRuleViolationSummary;
        return this;
        }

    /**
        * Summary of severity based rule violations.
    * @return severityBasedRuleViolationSummary
    **/
        @javax.annotation.Nullable
      @ApiModelProperty(value = "Summary of severity based rule violations.")
    
    public List<SeverityBasedRuleViolationCountDTO> getSeverityBasedRuleViolationSummary() {
        return severityBasedRuleViolationSummary;
    }


    public void setSeverityBasedRuleViolationSummary(List<SeverityBasedRuleViolationCountDTO> severityBasedRuleViolationSummary) {
        this.severityBasedRuleViolationSummary = severityBasedRuleViolationSummary;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
        return true;
        }
        if (o == null || getClass() != o.getClass()) {
        return false;
        }
            ArtifactComplianceStatusDTO artifactComplianceStatus = (ArtifactComplianceStatusDTO) o;
            return Objects.equals(this.id, artifactComplianceStatus.id) &&
            Objects.equals(this.status, artifactComplianceStatus.status) &&
            Objects.equals(this.info, artifactComplianceStatus.info) &&
            Objects.equals(this.policyAdherenceSummary, artifactComplianceStatus.policyAdherenceSummary) &&
            Objects.equals(this.severityBasedRuleViolationSummary, artifactComplianceStatus.severityBasedRuleViolationSummary);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, status, info, policyAdherenceSummary, severityBasedRuleViolationSummary);
    }


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

}

