Class PdfFileExtension

java.lang.Object
security.whisper.javastix.coo.extension.types.PdfFileExtension
All Implemented Interfaces:
Serializable, StixCustomProperties, CyberObservableExtension, CyberObservableExtensionCommonProperties, PdfFileExtensionExt, GenericValidation, SdoDefaultValidator

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue @AllowedParents(FileCoo.class) public final class PdfFileExtension extends Object implements PdfFileExtensionExt, Serializable
The PDF file extension specifies a default extension for capturing properties specific to PDF files.
See Also:
  • Method Details

    • getVersion

      @JsonPropertyDescription("Specifies the decimal version number of the Optional<String> from the PDF header that specifies the version of the PDF specification to which the PDF file conforms. E.g., \'1.4\'.") public Optional<String> getVersion()
      Specified by:
      getVersion in interface PdfFileExtensionExt
      Returns:
      The value of the version attribute
    • isOptimized

      @JsonPropertyDescription("Specifies whether the PDF file has been optimized.") public Optional<Boolean> isOptimized()
      Specified by:
      isOptimized in interface PdfFileExtensionExt
      Returns:
      The value of the isOptimized attribute
    • getDocumentInfoDict

      @JsonPropertyDescription("Specifies details of the PDF document information dictionary (DID), which includes properties like the document creation data and producer, as a dictionary.") public com.google.common.collect.ImmutableMap<String,String> getDocumentInfoDict()
      Specified by:
      getDocumentInfoDict in interface PdfFileExtensionExt
      Returns:
      The value of the documentInfoDict attribute
    • getPdfId0

      @JsonPropertyDescription("Specifies the first file identifier found for the PDF file.") public Optional<String> getPdfId0()
      Specified by:
      getPdfId0 in interface PdfFileExtensionExt
      Returns:
      The value of the pdfId0 attribute
    • getPdfId1

      @JsonPropertyDescription("Specifies the second file identifier found for the PDF file.") public Optional<String> getPdfId1()
      Specified by:
      getPdfId1 in interface PdfFileExtensionExt
      Returns:
      The value of the pdfId1 attribute
    • getType

      public String getType()
      This property is used for generation of the dictionary during serialization, and used as the "Type" mapping value for polymorphic when deserializing.
      Specified by:
      getType in interface CyberObservableExtensionCommonProperties
    • getCustomProperties

      public com.google.common.collect.ImmutableMap<String,Object> getCustomProperties()
      Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.
      Specified by:
      getCustomProperties in interface StixCustomProperties
      Returns:
      Map of custom properties Map<String, Object>
    • withVersion

      public final PdfFileExtension withVersion(String value)
      Copy the current immutable object by setting a present value for the optional version attribute.
      Parameters:
      value - The value for version
      Returns:
      A modified copy of this object
    • withVersion

      public final PdfFileExtension withVersion(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the version attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for version
      Returns:
      A modified copy of this object
    • withIsOptimized

      public final PdfFileExtension withIsOptimized(boolean value)
      Copy the current immutable object by setting a present value for the optional isOptimized attribute.
      Parameters:
      value - The value for isOptimized
      Returns:
      A modified copy of this object
    • withIsOptimized

      public final PdfFileExtension withIsOptimized(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the isOptimized attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for isOptimized
      Returns:
      A modified copy of this object
    • withDocumentInfoDict

      public final PdfFileExtension withDocumentInfoDict(Map<String,? extends String> entries)
      Copy the current immutable object by replacing the documentInfoDict map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the documentInfoDict map
      Returns:
      A modified copy of this object
    • withPdfId0

      public final PdfFileExtension withPdfId0(String value)
      Copy the current immutable object by setting a present value for the optional pdfId0 attribute.
      Parameters:
      value - The value for pdfId0
      Returns:
      A modified copy of this object
    • withPdfId0

      public final PdfFileExtension withPdfId0(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the pdfId0 attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for pdfId0
      Returns:
      A modified copy of this object
    • withPdfId1

      public final PdfFileExtension withPdfId1(String value)
      Copy the current immutable object by setting a present value for the optional pdfId1 attribute.
      Parameters:
      value - The value for pdfId1
      Returns:
      A modified copy of this object
    • withPdfId1

      public final PdfFileExtension withPdfId1(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the pdfId1 attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for pdfId1
      Returns:
      A modified copy of this object
    • withType

      public final PdfFileExtension withType(String value)
      Copy the current immutable object by setting a value for the type attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type (can be null)
      Returns:
      A modified copy of the this object
    • withCustomProperties

      public final PdfFileExtension withCustomProperties(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the customProperties map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the customProperties map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of PdfFileExtension that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: version, isOptimized, documentInfoDict, pdfId0, pdfId1, type, customProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value PdfFileExtension with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static PdfFileExtension copyOf(PdfFileExtensionExt instance)
      Creates an immutable copy of a PdfFileExtensionExt value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable PdfFileExtension instance
    • builder

      public static PdfFileExtension.Builder builder()
      Creates a builder for PdfFileExtension.
      Returns:
      A new PdfFileExtension builder