Class ProtectedResourcesSummary.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ProtectedResourcesSummary.Builder>
com.google.cloud.kms.inventory.v1.ProtectedResourcesSummary.Builder
All Implemented Interfaces:
ProtectedResourcesSummaryOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ProtectedResourcesSummary

public static final class ProtectedResourcesSummary.Builder extends com.google.protobuf.GeneratedMessage.Builder<ProtectedResourcesSummary.Builder> implements ProtectedResourcesSummaryOrBuilder
 Aggregate information about the resources protected by a Cloud KMS key in the
 same Cloud organization/project as the key.
 
Protobuf type google.cloud.kms.inventory.v1.ProtectedResourcesSummary
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ProtectedResourcesSummary.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ProtectedResourcesSummary.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ProtectedResourcesSummary.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ProtectedResourcesSummary.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ProtectedResourcesSummary.Builder>
    • getDefaultInstanceForType

      public ProtectedResourcesSummary getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ProtectedResourcesSummary build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ProtectedResourcesSummary buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ProtectedResourcesSummary.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ProtectedResourcesSummary.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ProtectedResourcesSummary.Builder>
    • mergeFrom

      public ProtectedResourcesSummary.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ProtectedResourcesSummary.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The full name of the ProtectedResourcesSummary resource.
       Example:
       projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary
       
      string name = 5;
      Specified by:
      getName in interface ProtectedResourcesSummaryOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The full name of the ProtectedResourcesSummary resource.
       Example:
       projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary
       
      string name = 5;
      Specified by:
      getNameBytes in interface ProtectedResourcesSummaryOrBuilder
      Returns:
      The bytes for name.
    • setName

      public ProtectedResourcesSummary.Builder setName(String value)
       The full name of the ProtectedResourcesSummary resource.
       Example:
       projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary
       
      string name = 5;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

       The full name of the ProtectedResourcesSummary resource.
       Example:
       projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary
       
      string name = 5;
      Returns:
      This builder for chaining.
    • setNameBytes

      public ProtectedResourcesSummary.Builder setNameBytes(com.google.protobuf.ByteString value)
       The full name of the ProtectedResourcesSummary resource.
       Example:
       projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary
       
      string name = 5;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getResourceCount

      public long getResourceCount()
       The total number of protected resources in the same Cloud organization as
       the key.
       
      int64 resource_count = 1;
      Specified by:
      getResourceCount in interface ProtectedResourcesSummaryOrBuilder
      Returns:
      The resourceCount.
    • setResourceCount

      public ProtectedResourcesSummary.Builder setResourceCount(long value)
       The total number of protected resources in the same Cloud organization as
       the key.
       
      int64 resource_count = 1;
      Parameters:
      value - The resourceCount to set.
      Returns:
      This builder for chaining.
    • clearResourceCount

      public ProtectedResourcesSummary.Builder clearResourceCount()
       The total number of protected resources in the same Cloud organization as
       the key.
       
      int64 resource_count = 1;
      Returns:
      This builder for chaining.
    • getProjectCount

      public int getProjectCount()
       The number of distinct Cloud projects in the same Cloud organization as the
       key that have resources protected by the key.
       
      int32 project_count = 2;
      Specified by:
      getProjectCount in interface ProtectedResourcesSummaryOrBuilder
      Returns:
      The projectCount.
    • setProjectCount

      public ProtectedResourcesSummary.Builder setProjectCount(int value)
       The number of distinct Cloud projects in the same Cloud organization as the
       key that have resources protected by the key.
       
      int32 project_count = 2;
      Parameters:
      value - The projectCount to set.
      Returns:
      This builder for chaining.
    • clearProjectCount

      public ProtectedResourcesSummary.Builder clearProjectCount()
       The number of distinct Cloud projects in the same Cloud organization as the
       key that have resources protected by the key.
       
      int32 project_count = 2;
      Returns:
      This builder for chaining.
    • getResourceTypesCount

      public int getResourceTypesCount()
      Description copied from interface: ProtectedResourcesSummaryOrBuilder
       The number of resources protected by the key grouped by resource type.
       
      map<string, int64> resource_types = 3;
      Specified by:
      getResourceTypesCount in interface ProtectedResourcesSummaryOrBuilder
    • containsResourceTypes

      public boolean containsResourceTypes(String key)
       The number of resources protected by the key grouped by resource type.
       
      map<string, int64> resource_types = 3;
      Specified by:
      containsResourceTypes in interface ProtectedResourcesSummaryOrBuilder
    • getResourceTypes

      @Deprecated public Map<String,Long> getResourceTypes()
      Deprecated.
      Specified by:
      getResourceTypes in interface ProtectedResourcesSummaryOrBuilder
    • getResourceTypesMap

      public Map<String,Long> getResourceTypesMap()
       The number of resources protected by the key grouped by resource type.
       
      map<string, int64> resource_types = 3;
      Specified by:
      getResourceTypesMap in interface ProtectedResourcesSummaryOrBuilder
    • getResourceTypesOrDefault

      public long getResourceTypesOrDefault(String key, long defaultValue)
       The number of resources protected by the key grouped by resource type.
       
      map<string, int64> resource_types = 3;
      Specified by:
      getResourceTypesOrDefault in interface ProtectedResourcesSummaryOrBuilder
    • getResourceTypesOrThrow

      public long getResourceTypesOrThrow(String key)
       The number of resources protected by the key grouped by resource type.
       
      map<string, int64> resource_types = 3;
      Specified by:
      getResourceTypesOrThrow in interface ProtectedResourcesSummaryOrBuilder
    • clearResourceTypes

      public ProtectedResourcesSummary.Builder clearResourceTypes()
    • removeResourceTypes

      public ProtectedResourcesSummary.Builder removeResourceTypes(String key)
       The number of resources protected by the key grouped by resource type.
       
      map<string, int64> resource_types = 3;
    • getMutableResourceTypes

      @Deprecated public Map<String,Long> getMutableResourceTypes()
      Deprecated.
      Use alternate mutation accessors instead.
    • putResourceTypes

      public ProtectedResourcesSummary.Builder putResourceTypes(String key, long value)
       The number of resources protected by the key grouped by resource type.
       
      map<string, int64> resource_types = 3;
    • putAllResourceTypes

      public ProtectedResourcesSummary.Builder putAllResourceTypes(Map<String,Long> values)
       The number of resources protected by the key grouped by resource type.
       
      map<string, int64> resource_types = 3;
    • getCloudProductsCount

      public int getCloudProductsCount()
      Description copied from interface: ProtectedResourcesSummaryOrBuilder
       The number of resources protected by the key grouped by Cloud product.
       
      map<string, int64> cloud_products = 6;
      Specified by:
      getCloudProductsCount in interface ProtectedResourcesSummaryOrBuilder
    • containsCloudProducts

      public boolean containsCloudProducts(String key)
       The number of resources protected by the key grouped by Cloud product.
       
      map<string, int64> cloud_products = 6;
      Specified by:
      containsCloudProducts in interface ProtectedResourcesSummaryOrBuilder
    • getCloudProducts

      @Deprecated public Map<String,Long> getCloudProducts()
      Deprecated.
      Specified by:
      getCloudProducts in interface ProtectedResourcesSummaryOrBuilder
    • getCloudProductsMap

      public Map<String,Long> getCloudProductsMap()
       The number of resources protected by the key grouped by Cloud product.
       
      map<string, int64> cloud_products = 6;
      Specified by:
      getCloudProductsMap in interface ProtectedResourcesSummaryOrBuilder
    • getCloudProductsOrDefault

      public long getCloudProductsOrDefault(String key, long defaultValue)
       The number of resources protected by the key grouped by Cloud product.
       
      map<string, int64> cloud_products = 6;
      Specified by:
      getCloudProductsOrDefault in interface ProtectedResourcesSummaryOrBuilder
    • getCloudProductsOrThrow

      public long getCloudProductsOrThrow(String key)
       The number of resources protected by the key grouped by Cloud product.
       
      map<string, int64> cloud_products = 6;
      Specified by:
      getCloudProductsOrThrow in interface ProtectedResourcesSummaryOrBuilder
    • clearCloudProducts

      public ProtectedResourcesSummary.Builder clearCloudProducts()
    • removeCloudProducts

      public ProtectedResourcesSummary.Builder removeCloudProducts(String key)
       The number of resources protected by the key grouped by Cloud product.
       
      map<string, int64> cloud_products = 6;
    • getMutableCloudProducts

      @Deprecated public Map<String,Long> getMutableCloudProducts()
      Deprecated.
      Use alternate mutation accessors instead.
    • putCloudProducts

      public ProtectedResourcesSummary.Builder putCloudProducts(String key, long value)
       The number of resources protected by the key grouped by Cloud product.
       
      map<string, int64> cloud_products = 6;
    • putAllCloudProducts

      public ProtectedResourcesSummary.Builder putAllCloudProducts(Map<String,Long> values)
       The number of resources protected by the key grouped by Cloud product.
       
      map<string, int64> cloud_products = 6;
    • getLocationsCount

      public int getLocationsCount()
      Description copied from interface: ProtectedResourcesSummaryOrBuilder
       The number of resources protected by the key grouped by region.
       
      map<string, int64> locations = 4;
      Specified by:
      getLocationsCount in interface ProtectedResourcesSummaryOrBuilder
    • containsLocations

      public boolean containsLocations(String key)
       The number of resources protected by the key grouped by region.
       
      map<string, int64> locations = 4;
      Specified by:
      containsLocations in interface ProtectedResourcesSummaryOrBuilder
    • getLocations

      @Deprecated public Map<String,Long> getLocations()
      Deprecated.
      Use getLocationsMap() instead.
      Specified by:
      getLocations in interface ProtectedResourcesSummaryOrBuilder
    • getLocationsMap

      public Map<String,Long> getLocationsMap()
       The number of resources protected by the key grouped by region.
       
      map<string, int64> locations = 4;
      Specified by:
      getLocationsMap in interface ProtectedResourcesSummaryOrBuilder
    • getLocationsOrDefault

      public long getLocationsOrDefault(String key, long defaultValue)
       The number of resources protected by the key grouped by region.
       
      map<string, int64> locations = 4;
      Specified by:
      getLocationsOrDefault in interface ProtectedResourcesSummaryOrBuilder
    • getLocationsOrThrow

      public long getLocationsOrThrow(String key)
       The number of resources protected by the key grouped by region.
       
      map<string, int64> locations = 4;
      Specified by:
      getLocationsOrThrow in interface ProtectedResourcesSummaryOrBuilder
    • clearLocations

      public ProtectedResourcesSummary.Builder clearLocations()
    • removeLocations

      public ProtectedResourcesSummary.Builder removeLocations(String key)
       The number of resources protected by the key grouped by region.
       
      map<string, int64> locations = 4;
    • getMutableLocations

      @Deprecated public Map<String,Long> getMutableLocations()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLocations

      public ProtectedResourcesSummary.Builder putLocations(String key, long value)
       The number of resources protected by the key grouped by region.
       
      map<string, int64> locations = 4;
    • putAllLocations

      public ProtectedResourcesSummary.Builder putAllLocations(Map<String,Long> values)
       The number of resources protected by the key grouped by region.
       
      map<string, int64> locations = 4;
    • getWarningsList

      public List<Warning> getWarningsList()
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
      Specified by:
      getWarningsList in interface ProtectedResourcesSummaryOrBuilder
    • getWarningsCount

      public int getWarningsCount()
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
      Specified by:
      getWarningsCount in interface ProtectedResourcesSummaryOrBuilder
    • getWarnings

      public Warning getWarnings(int index)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
      Specified by:
      getWarnings in interface ProtectedResourcesSummaryOrBuilder
    • setWarnings

      public ProtectedResourcesSummary.Builder setWarnings(int index, Warning value)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • setWarnings

      public ProtectedResourcesSummary.Builder setWarnings(int index, Warning.Builder builderForValue)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • addWarnings

      public ProtectedResourcesSummary.Builder addWarnings(Warning value)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • addWarnings

      public ProtectedResourcesSummary.Builder addWarnings(int index, Warning value)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • addWarnings

      public ProtectedResourcesSummary.Builder addWarnings(Warning.Builder builderForValue)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • addWarnings

      public ProtectedResourcesSummary.Builder addWarnings(int index, Warning.Builder builderForValue)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • addAllWarnings

      public ProtectedResourcesSummary.Builder addAllWarnings(Iterable<? extends Warning> values)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • clearWarnings

      public ProtectedResourcesSummary.Builder clearWarnings()
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • removeWarnings

      public ProtectedResourcesSummary.Builder removeWarnings(int index)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • getWarningsBuilder

      public Warning.Builder getWarningsBuilder(int index)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • getWarningsOrBuilder

      public WarningOrBuilder getWarningsOrBuilder(int index)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
      Specified by:
      getWarningsOrBuilder in interface ProtectedResourcesSummaryOrBuilder
    • getWarningsOrBuilderList

      public List<? extends WarningOrBuilder> getWarningsOrBuilderList()
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
      Specified by:
      getWarningsOrBuilderList in interface ProtectedResourcesSummaryOrBuilder
    • addWarningsBuilder

      public Warning.Builder addWarningsBuilder()
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • addWarningsBuilder

      public Warning.Builder addWarningsBuilder(int index)
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;
    • getWarningsBuilderList

      public List<Warning.Builder> getWarningsBuilderList()
       Warning messages for the state of response
       [ProtectedResourcesSummary][google.cloud.kms.inventory.v1.ProtectedResourcesSummary]
       For example, if the organization service account is not configured,
       INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.
       
      repeated .google.cloud.kms.inventory.v1.Warning warnings = 7;