-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
resources.pb.go
executable file
·2627 lines (2415 loc) · 130 KB
/
resources.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2023 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
//
// http://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.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.30.0
// protoc v4.23.2
// source: google/cloud/kms/v1/resources.proto
package kmspb
import (
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] specifies how
// cryptographic operations are performed. For more information, see [Protection
// levels] (https://cloud.google.com/kms/docs/algorithms#protection_levels).
type ProtectionLevel int32
const (
// Not specified.
ProtectionLevel_PROTECTION_LEVEL_UNSPECIFIED ProtectionLevel = 0
// Crypto operations are performed in software.
ProtectionLevel_SOFTWARE ProtectionLevel = 1
// Crypto operations are performed in a Hardware Security Module.
ProtectionLevel_HSM ProtectionLevel = 2
// Crypto operations are performed by an external key manager.
ProtectionLevel_EXTERNAL ProtectionLevel = 3
// Crypto operations are performed in an EKM-over-VPC backend.
ProtectionLevel_EXTERNAL_VPC ProtectionLevel = 4
)
// Enum value maps for ProtectionLevel.
var (
ProtectionLevel_name = map[int32]string{
0: "PROTECTION_LEVEL_UNSPECIFIED",
1: "SOFTWARE",
2: "HSM",
3: "EXTERNAL",
4: "EXTERNAL_VPC",
}
ProtectionLevel_value = map[string]int32{
"PROTECTION_LEVEL_UNSPECIFIED": 0,
"SOFTWARE": 1,
"HSM": 2,
"EXTERNAL": 3,
"EXTERNAL_VPC": 4,
}
)
func (x ProtectionLevel) Enum() *ProtectionLevel {
p := new(ProtectionLevel)
*p = x
return p
}
func (x ProtectionLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ProtectionLevel) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_kms_v1_resources_proto_enumTypes[0].Descriptor()
}
func (ProtectionLevel) Type() protoreflect.EnumType {
return &file_google_cloud_kms_v1_resources_proto_enumTypes[0]
}
func (x ProtectionLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ProtectionLevel.Descriptor instead.
func (ProtectionLevel) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_kms_v1_resources_proto_rawDescGZIP(), []int{0}
}
// [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose]
// describes the cryptographic capabilities of a
// [CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used
// for the operations allowed by its purpose. For more information, see [Key
// purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
type CryptoKey_CryptoKeyPurpose int32
const (
// Not specified.
CryptoKey_CRYPTO_KEY_PURPOSE_UNSPECIFIED CryptoKey_CryptoKeyPurpose = 0
// [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
// with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and
// [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
CryptoKey_ENCRYPT_DECRYPT CryptoKey_CryptoKeyPurpose = 1
// [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
// with
// [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]
// and
// [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
CryptoKey_ASYMMETRIC_SIGN CryptoKey_CryptoKeyPurpose = 5
// [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
// with
// [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]
// and
// [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
CryptoKey_ASYMMETRIC_DECRYPT CryptoKey_CryptoKeyPurpose = 6
// [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
// with [RawEncrypt][google.cloud.kms.v1.KeyManagementService.RawEncrypt]
// and [RawDecrypt][google.cloud.kms.v1.KeyManagementService.RawDecrypt].
// This purpose is meant to be used for interoperable symmetric
// encryption and does not support automatic CryptoKey rotation.
CryptoKey_RAW_ENCRYPT_DECRYPT CryptoKey_CryptoKeyPurpose = 7
// [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
// with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
CryptoKey_MAC CryptoKey_CryptoKeyPurpose = 9
)
// Enum value maps for CryptoKey_CryptoKeyPurpose.
var (
CryptoKey_CryptoKeyPurpose_name = map[int32]string{
0: "CRYPTO_KEY_PURPOSE_UNSPECIFIED",
1: "ENCRYPT_DECRYPT",
5: "ASYMMETRIC_SIGN",
6: "ASYMMETRIC_DECRYPT",
7: "RAW_ENCRYPT_DECRYPT",
9: "MAC",
}
CryptoKey_CryptoKeyPurpose_value = map[string]int32{
"CRYPTO_KEY_PURPOSE_UNSPECIFIED": 0,
"ENCRYPT_DECRYPT": 1,
"ASYMMETRIC_SIGN": 5,
"ASYMMETRIC_DECRYPT": 6,
"RAW_ENCRYPT_DECRYPT": 7,
"MAC": 9,
}
)
func (x CryptoKey_CryptoKeyPurpose) Enum() *CryptoKey_CryptoKeyPurpose {
p := new(CryptoKey_CryptoKeyPurpose)
*p = x
return p
}
func (x CryptoKey_CryptoKeyPurpose) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CryptoKey_CryptoKeyPurpose) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_kms_v1_resources_proto_enumTypes[1].Descriptor()
}
func (CryptoKey_CryptoKeyPurpose) Type() protoreflect.EnumType {
return &file_google_cloud_kms_v1_resources_proto_enumTypes[1]
}
func (x CryptoKey_CryptoKeyPurpose) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CryptoKey_CryptoKeyPurpose.Descriptor instead.
func (CryptoKey_CryptoKeyPurpose) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_kms_v1_resources_proto_rawDescGZIP(), []int{1, 0}
}
// Attestation formats provided by the HSM.
type KeyOperationAttestation_AttestationFormat int32
const (
// Not specified.
KeyOperationAttestation_ATTESTATION_FORMAT_UNSPECIFIED KeyOperationAttestation_AttestationFormat = 0
// Cavium HSM attestation compressed with gzip. Note that this format is
// defined by Cavium and subject to change at any time.
//
// See
// https://www.marvell.com/products/security-solutions/nitrox-hs-adapters/software-key-attestation.html.
KeyOperationAttestation_CAVIUM_V1_COMPRESSED KeyOperationAttestation_AttestationFormat = 3
// Cavium HSM attestation V2 compressed with gzip. This is a new format
// introduced in Cavium's version 3.2-08.
KeyOperationAttestation_CAVIUM_V2_COMPRESSED KeyOperationAttestation_AttestationFormat = 4
)
// Enum value maps for KeyOperationAttestation_AttestationFormat.
var (
KeyOperationAttestation_AttestationFormat_name = map[int32]string{
0: "ATTESTATION_FORMAT_UNSPECIFIED",
3: "CAVIUM_V1_COMPRESSED",
4: "CAVIUM_V2_COMPRESSED",
}
KeyOperationAttestation_AttestationFormat_value = map[string]int32{
"ATTESTATION_FORMAT_UNSPECIFIED": 0,
"CAVIUM_V1_COMPRESSED": 3,
"CAVIUM_V2_COMPRESSED": 4,
}
)
func (x KeyOperationAttestation_AttestationFormat) Enum() *KeyOperationAttestation_AttestationFormat {
p := new(KeyOperationAttestation_AttestationFormat)
*p = x
return p
}
func (x KeyOperationAttestation_AttestationFormat) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (KeyOperationAttestation_AttestationFormat) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_kms_v1_resources_proto_enumTypes[2].Descriptor()
}
func (KeyOperationAttestation_AttestationFormat) Type() protoreflect.EnumType {
return &file_google_cloud_kms_v1_resources_proto_enumTypes[2]
}
func (x KeyOperationAttestation_AttestationFormat) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use KeyOperationAttestation_AttestationFormat.Descriptor instead.
func (KeyOperationAttestation_AttestationFormat) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_kms_v1_resources_proto_rawDescGZIP(), []int{3, 0}
}
// The algorithm of the
// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what
// parameters must be used for each cryptographic operation.
//
// The
// [GOOGLE_SYMMETRIC_ENCRYPTION][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION]
// algorithm is usable with
// [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
//
// Algorithms beginning with "RSA_SIGN_" are usable with
// [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
//
// The fields in the name after "RSA_SIGN_" correspond to the following
// parameters: padding algorithm, modulus bit length, and digest algorithm.
//
// For PSS, the salt length used is equal to the length of digest
// algorithm. For example,
// [RSA_SIGN_PSS_2048_SHA256][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256]
// will use PSS with a salt length of 256 bits or 32 bytes.
//
// Algorithms beginning with "RSA_DECRYPT_" are usable with
// [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
//
// The fields in the name after "RSA_DECRYPT_" correspond to the following
// parameters: padding algorithm, modulus bit length, and digest algorithm.
//
// Algorithms beginning with "EC_SIGN_" are usable with
// [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
//
// The fields in the name after "EC_SIGN_" correspond to the following
// parameters: elliptic curve, digest algorithm.
//
// Algorithms beginning with "HMAC_" are usable with
// [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [MAC][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.MAC].
//
// The suffix following "HMAC_" corresponds to the hash algorithm being used
// (eg. SHA256).
//
// For more information, see [Key purposes and algorithms]
// (https://cloud.google.com/kms/docs/algorithms).
type CryptoKeyVersion_CryptoKeyVersionAlgorithm int32
const (
// Not specified.
CryptoKeyVersion_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED CryptoKeyVersion_CryptoKeyVersionAlgorithm = 0
// Creates symmetric encryption keys.
CryptoKeyVersion_GOOGLE_SYMMETRIC_ENCRYPTION CryptoKeyVersion_CryptoKeyVersionAlgorithm = 1
// AES-GCM (Galois Counter Mode) using 128-bit keys.
CryptoKeyVersion_AES_128_GCM CryptoKeyVersion_CryptoKeyVersionAlgorithm = 41
// AES-GCM (Galois Counter Mode) using 256-bit keys.
CryptoKeyVersion_AES_256_GCM CryptoKeyVersion_CryptoKeyVersionAlgorithm = 19
// RSASSA-PSS 2048 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PSS_2048_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 2
// RSASSA-PSS 3072 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PSS_3072_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 3
// RSASSA-PSS 4096 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PSS_4096_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 4
// RSASSA-PSS 4096 bit key with a SHA512 digest.
CryptoKeyVersion_RSA_SIGN_PSS_4096_SHA512 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 15
// RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PKCS1_2048_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 5
// RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PKCS1_3072_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 6
// RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PKCS1_4096_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 7
// RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
CryptoKeyVersion_RSA_SIGN_PKCS1_4096_SHA512 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 16
// RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
CryptoKeyVersion_RSA_SIGN_RAW_PKCS1_2048 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 28
// RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
CryptoKeyVersion_RSA_SIGN_RAW_PKCS1_3072 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 29
// RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
CryptoKeyVersion_RSA_SIGN_RAW_PKCS1_4096 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 30
// RSAES-OAEP 2048 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_DECRYPT_OAEP_2048_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 8
// RSAES-OAEP 3072 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_DECRYPT_OAEP_3072_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 9
// RSAES-OAEP 4096 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_DECRYPT_OAEP_4096_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 10
// RSAES-OAEP 4096 bit key with a SHA512 digest.
CryptoKeyVersion_RSA_DECRYPT_OAEP_4096_SHA512 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 17
// RSAES-OAEP 2048 bit key with a SHA1 digest.
CryptoKeyVersion_RSA_DECRYPT_OAEP_2048_SHA1 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 37
// RSAES-OAEP 3072 bit key with a SHA1 digest.
CryptoKeyVersion_RSA_DECRYPT_OAEP_3072_SHA1 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 38
// RSAES-OAEP 4096 bit key with a SHA1 digest.
CryptoKeyVersion_RSA_DECRYPT_OAEP_4096_SHA1 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 39
// ECDSA on the NIST P-256 curve with a SHA256 digest.
// Other hash functions can also be used:
// https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
CryptoKeyVersion_EC_SIGN_P256_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 12
// ECDSA on the NIST P-384 curve with a SHA384 digest.
// Other hash functions can also be used:
// https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
CryptoKeyVersion_EC_SIGN_P384_SHA384 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 13
// ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
// HSM protection level.
// Other hash functions can also be used:
// https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
CryptoKeyVersion_EC_SIGN_SECP256K1_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 31
// HMAC-SHA256 signing with a 256 bit key.
CryptoKeyVersion_HMAC_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 32
// HMAC-SHA1 signing with a 160 bit key.
CryptoKeyVersion_HMAC_SHA1 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 33
// HMAC-SHA384 signing with a 384 bit key.
CryptoKeyVersion_HMAC_SHA384 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 34
// HMAC-SHA512 signing with a 512 bit key.
CryptoKeyVersion_HMAC_SHA512 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 35
// HMAC-SHA224 signing with a 224 bit key.
CryptoKeyVersion_HMAC_SHA224 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 36
// Algorithm representing symmetric encryption by an external key manager.
CryptoKeyVersion_EXTERNAL_SYMMETRIC_ENCRYPTION CryptoKeyVersion_CryptoKeyVersionAlgorithm = 18
)
// Enum value maps for CryptoKeyVersion_CryptoKeyVersionAlgorithm.
var (
CryptoKeyVersion_CryptoKeyVersionAlgorithm_name = map[int32]string{
0: "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED",
1: "GOOGLE_SYMMETRIC_ENCRYPTION",
41: "AES_128_GCM",
19: "AES_256_GCM",
2: "RSA_SIGN_PSS_2048_SHA256",
3: "RSA_SIGN_PSS_3072_SHA256",
4: "RSA_SIGN_PSS_4096_SHA256",
15: "RSA_SIGN_PSS_4096_SHA512",
5: "RSA_SIGN_PKCS1_2048_SHA256",
6: "RSA_SIGN_PKCS1_3072_SHA256",
7: "RSA_SIGN_PKCS1_4096_SHA256",
16: "RSA_SIGN_PKCS1_4096_SHA512",
28: "RSA_SIGN_RAW_PKCS1_2048",
29: "RSA_SIGN_RAW_PKCS1_3072",
30: "RSA_SIGN_RAW_PKCS1_4096",
8: "RSA_DECRYPT_OAEP_2048_SHA256",
9: "RSA_DECRYPT_OAEP_3072_SHA256",
10: "RSA_DECRYPT_OAEP_4096_SHA256",
17: "RSA_DECRYPT_OAEP_4096_SHA512",
37: "RSA_DECRYPT_OAEP_2048_SHA1",
38: "RSA_DECRYPT_OAEP_3072_SHA1",
39: "RSA_DECRYPT_OAEP_4096_SHA1",
12: "EC_SIGN_P256_SHA256",
13: "EC_SIGN_P384_SHA384",
31: "EC_SIGN_SECP256K1_SHA256",
32: "HMAC_SHA256",
33: "HMAC_SHA1",
34: "HMAC_SHA384",
35: "HMAC_SHA512",
36: "HMAC_SHA224",
18: "EXTERNAL_SYMMETRIC_ENCRYPTION",
}
CryptoKeyVersion_CryptoKeyVersionAlgorithm_value = map[string]int32{
"CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED": 0,
"GOOGLE_SYMMETRIC_ENCRYPTION": 1,
"AES_128_GCM": 41,
"AES_256_GCM": 19,
"RSA_SIGN_PSS_2048_SHA256": 2,
"RSA_SIGN_PSS_3072_SHA256": 3,
"RSA_SIGN_PSS_4096_SHA256": 4,
"RSA_SIGN_PSS_4096_SHA512": 15,
"RSA_SIGN_PKCS1_2048_SHA256": 5,
"RSA_SIGN_PKCS1_3072_SHA256": 6,
"RSA_SIGN_PKCS1_4096_SHA256": 7,
"RSA_SIGN_PKCS1_4096_SHA512": 16,
"RSA_SIGN_RAW_PKCS1_2048": 28,
"RSA_SIGN_RAW_PKCS1_3072": 29,
"RSA_SIGN_RAW_PKCS1_4096": 30,
"RSA_DECRYPT_OAEP_2048_SHA256": 8,
"RSA_DECRYPT_OAEP_3072_SHA256": 9,
"RSA_DECRYPT_OAEP_4096_SHA256": 10,
"RSA_DECRYPT_OAEP_4096_SHA512": 17,
"RSA_DECRYPT_OAEP_2048_SHA1": 37,
"RSA_DECRYPT_OAEP_3072_SHA1": 38,
"RSA_DECRYPT_OAEP_4096_SHA1": 39,
"EC_SIGN_P256_SHA256": 12,
"EC_SIGN_P384_SHA384": 13,
"EC_SIGN_SECP256K1_SHA256": 31,
"HMAC_SHA256": 32,
"HMAC_SHA1": 33,
"HMAC_SHA384": 34,
"HMAC_SHA512": 35,
"HMAC_SHA224": 36,
"EXTERNAL_SYMMETRIC_ENCRYPTION": 18,
}
)
func (x CryptoKeyVersion_CryptoKeyVersionAlgorithm) Enum() *CryptoKeyVersion_CryptoKeyVersionAlgorithm {
p := new(CryptoKeyVersion_CryptoKeyVersionAlgorithm)
*p = x
return p
}
func (x CryptoKeyVersion_CryptoKeyVersionAlgorithm) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CryptoKeyVersion_CryptoKeyVersionAlgorithm) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_kms_v1_resources_proto_enumTypes[3].Descriptor()
}
func (CryptoKeyVersion_CryptoKeyVersionAlgorithm) Type() protoreflect.EnumType {
return &file_google_cloud_kms_v1_resources_proto_enumTypes[3]
}
func (x CryptoKeyVersion_CryptoKeyVersionAlgorithm) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CryptoKeyVersion_CryptoKeyVersionAlgorithm.Descriptor instead.
func (CryptoKeyVersion_CryptoKeyVersionAlgorithm) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_kms_v1_resources_proto_rawDescGZIP(), []int{4, 0}
}
// The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion],
// indicating if it can be used.
type CryptoKeyVersion_CryptoKeyVersionState int32
const (
// Not specified.
CryptoKeyVersion_CRYPTO_KEY_VERSION_STATE_UNSPECIFIED CryptoKeyVersion_CryptoKeyVersionState = 0
// This version is still being generated. It may not be used, enabled,
// disabled, or destroyed yet. Cloud KMS will automatically mark this
// version
// [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
// as soon as the version is ready.
CryptoKeyVersion_PENDING_GENERATION CryptoKeyVersion_CryptoKeyVersionState = 5
// This version may be used for cryptographic operations.
CryptoKeyVersion_ENABLED CryptoKeyVersion_CryptoKeyVersionState = 1
// This version may not be used, but the key material is still available,
// and the version can be placed back into the
// [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
// state.
CryptoKeyVersion_DISABLED CryptoKeyVersion_CryptoKeyVersionState = 2
// This version is destroyed, and the key material is no longer stored.
// This version may only become
// [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
// again if this version is
// [reimport_eligible][google.cloud.kms.v1.CryptoKeyVersion.reimport_eligible]
// and the original key material is reimported with a call to
// [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
CryptoKeyVersion_DESTROYED CryptoKeyVersion_CryptoKeyVersionState = 3
// This version is scheduled for destruction, and will be destroyed soon.
// Call
// [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
// to put it back into the
// [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED]
// state.
CryptoKeyVersion_DESTROY_SCHEDULED CryptoKeyVersion_CryptoKeyVersionState = 4
// This version is still being imported. It may not be used, enabled,
// disabled, or destroyed yet. Cloud KMS will automatically mark this
// version
// [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
// as soon as the version is ready.
CryptoKeyVersion_PENDING_IMPORT CryptoKeyVersion_CryptoKeyVersionState = 6
// This version was not imported successfully. It may not be used, enabled,
// disabled, or destroyed. The submitted key material has been discarded.
// Additional details can be found in
// [CryptoKeyVersion.import_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason].
CryptoKeyVersion_IMPORT_FAILED CryptoKeyVersion_CryptoKeyVersionState = 7
// This version was not generated successfully. It may not be used, enabled,
// disabled, or destroyed. Additional details can be found in
// [CryptoKeyVersion.generation_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.generation_failure_reason].
CryptoKeyVersion_GENERATION_FAILED CryptoKeyVersion_CryptoKeyVersionState = 8
// This version was destroyed, and it may not be used or enabled again.
// Cloud KMS is waiting for the corresponding key material residing in an
// external key manager to be destroyed.
CryptoKeyVersion_PENDING_EXTERNAL_DESTRUCTION CryptoKeyVersion_CryptoKeyVersionState = 9
// This version was destroyed, and it may not be used or enabled again.
// However, Cloud KMS could not confirm that the corresponding key material
// residing in an external key manager was destroyed. Additional details can
// be found in
// [CryptoKeyVersion.external_destruction_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.external_destruction_failure_reason].
CryptoKeyVersion_EXTERNAL_DESTRUCTION_FAILED CryptoKeyVersion_CryptoKeyVersionState = 10
)
// Enum value maps for CryptoKeyVersion_CryptoKeyVersionState.
var (
CryptoKeyVersion_CryptoKeyVersionState_name = map[int32]string{
0: "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED",
5: "PENDING_GENERATION",
1: "ENABLED",
2: "DISABLED",
3: "DESTROYED",
4: "DESTROY_SCHEDULED",
6: "PENDING_IMPORT",
7: "IMPORT_FAILED",
8: "GENERATION_FAILED",
9: "PENDING_EXTERNAL_DESTRUCTION",
10: "EXTERNAL_DESTRUCTION_FAILED",
}
CryptoKeyVersion_CryptoKeyVersionState_value = map[string]int32{
"CRYPTO_KEY_VERSION_STATE_UNSPECIFIED": 0,
"PENDING_GENERATION": 5,
"ENABLED": 1,
"DISABLED": 2,
"DESTROYED": 3,
"DESTROY_SCHEDULED": 4,
"PENDING_IMPORT": 6,
"IMPORT_FAILED": 7,
"GENERATION_FAILED": 8,
"PENDING_EXTERNAL_DESTRUCTION": 9,
"EXTERNAL_DESTRUCTION_FAILED": 10,
}
)
func (x CryptoKeyVersion_CryptoKeyVersionState) Enum() *CryptoKeyVersion_CryptoKeyVersionState {
p := new(CryptoKeyVersion_CryptoKeyVersionState)
*p = x
return p
}
func (x CryptoKeyVersion_CryptoKeyVersionState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CryptoKeyVersion_CryptoKeyVersionState) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_kms_v1_resources_proto_enumTypes[4].Descriptor()
}
func (CryptoKeyVersion_CryptoKeyVersionState) Type() protoreflect.EnumType {
return &file_google_cloud_kms_v1_resources_proto_enumTypes[4]
}
func (x CryptoKeyVersion_CryptoKeyVersionState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CryptoKeyVersion_CryptoKeyVersionState.Descriptor instead.
func (CryptoKeyVersion_CryptoKeyVersionState) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_kms_v1_resources_proto_rawDescGZIP(), []int{4, 1}
}
// A view for [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]s.
// Controls the level of detail returned for
// [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] in
// [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions]
// and
// [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
type CryptoKeyVersion_CryptoKeyVersionView int32
const (
// Default view for each
// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not
// include the
// [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field.
CryptoKeyVersion_CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED CryptoKeyVersion_CryptoKeyVersionView = 0
// Provides all fields in each
// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the
// [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation].
CryptoKeyVersion_FULL CryptoKeyVersion_CryptoKeyVersionView = 1
)
// Enum value maps for CryptoKeyVersion_CryptoKeyVersionView.
var (
CryptoKeyVersion_CryptoKeyVersionView_name = map[int32]string{
0: "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED",
1: "FULL",
}
CryptoKeyVersion_CryptoKeyVersionView_value = map[string]int32{
"CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED": 0,
"FULL": 1,
}
)
func (x CryptoKeyVersion_CryptoKeyVersionView) Enum() *CryptoKeyVersion_CryptoKeyVersionView {
p := new(CryptoKeyVersion_CryptoKeyVersionView)
*p = x
return p
}
func (x CryptoKeyVersion_CryptoKeyVersionView) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CryptoKeyVersion_CryptoKeyVersionView) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_kms_v1_resources_proto_enumTypes[5].Descriptor()
}
func (CryptoKeyVersion_CryptoKeyVersionView) Type() protoreflect.EnumType {
return &file_google_cloud_kms_v1_resources_proto_enumTypes[5]
}
func (x CryptoKeyVersion_CryptoKeyVersionView) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CryptoKeyVersion_CryptoKeyVersionView.Descriptor instead.
func (CryptoKeyVersion_CryptoKeyVersionView) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_kms_v1_resources_proto_rawDescGZIP(), []int{4, 2}
}
// [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] describes the
// key wrapping method chosen for this
// [ImportJob][google.cloud.kms.v1.ImportJob].
type ImportJob_ImportMethod int32
const (
// Not specified.
ImportJob_IMPORT_METHOD_UNSPECIFIED ImportJob_ImportMethod = 0
// This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
// scheme defined in the PKCS #11 standard. In summary, this involves
// wrapping the raw key with an ephemeral AES key, and wrapping the
// ephemeral AES key with a 3072 bit RSA key. For more details, see
// [RSA AES key wrap
// mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
ImportJob_RSA_OAEP_3072_SHA1_AES_256 ImportJob_ImportMethod = 1
// This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
// scheme defined in the PKCS #11 standard. In summary, this involves
// wrapping the raw key with an ephemeral AES key, and wrapping the
// ephemeral AES key with a 4096 bit RSA key. For more details, see
// [RSA AES key wrap
// mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
ImportJob_RSA_OAEP_4096_SHA1_AES_256 ImportJob_ImportMethod = 2
// This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
// scheme defined in the PKCS #11 standard. In summary, this involves
// wrapping the raw key with an ephemeral AES key, and wrapping the
// ephemeral AES key with a 3072 bit RSA key. For more details, see
// [RSA AES key wrap
// mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
ImportJob_RSA_OAEP_3072_SHA256_AES_256 ImportJob_ImportMethod = 3
// This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
// scheme defined in the PKCS #11 standard. In summary, this involves
// wrapping the raw key with an ephemeral AES key, and wrapping the
// ephemeral AES key with a 4096 bit RSA key. For more details, see
// [RSA AES key wrap
// mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
ImportJob_RSA_OAEP_4096_SHA256_AES_256 ImportJob_ImportMethod = 4
// This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The
// key material to be imported is wrapped directly with the RSA key. Due
// to technical limitations of RSA wrapping, this method cannot be used to
// wrap RSA keys for import.
ImportJob_RSA_OAEP_3072_SHA256 ImportJob_ImportMethod = 5
// This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The
// key material to be imported is wrapped directly with the RSA key. Due
// to technical limitations of RSA wrapping, this method cannot be used to
// wrap RSA keys for import.
ImportJob_RSA_OAEP_4096_SHA256 ImportJob_ImportMethod = 6
)
// Enum value maps for ImportJob_ImportMethod.
var (
ImportJob_ImportMethod_name = map[int32]string{
0: "IMPORT_METHOD_UNSPECIFIED",
1: "RSA_OAEP_3072_SHA1_AES_256",
2: "RSA_OAEP_4096_SHA1_AES_256",
3: "RSA_OAEP_3072_SHA256_AES_256",
4: "RSA_OAEP_4096_SHA256_AES_256",
5: "RSA_OAEP_3072_SHA256",
6: "RSA_OAEP_4096_SHA256",
}
ImportJob_ImportMethod_value = map[string]int32{
"IMPORT_METHOD_UNSPECIFIED": 0,
"RSA_OAEP_3072_SHA1_AES_256": 1,
"RSA_OAEP_4096_SHA1_AES_256": 2,
"RSA_OAEP_3072_SHA256_AES_256": 3,
"RSA_OAEP_4096_SHA256_AES_256": 4,
"RSA_OAEP_3072_SHA256": 5,
"RSA_OAEP_4096_SHA256": 6,
}
)
func (x ImportJob_ImportMethod) Enum() *ImportJob_ImportMethod {
p := new(ImportJob_ImportMethod)
*p = x
return p
}
func (x ImportJob_ImportMethod) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ImportJob_ImportMethod) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_kms_v1_resources_proto_enumTypes[6].Descriptor()
}
func (ImportJob_ImportMethod) Type() protoreflect.EnumType {
return &file_google_cloud_kms_v1_resources_proto_enumTypes[6]
}
func (x ImportJob_ImportMethod) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ImportJob_ImportMethod.Descriptor instead.
func (ImportJob_ImportMethod) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_kms_v1_resources_proto_rawDescGZIP(), []int{6, 0}
}
// The state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if
// it can be used.
type ImportJob_ImportJobState int32
const (
// Not specified.
ImportJob_IMPORT_JOB_STATE_UNSPECIFIED ImportJob_ImportJobState = 0
// The wrapping key for this job is still being generated. It may not be
// used. Cloud KMS will automatically mark this job as
// [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as
// the wrapping key is generated.
ImportJob_PENDING_GENERATION ImportJob_ImportJobState = 1
// This job may be used in
// [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey]
// and
// [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
// requests.
ImportJob_ACTIVE ImportJob_ImportJobState = 2
// This job can no longer be used and may not leave this state once entered.
ImportJob_EXPIRED ImportJob_ImportJobState = 3
)
// Enum value maps for ImportJob_ImportJobState.
var (
ImportJob_ImportJobState_name = map[int32]string{
0: "IMPORT_JOB_STATE_UNSPECIFIED",
1: "PENDING_GENERATION",
2: "ACTIVE",
3: "EXPIRED",
}
ImportJob_ImportJobState_value = map[string]int32{
"IMPORT_JOB_STATE_UNSPECIFIED": 0,
"PENDING_GENERATION": 1,
"ACTIVE": 2,
"EXPIRED": 3,
}
)
func (x ImportJob_ImportJobState) Enum() *ImportJob_ImportJobState {
p := new(ImportJob_ImportJobState)
*p = x
return p
}
func (x ImportJob_ImportJobState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ImportJob_ImportJobState) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_kms_v1_resources_proto_enumTypes[7].Descriptor()
}
func (ImportJob_ImportJobState) Type() protoreflect.EnumType {
return &file_google_cloud_kms_v1_resources_proto_enumTypes[7]
}
func (x ImportJob_ImportJobState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ImportJob_ImportJobState.Descriptor instead.
func (ImportJob_ImportJobState) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_kms_v1_resources_proto_rawDescGZIP(), []int{6, 1}
}
// A [KeyRing][google.cloud.kms.v1.KeyRing] is a toplevel logical grouping of
// [CryptoKeys][google.cloud.kms.v1.CryptoKey].
type KeyRing struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Output only. The resource name for the
// [KeyRing][google.cloud.kms.v1.KeyRing] in the format
// `projects/*/locations/*/keyRings/*`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing]
// was created.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
}
func (x *KeyRing) Reset() {
*x = KeyRing{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyRing) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyRing) ProtoMessage() {}
func (x *KeyRing) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KeyRing.ProtoReflect.Descriptor instead.
func (*KeyRing) Descriptor() ([]byte, []int) {
return file_google_cloud_kms_v1_resources_proto_rawDescGZIP(), []int{0}
}
func (x *KeyRing) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *KeyRing) GetCreateTime() *timestamppb.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
// A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that
// can be used for cryptographic operations.
//
// A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of zero or more
// [versions][google.cloud.kms.v1.CryptoKeyVersion], which represent the actual
// key material used in cryptographic operations.
type CryptoKey struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Output only. The resource name for this
// [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. A copy of the "primary"
// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
// by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
// [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
// [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
//
// The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
// updated via
// [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
//
// Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
// may have a primary. For other keys, this field will be omitted.
Primary *CryptoKeyVersion `protobuf:"bytes,2,opt,name=primary,proto3" json:"primary,omitempty"`
// Immutable. The immutable purpose of this
// [CryptoKey][google.cloud.kms.v1.CryptoKey].
Purpose CryptoKey_CryptoKeyPurpose `protobuf:"varint,3,opt,name=purpose,proto3,enum=google.cloud.kms.v1.CryptoKey_CryptoKeyPurpose" json:"purpose,omitempty"`
// Output only. The time at which this
// [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
// the Key Management Service will automatically:
//
// 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
// 2. Mark the new version as primary.
//
// Key rotations performed manually via
// [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
// and
// [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
// do not affect
// [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
//
// Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
// support automatic rotation. For other keys, this field must be omitted.
NextRotationTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=next_rotation_time,json=nextRotationTime,proto3" json:"next_rotation_time,omitempty"`
// Controls the rate of automatic rotation.
//
// Types that are assignable to RotationSchedule:
// *CryptoKey_RotationPeriod
RotationSchedule isCryptoKey_RotationSchedule `protobuf_oneof:"rotation_schedule"`
// A template describing settings for new
// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
// properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
// instances created by either
// [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
// or auto-rotation are controlled by this template.
VersionTemplate *CryptoKeyVersionTemplate `protobuf:"bytes,11,opt,name=version_template,json=versionTemplate,proto3" json:"version_template,omitempty"`
// Labels with user-defined metadata. For more information, see
// [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
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"`
// Immutable. Whether this key may contain imported versions only.
ImportOnly bool `protobuf:"varint,13,opt,name=import_only,json=importOnly,proto3" json:"import_only,omitempty"`
// Immutable. The period of time that versions of this key spend in the
// [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
// state before transitioning to
// [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
// If not specified at creation time, the default duration is 24 hours.
DestroyScheduledDuration *durationpb.Duration `protobuf:"bytes,14,opt,name=destroy_scheduled_duration,json=destroyScheduledDuration,proto3" json:"destroy_scheduled_duration,omitempty"`
// Immutable. The resource name of the backend environment where the key
// material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
// associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and
// where all related cryptographic operations are performed. Only applicable
// if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a
// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
// [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the
// resource name in the format `projects/*/locations/*/ekmConnections/*`.
// Note, this list is non-exhaustive and may apply to additional
// [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future.
CryptoKeyBackend string `protobuf:"bytes,15,opt,name=crypto_key_backend,json=cryptoKeyBackend,proto3" json:"crypto_key_backend,omitempty"`
}
func (x *CryptoKey) Reset() {
*x = CryptoKey{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CryptoKey) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CryptoKey) ProtoMessage() {}
func (x *CryptoKey) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CryptoKey.ProtoReflect.Descriptor instead.
func (*CryptoKey) Descriptor() ([]byte, []int) {
return file_google_cloud_kms_v1_resources_proto_rawDescGZIP(), []int{1}
}
func (x *CryptoKey) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CryptoKey) GetPrimary() *CryptoKeyVersion {
if x != nil {
return x.Primary
}
return nil
}
func (x *CryptoKey) GetPurpose() CryptoKey_CryptoKeyPurpose {
if x != nil {