# Class VulkanImageCopy

java.lang.Object
com.io7m.jcoronado.api.VulkanImageCopy

All Implemented Interfaces:
  `VulkanImageCopyType`

public final class VulkanImageCopy extends Object implements VulkanImageCopyType
Structure specifying an image copy operation.

See Also:
  - "VkImageCopy"

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `VulkanImageCopy.Builder`
  Builds instances of type `VulkanImageCopy`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanImageCopy.Builder`
  `builder()`
  Creates a builder for `VulkanImageCopy`.
  `static VulkanImageCopy`
  `copyOf(VulkanImageCopyType instance)`
  Creates an immutable copy of a `VulkanImageCopyType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanImageCopy` that have equal attribute values.
  `VulkanExtent3D`
  `extent()`
  `int`
  `hashCode()`
  Computes a hash code from attributes: `sourceSubresource`, `sourceOffset`, `targetSubresource`, `targetOffset`, `extent`.
  `VulkanOffset3D`
  `sourceOffset()`
  `VulkanImageSubresourceLayers`
  `sourceSubresource()`
  `VulkanOffset3D`
  `targetOffset()`
  `VulkanImageSubresourceLayers`
  `targetSubresource()`
  `String`
  `toString()`
  Prints the immutable value `VulkanImageCopy` with attribute values.
  `final VulkanImageCopy`
  `withExtent(VulkanExtent3D value)`
  Copy the current immutable object by setting a value for the `extent` attribute.
  `final VulkanImageCopy`
  `withSourceOffset(VulkanOffset3D value)`
  Copy the current immutable object by setting a value for the `sourceOffset` attribute.
  `final VulkanImageCopy`
  `withSourceSubresource(VulkanImageSubresourceLayers value)`
  Copy the current immutable object by setting a value for the `sourceSubresource` attribute.
  `final VulkanImageCopy`
  `withTargetOffset(VulkanOffset3D value)`
  Copy the current immutable object by setting a value for the `targetOffset` attribute.
  `final VulkanImageCopy`
  `withTargetSubresource(VulkanImageSubresourceLayers value)`
  Copy the current immutable object by setting a value for the `targetSubresource` attribute.

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### sourceSubresource

    public VulkanImageSubresourceLayers sourceSubresource()
    Specified by:
      `sourceSubresource` in interface `VulkanImageCopyType`
    Returns:
      The subresource to copy from

  - ### sourceOffset

    public VulkanOffset3D sourceOffset()
    Specified by:
      `sourceOffset` in interface `VulkanImageCopyType`
    Returns:
      The offset of the source region

  - ### targetSubresource

    public VulkanImageSubresourceLayers targetSubresource()
    Specified by:
      `targetSubresource` in interface `VulkanImageCopyType`
    Returns:
      The subresource to copy to

  - ### targetOffset

    public VulkanOffset3D targetOffset()
    Specified by:
      `targetOffset` in interface `VulkanImageCopyType`
    Returns:
      The offset of the target region

  - ### extent

    public VulkanExtent3D extent()
    Specified by:
      `extent` in interface `VulkanImageCopyType`
    Returns:
      The extent of the copied region

  - ### withSourceSubresource

    public final VulkanImageCopy withSourceSubresource(VulkanImageSubresourceLayers value)
    Copy the current immutable object by setting a value for the `sourceSubresource` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for sourceSubresource
    Returns:
      A modified copy or the `this` object

  - ### withSourceOffset

    public final VulkanImageCopy withSourceOffset(VulkanOffset3D value)
    Copy the current immutable object by setting a value for the `sourceOffset` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for sourceOffset
    Returns:
      A modified copy or the `this` object

  - ### withTargetSubresource

    public final VulkanImageCopy withTargetSubresource(VulkanImageSubresourceLayers value)
    Copy the current immutable object by setting a value for the `targetSubresource` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for targetSubresource
    Returns:
      A modified copy or the `this` object

  - ### withTargetOffset

    public final VulkanImageCopy withTargetOffset(VulkanOffset3D value)
    Copy the current immutable object by setting a value for the `targetOffset` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for targetOffset
    Returns:
      A modified copy or the `this` object

  - ### withExtent

    public final VulkanImageCopy withExtent(VulkanExtent3D value)
    Copy the current immutable object by setting a value for the `extent` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for extent
    Returns:
      A modified copy or the `this` object

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanImageCopy` 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: `sourceSubresource`, `sourceOffset`, `targetSubresource`, `targetOffset`, `extent`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

    public static VulkanImageCopy copyOf(VulkanImageCopyType instance)
    Creates an immutable copy of a `VulkanImageCopyType` 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 VulkanImageCopy instance

  - ### builder

    public static VulkanImageCopy.Builder builder()
    Creates a builder for `VulkanImageCopy`.

        VulkanImageCopy.builder()
           .setSourceSubresource(com.io7m.jcoronado.api.VulkanImageSubresourceLayers) // required sourceSubresource
           .setSourceOffset(com.io7m.jcoronado.api.VulkanOffset3D) // optional sourceOffset
           .setTargetSubresource(com.io7m.jcoronado.api.VulkanImageSubresourceLayers) // required targetSubresource
           .setTargetOffset(com.io7m.jcoronado.api.VulkanOffset3D) // optional targetOffset
           .setExtent(com.io7m.jcoronado.api.VulkanExtent3D) // optional extent
           .build();

    Returns:
      A new VulkanImageCopy builder