diff --git a/README.md b/README.md index cc0ddcf8..d6c3d282 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 4.4.0 + 4.4.1 pom import @@ -40,7 +40,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-kms - 1.36.1 + 1.37.0 ``` diff --git a/proto-google-cloud-kms-v1/clirr-ignored-differences.xml b/proto-google-cloud-kms-v1/clirr-ignored-differences.xml new file mode 100644 index 00000000..a1bad292 --- /dev/null +++ b/proto-google-cloud-kms-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/kms/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/kms/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/kms/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKeyVersion.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKeyVersion.java index f6105b67..a1b68945 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKeyVersion.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKeyVersion.java @@ -213,6 +213,23 @@ private CryptoKeyVersion( java.lang.String s = input.readStringRequireUtf8(); importFailureReason_ = s; + break; + } + case 138: + { + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder subBuilder = null; + if (externalProtectionLevelOptions_ != null) { + subBuilder = externalProtectionLevelOptions_.toBuilder(); + } + externalProtectionLevelOptions_ = + input.readMessage( + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(externalProtectionLevelOptions_); + externalProtectionLevelOptions_ = subBuilder.buildPartial(); + } + break; } default: @@ -443,6 +460,16 @@ public enum CryptoKeyVersionAlgorithm implements com.google.protobuf.ProtocolMes * EC_SIGN_P384_SHA384 = 13; */ EC_SIGN_P384_SHA384(13), + /** + * + * + *
+     * Algorithm representing symmetric encryption by an external key manager.
+     * 
+ * + * EXTERNAL_SYMMETRIC_ENCRYPTION = 18; + */ + EXTERNAL_SYMMETRIC_ENCRYPTION(18), UNRECOGNIZED(-1), ; @@ -606,6 +633,16 @@ public enum CryptoKeyVersionAlgorithm implements com.google.protobuf.ProtocolMes * EC_SIGN_P384_SHA384 = 13; */ public static final int EC_SIGN_P384_SHA384_VALUE = 13; + /** + * + * + *
+     * Algorithm representing symmetric encryption by an external key manager.
+     * 
+ * + * EXTERNAL_SYMMETRIC_ENCRYPTION = 18; + */ + public static final int EXTERNAL_SYMMETRIC_ENCRYPTION_VALUE = 18; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -663,6 +700,8 @@ public static CryptoKeyVersionAlgorithm forNumber(int value) { return EC_SIGN_P256_SHA256; case 13: return EC_SIGN_P384_SHA384; + case 18: + return EXTERNAL_SYMMETRIC_ENCRYPTION; default: return null; } @@ -1733,6 +1772,65 @@ public com.google.protobuf.ByteString getImportFailureReasonBytes() { } } + public static final int EXTERNAL_PROTECTION_LEVEL_OPTIONS_FIELD_NUMBER = 17; + private com.google.cloud.kms.v1.ExternalProtectionLevelOptions externalProtectionLevelOptions_; + /** + * + * + *
+   * ExternalProtectionLevelOptions stores a group of additional fields for
+   * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+   * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+   * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + * + * @return Whether the externalProtectionLevelOptions field is set. + */ + public boolean hasExternalProtectionLevelOptions() { + return externalProtectionLevelOptions_ != null; + } + /** + * + * + *
+   * ExternalProtectionLevelOptions stores a group of additional fields for
+   * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+   * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+   * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + * + * @return The externalProtectionLevelOptions. + */ + public com.google.cloud.kms.v1.ExternalProtectionLevelOptions + getExternalProtectionLevelOptions() { + return externalProtectionLevelOptions_ == null + ? com.google.cloud.kms.v1.ExternalProtectionLevelOptions.getDefaultInstance() + : externalProtectionLevelOptions_; + } + /** + * + * + *
+   * ExternalProtectionLevelOptions stores a group of additional fields for
+   * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+   * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+   * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + */ + public com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder + getExternalProtectionLevelOptionsOrBuilder() { + return getExternalProtectionLevelOptions(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1790,6 +1888,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getImportFailureReasonBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 16, importFailureReason_); } + if (externalProtectionLevelOptions_ != null) { + output.writeMessage(17, getExternalProtectionLevelOptions()); + } unknownFields.writeTo(output); } @@ -1842,6 +1943,11 @@ public int getSerializedSize() { if (!getImportFailureReasonBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, importFailureReason_); } + if (externalProtectionLevelOptions_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, getExternalProtectionLevelOptions()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1887,6 +1993,12 @@ public boolean equals(final java.lang.Object obj) { if (!getImportTime().equals(other.getImportTime())) return false; } if (!getImportFailureReason().equals(other.getImportFailureReason())) return false; + if (hasExternalProtectionLevelOptions() != other.hasExternalProtectionLevelOptions()) + return false; + if (hasExternalProtectionLevelOptions()) { + if (!getExternalProtectionLevelOptions().equals(other.getExternalProtectionLevelOptions())) + return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1934,6 +2046,10 @@ public int hashCode() { } hash = (37 * hash) + IMPORT_FAILURE_REASON_FIELD_NUMBER; hash = (53 * hash) + getImportFailureReason().hashCode(); + if (hasExternalProtectionLevelOptions()) { + hash = (37 * hash) + EXTERNAL_PROTECTION_LEVEL_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getExternalProtectionLevelOptions().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2134,6 +2250,12 @@ public Builder clear() { } importFailureReason_ = ""; + if (externalProtectionLevelOptionsBuilder_ == null) { + externalProtectionLevelOptions_ = null; + } else { + externalProtectionLevelOptions_ = null; + externalProtectionLevelOptionsBuilder_ = null; + } return this; } @@ -2197,6 +2319,11 @@ public com.google.cloud.kms.v1.CryptoKeyVersion buildPartial() { result.importTime_ = importTimeBuilder_.build(); } result.importFailureReason_ = importFailureReason_; + if (externalProtectionLevelOptionsBuilder_ == null) { + result.externalProtectionLevelOptions_ = externalProtectionLevelOptions_; + } else { + result.externalProtectionLevelOptions_ = externalProtectionLevelOptionsBuilder_.build(); + } onBuilt(); return result; } @@ -2285,6 +2412,9 @@ public Builder mergeFrom(com.google.cloud.kms.v1.CryptoKeyVersion other) { importFailureReason_ = other.importFailureReason_; onChanged(); } + if (other.hasExternalProtectionLevelOptions()) { + mergeExternalProtectionLevelOptions(other.getExternalProtectionLevelOptions()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4252,6 +4382,235 @@ public Builder setImportFailureReasonBytes(com.google.protobuf.ByteString value) return this; } + private com.google.cloud.kms.v1.ExternalProtectionLevelOptions externalProtectionLevelOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.kms.v1.ExternalProtectionLevelOptions, + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder, + com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder> + externalProtectionLevelOptionsBuilder_; + /** + * + * + *
+     * ExternalProtectionLevelOptions stores a group of additional fields for
+     * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+     * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + * + * @return Whether the externalProtectionLevelOptions field is set. + */ + public boolean hasExternalProtectionLevelOptions() { + return externalProtectionLevelOptionsBuilder_ != null + || externalProtectionLevelOptions_ != null; + } + /** + * + * + *
+     * ExternalProtectionLevelOptions stores a group of additional fields for
+     * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+     * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + * + * @return The externalProtectionLevelOptions. + */ + public com.google.cloud.kms.v1.ExternalProtectionLevelOptions + getExternalProtectionLevelOptions() { + if (externalProtectionLevelOptionsBuilder_ == null) { + return externalProtectionLevelOptions_ == null + ? com.google.cloud.kms.v1.ExternalProtectionLevelOptions.getDefaultInstance() + : externalProtectionLevelOptions_; + } else { + return externalProtectionLevelOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * ExternalProtectionLevelOptions stores a group of additional fields for
+     * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+     * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + */ + public Builder setExternalProtectionLevelOptions( + com.google.cloud.kms.v1.ExternalProtectionLevelOptions value) { + if (externalProtectionLevelOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalProtectionLevelOptions_ = value; + onChanged(); + } else { + externalProtectionLevelOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * ExternalProtectionLevelOptions stores a group of additional fields for
+     * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+     * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + */ + public Builder setExternalProtectionLevelOptions( + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder builderForValue) { + if (externalProtectionLevelOptionsBuilder_ == null) { + externalProtectionLevelOptions_ = builderForValue.build(); + onChanged(); + } else { + externalProtectionLevelOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * ExternalProtectionLevelOptions stores a group of additional fields for
+     * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+     * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + */ + public Builder mergeExternalProtectionLevelOptions( + com.google.cloud.kms.v1.ExternalProtectionLevelOptions value) { + if (externalProtectionLevelOptionsBuilder_ == null) { + if (externalProtectionLevelOptions_ != null) { + externalProtectionLevelOptions_ = + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.newBuilder( + externalProtectionLevelOptions_) + .mergeFrom(value) + .buildPartial(); + } else { + externalProtectionLevelOptions_ = value; + } + onChanged(); + } else { + externalProtectionLevelOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * ExternalProtectionLevelOptions stores a group of additional fields for
+     * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+     * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + */ + public Builder clearExternalProtectionLevelOptions() { + if (externalProtectionLevelOptionsBuilder_ == null) { + externalProtectionLevelOptions_ = null; + onChanged(); + } else { + externalProtectionLevelOptions_ = null; + externalProtectionLevelOptionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * ExternalProtectionLevelOptions stores a group of additional fields for
+     * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+     * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + */ + public com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder + getExternalProtectionLevelOptionsBuilder() { + + onChanged(); + return getExternalProtectionLevelOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * ExternalProtectionLevelOptions stores a group of additional fields for
+     * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+     * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + */ + public com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder + getExternalProtectionLevelOptionsOrBuilder() { + if (externalProtectionLevelOptionsBuilder_ != null) { + return externalProtectionLevelOptionsBuilder_.getMessageOrBuilder(); + } else { + return externalProtectionLevelOptions_ == null + ? com.google.cloud.kms.v1.ExternalProtectionLevelOptions.getDefaultInstance() + : externalProtectionLevelOptions_; + } + } + /** + * + * + *
+     * ExternalProtectionLevelOptions stores a group of additional fields for
+     * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+     * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.kms.v1.ExternalProtectionLevelOptions, + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder, + com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder> + getExternalProtectionLevelOptionsFieldBuilder() { + if (externalProtectionLevelOptionsBuilder_ == null) { + externalProtectionLevelOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.kms.v1.ExternalProtectionLevelOptions, + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder, + com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder>( + getExternalProtectionLevelOptions(), getParentForChildren(), isClean()); + externalProtectionLevelOptions_ = null; + } + return externalProtectionLevelOptionsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKeyVersionOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKeyVersionOrBuilder.java index 2f52bbb3..7aa12401 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKeyVersionOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKeyVersionOrBuilder.java @@ -458,4 +458,52 @@ public interface CryptoKeyVersionOrBuilder * @return The bytes for importFailureReason. */ com.google.protobuf.ByteString getImportFailureReasonBytes(); + + /** + * + * + *
+   * ExternalProtectionLevelOptions stores a group of additional fields for
+   * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+   * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+   * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + * + * @return Whether the externalProtectionLevelOptions field is set. + */ + boolean hasExternalProtectionLevelOptions(); + /** + * + * + *
+   * ExternalProtectionLevelOptions stores a group of additional fields for
+   * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+   * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+   * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + * + * @return The externalProtectionLevelOptions. + */ + com.google.cloud.kms.v1.ExternalProtectionLevelOptions getExternalProtectionLevelOptions(); + /** + * + * + *
+   * ExternalProtectionLevelOptions stores a group of additional fields for
+   * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+   * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+   * 
+ * + * + * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * + */ + com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder + getExternalProtectionLevelOptionsOrBuilder(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ExternalProtectionLevelOptions.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ExternalProtectionLevelOptions.java new file mode 100644 index 00000000..4a9da8e5 --- /dev/null +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ExternalProtectionLevelOptions.java @@ -0,0 +1,640 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/kms/v1/resources.proto + +package com.google.cloud.kms.v1; + +/** + * + * + *
+ * ExternalProtectionLevelOptions stores a group of additional fields for
+ * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+ * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+ * 
+ * + * Protobuf type {@code google.cloud.kms.v1.ExternalProtectionLevelOptions} + */ +public final class ExternalProtectionLevelOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.ExternalProtectionLevelOptions) + ExternalProtectionLevelOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExternalProtectionLevelOptions.newBuilder() to construct. + private ExternalProtectionLevelOptions( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExternalProtectionLevelOptions() { + externalKeyUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExternalProtectionLevelOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExternalProtectionLevelOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalKeyUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.kms.v1.KmsResourcesProto + .internal_static_google_cloud_kms_v1_ExternalProtectionLevelOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.kms.v1.KmsResourcesProto + .internal_static_google_cloud_kms_v1_ExternalProtectionLevelOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.class, + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder.class); + } + + public static final int EXTERNAL_KEY_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object externalKeyUri_; + /** + * + * + *
+   * The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+   * 
+ * + * string external_key_uri = 1; + * + * @return The externalKeyUri. + */ + public java.lang.String getExternalKeyUri() { + java.lang.Object ref = externalKeyUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalKeyUri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+   * 
+ * + * string external_key_uri = 1; + * + * @return The bytes for externalKeyUri. + */ + public com.google.protobuf.ByteString getExternalKeyUriBytes() { + java.lang.Object ref = externalKeyUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalKeyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getExternalKeyUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, externalKeyUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getExternalKeyUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, externalKeyUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.kms.v1.ExternalProtectionLevelOptions)) { + return super.equals(obj); + } + com.google.cloud.kms.v1.ExternalProtectionLevelOptions other = + (com.google.cloud.kms.v1.ExternalProtectionLevelOptions) obj; + + if (!getExternalKeyUri().equals(other.getExternalKeyUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXTERNAL_KEY_URI_FIELD_NUMBER; + hash = (53 * hash) + getExternalKeyUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.kms.v1.ExternalProtectionLevelOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ExternalProtectionLevelOptions stores a group of additional fields for
+   * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the
+   * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.
+   * 
+ * + * Protobuf type {@code google.cloud.kms.v1.ExternalProtectionLevelOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.ExternalProtectionLevelOptions) + com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.kms.v1.KmsResourcesProto + .internal_static_google_cloud_kms_v1_ExternalProtectionLevelOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.kms.v1.KmsResourcesProto + .internal_static_google_cloud_kms_v1_ExternalProtectionLevelOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.class, + com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder.class); + } + + // Construct using com.google.cloud.kms.v1.ExternalProtectionLevelOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + externalKeyUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.kms.v1.KmsResourcesProto + .internal_static_google_cloud_kms_v1_ExternalProtectionLevelOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.kms.v1.ExternalProtectionLevelOptions getDefaultInstanceForType() { + return com.google.cloud.kms.v1.ExternalProtectionLevelOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.kms.v1.ExternalProtectionLevelOptions build() { + com.google.cloud.kms.v1.ExternalProtectionLevelOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.kms.v1.ExternalProtectionLevelOptions buildPartial() { + com.google.cloud.kms.v1.ExternalProtectionLevelOptions result = + new com.google.cloud.kms.v1.ExternalProtectionLevelOptions(this); + result.externalKeyUri_ = externalKeyUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.kms.v1.ExternalProtectionLevelOptions) { + return mergeFrom((com.google.cloud.kms.v1.ExternalProtectionLevelOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.kms.v1.ExternalProtectionLevelOptions other) { + if (other == com.google.cloud.kms.v1.ExternalProtectionLevelOptions.getDefaultInstance()) + return this; + if (!other.getExternalKeyUri().isEmpty()) { + externalKeyUri_ = other.externalKeyUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.kms.v1.ExternalProtectionLevelOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.kms.v1.ExternalProtectionLevelOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object externalKeyUri_ = ""; + /** + * + * + *
+     * The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+     * 
+ * + * string external_key_uri = 1; + * + * @return The externalKeyUri. + */ + public java.lang.String getExternalKeyUri() { + java.lang.Object ref = externalKeyUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalKeyUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+     * 
+ * + * string external_key_uri = 1; + * + * @return The bytes for externalKeyUri. + */ + public com.google.protobuf.ByteString getExternalKeyUriBytes() { + java.lang.Object ref = externalKeyUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalKeyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+     * 
+ * + * string external_key_uri = 1; + * + * @param value The externalKeyUri to set. + * @return This builder for chaining. + */ + public Builder setExternalKeyUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalKeyUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+     * 
+ * + * string external_key_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearExternalKeyUri() { + + externalKeyUri_ = getDefaultInstance().getExternalKeyUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+     * 
+ * + * string external_key_uri = 1; + * + * @param value The bytes for externalKeyUri to set. + * @return This builder for chaining. + */ + public Builder setExternalKeyUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalKeyUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.ExternalProtectionLevelOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.ExternalProtectionLevelOptions) + private static final com.google.cloud.kms.v1.ExternalProtectionLevelOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.kms.v1.ExternalProtectionLevelOptions(); + } + + public static com.google.cloud.kms.v1.ExternalProtectionLevelOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExternalProtectionLevelOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExternalProtectionLevelOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.kms.v1.ExternalProtectionLevelOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ExternalProtectionLevelOptionsOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ExternalProtectionLevelOptionsOrBuilder.java new file mode 100644 index 00000000..c10c10b4 --- /dev/null +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ExternalProtectionLevelOptionsOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/kms/v1/resources.proto + +package com.google.cloud.kms.v1; + +public interface ExternalProtectionLevelOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.kms.v1.ExternalProtectionLevelOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+   * 
+ * + * string external_key_uri = 1; + * + * @return The externalKeyUri. + */ + java.lang.String getExternalKeyUri(); + /** + * + * + *
+   * The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+   * 
+ * + * string external_key_uri = 1; + * + * @return The bytes for externalKeyUri. + */ + com.google.protobuf.ByteString getExternalKeyUriBytes(); +} diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsProto.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsProto.java index 47e67c56..ecea61f1 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsProto.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsProto.java @@ -278,133 +278,134 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\001(\tB0\340A\002\372A*\n(cloudkms.googleapis.com/Cry" + "ptoKeyVersion\"H\n\006Digest\022\020\n\006sha256\030\001 \001(\014H" + "\000\022\020\n\006sha384\030\002 \001(\014H\000\022\020\n\006sha512\030\003 \001(\014H\000B\010\n" - + "\006digest\")\n\020LocationMetadata\022\025\n\rhsm_avail" - + "able\030\001 \001(\0102\206&\n\024KeyManagementService\022\242\001\n\014" - + "ListKeyRings\022(.google.cloud.kms.v1.ListK" - + "eyRingsRequest\032).google.cloud.kms.v1.Lis" - + "tKeyRingsResponse\"=\202\323\344\223\002.\022,/v1/{parent=p" - + "rojects/*/locations/*}/keyRings\332A\006parent" - + "\022\265\001\n\016ListCryptoKeys\022*.google.cloud.kms.v" - + "1.ListCryptoKeysRequest\032+.google.cloud.k" - + "ms.v1.ListCryptoKeysResponse\"J\202\323\344\223\002;\0229/v" - + "1/{parent=projects/*/locations/*/keyRing" - + "s/*}/cryptoKeys\332A\006parent\022\336\001\n\025ListCryptoK" - + "eyVersions\0221.google.cloud.kms.v1.ListCry" - + "ptoKeyVersionsRequest\0322.google.cloud.kms" - + ".v1.ListCryptoKeyVersionsResponse\"^\202\323\344\223\002" - + "O\022M/v1/{parent=projects/*/locations/*/ke" - + "yRings/*/cryptoKeys/*}/cryptoKeyVersions" - + "\332A\006parent\022\265\001\n\016ListImportJobs\022*.google.cl" - + "oud.kms.v1.ListImportJobsRequest\032+.googl" - + "e.cloud.kms.v1.ListImportJobsResponse\"J\202" - + "\323\344\223\002;\0229/v1/{parent=projects/*/locations/" - + "*/keyRings/*}/importJobs\332A\006parent\022\217\001\n\nGe" - + "tKeyRing\022&.google.cloud.kms.v1.GetKeyRin" - + "gRequest\032\034.google.cloud.kms.v1.KeyRing\";" - + "\202\323\344\223\002.\022,/v1/{name=projects/*/locations/*" - + "/keyRings/*}\332A\004name\022\242\001\n\014GetCryptoKey\022(.g" - + "oogle.cloud.kms.v1.GetCryptoKeyRequest\032\036" - + ".google.cloud.kms.v1.CryptoKey\"H\202\323\344\223\002;\0229" - + "/v1/{name=projects/*/locations/*/keyRing" - + "s/*/cryptoKeys/*}\332A\004name\022\313\001\n\023GetCryptoKe" - + "yVersion\022/.google.cloud.kms.v1.GetCrypto" - + "KeyVersionRequest\032%.google.cloud.kms.v1." - + "CryptoKeyVersion\"\\\202\323\344\223\002O\022M/v1/{name=proj" - + "ects/*/locations/*/keyRings/*/cryptoKeys" - + "/*/cryptoKeyVersions/*}\332A\004name\022\300\001\n\014GetPu" - + "blicKey\022(.google.cloud.kms.v1.GetPublicK" - + "eyRequest\032\036.google.cloud.kms.v1.PublicKe" - + "y\"f\202\323\344\223\002Y\022W/v1/{name=projects/*/location" - + "s/*/keyRings/*/cryptoKeys/*/cryptoKeyVer" - + "sions/*}/publicKey\332A\004name\022\242\001\n\014GetImportJ" - + "ob\022(.google.cloud.kms.v1.GetImportJobReq" - + "uest\032\036.google.cloud.kms.v1.ImportJob\"H\202\323" - + "\344\223\002;\0229/v1/{name=projects/*/locations/*/k" - + "eyRings/*/importJobs/*}\332A\004name\022\266\001\n\rCreat" - + "eKeyRing\022).google.cloud.kms.v1.CreateKey" - + "RingRequest\032\034.google.cloud.kms.v1.KeyRin" - + "g\"\\\202\323\344\223\0028\",/v1/{parent=projects/*/locati" - + "ons/*}/keyRings:\010key_ring\332A\033parent,key_r" - + "ing_id,key_ring\022\317\001\n\017CreateCryptoKey\022+.go" - + "ogle.cloud.kms.v1.CreateCryptoKeyRequest" - + "\032\036.google.cloud.kms.v1.CryptoKey\"o\202\323\344\223\002G" - + "\"9/v1/{parent=projects/*/locations/*/key" - + "Rings/*}/cryptoKeys:\ncrypto_key\332A\037parent" - + ",crypto_key_id,crypto_key\022\373\001\n\026CreateCryp" - + "toKeyVersion\0222.google.cloud.kms.v1.Creat" - + "eCryptoKeyVersionRequest\032%.google.cloud." - + "kms.v1.CryptoKeyVersion\"\205\001\202\323\344\223\002c\"M/v1/{p" - + "arent=projects/*/locations/*/keyRings/*/" - + "cryptoKeys/*}/cryptoKeyVersions:\022crypto_" - + "key_version\332A\031parent,crypto_key_version\022" - + "\324\001\n\026ImportCryptoKeyVersion\0222.google.clou" - + "d.kms.v1.ImportCryptoKeyVersionRequest\032%" - + ".google.cloud.kms.v1.CryptoKeyVersion\"_\202" - + "\323\344\223\002Y\"T/v1/{parent=projects/*/locations/" - + "*/keyRings/*/cryptoKeys/*}/cryptoKeyVers" - + "ions:import:\001*\022\317\001\n\017CreateImportJob\022+.goo" - + "gle.cloud.kms.v1.CreateImportJobRequest\032" - + "\036.google.cloud.kms.v1.ImportJob\"o\202\323\344\223\002G\"" - + "9/v1/{parent=projects/*/locations/*/keyR" - + "ings/*}/importJobs:\nimport_job\332A\037parent," - + "import_job_id,import_job\022\321\001\n\017UpdateCrypt" - + "oKey\022+.google.cloud.kms.v1.UpdateCryptoK" - + "eyRequest\032\036.google.cloud.kms.v1.CryptoKe" - + "y\"q\202\323\344\223\002R2D/v1/{crypto_key.name=projects" - + "/*/locations/*/keyRings/*/cryptoKeys/*}:" - + "\ncrypto_key\332A\026crypto_key,update_mask\022\223\002\n" - + "\026UpdateCryptoKeyVersion\0222.google.cloud.k" - + "ms.v1.UpdateCryptoKeyVersionRequest\032%.go" - + "ogle.cloud.kms.v1.CryptoKeyVersion\"\235\001\202\323\344" - + "\223\002v2`/v1/{crypto_key_version.name=projec" - + "ts/*/locations/*/keyRings/*/cryptoKeys/*" - + "/cryptoKeyVersions/*}:\022crypto_key_versio" - + "n\332A\036crypto_key_version,update_mask\022\264\001\n\007E" - + "ncrypt\022#.google.cloud.kms.v1.EncryptRequ" - + "est\032$.google.cloud.kms.v1.EncryptRespons" - + "e\"^\202\323\344\223\002G\"B/v1/{name=projects/*/location" - + "s/*/keyRings/*/cryptoKeys/**}:encrypt:\001*" - + "\332A\016name,plaintext\022\264\001\n\007Decrypt\022#.google.c" - + "loud.kms.v1.DecryptRequest\032$.google.clou" - + "d.kms.v1.DecryptResponse\"^\202\323\344\223\002F\"A/v1/{n" + + "\006digest\"@\n\020LocationMetadata\022\025\n\rhsm_avail" + + "able\030\001 \001(\010\022\025\n\rekm_available\030\002 \001(\0102\206&\n\024Ke" + + "yManagementService\022\242\001\n\014ListKeyRings\022(.go" + + "ogle.cloud.kms.v1.ListKeyRingsRequest\032)." + + "google.cloud.kms.v1.ListKeyRingsResponse" + + "\"=\202\323\344\223\002.\022,/v1/{parent=projects/*/locatio" + + "ns/*}/keyRings\332A\006parent\022\265\001\n\016ListCryptoKe" + + "ys\022*.google.cloud.kms.v1.ListCryptoKeysR" + + "equest\032+.google.cloud.kms.v1.ListCryptoK" + + "eysResponse\"J\202\323\344\223\002;\0229/v1/{parent=project" + + "s/*/locations/*/keyRings/*}/cryptoKeys\332A" + + "\006parent\022\336\001\n\025ListCryptoKeyVersions\0221.goog" + + "le.cloud.kms.v1.ListCryptoKeyVersionsReq" + + "uest\0322.google.cloud.kms.v1.ListCryptoKey" + + "VersionsResponse\"^\202\323\344\223\002O\022M/v1/{parent=pr" + + "ojects/*/locations/*/keyRings/*/cryptoKe" + + "ys/*}/cryptoKeyVersions\332A\006parent\022\265\001\n\016Lis" + + "tImportJobs\022*.google.cloud.kms.v1.ListIm" + + "portJobsRequest\032+.google.cloud.kms.v1.Li" + + "stImportJobsResponse\"J\202\323\344\223\002;\0229/v1/{paren" + + "t=projects/*/locations/*/keyRings/*}/imp" + + "ortJobs\332A\006parent\022\217\001\n\nGetKeyRing\022&.google" + + ".cloud.kms.v1.GetKeyRingRequest\032\034.google" + + ".cloud.kms.v1.KeyRing\";\202\323\344\223\002.\022,/v1/{name" + + "=projects/*/locations/*/keyRings/*}\332A\004na" + + "me\022\242\001\n\014GetCryptoKey\022(.google.cloud.kms.v" + + "1.GetCryptoKeyRequest\032\036.google.cloud.kms" + + ".v1.CryptoKey\"H\202\323\344\223\002;\0229/v1/{name=project" + + "s/*/locations/*/keyRings/*/cryptoKeys/*}" + + "\332A\004name\022\313\001\n\023GetCryptoKeyVersion\022/.google" + + ".cloud.kms.v1.GetCryptoKeyVersionRequest" + + "\032%.google.cloud.kms.v1.CryptoKeyVersion\"" + + "\\\202\323\344\223\002O\022M/v1/{name=projects/*/locations/" + + "*/keyRings/*/cryptoKeys/*/cryptoKeyVersi" + + "ons/*}\332A\004name\022\300\001\n\014GetPublicKey\022(.google." + + "cloud.kms.v1.GetPublicKeyRequest\032\036.googl" + + "e.cloud.kms.v1.PublicKey\"f\202\323\344\223\002Y\022W/v1/{n" + "ame=projects/*/locations/*/keyRings/*/cr" - + "yptoKeys/*}:decrypt:\001*\332A\017name,ciphertext" - + "\022\340\001\n\016AsymmetricSign\022*.google.cloud.kms.v" - + "1.AsymmetricSignRequest\032+.google.cloud.k" - + "ms.v1.AsymmetricSignResponse\"u\202\323\344\223\002a\"\\/v" - + "1/{name=projects/*/locations/*/keyRings/" - + "*/cryptoKeys/*/cryptoKeyVersions/*}:asym" - + "metricSign:\001*\332A\013name,digest\022\360\001\n\021Asymmetr" - + "icDecrypt\022-.google.cloud.kms.v1.Asymmetr" - + "icDecryptRequest\032..google.cloud.kms.v1.A" - + "symmetricDecryptResponse\"|\202\323\344\223\002d\"_/v1/{n" - + "ame=projects/*/locations/*/keyRings/*/cr" - + "yptoKeys/*/cryptoKeyVersions/*}:asymmetr" - + "icDecrypt:\001*\332A\017name,ciphertext\022\362\001\n\035Updat" - + "eCryptoKeyPrimaryVersion\0229.google.cloud." - + "kms.v1.UpdateCryptoKeyPrimaryVersionRequ" - + "est\032\036.google.cloud.kms.v1.CryptoKey\"v\202\323\344" - + "\223\002S\"N/v1/{name=projects/*/locations/*/ke" - + "yRings/*/cryptoKeys/*}:updatePrimaryVers" - + "ion:\001*\332A\032name,crypto_key_version_id\022\336\001\n\027" - + "DestroyCryptoKeyVersion\0223.google.cloud.k" - + "ms.v1.DestroyCryptoKeyVersionRequest\032%.g" - + "oogle.cloud.kms.v1.CryptoKeyVersion\"g\202\323\344" - + "\223\002Z\"U/v1/{name=projects/*/locations/*/ke" - + "yRings/*/cryptoKeys/*/cryptoKeyVersions/" - + "*}:destroy:\001*\332A\004name\022\336\001\n\027RestoreCryptoKe" - + "yVersion\0223.google.cloud.kms.v1.RestoreCr" + + "yptoKeys/*/cryptoKeyVersions/*}/publicKe" + + "y\332A\004name\022\242\001\n\014GetImportJob\022(.google.cloud" + + ".kms.v1.GetImportJobRequest\032\036.google.clo" + + "ud.kms.v1.ImportJob\"H\202\323\344\223\002;\0229/v1/{name=p" + + "rojects/*/locations/*/keyRings/*/importJ" + + "obs/*}\332A\004name\022\266\001\n\rCreateKeyRing\022).google" + + ".cloud.kms.v1.CreateKeyRingRequest\032\034.goo" + + "gle.cloud.kms.v1.KeyRing\"\\\202\323\344\223\0028\",/v1/{p" + + "arent=projects/*/locations/*}/keyRings:\010" + + "key_ring\332A\033parent,key_ring_id,key_ring\022\317" + + "\001\n\017CreateCryptoKey\022+.google.cloud.kms.v1" + + ".CreateCryptoKeyRequest\032\036.google.cloud.k" + + "ms.v1.CryptoKey\"o\202\323\344\223\002G\"9/v1/{parent=pro" + + "jects/*/locations/*/keyRings/*}/cryptoKe" + + "ys:\ncrypto_key\332A\037parent,crypto_key_id,cr" + + "ypto_key\022\373\001\n\026CreateCryptoKeyVersion\0222.go" + + "ogle.cloud.kms.v1.CreateCryptoKeyVersion" + + "Request\032%.google.cloud.kms.v1.CryptoKeyV" + + "ersion\"\205\001\202\323\344\223\002c\"M/v1/{parent=projects/*/" + + "locations/*/keyRings/*/cryptoKeys/*}/cry" + + "ptoKeyVersions:\022crypto_key_version\332A\031par" + + "ent,crypto_key_version\022\324\001\n\026ImportCryptoK" + + "eyVersion\0222.google.cloud.kms.v1.ImportCr" + "yptoKeyVersionRequest\032%.google.cloud.kms" - + ".v1.CryptoKeyVersion\"g\202\323\344\223\002Z\"U/v1/{name=" - + "projects/*/locations/*/keyRings/*/crypto" - + "Keys/*/cryptoKeyVersions/*}:restore:\001*\332A" - + "\004name\032t\312A\027cloudkms.googleapis.com\322AWhttp" - + "s://www.googleapis.com/auth/cloud-platfo" - + "rm,https://www.googleapis.com/auth/cloud" - + "kmsB\214\001\n\027com.google.cloud.kms.v1B\010KmsProt" - + "oP\001Z6google.golang.org/genproto/googleap" - + "is/cloud/kms/v1;kms\370\001\001\252\002\023Google.Cloud.Km" - + "s.V1\312\002\023Google\\Cloud\\Kms\\V1b\006proto3" + + ".v1.CryptoKeyVersion\"_\202\323\344\223\002Y\"T/v1/{paren" + + "t=projects/*/locations/*/keyRings/*/cryp" + + "toKeys/*}/cryptoKeyVersions:import:\001*\022\317\001" + + "\n\017CreateImportJob\022+.google.cloud.kms.v1." + + "CreateImportJobRequest\032\036.google.cloud.km" + + "s.v1.ImportJob\"o\202\323\344\223\002G\"9/v1/{parent=proj" + + "ects/*/locations/*/keyRings/*}/importJob" + + "s:\nimport_job\332A\037parent,import_job_id,imp" + + "ort_job\022\321\001\n\017UpdateCryptoKey\022+.google.clo" + + "ud.kms.v1.UpdateCryptoKeyRequest\032\036.googl" + + "e.cloud.kms.v1.CryptoKey\"q\202\323\344\223\002R2D/v1/{c" + + "rypto_key.name=projects/*/locations/*/ke" + + "yRings/*/cryptoKeys/*}:\ncrypto_key\332A\026cry" + + "pto_key,update_mask\022\223\002\n\026UpdateCryptoKeyV" + + "ersion\0222.google.cloud.kms.v1.UpdateCrypt" + + "oKeyVersionRequest\032%.google.cloud.kms.v1" + + ".CryptoKeyVersion\"\235\001\202\323\344\223\002v2`/v1/{crypto_" + + "key_version.name=projects/*/locations/*/" + + "keyRings/*/cryptoKeys/*/cryptoKeyVersion" + + "s/*}:\022crypto_key_version\332A\036crypto_key_ve" + + "rsion,update_mask\022\264\001\n\007Encrypt\022#.google.c" + + "loud.kms.v1.EncryptRequest\032$.google.clou" + + "d.kms.v1.EncryptResponse\"^\202\323\344\223\002G\"B/v1/{n" + + "ame=projects/*/locations/*/keyRings/*/cr" + + "yptoKeys/**}:encrypt:\001*\332A\016name,plaintext" + + "\022\264\001\n\007Decrypt\022#.google.cloud.kms.v1.Decry" + + "ptRequest\032$.google.cloud.kms.v1.DecryptR" + + "esponse\"^\202\323\344\223\002F\"A/v1/{name=projects/*/lo" + + "cations/*/keyRings/*/cryptoKeys/*}:decry" + + "pt:\001*\332A\017name,ciphertext\022\340\001\n\016AsymmetricSi" + + "gn\022*.google.cloud.kms.v1.AsymmetricSignR" + + "equest\032+.google.cloud.kms.v1.AsymmetricS" + + "ignResponse\"u\202\323\344\223\002a\"\\/v1/{name=projects/" + + "*/locations/*/keyRings/*/cryptoKeys/*/cr" + + "yptoKeyVersions/*}:asymmetricSign:\001*\332A\013n" + + "ame,digest\022\360\001\n\021AsymmetricDecrypt\022-.googl" + + "e.cloud.kms.v1.AsymmetricDecryptRequest\032" + + "..google.cloud.kms.v1.AsymmetricDecryptR" + + "esponse\"|\202\323\344\223\002d\"_/v1/{name=projects/*/lo" + + "cations/*/keyRings/*/cryptoKeys/*/crypto" + + "KeyVersions/*}:asymmetricDecrypt:\001*\332A\017na" + + "me,ciphertext\022\362\001\n\035UpdateCryptoKeyPrimary" + + "Version\0229.google.cloud.kms.v1.UpdateCryp" + + "toKeyPrimaryVersionRequest\032\036.google.clou" + + "d.kms.v1.CryptoKey\"v\202\323\344\223\002S\"N/v1/{name=pr" + + "ojects/*/locations/*/keyRings/*/cryptoKe" + + "ys/*}:updatePrimaryVersion:\001*\332A\032name,cry" + + "pto_key_version_id\022\336\001\n\027DestroyCryptoKeyV" + + "ersion\0223.google.cloud.kms.v1.DestroyCryp" + + "toKeyVersionRequest\032%.google.cloud.kms.v" + + "1.CryptoKeyVersion\"g\202\323\344\223\002Z\"U/v1/{name=pr" + + "ojects/*/locations/*/keyRings/*/cryptoKe" + + "ys/*/cryptoKeyVersions/*}:destroy:\001*\332A\004n" + + "ame\022\336\001\n\027RestoreCryptoKeyVersion\0223.google" + + ".cloud.kms.v1.RestoreCryptoKeyVersionReq" + + "uest\032%.google.cloud.kms.v1.CryptoKeyVers" + + "ion\"g\202\323\344\223\002Z\"U/v1/{name=projects/*/locati" + + "ons/*/keyRings/*/cryptoKeys/*/cryptoKeyV" + + "ersions/*}:restore:\001*\332A\004name\032t\312A\027cloudkm" + + "s.googleapis.com\322AWhttps://www.googleapi" + + "s.com/auth/cloud-platform,https://www.go" + + "ogleapis.com/auth/cloudkmsB\214\001\n\027com.googl" + + "e.cloud.kms.v1B\010KmsProtoP\001Z6google.golan" + + "g.org/genproto/googleapis/cloud/kms/v1;k" + + "ms\370\001\001\252\002\023Google.Cloud.Kms.V1\312\002\023Google\\Clo" + + "ud\\Kms\\V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -679,7 +680,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_kms_v1_LocationMetadata_descriptor, new java.lang.String[] { - "HsmAvailable", + "HsmAvailable", "EkmAvailable", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsResourcesProto.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsResourcesProto.java index 366d662d..e2a04a1c 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsResourcesProto.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsResourcesProto.java @@ -63,6 +63,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_kms_v1_ExternalProtectionLevelOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_kms_v1_ExternalProtectionLevelOptions_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -73,11 +77,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n#google/cloud/kms/v1/resources.proto\022\023g" - + "oogle.cloud.kms.v1\032\034google/api/annotatio" - + "ns.proto\032\037google/api/field_behavior.prot" - + "o\032\031google/api/resource.proto\032\036google/pro" - + "tobuf/duration.proto\032\037google/protobuf/ti" - + "mestamp.proto\"\265\001\n\007KeyRing\022\021\n\004name\030\001 \001(\tB" + + "oogle.cloud.kms.v1\032\037google/api/field_beh" + + "avior.proto\032\031google/api/resource.proto\032\036" + + "google/protobuf/duration.proto\032\037google/p" + + "rotobuf/timestamp.proto\032\034google/api/anno" + + "tations.proto\"\265\001\n\007KeyRing\022\021\n\004name\030\001 \001(\tB" + "\003\340A\003\0224\n\013create_time\030\002 \001(\0132\032.google.proto" + "buf.TimestampB\003\340A\003:a\352A^\n\037cloudkms.google" + "apis.com/KeyRing\022;projects/{project}/loc" @@ -112,7 +116,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030\005 \001(\014B\003\340A\003\"k\n\021AttestationFormat\022\"\n\036ATTE" + "STATION_FORMAT_UNSPECIFIED\020\000\022\030\n\024CAVIUM_V" + "1_COMPRESSED\020\003\022\030\n\024CAVIUM_V2_COMPRESSED\020\004" - + "\"\207\r\n\020CryptoKeyVersion\022\021\n\004name\030\001 \001(\tB\003\340A\003" + + "\"\212\016\n\020CryptoKeyVersion\022\021\n\004name\030\001 \001(\tB\003\340A\003" + "\022J\n\005state\030\003 \001(\0162;.google.cloud.kms.v1.Cr" + "yptoKeyVersion.CryptoKeyVersionState\022C\n\020" + "protection_level\030\007 \001(\0162$.google.cloud.km" @@ -129,75 +133,84 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "mestampB\003\340A\003\022\027\n\nimport_job\030\016 \001(\tB\003\340A\003\0224\n" + "\013import_time\030\017 \001(\0132\032.google.protobuf.Tim" + "estampB\003\340A\003\022\"\n\025import_failure_reason\030\020 \001" - + "(\tB\003\340A\003\"\234\004\n\031CryptoKeyVersionAlgorithm\022,\n" - + "(CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIE" - + "D\020\000\022\037\n\033GOOGLE_SYMMETRIC_ENCRYPTION\020\001\022\034\n\030" - + "RSA_SIGN_PSS_2048_SHA256\020\002\022\034\n\030RSA_SIGN_P" - + "SS_3072_SHA256\020\003\022\034\n\030RSA_SIGN_PSS_4096_SH" - + "A256\020\004\022\034\n\030RSA_SIGN_PSS_4096_SHA512\020\017\022\036\n\032" - + "RSA_SIGN_PKCS1_2048_SHA256\020\005\022\036\n\032RSA_SIGN" - + "_PKCS1_3072_SHA256\020\006\022\036\n\032RSA_SIGN_PKCS1_4" - + "096_SHA256\020\007\022\036\n\032RSA_SIGN_PKCS1_4096_SHA5" - + "12\020\020\022 \n\034RSA_DECRYPT_OAEP_2048_SHA256\020\010\022 " - + "\n\034RSA_DECRYPT_OAEP_3072_SHA256\020\t\022 \n\034RSA_" - + "DECRYPT_OAEP_4096_SHA256\020\n\022 \n\034RSA_DECRYP" - + "T_OAEP_4096_SHA512\020\021\022\027\n\023EC_SIGN_P256_SHA" - + "256\020\014\022\027\n\023EC_SIGN_P384_SHA384\020\r\"\301\001\n\025Crypt" - + "oKeyVersionState\022(\n$CRYPTO_KEY_VERSION_S" - + "TATE_UNSPECIFIED\020\000\022\026\n\022PENDING_GENERATION" - + "\020\005\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002\022\r\n\tDESTROY" - + "ED\020\003\022\025\n\021DESTROY_SCHEDULED\020\004\022\022\n\016PENDING_I" - + "MPORT\020\006\022\021\n\rIMPORT_FAILED\020\007\"I\n\024CryptoKeyV" - + "ersionView\022\'\n#CRYPTO_KEY_VERSION_VIEW_UN" - + "SPECIFIED\020\000\022\010\n\004FULL\020\001:\252\001\352A\246\001\n(cloudkms.g" - + "oogleapis.com/CryptoKeyVersion\022zprojects" - + "/{project}/locations/{location}/keyRings" - + "/{key_ring}/cryptoKeys/{crypto_key}/cryp" - + "toKeyVersions/{crypto_key_version}\"l\n\tPu" - + "blicKey\022\013\n\003pem\030\001 \001(\t\022R\n\talgorithm\030\002 \001(\0162" - + "?.google.cloud.kms.v1.CryptoKeyVersion.C" - + "ryptoKeyVersionAlgorithm\"\333\007\n\tImportJob\022\021" - + "\n\004name\030\001 \001(\tB\003\340A\003\022J\n\rimport_method\030\002 \001(\016" - + "2+.google.cloud.kms.v1.ImportJob.ImportM" - + "ethodB\006\340A\002\340A\005\022F\n\020protection_level\030\t \001(\0162" - + "$.google.cloud.kms.v1.ProtectionLevelB\006\340" - + "A\002\340A\005\0224\n\013create_time\030\003 \001(\0132\032.google.prot" - + "obuf.TimestampB\003\340A\003\0226\n\rgenerate_time\030\004 \001" - + "(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013e" - + "xpire_time\030\005 \001(\0132\032.google.protobuf.Times" - + "tampB\003\340A\003\022:\n\021expire_event_time\030\n \001(\0132\032.g" - + "oogle.protobuf.TimestampB\003\340A\003\022A\n\005state\030\006" - + " \001(\0162-.google.cloud.kms.v1.ImportJob.Imp" - + "ortJobStateB\003\340A\003\022I\n\npublic_key\030\007 \001(\01320.g" - + "oogle.cloud.kms.v1.ImportJob.WrappingPub" - + "licKeyB\003\340A\003\022F\n\013attestation\030\010 \001(\0132,.googl" - + "e.cloud.kms.v1.KeyOperationAttestationB\003" - + "\340A\003\032 \n\021WrappingPublicKey\022\013\n\003pem\030\001 \001(\t\"m\n" - + "\014ImportMethod\022\035\n\031IMPORT_METHOD_UNSPECIFI" - + "ED\020\000\022\036\n\032RSA_OAEP_3072_SHA1_AES_256\020\001\022\036\n\032" - + "RSA_OAEP_4096_SHA1_AES_256\020\002\"c\n\016ImportJo" - + "bState\022 \n\034IMPORT_JOB_STATE_UNSPECIFIED\020\000" - + "\022\026\n\022PENDING_GENERATION\020\001\022\n\n\006ACTIVE\020\002\022\013\n\007" - + "EXPIRED\020\003:{\352Ax\n!cloudkms.googleapis.com/" - + "ImportJob\022Sprojects/{project}/locations/" - + "{location}/keyRings/{key_ring}/importJob" - + "s/{import_job}*X\n\017ProtectionLevel\022 \n\034PRO" - + "TECTION_LEVEL_UNSPECIFIED\020\000\022\014\n\010SOFTWARE\020" - + "\001\022\007\n\003HSM\020\002\022\014\n\010EXTERNAL\020\003B\225\001\n\027com.google." - + "cloud.kms.v1B\021KmsResourcesProtoP\001Z6googl" - + "e.golang.org/genproto/googleapis/cloud/k" - + "ms/v1;kms\370\001\001\252\002\023Google.Cloud.Kms.V1\312\002\023Goo" - + "gle\\Cloud\\Kms\\V1b\006proto3" + + "(\tB\003\340A\003\022^\n!external_protection_level_opt" + + "ions\030\021 \001(\01323.google.cloud.kms.v1.Externa" + + "lProtectionLevelOptions\"\277\004\n\031CryptoKeyVer" + + "sionAlgorithm\022,\n(CRYPTO_KEY_VERSION_ALGO" + + "RITHM_UNSPECIFIED\020\000\022\037\n\033GOOGLE_SYMMETRIC_" + + "ENCRYPTION\020\001\022\034\n\030RSA_SIGN_PSS_2048_SHA256" + + "\020\002\022\034\n\030RSA_SIGN_PSS_3072_SHA256\020\003\022\034\n\030RSA_" + + "SIGN_PSS_4096_SHA256\020\004\022\034\n\030RSA_SIGN_PSS_4" + + "096_SHA512\020\017\022\036\n\032RSA_SIGN_PKCS1_2048_SHA2" + + "56\020\005\022\036\n\032RSA_SIGN_PKCS1_3072_SHA256\020\006\022\036\n\032" + + "RSA_SIGN_PKCS1_4096_SHA256\020\007\022\036\n\032RSA_SIGN" + + "_PKCS1_4096_SHA512\020\020\022 \n\034RSA_DECRYPT_OAEP" + + "_2048_SHA256\020\010\022 \n\034RSA_DECRYPT_OAEP_3072_" + + "SHA256\020\t\022 \n\034RSA_DECRYPT_OAEP_4096_SHA256" + + "\020\n\022 \n\034RSA_DECRYPT_OAEP_4096_SHA512\020\021\022\027\n\023" + + "EC_SIGN_P256_SHA256\020\014\022\027\n\023EC_SIGN_P384_SH" + + "A384\020\r\022!\n\035EXTERNAL_SYMMETRIC_ENCRYPTION\020" + + "\022\"\301\001\n\025CryptoKeyVersionState\022(\n$CRYPTO_KE" + + "Y_VERSION_STATE_UNSPECIFIED\020\000\022\026\n\022PENDING" + + "_GENERATION\020\005\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002" + + "\022\r\n\tDESTROYED\020\003\022\025\n\021DESTROY_SCHEDULED\020\004\022\022" + + "\n\016PENDING_IMPORT\020\006\022\021\n\rIMPORT_FAILED\020\007\"I\n" + + "\024CryptoKeyVersionView\022\'\n#CRYPTO_KEY_VERS" + + "ION_VIEW_UNSPECIFIED\020\000\022\010\n\004FULL\020\001:\252\001\352A\246\001\n" + + "(cloudkms.googleapis.com/CryptoKeyVersio" + + "n\022zprojects/{project}/locations/{locatio" + + "n}/keyRings/{key_ring}/cryptoKeys/{crypt" + + "o_key}/cryptoKeyVersions/{crypto_key_ver" + + "sion}\"\235\002\n\tPublicKey\022\013\n\003pem\030\001 \001(\t\022R\n\talgo" + + "rithm\030\002 \001(\0162?.google.cloud.kms.v1.Crypto" + + "KeyVersion.CryptoKeyVersionAlgorithm:\256\001\352" + + "A\252\001\n!cloudkms.googleapis.com/PublicKey\022\204" + + "\001projects/{project}/locations/{location}" + + "/keyRings/{key_ring}/cryptoKeys/{crypto_" + + "key}/cryptoKeyVersions/{crypto_key_versi" + + "on}/publicKey\"\333\007\n\tImportJob\022\021\n\004name\030\001 \001(" + + "\tB\003\340A\003\022J\n\rimport_method\030\002 \001(\0162+.google.c" + + "loud.kms.v1.ImportJob.ImportMethodB\006\340A\002\340" + + "A\005\022F\n\020protection_level\030\t \001(\0162$.google.cl" + + "oud.kms.v1.ProtectionLevelB\006\340A\002\340A\005\0224\n\013cr" + + "eate_time\030\003 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\0226\n\rgenerate_time\030\004 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\003\0224\n\013expire_time\030" + + "\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022:" + + "\n\021expire_event_time\030\n \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\022A\n\005state\030\006 \001(\0162-.goog" + + "le.cloud.kms.v1.ImportJob.ImportJobState" + + "B\003\340A\003\022I\n\npublic_key\030\007 \001(\01320.google.cloud" + + ".kms.v1.ImportJob.WrappingPublicKeyB\003\340A\003" + + "\022F\n\013attestation\030\010 \001(\0132,.google.cloud.kms" + + ".v1.KeyOperationAttestationB\003\340A\003\032 \n\021Wrap" + + "pingPublicKey\022\013\n\003pem\030\001 \001(\t\"m\n\014ImportMeth" + + "od\022\035\n\031IMPORT_METHOD_UNSPECIFIED\020\000\022\036\n\032RSA" + + "_OAEP_3072_SHA1_AES_256\020\001\022\036\n\032RSA_OAEP_40" + + "96_SHA1_AES_256\020\002\"c\n\016ImportJobState\022 \n\034I" + + "MPORT_JOB_STATE_UNSPECIFIED\020\000\022\026\n\022PENDING" + + "_GENERATION\020\001\022\n\n\006ACTIVE\020\002\022\013\n\007EXPIRED\020\003:{" + + "\352Ax\n!cloudkms.googleapis.com/ImportJob\022S" + + "projects/{project}/locations/{location}/" + + "keyRings/{key_ring}/importJobs/{import_j" + + "ob}\":\n\036ExternalProtectionLevelOptions\022\030\n" + + "\020external_key_uri\030\001 \001(\t*X\n\017ProtectionLev" + + "el\022 \n\034PROTECTION_LEVEL_UNSPECIFIED\020\000\022\014\n\010" + + "SOFTWARE\020\001\022\007\n\003HSM\020\002\022\014\n\010EXTERNAL\020\003B\225\001\n\027co" + + "m.google.cloud.kms.v1B\021KmsResourcesProto" + + "P\001Z6google.golang.org/genproto/googleapi" + + "s/cloud/kms/v1;kms\370\001\001\252\002\023Google.Cloud.Kms" + + ".V1\312\002\023Google\\Cloud\\Kms\\V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_cloud_kms_v1_KeyRing_descriptor = getDescriptor().getMessageTypes().get(0); @@ -265,6 +278,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ImportJob", "ImportTime", "ImportFailureReason", + "ExternalProtectionLevelOptions", }); internal_static_google_cloud_kms_v1_PublicKey_descriptor = getDescriptor().getMessageTypes().get(5); @@ -299,17 +313,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Pem", }); + internal_static_google_cloud_kms_v1_ExternalProtectionLevelOptions_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_kms_v1_ExternalProtectionLevelOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_kms_v1_ExternalProtectionLevelOptions_descriptor, + new java.lang.String[] { + "ExternalKeyUri", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/LocationMetadata.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/LocationMetadata.java index e3bf1b77..d664926b 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/LocationMetadata.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/LocationMetadata.java @@ -73,6 +73,11 @@ private LocationMetadata( hsmAvailable_ = input.readBool(); break; } + case 16: + { + ekmAvailable_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -126,6 +131,25 @@ public boolean getHsmAvailable() { return hsmAvailable_; } + public static final int EKM_AVAILABLE_FIELD_NUMBER = 2; + private boolean ekmAvailable_; + /** + * + * + *
+   * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with
+   * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
+   * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in this location.
+   * 
+ * + * bool ekm_available = 2; + * + * @return The ekmAvailable. + */ + public boolean getEkmAvailable() { + return ekmAvailable_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -143,6 +167,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (hsmAvailable_ != false) { output.writeBool(1, hsmAvailable_); } + if (ekmAvailable_ != false) { + output.writeBool(2, ekmAvailable_); + } unknownFields.writeTo(output); } @@ -155,6 +182,9 @@ public int getSerializedSize() { if (hsmAvailable_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, hsmAvailable_); } + if (ekmAvailable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, ekmAvailable_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -171,6 +201,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.kms.v1.LocationMetadata other = (com.google.cloud.kms.v1.LocationMetadata) obj; if (getHsmAvailable() != other.getHsmAvailable()) return false; + if (getEkmAvailable() != other.getEkmAvailable()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -184,6 +215,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + HSM_AVAILABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHsmAvailable()); + hash = (37 * hash) + EKM_AVAILABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEkmAvailable()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -331,6 +364,8 @@ public Builder clear() { super.clear(); hsmAvailable_ = false; + ekmAvailable_ = false; + return this; } @@ -359,6 +394,7 @@ public com.google.cloud.kms.v1.LocationMetadata buildPartial() { com.google.cloud.kms.v1.LocationMetadata result = new com.google.cloud.kms.v1.LocationMetadata(this); result.hsmAvailable_ = hsmAvailable_; + result.ekmAvailable_ = ekmAvailable_; onBuilt(); return result; } @@ -411,6 +447,9 @@ public Builder mergeFrom(com.google.cloud.kms.v1.LocationMetadata other) { if (other.getHsmAvailable() != false) { setHsmAvailable(other.getHsmAvailable()); } + if (other.getEkmAvailable() != false) { + setEkmAvailable(other.getEkmAvailable()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -497,6 +536,63 @@ public Builder clearHsmAvailable() { return this; } + private boolean ekmAvailable_; + /** + * + * + *
+     * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with
+     * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in this location.
+     * 
+ * + * bool ekm_available = 2; + * + * @return The ekmAvailable. + */ + public boolean getEkmAvailable() { + return ekmAvailable_; + } + /** + * + * + *
+     * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with
+     * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in this location.
+     * 
+ * + * bool ekm_available = 2; + * + * @param value The ekmAvailable to set. + * @return This builder for chaining. + */ + public Builder setEkmAvailable(boolean value) { + + ekmAvailable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with
+     * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
+     * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in this location.
+     * 
+ * + * bool ekm_available = 2; + * + * @return This builder for chaining. + */ + public Builder clearEkmAvailable() { + + ekmAvailable_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/LocationMetadataOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/LocationMetadataOrBuilder.java index f395d284..3b3ddcb8 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/LocationMetadataOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/LocationMetadataOrBuilder.java @@ -37,4 +37,19 @@ public interface LocationMetadataOrBuilder * @return The hsmAvailable. */ boolean getHsmAvailable(); + + /** + * + * + *
+   * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with
+   * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
+   * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in this location.
+   * 
+ * + * bool ekm_available = 2; + * + * @return The ekmAvailable. + */ + boolean getEkmAvailable(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKeyName.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKeyName.java new file mode 100644 index 00000000..87d07c2f --- /dev/null +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKeyName.java @@ -0,0 +1,277 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.kms.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class PublicKeyName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/publicKey"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String keyRing; + private final String cryptoKey; + private final String cryptoKeyVersion; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getKeyRing() { + return keyRing; + } + + public String getCryptoKey() { + return cryptoKey; + } + + public String getCryptoKeyVersion() { + return cryptoKeyVersion; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private PublicKeyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + keyRing = Preconditions.checkNotNull(builder.getKeyRing()); + cryptoKey = Preconditions.checkNotNull(builder.getCryptoKey()); + cryptoKeyVersion = Preconditions.checkNotNull(builder.getCryptoKeyVersion()); + } + + public static PublicKeyName of( + String project, String location, String keyRing, String cryptoKey, String cryptoKeyVersion) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setKeyRing(keyRing) + .setCryptoKey(cryptoKey) + .setCryptoKeyVersion(cryptoKeyVersion) + .build(); + } + + public static String format( + String project, String location, String keyRing, String cryptoKey, String cryptoKeyVersion) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setKeyRing(keyRing) + .setCryptoKey(cryptoKey) + .setCryptoKeyVersion(cryptoKeyVersion) + .build() + .toString(); + } + + public static PublicKeyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "PublicKeyName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("key_ring"), + matchMap.get("crypto_key"), + matchMap.get("crypto_key_version")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (PublicKeyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("keyRing", keyRing); + fieldMapBuilder.put("cryptoKey", cryptoKey); + fieldMapBuilder.put("cryptoKeyVersion", cryptoKeyVersion); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", + project, + "location", + location, + "key_ring", + keyRing, + "crypto_key", + cryptoKey, + "crypto_key_version", + cryptoKeyVersion); + } + + /** Builder for PublicKeyName. */ + public static class Builder { + + private String project; + private String location; + private String keyRing; + private String cryptoKey; + private String cryptoKeyVersion; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getKeyRing() { + return keyRing; + } + + public String getCryptoKey() { + return cryptoKey; + } + + public String getCryptoKeyVersion() { + return cryptoKeyVersion; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setKeyRing(String keyRing) { + this.keyRing = keyRing; + return this; + } + + public Builder setCryptoKey(String cryptoKey) { + this.cryptoKey = cryptoKey; + return this; + } + + public Builder setCryptoKeyVersion(String cryptoKeyVersion) { + this.cryptoKeyVersion = cryptoKeyVersion; + return this; + } + + private Builder() {} + + private Builder(PublicKeyName publicKeyName) { + project = publicKeyName.project; + location = publicKeyName.location; + keyRing = publicKeyName.keyRing; + cryptoKey = publicKeyName.cryptoKey; + cryptoKeyVersion = publicKeyName.cryptoKeyVersion; + } + + public PublicKeyName build() { + return new PublicKeyName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof PublicKeyName) { + PublicKeyName that = (PublicKeyName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.keyRing.equals(that.keyRing)) + && (this.cryptoKey.equals(that.cryptoKey)) + && (this.cryptoKeyVersion.equals(that.cryptoKeyVersion)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= keyRing.hashCode(); + h *= 1000003; + h ^= cryptoKey.hashCode(); + h *= 1000003; + h ^= cryptoKeyVersion.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/resources.proto b/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/resources.proto index 95e9b125..b2b7ab91 100644 --- a/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/resources.proto +++ b/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ syntax = "proto3"; package google.cloud.kms.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Kms.V1"; @@ -284,6 +284,9 @@ message CryptoKeyVersion { // ECDSA on the NIST P-384 curve with a SHA384 digest. EC_SIGN_P384_SHA384 = 13; + + // Algorithm representing symmetric encryption by an external key manager. + EXTERNAL_SYMMETRIC_ENCRYPTION = 18; } // The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating if it can be used. @@ -390,11 +393,21 @@ message CryptoKeyVersion { // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is // [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. string import_failure_reason = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // ExternalProtectionLevelOptions stores a group of additional fields for + // configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the + // [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level. + ExternalProtectionLevelOptions external_protection_level_options = 17; } // The public key for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Obtained via // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. message PublicKey { + option (google.api.resource) = { + type: "cloudkms.googleapis.com/PublicKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/publicKey" + }; + // The public key, encoded in PEM format. For more information, see the // [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for // [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and @@ -560,3 +573,11 @@ enum ProtectionLevel { // Crypto operations are performed by an external key manager. EXTERNAL = 3; } + +// ExternalProtectionLevelOptions stores a group of additional fields for +// configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the +// [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level. +message ExternalProtectionLevelOptions { + // The URI for an external resource that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. + string external_key_uri = 1; +} diff --git a/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/service.proto b/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/service.proto index 4dd5fd14..d0c8949c 100644 --- a/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/service.proto +++ b/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -870,4 +870,9 @@ message LocationMetadata { // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this location. bool hsm_available = 1; + + // Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + // [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in this location. + bool ekm_available = 2; } diff --git a/synth.metadata b/synth.metadata index 9c8bb5b2..e50297db 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,12 +1,13 @@ { - "updateTime": "2020-04-01T23:12:38.191647Z", + "updateTime": "2020-04-06T23:56:06.332294Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d4aa417ed2bba89c2d216900282bddfdafef6128", - "internalRef": "303010132" + "sha": "a005f045a301535eeb4c4b3fa7bb94eec9d22a8b", + "internalRef": "305026790", + "log": "a005f045a301535eeb4c4b3fa7bb94eec9d22a8b\nAdd support for Cloud EKM to the Cloud KMS service and resource protos.\n\nPiperOrigin-RevId: 305026790\n\n5077b1e4674afdbbf11dac3f5f43d36285ba53ff\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304836531\n\nd6cb4997910eda04c0c66c0f2fd043eeaa0f660d\nchore: enable gapic v2 and proto annotation for documentai API.\n\ncommitter @summer-ji-eng\n\nPiperOrigin-RevId: 304724866\n\n490bc556608bfa5b1548c9374b06152fa33d657e\nEnable gapicv2 for devtools/remoteworkers/v1test2\n\nCommitter: @miraleung\nPiperOrigin-RevId: 304718691\n\n9f78ce31a5bd7f4a63e3cf0ddf28221557adb7ed\nEnable gapicv2 for managedidentities/v1beta1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 304718676\n\n6e17d259b8e320bc51aa240cefef05ec753e2b83\ndocs: treat a dummy example URL as a string literal instead of a link\n\nPiperOrigin-RevId: 304716376\n\na8d76f99d3073aaccabdcc122c798a63e812c4fe\ndocs: change relative URLs to absolute URLs to fix broken links.\n\nPiperOrigin-RevId: 304702368\n\n65c749bc6a1d240416a0e6979381b67f97aff907\ndocs: fix formatting of some regexes and string literals.\n\nPiperOrigin-RevId: 304701150\n\n9119eefcd2b5ce845a680fa4ec4093ed733498f0\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304698702\n\n62a2a7cc33d3535638d220df238823eefcca930d\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304696461\n\n23848c8f64a5e81a239d6133378468185f1756dc\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304696192\n\n9514fa9e390a4c0715972c5b510cf4c10ad049a1\ndocs: change relative URLs to absolute URLs to fix broken links.\n\nPiperOrigin-RevId: 304695334\n\n0f7b1509a9a452808c3d07fe90fedfcea763d7d5\nfix: change config_schema_version to 2.0.0 for containeranalysis v1 gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304672648\n\n3d52f3c126fbfc31f067a7f54737b7f0dfbce163\nDialogflow weekly v2 library update:\n- Change `parent` field's resource_reference to specify child_type instead of type per client library generation requirement;\n- Change Session with its child resource pattern to support both projects/{project}/agent/sessions/{session} and projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session};\n- Fix `method_signature`\n- Regular documentation update\n\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 304635286\n\n4a6a01ce0ead505c245d11a2ce156de34800c58f\ndocs: change a relative URL to an absolute URL to fix broken links.\n\nPiperOrigin-RevId: 304633630\n\n1b969c28a6579265e89cd35e6c2ecacc89970e2d\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304620317\n\n5378173a889f9c7d83e36e52d38a6267190de692\nAdd v1beta2 SubmitJobAsOperation RPC to Dataproc.\n\nPiperOrigin-RevId: 304594381\n\n3d5d228a58bdf875e6147b228db3159010c735ee\nEnable visibility on the GetSnapshot and GetTopicSnapshots methods\n\nPiperOrigin-RevId: 304500143\n\n1346f5c11a0376bc82c5c03259b304de52671518\nRefresh public client library for Cloud Monitoring.\nIncrease default ListTimeSeries deadline to 90s.\n\nPiperOrigin-RevId: 304467075\n\n4a6cfccb4a32cb28db7366295d90078c6af3112f\ndocs: Fix link in monitoring summary description.\n\nPiperOrigin-RevId: 304438717\n\n6e2ea9a4b63a264090f1bd4b5b25766a3f634f3a\nfix: add interface name overrides back to logging gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304438432\n\n01f3ccbaa66cf3ae4e3b9fd140b1ecfbe54a3ed0\nFix: Add package/namespace options for C#, Ruby and PHP in remaining protos.\n\nPiperOrigin-RevId: 304416658\n\nb89abbf12cd3c086abddcd79adb0a653349f960a\nchore(google/maps): Rename nox.py to noxfile.py\n\nupstream wip fix here: https://github.com/googleapis/gapic-generator/pull/3156\n\nPiperOrigin-RevId: 304411146\n\nbbf26d7f11fae7789b13959bf100983c496c9807\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 304409906\n\n75047719f704d61f405cac6d7439637ab36c1232\nfix Dataproc: add missing `REQUIRED` annotation.\n\nPiperOrigin-RevId: 304305096\n\n7e1b880fd5d477176cf9b0bb9b137b9bea56e787\nAdd Ruby/PHP namespace options\n\nPiperOrigin-RevId: 304288402\n\naba342359b6743353195ca53f944fe71e6fb6cd4\nchore: add java assembly target for accesscontextmanager BUILD.bazel\n\nPiperOrigin-RevId: 304207684\n\ndc65f39f33cb139b3a2244199a3e722a4d94b679\nFor Secret Manager v1 and v1beta1, noted Secret ID character limitations.\n\nPiperOrigin-RevId: 304035052\n\n2ee8c4d06db823c29a127709e66c35e38b6e98ab\nchore(deps): Update gax-java dependency\nThis is to integrate java11 incompatibility fix\n\nPiperOrigin-RevId: 304032057\n\nb5c94cec71ea9b840dc0110a0275323313ecc85a\nchore: add java assembly target for orgpolicy BUILD.bazel\n\nPiperOrigin-RevId: 304021854\n\n690f4d6344197fde775230cec165a9db3b3929c7\nchore: use the latest protoc-java-resource-name-plugin in third_party/googleapis WORKSPACE.\n- trace up only one level when calculating parent types with singleton resource names\n\nPiperOrigin-RevId: 304007414\n\n87144228bd9920b824996355f27891310fad5a32\nEnable gapic v2 for DLP.\n\nCommitter: @hzyi-google\nPiperOrigin-RevId: 303999064\n\n17cfae00f2bb51cb1683f017da7e295a1b0f01a8\nAdd a new AuthorizationType for Data Source Definition.\n\nPiperOrigin-RevId: 303992863\n\n6da3d64919c006ef40cad2026f1e39084253afe2\nfix(google/maps): Change importpath to developers.google.com/maps/go.\n\nPiperOrigin-RevId: 303976942\n\n2983dccde54f0ce31793e1e628379616c468aea0\nbuild(google/maps): only modify root build.gradle with ext plugin\n\nPiperOrigin-RevId: 303975876\n\n00f0a285f2716ce57e98afe500e450b17b556ff8\nfix: Integerate gapic-generator java_gapic rules Java11 fix\n\nPiperOrigin-RevId: 303899179\n\na62857d26bd2ae15aec13a9244989e4104195b63\nfix: add proto_package to the artman config of dataproc v1beta2 to make artman smoketest pass.\n\nPiperOrigin-RevId: 303853989\n\nf260ba248df934fd4ddc22950fb529a59d79e0b5\nchore: use the latest gapic-generator in googleapis WORKSPACE.\n- PHP multi-pattern resource name support.\n- Trace up only one level when calculating parent types with singleton resource names\n\nPiperOrigin-RevId: 303836059\n\n89c7d455fffa5d8a7e73c2f4da43a74605ed72a6\nfeat: Add client library options to OsConfigService v1 patch APIs.\n\nPiperOrigin-RevId: 303831150\n\na45b0a2a8f6f497547ab531a4da978c76441d076\ndataproc: add back non-default retry parameters.\ncommitter: @hzyi-google\n\nPiperOrigin-RevId: 303830177\n\nad895ce95f1f6d2261fbbc3e8897958294e4f017\nenable gapic v2 for containeranalysis.\ncommitter: @hzyi-google\n\nPiperOrigin-RevId: 303821111\n\nbaf83e521834b67397839bcbe2d7864b49e38787\nAdding \"resource_reference\" annotations to services.\n\nPiperOrigin-RevId: 303791704\n\n7be2811ad17013a5ea24cd75dfd9e399dd6e18fe\nfix: Update gapic-generator version to pickup discogapic fixes\n\nPiperOrigin-RevId: 303545940\n\nb655808b3481a92f478ae2f828a6ce8220e40f32\ncloudasset: add org policy and access context manager protos to client libraries.\n\nPiperOrigin-RevId: 303527638\n\nd8c5da9a9471659b51d5862dd2ea7ad3c4bc49ef\nPopulate BAZEL.build files for AccessContextManager.\n\nPiperOrigin-RevId: 303526825\n\ncf9db7161cb9d4dbef06cd8bf5354ec485e51e2d\nPopulate BAZEL.build files for OrgPolicy.\n\nPiperOrigin-RevId: 303526702\n\n558b800ed594acc02555cc560fbb39c0e42bc438\nchore: turn on gapic v2 for Dataproc API.\nfix:\n- add missing method signatures\n- remove resource_reference not on a string field\n- adjust resource name pattern orders\n\nPiperOrigin-RevId: 303431167\n\n8eb444cf5ff63f68d826acbb37b2ac3da58655fb\nAdd logging protos for Recommender v1beta1.\n\nPiperOrigin-RevId: 303426030\n\n48a166ce9f6e2a88b10947341b37336fe9dd3478\nPush of PHP, C# and Ruby namespaces\n\nPiperOrigin-RevId: 303302813\n\n42f77489b300df2e27c84a7b65c4e8f04da20981\nThis is first release of the API protos and Bazel BUILD files for the Analytics Management API V1alpha.\n\nPiperOrigin-RevId: 303241805\n\n8bea81bfa461698981b3d3a488a95633d2f6e9ff\nchore: use latest protoc-java-resource-name-plugin in bazel WORKSPACE.\nnew commits:\n- fix: stop generating `parseList` and `toStringList` if a multi-pattern resource name has subclasses (#79)\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 303197602\n\nb14af92e565264675d6b12cd2c0ded6c94ddd7f8\nfix talent API incorrect placeholders in two resource name patterns.\ncommitter: @hzyi-google\n\nPiperOrigin-RevId: 303189497\n\n8e22db908ae09e1f7e2802c03b4563fd6b524e0e\nchore(google/maps): Update postprocessing script for Java.\n\n- Update root build.gradle to load local plugin\n- Change com.google.api.grpc group to com.google.maps\n\nPiperOrigin-RevId: 303176850\n\n65816afa71e588252b7119dc723592abe51ea106\nbazel: update gapic-generator-go to v0.12.5 and gapic-generator hash\n\nChanges to gapic-generator-go include:\n* feat: strip invalid link references in comments\n* chore: updating Go deps in bazel repositories\n\nChanges to gapic-generator include:\n* fix: bazel go build gen check for cloud in proto pkg name\n* Revert \"feat: allow static substitution for group name\"\n\nPiperOrigin-RevId: 303150338\n\n" } }, {