// SPDX-FileCopyrightText: the secureCodeBox authors
//
// SPDX-License-Identifier: Apache-2.0

/*
 * Kubernetes
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1.21.1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package io.securecodebox.models;

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.securecodebox.models.V1ScanStatusFindingsSeverities;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * FindingStats contains the general stats about the results of the scan
 */
@ApiModel(description = "FindingStats contains the general stats about the results of the scan")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-11-17T10:13:00.848Z[Etc/UTC]")
public class V1ScanStatusFindings {
  public static final String SERIALIZED_NAME_CATEGORIES = "categories";
  @SerializedName(SERIALIZED_NAME_CATEGORIES)
  private Map<String, Long> categories = null;

  public static final String SERIALIZED_NAME_COUNT = "count";
  @SerializedName(SERIALIZED_NAME_COUNT)
  private Long count;

  public static final String SERIALIZED_NAME_SEVERITIES = "severities";
  @SerializedName(SERIALIZED_NAME_SEVERITIES)
  private V1ScanStatusFindingsSeverities severities;


  public V1ScanStatusFindings categories(Map<String, Long> categories) {

    this.categories = categories;
    return this;
  }

  public V1ScanStatusFindings putCategoriesItem(String key, Long categoriesItem) {
    if (this.categories == null) {
      this.categories = new HashMap<>();
    }
    this.categories.put(key, categoriesItem);
    return this;
  }

  /**
   * FindingCategories indicates the count of finding broken down by their categories
   *
   * @return categories
   **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "FindingCategories indicates the count of finding broken down by their categories")

  public Map<String, Long> getCategories() {
    return categories;
  }


  public void setCategories(Map<String, Long> categories) {
    this.categories = categories;
  }


  public V1ScanStatusFindings count(Long count) {

    this.count = count;
    return this;
  }

  /**
   * Count indicates how many findings were identified in total
   *
   * @return count
   **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Count indicates how many findings were identified in total")

  public Long getCount() {
    return count;
  }


  public void setCount(Long count) {
    this.count = count;
  }


  public V1ScanStatusFindings severities(V1ScanStatusFindingsSeverities severities) {

    this.severities = severities;
    return this;
  }

  /**
   * Get severities
   *
   * @return severities
   **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public V1ScanStatusFindingsSeverities getSeverities() {
    return severities;
  }


  public void setSeverities(V1ScanStatusFindingsSeverities severities) {
    this.severities = severities;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1ScanStatusFindings v1ScanStatusFindings = (V1ScanStatusFindings) o;
    return Objects.equals(this.categories, v1ScanStatusFindings.categories) &&
      Objects.equals(this.count, v1ScanStatusFindings.count) &&
      Objects.equals(this.severities, v1ScanStatusFindings.severities);
  }

  @Override
  public int hashCode() {
    return Objects.hash(categories, count, severities);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1ScanStatusFindings {\n");
    sb.append("    categories: ").append(toIndentedString(categories)).append("\n");
    sb.append("    count: ").append(toIndentedString(count)).append("\n");
    sb.append("    severities: ").append(toIndentedString(severities)).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    ");
  }

}

