Interface PatchBody.Builder

  • Method Details

    • patch

      PatchBody.Builder patch(String patch)

      The patch exactly as stored, unmodified. Control Plane accepted it only as a text unified diff, so git apply applies it.

      Parameters:
      patch - The patch exactly as stored, unmodified. Control Plane accepted it only as a text unified diff, so git apply applies it.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • format

      PatchBody.Builder format(String format)

      The patch's wire format, read from the patch itself, which determines how to apply it. Absent when the patch starts with neither a git mailbox header nor a diff --git header.

      Parameters:
      format - The patch's wire format, read from the patch itself, which determines how to apply it. Absent when the patch starts with neither a git mailbox header nor a diff --git header.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • format

      The patch's wire format, read from the patch itself, which determines how to apply it. Absent when the patch starts with neither a git mailbox header nor a diff --git header.

      Parameters:
      format - The patch's wire format, read from the patch itself, which determines how to apply it. Absent when the patch starts with neither a git mailbox header nor a diff --git header.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • repositoryName

      PatchBody.Builder repositoryName(String repositoryName)

      The repository the patch applies to, as named in the source snapshot it was generated against.

      Parameters:
      repositoryName - The repository the patch applies to, as named in the source snapshot it was generated against.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • patchSha256

      PatchBody.Builder patchSha256(String patchSha256)

      SHA-256 of the patch's UTF-8 bytes in lowercase hex, computed by Control Plane when it stored the patch.

      Lets a caller confirm the patch it applies is byte-for-byte the one that was reviewed. Computed over the patch bytes, so it is verifiable against patch without trusting this value.

      Parameters:
      patchSha256 - SHA-256 of the patch's UTF-8 bytes in lowercase hex, computed by Control Plane when it stored the patch.

      Lets a caller confirm the patch it applies is byte-for-byte the one that was reviewed. Computed over the patch bytes, so it is verifiable against patch without trusting this value.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sizeBytes

      PatchBody.Builder sizeBytes(Long sizeBytes)

      Size of the patch in UTF-8 bytes, the unit the digest is computed over.

      Parameters:
      sizeBytes - Size of the patch in UTF-8 bytes, the unit the digest is computed over.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • delivery

      PatchBody.Builder delivery(PatchDelivery delivery)

      Delivery of the patch to the customer's bucket or repository. Absent when the artifact has no delivery destination.

      Parameters:
      delivery - Delivery of the patch to the customer's bucket or repository. Absent when the artifact has no delivery destination.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • delivery

      default PatchBody.Builder delivery(Consumer<PatchDelivery.Builder> delivery)

      Delivery of the patch to the customer's bucket or repository. Absent when the artifact has no delivery destination.

      This is a convenience method that creates an instance of the PatchDelivery.Builder avoiding the need to create one manually via PatchDelivery.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to delivery(PatchDelivery).

      Parameters:
      delivery - a consumer that will call methods on PatchDelivery.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: