Class WorkerPool (3.48.0)

public final class WorkerPool extends GeneratedMessageV3 implements WorkerPoolOrBuilder

Configuration for a WorkerPool.

Cloud Build owns and maintains a pool of workers for general use and have no access to a project's private network. By default, builds submitted to Cloud Build will use a worker from this pool.

If your build needs access to resources on a private network, create and use a WorkerPool to run your builds. Private WorkerPools give your builds access to any single VPC network that you administer, including any on-prem resources connected to that VPC network. For an overview of private pools, see Private pools overview.

Protobuf type google.devtools.cloudbuild.v1.WorkerPool

Implements

WorkerPoolOrBuilder

Static Fields

ANNOTATIONS_FIELD_NUMBER

public static final int ANNOTATIONS_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DELETE_TIME_FIELD_NUMBER

public static final int DELETE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PRIVATE_POOL_V1_CONFIG_FIELD_NUMBER

public static final int PRIVATE_POOL_V1_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

UID_FIELD_NUMBER

public static final int UID_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static WorkerPool getDefaultInstance()
Returns
Type Description
WorkerPool

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static WorkerPool.Builder newBuilder()
Returns
Type Description
WorkerPool.Builder

newBuilder(WorkerPool prototype)

public static WorkerPool.Builder newBuilder(WorkerPool prototype)
Parameter
Name Description
prototype WorkerPool
Returns
Type Description
WorkerPool.Builder

parseDelimitedFrom(InputStream input)

public static WorkerPool parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
WorkerPool
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WorkerPool parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkerPool
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static WorkerPool parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
WorkerPool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static WorkerPool parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkerPool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static WorkerPool parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
WorkerPool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static WorkerPool parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkerPool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static WorkerPool parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
WorkerPool
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static WorkerPool parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkerPool
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static WorkerPool parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
WorkerPool
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WorkerPool parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkerPool
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static WorkerPool parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
WorkerPool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static WorkerPool parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkerPool
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<WorkerPool> parser()
Returns
Type Description
Parser<WorkerPool>

Methods

containsAnnotations(String key)

public boolean containsAnnotations(String key)

User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 4;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAnnotations() (deprecated)

public Map<String,String> getAnnotations()

Use #getAnnotationsMap() instead.

Returns
Type Description
Map<String,String>

getAnnotationsCount()

public int getAnnotationsCount()

User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 4;

Returns
Type Description
int

getAnnotationsMap()

public Map<String,String> getAnnotationsMap()

User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 4;

Returns
Type Description
Map<String,String>

getAnnotationsOrDefault(String key, String defaultValue)

public String getAnnotationsOrDefault(String key, String defaultValue)

User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 4;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getAnnotationsOrThrow(String key)

public String getAnnotationsOrThrow(String key)

User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 4;

Parameter
Name Description
key String
Returns
Type Description
String

getConfigCase()

public WorkerPool.ConfigCase getConfigCase()
Returns
Type Description
WorkerPool.ConfigCase

getCreateTime()

public Timestamp getCreateTime()

Output only. Time at which the request to create the WorkerPool was received.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time at which the request to create the WorkerPool was received.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public WorkerPool getDefaultInstanceForType()
Returns
Type Description
WorkerPool

getDeleteTime()

public Timestamp getDeleteTime()

Output only. Time at which the request to delete the WorkerPool was received.

.google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The deleteTime.

getDeleteTimeOrBuilder()

public TimestampOrBuilder getDeleteTimeOrBuilder()

Output only. Time at which the request to delete the WorkerPool was received.

.google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDisplayName()

public String getDisplayName()

A user-specified, human-readable name for the WorkerPool. If provided, this value must be 1-63 characters.

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

A user-specified, human-readable name for the WorkerPool. If provided, this value must be 1-63 characters.

string display_name = 2;

Returns
Type Description
ByteString

The bytes for displayName.

getEtag()

public String getEtag()

Output only. Checksum computed by the server. May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding.

string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

Output only. Checksum computed by the server. May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding.

string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for etag.

getName()

public String getName()

Output only. The resource name of the WorkerPool, with format projects/{project}/locations/{location}/workerPools/{worker_pool}. The value of {worker_pool} is provided by worker_pool_id in CreateWorkerPool request and the value of {location} is determined by the endpoint accessed.

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name of the WorkerPool, with format projects/{project}/locations/{location}/workerPools/{worker_pool}. The value of {worker_pool} is provided by worker_pool_id in CreateWorkerPool request and the value of {location} is determined by the endpoint accessed.

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

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<WorkerPool> getParserForType()
Returns
Type Description
Parser<WorkerPool>
Overrides

getPrivatePoolV1Config()

public PrivatePoolV1Config getPrivatePoolV1Config()

Legacy Private Pool configuration.

.google.devtools.cloudbuild.v1.PrivatePoolV1Config private_pool_v1_config = 12;

Returns
Type Description
PrivatePoolV1Config

The privatePoolV1Config.

getPrivatePoolV1ConfigOrBuilder()

public PrivatePoolV1ConfigOrBuilder getPrivatePoolV1ConfigOrBuilder()

Legacy Private Pool configuration.

.google.devtools.cloudbuild.v1.PrivatePoolV1Config private_pool_v1_config = 12;

Returns
Type Description
PrivatePoolV1ConfigOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getState()

public WorkerPool.State getState()

Output only. WorkerPool state.

.google.devtools.cloudbuild.v1.WorkerPool.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
WorkerPool.State

The state.

getStateValue()

public int getStateValue()

Output only. WorkerPool state.

.google.devtools.cloudbuild.v1.WorkerPool.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getUid()

public String getUid()

Output only. A unique identifier for the WorkerPool.

string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The uid.

getUidBytes()

public ByteString getUidBytes()

Output only. A unique identifier for the WorkerPool.

string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for uid.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Time at which the request to update the WorkerPool was received.

.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Time at which the request to update the WorkerPool was received.

.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Time at which the request to create the WorkerPool was received.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasDeleteTime()

public boolean hasDeleteTime()

Output only. Time at which the request to delete the WorkerPool was received.

.google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the deleteTime field is set.

hasPrivatePoolV1Config()

public boolean hasPrivatePoolV1Config()

Legacy Private Pool configuration.

.google.devtools.cloudbuild.v1.PrivatePoolV1Config private_pool_v1_config = 12;

Returns
Type Description
boolean

Whether the privatePoolV1Config field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Time at which the request to update the WorkerPool was received.

.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public WorkerPool.Builder newBuilderForType()
Returns
Type Description
WorkerPool.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected WorkerPool.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
WorkerPool.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public WorkerPool.Builder toBuilder()
Returns
Type Description
WorkerPool.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException