Skip to content

Commit

Permalink
Lift version
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejNedic committed Dec 18, 2024
1 parent 18b1ea8 commit 8cd3ba0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spring-cloud-aws-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

<properties>
<spotless.version>2.31.0</spotless.version>
<awssdk-v2.version>2.29.6</awssdk-v2.version>
<awssdk-v2.version>2.29.35</awssdk-v2.version>
<amazon.dax.version>2.0.5</amazon.dax.version>
<amazon.encryption.s3.version>3.2.3</amazon.encryption.s3.version>
<amazon.encryption.s3.version>3.3.0</amazon.encryption.s3.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<spring-cloud-commons.version>4.2.0</spring-cloud-commons.version>
<jakarta.mail.version>2.1.0</jakarta.mail.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ public class ObjectMetadata {
@Nullable
private final String contentMD5;

@Nullable
private final Long writeOffsetBytes;

@Nullable
private final String ifMatch;

public static Builder builder() {
return new Builder();
}
Expand All @@ -134,7 +140,8 @@ public static Builder builder() {
@Nullable String ssekmsKeyId, @Nullable String ssekmsEncryptionContext, @Nullable Boolean bucketKeyEnabled,
@Nullable String requestPayer, @Nullable String tagging, @Nullable String objectLockMode,
@Nullable Instant objectLockRetainUntilDate, @Nullable String objectLockLegalHoldStatus,
@Nullable String expectedBucketOwner, @Nullable String checksumAlgorithm, @Nullable String contentMD5) {
@Nullable String expectedBucketOwner, @Nullable String checksumAlgorithm, @Nullable String contentMD5,
@Nullable Long writeOffsetBytes, @Nullable String ifMatch) {
this.acl = acl;
this.cacheControl = cacheControl;
this.contentDisposition = contentDisposition;
Expand Down Expand Up @@ -165,6 +172,8 @@ public static Builder builder() {
this.expectedBucketOwner = expectedBucketOwner;
this.checksumAlgorithm = checksumAlgorithm;
this.contentMD5 = contentMD5;
this.ifMatch = ifMatch;
this.writeOffsetBytes = writeOffsetBytes;
}

void apply(PutObjectRequest.Builder builder) {
Expand Down Expand Up @@ -258,6 +267,12 @@ void apply(PutObjectRequest.Builder builder) {
if (contentMD5 != null) {
builder.contentMD5(contentMD5);
}
if (writeOffsetBytes != null) {
builder.writeOffsetBytes(writeOffsetBytes);
}
if (ifMatch != null) {
builder.ifMatch(ifMatch);
}
}

void apply(CreateMultipartUploadRequest.Builder builder) {
Expand Down Expand Up @@ -384,6 +399,9 @@ void apply(CompleteMultipartUploadRequest.Builder builder) {
if (expectedBucketOwner != null) {
builder.expectedBucketOwner(expectedBucketOwner);
}
if (ifMatch != null) {
builder.ifMatch(ifMatch);
}
}

@Nullable
Expand Down Expand Up @@ -627,6 +645,12 @@ public static class Builder {
@Nullable
private String contentMD5;

@Nullable
private Long writeOffsetBytes;

@Nullable
private String ifMatch;

public Builder acl(@Nullable String acl) {
this.acl = acl;
return this;
Expand Down Expand Up @@ -806,13 +830,23 @@ public Builder contentMD5(@Nullable String contentMD5) {
return this;
}

public Builder ifMatch(@Nullable String ifMatch) {
this.ifMatch = ifMatch;
return this;
}

public Builder writeOffsetBytes(@Nullable Long writeOffsetBytes) {
this.writeOffsetBytes = writeOffsetBytes;
return this;
}

public ObjectMetadata build() {
return new ObjectMetadata(acl, cacheControl, contentDisposition, contentEncoding, contentLanguage,
contentType, contentLength, expires, grantFullControl, grantRead, grantReadACP, grantWriteACP,
metadata, serverSideEncryption, storageClass, websiteRedirectLocation, sseCustomerAlgorithm,
sseCustomerKey, sseCustomerKeyMD5, ssekmsKeyId, ssekmsEncryptionContext, bucketKeyEnabled,
requestPayer, tagging, objectLockMode, objectLockRetainUntilDate, objectLockLegalHoldStatus,
expectedBucketOwner, checksumAlgorithm, contentMD5);
expectedBucketOwner, checksumAlgorithm, contentMD5, writeOffsetBytes, ifMatch);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ void canBeAppliedToPutObjectRequest() {

assertThat(builder).usingRecursiveComparison()
.ignoringFields("awsRequestOverrideConfig", "checksumCRC32C", "checksumSHA1", "checksumSHA256", "key",
"contentMD5", "bucket", "checksumCRC32", "contentLength", "ifNoneMatch")
"contentMD5", "bucket", "checksumCRC32", "contentLength", "ifNoneMatch", "ifMatch",
"writeOffsetBytes")
.isEqualTo(objectMetadata);
}

Expand Down

0 comments on commit 8cd3ba0

Please sign in to comment.