Package org.yamcs.api

Class HttpBody.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
org.yamcs.api.HttpBody.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, HttpBodyOrBuilder
Enclosing class:
HttpBody

public static final class HttpBody.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder> implements HttpBodyOrBuilder
Protobuf type yamcs.api.HttpBody
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapField internalGetMapField(int number)
      Overrides:
      internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
    • internalGetMutableMapField

      protected com.google.protobuf.MapField internalGetMutableMapField(int number)
      Overrides:
      internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
    • internalGetFieldAccessorTable

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

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

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

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

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

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

      public HttpBody.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<HttpBody.Builder>
    • clearField

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

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

      public HttpBody.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<HttpBody.Builder>
    • addRepeatedField

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

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

      public HttpBody.Builder mergeFrom(HttpBody other)
    • isInitialized

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

      public HttpBody.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<HttpBody.Builder>
      Throws:
      IOException
    • hasContentType

      public boolean hasContentType()
       The Content-Type header value for this body.
       If unspecified, defaults to application/octet-stream
       
      optional string content_type = 1;
      Specified by:
      hasContentType in interface HttpBodyOrBuilder
      Returns:
      Whether the contentType field is set.
    • getContentType

      public String getContentType()
       The Content-Type header value for this body.
       If unspecified, defaults to application/octet-stream
       
      optional string content_type = 1;
      Specified by:
      getContentType in interface HttpBodyOrBuilder
      Returns:
      The contentType.
    • getContentTypeBytes

      public com.google.protobuf.ByteString getContentTypeBytes()
       The Content-Type header value for this body.
       If unspecified, defaults to application/octet-stream
       
      optional string content_type = 1;
      Specified by:
      getContentTypeBytes in interface HttpBodyOrBuilder
      Returns:
      The bytes for contentType.
    • setContentType

      public HttpBody.Builder setContentType(String value)
       The Content-Type header value for this body.
       If unspecified, defaults to application/octet-stream
       
      optional string content_type = 1;
      Parameters:
      value - The contentType to set.
      Returns:
      This builder for chaining.
    • clearContentType

      public HttpBody.Builder clearContentType()
       The Content-Type header value for this body.
       If unspecified, defaults to application/octet-stream
       
      optional string content_type = 1;
      Returns:
      This builder for chaining.
    • setContentTypeBytes

      public HttpBody.Builder setContentTypeBytes(com.google.protobuf.ByteString value)
       The Content-Type header value for this body.
       If unspecified, defaults to application/octet-stream
       
      optional string content_type = 1;
      Parameters:
      value - The bytes for contentType to set.
      Returns:
      This builder for chaining.
    • hasFilename

      public boolean hasFilename()
       If set, a Content-Disposition header is added
       to the response. Weg agents use this to trigger
       a download.
       
      optional string filename = 2;
      Specified by:
      hasFilename in interface HttpBodyOrBuilder
      Returns:
      Whether the filename field is set.
    • getFilename

      public String getFilename()
       If set, a Content-Disposition header is added
       to the response. Weg agents use this to trigger
       a download.
       
      optional string filename = 2;
      Specified by:
      getFilename in interface HttpBodyOrBuilder
      Returns:
      The filename.
    • getFilenameBytes

      public com.google.protobuf.ByteString getFilenameBytes()
       If set, a Content-Disposition header is added
       to the response. Weg agents use this to trigger
       a download.
       
      optional string filename = 2;
      Specified by:
      getFilenameBytes in interface HttpBodyOrBuilder
      Returns:
      The bytes for filename.
    • setFilename

      public HttpBody.Builder setFilename(String value)
       If set, a Content-Disposition header is added
       to the response. Weg agents use this to trigger
       a download.
       
      optional string filename = 2;
      Parameters:
      value - The filename to set.
      Returns:
      This builder for chaining.
    • clearFilename

      public HttpBody.Builder clearFilename()
       If set, a Content-Disposition header is added
       to the response. Weg agents use this to trigger
       a download.
       
      optional string filename = 2;
      Returns:
      This builder for chaining.
    • setFilenameBytes

      public HttpBody.Builder setFilenameBytes(com.google.protobuf.ByteString value)
       If set, a Content-Disposition header is added
       to the response. Weg agents use this to trigger
       a download.
       
      optional string filename = 2;
      Parameters:
      value - The bytes for filename to set.
      Returns:
      This builder for chaining.
    • hasData

      public boolean hasData()
       The body as raw binary
       
      optional bytes data = 3;
      Specified by:
      hasData in interface HttpBodyOrBuilder
      Returns:
      Whether the data field is set.
    • getData

      public com.google.protobuf.ByteString getData()
       The body as raw binary
       
      optional bytes data = 3;
      Specified by:
      getData in interface HttpBodyOrBuilder
      Returns:
      The data.
    • setData

      public HttpBody.Builder setData(com.google.protobuf.ByteString value)
       The body as raw binary
       
      optional bytes data = 3;
      Parameters:
      value - The data to set.
      Returns:
      This builder for chaining.
    • clearData

      public HttpBody.Builder clearData()
       The body as raw binary
       
      optional bytes data = 3;
      Returns:
      This builder for chaining.
    • getMetadataCount

      public int getMetadataCount()
      Description copied from interface: HttpBodyOrBuilder
       Any other metadata (used in multipart/form)
       
      map<string, string> metadata = 4;
      Specified by:
      getMetadataCount in interface HttpBodyOrBuilder
    • containsMetadata

      public boolean containsMetadata(String key)
       Any other metadata (used in multipart/form)
       
      map<string, string> metadata = 4;
      Specified by:
      containsMetadata in interface HttpBodyOrBuilder
    • getMetadata

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

      public Map<String,String> getMetadataMap()
       Any other metadata (used in multipart/form)
       
      map<string, string> metadata = 4;
      Specified by:
      getMetadataMap in interface HttpBodyOrBuilder
    • getMetadataOrDefault

      public String getMetadataOrDefault(String key, String defaultValue)
       Any other metadata (used in multipart/form)
       
      map<string, string> metadata = 4;
      Specified by:
      getMetadataOrDefault in interface HttpBodyOrBuilder
    • getMetadataOrThrow

      public String getMetadataOrThrow(String key)
       Any other metadata (used in multipart/form)
       
      map<string, string> metadata = 4;
      Specified by:
      getMetadataOrThrow in interface HttpBodyOrBuilder
    • clearMetadata

      public HttpBody.Builder clearMetadata()
    • removeMetadata

      public HttpBody.Builder removeMetadata(String key)
       Any other metadata (used in multipart/form)
       
      map<string, string> metadata = 4;
    • getMutableMetadata

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

      public HttpBody.Builder putMetadata(String key, String value)
       Any other metadata (used in multipart/form)
       
      map<string, string> metadata = 4;
    • putAllMetadata

      public HttpBody.Builder putAllMetadata(Map<String,String> values)
       Any other metadata (used in multipart/form)
       
      map<string, string> metadata = 4;
    • setUnknownFields

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

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