Class Endpoint (2.25.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
TypeDescription
int

ALLOW_CORS_FIELD_NUMBER

public static final int ALLOW_CORS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

TARGET_FIELD_NUMBER

public static final int TARGET_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Endpoint getDefaultInstance()
Returns
TypeDescription
Endpoint

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Endpoint.Builder newBuilder()
Returns
TypeDescription
Endpoint.Builder

newBuilder(Endpoint prototype)

public static Endpoint.Builder newBuilder(Endpoint prototype)
Parameter
NameDescription
prototypeEndpoint
Returns
TypeDescription
Endpoint.Builder

parseDelimitedFrom(InputStream input)

public static Endpoint parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Endpoint parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Endpoint parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Endpoint parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Endpoint parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Endpoint parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Endpoint parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Endpoint parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Endpoint parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Endpoint parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Endpoint parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Endpoint parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Endpoint
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Endpoint> parser()
Returns
TypeDescription
Parser<Endpoint>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAliases(int index) (deprecated)

public String getAliases(int index)

Deprecated. google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56

Unimplemented. Dot not use.

DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases.

Additional names that this endpoint will be hosted on.

repeated string aliases = 2 [deprecated = true];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The aliases at the given index.

getAliasesBytes(int index) (deprecated)

public ByteString getAliasesBytes(int index)

Deprecated. google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56

Unimplemented. Dot not use.

DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases.

Additional names that this endpoint will be hosted on.

repeated string aliases = 2 [deprecated = true];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the aliases at the given index.

getAliasesCount() (deprecated)

public int getAliasesCount()

Deprecated. google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56

Unimplemented. Dot not use.

DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases.

Additional names that this endpoint will be hosted on.

repeated string aliases = 2 [deprecated = true];

Returns
TypeDescription
int

The count of aliases.

getAliasesList() (deprecated)

public ProtocolStringList getAliasesList()

Deprecated. google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56

Unimplemented. Dot not use.

DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases.

Additional names that this endpoint will be hosted on.

repeated string aliases = 2 [deprecated = true];

Returns
TypeDescription
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
TypeDescription
boolean

The allowCors.

getDefaultInstanceForType()

public Endpoint getDefaultInstanceForType()
Returns
TypeDescription
Endpoint

getName()

public String getName()

The canonical name of this endpoint.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The canonical name of this endpoint.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Endpoint> getParserForType()
Returns
TypeDescription
Parser<Endpoint>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for target.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Endpoint.Builder newBuilderForType()
Returns
TypeDescription
Endpoint.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Endpoint.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Endpoint.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Endpoint.Builder toBuilder()
Returns
TypeDescription
Endpoint.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException