Class ProtectedResourcesSummary.Builder (0.17.0)

public static final class ProtectedResourcesSummary.Builder extends GeneratedMessageV3.Builder<ProtectedResourcesSummary.Builder> implements ProtectedResourcesSummaryOrBuilder

Aggregate information about the resources protected by a Cloud KMS key in the same Cloud organization as the key.

Protobuf type google.cloud.kms.inventory.v1.ProtectedResourcesSummary

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ProtectedResourcesSummary.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides

build()

public ProtectedResourcesSummary build()
Returns
TypeDescription
ProtectedResourcesSummary

buildPartial()

public ProtectedResourcesSummary buildPartial()
Returns
TypeDescription
ProtectedResourcesSummary

clear()

public ProtectedResourcesSummary.Builder clear()
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides

clearCloudProducts()

public ProtectedResourcesSummary.Builder clearCloudProducts()
Returns
TypeDescription
ProtectedResourcesSummary.Builder

clearField(Descriptors.FieldDescriptor field)

public ProtectedResourcesSummary.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides

clearLocations()

public ProtectedResourcesSummary.Builder clearLocations()
Returns
TypeDescription
ProtectedResourcesSummary.Builder

clearName()

public ProtectedResourcesSummary.Builder 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
TypeDescription
ProtectedResourcesSummary.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ProtectedResourcesSummary.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides

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
TypeDescription
ProtectedResourcesSummary.Builder

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
TypeDescription
ProtectedResourcesSummary.Builder

This builder for chaining.

clearResourceTypes()

public ProtectedResourcesSummary.Builder clearResourceTypes()
Returns
TypeDescription
ProtectedResourcesSummary.Builder

clone()

public ProtectedResourcesSummary.Builder clone()
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides

containsCloudProducts(String key)

public boolean containsCloudProducts(String key)

The number of resources protected by the key grouped by Cloud product.

map<string, int64> cloud_products = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsLocations(String key)

public boolean containsLocations(String key)

The number of resources protected by the key grouped by region.

map<string, int64> locations = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsResourceTypes(String key)

public boolean containsResourceTypes(String key)

The number of resources protected by the key grouped by resource type.

map<string, int64> resource_types = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCloudProducts()

public Map<String,Long> getCloudProducts()
Returns
TypeDescription
Map<String,java.lang.Long>

getCloudProductsCount()

public int getCloudProductsCount()

The number of resources protected by the key grouped by Cloud product.

map<string, int64> cloud_products = 6;

Returns
TypeDescription
int

getCloudProductsMap()

public Map<String,Long> getCloudProductsMap()

The number of resources protected by the key grouped by Cloud product.

map<string, int64> cloud_products = 6;

Returns
TypeDescription
Map<String,java.lang.Long>

getCloudProductsOrDefault(String key, long defaultValue)

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;

Parameters
NameDescription
keyString
defaultValuelong
Returns
TypeDescription
long

getCloudProductsOrThrow(String key)

public long getCloudProductsOrThrow(String key)

The number of resources protected by the key grouped by Cloud product.

map<string, int64> cloud_products = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
long

getDefaultInstanceForType()

public ProtectedResourcesSummary getDefaultInstanceForType()
Returns
TypeDescription
ProtectedResourcesSummary

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLocations()

public Map<String,Long> getLocations()

Use #getLocationsMap() instead.

Returns
TypeDescription
Map<String,java.lang.Long>

getLocationsCount()

public int getLocationsCount()

The number of resources protected by the key grouped by region.

map<string, int64> locations = 4;

Returns
TypeDescription
int

getLocationsMap()

public Map<String,Long> getLocationsMap()

The number of resources protected by the key grouped by region.

map<string, int64> locations = 4;

Returns
TypeDescription
Map<String,java.lang.Long>

getLocationsOrDefault(String key, long defaultValue)

public long getLocationsOrDefault(String key, long defaultValue)

The number of resources protected by the key grouped by region.

map<string, int64> locations = 4;

Parameters
NameDescription
keyString
defaultValuelong
Returns
TypeDescription
long

getLocationsOrThrow(String key)

public long getLocationsOrThrow(String key)

The number of resources protected by the key grouped by region.

map<string, int64> locations = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
long

getMutableCloudProducts()

public Map<String,Long> getMutableCloudProducts()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,java.lang.Long>

getMutableLocations()

public Map<String,Long> getMutableLocations()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,java.lang.Long>

getMutableResourceTypes()

public Map<String,Long> getMutableResourceTypes()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,java.lang.Long>

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;

Returns
TypeDescription
String

The name.

getNameBytes()

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

Returns
TypeDescription
ByteString

The bytes for name.

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;

Returns
TypeDescription
int

The projectCount.

getResourceCount()

public long getResourceCount()

The total number of protected resources in the same Cloud organization as the key.

int64 resource_count = 1;

Returns
TypeDescription
long

The resourceCount.

getResourceTypes()

public Map<String,Long> getResourceTypes()
Returns
TypeDescription
Map<String,java.lang.Long>

getResourceTypesCount()

public int getResourceTypesCount()

The number of resources protected by the key grouped by resource type.

map<string, int64> resource_types = 3;

Returns
TypeDescription
int

getResourceTypesMap()

public Map<String,Long> getResourceTypesMap()

The number of resources protected by the key grouped by resource type.

map<string, int64> resource_types = 3;

Returns
TypeDescription
Map<String,java.lang.Long>

getResourceTypesOrDefault(String key, long defaultValue)

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;

Parameters
NameDescription
keyString
defaultValuelong
Returns
TypeDescription
long

getResourceTypesOrThrow(String key)

public long getResourceTypesOrThrow(String key)

The number of resources protected by the key grouped by resource type.

map<string, int64> resource_types = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
long

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ProtectedResourcesSummary other)

public ProtectedResourcesSummary.Builder mergeFrom(ProtectedResourcesSummary other)
Parameter
NameDescription
otherProtectedResourcesSummary
Returns
TypeDescription
ProtectedResourcesSummary.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ProtectedResourcesSummary.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ProtectedResourcesSummary.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ProtectedResourcesSummary.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides

putAllCloudProducts(Map<String,Long> values)

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;

Parameter
NameDescription
valuesMap<String,java.lang.Long>
Returns
TypeDescription
ProtectedResourcesSummary.Builder

putAllLocations(Map<String,Long> values)

public ProtectedResourcesSummary.Builder putAllLocations(Map<String,Long> values)

The number of resources protected by the key grouped by region.

map<string, int64> locations = 4;

Parameter
NameDescription
valuesMap<String,java.lang.Long>
Returns
TypeDescription
ProtectedResourcesSummary.Builder

putAllResourceTypes(Map<String,Long> values)

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;

Parameter
NameDescription
valuesMap<String,java.lang.Long>
Returns
TypeDescription
ProtectedResourcesSummary.Builder

putCloudProducts(String key, long value)

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;

Parameters
NameDescription
keyString
valuelong
Returns
TypeDescription
ProtectedResourcesSummary.Builder

putLocations(String key, long value)

public ProtectedResourcesSummary.Builder putLocations(String key, long value)

The number of resources protected by the key grouped by region.

map<string, int64> locations = 4;

Parameters
NameDescription
keyString
valuelong
Returns
TypeDescription
ProtectedResourcesSummary.Builder

putResourceTypes(String key, long value)

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;

Parameters
NameDescription
keyString
valuelong
Returns
TypeDescription
ProtectedResourcesSummary.Builder

removeCloudProducts(String key)

public ProtectedResourcesSummary.Builder removeCloudProducts(String key)

The number of resources protected by the key grouped by Cloud product.

map<string, int64> cloud_products = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
ProtectedResourcesSummary.Builder

removeLocations(String key)

public ProtectedResourcesSummary.Builder removeLocations(String key)

The number of resources protected by the key grouped by region.

map<string, int64> locations = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
ProtectedResourcesSummary.Builder

removeResourceTypes(String key)

public ProtectedResourcesSummary.Builder removeResourceTypes(String key)

The number of resources protected by the key grouped by resource type.

map<string, int64> resource_types = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
ProtectedResourcesSummary.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ProtectedResourcesSummary.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides

setName(String value)

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;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
ProtectedResourcesSummary.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ProtectedResourcesSummary.Builder setNameBytes(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;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
ProtectedResourcesSummary.Builder

This builder for chaining.

setProjectCount(int value)

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;

Parameter
NameDescription
valueint

The projectCount to set.

Returns
TypeDescription
ProtectedResourcesSummary.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ProtectedResourcesSummary.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides

setResourceCount(long value)

public ProtectedResourcesSummary.Builder setResourceCount(long value)

The total number of protected resources in the same Cloud organization as the key.

int64 resource_count = 1;

Parameter
NameDescription
valuelong

The resourceCount to set.

Returns
TypeDescription
ProtectedResourcesSummary.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ProtectedResourcesSummary.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ProtectedResourcesSummary.Builder
Overrides