Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit c69ce38

Browse files
feat: Add skip_grace_period flag to DeleteCertificateAuthority API (#388)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 433526535 Source-Link: googleapis/googleapis@6c2ecea Source-Link: https://github.com/googleapis/googleapis-gen/commit/0ce00549adc2c0b5e6c9b284be7aa1b7dd1e5460 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGNlMDA1NDlhZGMyYzBiNWU2YzliMjg0YmU3YWExYjdkZDFlNTQ2MCJ9
1 parent 5d8c8f4 commit c69ce38

File tree

7 files changed

+496
-382
lines changed

7 files changed

+496
-382
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,6 +2142,7 @@ public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(
21422142
* .toString())
21432143
* .setRequestId("requestId693933066")
21442144
* .setIgnoreActiveCertificates(true)
2145+
* .setSkipGracePeriod(true)
21452146
* .build();
21462147
* CertificateAuthority response =
21472148
* certificateAuthorityServiceClient.deleteCertificateAuthorityAsync(request).get();
@@ -2173,6 +2174,7 @@ public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(
21732174
* .toString())
21742175
* .setRequestId("requestId693933066")
21752176
* .setIgnoreActiveCertificates(true)
2177+
* .setSkipGracePeriod(true)
21762178
* .build();
21772179
* OperationFuture<CertificateAuthority, OperationMetadata> future =
21782180
* certificateAuthorityServiceClient
@@ -2206,6 +2208,7 @@ public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(
22062208
* .toString())
22072209
* .setRequestId("requestId693933066")
22082210
* .setIgnoreActiveCertificates(true)
2211+
* .setSkipGracePeriod(true)
22092212
* .build();
22102213
* ApiFuture<Operation> future =
22112214
* certificateAuthorityServiceClient

β€Žproto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCertificateAuthorityRequest.java

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ private DeleteCertificateAuthorityRequest(
9292
ignoreActiveCertificates_ = input.readBool();
9393
break;
9494
}
95+
case 40:
96+
{
97+
skipGracePeriod_ = input.readBool();
98+
break;
99+
}
95100
default:
96101
{
97102
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -269,6 +274,26 @@ public boolean getIgnoreActiveCertificates() {
269274
return ignoreActiveCertificates_;
270275
}
271276

277+
public static final int SKIP_GRACE_PERIOD_FIELD_NUMBER = 5;
278+
private boolean skipGracePeriod_;
279+
/**
280+
*
281+
*
282+
* <pre>
283+
* Optional. If this flag is set, the Certificate Authority will be deleted as soon as
284+
* possible without a 30-day grace period where undeletion would have been
285+
* allowed. If you proceed, there will be no way to recover this CA.
286+
* </pre>
287+
*
288+
* <code>bool skip_grace_period = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
289+
*
290+
* @return The skipGracePeriod.
291+
*/
292+
@java.lang.Override
293+
public boolean getSkipGracePeriod() {
294+
return skipGracePeriod_;
295+
}
296+
272297
private byte memoizedIsInitialized = -1;
273298

274299
@java.lang.Override
@@ -292,6 +317,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
292317
if (ignoreActiveCertificates_ != false) {
293318
output.writeBool(4, ignoreActiveCertificates_);
294319
}
320+
if (skipGracePeriod_ != false) {
321+
output.writeBool(5, skipGracePeriod_);
322+
}
295323
unknownFields.writeTo(output);
296324
}
297325

@@ -310,6 +338,9 @@ public int getSerializedSize() {
310338
if (ignoreActiveCertificates_ != false) {
311339
size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, ignoreActiveCertificates_);
312340
}
341+
if (skipGracePeriod_ != false) {
342+
size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, skipGracePeriod_);
343+
}
313344
size += unknownFields.getSerializedSize();
314345
memoizedSize = size;
315346
return size;
@@ -330,6 +361,7 @@ public boolean equals(final java.lang.Object obj) {
330361
if (!getName().equals(other.getName())) return false;
331362
if (!getRequestId().equals(other.getRequestId())) return false;
332363
if (getIgnoreActiveCertificates() != other.getIgnoreActiveCertificates()) return false;
364+
if (getSkipGracePeriod() != other.getSkipGracePeriod()) return false;
333365
if (!unknownFields.equals(other.unknownFields)) return false;
334366
return true;
335367
}
@@ -347,6 +379,8 @@ public int hashCode() {
347379
hash = (53 * hash) + getRequestId().hashCode();
348380
hash = (37 * hash) + IGNORE_ACTIVE_CERTIFICATES_FIELD_NUMBER;
349381
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreActiveCertificates());
382+
hash = (37 * hash) + SKIP_GRACE_PERIOD_FIELD_NUMBER;
383+
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipGracePeriod());
350384
hash = (29 * hash) + unknownFields.hashCode();
351385
memoizedHashCode = hash;
352386
return hash;
@@ -503,6 +537,8 @@ public Builder clear() {
503537

504538
ignoreActiveCertificates_ = false;
505539

540+
skipGracePeriod_ = false;
541+
506542
return this;
507543
}
508544

@@ -536,6 +572,7 @@ public com.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest
536572
result.name_ = name_;
537573
result.requestId_ = requestId_;
538574
result.ignoreActiveCertificates_ = ignoreActiveCertificates_;
575+
result.skipGracePeriod_ = skipGracePeriod_;
539576
onBuilt();
540577
return result;
541578
}
@@ -601,6 +638,9 @@ public Builder mergeFrom(
601638
if (other.getIgnoreActiveCertificates() != false) {
602639
setIgnoreActiveCertificates(other.getIgnoreActiveCertificates());
603640
}
641+
if (other.getSkipGracePeriod() != false) {
642+
setSkipGracePeriod(other.getSkipGracePeriod());
643+
}
604644
this.mergeUnknownFields(other.unknownFields);
605645
onChanged();
606646
return this;
@@ -964,6 +1004,64 @@ public Builder clearIgnoreActiveCertificates() {
9641004
return this;
9651005
}
9661006

1007+
private boolean skipGracePeriod_;
1008+
/**
1009+
*
1010+
*
1011+
* <pre>
1012+
* Optional. If this flag is set, the Certificate Authority will be deleted as soon as
1013+
* possible without a 30-day grace period where undeletion would have been
1014+
* allowed. If you proceed, there will be no way to recover this CA.
1015+
* </pre>
1016+
*
1017+
* <code>bool skip_grace_period = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
1018+
*
1019+
* @return The skipGracePeriod.
1020+
*/
1021+
@java.lang.Override
1022+
public boolean getSkipGracePeriod() {
1023+
return skipGracePeriod_;
1024+
}
1025+
/**
1026+
*
1027+
*
1028+
* <pre>
1029+
* Optional. If this flag is set, the Certificate Authority will be deleted as soon as
1030+
* possible without a 30-day grace period where undeletion would have been
1031+
* allowed. If you proceed, there will be no way to recover this CA.
1032+
* </pre>
1033+
*
1034+
* <code>bool skip_grace_period = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
1035+
*
1036+
* @param value The skipGracePeriod to set.
1037+
* @return This builder for chaining.
1038+
*/
1039+
public Builder setSkipGracePeriod(boolean value) {
1040+
1041+
skipGracePeriod_ = value;
1042+
onChanged();
1043+
return this;
1044+
}
1045+
/**
1046+
*
1047+
*
1048+
* <pre>
1049+
* Optional. If this flag is set, the Certificate Authority will be deleted as soon as
1050+
* possible without a 30-day grace period where undeletion would have been
1051+
* allowed. If you proceed, there will be no way to recover this CA.
1052+
* </pre>
1053+
*
1054+
* <code>bool skip_grace_period = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
1055+
*
1056+
* @return This builder for chaining.
1057+
*/
1058+
public Builder clearSkipGracePeriod() {
1059+
1060+
skipGracePeriod_ = false;
1061+
onChanged();
1062+
return this;
1063+
}
1064+
9671065
@java.lang.Override
9681066
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
9691067
return super.setUnknownFields(unknownFields);

β€Žproto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCertificateAuthorityRequestOrBuilder.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,19 @@ public interface DeleteCertificateAuthorityRequestOrBuilder
112112
* @return The ignoreActiveCertificates.
113113
*/
114114
boolean getIgnoreActiveCertificates();
115+
116+
/**
117+
*
118+
*
119+
* <pre>
120+
* Optional. If this flag is set, the Certificate Authority will be deleted as soon as
121+
* possible without a 30-day grace period where undeletion would have been
122+
* allowed. If you proceed, there will be no way to recover this CA.
123+
* </pre>
124+
*
125+
* <code>bool skip_grace_period = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
126+
*
127+
* @return The skipGracePeriod.
128+
*/
129+
boolean getSkipGracePeriod();
115130
}

0 commit comments

Comments
 (0)