Skip to content

Commit 7b250dd

Browse files
authored
feat: add new preview Bucket encryption policy configuration (#3204)
* GoogleManagedEncryptionEnforcementConfig * CustomerManagedEncryptionEnforcementConfig * CustomerSuppliedEncryptionEnforcementConfig
1 parent a5c27b7 commit 7b250dd

File tree

8 files changed

+879
-19
lines changed

8 files changed

+879
-19
lines changed

google-cloud-storage/clirr-ignored-differences.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,20 @@
145145
<method>com.google.cloud.storage.BucketInfo$Builder setIpFilter(com.google.cloud.storage.BucketInfo$IpFilter)</method>
146146
</difference>
147147

148+
<difference>
149+
<differenceType>7013</differenceType>
150+
<className>com/google/cloud/storage/BucketInfo$Builder</className>
151+
<method>com.google.cloud.storage.BucketInfo$Builder setCustomerManagedEncryptionEnforcementConfig(com.google.cloud.storage.BucketInfo$CustomerManagedEncryptionEnforcementConfig)</method>
152+
</difference>
153+
<difference>
154+
<differenceType>7013</differenceType>
155+
<className>com/google/cloud/storage/BucketInfo$Builder</className>
156+
<method>com.google.cloud.storage.BucketInfo$Builder setCustomerSuppliedEncryptionEnforcementConfig(com.google.cloud.storage.BucketInfo$CustomerSuppliedEncryptionEnforcementConfig)</method>
157+
</difference>
158+
<difference>
159+
<differenceType>7013</differenceType>
160+
<className>com/google/cloud/storage/BucketInfo$Builder</className>
161+
<method>com.google.cloud.storage.BucketInfo$Builder setGoogleManagedEncryptionEnforcementConfig(com.google.cloud.storage.BucketInfo$GoogleManagedEncryptionEnforcementConfig)</method>
162+
</difference>
163+
148164
</differences>

google-cloud-storage/src/main/java/com/google/cloud/storage/Bucket.java

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,30 @@ public Builder setIpFilter(IpFilter ipFilter) {
765765
return this;
766766
}
767767

768+
@Override
769+
public Builder setGoogleManagedEncryptionEnforcementConfig(
770+
GoogleManagedEncryptionEnforcementConfig googleManagedEncryptionEnforcementConfig) {
771+
infoBuilder.setGoogleManagedEncryptionEnforcementConfig(
772+
googleManagedEncryptionEnforcementConfig);
773+
return this;
774+
}
775+
776+
@Override
777+
public Builder setCustomerManagedEncryptionEnforcementConfig(
778+
CustomerManagedEncryptionEnforcementConfig customerManagedEncryptionEnforcementConfig) {
779+
infoBuilder.setCustomerManagedEncryptionEnforcementConfig(
780+
customerManagedEncryptionEnforcementConfig);
781+
return this;
782+
}
783+
784+
@Override
785+
public Builder setCustomerSuppliedEncryptionEnforcementConfig(
786+
CustomerSuppliedEncryptionEnforcementConfig customerSuppliedEncryptionEnforcementConfig) {
787+
infoBuilder.setCustomerSuppliedEncryptionEnforcementConfig(
788+
customerSuppliedEncryptionEnforcementConfig);
789+
return this;
790+
}
791+
768792
@Override
769793
public Bucket build() {
770794
return new Bucket(storage, infoBuilder);
@@ -955,6 +979,24 @@ Builder clearIpFilter() {
955979
infoBuilder.clearIpFilter();
956980
return this;
957981
}
982+
983+
@Override
984+
public Builder clearGoogleManagedEncryptionEnforcementConfig() {
985+
infoBuilder.clearGoogleManagedEncryptionEnforcementConfig();
986+
return this;
987+
}
988+
989+
@Override
990+
public Builder clearCustomerManagedEncryptionEnforcementConfig() {
991+
infoBuilder.clearCustomerManagedEncryptionEnforcementConfig();
992+
return this;
993+
}
994+
995+
@Override
996+
public Builder clearCustomerSuppliedEncryptionEnforcementConfig() {
997+
infoBuilder.clearCustomerSuppliedEncryptionEnforcementConfig();
998+
return this;
999+
}
9581000
}
9591001

9601002
Bucket(Storage storage, BucketInfo.BuilderImpl infoBuilder) {

0 commit comments

Comments
 (0)