Class ServiceAgent.Builder (0.4.0)

public static final class ServiceAgent.Builder extends GeneratedMessage.Builder<ServiceAgent.Builder> implements ServiceAgentOrBuilder

Message describing ServiceAgent object

Protobuf type google.cloud.workloadidentity.v1.ServiceAgent

Static Methods

getDescriptor()

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

Methods

build()

public ServiceAgent build()
Returns
Type Description
ServiceAgent

buildPartial()

public ServiceAgent buildPartial()
Returns
Type Description
ServiceAgent

clear()

public ServiceAgent.Builder clear()
Returns
Type Description
ServiceAgent.Builder
Overrides

clearContainer()

public ServiceAgent.Builder clearContainer()

Optional. Name of the container that the service agent is associated with. For example:

  • projects/1234
  • folders/1234
  • organizations/2344

string container = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

clearName()

public ServiceAgent.Builder clearName()

Identifier. The name of the service agent resource

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

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

clearPrincipal()

public ServiceAgent.Builder clearPrincipal()

Optional. The principal identifier for the service agent. This identifier is used in allow policies to grant access to the service agent.

string principal = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

clearRole()

public ServiceAgent.Builder clearRole()

Optional. The role that should be granted to service agent on consumer project, if any. For example, "roles/aiplatform.serviceAgent".

string role = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

clearServiceProducer()

public ServiceAgent.Builder clearServiceProducer()

Optional. The service the agent belongs to. For example, bigquery.googleapis.com

string service_producer = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

clearState()

public ServiceAgent.Builder clearState()

Output only. Service agent state.

.google.cloud.workloadidentity.v1.ServiceAgent.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

getContainer()

public String getContainer()

Optional. Name of the container that the service agent is associated with. For example:

  • projects/1234
  • folders/1234
  • organizations/2344

string container = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The container.

getContainerBytes()

public ByteString getContainerBytes()

Optional. Name of the container that the service agent is associated with. For example:

  • projects/1234
  • folders/1234
  • organizations/2344

string container = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for container.

getDefaultInstanceForType()

public ServiceAgent getDefaultInstanceForType()
Returns
Type Description
ServiceAgent

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getName()

public String getName()

Identifier. The name of the service agent resource

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The name of the service agent resource

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

Returns
Type Description
ByteString

The bytes for name.

getPrincipal()

public String getPrincipal()

Optional. The principal identifier for the service agent. This identifier is used in allow policies to grant access to the service agent.

string principal = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The principal.

getPrincipalBytes()

public ByteString getPrincipalBytes()

Optional. The principal identifier for the service agent. This identifier is used in allow policies to grant access to the service agent.

string principal = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for principal.

getRole()

public String getRole()

Optional. The role that should be granted to service agent on consumer project, if any. For example, "roles/aiplatform.serviceAgent".

string role = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The role.

getRoleBytes()

public ByteString getRoleBytes()

Optional. The role that should be granted to service agent on consumer project, if any. For example, "roles/aiplatform.serviceAgent".

string role = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for role.

getServiceProducer()

public String getServiceProducer()

Optional. The service the agent belongs to. For example, bigquery.googleapis.com

string service_producer = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The serviceProducer.

getServiceProducerBytes()

public ByteString getServiceProducerBytes()

Optional. The service the agent belongs to. For example, bigquery.googleapis.com

string service_producer = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for serviceProducer.

getState()

public ServiceAgent.State getState()

Output only. Service agent state.

.google.cloud.workloadidentity.v1.ServiceAgent.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ServiceAgent.State

The state.

getStateValue()

public int getStateValue()

Output only. Service agent state.

.google.cloud.workloadidentity.v1.ServiceAgent.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ServiceAgent other)

public ServiceAgent.Builder mergeFrom(ServiceAgent other)
Parameter
Name Description
other ServiceAgent
Returns
Type Description
ServiceAgent.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ServiceAgent.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ServiceAgent.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ServiceAgent.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ServiceAgent.Builder
Overrides

setContainer(String value)

public ServiceAgent.Builder setContainer(String value)

Optional. Name of the container that the service agent is associated with. For example:

  • projects/1234
  • folders/1234
  • organizations/2344

string container = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The container to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setContainerBytes(ByteString value)

public ServiceAgent.Builder setContainerBytes(ByteString value)

Optional. Name of the container that the service agent is associated with. For example:

  • projects/1234
  • folders/1234
  • organizations/2344

string container = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for container to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setName(String value)

public ServiceAgent.Builder setName(String value)

Identifier. The name of the service agent resource

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ServiceAgent.Builder setNameBytes(ByteString value)

Identifier. The name of the service agent resource

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setPrincipal(String value)

public ServiceAgent.Builder setPrincipal(String value)

Optional. The principal identifier for the service agent. This identifier is used in allow policies to grant access to the service agent.

string principal = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The principal to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setPrincipalBytes(ByteString value)

public ServiceAgent.Builder setPrincipalBytes(ByteString value)

Optional. The principal identifier for the service agent. This identifier is used in allow policies to grant access to the service agent.

string principal = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for principal to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setRole(String value)

public ServiceAgent.Builder setRole(String value)

Optional. The role that should be granted to service agent on consumer project, if any. For example, "roles/aiplatform.serviceAgent".

string role = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The role to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setRoleBytes(ByteString value)

public ServiceAgent.Builder setRoleBytes(ByteString value)

Optional. The role that should be granted to service agent on consumer project, if any. For example, "roles/aiplatform.serviceAgent".

string role = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for role to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setServiceProducer(String value)

public ServiceAgent.Builder setServiceProducer(String value)

Optional. The service the agent belongs to. For example, bigquery.googleapis.com

string service_producer = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The serviceProducer to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setServiceProducerBytes(ByteString value)

public ServiceAgent.Builder setServiceProducerBytes(ByteString value)

Optional. The service the agent belongs to. For example, bigquery.googleapis.com

string service_producer = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for serviceProducer to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setState(ServiceAgent.State value)

public ServiceAgent.Builder setState(ServiceAgent.State value)

Output only. Service agent state.

.google.cloud.workloadidentity.v1.ServiceAgent.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ServiceAgent.State

The state to set.

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.

setStateValue(int value)

public ServiceAgent.Builder setStateValue(int value)

Output only. Service agent state.

.google.cloud.workloadidentity.v1.ServiceAgent.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
ServiceAgent.Builder

This builder for chaining.