Class ResolveServiceResponse.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<ResolveServiceResponse.Builder>
com.google.protobuf.GeneratedMessage.Builder<ResolveServiceResponse.Builder>
ai.pipestream.platform.registration.v1.ResolveServiceResponse.Builder
All Implemented Interfaces:
ResolveServiceResponseOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ResolveServiceResponse

public static final class ResolveServiceResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<ResolveServiceResponse.Builder> implements ResolveServiceResponseOrBuilder
 Response from service resolution containing the best available instance.

 Provides complete connection details for the selected instance along with
 metadata explaining the selection decision.
 
Protobuf type ai.pipestream.platform.registration.v1.ResolveServiceResponse
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ResolveServiceResponse.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ResolveServiceResponse.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ResolveServiceResponse.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<ResolveServiceResponse.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<ResolveServiceResponse.Builder>
    • getDefaultInstanceForType

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

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

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

      public ResolveServiceResponse.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<ResolveServiceResponse.Builder>
    • mergeFrom

    • isInitialized

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

      public ResolveServiceResponse.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<ResolveServiceResponse.Builder>
      Throws:
      IOException
    • getFound

      public boolean getFound()
       Whether a healthy instance was found.
       
      bool found = 1 [json_name = "found"];
      Specified by:
      getFound in interface ResolveServiceResponseOrBuilder
      Returns:
      The found.
    • setFound

      public ResolveServiceResponse.Builder setFound(boolean value)
       Whether a healthy instance was found.
       
      bool found = 1 [json_name = "found"];
      Parameters:
      value - The found to set.
      Returns:
      This builder for chaining.
    • clearFound

      public ResolveServiceResponse.Builder clearFound()
       Whether a healthy instance was found.
       
      bool found = 1 [json_name = "found"];
      Returns:
      This builder for chaining.
    • getServiceName

      public String getServiceName()
       Service name that was resolved.
       
      string service_name = 2 [json_name = "serviceName"];
      Specified by:
      getServiceName in interface ResolveServiceResponseOrBuilder
      Returns:
      The serviceName.
    • getServiceNameBytes

      public com.google.protobuf.ByteString getServiceNameBytes()
       Service name that was resolved.
       
      string service_name = 2 [json_name = "serviceName"];
      Specified by:
      getServiceNameBytes in interface ResolveServiceResponseOrBuilder
      Returns:
      The bytes for serviceName.
    • setServiceName

      public ResolveServiceResponse.Builder setServiceName(String value)
       Service name that was resolved.
       
      string service_name = 2 [json_name = "serviceName"];
      Parameters:
      value - The serviceName to set.
      Returns:
      This builder for chaining.
    • clearServiceName

      public ResolveServiceResponse.Builder clearServiceName()
       Service name that was resolved.
       
      string service_name = 2 [json_name = "serviceName"];
      Returns:
      This builder for chaining.
    • setServiceNameBytes

      public ResolveServiceResponse.Builder setServiceNameBytes(com.google.protobuf.ByteString value)
       Service name that was resolved.
       
      string service_name = 2 [json_name = "serviceName"];
      Parameters:
      value - The bytes for serviceName to set.
      Returns:
      This builder for chaining.
    • getHost

      public String getHost()
       Host of the selected instance.
       
      string host = 3 [json_name = "host"];
      Specified by:
      getHost in interface ResolveServiceResponseOrBuilder
      Returns:
      The host.
    • getHostBytes

      public com.google.protobuf.ByteString getHostBytes()
       Host of the selected instance.
       
      string host = 3 [json_name = "host"];
      Specified by:
      getHostBytes in interface ResolveServiceResponseOrBuilder
      Returns:
      The bytes for host.
    • setHost

      public ResolveServiceResponse.Builder setHost(String value)
       Host of the selected instance.
       
      string host = 3 [json_name = "host"];
      Parameters:
      value - The host to set.
      Returns:
      This builder for chaining.
    • clearHost

      public ResolveServiceResponse.Builder clearHost()
       Host of the selected instance.
       
      string host = 3 [json_name = "host"];
      Returns:
      This builder for chaining.
    • setHostBytes

      public ResolveServiceResponse.Builder setHostBytes(com.google.protobuf.ByteString value)
       Host of the selected instance.
       
      string host = 3 [json_name = "host"];
      Parameters:
      value - The bytes for host to set.
      Returns:
      This builder for chaining.
    • getPort

      public int getPort()
       Port of the selected instance.
       
      int32 port = 4 [json_name = "port"];
      Specified by:
      getPort in interface ResolveServiceResponseOrBuilder
      Returns:
      The port.
    • setPort

      public ResolveServiceResponse.Builder setPort(int value)
       Port of the selected instance.
       
      int32 port = 4 [json_name = "port"];
      Parameters:
      value - The port to set.
      Returns:
      This builder for chaining.
    • clearPort

      public ResolveServiceResponse.Builder clearPort()
       Port of the selected instance.
       
      int32 port = 4 [json_name = "port"];
      Returns:
      This builder for chaining.
    • getServiceId

      public String getServiceId()
       Consul service ID of the selected instance.
       
      string service_id = 5 [json_name = "serviceId"];
      Specified by:
      getServiceId in interface ResolveServiceResponseOrBuilder
      Returns:
      The serviceId.
    • getServiceIdBytes

      public com.google.protobuf.ByteString getServiceIdBytes()
       Consul service ID of the selected instance.
       
      string service_id = 5 [json_name = "serviceId"];
      Specified by:
      getServiceIdBytes in interface ResolveServiceResponseOrBuilder
      Returns:
      The bytes for serviceId.
    • setServiceId

      public ResolveServiceResponse.Builder setServiceId(String value)
       Consul service ID of the selected instance.
       
      string service_id = 5 [json_name = "serviceId"];
      Parameters:
      value - The serviceId to set.
      Returns:
      This builder for chaining.
    • clearServiceId

      public ResolveServiceResponse.Builder clearServiceId()
       Consul service ID of the selected instance.
       
      string service_id = 5 [json_name = "serviceId"];
      Returns:
      This builder for chaining.
    • setServiceIdBytes

      public ResolveServiceResponse.Builder setServiceIdBytes(com.google.protobuf.ByteString value)
       Consul service ID of the selected instance.
       
      string service_id = 5 [json_name = "serviceId"];
      Parameters:
      value - The bytes for serviceId to set.
      Returns:
      This builder for chaining.
    • getMetadataCount

      public int getMetadataCount()
      Description copied from interface: ResolveServiceResponseOrBuilder
       Additional metadata from the selected instance.
       
      map<string, string> metadata = 6 [json_name = "metadata"];
      Specified by:
      getMetadataCount in interface ResolveServiceResponseOrBuilder
    • containsMetadata

      public boolean containsMetadata(String key)
       Additional metadata from the selected instance.
       
      map<string, string> metadata = 6 [json_name = "metadata"];
      Specified by:
      containsMetadata in interface ResolveServiceResponseOrBuilder
    • getMetadata

      @Deprecated public Map<String,String> getMetadata()
      Deprecated.
      Use getMetadataMap() instead.
      Specified by:
      getMetadata in interface ResolveServiceResponseOrBuilder
    • getMetadataMap

      public Map<String,String> getMetadataMap()
       Additional metadata from the selected instance.
       
      map<string, string> metadata = 6 [json_name = "metadata"];
      Specified by:
      getMetadataMap in interface ResolveServiceResponseOrBuilder
    • getMetadataOrDefault

      public String getMetadataOrDefault(String key, String defaultValue)
       Additional metadata from the selected instance.
       
      map<string, string> metadata = 6 [json_name = "metadata"];
      Specified by:
      getMetadataOrDefault in interface ResolveServiceResponseOrBuilder
    • getMetadataOrThrow

      public String getMetadataOrThrow(String key)
       Additional metadata from the selected instance.
       
      map<string, string> metadata = 6 [json_name = "metadata"];
      Specified by:
      getMetadataOrThrow in interface ResolveServiceResponseOrBuilder
    • clearMetadata

      public ResolveServiceResponse.Builder clearMetadata()
    • removeMetadata

      public ResolveServiceResponse.Builder removeMetadata(String key)
       Additional metadata from the selected instance.
       
      map<string, string> metadata = 6 [json_name = "metadata"];
    • getMutableMetadata

      @Deprecated public Map<String,String> getMutableMetadata()
      Deprecated.
      Use alternate mutation accessors instead.
    • putMetadata

      public ResolveServiceResponse.Builder putMetadata(String key, String value)
       Additional metadata from the selected instance.
       
      map<string, string> metadata = 6 [json_name = "metadata"];
    • putAllMetadata

      public ResolveServiceResponse.Builder putAllMetadata(Map<String,String> values)
       Additional metadata from the selected instance.
       
      map<string, string> metadata = 6 [json_name = "metadata"];
    • getTagsList

      public com.google.protobuf.ProtocolStringList getTagsList()
       Tags associated with the selected instance.
       
      repeated string tags = 7 [json_name = "tags"];
      Specified by:
      getTagsList in interface ResolveServiceResponseOrBuilder
      Returns:
      A list containing the tags.
    • getTagsCount

      public int getTagsCount()
       Tags associated with the selected instance.
       
      repeated string tags = 7 [json_name = "tags"];
      Specified by:
      getTagsCount in interface ResolveServiceResponseOrBuilder
      Returns:
      The count of tags.
    • getTags

      public String getTags(int index)
       Tags associated with the selected instance.
       
      repeated string tags = 7 [json_name = "tags"];
      Specified by:
      getTags in interface ResolveServiceResponseOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The tags at the given index.
    • getTagsBytes

      public com.google.protobuf.ByteString getTagsBytes(int index)
       Tags associated with the selected instance.
       
      repeated string tags = 7 [json_name = "tags"];
      Specified by:
      getTagsBytes in interface ResolveServiceResponseOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the tags at the given index.
    • setTags

      public ResolveServiceResponse.Builder setTags(int index, String value)
       Tags associated with the selected instance.
       
      repeated string tags = 7 [json_name = "tags"];
      Parameters:
      index - The index to set the value at.
      value - The tags to set.
      Returns:
      This builder for chaining.
    • addTags

      public ResolveServiceResponse.Builder addTags(String value)
       Tags associated with the selected instance.
       
      repeated string tags = 7 [json_name = "tags"];
      Parameters:
      value - The tags to add.
      Returns:
      This builder for chaining.
    • addAllTags

      public ResolveServiceResponse.Builder addAllTags(Iterable<String> values)
       Tags associated with the selected instance.
       
      repeated string tags = 7 [json_name = "tags"];
      Parameters:
      values - The tags to add.
      Returns:
      This builder for chaining.
    • clearTags

      public ResolveServiceResponse.Builder clearTags()
       Tags associated with the selected instance.
       
      repeated string tags = 7 [json_name = "tags"];
      Returns:
      This builder for chaining.
    • addTagsBytes

      public ResolveServiceResponse.Builder addTagsBytes(com.google.protobuf.ByteString value)
       Tags associated with the selected instance.
       
      repeated string tags = 7 [json_name = "tags"];
      Parameters:
      value - The bytes of the tags to add.
      Returns:
      This builder for chaining.
    • getCapabilitiesList

      public com.google.protobuf.ProtocolStringList getCapabilitiesList()
       Capabilities of the selected instance.
       
      repeated string capabilities = 8 [json_name = "capabilities"];
      Specified by:
      getCapabilitiesList in interface ResolveServiceResponseOrBuilder
      Returns:
      A list containing the capabilities.
    • getCapabilitiesCount

      public int getCapabilitiesCount()
       Capabilities of the selected instance.
       
      repeated string capabilities = 8 [json_name = "capabilities"];
      Specified by:
      getCapabilitiesCount in interface ResolveServiceResponseOrBuilder
      Returns:
      The count of capabilities.
    • getCapabilities

      public String getCapabilities(int index)
       Capabilities of the selected instance.
       
      repeated string capabilities = 8 [json_name = "capabilities"];
      Specified by:
      getCapabilities in interface ResolveServiceResponseOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The capabilities at the given index.
    • getCapabilitiesBytes

      public com.google.protobuf.ByteString getCapabilitiesBytes(int index)
       Capabilities of the selected instance.
       
      repeated string capabilities = 8 [json_name = "capabilities"];
      Specified by:
      getCapabilitiesBytes in interface ResolveServiceResponseOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the capabilities at the given index.
    • setCapabilities

      public ResolveServiceResponse.Builder setCapabilities(int index, String value)
       Capabilities of the selected instance.
       
      repeated string capabilities = 8 [json_name = "capabilities"];
      Parameters:
      index - The index to set the value at.
      value - The capabilities to set.
      Returns:
      This builder for chaining.
    • addCapabilities

      public ResolveServiceResponse.Builder addCapabilities(String value)
       Capabilities of the selected instance.
       
      repeated string capabilities = 8 [json_name = "capabilities"];
      Parameters:
      value - The capabilities to add.
      Returns:
      This builder for chaining.
    • addAllCapabilities

      public ResolveServiceResponse.Builder addAllCapabilities(Iterable<String> values)
       Capabilities of the selected instance.
       
      repeated string capabilities = 8 [json_name = "capabilities"];
      Parameters:
      values - The capabilities to add.
      Returns:
      This builder for chaining.
    • clearCapabilities

      public ResolveServiceResponse.Builder clearCapabilities()
       Capabilities of the selected instance.
       
      repeated string capabilities = 8 [json_name = "capabilities"];
      Returns:
      This builder for chaining.
    • addCapabilitiesBytes

      public ResolveServiceResponse.Builder addCapabilitiesBytes(com.google.protobuf.ByteString value)
       Capabilities of the selected instance.
       
      repeated string capabilities = 8 [json_name = "capabilities"];
      Parameters:
      value - The bytes of the capabilities to add.
      Returns:
      This builder for chaining.
    • getVersion

      public String getVersion()
       Version of the selected instance.
       
      string version = 9 [json_name = "version"];
      Specified by:
      getVersion in interface ResolveServiceResponseOrBuilder
      Returns:
      The version.
    • getVersionBytes

      public com.google.protobuf.ByteString getVersionBytes()
       Version of the selected instance.
       
      string version = 9 [json_name = "version"];
      Specified by:
      getVersionBytes in interface ResolveServiceResponseOrBuilder
      Returns:
      The bytes for version.
    • setVersion

      public ResolveServiceResponse.Builder setVersion(String value)
       Version of the selected instance.
       
      string version = 9 [json_name = "version"];
      Parameters:
      value - The version to set.
      Returns:
      This builder for chaining.
    • clearVersion

      public ResolveServiceResponse.Builder clearVersion()
       Version of the selected instance.
       
      string version = 9 [json_name = "version"];
      Returns:
      This builder for chaining.
    • setVersionBytes

      public ResolveServiceResponse.Builder setVersionBytes(com.google.protobuf.ByteString value)
       Version of the selected instance.
       
      string version = 9 [json_name = "version"];
      Parameters:
      value - The bytes for version to set.
      Returns:
      This builder for chaining.
    • getTotalInstances

      public int getTotalInstances()
       Total number of instances found (including unhealthy).
       
      int32 total_instances = 10 [json_name = "totalInstances"];
      Specified by:
      getTotalInstances in interface ResolveServiceResponseOrBuilder
      Returns:
      The totalInstances.
    • setTotalInstances

      public ResolveServiceResponse.Builder setTotalInstances(int value)
       Total number of instances found (including unhealthy).
       
      int32 total_instances = 10 [json_name = "totalInstances"];
      Parameters:
      value - The totalInstances to set.
      Returns:
      This builder for chaining.
    • clearTotalInstances

      public ResolveServiceResponse.Builder clearTotalInstances()
       Total number of instances found (including unhealthy).
       
      int32 total_instances = 10 [json_name = "totalInstances"];
      Returns:
      This builder for chaining.
    • getHealthyInstances

      public int getHealthyInstances()
       Number of healthy instances considered.
       
      int32 healthy_instances = 11 [json_name = "healthyInstances"];
      Specified by:
      getHealthyInstances in interface ResolveServiceResponseOrBuilder
      Returns:
      The healthyInstances.
    • setHealthyInstances

      public ResolveServiceResponse.Builder setHealthyInstances(int value)
       Number of healthy instances considered.
       
      int32 healthy_instances = 11 [json_name = "healthyInstances"];
      Parameters:
      value - The healthyInstances to set.
      Returns:
      This builder for chaining.
    • clearHealthyInstances

      public ResolveServiceResponse.Builder clearHealthyInstances()
       Number of healthy instances considered.
       
      int32 healthy_instances = 11 [json_name = "healthyInstances"];
      Returns:
      This builder for chaining.
    • getSelectionReason

      public String getSelectionReason()
       Explanation of why this instance was selected.
       
      string selection_reason = 12 [json_name = "selectionReason"];
      Specified by:
      getSelectionReason in interface ResolveServiceResponseOrBuilder
      Returns:
      The selectionReason.
    • getSelectionReasonBytes

      public com.google.protobuf.ByteString getSelectionReasonBytes()
       Explanation of why this instance was selected.
       
      string selection_reason = 12 [json_name = "selectionReason"];
      Specified by:
      getSelectionReasonBytes in interface ResolveServiceResponseOrBuilder
      Returns:
      The bytes for selectionReason.
    • setSelectionReason

      public ResolveServiceResponse.Builder setSelectionReason(String value)
       Explanation of why this instance was selected.
       
      string selection_reason = 12 [json_name = "selectionReason"];
      Parameters:
      value - The selectionReason to set.
      Returns:
      This builder for chaining.
    • clearSelectionReason

      public ResolveServiceResponse.Builder clearSelectionReason()
       Explanation of why this instance was selected.
       
      string selection_reason = 12 [json_name = "selectionReason"];
      Returns:
      This builder for chaining.
    • setSelectionReasonBytes

      public ResolveServiceResponse.Builder setSelectionReasonBytes(com.google.protobuf.ByteString value)
       Explanation of why this instance was selected.
       
      string selection_reason = 12 [json_name = "selectionReason"];
      Parameters:
      value - The bytes for selectionReason to set.
      Returns:
      This builder for chaining.
    • hasResolvedAt

      public boolean hasResolvedAt()
       Timestamp when resolution occurred.
       
      .google.protobuf.Timestamp resolved_at = 13 [json_name = "resolvedAt"];
      Specified by:
      hasResolvedAt in interface ResolveServiceResponseOrBuilder
      Returns:
      Whether the resolvedAt field is set.
    • getResolvedAt

      public com.google.protobuf.Timestamp getResolvedAt()
       Timestamp when resolution occurred.
       
      .google.protobuf.Timestamp resolved_at = 13 [json_name = "resolvedAt"];
      Specified by:
      getResolvedAt in interface ResolveServiceResponseOrBuilder
      Returns:
      The resolvedAt.
    • setResolvedAt

      public ResolveServiceResponse.Builder setResolvedAt(com.google.protobuf.Timestamp value)
       Timestamp when resolution occurred.
       
      .google.protobuf.Timestamp resolved_at = 13 [json_name = "resolvedAt"];
    • setResolvedAt

      public ResolveServiceResponse.Builder setResolvedAt(com.google.protobuf.Timestamp.Builder builderForValue)
       Timestamp when resolution occurred.
       
      .google.protobuf.Timestamp resolved_at = 13 [json_name = "resolvedAt"];
    • mergeResolvedAt

      public ResolveServiceResponse.Builder mergeResolvedAt(com.google.protobuf.Timestamp value)
       Timestamp when resolution occurred.
       
      .google.protobuf.Timestamp resolved_at = 13 [json_name = "resolvedAt"];
    • clearResolvedAt

      public ResolveServiceResponse.Builder clearResolvedAt()
       Timestamp when resolution occurred.
       
      .google.protobuf.Timestamp resolved_at = 13 [json_name = "resolvedAt"];
    • getResolvedAtBuilder

      public com.google.protobuf.Timestamp.Builder getResolvedAtBuilder()
       Timestamp when resolution occurred.
       
      .google.protobuf.Timestamp resolved_at = 13 [json_name = "resolvedAt"];
    • getResolvedAtOrBuilder

      public com.google.protobuf.TimestampOrBuilder getResolvedAtOrBuilder()
       Timestamp when resolution occurred.
       
      .google.protobuf.Timestamp resolved_at = 13 [json_name = "resolvedAt"];
      Specified by:
      getResolvedAtOrBuilder in interface ResolveServiceResponseOrBuilder