Class DiscoveryResponse.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, DiscoveryResponseOrBuilder, java.lang.Cloneable
    Enclosing class:
    DiscoveryResponse

    public static final class DiscoveryResponse.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<DiscoveryResponse.Builder>
    implements DiscoveryResponseOrBuilder
     [#next-free-field: 7]
     
    Protobuf type envoy.service.discovery.v3.DiscoveryResponse
    • Field Detail

      • bitField0_

        private int bitField0_
      • versionInfo_

        private java.lang.Object versionInfo_
      • resources_

        private java.util.List<com.google.protobuf.Any> resources_
      • resourcesBuilder_

        private com.google.protobuf.RepeatedFieldBuilder<com.google.protobuf.Any,​com.google.protobuf.Any.Builder,​com.google.protobuf.AnyOrBuilder> resourcesBuilder_
      • canary_

        private boolean canary_
      • typeUrl_

        private java.lang.Object typeUrl_
      • nonce_

        private java.lang.Object nonce_
    • Constructor Detail

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.AbstractMessage.BuilderParent parent)
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<DiscoveryResponse.Builder>
      • maybeForceBuilderInitialization

        private void maybeForceBuilderInitialization()
      • clear

        public DiscoveryResponse.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.GeneratedMessage.Builder<DiscoveryResponse.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<DiscoveryResponse.Builder>
      • getDefaultInstanceForType

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

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

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

        private void buildPartialRepeatedFields​(DiscoveryResponse result)
      • mergeFrom

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

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

        public DiscoveryResponse.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<DiscoveryResponse.Builder>
        Throws:
        java.io.IOException
      • getVersionInfo

        public java.lang.String getVersionInfo()
         The version of the response data.
         
        string version_info = 1;
        Specified by:
        getVersionInfo in interface DiscoveryResponseOrBuilder
        Returns:
        The versionInfo.
      • getVersionInfoBytes

        public com.google.protobuf.ByteString getVersionInfoBytes()
         The version of the response data.
         
        string version_info = 1;
        Specified by:
        getVersionInfoBytes in interface DiscoveryResponseOrBuilder
        Returns:
        The bytes for versionInfo.
      • setVersionInfo

        public DiscoveryResponse.Builder setVersionInfo​(java.lang.String value)
         The version of the response data.
         
        string version_info = 1;
        Parameters:
        value - The versionInfo to set.
        Returns:
        This builder for chaining.
      • clearVersionInfo

        public DiscoveryResponse.Builder clearVersionInfo()
         The version of the response data.
         
        string version_info = 1;
        Returns:
        This builder for chaining.
      • setVersionInfoBytes

        public DiscoveryResponse.Builder setVersionInfoBytes​(com.google.protobuf.ByteString value)
         The version of the response data.
         
        string version_info = 1;
        Parameters:
        value - The bytes for versionInfo to set.
        Returns:
        This builder for chaining.
      • ensureResourcesIsMutable

        private void ensureResourcesIsMutable()
      • getResourcesList

        public java.util.List<com.google.protobuf.Any> getResourcesList()
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
        Specified by:
        getResourcesList in interface DiscoveryResponseOrBuilder
      • getResourcesCount

        public int getResourcesCount()
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
        Specified by:
        getResourcesCount in interface DiscoveryResponseOrBuilder
      • getResources

        public com.google.protobuf.Any getResources​(int index)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
        Specified by:
        getResources in interface DiscoveryResponseOrBuilder
      • setResources

        public DiscoveryResponse.Builder setResources​(int index,
                                                      com.google.protobuf.Any value)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • setResources

        public DiscoveryResponse.Builder setResources​(int index,
                                                      com.google.protobuf.Any.Builder builderForValue)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • addResources

        public DiscoveryResponse.Builder addResources​(com.google.protobuf.Any value)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • addResources

        public DiscoveryResponse.Builder addResources​(int index,
                                                      com.google.protobuf.Any value)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • addResources

        public DiscoveryResponse.Builder addResources​(com.google.protobuf.Any.Builder builderForValue)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • addResources

        public DiscoveryResponse.Builder addResources​(int index,
                                                      com.google.protobuf.Any.Builder builderForValue)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • addAllResources

        public DiscoveryResponse.Builder addAllResources​(java.lang.Iterable<? extends com.google.protobuf.Any> values)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • clearResources

        public DiscoveryResponse.Builder clearResources()
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • removeResources

        public DiscoveryResponse.Builder removeResources​(int index)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • getResourcesBuilder

        public com.google.protobuf.Any.Builder getResourcesBuilder​(int index)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • getResourcesOrBuilder

        public com.google.protobuf.AnyOrBuilder getResourcesOrBuilder​(int index)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
        Specified by:
        getResourcesOrBuilder in interface DiscoveryResponseOrBuilder
      • getResourcesOrBuilderList

        public java.util.List<? extends com.google.protobuf.AnyOrBuilder> getResourcesOrBuilderList()
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
        Specified by:
        getResourcesOrBuilderList in interface DiscoveryResponseOrBuilder
      • addResourcesBuilder

        public com.google.protobuf.Any.Builder addResourcesBuilder()
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • addResourcesBuilder

        public com.google.protobuf.Any.Builder addResourcesBuilder​(int index)
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • getResourcesBuilderList

        public java.util.List<com.google.protobuf.Any.Builder> getResourcesBuilderList()
         The response resources. These resources are typed and depend on the API being called.
         
        repeated .google.protobuf.Any resources = 2;
      • getResourcesFieldBuilder

        private com.google.protobuf.RepeatedFieldBuilder<com.google.protobuf.Any,​com.google.protobuf.Any.Builder,​com.google.protobuf.AnyOrBuilder> getResourcesFieldBuilder()
      • getCanary

        public boolean getCanary()
         [#not-implemented-hide:]
         Canary is used to support two Envoy command line flags:
        
         * --terminate-on-canary-transition-failure. When set, Envoy is able to
         terminate if it detects that configuration is stuck at canary. Consider
         this example sequence of updates:
         - Management server applies a canary config successfully.
         - Management server rolls back to a production config.
         - Envoy rejects the new production config.
         Since there is no sensible way to continue receiving configuration
         updates, Envoy will then terminate and apply production config from a
         clean slate.
         * --dry-run-canary. When set, a canary response will never be applied, only
         validated via a dry run.
         
        bool canary = 3;
        Specified by:
        getCanary in interface DiscoveryResponseOrBuilder
        Returns:
        The canary.
      • setCanary

        public DiscoveryResponse.Builder setCanary​(boolean value)
         [#not-implemented-hide:]
         Canary is used to support two Envoy command line flags:
        
         * --terminate-on-canary-transition-failure. When set, Envoy is able to
         terminate if it detects that configuration is stuck at canary. Consider
         this example sequence of updates:
         - Management server applies a canary config successfully.
         - Management server rolls back to a production config.
         - Envoy rejects the new production config.
         Since there is no sensible way to continue receiving configuration
         updates, Envoy will then terminate and apply production config from a
         clean slate.
         * --dry-run-canary. When set, a canary response will never be applied, only
         validated via a dry run.
         
        bool canary = 3;
        Parameters:
        value - The canary to set.
        Returns:
        This builder for chaining.
      • clearCanary

        public DiscoveryResponse.Builder clearCanary()
         [#not-implemented-hide:]
         Canary is used to support two Envoy command line flags:
        
         * --terminate-on-canary-transition-failure. When set, Envoy is able to
         terminate if it detects that configuration is stuck at canary. Consider
         this example sequence of updates:
         - Management server applies a canary config successfully.
         - Management server rolls back to a production config.
         - Envoy rejects the new production config.
         Since there is no sensible way to continue receiving configuration
         updates, Envoy will then terminate and apply production config from a
         clean slate.
         * --dry-run-canary. When set, a canary response will never be applied, only
         validated via a dry run.
         
        bool canary = 3;
        Returns:
        This builder for chaining.
      • getTypeUrl

        public java.lang.String getTypeUrl()
         Type URL for resources. Identifies the xDS API when muxing over ADS.
         Must be consistent with the type_url in the 'resources' repeated Any (if non-empty).
         
        string type_url = 4;
        Specified by:
        getTypeUrl in interface DiscoveryResponseOrBuilder
        Returns:
        The typeUrl.
      • getTypeUrlBytes

        public com.google.protobuf.ByteString getTypeUrlBytes()
         Type URL for resources. Identifies the xDS API when muxing over ADS.
         Must be consistent with the type_url in the 'resources' repeated Any (if non-empty).
         
        string type_url = 4;
        Specified by:
        getTypeUrlBytes in interface DiscoveryResponseOrBuilder
        Returns:
        The bytes for typeUrl.
      • setTypeUrl

        public DiscoveryResponse.Builder setTypeUrl​(java.lang.String value)
         Type URL for resources. Identifies the xDS API when muxing over ADS.
         Must be consistent with the type_url in the 'resources' repeated Any (if non-empty).
         
        string type_url = 4;
        Parameters:
        value - The typeUrl to set.
        Returns:
        This builder for chaining.
      • clearTypeUrl

        public DiscoveryResponse.Builder clearTypeUrl()
         Type URL for resources. Identifies the xDS API when muxing over ADS.
         Must be consistent with the type_url in the 'resources' repeated Any (if non-empty).
         
        string type_url = 4;
        Returns:
        This builder for chaining.
      • setTypeUrlBytes

        public DiscoveryResponse.Builder setTypeUrlBytes​(com.google.protobuf.ByteString value)
         Type URL for resources. Identifies the xDS API when muxing over ADS.
         Must be consistent with the type_url in the 'resources' repeated Any (if non-empty).
         
        string type_url = 4;
        Parameters:
        value - The bytes for typeUrl to set.
        Returns:
        This builder for chaining.
      • getNonce

        public java.lang.String getNonce()
         For gRPC based subscriptions, the nonce provides a way to explicitly ack a
         specific DiscoveryResponse in a following DiscoveryRequest. Additional
         messages may have been sent by Envoy to the management server for the
         previous version on the stream prior to this DiscoveryResponse, that were
         unprocessed at response send time. The nonce allows the management server
         to ignore any further DiscoveryRequests for the previous version until a
         DiscoveryRequest bearing the nonce. The nonce is optional and is not
         required for non-stream based xDS implementations.
         
        string nonce = 5;
        Specified by:
        getNonce in interface DiscoveryResponseOrBuilder
        Returns:
        The nonce.
      • getNonceBytes

        public com.google.protobuf.ByteString getNonceBytes()
         For gRPC based subscriptions, the nonce provides a way to explicitly ack a
         specific DiscoveryResponse in a following DiscoveryRequest. Additional
         messages may have been sent by Envoy to the management server for the
         previous version on the stream prior to this DiscoveryResponse, that were
         unprocessed at response send time. The nonce allows the management server
         to ignore any further DiscoveryRequests for the previous version until a
         DiscoveryRequest bearing the nonce. The nonce is optional and is not
         required for non-stream based xDS implementations.
         
        string nonce = 5;
        Specified by:
        getNonceBytes in interface DiscoveryResponseOrBuilder
        Returns:
        The bytes for nonce.
      • setNonce

        public DiscoveryResponse.Builder setNonce​(java.lang.String value)
         For gRPC based subscriptions, the nonce provides a way to explicitly ack a
         specific DiscoveryResponse in a following DiscoveryRequest. Additional
         messages may have been sent by Envoy to the management server for the
         previous version on the stream prior to this DiscoveryResponse, that were
         unprocessed at response send time. The nonce allows the management server
         to ignore any further DiscoveryRequests for the previous version until a
         DiscoveryRequest bearing the nonce. The nonce is optional and is not
         required for non-stream based xDS implementations.
         
        string nonce = 5;
        Parameters:
        value - The nonce to set.
        Returns:
        This builder for chaining.
      • clearNonce

        public DiscoveryResponse.Builder clearNonce()
         For gRPC based subscriptions, the nonce provides a way to explicitly ack a
         specific DiscoveryResponse in a following DiscoveryRequest. Additional
         messages may have been sent by Envoy to the management server for the
         previous version on the stream prior to this DiscoveryResponse, that were
         unprocessed at response send time. The nonce allows the management server
         to ignore any further DiscoveryRequests for the previous version until a
         DiscoveryRequest bearing the nonce. The nonce is optional and is not
         required for non-stream based xDS implementations.
         
        string nonce = 5;
        Returns:
        This builder for chaining.
      • setNonceBytes

        public DiscoveryResponse.Builder setNonceBytes​(com.google.protobuf.ByteString value)
         For gRPC based subscriptions, the nonce provides a way to explicitly ack a
         specific DiscoveryResponse in a following DiscoveryRequest. Additional
         messages may have been sent by Envoy to the management server for the
         previous version on the stream prior to this DiscoveryResponse, that were
         unprocessed at response send time. The nonce allows the management server
         to ignore any further DiscoveryRequests for the previous version until a
         DiscoveryRequest bearing the nonce. The nonce is optional and is not
         required for non-stream based xDS implementations.
         
        string nonce = 5;
        Parameters:
        value - The bytes for nonce to set.
        Returns:
        This builder for chaining.
      • hasControlPlane

        public boolean hasControlPlane()
         The control plane instance that sent the response.
         
        .envoy.config.core.v3.ControlPlane control_plane = 6;
        Specified by:
        hasControlPlane in interface DiscoveryResponseOrBuilder
        Returns:
        Whether the controlPlane field is set.
      • setControlPlane

        public DiscoveryResponse.Builder setControlPlane​(ControlPlane value)
         The control plane instance that sent the response.
         
        .envoy.config.core.v3.ControlPlane control_plane = 6;
      • mergeControlPlane

        public DiscoveryResponse.Builder mergeControlPlane​(ControlPlane value)
         The control plane instance that sent the response.
         
        .envoy.config.core.v3.ControlPlane control_plane = 6;
      • clearControlPlane

        public DiscoveryResponse.Builder clearControlPlane()
         The control plane instance that sent the response.
         
        .envoy.config.core.v3.ControlPlane control_plane = 6;
      • getControlPlaneBuilder

        public ControlPlane.Builder getControlPlaneBuilder()
         The control plane instance that sent the response.
         
        .envoy.config.core.v3.ControlPlane control_plane = 6;
      • getControlPlaneFieldBuilder

        private com.google.protobuf.SingleFieldBuilder<ControlPlane,​ControlPlane.Builder,​ControlPlaneOrBuilder> getControlPlaneFieldBuilder()
         The control plane instance that sent the response.
         
        .envoy.config.core.v3.ControlPlane control_plane = 6;