public static final class ResourceMetadata.Builder extends GeneratedMessage.Builder<ResourceMetadata.Builder> implements ResourceMetadataOrBuilderStandardized resource metadata common to all compute resources.
Protobuf type google.cloud.compute.v1.ResourceMetadata
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > ResourceMetadata.BuilderImplements
ResourceMetadataOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public ResourceMetadata build()| Returns | |
|---|---|
| Type | Description |
ResourceMetadata |
|
buildPartial()
public ResourceMetadata buildPartial()| Returns | |
|---|---|
| Type | Description |
ResourceMetadata |
|
clear()
public ResourceMetadata.Builder clear()| Returns | |
|---|---|
| Type | Description |
ResourceMetadata.Builder |
|
clearApiVersion()
public ResourceMetadata.Builder clearApiVersion() The version of the API interface that this resource was retrieved through.
For example, "2025-01-01" or "2025-01-01-preview".
optional string api_version = 476021683;
| Returns | |
|---|---|
| Type | Description |
ResourceMetadata.Builder |
This builder for chaining. |
clearResourceType()
public ResourceMetadata.Builder clearResourceType() The canonical resource type name in the format of a resource type
as defined by AIP-123.
For example, "compute.googleapis.com/Instance".
optional string resource_type = 442752203;
| Returns | |
|---|---|
| Type | Description |
ResourceMetadata.Builder |
This builder for chaining. |
getApiVersion()
public String getApiVersion() The version of the API interface that this resource was retrieved through.
For example, "2025-01-01" or "2025-01-01-preview".
optional string api_version = 476021683;
| Returns | |
|---|---|
| Type | Description |
String |
The apiVersion. |
getApiVersionBytes()
public ByteString getApiVersionBytes() The version of the API interface that this resource was retrieved through.
For example, "2025-01-01" or "2025-01-01-preview".
optional string api_version = 476021683;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for apiVersion. |
getDefaultInstanceForType()
public ResourceMetadata getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
ResourceMetadata |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getResourceType()
public String getResourceType() The canonical resource type name in the format of a resource type
as defined by AIP-123.
For example, "compute.googleapis.com/Instance".
optional string resource_type = 442752203;
| Returns | |
|---|---|
| Type | Description |
String |
The resourceType. |
getResourceTypeBytes()
public ByteString getResourceTypeBytes() The canonical resource type name in the format of a resource type
as defined by AIP-123.
For example, "compute.googleapis.com/Instance".
optional string resource_type = 442752203;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for resourceType. |
hasApiVersion()
public boolean hasApiVersion() The version of the API interface that this resource was retrieved through.
For example, "2025-01-01" or "2025-01-01-preview".
optional string api_version = 476021683;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the apiVersion field is set. |
hasResourceType()
public boolean hasResourceType() The canonical resource type name in the format of a resource type
as defined by AIP-123.
For example, "compute.googleapis.com/Instance".
optional string resource_type = 442752203;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the resourceType field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(ResourceMetadata other)
public ResourceMetadata.Builder mergeFrom(ResourceMetadata other)| Parameter | |
|---|---|
| Name | Description |
other |
ResourceMetadata |
| Returns | |
|---|---|
| Type | Description |
ResourceMetadata.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ResourceMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ResourceMetadata.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public ResourceMetadata.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
ResourceMetadata.Builder |
|
setApiVersion(String value)
public ResourceMetadata.Builder setApiVersion(String value) The version of the API interface that this resource was retrieved through.
For example, "2025-01-01" or "2025-01-01-preview".
optional string api_version = 476021683;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe apiVersion to set. |
| Returns | |
|---|---|
| Type | Description |
ResourceMetadata.Builder |
This builder for chaining. |
setApiVersionBytes(ByteString value)
public ResourceMetadata.Builder setApiVersionBytes(ByteString value) The version of the API interface that this resource was retrieved through.
For example, "2025-01-01" or "2025-01-01-preview".
optional string api_version = 476021683;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for apiVersion to set. |
| Returns | |
|---|---|
| Type | Description |
ResourceMetadata.Builder |
This builder for chaining. |
setResourceType(String value)
public ResourceMetadata.Builder setResourceType(String value) The canonical resource type name in the format of a resource type
as defined by AIP-123.
For example, "compute.googleapis.com/Instance".
optional string resource_type = 442752203;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe resourceType to set. |
| Returns | |
|---|---|
| Type | Description |
ResourceMetadata.Builder |
This builder for chaining. |
setResourceTypeBytes(ByteString value)
public ResourceMetadata.Builder setResourceTypeBytes(ByteString value) The canonical resource type name in the format of a resource type
as defined by AIP-123.
For example, "compute.googleapis.com/Instance".
optional string resource_type = 442752203;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for resourceType to set. |
| Returns | |
|---|---|
| Type | Description |
ResourceMetadata.Builder |
This builder for chaining. |