/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.kmsinventory.v1.model;

/**
 * Aggregate information about the resources protected by a Cloud KMS key in the same Cloud
 * organization as the key.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the KMS Inventory API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudKmsInventoryV1ProtectedResourcesSummary extends com.google.api.client.json.GenericJson {

  /**
   * The number of resources protected by the key grouped by Cloud product.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.util.Map<String, java.lang.Long> cloudProducts;

  /**
   * The number of resources protected by the key grouped by region.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.util.Map<String, java.lang.Long> locations;

  /**
   * The full name of the ProtectedResourcesSummary resource. Example: projects/test-
   * project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * The number of distinct Cloud projects in the same Cloud organization as the key that have
   * resources protected by the key.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer projectCount;

  /**
   * The total number of protected resources in the same Cloud organization as the key.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long resourceCount;

  /**
   * The number of resources protected by the key grouped by resource type.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.util.Map<String, java.lang.Long> resourceTypes;

  /**
   * The number of resources protected by the key grouped by Cloud product.
   * @return value or {@code null} for none
   */
  public java.util.Map<String, java.lang.Long> getCloudProducts() {
    return cloudProducts;
  }

  /**
   * The number of resources protected by the key grouped by Cloud product.
   * @param cloudProducts cloudProducts or {@code null} for none
   */
  public GoogleCloudKmsInventoryV1ProtectedResourcesSummary setCloudProducts(java.util.Map<String, java.lang.Long> cloudProducts) {
    this.cloudProducts = cloudProducts;
    return this;
  }

  /**
   * The number of resources protected by the key grouped by region.
   * @return value or {@code null} for none
   */
  public java.util.Map<String, java.lang.Long> getLocations() {
    return locations;
  }

  /**
   * The number of resources protected by the key grouped by region.
   * @param locations locations or {@code null} for none
   */
  public GoogleCloudKmsInventoryV1ProtectedResourcesSummary setLocations(java.util.Map<String, java.lang.Long> locations) {
    this.locations = locations;
    return this;
  }

  /**
   * The full name of the ProtectedResourcesSummary resource. Example: projects/test-
   * project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * The full name of the ProtectedResourcesSummary resource. Example: projects/test-
   * project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary
   * @param name name or {@code null} for none
   */
  public GoogleCloudKmsInventoryV1ProtectedResourcesSummary setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * The number of distinct Cloud projects in the same Cloud organization as the key that have
   * resources protected by the key.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getProjectCount() {
    return projectCount;
  }

  /**
   * The number of distinct Cloud projects in the same Cloud organization as the key that have
   * resources protected by the key.
   * @param projectCount projectCount or {@code null} for none
   */
  public GoogleCloudKmsInventoryV1ProtectedResourcesSummary setProjectCount(java.lang.Integer projectCount) {
    this.projectCount = projectCount;
    return this;
  }

  /**
   * The total number of protected resources in the same Cloud organization as the key.
   * @return value or {@code null} for none
   */
  public java.lang.Long getResourceCount() {
    return resourceCount;
  }

  /**
   * The total number of protected resources in the same Cloud organization as the key.
   * @param resourceCount resourceCount or {@code null} for none
   */
  public GoogleCloudKmsInventoryV1ProtectedResourcesSummary setResourceCount(java.lang.Long resourceCount) {
    this.resourceCount = resourceCount;
    return this;
  }

  /**
   * The number of resources protected by the key grouped by resource type.
   * @return value or {@code null} for none
   */
  public java.util.Map<String, java.lang.Long> getResourceTypes() {
    return resourceTypes;
  }

  /**
   * The number of resources protected by the key grouped by resource type.
   * @param resourceTypes resourceTypes or {@code null} for none
   */
  public GoogleCloudKmsInventoryV1ProtectedResourcesSummary setResourceTypes(java.util.Map<String, java.lang.Long> resourceTypes) {
    this.resourceTypes = resourceTypes;
    return this;
  }

  @Override
  public GoogleCloudKmsInventoryV1ProtectedResourcesSummary set(String fieldName, Object value) {
    return (GoogleCloudKmsInventoryV1ProtectedResourcesSummary) super.set(fieldName, value);
  }

  @Override
  public GoogleCloudKmsInventoryV1ProtectedResourcesSummary clone() {
    return (GoogleCloudKmsInventoryV1ProtectedResourcesSummary) super.clone();
  }

}
