Class Resource.Builder (0.9.0)

public static final class Resource.Builder extends GeneratedMessageV3.Builder<Resource.Builder> implements ResourceOrBuilder

Resource represents a Google Cloud Platform resource actuated by IM. Resources are child resources of Revisions.

Protobuf type google.cloud.config.v1.Resource

Implements

ResourceOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Resource build()
Returns
TypeDescription
Resource

buildPartial()

public Resource buildPartial()
Returns
TypeDescription
Resource

clear()

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

clearCaiAssets()

public Resource.Builder clearCaiAssets()
Returns
TypeDescription
Resource.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearIntent()

public Resource.Builder clearIntent()

Output only. Intent of the resource.

.google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Resource.Builder

This builder for chaining.

clearName()

public Resource.Builder clearName()

Output only. Resource name. Format: projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Resource.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearState()

public Resource.Builder clearState()

Output only. Current state of the resource.

.google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Resource.Builder

This builder for chaining.

clearTerraformInfo()

public Resource.Builder clearTerraformInfo()

Output only. Terraform-specific info if this resource was created using Terraform.

.google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Resource.Builder

clone()

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

containsCaiAssets(String key)

public boolean containsCaiAssets(String key)

Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types

map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCaiAssets() (deprecated)

public Map<String,ResourceCAIInfo> getCaiAssets()

Use #getCaiAssetsMap() instead.

Returns
TypeDescription
Map<String,ResourceCAIInfo>

getCaiAssetsCount()

public int getCaiAssetsCount()

Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types

map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

getCaiAssetsMap()

public Map<String,ResourceCAIInfo> getCaiAssetsMap()

Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types

map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Map<String,ResourceCAIInfo>

getCaiAssetsOrDefault(String key, ResourceCAIInfo defaultValue)

public ResourceCAIInfo getCaiAssetsOrDefault(String key, ResourceCAIInfo defaultValue)

Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types

map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
keyString
defaultValueResourceCAIInfo
Returns
TypeDescription
ResourceCAIInfo

getCaiAssetsOrThrow(String key)

public ResourceCAIInfo getCaiAssetsOrThrow(String key)

Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types

map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
keyString
Returns
TypeDescription
ResourceCAIInfo

getDefaultInstanceForType()

public Resource getDefaultInstanceForType()
Returns
TypeDescription
Resource

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getIntent()

public Resource.Intent getIntent()

Output only. Intent of the resource.

.google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Resource.Intent

The intent.

getIntentValue()

public int getIntentValue()

Output only. Intent of the resource.

.google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for intent.

getMutableCaiAssets() (deprecated)

public Map<String,ResourceCAIInfo> getMutableCaiAssets()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,ResourceCAIInfo>

getName()

public String getName()

Output only. Resource name. Format: projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Resource name. Format: projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for name.

getState()

public Resource.State getState()

Output only. Current state of the resource.

.google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Resource.State

The state.

getStateValue()

public int getStateValue()

Output only. Current state of the resource.

.google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

getTerraformInfo()

public ResourceTerraformInfo getTerraformInfo()

Output only. Terraform-specific info if this resource was created using Terraform.

.google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ResourceTerraformInfo

The terraformInfo.

getTerraformInfoBuilder()

public ResourceTerraformInfo.Builder getTerraformInfoBuilder()

Output only. Terraform-specific info if this resource was created using Terraform.

.google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ResourceTerraformInfo.Builder

getTerraformInfoOrBuilder()

public ResourceTerraformInfoOrBuilder getTerraformInfoOrBuilder()

Output only. Terraform-specific info if this resource was created using Terraform.

.google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ResourceTerraformInfoOrBuilder

hasTerraformInfo()

public boolean hasTerraformInfo()

Output only. Terraform-specific info if this resource was created using Terraform.

.google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the terraformInfo field is set.

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(Resource other)

public Resource.Builder mergeFrom(Resource other)
Parameter
NameDescription
otherResource
Returns
TypeDescription
Resource.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeTerraformInfo(ResourceTerraformInfo value)

public Resource.Builder mergeTerraformInfo(ResourceTerraformInfo value)

Output only. Terraform-specific info if this resource was created using Terraform.

.google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueResourceTerraformInfo
Returns
TypeDescription
Resource.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllCaiAssets(Map<String,ResourceCAIInfo> values)

public Resource.Builder putAllCaiAssets(Map<String,ResourceCAIInfo> values)

Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types

map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuesMap<String,ResourceCAIInfo>
Returns
TypeDescription
Resource.Builder

putCaiAssets(String key, ResourceCAIInfo value)

public Resource.Builder putCaiAssets(String key, ResourceCAIInfo value)

Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types

map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
keyString
valueResourceCAIInfo
Returns
TypeDescription
Resource.Builder

removeCaiAssets(String key)

public Resource.Builder removeCaiAssets(String key)

Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types

map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
keyString
Returns
TypeDescription
Resource.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setIntent(Resource.Intent value)

public Resource.Builder setIntent(Resource.Intent value)

Output only. Intent of the resource.

.google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueResource.Intent

The intent to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setIntentValue(int value)

public Resource.Builder setIntentValue(int value)

Output only. Intent of the resource.

.google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

The enum numeric value on the wire for intent to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setName(String value)

public Resource.Builder setName(String value)

Output only. Resource name. Format: projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Resource.Builder setNameBytes(ByteString value)

Output only. Resource name. Format: projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

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

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

setState(Resource.State value)

public Resource.Builder setState(Resource.State value)

Output only. Current state of the resource.

.google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueResource.State

The state to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setStateValue(int value)

public Resource.Builder setStateValue(int value)

Output only. Current state of the resource.

.google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

The enum numeric value on the wire for state to set.

Returns
TypeDescription
Resource.Builder

This builder for chaining.

setTerraformInfo(ResourceTerraformInfo value)

public Resource.Builder setTerraformInfo(ResourceTerraformInfo value)

Output only. Terraform-specific info if this resource was created using Terraform.

.google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueResourceTerraformInfo
Returns
TypeDescription
Resource.Builder

setTerraformInfo(ResourceTerraformInfo.Builder builderForValue)

public Resource.Builder setTerraformInfo(ResourceTerraformInfo.Builder builderForValue)

Output only. Terraform-specific info if this resource was created using Terraform.

.google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueResourceTerraformInfo.Builder
Returns
TypeDescription
Resource.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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