Skip to content

Commit 87dc1fc

Browse files
feat: [privateca] added ignore_dependent_resources to DeleteCaPoolRequest, DeleteCertificateAuthorityRequest, DisableCertificateAuthorityRequest (#9317)
* feat: added ignore_dependent_resources to DeleteCaPoolRequest, DeleteCertificateAuthorityRequest, DisableCertificateAuthorityRequest PiperOrigin-RevId: 522096199 Source-Link: googleapis/googleapis@d9592ed Source-Link: https://github.com/googleapis/googleapis-gen/commit/0ab428e3934981db9c8c7bf17b1fea5d74682afb Copy-Tag: eyJwIjoiamF2YS1zZWN1cml0eS1wcml2YXRlLWNhLy5Pd2xCb3QueWFtbCIsImgiOiIwYWI0MjhlMzkzNDk4MWRiOWM4YzdiZjE3YjFmZWE1ZDc0NjgyYWZiIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 287315c commit 87dc1fc

File tree

22 files changed

+775
-357
lines changed

22 files changed

+775
-357
lines changed

java-security-private-ca/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>26.11.0</version>
23+
<version>26.12.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>

java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceClient.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,7 @@ public final UnaryCallable<UpdateCertificateRequest, Certificate> updateCertific
14431443
* "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
14441444
* .toString())
14451445
* .setRequestId("requestId693933066")
1446+
* .setIgnoreDependentResources(true)
14461447
* .build();
14471448
* CertificateAuthority response =
14481449
* certificateAuthorityServiceClient.disableCertificateAuthorityAsync(request).get();
@@ -1478,6 +1479,7 @@ public final UnaryCallable<UpdateCertificateRequest, Certificate> updateCertific
14781479
* "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
14791480
* .toString())
14801481
* .setRequestId("requestId693933066")
1482+
* .setIgnoreDependentResources(true)
14811483
* .build();
14821484
* OperationFuture<CertificateAuthority, OperationMetadata> future =
14831485
* certificateAuthorityServiceClient
@@ -1515,6 +1517,7 @@ public final UnaryCallable<UpdateCertificateRequest, Certificate> updateCertific
15151517
* "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
15161518
* .toString())
15171519
* .setRequestId("requestId693933066")
1520+
* .setIgnoreDependentResources(true)
15181521
* .build();
15191522
* ApiFuture<Operation> future =
15201523
* certificateAuthorityServiceClient
@@ -2489,6 +2492,7 @@ public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(
24892492
* .setRequestId("requestId693933066")
24902493
* .setIgnoreActiveCertificates(true)
24912494
* .setSkipGracePeriod(true)
2495+
* .setIgnoreDependentResources(true)
24922496
* .build();
24932497
* CertificateAuthority response =
24942498
* certificateAuthorityServiceClient.deleteCertificateAuthorityAsync(request).get();
@@ -2526,6 +2530,7 @@ public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(
25262530
* .setRequestId("requestId693933066")
25272531
* .setIgnoreActiveCertificates(true)
25282532
* .setSkipGracePeriod(true)
2533+
* .setIgnoreDependentResources(true)
25292534
* .build();
25302535
* OperationFuture<CertificateAuthority, OperationMetadata> future =
25312536
* certificateAuthorityServiceClient
@@ -2565,6 +2570,7 @@ public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(
25652570
* .setRequestId("requestId693933066")
25662571
* .setIgnoreActiveCertificates(true)
25672572
* .setSkipGracePeriod(true)
2573+
* .setIgnoreDependentResources(true)
25682574
* .build();
25692575
* ApiFuture<Operation> future =
25702576
* certificateAuthorityServiceClient
@@ -3402,6 +3408,7 @@ public final OperationFuture<Empty, OperationMetadata> deleteCaPoolAsync(String
34023408
* DeleteCaPoolRequest.newBuilder()
34033409
* .setName(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
34043410
* .setRequestId("requestId693933066")
3411+
* .setIgnoreDependentResources(true)
34053412
* .build();
34063413
* certificateAuthorityServiceClient.deleteCaPoolAsync(request).get();
34073414
* }
@@ -3433,6 +3440,7 @@ public final OperationFuture<Empty, OperationMetadata> deleteCaPoolAsync(
34333440
* DeleteCaPoolRequest.newBuilder()
34343441
* .setName(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
34353442
* .setRequestId("requestId693933066")
3443+
* .setIgnoreDependentResources(true)
34363444
* .build();
34373445
* OperationFuture<Empty, OperationMetadata> future =
34383446
* certificateAuthorityServiceClient.deleteCaPoolOperationCallable().futureCall(request);
@@ -3464,6 +3472,7 @@ public final OperationFuture<Empty, OperationMetadata> deleteCaPoolAsync(
34643472
* DeleteCaPoolRequest.newBuilder()
34653473
* .setName(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
34663474
* .setRequestId("requestId693933066")
3475+
* .setIgnoreDependentResources(true)
34673476
* .build();
34683477
* ApiFuture<Operation> future =
34693478
* certificateAuthorityServiceClient.deleteCaPoolCallable().futureCall(request);

java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/stub/HttpJsonCertificateAuthorityServiceStub.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,10 @@ public class HttpJsonCertificateAuthorityServiceStub extends CertificateAuthorit
675675
fields,
676676
"ignoreActiveCertificates",
677677
request.getIgnoreActiveCertificates());
678+
serializer.putQueryParam(
679+
fields,
680+
"ignoreDependentResources",
681+
request.getIgnoreDependentResources());
678682
serializer.putQueryParam(fields, "requestId", request.getRequestId());
679683
serializer.putQueryParam(
680684
fields, "skipGracePeriod", request.getSkipGracePeriod());
@@ -925,6 +929,10 @@ public class HttpJsonCertificateAuthorityServiceStub extends CertificateAuthorit
925929
Map<String, List<String>> fields = new HashMap<>();
926930
ProtoRestSerializer<DeleteCaPoolRequest> serializer =
927931
ProtoRestSerializer.create();
932+
serializer.putQueryParam(
933+
fields,
934+
"ignoreDependentResources",
935+
request.getIgnoreDependentResources());
928936
serializer.putQueryParam(fields, "requestId", request.getRequestId());
929937
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
930938
return fields;

java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCaPoolRequest.java

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,27 @@ public com.google.protobuf.ByteString getRequestIdBytes() {
199199
}
200200
}
201201

202+
public static final int IGNORE_DEPENDENT_RESOURCES_FIELD_NUMBER = 4;
203+
private boolean ignoreDependentResources_ = false;
204+
/**
205+
*
206+
*
207+
* <pre>
208+
* Optional. This field allows this pool to be deleted even if it's being
209+
* depended on by another resource. However, doing so may result in unintended
210+
* and unrecoverable effects on any dependent resource(s) since the pool will
211+
* no longer be able to issue certificates.
212+
* </pre>
213+
*
214+
* <code>bool ignore_dependent_resources = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
215+
*
216+
* @return The ignoreDependentResources.
217+
*/
218+
@java.lang.Override
219+
public boolean getIgnoreDependentResources() {
220+
return ignoreDependentResources_;
221+
}
222+
202223
private byte memoizedIsInitialized = -1;
203224

204225
@java.lang.Override
@@ -219,6 +240,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
219240
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
220241
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_);
221242
}
243+
if (ignoreDependentResources_ != false) {
244+
output.writeBool(4, ignoreDependentResources_);
245+
}
222246
getUnknownFields().writeTo(output);
223247
}
224248

@@ -234,6 +258,9 @@ public int getSerializedSize() {
234258
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
235259
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_);
236260
}
261+
if (ignoreDependentResources_ != false) {
262+
size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, ignoreDependentResources_);
263+
}
237264
size += getUnknownFields().getSerializedSize();
238265
memoizedSize = size;
239266
return size;
@@ -252,6 +279,7 @@ public boolean equals(final java.lang.Object obj) {
252279

253280
if (!getName().equals(other.getName())) return false;
254281
if (!getRequestId().equals(other.getRequestId())) return false;
282+
if (getIgnoreDependentResources() != other.getIgnoreDependentResources()) return false;
255283
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
256284
return true;
257285
}
@@ -267,6 +295,8 @@ public int hashCode() {
267295
hash = (53 * hash) + getName().hashCode();
268296
hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER;
269297
hash = (53 * hash) + getRequestId().hashCode();
298+
hash = (37 * hash) + IGNORE_DEPENDENT_RESOURCES_FIELD_NUMBER;
299+
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreDependentResources());
270300
hash = (29 * hash) + getUnknownFields().hashCode();
271301
memoizedHashCode = hash;
272302
return hash;
@@ -410,6 +440,7 @@ public Builder clear() {
410440
bitField0_ = 0;
411441
name_ = "";
412442
requestId_ = "";
443+
ignoreDependentResources_ = false;
413444
return this;
414445
}
415446

@@ -452,6 +483,9 @@ private void buildPartial0(com.google.cloud.security.privateca.v1.DeleteCaPoolRe
452483
if (((from_bitField0_ & 0x00000002) != 0)) {
453484
result.requestId_ = requestId_;
454485
}
486+
if (((from_bitField0_ & 0x00000004) != 0)) {
487+
result.ignoreDependentResources_ = ignoreDependentResources_;
488+
}
455489
}
456490

457491
@java.lang.Override
@@ -510,6 +544,9 @@ public Builder mergeFrom(com.google.cloud.security.privateca.v1.DeleteCaPoolRequ
510544
bitField0_ |= 0x00000002;
511545
onChanged();
512546
}
547+
if (other.getIgnoreDependentResources() != false) {
548+
setIgnoreDependentResources(other.getIgnoreDependentResources());
549+
}
513550
this.mergeUnknownFields(other.getUnknownFields());
514551
onChanged();
515552
return this;
@@ -548,6 +585,12 @@ public Builder mergeFrom(
548585
bitField0_ |= 0x00000002;
549586
break;
550587
} // case 18
588+
case 32:
589+
{
590+
ignoreDependentResources_ = input.readBool();
591+
bitField0_ |= 0x00000004;
592+
break;
593+
} // case 32
551594
default:
552595
{
553596
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -849,6 +892,68 @@ public Builder setRequestIdBytes(com.google.protobuf.ByteString value) {
849892
return this;
850893
}
851894

895+
private boolean ignoreDependentResources_;
896+
/**
897+
*
898+
*
899+
* <pre>
900+
* Optional. This field allows this pool to be deleted even if it's being
901+
* depended on by another resource. However, doing so may result in unintended
902+
* and unrecoverable effects on any dependent resource(s) since the pool will
903+
* no longer be able to issue certificates.
904+
* </pre>
905+
*
906+
* <code>bool ignore_dependent_resources = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
907+
*
908+
* @return The ignoreDependentResources.
909+
*/
910+
@java.lang.Override
911+
public boolean getIgnoreDependentResources() {
912+
return ignoreDependentResources_;
913+
}
914+
/**
915+
*
916+
*
917+
* <pre>
918+
* Optional. This field allows this pool to be deleted even if it's being
919+
* depended on by another resource. However, doing so may result in unintended
920+
* and unrecoverable effects on any dependent resource(s) since the pool will
921+
* no longer be able to issue certificates.
922+
* </pre>
923+
*
924+
* <code>bool ignore_dependent_resources = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
925+
*
926+
* @param value The ignoreDependentResources to set.
927+
* @return This builder for chaining.
928+
*/
929+
public Builder setIgnoreDependentResources(boolean value) {
930+
931+
ignoreDependentResources_ = value;
932+
bitField0_ |= 0x00000004;
933+
onChanged();
934+
return this;
935+
}
936+
/**
937+
*
938+
*
939+
* <pre>
940+
* Optional. This field allows this pool to be deleted even if it's being
941+
* depended on by another resource. However, doing so may result in unintended
942+
* and unrecoverable effects on any dependent resource(s) since the pool will
943+
* no longer be able to issue certificates.
944+
* </pre>
945+
*
946+
* <code>bool ignore_dependent_resources = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
947+
*
948+
* @return This builder for chaining.
949+
*/
950+
public Builder clearIgnoreDependentResources() {
951+
bitField0_ = (bitField0_ & ~0x00000004);
952+
ignoreDependentResources_ = false;
953+
onChanged();
954+
return this;
955+
}
956+
852957
@java.lang.Override
853958
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
854959
return super.setUnknownFields(unknownFields);

java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCaPoolRequestOrBuilder.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,20 @@ public interface DeleteCaPoolRequestOrBuilder
100100
* @return The bytes for requestId.
101101
*/
102102
com.google.protobuf.ByteString getRequestIdBytes();
103+
104+
/**
105+
*
106+
*
107+
* <pre>
108+
* Optional. This field allows this pool to be deleted even if it's being
109+
* depended on by another resource. However, doing so may result in unintended
110+
* and unrecoverable effects on any dependent resource(s) since the pool will
111+
* no longer be able to issue certificates.
112+
* </pre>
113+
*
114+
* <code>bool ignore_dependent_resources = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
115+
*
116+
* @return The ignoreDependentResources.
117+
*/
118+
boolean getIgnoreDependentResources();
103119
}

0 commit comments

Comments
 (0)