Class Gateway (2.74.0)

publicfinalclass GatewayextendsGeneratedMessageV3implementsGatewayOrBuilder

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.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

API_CONFIG_FIELD_NUMBER

publicstaticfinalintAPI_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

publicstaticfinalintCREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DEFAULT_HOSTNAME_FIELD_NUMBER

publicstaticfinalintDEFAULT_HOSTNAME_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

publicstaticfinalintDISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

publicstaticfinalintLABELS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

publicstaticfinalintNAME_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

publicstaticfinalintSTATE_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

publicstaticfinalintUPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticGatewaygetDefaultInstance()
Returns
Type Description
Gateway

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticGateway.BuildernewBuilder()
Returns
Type Description
Gateway.Builder

newBuilder(Gateway prototype)

publicstaticGateway.BuildernewBuilder(Gatewayprototype)
Parameter
Name Description
prototype Gateway
Returns
Type Description
Gateway.Builder

parseDelimitedFrom(InputStream input)

publicstaticGatewayparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Gateway
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticGatewayparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Gateway
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticGatewayparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Gateway
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticGatewayparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Gateway
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticGatewayparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Gateway
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticGatewayparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Gateway
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticGatewayparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Gateway
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticGatewayparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Gateway
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticGatewayparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Gateway
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticGatewayparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Gateway
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticGatewayparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Gateway
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticGatewayparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Gateway
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<Gateway>parser()
Returns
Type Description
Parser<Gateway>

Methods

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

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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.

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

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() (deprecated)

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

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.

getParserForType()

publicParser<Gateway>getParserForType()
Returns
Type Description
Parser<Gateway>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

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

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicGateway.BuildernewBuilderForType()
Returns
Type Description
Gateway.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedGateway.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Gateway.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicGateway.BuildertoBuilder()
Returns
Type Description
Gateway.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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.