1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/kms/v1/service.proto 18 19 package com.google.cloud.kms.v1; 20 21 public interface ImportCryptoKeyVersionRequestOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.kms.v1.ImportCryptoKeyVersionRequest) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the 31 * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. 32 * The create permission is only required on this key when creating a new 33 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. 34 * </pre> 35 * 36 * <code> 37 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 38 * </code> 39 * 40 * @return The parent. 41 */ getParent()42 java.lang.String getParent(); 43 /** 44 * 45 * 46 * <pre> 47 * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the 48 * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. 49 * The create permission is only required on this key when creating a new 50 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. 51 * </pre> 52 * 53 * <code> 54 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 55 * </code> 56 * 57 * @return The bytes for parent. 58 */ getParentBytes()59 com.google.protobuf.ByteString getParentBytes(); 60 61 /** 62 * 63 * 64 * <pre> 65 * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of 66 * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to 67 * target for an import operation. If this field is not present, a new 68 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the 69 * supplied key material is created. 70 * If this field is present, the supplied key material is imported into 71 * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To 72 * import into an existing 73 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the 74 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of 75 * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], 76 * have been previously created via [ImportCryptoKeyVersion][], and be in 77 * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] 78 * or 79 * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] 80 * state. The key material and algorithm must match the previous 81 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the 82 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained 83 * key material. 84 * </pre> 85 * 86 * <code> 87 * string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } 88 * </code> 89 * 90 * @return The cryptoKeyVersion. 91 */ getCryptoKeyVersion()92 java.lang.String getCryptoKeyVersion(); 93 /** 94 * 95 * 96 * <pre> 97 * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of 98 * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to 99 * target for an import operation. If this field is not present, a new 100 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the 101 * supplied key material is created. 102 * If this field is present, the supplied key material is imported into 103 * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To 104 * import into an existing 105 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the 106 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of 107 * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], 108 * have been previously created via [ImportCryptoKeyVersion][], and be in 109 * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] 110 * or 111 * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] 112 * state. The key material and algorithm must match the previous 113 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the 114 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained 115 * key material. 116 * </pre> 117 * 118 * <code> 119 * string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } 120 * </code> 121 * 122 * @return The bytes for cryptoKeyVersion. 123 */ getCryptoKeyVersionBytes()124 com.google.protobuf.ByteString getCryptoKeyVersionBytes(); 125 126 /** 127 * 128 * 129 * <pre> 130 * Required. The 131 * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] 132 * of the key being imported. This does not need to match the 133 * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the 134 * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. 135 * </pre> 136 * 137 * <code> 138 * .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; 139 * </code> 140 * 141 * @return The enum numeric value on the wire for algorithm. 142 */ getAlgorithmValue()143 int getAlgorithmValue(); 144 /** 145 * 146 * 147 * <pre> 148 * Required. The 149 * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] 150 * of the key being imported. This does not need to match the 151 * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the 152 * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. 153 * </pre> 154 * 155 * <code> 156 * .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; 157 * </code> 158 * 159 * @return The algorithm. 160 */ getAlgorithm()161 com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm getAlgorithm(); 162 163 /** 164 * 165 * 166 * <pre> 167 * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the 168 * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key 169 * material. 170 * </pre> 171 * 172 * <code>string import_job = 4 [(.google.api.field_behavior) = REQUIRED];</code> 173 * 174 * @return The importJob. 175 */ getImportJob()176 java.lang.String getImportJob(); 177 /** 178 * 179 * 180 * <pre> 181 * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the 182 * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key 183 * material. 184 * </pre> 185 * 186 * <code>string import_job = 4 [(.google.api.field_behavior) = REQUIRED];</code> 187 * 188 * @return The bytes for importJob. 189 */ getImportJobBytes()190 com.google.protobuf.ByteString getImportJobBytes(); 191 192 /** 193 * 194 * 195 * <pre> 196 * Optional. The wrapped key material to import. 197 * Before wrapping, key material must be formatted. If importing symmetric key 198 * material, the expected key material format is plain bytes. If importing 199 * asymmetric key material, the expected key material format is PKCS#8-encoded 200 * DER (the PrivateKeyInfo structure from RFC 5208). 201 * When wrapping with import methods 202 * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] 203 * or 204 * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] 205 * or 206 * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] 207 * or 208 * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), 209 * this field must contain the concatenation of: 210 * <ol> 211 * <li>An ephemeral AES-256 wrapping key wrapped with the 212 * [public_key][google.cloud.kms.v1.ImportJob.public_key] using 213 * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty 214 * label. 215 * </li> 216 * <li>The formatted key to be imported, wrapped with the ephemeral AES-256 217 * key using AES-KWP (RFC 5649). 218 * </li> 219 * </ol> 220 * This format is the same as the format produced by PKCS#11 mechanism 221 * CKM_RSA_AES_KEY_WRAP. 222 * When wrapping with import methods 223 * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] 224 * or 225 * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), 226 * this field must contain the formatted key to be imported, wrapped with the 227 * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP 228 * with SHA-256, MGF1 with SHA-256, and an empty label. 229 * </pre> 230 * 231 * <code>bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 232 * 233 * @return The wrappedKey. 234 */ getWrappedKey()235 com.google.protobuf.ByteString getWrappedKey(); 236 237 /** 238 * 239 * 240 * <pre> 241 * Optional. This field has the same meaning as 242 * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. 243 * Prefer to use that field in new work. Either that field or this field 244 * (but not both) must be specified. 245 * </pre> 246 * 247 * <code>bytes rsa_aes_wrapped_key = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 248 * 249 * @return Whether the rsaAesWrappedKey field is set. 250 */ hasRsaAesWrappedKey()251 boolean hasRsaAesWrappedKey(); 252 /** 253 * 254 * 255 * <pre> 256 * Optional. This field has the same meaning as 257 * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. 258 * Prefer to use that field in new work. Either that field or this field 259 * (but not both) must be specified. 260 * </pre> 261 * 262 * <code>bytes rsa_aes_wrapped_key = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 263 * 264 * @return The rsaAesWrappedKey. 265 */ getRsaAesWrappedKey()266 com.google.protobuf.ByteString getRsaAesWrappedKey(); 267 268 public com.google.cloud.kms.v1.ImportCryptoKeyVersionRequest.WrappedKeyMaterialCase getWrappedKeyMaterialCase()269 getWrappedKeyMaterialCase(); 270 } 271