Class Endpoint.Builder

  • All Implemented Interfaces:
    EndpointOrBuilder, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    Endpoint

    public static final class Endpoint.Builder
    extends com.google.protobuf.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 `https://library-example.googleapis.com`
           # for service `library-example.googleapis.com`. The `https` 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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Endpoint.Builder addAliases​(java.lang.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.
      Endpoint.Builder addAliasesBytes​(com.google.protobuf.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.
      Endpoint.Builder addAllAliases​(java.lang.Iterable<java.lang.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.
      Endpoint.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)  
      Endpoint build()  
      Endpoint buildPartial()  
      Endpoint.Builder clear()  
      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.
      Endpoint.Builder clearAllowCors()
      Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests.
      Endpoint.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)  
      Endpoint.Builder clearName()
      The canonical name of this endpoint.
      Endpoint.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)  
      Endpoint.Builder clearTarget()
      The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).
      Endpoint.Builder clone()  
      java.lang.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.
      com.google.protobuf.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.
      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.
      com.google.protobuf.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.
      boolean getAllowCors()
      Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests.
      Endpoint getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      java.lang.String getName()
      The canonical name of this endpoint.
      com.google.protobuf.ByteString getNameBytes()
      The canonical name of this endpoint.
      java.lang.String getTarget()
      The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).
      com.google.protobuf.ByteString getTargetBytes()
      The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      Endpoint.Builder mergeFrom​(Endpoint other)  
      Endpoint.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      Endpoint.Builder mergeFrom​(com.google.protobuf.Message other)  
      Endpoint.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      Endpoint.Builder setAliases​(int index, java.lang.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.
      Endpoint.Builder setAllowCors​(boolean value)
      Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests.
      Endpoint.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)  
      Endpoint.Builder setName​(java.lang.String value)
      The canonical name of this endpoint.
      Endpoint.Builder setNameBytes​(com.google.protobuf.ByteString value)
      The canonical name of this endpoint.
      Endpoint.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)  
      Endpoint.Builder setTarget​(java.lang.String value)
      The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).
      Endpoint.Builder setTargetBytes​(com.google.protobuf.ByteString value)
      The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).
      Endpoint.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

        getParentForChildren
      • Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableBuilder

        addExtension, clearExtension, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtensionCount, getField, getFieldBuilder, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, hasExtension, hasField, mergeExtensionFields, newBuilderForField, parseUnknownField, setExtension, setExtension
      • Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

        getOneofFieldDescriptor, getUnknownFields, getUnknownFieldSetBuilder, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, onBuilt, onChanged, setUnknownFieldSetBuilder, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

        mergeFrom
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Overrides:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Endpoint.Builder>
      • clear

        public Endpoint.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Endpoint.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Endpoint.Builder>
      • getDefaultInstanceForType

        public Endpoint getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Endpoint build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Endpoint buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Endpoint.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Endpoint.Builder>
      • setField

        public Endpoint.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                         java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Endpoint.Builder>
      • clearField

        public Endpoint.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Endpoint.Builder>
      • clearOneof

        public Endpoint.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Endpoint.Builder>
      • setRepeatedField

        public Endpoint.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 int index,
                                                 java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Endpoint.Builder>
      • addRepeatedField

        public Endpoint.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Endpoint.Builder>
      • mergeFrom

        public Endpoint.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Endpoint.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,​Endpoint.Builder>
      • mergeFrom

        public Endpoint.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Endpoint.Builder>
        Throws:
        java.io.IOException
      • getName

        public java.lang.String getName()
         The canonical name of this endpoint.
         
        string name = 1;
        Specified by:
        getName in interface EndpointOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The canonical name of this endpoint.
         
        string name = 1;
        Specified by:
        getNameBytes in interface EndpointOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Endpoint.Builder setName​(java.lang.String value)
         The canonical name of this endpoint.
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Endpoint.Builder clearName()
         The canonical name of this endpoint.
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Endpoint.Builder setNameBytes​(com.google.protobuf.ByteString value)
         The canonical name of this endpoint.
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getAliasesList

        public com.google.protobuf.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;
        Specified by:
        getAliasesList in interface EndpointOrBuilder
        Returns:
        A list containing the aliases.
      • 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;
        Specified by:
        getAliasesCount in interface EndpointOrBuilder
        Returns:
        The count of aliases.
      • getAliases

        public java.lang.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;
        Specified by:
        getAliases in interface EndpointOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The aliases at the given index.
      • getAliasesBytes

        public com.google.protobuf.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;
        Specified by:
        getAliasesBytes in interface EndpointOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the aliases at the given index.
      • setAliases

        public Endpoint.Builder setAliases​(int index,
                                           java.lang.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:
        index - The index to set the value at.
        value - The aliases to set.
        Returns:
        This builder for chaining.
      • addAliases

        public Endpoint.Builder addAliases​(java.lang.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:
        value - The aliases to add.
        Returns:
        This builder for chaining.
      • addAllAliases

        public Endpoint.Builder addAllAliases​(java.lang.Iterable<java.lang.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;
        Parameters:
        values - The aliases to add.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • addAliasesBytes

        public Endpoint.Builder addAliasesBytes​(com.google.protobuf.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;
        Parameters:
        value - The bytes of the aliases to add.
        Returns:
        This builder for chaining.
      • getTarget

        public java.lang.String getTarget()
         The specification of an Internet routable address of API frontend that will
         handle requests to this [API
         Endpoint](https://cloud.google.com/apis/design/glossary). 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;
        Specified by:
        getTarget in interface EndpointOrBuilder
        Returns:
        The target.
      • getTargetBytes

        public com.google.protobuf.ByteString getTargetBytes()
         The specification of an Internet routable address of API frontend that will
         handle requests to this [API
         Endpoint](https://cloud.google.com/apis/design/glossary). 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;
        Specified by:
        getTargetBytes in interface EndpointOrBuilder
        Returns:
        The bytes for target.
      • setTarget

        public Endpoint.Builder setTarget​(java.lang.String value)
         The specification of an Internet routable address of API frontend that will
         handle requests to this [API
         Endpoint](https://cloud.google.com/apis/design/glossary). 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;
        Parameters:
        value - The target to set.
        Returns:
        This builder for chaining.
      • clearTarget

        public Endpoint.Builder clearTarget()
         The specification of an Internet routable address of API frontend that will
         handle requests to this [API
         Endpoint](https://cloud.google.com/apis/design/glossary). 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:
        This builder for chaining.
      • setTargetBytes

        public Endpoint.Builder setTargetBytes​(com.google.protobuf.ByteString value)
         The specification of an Internet routable address of API frontend that will
         handle requests to this [API
         Endpoint](https://cloud.google.com/apis/design/glossary). 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;
        Parameters:
        value - The bytes for target to set.
        Returns:
        This builder for chaining.
      • getAllowCors

        public boolean getAllowCors()
         Allowing
         [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), 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;
        Specified by:
        getAllowCors in interface EndpointOrBuilder
        Returns:
        The allowCors.
      • setAllowCors

        public Endpoint.Builder setAllowCors​(boolean value)
         Allowing
         [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), 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;
        Parameters:
        value - The allowCors to set.
        Returns:
        This builder for chaining.
      • clearAllowCors

        public Endpoint.Builder clearAllowCors()
         Allowing
         [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), 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:
        This builder for chaining.
      • setUnknownFields

        public final Endpoint.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Endpoint.Builder>
      • mergeUnknownFields

        public final Endpoint.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Endpoint.Builder>