Class EpubEmbeddedResource.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<EpubEmbeddedResource.Builder>
com.google.protobuf.GeneratedMessage.Builder<EpubEmbeddedResource.Builder>
ai.pipestream.parsed.data.epub.v1.EpubEmbeddedResource.Builder
All Implemented Interfaces:
EpubEmbeddedResourceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
EpubEmbeddedResource

public static final class EpubEmbeddedResource.Builder extends com.google.protobuf.GeneratedMessage.Builder<EpubEmbeddedResource.Builder> implements EpubEmbeddedResourceOrBuilder
 Represents an embedded resource in the EPUB
 Important for understanding content dependencies and processing requirements
 
Protobuf type ai.pipestream.parsed.data.epub.v1.EpubEmbeddedResource
  • Method Details

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

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

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

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

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

      public EpubEmbeddedResource.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<EpubEmbeddedResource.Builder>
      Throws:
      IOException
    • getId

      public String getId()
       Resource identifier from manifest
       
      string id = 1 [json_name = "id"];
      Specified by:
      getId in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       Resource identifier from manifest
       
      string id = 1 [json_name = "id"];
      Specified by:
      getIdBytes in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The bytes for id.
    • setId

      public EpubEmbeddedResource.Builder setId(String value)
       Resource identifier from manifest
       
      string id = 1 [json_name = "id"];
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

      public EpubEmbeddedResource.Builder clearId()
       Resource identifier from manifest
       
      string id = 1 [json_name = "id"];
      Returns:
      This builder for chaining.
    • setIdBytes

      public EpubEmbeddedResource.Builder setIdBytes(com.google.protobuf.ByteString value)
       Resource identifier from manifest
       
      string id = 1 [json_name = "id"];
      Parameters:
      value - The bytes for id to set.
      Returns:
      This builder for chaining.
    • getHref

      public String getHref()
       File path relative to OPF file location
       
      string href = 2 [json_name = "href"];
      Specified by:
      getHref in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The href.
    • getHrefBytes

      public com.google.protobuf.ByteString getHrefBytes()
       File path relative to OPF file location
       
      string href = 2 [json_name = "href"];
      Specified by:
      getHrefBytes in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The bytes for href.
    • setHref

      public EpubEmbeddedResource.Builder setHref(String value)
       File path relative to OPF file location
       
      string href = 2 [json_name = "href"];
      Parameters:
      value - The href to set.
      Returns:
      This builder for chaining.
    • clearHref

      public EpubEmbeddedResource.Builder clearHref()
       File path relative to OPF file location
       
      string href = 2 [json_name = "href"];
      Returns:
      This builder for chaining.
    • setHrefBytes

      public EpubEmbeddedResource.Builder setHrefBytes(com.google.protobuf.ByteString value)
       File path relative to OPF file location
       
      string href = 2 [json_name = "href"];
      Parameters:
      value - The bytes for href to set.
      Returns:
      This builder for chaining.
    • getMediaType

      public String getMediaType()
       MIME type of the resource
       
      string media_type = 3 [json_name = "mediaType"];
      Specified by:
      getMediaType in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The mediaType.
    • getMediaTypeBytes

      public com.google.protobuf.ByteString getMediaTypeBytes()
       MIME type of the resource
       
      string media_type = 3 [json_name = "mediaType"];
      Specified by:
      getMediaTypeBytes in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The bytes for mediaType.
    • setMediaType

      public EpubEmbeddedResource.Builder setMediaType(String value)
       MIME type of the resource
       
      string media_type = 3 [json_name = "mediaType"];
      Parameters:
      value - The mediaType to set.
      Returns:
      This builder for chaining.
    • clearMediaType

      public EpubEmbeddedResource.Builder clearMediaType()
       MIME type of the resource
       
      string media_type = 3 [json_name = "mediaType"];
      Returns:
      This builder for chaining.
    • setMediaTypeBytes

      public EpubEmbeddedResource.Builder setMediaTypeBytes(com.google.protobuf.ByteString value)
       MIME type of the resource
       
      string media_type = 3 [json_name = "mediaType"];
      Parameters:
      value - The bytes for mediaType to set.
      Returns:
      This builder for chaining.
    • hasFileSize

      public boolean hasFileSize()
       File size in bytes (if available)
       
      optional int64 file_size = 4 [json_name = "fileSize"];
      Specified by:
      hasFileSize in interface EpubEmbeddedResourceOrBuilder
      Returns:
      Whether the fileSize field is set.
    • getFileSize

      public long getFileSize()
       File size in bytes (if available)
       
      optional int64 file_size = 4 [json_name = "fileSize"];
      Specified by:
      getFileSize in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The fileSize.
    • setFileSize

      public EpubEmbeddedResource.Builder setFileSize(long value)
       File size in bytes (if available)
       
      optional int64 file_size = 4 [json_name = "fileSize"];
      Parameters:
      value - The fileSize to set.
      Returns:
      This builder for chaining.
    • clearFileSize

      public EpubEmbeddedResource.Builder clearFileSize()
       File size in bytes (if available)
       
      optional int64 file_size = 4 [json_name = "fileSize"];
      Returns:
      This builder for chaining.
    • hasIsReferenced

      public boolean hasIsReferenced()
       Whether this resource is referenced by content files
       
      optional bool is_referenced = 5 [json_name = "isReferenced"];
      Specified by:
      hasIsReferenced in interface EpubEmbeddedResourceOrBuilder
      Returns:
      Whether the isReferenced field is set.
    • getIsReferenced

      public boolean getIsReferenced()
       Whether this resource is referenced by content files
       
      optional bool is_referenced = 5 [json_name = "isReferenced"];
      Specified by:
      getIsReferenced in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The isReferenced.
    • setIsReferenced

      public EpubEmbeddedResource.Builder setIsReferenced(boolean value)
       Whether this resource is referenced by content files
       
      optional bool is_referenced = 5 [json_name = "isReferenced"];
      Parameters:
      value - The isReferenced to set.
      Returns:
      This builder for chaining.
    • clearIsReferenced

      public EpubEmbeddedResource.Builder clearIsReferenced()
       Whether this resource is referenced by content files
       
      optional bool is_referenced = 5 [json_name = "isReferenced"];
      Returns:
      This builder for chaining.
    • getPropertiesList

      public com.google.protobuf.ProtocolStringList getPropertiesList()
       Properties associated with this resource
       
      repeated string properties = 6 [json_name = "properties"];
      Specified by:
      getPropertiesList in interface EpubEmbeddedResourceOrBuilder
      Returns:
      A list containing the properties.
    • getPropertiesCount

      public int getPropertiesCount()
       Properties associated with this resource
       
      repeated string properties = 6 [json_name = "properties"];
      Specified by:
      getPropertiesCount in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The count of properties.
    • getProperties

      public String getProperties(int index)
       Properties associated with this resource
       
      repeated string properties = 6 [json_name = "properties"];
      Specified by:
      getProperties in interface EpubEmbeddedResourceOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The properties at the given index.
    • getPropertiesBytes

      public com.google.protobuf.ByteString getPropertiesBytes(int index)
       Properties associated with this resource
       
      repeated string properties = 6 [json_name = "properties"];
      Specified by:
      getPropertiesBytes in interface EpubEmbeddedResourceOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the properties at the given index.
    • setProperties

      public EpubEmbeddedResource.Builder setProperties(int index, String value)
       Properties associated with this resource
       
      repeated string properties = 6 [json_name = "properties"];
      Parameters:
      index - The index to set the value at.
      value - The properties to set.
      Returns:
      This builder for chaining.
    • addProperties

      public EpubEmbeddedResource.Builder addProperties(String value)
       Properties associated with this resource
       
      repeated string properties = 6 [json_name = "properties"];
      Parameters:
      value - The properties to add.
      Returns:
      This builder for chaining.
    • addAllProperties

      public EpubEmbeddedResource.Builder addAllProperties(Iterable<String> values)
       Properties associated with this resource
       
      repeated string properties = 6 [json_name = "properties"];
      Parameters:
      values - The properties to add.
      Returns:
      This builder for chaining.
    • clearProperties

      public EpubEmbeddedResource.Builder clearProperties()
       Properties associated with this resource
       
      repeated string properties = 6 [json_name = "properties"];
      Returns:
      This builder for chaining.
    • addPropertiesBytes

      public EpubEmbeddedResource.Builder addPropertiesBytes(com.google.protobuf.ByteString value)
       Properties associated with this resource
       
      repeated string properties = 6 [json_name = "properties"];
      Parameters:
      value - The bytes of the properties to add.
      Returns:
      This builder for chaining.
    • hasWidth

      public boolean hasWidth()
       For images: width in pixels
       
      optional int32 width = 7 [json_name = "width"];
      Specified by:
      hasWidth in interface EpubEmbeddedResourceOrBuilder
      Returns:
      Whether the width field is set.
    • getWidth

      public int getWidth()
       For images: width in pixels
       
      optional int32 width = 7 [json_name = "width"];
      Specified by:
      getWidth in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The width.
    • setWidth

      public EpubEmbeddedResource.Builder setWidth(int value)
       For images: width in pixels
       
      optional int32 width = 7 [json_name = "width"];
      Parameters:
      value - The width to set.
      Returns:
      This builder for chaining.
    • clearWidth

      public EpubEmbeddedResource.Builder clearWidth()
       For images: width in pixels
       
      optional int32 width = 7 [json_name = "width"];
      Returns:
      This builder for chaining.
    • hasHeight

      public boolean hasHeight()
       For images: height in pixels
       
      optional int32 height = 8 [json_name = "height"];
      Specified by:
      hasHeight in interface EpubEmbeddedResourceOrBuilder
      Returns:
      Whether the height field is set.
    • getHeight

      public int getHeight()
       For images: height in pixels
       
      optional int32 height = 8 [json_name = "height"];
      Specified by:
      getHeight in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The height.
    • setHeight

      public EpubEmbeddedResource.Builder setHeight(int value)
       For images: height in pixels
       
      optional int32 height = 8 [json_name = "height"];
      Parameters:
      value - The height to set.
      Returns:
      This builder for chaining.
    • clearHeight

      public EpubEmbeddedResource.Builder clearHeight()
       For images: height in pixels
       
      optional int32 height = 8 [json_name = "height"];
      Returns:
      This builder for chaining.
    • hasFontFamily

      public boolean hasFontFamily()
       For fonts: font family name
       
      optional string font_family = 9 [json_name = "fontFamily"];
      Specified by:
      hasFontFamily in interface EpubEmbeddedResourceOrBuilder
      Returns:
      Whether the fontFamily field is set.
    • getFontFamily

      public String getFontFamily()
       For fonts: font family name
       
      optional string font_family = 9 [json_name = "fontFamily"];
      Specified by:
      getFontFamily in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The fontFamily.
    • getFontFamilyBytes

      public com.google.protobuf.ByteString getFontFamilyBytes()
       For fonts: font family name
       
      optional string font_family = 9 [json_name = "fontFamily"];
      Specified by:
      getFontFamilyBytes in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The bytes for fontFamily.
    • setFontFamily

      public EpubEmbeddedResource.Builder setFontFamily(String value)
       For fonts: font family name
       
      optional string font_family = 9 [json_name = "fontFamily"];
      Parameters:
      value - The fontFamily to set.
      Returns:
      This builder for chaining.
    • clearFontFamily

      public EpubEmbeddedResource.Builder clearFontFamily()
       For fonts: font family name
       
      optional string font_family = 9 [json_name = "fontFamily"];
      Returns:
      This builder for chaining.
    • setFontFamilyBytes

      public EpubEmbeddedResource.Builder setFontFamilyBytes(com.google.protobuf.ByteString value)
       For fonts: font family name
       
      optional string font_family = 9 [json_name = "fontFamily"];
      Parameters:
      value - The bytes for fontFamily to set.
      Returns:
      This builder for chaining.
    • hasStylesheetType

      public boolean hasStylesheetType()
       For stylesheets: whether it's a primary or alternate stylesheet
       
      optional string stylesheet_type = 10 [json_name = "stylesheetType"];
      Specified by:
      hasStylesheetType in interface EpubEmbeddedResourceOrBuilder
      Returns:
      Whether the stylesheetType field is set.
    • getStylesheetType

      public String getStylesheetType()
       For stylesheets: whether it's a primary or alternate stylesheet
       
      optional string stylesheet_type = 10 [json_name = "stylesheetType"];
      Specified by:
      getStylesheetType in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The stylesheetType.
    • getStylesheetTypeBytes

      public com.google.protobuf.ByteString getStylesheetTypeBytes()
       For stylesheets: whether it's a primary or alternate stylesheet
       
      optional string stylesheet_type = 10 [json_name = "stylesheetType"];
      Specified by:
      getStylesheetTypeBytes in interface EpubEmbeddedResourceOrBuilder
      Returns:
      The bytes for stylesheetType.
    • setStylesheetType

      public EpubEmbeddedResource.Builder setStylesheetType(String value)
       For stylesheets: whether it's a primary or alternate stylesheet
       
      optional string stylesheet_type = 10 [json_name = "stylesheetType"];
      Parameters:
      value - The stylesheetType to set.
      Returns:
      This builder for chaining.
    • clearStylesheetType

      public EpubEmbeddedResource.Builder clearStylesheetType()
       For stylesheets: whether it's a primary or alternate stylesheet
       
      optional string stylesheet_type = 10 [json_name = "stylesheetType"];
      Returns:
      This builder for chaining.
    • setStylesheetTypeBytes

      public EpubEmbeddedResource.Builder setStylesheetTypeBytes(com.google.protobuf.ByteString value)
       For stylesheets: whether it's a primary or alternate stylesheet
       
      optional string stylesheet_type = 10 [json_name = "stylesheetType"];
      Parameters:
      value - The bytes for stylesheetType to set.
      Returns:
      This builder for chaining.