You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1017 lines
46 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/cloud/kms/v1/resources.proto
  3. package kms // import "google.golang.org/genproto/googleapis/cloud/kms/v1"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import duration "github.com/golang/protobuf/ptypes/duration"
  8. import timestamp "github.com/golang/protobuf/ptypes/timestamp"
  9. import _ "google.golang.org/genproto/googleapis/api/annotations"
  10. // Reference imports to suppress errors if they are not otherwise used.
  11. var _ = proto.Marshal
  12. var _ = fmt.Errorf
  13. var _ = math.Inf
  14. // This is a compile-time assertion to ensure that this generated file
  15. // is compatible with the proto package it is being compiled against.
  16. // A compilation error at this line likely means your copy of the
  17. // proto package needs to be updated.
  18. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  19. // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] specifies how
  20. // cryptographic operations are performed.
  21. type ProtectionLevel int32
  22. const (
  23. // Not specified.
  24. ProtectionLevel_PROTECTION_LEVEL_UNSPECIFIED ProtectionLevel = 0
  25. // Crypto operations are performed in software.
  26. ProtectionLevel_SOFTWARE ProtectionLevel = 1
  27. // Crypto operations are performed in a Hardware Security Module.
  28. ProtectionLevel_HSM ProtectionLevel = 2
  29. )
  30. var ProtectionLevel_name = map[int32]string{
  31. 0: "PROTECTION_LEVEL_UNSPECIFIED",
  32. 1: "SOFTWARE",
  33. 2: "HSM",
  34. }
  35. var ProtectionLevel_value = map[string]int32{
  36. "PROTECTION_LEVEL_UNSPECIFIED": 0,
  37. "SOFTWARE": 1,
  38. "HSM": 2,
  39. }
  40. func (x ProtectionLevel) String() string {
  41. return proto.EnumName(ProtectionLevel_name, int32(x))
  42. }
  43. func (ProtectionLevel) EnumDescriptor() ([]byte, []int) {
  44. return fileDescriptor_resources_812ab0e7462a1529, []int{0}
  45. }
  46. // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose]
  47. // describes the cryptographic capabilities of a
  48. // [CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used
  49. // for the operations allowed by its purpose.
  50. type CryptoKey_CryptoKeyPurpose int32
  51. const (
  52. // Not specified.
  53. CryptoKey_CRYPTO_KEY_PURPOSE_UNSPECIFIED CryptoKey_CryptoKeyPurpose = 0
  54. // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
  55. // with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and
  56. // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
  57. CryptoKey_ENCRYPT_DECRYPT CryptoKey_CryptoKeyPurpose = 1
  58. // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
  59. // with
  60. // [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]
  61. // and
  62. // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
  63. CryptoKey_ASYMMETRIC_SIGN CryptoKey_CryptoKeyPurpose = 5
  64. // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
  65. // with
  66. // [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]
  67. // and
  68. // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
  69. CryptoKey_ASYMMETRIC_DECRYPT CryptoKey_CryptoKeyPurpose = 6
  70. )
  71. var CryptoKey_CryptoKeyPurpose_name = map[int32]string{
  72. 0: "CRYPTO_KEY_PURPOSE_UNSPECIFIED",
  73. 1: "ENCRYPT_DECRYPT",
  74. 5: "ASYMMETRIC_SIGN",
  75. 6: "ASYMMETRIC_DECRYPT",
  76. }
  77. var CryptoKey_CryptoKeyPurpose_value = map[string]int32{
  78. "CRYPTO_KEY_PURPOSE_UNSPECIFIED": 0,
  79. "ENCRYPT_DECRYPT": 1,
  80. "ASYMMETRIC_SIGN": 5,
  81. "ASYMMETRIC_DECRYPT": 6,
  82. }
  83. func (x CryptoKey_CryptoKeyPurpose) String() string {
  84. return proto.EnumName(CryptoKey_CryptoKeyPurpose_name, int32(x))
  85. }
  86. func (CryptoKey_CryptoKeyPurpose) EnumDescriptor() ([]byte, []int) {
  87. return fileDescriptor_resources_812ab0e7462a1529, []int{1, 0}
  88. }
  89. // Attestion formats provided by the HSM.
  90. type KeyOperationAttestation_AttestationFormat int32
  91. const (
  92. KeyOperationAttestation_ATTESTATION_FORMAT_UNSPECIFIED KeyOperationAttestation_AttestationFormat = 0
  93. // Cavium HSM attestation compressed with gzip. Note that this format is
  94. // defined by Cavium and subject to change at any time.
  95. KeyOperationAttestation_CAVIUM_V1_COMPRESSED KeyOperationAttestation_AttestationFormat = 3
  96. // Cavium HSM attestation V2 compressed with gzip. This is a new format
  97. // Introduced in Cavium's version 3.2-08
  98. KeyOperationAttestation_CAVIUM_V2_COMPRESSED KeyOperationAttestation_AttestationFormat = 4
  99. )
  100. var KeyOperationAttestation_AttestationFormat_name = map[int32]string{
  101. 0: "ATTESTATION_FORMAT_UNSPECIFIED",
  102. 3: "CAVIUM_V1_COMPRESSED",
  103. 4: "CAVIUM_V2_COMPRESSED",
  104. }
  105. var KeyOperationAttestation_AttestationFormat_value = map[string]int32{
  106. "ATTESTATION_FORMAT_UNSPECIFIED": 0,
  107. "CAVIUM_V1_COMPRESSED": 3,
  108. "CAVIUM_V2_COMPRESSED": 4,
  109. }
  110. func (x KeyOperationAttestation_AttestationFormat) String() string {
  111. return proto.EnumName(KeyOperationAttestation_AttestationFormat_name, int32(x))
  112. }
  113. func (KeyOperationAttestation_AttestationFormat) EnumDescriptor() ([]byte, []int) {
  114. return fileDescriptor_resources_812ab0e7462a1529, []int{3, 0}
  115. }
  116. // The algorithm of the
  117. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what
  118. // parameters must be used for each cryptographic operation.
  119. //
  120. // The
  121. // [GOOGLE_SYMMETRIC_ENCRYPTION][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION]
  122. // algorithm is usable with
  123. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
  124. // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
  125. //
  126. // Algorithms beginning with "RSA_SIGN_" are usable with
  127. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
  128. // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
  129. //
  130. // The fields in the name after "RSA_SIGN_" correspond to the following
  131. // parameters: padding algorithm, modulus bit length, and digest algorithm.
  132. //
  133. // For PSS, the salt length used is equal to the length of digest
  134. // algorithm. For example,
  135. // [RSA_SIGN_PSS_2048_SHA256][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256]
  136. // will use PSS with a salt length of 256 bits or 32 bytes.
  137. //
  138. // Algorithms beginning with "RSA_DECRYPT_" are usable with
  139. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
  140. // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
  141. //
  142. // The fields in the name after "RSA_DECRYPT_" correspond to the following
  143. // parameters: padding algorithm, modulus bit length, and digest algorithm.
  144. //
  145. // Algorithms beginning with "EC_SIGN_" are usable with
  146. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
  147. // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
  148. //
  149. // The fields in the name after "EC_SIGN_" correspond to the following
  150. // parameters: elliptic curve, digest algorithm.
  151. type CryptoKeyVersion_CryptoKeyVersionAlgorithm int32
  152. const (
  153. // Not specified.
  154. CryptoKeyVersion_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED CryptoKeyVersion_CryptoKeyVersionAlgorithm = 0
  155. // Creates symmetric encryption keys.
  156. CryptoKeyVersion_GOOGLE_SYMMETRIC_ENCRYPTION CryptoKeyVersion_CryptoKeyVersionAlgorithm = 1
  157. // RSASSA-PSS 2048 bit key with a SHA256 digest.
  158. CryptoKeyVersion_RSA_SIGN_PSS_2048_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 2
  159. // RSASSA-PSS 3072 bit key with a SHA256 digest.
  160. CryptoKeyVersion_RSA_SIGN_PSS_3072_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 3
  161. // RSASSA-PSS 4096 bit key with a SHA256 digest.
  162. CryptoKeyVersion_RSA_SIGN_PSS_4096_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 4
  163. // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
  164. CryptoKeyVersion_RSA_SIGN_PKCS1_2048_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 5
  165. // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
  166. CryptoKeyVersion_RSA_SIGN_PKCS1_3072_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 6
  167. // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
  168. CryptoKeyVersion_RSA_SIGN_PKCS1_4096_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 7
  169. // RSAES-OAEP 2048 bit key with a SHA256 digest.
  170. CryptoKeyVersion_RSA_DECRYPT_OAEP_2048_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 8
  171. // RSAES-OAEP 3072 bit key with a SHA256 digest.
  172. CryptoKeyVersion_RSA_DECRYPT_OAEP_3072_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 9
  173. // RSAES-OAEP 4096 bit key with a SHA256 digest.
  174. CryptoKeyVersion_RSA_DECRYPT_OAEP_4096_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 10
  175. // ECDSA on the NIST P-256 curve with a SHA256 digest.
  176. CryptoKeyVersion_EC_SIGN_P256_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 12
  177. // ECDSA on the NIST P-384 curve with a SHA384 digest.
  178. CryptoKeyVersion_EC_SIGN_P384_SHA384 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 13
  179. )
  180. var CryptoKeyVersion_CryptoKeyVersionAlgorithm_name = map[int32]string{
  181. 0: "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED",
  182. 1: "GOOGLE_SYMMETRIC_ENCRYPTION",
  183. 2: "RSA_SIGN_PSS_2048_SHA256",
  184. 3: "RSA_SIGN_PSS_3072_SHA256",
  185. 4: "RSA_SIGN_PSS_4096_SHA256",
  186. 5: "RSA_SIGN_PKCS1_2048_SHA256",
  187. 6: "RSA_SIGN_PKCS1_3072_SHA256",
  188. 7: "RSA_SIGN_PKCS1_4096_SHA256",
  189. 8: "RSA_DECRYPT_OAEP_2048_SHA256",
  190. 9: "RSA_DECRYPT_OAEP_3072_SHA256",
  191. 10: "RSA_DECRYPT_OAEP_4096_SHA256",
  192. 12: "EC_SIGN_P256_SHA256",
  193. 13: "EC_SIGN_P384_SHA384",
  194. }
  195. var CryptoKeyVersion_CryptoKeyVersionAlgorithm_value = map[string]int32{
  196. "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED": 0,
  197. "GOOGLE_SYMMETRIC_ENCRYPTION": 1,
  198. "RSA_SIGN_PSS_2048_SHA256": 2,
  199. "RSA_SIGN_PSS_3072_SHA256": 3,
  200. "RSA_SIGN_PSS_4096_SHA256": 4,
  201. "RSA_SIGN_PKCS1_2048_SHA256": 5,
  202. "RSA_SIGN_PKCS1_3072_SHA256": 6,
  203. "RSA_SIGN_PKCS1_4096_SHA256": 7,
  204. "RSA_DECRYPT_OAEP_2048_SHA256": 8,
  205. "RSA_DECRYPT_OAEP_3072_SHA256": 9,
  206. "RSA_DECRYPT_OAEP_4096_SHA256": 10,
  207. "EC_SIGN_P256_SHA256": 12,
  208. "EC_SIGN_P384_SHA384": 13,
  209. }
  210. func (x CryptoKeyVersion_CryptoKeyVersionAlgorithm) String() string {
  211. return proto.EnumName(CryptoKeyVersion_CryptoKeyVersionAlgorithm_name, int32(x))
  212. }
  213. func (CryptoKeyVersion_CryptoKeyVersionAlgorithm) EnumDescriptor() ([]byte, []int) {
  214. return fileDescriptor_resources_812ab0e7462a1529, []int{4, 0}
  215. }
  216. // The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion],
  217. // indicating if it can be used.
  218. type CryptoKeyVersion_CryptoKeyVersionState int32
  219. const (
  220. // Not specified.
  221. CryptoKeyVersion_CRYPTO_KEY_VERSION_STATE_UNSPECIFIED CryptoKeyVersion_CryptoKeyVersionState = 0
  222. // This version is still being generated. It may not be used, enabled,
  223. // disabled, or destroyed yet. Cloud KMS will automatically mark this
  224. // version
  225. // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
  226. // as soon as the version is ready.
  227. CryptoKeyVersion_PENDING_GENERATION CryptoKeyVersion_CryptoKeyVersionState = 5
  228. // This version may be used for cryptographic operations.
  229. CryptoKeyVersion_ENABLED CryptoKeyVersion_CryptoKeyVersionState = 1
  230. // This version may not be used, but the key material is still available,
  231. // and the version can be placed back into the
  232. // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
  233. // state.
  234. CryptoKeyVersion_DISABLED CryptoKeyVersion_CryptoKeyVersionState = 2
  235. // This version is destroyed, and the key material is no longer stored.
  236. // A version may not leave this state once entered.
  237. CryptoKeyVersion_DESTROYED CryptoKeyVersion_CryptoKeyVersionState = 3
  238. // This version is scheduled for destruction, and will be destroyed soon.
  239. // Call
  240. // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
  241. // to put it back into the
  242. // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED]
  243. // state.
  244. CryptoKeyVersion_DESTROY_SCHEDULED CryptoKeyVersion_CryptoKeyVersionState = 4
  245. )
  246. var CryptoKeyVersion_CryptoKeyVersionState_name = map[int32]string{
  247. 0: "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED",
  248. 5: "PENDING_GENERATION",
  249. 1: "ENABLED",
  250. 2: "DISABLED",
  251. 3: "DESTROYED",
  252. 4: "DESTROY_SCHEDULED",
  253. }
  254. var CryptoKeyVersion_CryptoKeyVersionState_value = map[string]int32{
  255. "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED": 0,
  256. "PENDING_GENERATION": 5,
  257. "ENABLED": 1,
  258. "DISABLED": 2,
  259. "DESTROYED": 3,
  260. "DESTROY_SCHEDULED": 4,
  261. }
  262. func (x CryptoKeyVersion_CryptoKeyVersionState) String() string {
  263. return proto.EnumName(CryptoKeyVersion_CryptoKeyVersionState_name, int32(x))
  264. }
  265. func (CryptoKeyVersion_CryptoKeyVersionState) EnumDescriptor() ([]byte, []int) {
  266. return fileDescriptor_resources_812ab0e7462a1529, []int{4, 1}
  267. }
  268. // A view for [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]s.
  269. // Controls the level of detail returned for
  270. // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] in
  271. // [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions]
  272. // and
  273. // [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
  274. type CryptoKeyVersion_CryptoKeyVersionView int32
  275. const (
  276. // Default view for each
  277. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not
  278. // include the
  279. // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field.
  280. CryptoKeyVersion_CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED CryptoKeyVersion_CryptoKeyVersionView = 0
  281. // Provides all fields in each
  282. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the
  283. // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation].
  284. CryptoKeyVersion_FULL CryptoKeyVersion_CryptoKeyVersionView = 1
  285. )
  286. var CryptoKeyVersion_CryptoKeyVersionView_name = map[int32]string{
  287. 0: "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED",
  288. 1: "FULL",
  289. }
  290. var CryptoKeyVersion_CryptoKeyVersionView_value = map[string]int32{
  291. "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED": 0,
  292. "FULL": 1,
  293. }
  294. func (x CryptoKeyVersion_CryptoKeyVersionView) String() string {
  295. return proto.EnumName(CryptoKeyVersion_CryptoKeyVersionView_name, int32(x))
  296. }
  297. func (CryptoKeyVersion_CryptoKeyVersionView) EnumDescriptor() ([]byte, []int) {
  298. return fileDescriptor_resources_812ab0e7462a1529, []int{4, 2}
  299. }
  300. // A [KeyRing][google.cloud.kms.v1.KeyRing] is a toplevel logical grouping of
  301. // [CryptoKeys][google.cloud.kms.v1.CryptoKey].
  302. type KeyRing struct {
  303. // Output only. The resource name for the
  304. // [KeyRing][google.cloud.kms.v1.KeyRing] in the format
  305. // `projects/*/locations/*/keyRings/*`.
  306. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  307. // Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing]
  308. // was created.
  309. CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
  310. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  311. XXX_unrecognized []byte `json:"-"`
  312. XXX_sizecache int32 `json:"-"`
  313. }
  314. func (m *KeyRing) Reset() { *m = KeyRing{} }
  315. func (m *KeyRing) String() string { return proto.CompactTextString(m) }
  316. func (*KeyRing) ProtoMessage() {}
  317. func (*KeyRing) Descriptor() ([]byte, []int) {
  318. return fileDescriptor_resources_812ab0e7462a1529, []int{0}
  319. }
  320. func (m *KeyRing) XXX_Unmarshal(b []byte) error {
  321. return xxx_messageInfo_KeyRing.Unmarshal(m, b)
  322. }
  323. func (m *KeyRing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  324. return xxx_messageInfo_KeyRing.Marshal(b, m, deterministic)
  325. }
  326. func (dst *KeyRing) XXX_Merge(src proto.Message) {
  327. xxx_messageInfo_KeyRing.Merge(dst, src)
  328. }
  329. func (m *KeyRing) XXX_Size() int {
  330. return xxx_messageInfo_KeyRing.Size(m)
  331. }
  332. func (m *KeyRing) XXX_DiscardUnknown() {
  333. xxx_messageInfo_KeyRing.DiscardUnknown(m)
  334. }
  335. var xxx_messageInfo_KeyRing proto.InternalMessageInfo
  336. func (m *KeyRing) GetName() string {
  337. if m != nil {
  338. return m.Name
  339. }
  340. return ""
  341. }
  342. func (m *KeyRing) GetCreateTime() *timestamp.Timestamp {
  343. if m != nil {
  344. return m.CreateTime
  345. }
  346. return nil
  347. }
  348. // A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that
  349. // can be used for cryptographic operations.
  350. //
  351. // A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of one or more
  352. // [versions][google.cloud.kms.v1.CryptoKeyVersion], which represent the actual
  353. // key material used in cryptographic operations.
  354. type CryptoKey struct {
  355. // Output only. The resource name for this
  356. // [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
  357. // `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
  358. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  359. // Output only. A copy of the "primary"
  360. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
  361. // by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
  362. // [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
  363. // [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
  364. //
  365. // The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
  366. // updated via
  367. // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
  368. //
  369. // All keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
  370. // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
  371. // have a primary. For other keys, this field will be omitted.
  372. Primary *CryptoKeyVersion `protobuf:"bytes,2,opt,name=primary,proto3" json:"primary,omitempty"`
  373. // The immutable purpose of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
  374. Purpose CryptoKey_CryptoKeyPurpose `protobuf:"varint,3,opt,name=purpose,proto3,enum=google.cloud.kms.v1.CryptoKey_CryptoKeyPurpose" json:"purpose,omitempty"`
  375. // Output only. The time at which this
  376. // [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
  377. CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
  378. // At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
  379. // the Key Management Service will automatically:
  380. //
  381. // 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
  382. // 2. Mark the new version as primary.
  383. //
  384. // Key rotations performed manually via
  385. // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
  386. // and
  387. // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
  388. // do not affect
  389. // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
  390. //
  391. // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
  392. // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
  393. // support automatic rotation. For other keys, this field must be omitted.
  394. NextRotationTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=next_rotation_time,json=nextRotationTime,proto3" json:"next_rotation_time,omitempty"`
  395. // Controls the rate of automatic rotation.
  396. //
  397. // Types that are valid to be assigned to RotationSchedule:
  398. // *CryptoKey_RotationPeriod
  399. RotationSchedule isCryptoKey_RotationSchedule `protobuf_oneof:"rotation_schedule"`
  400. // A template describing settings for new
  401. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
  402. // properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
  403. // instances created by either
  404. // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
  405. // or auto-rotation are controlled by this template.
  406. VersionTemplate *CryptoKeyVersionTemplate `protobuf:"bytes,11,opt,name=version_template,json=versionTemplate,proto3" json:"version_template,omitempty"`
  407. // Labels with user-defined metadata. For more information, see
  408. // [Labeling Keys](/kms/docs/labeling-keys).
  409. Labels map[string]string `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  410. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  411. XXX_unrecognized []byte `json:"-"`
  412. XXX_sizecache int32 `json:"-"`
  413. }
  414. func (m *CryptoKey) Reset() { *m = CryptoKey{} }
  415. func (m *CryptoKey) String() string { return proto.CompactTextString(m) }
  416. func (*CryptoKey) ProtoMessage() {}
  417. func (*CryptoKey) Descriptor() ([]byte, []int) {
  418. return fileDescriptor_resources_812ab0e7462a1529, []int{1}
  419. }
  420. func (m *CryptoKey) XXX_Unmarshal(b []byte) error {
  421. return xxx_messageInfo_CryptoKey.Unmarshal(m, b)
  422. }
  423. func (m *CryptoKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  424. return xxx_messageInfo_CryptoKey.Marshal(b, m, deterministic)
  425. }
  426. func (dst *CryptoKey) XXX_Merge(src proto.Message) {
  427. xxx_messageInfo_CryptoKey.Merge(dst, src)
  428. }
  429. func (m *CryptoKey) XXX_Size() int {
  430. return xxx_messageInfo_CryptoKey.Size(m)
  431. }
  432. func (m *CryptoKey) XXX_DiscardUnknown() {
  433. xxx_messageInfo_CryptoKey.DiscardUnknown(m)
  434. }
  435. var xxx_messageInfo_CryptoKey proto.InternalMessageInfo
  436. func (m *CryptoKey) GetName() string {
  437. if m != nil {
  438. return m.Name
  439. }
  440. return ""
  441. }
  442. func (m *CryptoKey) GetPrimary() *CryptoKeyVersion {
  443. if m != nil {
  444. return m.Primary
  445. }
  446. return nil
  447. }
  448. func (m *CryptoKey) GetPurpose() CryptoKey_CryptoKeyPurpose {
  449. if m != nil {
  450. return m.Purpose
  451. }
  452. return CryptoKey_CRYPTO_KEY_PURPOSE_UNSPECIFIED
  453. }
  454. func (m *CryptoKey) GetCreateTime() *timestamp.Timestamp {
  455. if m != nil {
  456. return m.CreateTime
  457. }
  458. return nil
  459. }
  460. func (m *CryptoKey) GetNextRotationTime() *timestamp.Timestamp {
  461. if m != nil {
  462. return m.NextRotationTime
  463. }
  464. return nil
  465. }
  466. type isCryptoKey_RotationSchedule interface {
  467. isCryptoKey_RotationSchedule()
  468. }
  469. type CryptoKey_RotationPeriod struct {
  470. RotationPeriod *duration.Duration `protobuf:"bytes,8,opt,name=rotation_period,json=rotationPeriod,proto3,oneof"`
  471. }
  472. func (*CryptoKey_RotationPeriod) isCryptoKey_RotationSchedule() {}
  473. func (m *CryptoKey) GetRotationSchedule() isCryptoKey_RotationSchedule {
  474. if m != nil {
  475. return m.RotationSchedule
  476. }
  477. return nil
  478. }
  479. func (m *CryptoKey) GetRotationPeriod() *duration.Duration {
  480. if x, ok := m.GetRotationSchedule().(*CryptoKey_RotationPeriod); ok {
  481. return x.RotationPeriod
  482. }
  483. return nil
  484. }
  485. func (m *CryptoKey) GetVersionTemplate() *CryptoKeyVersionTemplate {
  486. if m != nil {
  487. return m.VersionTemplate
  488. }
  489. return nil
  490. }
  491. func (m *CryptoKey) GetLabels() map[string]string {
  492. if m != nil {
  493. return m.Labels
  494. }
  495. return nil
  496. }
  497. // XXX_OneofFuncs is for the internal use of the proto package.
  498. func (*CryptoKey) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  499. return _CryptoKey_OneofMarshaler, _CryptoKey_OneofUnmarshaler, _CryptoKey_OneofSizer, []interface{}{
  500. (*CryptoKey_RotationPeriod)(nil),
  501. }
  502. }
  503. func _CryptoKey_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  504. m := msg.(*CryptoKey)
  505. // rotation_schedule
  506. switch x := m.RotationSchedule.(type) {
  507. case *CryptoKey_RotationPeriod:
  508. b.EncodeVarint(8<<3 | proto.WireBytes)
  509. if err := b.EncodeMessage(x.RotationPeriod); err != nil {
  510. return err
  511. }
  512. case nil:
  513. default:
  514. return fmt.Errorf("CryptoKey.RotationSchedule has unexpected type %T", x)
  515. }
  516. return nil
  517. }
  518. func _CryptoKey_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  519. m := msg.(*CryptoKey)
  520. switch tag {
  521. case 8: // rotation_schedule.rotation_period
  522. if wire != proto.WireBytes {
  523. return true, proto.ErrInternalBadWireType
  524. }
  525. msg := new(duration.Duration)
  526. err := b.DecodeMessage(msg)
  527. m.RotationSchedule = &CryptoKey_RotationPeriod{msg}
  528. return true, err
  529. default:
  530. return false, nil
  531. }
  532. }
  533. func _CryptoKey_OneofSizer(msg proto.Message) (n int) {
  534. m := msg.(*CryptoKey)
  535. // rotation_schedule
  536. switch x := m.RotationSchedule.(type) {
  537. case *CryptoKey_RotationPeriod:
  538. s := proto.Size(x.RotationPeriod)
  539. n += 1 // tag and wire
  540. n += proto.SizeVarint(uint64(s))
  541. n += s
  542. case nil:
  543. default:
  544. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  545. }
  546. return n
  547. }
  548. // A [CryptoKeyVersionTemplate][google.cloud.kms.v1.CryptoKeyVersionTemplate]
  549. // specifies the properties to use when creating a new
  550. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], either manually
  551. // with
  552. // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
  553. // or automatically as a result of auto-rotation.
  554. type CryptoKeyVersionTemplate struct {
  555. // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating
  556. // a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
  557. // template. Immutable. Defaults to
  558. // [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
  559. ProtectionLevel ProtectionLevel `protobuf:"varint,1,opt,name=protection_level,json=protectionLevel,proto3,enum=google.cloud.kms.v1.ProtectionLevel" json:"protection_level,omitempty"`
  560. // Required.
  561. // [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
  562. // to use when creating a
  563. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
  564. // template.
  565. //
  566. // For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
  567. // this field is omitted and
  568. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
  569. // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
  570. Algorithm CryptoKeyVersion_CryptoKeyVersionAlgorithm `protobuf:"varint,3,opt,name=algorithm,proto3,enum=google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionAlgorithm" json:"algorithm,omitempty"`
  571. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  572. XXX_unrecognized []byte `json:"-"`
  573. XXX_sizecache int32 `json:"-"`
  574. }
  575. func (m *CryptoKeyVersionTemplate) Reset() { *m = CryptoKeyVersionTemplate{} }
  576. func (m *CryptoKeyVersionTemplate) String() string { return proto.CompactTextString(m) }
  577. func (*CryptoKeyVersionTemplate) ProtoMessage() {}
  578. func (*CryptoKeyVersionTemplate) Descriptor() ([]byte, []int) {
  579. return fileDescriptor_resources_812ab0e7462a1529, []int{2}
  580. }
  581. func (m *CryptoKeyVersionTemplate) XXX_Unmarshal(b []byte) error {
  582. return xxx_messageInfo_CryptoKeyVersionTemplate.Unmarshal(m, b)
  583. }
  584. func (m *CryptoKeyVersionTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  585. return xxx_messageInfo_CryptoKeyVersionTemplate.Marshal(b, m, deterministic)
  586. }
  587. func (dst *CryptoKeyVersionTemplate) XXX_Merge(src proto.Message) {
  588. xxx_messageInfo_CryptoKeyVersionTemplate.Merge(dst, src)
  589. }
  590. func (m *CryptoKeyVersionTemplate) XXX_Size() int {
  591. return xxx_messageInfo_CryptoKeyVersionTemplate.Size(m)
  592. }
  593. func (m *CryptoKeyVersionTemplate) XXX_DiscardUnknown() {
  594. xxx_messageInfo_CryptoKeyVersionTemplate.DiscardUnknown(m)
  595. }
  596. var xxx_messageInfo_CryptoKeyVersionTemplate proto.InternalMessageInfo
  597. func (m *CryptoKeyVersionTemplate) GetProtectionLevel() ProtectionLevel {
  598. if m != nil {
  599. return m.ProtectionLevel
  600. }
  601. return ProtectionLevel_PROTECTION_LEVEL_UNSPECIFIED
  602. }
  603. func (m *CryptoKeyVersionTemplate) GetAlgorithm() CryptoKeyVersion_CryptoKeyVersionAlgorithm {
  604. if m != nil {
  605. return m.Algorithm
  606. }
  607. return CryptoKeyVersion_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED
  608. }
  609. // Contains an HSM-generated attestation about a key operation.
  610. type KeyOperationAttestation struct {
  611. // Output only. The format of the attestation data.
  612. Format KeyOperationAttestation_AttestationFormat `protobuf:"varint,4,opt,name=format,proto3,enum=google.cloud.kms.v1.KeyOperationAttestation_AttestationFormat" json:"format,omitempty"`
  613. // Output only. The attestation data provided by the HSM when the key
  614. // operation was performed.
  615. Content []byte `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
  616. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  617. XXX_unrecognized []byte `json:"-"`
  618. XXX_sizecache int32 `json:"-"`
  619. }
  620. func (m *KeyOperationAttestation) Reset() { *m = KeyOperationAttestation{} }
  621. func (m *KeyOperationAttestation) String() string { return proto.CompactTextString(m) }
  622. func (*KeyOperationAttestation) ProtoMessage() {}
  623. func (*KeyOperationAttestation) Descriptor() ([]byte, []int) {
  624. return fileDescriptor_resources_812ab0e7462a1529, []int{3}
  625. }
  626. func (m *KeyOperationAttestation) XXX_Unmarshal(b []byte) error {
  627. return xxx_messageInfo_KeyOperationAttestation.Unmarshal(m, b)
  628. }
  629. func (m *KeyOperationAttestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  630. return xxx_messageInfo_KeyOperationAttestation.Marshal(b, m, deterministic)
  631. }
  632. func (dst *KeyOperationAttestation) XXX_Merge(src proto.Message) {
  633. xxx_messageInfo_KeyOperationAttestation.Merge(dst, src)
  634. }
  635. func (m *KeyOperationAttestation) XXX_Size() int {
  636. return xxx_messageInfo_KeyOperationAttestation.Size(m)
  637. }
  638. func (m *KeyOperationAttestation) XXX_DiscardUnknown() {
  639. xxx_messageInfo_KeyOperationAttestation.DiscardUnknown(m)
  640. }
  641. var xxx_messageInfo_KeyOperationAttestation proto.InternalMessageInfo
  642. func (m *KeyOperationAttestation) GetFormat() KeyOperationAttestation_AttestationFormat {
  643. if m != nil {
  644. return m.Format
  645. }
  646. return KeyOperationAttestation_ATTESTATION_FORMAT_UNSPECIFIED
  647. }
  648. func (m *KeyOperationAttestation) GetContent() []byte {
  649. if m != nil {
  650. return m.Content
  651. }
  652. return nil
  653. }
  654. // A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an
  655. // individual cryptographic key, and the associated key material.
  656. //
  657. // An
  658. // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
  659. // version can be used for cryptographic operations.
  660. //
  661. // For security reasons, the raw cryptographic key material represented by a
  662. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] can never be viewed
  663. // or exported. It can only be used to encrypt, decrypt, or sign data when an
  664. // authorized user or application invokes Cloud KMS.
  665. type CryptoKeyVersion struct {
  666. // Output only. The resource name for this
  667. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
  668. // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
  669. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  670. // The current state of the
  671. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
  672. State CryptoKeyVersion_CryptoKeyVersionState `protobuf:"varint,3,opt,name=state,proto3,enum=google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionState" json:"state,omitempty"`
  673. // Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
  674. // describing how crypto operations are performed with this
  675. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
  676. ProtectionLevel ProtectionLevel `protobuf:"varint,7,opt,name=protection_level,json=protectionLevel,proto3,enum=google.cloud.kms.v1.ProtectionLevel" json:"protection_level,omitempty"`
  677. // Output only. The
  678. // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
  679. // that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
  680. // supports.
  681. Algorithm CryptoKeyVersion_CryptoKeyVersionAlgorithm `protobuf:"varint,10,opt,name=algorithm,proto3,enum=google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionAlgorithm" json:"algorithm,omitempty"`
  682. // Output only. Statement that was generated and signed by the HSM at key
  683. // creation time. Use this statement to verify attributes of the key as stored
  684. // on the HSM, independently of Google. Only provided for key versions with
  685. // [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
  686. // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
  687. Attestation *KeyOperationAttestation `protobuf:"bytes,8,opt,name=attestation,proto3" json:"attestation,omitempty"`
  688. // Output only. The time at which this
  689. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
  690. CreateTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
  691. // Output only. The time this
  692. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
  693. // generated.
  694. GenerateTime *timestamp.Timestamp `protobuf:"bytes,11,opt,name=generate_time,json=generateTime,proto3" json:"generate_time,omitempty"`
  695. // Output only. The time this
  696. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
  697. // scheduled for destruction. Only present if
  698. // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
  699. // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
  700. DestroyTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=destroy_time,json=destroyTime,proto3" json:"destroy_time,omitempty"`
  701. // Output only. The time this CryptoKeyVersion's key material was
  702. // destroyed. Only present if
  703. // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
  704. // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
  705. DestroyEventTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=destroy_event_time,json=destroyEventTime,proto3" json:"destroy_event_time,omitempty"`
  706. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  707. XXX_unrecognized []byte `json:"-"`
  708. XXX_sizecache int32 `json:"-"`
  709. }
  710. func (m *CryptoKeyVersion) Reset() { *m = CryptoKeyVersion{} }
  711. func (m *CryptoKeyVersion) String() string { return proto.CompactTextString(m) }
  712. func (*CryptoKeyVersion) ProtoMessage() {}
  713. func (*CryptoKeyVersion) Descriptor() ([]byte, []int) {
  714. return fileDescriptor_resources_812ab0e7462a1529, []int{4}
  715. }
  716. func (m *CryptoKeyVersion) XXX_Unmarshal(b []byte) error {
  717. return xxx_messageInfo_CryptoKeyVersion.Unmarshal(m, b)
  718. }
  719. func (m *CryptoKeyVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  720. return xxx_messageInfo_CryptoKeyVersion.Marshal(b, m, deterministic)
  721. }
  722. func (dst *CryptoKeyVersion) XXX_Merge(src proto.Message) {
  723. xxx_messageInfo_CryptoKeyVersion.Merge(dst, src)
  724. }
  725. func (m *CryptoKeyVersion) XXX_Size() int {
  726. return xxx_messageInfo_CryptoKeyVersion.Size(m)
  727. }
  728. func (m *CryptoKeyVersion) XXX_DiscardUnknown() {
  729. xxx_messageInfo_CryptoKeyVersion.DiscardUnknown(m)
  730. }
  731. var xxx_messageInfo_CryptoKeyVersion proto.InternalMessageInfo
  732. func (m *CryptoKeyVersion) GetName() string {
  733. if m != nil {
  734. return m.Name
  735. }
  736. return ""
  737. }
  738. func (m *CryptoKeyVersion) GetState() CryptoKeyVersion_CryptoKeyVersionState {
  739. if m != nil {
  740. return m.State
  741. }
  742. return CryptoKeyVersion_CRYPTO_KEY_VERSION_STATE_UNSPECIFIED
  743. }
  744. func (m *CryptoKeyVersion) GetProtectionLevel() ProtectionLevel {
  745. if m != nil {
  746. return m.ProtectionLevel
  747. }
  748. return ProtectionLevel_PROTECTION_LEVEL_UNSPECIFIED
  749. }
  750. func (m *CryptoKeyVersion) GetAlgorithm() CryptoKeyVersion_CryptoKeyVersionAlgorithm {
  751. if m != nil {
  752. return m.Algorithm
  753. }
  754. return CryptoKeyVersion_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED
  755. }
  756. func (m *CryptoKeyVersion) GetAttestation() *KeyOperationAttestation {
  757. if m != nil {
  758. return m.Attestation
  759. }
  760. return nil
  761. }
  762. func (m *CryptoKeyVersion) GetCreateTime() *timestamp.Timestamp {
  763. if m != nil {
  764. return m.CreateTime
  765. }
  766. return nil
  767. }
  768. func (m *CryptoKeyVersion) GetGenerateTime() *timestamp.Timestamp {
  769. if m != nil {
  770. return m.GenerateTime
  771. }
  772. return nil
  773. }
  774. func (m *CryptoKeyVersion) GetDestroyTime() *timestamp.Timestamp {
  775. if m != nil {
  776. return m.DestroyTime
  777. }
  778. return nil
  779. }
  780. func (m *CryptoKeyVersion) GetDestroyEventTime() *timestamp.Timestamp {
  781. if m != nil {
  782. return m.DestroyEventTime
  783. }
  784. return nil
  785. }
  786. // The public key for a given
  787. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Obtained via
  788. // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
  789. type PublicKey struct {
  790. // The public key, encoded in PEM format. For more information, see the
  791. // [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for
  792. // [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
  793. // [Textual Encoding of Subject Public Key Info]
  794. // (https://tools.ietf.org/html/rfc7468#section-13).
  795. Pem string `protobuf:"bytes,1,opt,name=pem,proto3" json:"pem,omitempty"`
  796. // The
  797. // [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
  798. // associated with this key.
  799. Algorithm CryptoKeyVersion_CryptoKeyVersionAlgorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionAlgorithm" json:"algorithm,omitempty"`
  800. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  801. XXX_unrecognized []byte `json:"-"`
  802. XXX_sizecache int32 `json:"-"`
  803. }
  804. func (m *PublicKey) Reset() { *m = PublicKey{} }
  805. func (m *PublicKey) String() string { return proto.CompactTextString(m) }
  806. func (*PublicKey) ProtoMessage() {}
  807. func (*PublicKey) Descriptor() ([]byte, []int) {
  808. return fileDescriptor_resources_812ab0e7462a1529, []int{5}
  809. }
  810. func (m *PublicKey) XXX_Unmarshal(b []byte) error {
  811. return xxx_messageInfo_PublicKey.Unmarshal(m, b)
  812. }
  813. func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  814. return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic)
  815. }
  816. func (dst *PublicKey) XXX_Merge(src proto.Message) {
  817. xxx_messageInfo_PublicKey.Merge(dst, src)
  818. }
  819. func (m *PublicKey) XXX_Size() int {
  820. return xxx_messageInfo_PublicKey.Size(m)
  821. }
  822. func (m *PublicKey) XXX_DiscardUnknown() {
  823. xxx_messageInfo_PublicKey.DiscardUnknown(m)
  824. }
  825. var xxx_messageInfo_PublicKey proto.InternalMessageInfo
  826. func (m *PublicKey) GetPem() string {
  827. if m != nil {
  828. return m.Pem
  829. }
  830. return ""
  831. }
  832. func (m *PublicKey) GetAlgorithm() CryptoKeyVersion_CryptoKeyVersionAlgorithm {
  833. if m != nil {
  834. return m.Algorithm
  835. }
  836. return CryptoKeyVersion_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED
  837. }
  838. func init() {
  839. proto.RegisterType((*KeyRing)(nil), "google.cloud.kms.v1.KeyRing")
  840. proto.RegisterType((*CryptoKey)(nil), "google.cloud.kms.v1.CryptoKey")
  841. proto.RegisterMapType((map[string]string)(nil), "google.cloud.kms.v1.CryptoKey.LabelsEntry")
  842. proto.RegisterType((*CryptoKeyVersionTemplate)(nil), "google.cloud.kms.v1.CryptoKeyVersionTemplate")
  843. proto.RegisterType((*KeyOperationAttestation)(nil), "google.cloud.kms.v1.KeyOperationAttestation")
  844. proto.RegisterType((*CryptoKeyVersion)(nil), "google.cloud.kms.v1.CryptoKeyVersion")
  845. proto.RegisterType((*PublicKey)(nil), "google.cloud.kms.v1.PublicKey")
  846. proto.RegisterEnum("google.cloud.kms.v1.ProtectionLevel", ProtectionLevel_name, ProtectionLevel_value)
  847. proto.RegisterEnum("google.cloud.kms.v1.CryptoKey_CryptoKeyPurpose", CryptoKey_CryptoKeyPurpose_name, CryptoKey_CryptoKeyPurpose_value)
  848. proto.RegisterEnum("google.cloud.kms.v1.KeyOperationAttestation_AttestationFormat", KeyOperationAttestation_AttestationFormat_name, KeyOperationAttestation_AttestationFormat_value)
  849. proto.RegisterEnum("google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionAlgorithm", CryptoKeyVersion_CryptoKeyVersionAlgorithm_name, CryptoKeyVersion_CryptoKeyVersionAlgorithm_value)
  850. proto.RegisterEnum("google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionState", CryptoKeyVersion_CryptoKeyVersionState_name, CryptoKeyVersion_CryptoKeyVersionState_value)
  851. proto.RegisterEnum("google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionView", CryptoKeyVersion_CryptoKeyVersionView_name, CryptoKeyVersion_CryptoKeyVersionView_value)
  852. }
  853. func init() {
  854. proto.RegisterFile("google/cloud/kms/v1/resources.proto", fileDescriptor_resources_812ab0e7462a1529)
  855. }
  856. var fileDescriptor_resources_812ab0e7462a1529 = []byte{
  857. // 1203 bytes of a gzipped FileDescriptorProto
  858. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5d, 0x6e, 0xdb, 0x46,
  859. 0x17, 0x0d, 0x25, 0xcb, 0xb2, 0xae, 0x9c, 0x98, 0x1e, 0xe7, 0x47, 0xf1, 0x17, 0x24, 0x86, 0x92,
  860. 0x0f, 0x35, 0x82, 0x54, 0x8a, 0x65, 0x27, 0x75, 0x1a, 0xb4, 0x01, 0x2d, 0x8d, 0x65, 0x56, 0x3f,
  861. 0x64, 0x87, 0xb4, 0x52, 0x07, 0x29, 0x08, 0x5a, 0x9e, 0x28, 0x82, 0xc5, 0x1f, 0x90, 0x94, 0x1a,
  862. 0x01, 0xdd, 0x46, 0x5f, 0xba, 0x81, 0x02, 0x5d, 0x43, 0x57, 0x90, 0x55, 0x74, 0x19, 0x79, 0x2c,
  863. 0x38, 0x1c, 0xda, 0x94, 0xcc, 0xd4, 0x49, 0x91, 0x27, 0xcd, 0xdc, 0x73, 0xcf, 0x99, 0xd1, 0xbd,
  864. 0x97, 0x87, 0x84, 0xfb, 0x03, 0xc7, 0x19, 0x8c, 0x68, 0xb5, 0x3f, 0x72, 0xc6, 0x27, 0xd5, 0x53,
  865. 0xcb, 0xaf, 0x4e, 0xb6, 0xaa, 0x1e, 0xf5, 0x9d, 0xb1, 0xd7, 0xa7, 0x7e, 0xc5, 0xf5, 0x9c, 0xc0,
  866. 0x41, 0x6b, 0x51, 0x52, 0x85, 0x25, 0x55, 0x4e, 0x2d, 0xbf, 0x32, 0xd9, 0x5a, 0xbf, 0xc3, 0x99,
  867. 0xa6, 0x3b, 0xac, 0x9a, 0xb6, 0xed, 0x04, 0x66, 0x30, 0x74, 0x6c, 0x4e, 0x59, 0xbf, 0xcb, 0x51,
  868. 0xb6, 0x3b, 0x1e, 0xbf, 0xa9, 0x9e, 0x8c, 0x3d, 0x96, 0xc0, 0xf1, 0x7b, 0xf3, 0x78, 0x30, 0xb4,
  869. 0xa8, 0x1f, 0x98, 0x96, 0x1b, 0x25, 0x94, 0x5f, 0x41, 0xbe, 0x45, 0xa7, 0x64, 0x68, 0x0f, 0x10,
  870. 0x82, 0x05, 0xdb, 0xb4, 0x68, 0x49, 0xd8, 0x10, 0x36, 0x0b, 0x84, 0xad, 0xd1, 0x73, 0x28, 0xf6,
  871. 0x3d, 0x6a, 0x06, 0xd4, 0x08, 0x89, 0xa5, 0xcc, 0x86, 0xb0, 0x59, 0xac, 0xad, 0x57, 0xf8, 0x45,
  872. 0x63, 0xd5, 0x8a, 0x1e, 0xab, 0x12, 0x88, 0xd2, 0xc3, 0x40, 0xf9, 0xef, 0x1c, 0x14, 0xea, 0xde,
  873. 0xd4, 0x0d, 0x9c, 0x16, 0x9d, 0xa6, 0xca, 0xbf, 0x80, 0xbc, 0xeb, 0x0d, 0x2d, 0xd3, 0x9b, 0x72,
  874. 0xe9, 0xff, 0x57, 0x52, 0x6a, 0x50, 0x39, 0x13, 0xe9, 0x51, 0xcf, 0x1f, 0x3a, 0x36, 0x89, 0x59,
  875. 0x48, 0x86, 0xbc, 0x3b, 0xf6, 0x5c, 0xc7, 0xa7, 0xa5, 0xec, 0x86, 0xb0, 0x79, 0xad, 0x56, 0xfd,
  876. 0x77, 0x81, 0xf3, 0x95, 0x1a, 0xd1, 0x48, 0xcc, 0x9f, 0xff, 0xab, 0xb9, 0xcf, 0xf9, 0xab, 0xe8,
  877. 0x00, 0x90, 0x4d, 0xdf, 0x05, 0x86, 0xc7, 0xfb, 0x13, 0x69, 0xe4, 0x2f, 0xd5, 0x10, 0x43, 0x16,
  878. 0xe1, 0x24, 0xa6, 0xd4, 0x80, 0x95, 0x33, 0x11, 0x97, 0x7a, 0x43, 0xe7, 0xa4, 0xb4, 0xc4, 0x64,
  879. 0x6e, 0x5f, 0x90, 0x69, 0xf0, 0x5e, 0x1f, 0x5c, 0x21, 0xd7, 0x62, 0x8e, 0xca, 0x28, 0xe8, 0x27,
  880. 0x10, 0x27, 0x51, 0xad, 0x8c, 0x80, 0x5a, 0xee, 0xc8, 0x0c, 0x68, 0xa9, 0xc8, 0x64, 0xbe, 0xfe,
  881. 0xa4, 0x0a, 0xeb, 0x9c, 0x44, 0x56, 0x26, 0xb3, 0x01, 0xb4, 0x07, 0x8b, 0x23, 0xf3, 0x98, 0x8e,
  882. 0xfc, 0x12, 0x6c, 0x64, 0x37, 0x8b, 0xb5, 0x87, 0x97, 0x14, 0xbc, 0xcd, 0x92, 0xb1, 0x1d, 0x78,
  883. 0x53, 0xc2, 0x99, 0xeb, 0xcf, 0xa0, 0x98, 0x08, 0x23, 0x11, 0xb2, 0xa7, 0x74, 0xca, 0x07, 0x23,
  884. 0x5c, 0xa2, 0xeb, 0x90, 0x9b, 0x98, 0xa3, 0x71, 0x34, 0x70, 0x05, 0x12, 0x6d, 0xbe, 0xcd, 0xec,
  885. 0x0a, 0xe5, 0x77, 0x20, 0xce, 0xb7, 0x10, 0x95, 0xe1, 0x6e, 0x9d, 0x1c, 0xa9, 0xba, 0x62, 0xb4,
  886. 0xf0, 0x91, 0xa1, 0x1e, 0x12, 0x55, 0xd1, 0xb0, 0x71, 0xd8, 0xd5, 0x54, 0x5c, 0x97, 0xf7, 0x65,
  887. 0xdc, 0x10, 0xaf, 0xa0, 0x35, 0x58, 0xc1, 0x5d, 0x96, 0x65, 0x34, 0x30, 0xfb, 0x15, 0x85, 0x30,
  888. 0x28, 0x69, 0x47, 0x9d, 0x0e, 0xd6, 0x89, 0x5c, 0x37, 0x34, 0xb9, 0xd9, 0x15, 0x73, 0xe8, 0x26,
  889. 0xa0, 0x44, 0x30, 0x4e, 0x5e, 0xdc, 0x5b, 0x83, 0xd5, 0xb3, 0xc6, 0xf8, 0xfd, 0xb7, 0xf4, 0x64,
  890. 0x3c, 0xa2, 0xe5, 0xf7, 0x02, 0x94, 0x3e, 0x56, 0x3b, 0xa4, 0x80, 0x18, 0xf6, 0x8a, 0xf6, 0x19,
  891. 0x67, 0x44, 0x27, 0x74, 0xc4, 0xfe, 0xe4, 0xb5, 0xda, 0x83, 0xd4, 0xa2, 0xa9, 0x67, 0xc9, 0xed,
  892. 0x30, 0x97, 0xac, 0xb8, 0xb3, 0x01, 0xf4, 0x33, 0x14, 0xcc, 0xd1, 0xc0, 0xf1, 0x86, 0xc1, 0x5b,
  893. 0x8b, 0xcf, 0xfb, 0x8b, 0x4f, 0x6a, 0xe7, 0x85, 0x80, 0x14, 0xcb, 0x90, 0x73, 0xc5, 0xf2, 0x07,
  894. 0x01, 0x6e, 0xb5, 0xe8, 0x54, 0x71, 0x69, 0x34, 0x57, 0x52, 0x10, 0x84, 0x63, 0x1a, 0x2e, 0x51,
  895. 0x0f, 0x16, 0xdf, 0x38, 0x9e, 0x65, 0x06, 0xa5, 0x05, 0x76, 0xee, 0xf7, 0xa9, 0xe7, 0x7e, 0x84,
  896. 0x5d, 0x49, 0xac, 0xf7, 0x99, 0x0a, 0xe1, 0x6a, 0xa8, 0x04, 0xf9, 0xbe, 0x63, 0x07, 0xd4, 0x0e,
  897. 0xd8, 0x13, 0xb7, 0x4c, 0xe2, 0x6d, 0xf9, 0x14, 0x56, 0x2f, 0xd0, 0xc2, 0x56, 0x4b, 0xba, 0x8e,
  898. 0x35, 0x5d, 0xd2, 0x65, 0xa5, 0x6b, 0xec, 0x2b, 0xa4, 0x23, 0xe9, 0x73, 0xad, 0x2e, 0xc1, 0xf5,
  899. 0xba, 0xd4, 0x93, 0x0f, 0x3b, 0x46, 0x6f, 0xcb, 0xa8, 0x2b, 0x1d, 0x95, 0x60, 0x4d, 0xc3, 0x0d,
  900. 0x31, 0x9b, 0x44, 0x6a, 0x49, 0x64, 0xa1, 0xfc, 0x07, 0x24, 0xe6, 0x8a, 0xd7, 0x28, 0xd5, 0xb1,
  901. 0x7e, 0x84, 0x5c, 0x78, 0xa3, 0xd8, 0x6e, 0x9e, 0xff, 0xb7, 0xf2, 0x6b, 0xa1, 0x04, 0x89, 0x94,
  902. 0x52, 0xc7, 0x24, 0xff, 0xc5, 0xc6, 0x04, 0xbe, 0xf4, 0x98, 0xa0, 0x2e, 0x14, 0xcd, 0xf3, 0xc6,
  903. 0x70, 0x77, 0x7a, 0xf4, 0x39, 0xf3, 0x40, 0x92, 0x02, 0xf3, 0xc6, 0xbb, 0xf0, 0x59, 0xc6, 0xfb,
  904. 0x02, 0xae, 0x0e, 0xa8, 0x1d, 0x1e, 0xc1, 0xe9, 0xc5, 0x4b, 0xe9, 0xcb, 0x31, 0x81, 0x09, 0x7c,
  905. 0x07, 0xcb, 0x27, 0xd4, 0x0f, 0x3c, 0x67, 0xfa, 0xa9, 0xbe, 0x5f, 0xe4, 0xf9, 0xb1, 0xf1, 0xc7,
  906. 0x74, 0x3a, 0xa1, 0x76, 0x10, 0x89, 0x2c, 0x5e, 0x6e, 0xfc, 0x9c, 0x85, 0x43, 0x12, 0x7b, 0x5b,
  907. 0xfe, 0x95, 0x85, 0xdb, 0x1f, 0xad, 0x3f, 0x7a, 0x04, 0x9b, 0x09, 0x8f, 0xeb, 0x61, 0xa2, 0x85,
  908. 0xf3, 0x2f, 0xb5, 0x9b, 0x0a, 0x91, 0xf5, 0x83, 0xce, 0xdc, 0x23, 0x70, 0x0f, 0xfe, 0xd7, 0x54,
  909. 0x94, 0x66, 0x1b, 0x1b, 0xe7, 0x4e, 0xc6, 0xed, 0x4f, 0x56, 0xba, 0xa2, 0x80, 0xee, 0x40, 0x89,
  910. 0x68, 0x12, 0xb3, 0x3c, 0x43, 0xd5, 0x34, 0xa3, 0xf6, 0x78, 0x67, 0xd7, 0xd0, 0x0e, 0xa4, 0xda,
  911. 0x93, 0xa7, 0x62, 0xe6, 0x02, 0xba, 0xfd, 0xf8, 0x9b, 0x5a, 0x8c, 0x66, 0x2f, 0xa0, 0x3b, 0x8f,
  912. 0x9f, 0x3d, 0x8d, 0xd1, 0x05, 0x74, 0x17, 0xd6, 0xcf, 0xd1, 0x56, 0x5d, 0xdb, 0x9a, 0xd1, 0xce,
  913. 0xa5, 0xe0, 0x49, 0xf5, 0xc5, 0x14, 0x3c, 0xa9, 0x9f, 0x47, 0x1b, 0x70, 0x27, 0xc4, 0xb9, 0x2f,
  914. 0x1b, 0x8a, 0x84, 0xd5, 0x99, 0x13, 0x96, 0x52, 0x33, 0x92, 0x67, 0x14, 0x52, 0x33, 0x92, 0xa7,
  915. 0x00, 0xba, 0x05, 0x6b, 0xb8, 0xce, 0x2f, 0x51, 0x7b, 0x72, 0x06, 0x2c, 0xcf, 0x00, 0xdb, 0xbb,
  916. 0x3b, 0x21, 0xb0, 0xbd, 0xbb, 0x23, 0x5e, 0x2d, 0xff, 0x2e, 0xc0, 0x8d, 0xd4, 0xc7, 0x1c, 0x6d,
  917. 0xc2, 0x83, 0x94, 0xd6, 0x85, 0x16, 0x36, 0xff, 0x92, 0xba, 0x09, 0x48, 0xc5, 0xdd, 0x86, 0xdc,
  918. 0x6d, 0x1a, 0x4d, 0xdc, 0xc5, 0x84, 0x99, 0x9c, 0x98, 0x43, 0x45, 0xc8, 0xe3, 0xae, 0xb4, 0xd7,
  919. 0xc6, 0x0d, 0x51, 0x40, 0xcb, 0xb0, 0xd4, 0x90, 0xb5, 0x68, 0x97, 0x41, 0x57, 0xa1, 0xd0, 0xc0,
  920. 0x9a, 0x4e, 0x94, 0x23, 0xe6, 0x70, 0x37, 0x60, 0x95, 0x6f, 0x0d, 0xad, 0x7e, 0x80, 0x1b, 0x87,
  921. 0x6d, 0x66, 0x6f, 0x32, 0x5c, 0x9f, 0xbf, 0x5b, 0x6f, 0x48, 0x7f, 0x41, 0x5f, 0xc1, 0xfd, 0x94,
  922. 0xab, 0xf5, 0x64, 0xfc, 0x72, 0xee, 0x66, 0x4b, 0xb0, 0xb0, 0x7f, 0xd8, 0x6e, 0x8b, 0x42, 0xf9,
  923. 0x57, 0x28, 0xa8, 0xe3, 0xe3, 0xd1, 0xb0, 0x1f, 0x7e, 0xd3, 0x89, 0x90, 0x75, 0xa9, 0x15, 0xbf,
  924. 0xb9, 0x5d, 0x6a, 0xcd, 0x7a, 0x4f, 0xe6, 0x4b, 0x7b, 0xcf, 0xc3, 0x1f, 0x60, 0x65, 0xce, 0xfe,
  925. 0xc2, 0x66, 0xaa, 0x44, 0xd1, 0x71, 0x9d, 0xbd, 0x11, 0xda, 0xb8, 0x87, 0xdb, 0x73, 0x97, 0x5f,
  926. 0x86, 0x25, 0x4d, 0xd9, 0xd7, 0x5f, 0x4a, 0x04, 0x8b, 0x02, 0xca, 0x43, 0xf6, 0x40, 0xeb, 0x88,
  927. 0x99, 0xbd, 0xdf, 0x04, 0xb8, 0xd5, 0x77, 0xac, 0xb4, 0xdb, 0xed, 0xad, 0xb6, 0x2c, 0x9f, 0xc4,
  928. 0x9f, 0xe7, 0xe1, 0x89, 0x8e, 0x2a, 0xbc, 0x7a, 0xca, 0x33, 0x07, 0xce, 0xc8, 0xb4, 0x07, 0x15,
  929. 0xc7, 0x1b, 0x54, 0x07, 0xd4, 0x66, 0x0f, 0x77, 0x35, 0x82, 0x4c, 0x77, 0xe8, 0xcf, 0x7c, 0xe3,
  930. 0x3f, 0x3f, 0xb5, 0xfc, 0x0f, 0x82, 0xf0, 0x67, 0x66, 0xad, 0x19, 0x71, 0xeb, 0xec, 0x94, 0x96,
  931. 0xe5, 0x57, 0x7a, 0x5b, 0xef, 0xe3, 0xe8, 0x6b, 0x16, 0x7d, 0xdd, 0xb2, 0xfc, 0xd7, 0xbd, 0xad,
  932. 0xe3, 0x45, 0xa6, 0xb8, 0xfd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x5a, 0x5e, 0x75, 0x34,
  933. 0x0c, 0x00, 0x00,
  934. }