Class LocalResponsePolicy.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, LocalResponsePolicyOrBuilder, Cloneable
    Enclosing class:
    LocalResponsePolicy

    public static final class LocalResponsePolicy.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<LocalResponsePolicy.Builder>
    implements LocalResponsePolicyOrBuilder
     Custom response policy to serve a locally stored response to the
     downstream.
     
    Protobuf type envoy.extensions.http.custom_response.local_response_policy.v3.LocalResponsePolicy
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<LocalResponsePolicy.Builder>
      • clear

        public LocalResponsePolicy.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<LocalResponsePolicy.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.GeneratedMessageV3.Builder<LocalResponsePolicy.Builder>
      • getDefaultInstanceForType

        public LocalResponsePolicy getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

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

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

        public LocalResponsePolicy.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<LocalResponsePolicy.Builder>
      • setField

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

        public LocalResponsePolicy.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<LocalResponsePolicy.Builder>
      • clearOneof

        public LocalResponsePolicy.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<LocalResponsePolicy.Builder>
      • setRepeatedField

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

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

        public LocalResponsePolicy.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<LocalResponsePolicy.Builder>
      • isInitialized

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

        public LocalResponsePolicy.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                              throws 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<LocalResponsePolicy.Builder>
        Throws:
        IOException
      • hasBody

        public boolean hasBody()
         Optional new local reply body text. It will be used
         in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``.
         
        .envoy.config.core.v3.DataSource body = 1;
        Specified by:
        hasBody in interface LocalResponsePolicyOrBuilder
        Returns:
        Whether the body field is set.
      • getBody

        public DataSource getBody()
         Optional new local reply body text. It will be used
         in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``.
         
        .envoy.config.core.v3.DataSource body = 1;
        Specified by:
        getBody in interface LocalResponsePolicyOrBuilder
        Returns:
        The body.
      • setBody

        public LocalResponsePolicy.Builder setBody​(DataSource value)
         Optional new local reply body text. It will be used
         in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``.
         
        .envoy.config.core.v3.DataSource body = 1;
      • setBody

        public LocalResponsePolicy.Builder setBody​(DataSource.Builder builderForValue)
         Optional new local reply body text. It will be used
         in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``.
         
        .envoy.config.core.v3.DataSource body = 1;
      • mergeBody

        public LocalResponsePolicy.Builder mergeBody​(DataSource value)
         Optional new local reply body text. It will be used
         in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``.
         
        .envoy.config.core.v3.DataSource body = 1;
      • clearBody

        public LocalResponsePolicy.Builder clearBody()
         Optional new local reply body text. It will be used
         in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``.
         
        .envoy.config.core.v3.DataSource body = 1;
      • getBodyBuilder

        public DataSource.Builder getBodyBuilder()
         Optional new local reply body text. It will be used
         in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``.
         
        .envoy.config.core.v3.DataSource body = 1;
      • hasBodyFormat

        public boolean hasBodyFormat()
         Optional body format to be used for this response. If ``body_format`` is  not
         provided, and ``body`` is, the contents of ``body`` will be used to populate
         the body of the local reply without formatting.
         
        .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
        Specified by:
        hasBodyFormat in interface LocalResponsePolicyOrBuilder
        Returns:
        Whether the bodyFormat field is set.
      • getBodyFormat

        public SubstitutionFormatString getBodyFormat()
         Optional body format to be used for this response. If ``body_format`` is  not
         provided, and ``body`` is, the contents of ``body`` will be used to populate
         the body of the local reply without formatting.
         
        .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
        Specified by:
        getBodyFormat in interface LocalResponsePolicyOrBuilder
        Returns:
        The bodyFormat.
      • setBodyFormat

        public LocalResponsePolicy.Builder setBodyFormat​(SubstitutionFormatString value)
         Optional body format to be used for this response. If ``body_format`` is  not
         provided, and ``body`` is, the contents of ``body`` will be used to populate
         the body of the local reply without formatting.
         
        .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      • setBodyFormat

        public LocalResponsePolicy.Builder setBodyFormat​(SubstitutionFormatString.Builder builderForValue)
         Optional body format to be used for this response. If ``body_format`` is  not
         provided, and ``body`` is, the contents of ``body`` will be used to populate
         the body of the local reply without formatting.
         
        .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      • mergeBodyFormat

        public LocalResponsePolicy.Builder mergeBodyFormat​(SubstitutionFormatString value)
         Optional body format to be used for this response. If ``body_format`` is  not
         provided, and ``body`` is, the contents of ``body`` will be used to populate
         the body of the local reply without formatting.
         
        .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      • clearBodyFormat

        public LocalResponsePolicy.Builder clearBodyFormat()
         Optional body format to be used for this response. If ``body_format`` is  not
         provided, and ``body`` is, the contents of ``body`` will be used to populate
         the body of the local reply without formatting.
         
        .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      • getBodyFormatBuilder

        public SubstitutionFormatString.Builder getBodyFormatBuilder()
         Optional body format to be used for this response. If ``body_format`` is  not
         provided, and ``body`` is, the contents of ``body`` will be used to populate
         the body of the local reply without formatting.
         
        .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      • getBodyFormatOrBuilder

        public SubstitutionFormatStringOrBuilder getBodyFormatOrBuilder()
         Optional body format to be used for this response. If ``body_format`` is  not
         provided, and ``body`` is, the contents of ``body`` will be used to populate
         the body of the local reply without formatting.
         
        .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
        Specified by:
        getBodyFormatOrBuilder in interface LocalResponsePolicyOrBuilder
      • hasStatusCode

        public boolean hasStatusCode()
         The new response status code if specified.
         
        .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
        Specified by:
        hasStatusCode in interface LocalResponsePolicyOrBuilder
        Returns:
        Whether the statusCode field is set.
      • getStatusCode

        public com.google.protobuf.UInt32Value getStatusCode()
         The new response status code if specified.
         
        .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
        Specified by:
        getStatusCode in interface LocalResponsePolicyOrBuilder
        Returns:
        The statusCode.
      • setStatusCode

        public LocalResponsePolicy.Builder setStatusCode​(com.google.protobuf.UInt32Value value)
         The new response status code if specified.
         
        .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
      • setStatusCode

        public LocalResponsePolicy.Builder setStatusCode​(com.google.protobuf.UInt32Value.Builder builderForValue)
         The new response status code if specified.
         
        .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
      • mergeStatusCode

        public LocalResponsePolicy.Builder mergeStatusCode​(com.google.protobuf.UInt32Value value)
         The new response status code if specified.
         
        .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
      • clearStatusCode

        public LocalResponsePolicy.Builder clearStatusCode()
         The new response status code if specified.
         
        .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
      • getStatusCodeBuilder

        public com.google.protobuf.UInt32Value.Builder getStatusCodeBuilder()
         The new response status code if specified.
         
        .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
      • getStatusCodeOrBuilder

        public com.google.protobuf.UInt32ValueOrBuilder getStatusCodeOrBuilder()
         The new response status code if specified.
         
        .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
        Specified by:
        getStatusCodeOrBuilder in interface LocalResponsePolicyOrBuilder
      • getResponseHeadersToAddList

        public List<HeaderValueOption> getResponseHeadersToAddList()
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
        Specified by:
        getResponseHeadersToAddList in interface LocalResponsePolicyOrBuilder
      • getResponseHeadersToAddCount

        public int getResponseHeadersToAddCount()
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
        Specified by:
        getResponseHeadersToAddCount in interface LocalResponsePolicyOrBuilder
      • getResponseHeadersToAdd

        public HeaderValueOption getResponseHeadersToAdd​(int index)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
        Specified by:
        getResponseHeadersToAdd in interface LocalResponsePolicyOrBuilder
      • setResponseHeadersToAdd

        public LocalResponsePolicy.Builder setResponseHeadersToAdd​(int index,
                                                                   HeaderValueOption value)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • setResponseHeadersToAdd

        public LocalResponsePolicy.Builder setResponseHeadersToAdd​(int index,
                                                                   HeaderValueOption.Builder builderForValue)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • addResponseHeadersToAdd

        public LocalResponsePolicy.Builder addResponseHeadersToAdd​(HeaderValueOption value)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • addResponseHeadersToAdd

        public LocalResponsePolicy.Builder addResponseHeadersToAdd​(int index,
                                                                   HeaderValueOption value)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • addResponseHeadersToAdd

        public LocalResponsePolicy.Builder addResponseHeadersToAdd​(HeaderValueOption.Builder builderForValue)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • addResponseHeadersToAdd

        public LocalResponsePolicy.Builder addResponseHeadersToAdd​(int index,
                                                                   HeaderValueOption.Builder builderForValue)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • addAllResponseHeadersToAdd

        public LocalResponsePolicy.Builder addAllResponseHeadersToAdd​(Iterable<? extends HeaderValueOption> values)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • clearResponseHeadersToAdd

        public LocalResponsePolicy.Builder clearResponseHeadersToAdd()
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • removeResponseHeadersToAdd

        public LocalResponsePolicy.Builder removeResponseHeadersToAdd​(int index)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • getResponseHeadersToAddBuilder

        public HeaderValueOption.Builder getResponseHeadersToAddBuilder​(int index)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • getResponseHeadersToAddOrBuilder

        public HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder​(int index)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
        Specified by:
        getResponseHeadersToAddOrBuilder in interface LocalResponsePolicyOrBuilder
      • getResponseHeadersToAddOrBuilderList

        public List<? extends HeaderValueOptionOrBuilder> getResponseHeadersToAddOrBuilderList()
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
        Specified by:
        getResponseHeadersToAddOrBuilderList in interface LocalResponsePolicyOrBuilder
      • addResponseHeadersToAddBuilder

        public HeaderValueOption.Builder addResponseHeadersToAddBuilder()
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • addResponseHeadersToAddBuilder

        public HeaderValueOption.Builder addResponseHeadersToAddBuilder​(int index)
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • getResponseHeadersToAddBuilderList

        public List<HeaderValueOption.Builder> getResponseHeadersToAddBuilderList()
         HTTP headers to add to the response. This allows the
         response policy to append, to add or to override headers of
         the original response for local body, or the custom response from the
         remote body, before it is sent to a downstream client.
         
        repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      • setUnknownFields

        public final LocalResponsePolicy.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<LocalResponsePolicy.Builder>
      • mergeUnknownFields

        public final LocalResponsePolicy.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<LocalResponsePolicy.Builder>