Class Descriptor

java.lang.Object
io.github.alersrt.pod4j.openapi.model.Descriptor
All Implemented Interfaces:
Serializable

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class Descriptor extends Object implements Serializable
This structure provides `application/vnd.oci.descriptor.v1+json` mediatype when marshalled to JSON.
See Also:
  • Field Details

  • Constructor Details

    • Descriptor

      public Descriptor()
  • Method Details

    • annotations

      public Descriptor annotations(Map<String,String> annotations)
    • putAnnotationsItem

      public Descriptor putAnnotationsItem(String key, String annotationsItem)
    • getAnnotations

      @Nullable public Map<String,String> getAnnotations()
      Annotations contains arbitrary metadata relating to the targeted content.
      Returns:
      annotations
    • setAnnotations

      public void setAnnotations(Map<String,String> annotations)
    • artifactType

      public Descriptor artifactType(String artifactType)
    • getArtifactType

      @Nullable public String getArtifactType()
      ArtifactType is the IANA media type of this artifact.
      Returns:
      artifactType
    • setArtifactType

      public void setArtifactType(String artifactType)
    • data

      public Descriptor data(List<Integer> data)
    • addDataItem

      public Descriptor addDataItem(Integer dataItem)
    • getData

      @Nullable public List<Integer> getData()
      Data is an embedding of the targeted content. This is encoded as a base64 string when marshalled to JSON (automatically, by encoding/json). If present, Data can be used directly to avoid fetching the targeted content.
      Returns:
      data
    • setData

      public void setData(List<Integer> data)
    • digest

      public Descriptor digest(String digest)
    • getDigest

      @Nullable public String getDigest()
      The following is an example of the contents of Digest types: sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc This allows to abstract the digest behind this type and work only in those terms.
      Returns:
      digest
    • setDigest

      public void setDigest(String digest)
    • mediaType

      public Descriptor mediaType(String mediaType)
    • getMediaType

      @Nullable public String getMediaType()
      MediaType is the media type of the object this schema refers to.
      Returns:
      mediaType
    • setMediaType

      public void setMediaType(String mediaType)
    • platform

      public Descriptor platform(Platform platform)
    • getPlatform

      @Nullable @Valid public @Valid Platform getPlatform()
      Get platform
      Returns:
      platform
    • setPlatform

      public void setPlatform(Platform platform)
    • size

      public Descriptor size(Long size)
    • getSize

      @Nullable public Long getSize()
      Size specifies the size in bytes of the blob.
      Returns:
      size
    • setSize

      public void setSize(Long size)
    • urls

      public Descriptor urls(List<String> urls)
    • addUrlsItem

      public Descriptor addUrlsItem(String urlsItem)
    • getUrls

      @Nullable public List<String> getUrls()
      URLs specifies a list of URLs from which this object MAY be downloaded
      Returns:
      urls
    • setUrls

      public void setUrls(List<String> urls)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to Descriptor
    • fromJson

      public static Descriptor fromJson(String jsonString) throws IOException
      Create an instance of Descriptor given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Descriptor
      Throws:
      IOException - if the JSON string is invalid with respect to Descriptor
    • toJson

      public String toJson()
      Convert an instance of Descriptor to an JSON string
      Returns:
      JSON string