Class Endpoint (2.50.0)

public final class Endpoint extends GeneratedMessageV3 implements EndpointOrBuilder

Endpoint describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics.

Example:

 type: google.api.Service
 name: library-example.googleapis.com
 endpoints:
   # Declares network address <code>https://library-example.googleapis.com</code>
   # for service <code>library-example.googleapis.com</code>. The <code>https</code> scheme
   # is implicit for all service endpoints. Other schemes may be
   # supported in the future.
 - name: library-example.googleapis.com
   allow_cors: false
 - name: content-staging-library-example.googleapis.com
   # Allows HTTP OPTIONS calls to be passed to the API frontend, for it
   # to decide whether the subsequent cross-origin request is allowed
   # to proceed.
   allow_cors: true

Protobuf type google.api.Endpoint

Implements

EndpointOrBuilder

Static Fields

ALIASES_FIELD_NUMBER

public static final int ALIASES_FIELD_NUMBER
Field Value
Type Description
int

ALLOW_CORS_FIELD_NUMBER

public static final int ALLOW_CORS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

TARGET_FIELD_NUMBER

public static final int TARGET_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Endpoint getDefaultInstance()
Returns
Type Description
Endpoint

getDescriptor()

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

newBuilder()

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

newBuilder(Endpoint prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAliases(int index)

public String getAliases(int index)

Aliases for this endpoint, these will be served by the same UrlMap as the parent endpoint, and will be provisioned in the GCP stack for the Regional Endpoints.

repeated string aliases = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The aliases at the given index.

getAliasesBytes(int index)

public ByteString getAliasesBytes(int index)

Aliases for this endpoint, these will be served by the same UrlMap as the parent endpoint, and will be provisioned in the GCP stack for the Regional Endpoints.

repeated string aliases = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the aliases at the given index.

getAliasesCount()

public int getAliasesCount()

Aliases for this endpoint, these will be served by the same UrlMap as the parent endpoint, and will be provisioned in the GCP stack for the Regional Endpoints.

repeated string aliases = 2;

Returns
Type Description
int

The count of aliases.

getAliasesList()

public ProtocolStringList getAliasesList()

Aliases for this endpoint, these will be served by the same UrlMap as the parent endpoint, and will be provisioned in the GCP stack for the Regional Endpoints.

repeated string aliases = 2;

Returns
Type Description
ProtocolStringList

A list containing the aliases.

getAllowCors()

public boolean getAllowCors()

Allowing CORS, aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.

bool allow_cors = 5;

Returns
Type Description
boolean

The allowCors.

getDefaultInstanceForType()

public Endpoint getDefaultInstanceForType()
Returns
Type Description
Endpoint

getName()

public String getName()

The canonical name of this endpoint.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The canonical name of this endpoint.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTarget()

public String getTarget()

The specification of an Internet routable address of API frontend that will handle requests to this API Endpoint. It should be either a valid IPv4 address or a fully-qualified domain name. For example, "8.8.8.8" or "myservice.appspot.com".

string target = 101;

Returns
Type Description
String

The target.

getTargetBytes()

public ByteString getTargetBytes()

The specification of an Internet routable address of API frontend that will handle requests to this API Endpoint. It should be either a valid IPv4 address or a fully-qualified domain name. For example, "8.8.8.8" or "myservice.appspot.com".

string target = 101;

Returns
Type Description
ByteString

The bytes for target.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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