Record Class ResourceRequest

java.lang.Object
java.lang.Record
org.maplibre.nativeffi.resource.ResourceRequest

public record ResourceRequest(String url, ResourceKind kind, int rawKind, ResourceLoadingMethod loadingMethod, int rawLoadingMethod, ResourcePriority priority, int rawPriority, ResourceUsage usage, int rawUsage, ResourceStoragePolicy storagePolicy, int rawStoragePolicy, Optional<ResourceRequest.ByteRange> range, Optional<Long> priorModifiedUnixMs, Optional<Long> priorExpiresUnixMs, Optional<String> priorEtag, byte[] priorData) extends Record
Copied network resource request passed to a runtime resource provider.
  • Constructor Details

    • ResourceRequest

      public ResourceRequest(String url, ResourceKind kind, int rawKind, ResourceLoadingMethod loadingMethod, int rawLoadingMethod, ResourcePriority priority, int rawPriority, ResourceUsage usage, int rawUsage, ResourceStoragePolicy storagePolicy, int rawStoragePolicy, Optional<ResourceRequest.ByteRange> range, Optional<Long> priorModifiedUnixMs, Optional<Long> priorExpiresUnixMs, Optional<String> priorEtag, byte[] priorData)
      Creates an instance of a ResourceRequest record class.
      Parameters:
      url - the value for the url record component
      kind - the value for the kind record component
      rawKind - the value for the rawKind record component
      loadingMethod - the value for the loadingMethod record component
      rawLoadingMethod - the value for the rawLoadingMethod record component
      priority - the value for the priority record component
      rawPriority - the value for the rawPriority record component
      usage - the value for the usage record component
      rawUsage - the value for the rawUsage record component
      storagePolicy - the value for the storagePolicy record component
      rawStoragePolicy - the value for the rawStoragePolicy record component
      range - the value for the range record component
      priorModifiedUnixMs - the value for the priorModifiedUnixMs record component
      priorExpiresUnixMs - the value for the priorExpiresUnixMs record component
      priorEtag - the value for the priorEtag record component
      priorData - the value for the priorData record component
  • Method Details

    • priorData

      public byte[] priorData()
      Returns the value of the priorData record component.
      Returns:
      the value of the priorData record component
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • kind

      public ResourceKind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • rawKind

      public int rawKind()
      Returns the value of the rawKind record component.
      Returns:
      the value of the rawKind record component
    • loadingMethod

      public ResourceLoadingMethod loadingMethod()
      Returns the value of the loadingMethod record component.
      Returns:
      the value of the loadingMethod record component
    • rawLoadingMethod

      public int rawLoadingMethod()
      Returns the value of the rawLoadingMethod record component.
      Returns:
      the value of the rawLoadingMethod record component
    • priority

      public ResourcePriority priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • rawPriority

      public int rawPriority()
      Returns the value of the rawPriority record component.
      Returns:
      the value of the rawPriority record component
    • usage

      public ResourceUsage usage()
      Returns the value of the usage record component.
      Returns:
      the value of the usage record component
    • rawUsage

      public int rawUsage()
      Returns the value of the rawUsage record component.
      Returns:
      the value of the rawUsage record component
    • storagePolicy

      public ResourceStoragePolicy storagePolicy()
      Returns the value of the storagePolicy record component.
      Returns:
      the value of the storagePolicy record component
    • rawStoragePolicy

      public int rawStoragePolicy()
      Returns the value of the rawStoragePolicy record component.
      Returns:
      the value of the rawStoragePolicy record component
    • range

      Returns the value of the range record component.
      Returns:
      the value of the range record component
    • priorModifiedUnixMs

      public Optional<Long> priorModifiedUnixMs()
      Returns the value of the priorModifiedUnixMs record component.
      Returns:
      the value of the priorModifiedUnixMs record component
    • priorExpiresUnixMs

      public Optional<Long> priorExpiresUnixMs()
      Returns the value of the priorExpiresUnixMs record component.
      Returns:
      the value of the priorExpiresUnixMs record component
    • priorEtag

      public Optional<String> priorEtag()
      Returns the value of the priorEtag record component.
      Returns:
      the value of the priorEtag record component