Class Endpoint.Builder (2.48.0)

public static final class Endpoint.Builder extends GeneratedMessageV3.Builder<Endpoint.Builder> 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 Methods

getDescriptor()

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

Methods

addAliases(String value)

public Endpoint.Builder addAliases(String value)

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
value String

The aliases to add.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

addAliasesBytes(ByteString value)

public Endpoint.Builder addAliasesBytes(ByteString value)

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
value ByteString

The bytes of the aliases to add.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

addAllAliases(Iterable<String> values)

public Endpoint.Builder addAllAliases(Iterable<String> values)

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
values Iterable<String>

The aliases to add.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Endpoint.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Endpoint.Builder
Overrides

build()

public Endpoint build()
Returns
Type Description
Endpoint

buildPartial()

public Endpoint buildPartial()
Returns
Type Description
Endpoint

clear()

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

clearAliases()

public Endpoint.Builder clearAliases()

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
Endpoint.Builder

This builder for chaining.

clearAllowCors()

public Endpoint.Builder clearAllowCors()

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
Endpoint.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Endpoint.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Endpoint.Builder
Overrides

clearName()

public Endpoint.Builder clearName()

The canonical name of this endpoint.

string name = 1;

Returns
Type Description
Endpoint.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Endpoint.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Endpoint.Builder
Overrides

clearTarget()

public Endpoint.Builder clearTarget()

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
Endpoint.Builder

This builder for chaining.

clone()

public Endpoint.Builder clone()
Returns
Type Description
Endpoint.Builder
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

getDescriptorForType()

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

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Endpoint other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Endpoint.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Endpoint.Builder
Overrides

setAliases(int index, String value)

public Endpoint.Builder setAliases(int index, String value)

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;

Parameters
Name Description
index int

The index to set the value at.

value String

The aliases to set.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

setAllowCors(boolean value)

public Endpoint.Builder setAllowCors(boolean value)

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;

Parameter
Name Description
value boolean

The allowCors to set.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Endpoint.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Endpoint.Builder
Overrides

setName(String value)

public Endpoint.Builder setName(String value)

The canonical name of this endpoint.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Endpoint.Builder setNameBytes(ByteString value)

The canonical name of this endpoint.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

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

public Endpoint.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Endpoint.Builder
Overrides

setTarget(String value)

public Endpoint.Builder setTarget(String value)

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;

Parameter
Name Description
value String

The target to set.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

setTargetBytes(ByteString value)

public Endpoint.Builder setTargetBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for target to set.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Endpoint.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Endpoint.Builder
Overrides