Class Endpoint.Builder (2.38.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) (deprecated)

public Endpoint.Builder addAliases(String value)

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

The aliases to add.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

addAliasesBytes(ByteString value) (deprecated)

public Endpoint.Builder addAliasesBytes(ByteString value)

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

The bytes of the aliases to add.

Returns
Type Description
Endpoint.Builder

This builder for chaining.

addAllAliases(Iterable<String> values) (deprecated)

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

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

public Endpoint.Builder clearAliases()

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
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) (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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
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() (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
Type Description
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
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) (deprecated)

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

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];

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