Class Gateway.Builder (2.18.0)

publicstaticfinalclass Gateway.BuilderextendsGeneratedMessageV3.Builder<Gateway.Builder>implementsGatewayOrBuilder

A Gateway is an API-aware HTTP proxy. It performs API-Method and/or API-Consumer specific actions based on an API Config such as authentication, policy enforcement, and backend selection.

Protobuf type google.cloud.apigateway.v1.Gateway

Implements

GatewayOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicGateway.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Gateway.Builder
Overrides

build()

publicGatewaybuild()
Returns
Type Description
Gateway

buildPartial()

publicGatewaybuildPartial()
Returns
Type Description
Gateway

clear()

publicGateway.Builderclear()
Returns
Type Description
Gateway.Builder
Overrides

clearApiConfig()

publicGateway.BuilderclearApiConfig()

Required. Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}

string api_config = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
Gateway.Builder

This builder for chaining.

clearCreateTime()

publicGateway.BuilderclearCreateTime()

Output only. Created time.

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

Returns
Type Description
Gateway.Builder

clearDefaultHostname()

publicGateway.BuilderclearDefaultHostname()

Output only. The default API Gateway host name of the form {gateway_id}-{hash}.{region_code}.gateway.dev.

string default_hostname = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Gateway.Builder

This builder for chaining.

clearDisplayName()

publicGateway.BuilderclearDisplayName()

Optional. Display name.

string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Gateway.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicGateway.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Gateway.Builder
Overrides

clearLabels()

publicGateway.BuilderclearLabels()
Returns
Type Description
Gateway.Builder

clearName()

publicGateway.BuilderclearName()

Output only. Resource name of the Gateway. Format: projects/{project}/locations/{location}/gateways/{gateway}

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

Returns
Type Description
Gateway.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicGateway.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Gateway.Builder
Overrides

clearState()

publicGateway.BuilderclearState()

Output only. The current state of the Gateway.

.google.cloud.apigateway.v1.Gateway.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Gateway.Builder

This builder for chaining.

clearUpdateTime()

publicGateway.BuilderclearUpdateTime()

Output only. Updated time.

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

Returns
Type Description
Gateway.Builder

clone()

publicGateway.Builderclone()
Returns
Type Description
Gateway.Builder
Overrides

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getApiConfig()

publicStringgetApiConfig()

Required. Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}

string api_config = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The apiConfig.

getApiConfigBytes()

publicByteStringgetApiConfigBytes()

Required. Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}

string api_config = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for apiConfig.

getCreateTime()

publicTimestampgetCreateTime()

Output only. Created time.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

publicTimestamp.BuildergetCreateTimeBuilder()

Output only. Created time.

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

Returns
Type Description
Builder

getCreateTimeOrBuilder()

publicTimestampOrBuildergetCreateTimeOrBuilder()

Output only. Created time.

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

Returns
Type Description
TimestampOrBuilder

getDefaultHostname()

publicStringgetDefaultHostname()

Output only. The default API Gateway host name of the form {gateway_id}-{hash}.{region_code}.gateway.dev.

string default_hostname = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The defaultHostname.

getDefaultHostnameBytes()

publicByteStringgetDefaultHostnameBytes()

Output only. The default API Gateway host name of the form {gateway_id}-{hash}.{region_code}.gateway.dev.

string default_hostname = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for defaultHostname.

getDefaultInstanceForType()

publicGatewaygetDefaultInstanceForType()
Returns
Type Description
Gateway

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

publicStringgetDisplayName()

Optional. Display name.

string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

publicByteStringgetDisplayNameBytes()

Optional. Display name.

string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for displayName.

getLabels()

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

publicintgetLabelsCount()

Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

publicMap<String,String>getLabelsMap()

Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

publicStringgetLabelsOrDefault(Stringkey,StringdefaultValue)

Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels()

publicMap<String,String>getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

publicStringgetName()

Output only. Resource name of the Gateway. Format: projects/{project}/locations/{location}/gateways/{gateway}

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

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

Output only. Resource name of the Gateway. Format: projects/{project}/locations/{location}/gateways/{gateway}

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

Returns
Type Description
ByteString

The bytes for name.

getState()

publicGateway.StategetState()

Output only. The current state of the Gateway.

.google.cloud.apigateway.v1.Gateway.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Gateway.State

The state.

getStateValue()

publicintgetStateValue()

Output only. The current state of the Gateway.

.google.cloud.apigateway.v1.Gateway.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getUpdateTime()

publicTimestampgetUpdateTime()

Output only. Updated time.

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

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

publicTimestamp.BuildergetUpdateTimeBuilder()

Output only. Updated time.

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

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

publicTimestampOrBuildergetUpdateTimeOrBuilder()

Output only. Updated time.

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

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

publicbooleanhasCreateTime()

Output only. Created time.

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

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

publicbooleanhasUpdateTime()

Output only. Updated time.

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

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

internalGetMutableMapField(int number)

protectedMapFieldinternalGetMutableMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

publicGateway.BuildermergeCreateTime(Timestampvalue)

Output only. Created time.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Gateway.Builder

mergeFrom(Gateway other)

publicGateway.BuildermergeFrom(Gatewayother)
Parameter
Name Description
other Gateway
Returns
Type Description
Gateway.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicGateway.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Gateway.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicGateway.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Gateway.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalGateway.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Gateway.Builder
Overrides

mergeUpdateTime(Timestamp value)

publicGateway.BuildermergeUpdateTime(Timestampvalue)

Output only. Updated time.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Gateway.Builder

putAllLabels(Map<String,String> values)

publicGateway.BuilderputAllLabels(Map<String,String>values)

Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
Gateway.Builder

putLabels(String key, String value)

publicGateway.BuilderputLabels(Stringkey,Stringvalue)

Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
Gateway.Builder

removeLabels(String key)

publicGateway.BuilderremoveLabels(Stringkey)

Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources

map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
Gateway.Builder

setApiConfig(String value)

publicGateway.BuildersetApiConfig(Stringvalue)

Required. Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}

string api_config = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The apiConfig to set.

Returns
Type Description
Gateway.Builder

This builder for chaining.

setApiConfigBytes(ByteString value)

publicGateway.BuildersetApiConfigBytes(ByteStringvalue)

Required. Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}

string api_config = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for apiConfig to set.

Returns
Type Description
Gateway.Builder

This builder for chaining.

setCreateTime(Timestamp value)

publicGateway.BuildersetCreateTime(Timestampvalue)

Output only. Created time.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Gateway.Builder

setCreateTime(Timestamp.Builder builderForValue)

publicGateway.BuildersetCreateTime(Timestamp.BuilderbuilderForValue)

Output only. Created time.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Gateway.Builder

setDefaultHostname(String value)

publicGateway.BuildersetDefaultHostname(Stringvalue)

Output only. The default API Gateway host name of the form {gateway_id}-{hash}.{region_code}.gateway.dev.

string default_hostname = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The defaultHostname to set.

Returns
Type Description
Gateway.Builder

This builder for chaining.

setDefaultHostnameBytes(ByteString value)

publicGateway.BuildersetDefaultHostnameBytes(ByteStringvalue)

Output only. The default API Gateway host name of the form {gateway_id}-{hash}.{region_code}.gateway.dev.

string default_hostname = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for defaultHostname to set.

Returns
Type Description
Gateway.Builder

This builder for chaining.

setDisplayName(String value)

publicGateway.BuildersetDisplayName(Stringvalue)

Optional. Display name.

string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Gateway.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

publicGateway.BuildersetDisplayNameBytes(ByteStringvalue)

Optional. Display name.

string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Gateway.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicGateway.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Gateway.Builder
Overrides

setName(String value)

publicGateway.BuildersetName(Stringvalue)

Output only. Resource name of the Gateway. Format: projects/{project}/locations/{location}/gateways/{gateway}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Gateway.Builder

This builder for chaining.

setNameBytes(ByteString value)

publicGateway.BuildersetNameBytes(ByteStringvalue)

Output only. Resource name of the Gateway. Format: projects/{project}/locations/{location}/gateways/{gateway}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Gateway.Builder

This builder for chaining.

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

publicGateway.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Gateway.Builder
Overrides

setState(Gateway.State value)

publicGateway.BuildersetState(Gateway.Statevalue)

Output only. The current state of the Gateway.

.google.cloud.apigateway.v1.Gateway.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Gateway.State

The state to set.

Returns
Type Description
Gateway.Builder

This builder for chaining.

setStateValue(int value)

publicGateway.BuildersetStateValue(intvalue)

Output only. The current state of the Gateway.

.google.cloud.apigateway.v1.Gateway.State state = 7 [(.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
Gateway.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalGateway.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Gateway.Builder
Overrides

setUpdateTime(Timestamp value)

publicGateway.BuildersetUpdateTime(Timestampvalue)

Output only. Updated time.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Gateway.Builder

setUpdateTime(Timestamp.Builder builderForValue)

publicGateway.BuildersetUpdateTime(Timestamp.BuilderbuilderForValue)

Output only. Updated time.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Gateway.Builder

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.