-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
cloudkms-gen.go
10147 lines (9469 loc) · 419 KB
/
cloudkms-gen.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 2024 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package cloudkms provides access to the Cloud Key Management Service (KMS) API.
//
// This package is DEPRECATED. Use package cloud.google.com/go/kms/apiv1 instead.
//
// For product documentation, see: https://cloud.google.com/kms/
//
// # Library status
//
// These client libraries are officially supported by Google. However, this
// library is considered complete and is in maintenance mode. This means
// that we will address critical bugs and security issues but will not add
// any new features.
//
// When possible, we recommend using our newer
// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
// that are still actively being worked and iterated on.
//
// # Creating a client
//
// Usage example:
//
// import "google.golang.org/api/cloudkms/v1"
// ...
// ctx := context.Background()
// cloudkmsService, err := cloudkms.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for
// authentication. For information on how to create and obtain Application
// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// # Other authentication options
//
// By default, all available scopes (see "Constants") are used to authenticate.
// To restrict scopes, use [google.golang.org/api/option.WithScopes]:
//
// cloudkmsService, err := cloudkms.NewService(ctx, option.WithScopes(cloudkms.CloudkmsScope))
//
// To use an API key for authentication (note: some APIs do not support API
// keys), use [google.golang.org/api/option.WithAPIKey]:
//
// cloudkmsService, err := cloudkms.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
// flow, use [google.golang.org/api/option.WithTokenSource]:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// cloudkmsService, err := cloudkms.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See [google.golang.org/api/option.ClientOption] for details on options.
package cloudkms // import "google.golang.org/api/cloudkms/v1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
internal "google.golang.org/api/internal"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
var _ = internal.Version
const apiId = "cloudkms:v1"
const apiName = "cloudkms"
const apiVersion = "v1"
const basePath = "https://cloudkms.googleapis.com/"
const basePathTemplate = "https://cloudkms.UNIVERSE_DOMAIN/"
const mtlsBasePath = "https://cloudkms.mtls.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// See, edit, configure, and delete your Google Cloud data and see the email
// address for your Google Account.
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
// View and manage your keys and secrets stored in Cloud Key Management Service
CloudkmsScope = "https://www.googleapis.com/auth/cloudkms"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := internaloption.WithDefaultScopes(
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloudkms",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
opts = append(opts, internaloption.EnableNewAuthLibrary())
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Folders = NewFoldersService(s)
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Folders *FoldersService
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewFoldersService(s *Service) *FoldersService {
rs := &FoldersService{s: s}
return rs
}
type FoldersService struct {
s *Service
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Locations = NewProjectsLocationsService(s)
return rs
}
type ProjectsService struct {
s *Service
Locations *ProjectsLocationsService
}
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
rs := &ProjectsLocationsService{s: s}
rs.EkmConfig = NewProjectsLocationsEkmConfigService(s)
rs.EkmConnections = NewProjectsLocationsEkmConnectionsService(s)
rs.KeyHandles = NewProjectsLocationsKeyHandlesService(s)
rs.KeyRings = NewProjectsLocationsKeyRingsService(s)
rs.Operations = NewProjectsLocationsOperationsService(s)
return rs
}
type ProjectsLocationsService struct {
s *Service
EkmConfig *ProjectsLocationsEkmConfigService
EkmConnections *ProjectsLocationsEkmConnectionsService
KeyHandles *ProjectsLocationsKeyHandlesService
KeyRings *ProjectsLocationsKeyRingsService
Operations *ProjectsLocationsOperationsService
}
func NewProjectsLocationsEkmConfigService(s *Service) *ProjectsLocationsEkmConfigService {
rs := &ProjectsLocationsEkmConfigService{s: s}
return rs
}
type ProjectsLocationsEkmConfigService struct {
s *Service
}
func NewProjectsLocationsEkmConnectionsService(s *Service) *ProjectsLocationsEkmConnectionsService {
rs := &ProjectsLocationsEkmConnectionsService{s: s}
return rs
}
type ProjectsLocationsEkmConnectionsService struct {
s *Service
}
func NewProjectsLocationsKeyHandlesService(s *Service) *ProjectsLocationsKeyHandlesService {
rs := &ProjectsLocationsKeyHandlesService{s: s}
return rs
}
type ProjectsLocationsKeyHandlesService struct {
s *Service
}
func NewProjectsLocationsKeyRingsService(s *Service) *ProjectsLocationsKeyRingsService {
rs := &ProjectsLocationsKeyRingsService{s: s}
rs.CryptoKeys = NewProjectsLocationsKeyRingsCryptoKeysService(s)
rs.ImportJobs = NewProjectsLocationsKeyRingsImportJobsService(s)
return rs
}
type ProjectsLocationsKeyRingsService struct {
s *Service
CryptoKeys *ProjectsLocationsKeyRingsCryptoKeysService
ImportJobs *ProjectsLocationsKeyRingsImportJobsService
}
func NewProjectsLocationsKeyRingsCryptoKeysService(s *Service) *ProjectsLocationsKeyRingsCryptoKeysService {
rs := &ProjectsLocationsKeyRingsCryptoKeysService{s: s}
rs.CryptoKeyVersions = NewProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService(s)
return rs
}
type ProjectsLocationsKeyRingsCryptoKeysService struct {
s *Service
CryptoKeyVersions *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService
}
func NewProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService(s *Service) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService {
rs := &ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService{s: s}
return rs
}
type ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService struct {
s *Service
}
func NewProjectsLocationsKeyRingsImportJobsService(s *Service) *ProjectsLocationsKeyRingsImportJobsService {
rs := &ProjectsLocationsKeyRingsImportJobsService{s: s}
return rs
}
type ProjectsLocationsKeyRingsImportJobsService struct {
s *Service
}
func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
rs := &ProjectsLocationsOperationsService{s: s}
return rs
}
type ProjectsLocationsOperationsService struct {
s *Service
}
// AsymmetricDecryptRequest: Request message for
// KeyManagementService.AsymmetricDecrypt.
type AsymmetricDecryptRequest struct {
// Ciphertext: Required. The data encrypted with the named CryptoKeyVersion's
// public key using OAEP.
Ciphertext string `json:"ciphertext,omitempty"`
// CiphertextCrc32c: Optional. An optional CRC32C checksum of the
// AsymmetricDecryptRequest.ciphertext. If specified, KeyManagementService will
// verify the integrity of the received AsymmetricDecryptRequest.ciphertext
// using this checksum. KeyManagementService will report an error if the
// checksum verification fails. If you receive a checksum error, your client
// should verify that CRC32C(AsymmetricDecryptRequest.ciphertext) is equal to
// AsymmetricDecryptRequest.ciphertext_crc32c, and if so, perform a limited
// number of retries. A persistent mismatch may indicate an issue in your
// computation of the CRC32C checksum. Note: This field is defined as int64 for
// reasons of compatibility across different languages. However, it is a
// non-negative integer, which will never exceed 2^32-1, and can be safely
// downconverted to uint32 in languages that support this type.
CiphertextCrc32c int64 `json:"ciphertextCrc32c,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Ciphertext") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Ciphertext") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *AsymmetricDecryptRequest) MarshalJSON() ([]byte, error) {
type NoMethod AsymmetricDecryptRequest
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// AsymmetricDecryptResponse: Response message for
// KeyManagementService.AsymmetricDecrypt.
type AsymmetricDecryptResponse struct {
// Plaintext: The decrypted data originally encrypted with the matching public
// key.
Plaintext string `json:"plaintext,omitempty"`
// PlaintextCrc32c: Integrity verification field. A CRC32C checksum of the
// returned AsymmetricDecryptResponse.plaintext. An integrity check of
// AsymmetricDecryptResponse.plaintext can be performed by computing the CRC32C
// checksum of AsymmetricDecryptResponse.plaintext and comparing your results
// to this field. Discard the response in case of non-matching checksum values,
// and perform a limited number of retries. A persistent mismatch may indicate
// an issue in your computation of the CRC32C checksum. Note: This field is
// defined as int64 for reasons of compatibility across different languages.
// However, it is a non-negative integer, which will never exceed 2^32-1, and
// can be safely downconverted to uint32 in languages that support this type.
PlaintextCrc32c int64 `json:"plaintextCrc32c,omitempty,string"`
// ProtectionLevel: The ProtectionLevel of the CryptoKeyVersion used in
// decryption.
//
// Possible values:
// "PROTECTION_LEVEL_UNSPECIFIED" - Not specified.
// "SOFTWARE" - Crypto operations are performed in software.
// "HSM" - Crypto operations are performed in a Hardware Security Module.
// "EXTERNAL" - Crypto operations are performed by an external key manager.
// "EXTERNAL_VPC" - Crypto operations are performed in an EKM-over-VPC
// backend.
ProtectionLevel string `json:"protectionLevel,omitempty"`
// VerifiedCiphertextCrc32c: Integrity verification field. A flag indicating
// whether AsymmetricDecryptRequest.ciphertext_crc32c was received by
// KeyManagementService and used for the integrity verification of the
// ciphertext. A false value of this field indicates either that
// AsymmetricDecryptRequest.ciphertext_crc32c was left unset or that it was not
// delivered to KeyManagementService. If you've set
// AsymmetricDecryptRequest.ciphertext_crc32c but this field is still false,
// discard the response and perform a limited number of retries.
VerifiedCiphertextCrc32c bool `json:"verifiedCiphertextCrc32c,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Plaintext") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Plaintext") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *AsymmetricDecryptResponse) MarshalJSON() ([]byte, error) {
type NoMethod AsymmetricDecryptResponse
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// AsymmetricSignRequest: Request message for
// KeyManagementService.AsymmetricSign.
type AsymmetricSignRequest struct {
// Data: Optional. The data to sign. It can't be supplied if
// AsymmetricSignRequest.digest is supplied.
Data string `json:"data,omitempty"`
// DataCrc32c: Optional. An optional CRC32C checksum of the
// AsymmetricSignRequest.data. If specified, KeyManagementService will verify
// the integrity of the received AsymmetricSignRequest.data using this
// checksum. KeyManagementService will report an error if the checksum
// verification fails. If you receive a checksum error, your client should
// verify that CRC32C(AsymmetricSignRequest.data) is equal to
// AsymmetricSignRequest.data_crc32c, and if so, perform a limited number of
// retries. A persistent mismatch may indicate an issue in your computation of
// the CRC32C checksum. Note: This field is defined as int64 for reasons of
// compatibility across different languages. However, it is a non-negative
// integer, which will never exceed 2^32-1, and can be safely downconverted to
// uint32 in languages that support this type.
DataCrc32c int64 `json:"dataCrc32c,omitempty,string"`
// Digest: Optional. The digest of the data to sign. The digest must be
// produced with the same digest algorithm as specified by the key version's
// algorithm. This field may not be supplied if AsymmetricSignRequest.data is
// supplied.
Digest *Digest `json:"digest,omitempty"`
// DigestCrc32c: Optional. An optional CRC32C checksum of the
// AsymmetricSignRequest.digest. If specified, KeyManagementService will verify
// the integrity of the received AsymmetricSignRequest.digest using this
// checksum. KeyManagementService will report an error if the checksum
// verification fails. If you receive a checksum error, your client should
// verify that CRC32C(AsymmetricSignRequest.digest) is equal to
// AsymmetricSignRequest.digest_crc32c, and if so, perform a limited number of
// retries. A persistent mismatch may indicate an issue in your computation of
// the CRC32C checksum. Note: This field is defined as int64 for reasons of
// compatibility across different languages. However, it is a non-negative
// integer, which will never exceed 2^32-1, and can be safely downconverted to
// uint32 in languages that support this type.
DigestCrc32c int64 `json:"digestCrc32c,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Data") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Data") to include in API requests
// with the JSON null value. By default, fields with empty values are omitted
// from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *AsymmetricSignRequest) MarshalJSON() ([]byte, error) {
type NoMethod AsymmetricSignRequest
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// AsymmetricSignResponse: Response message for
// KeyManagementService.AsymmetricSign.
type AsymmetricSignResponse struct {
// Name: The resource name of the CryptoKeyVersion used for signing. Check this
// field to verify that the intended resource was used for signing.
Name string `json:"name,omitempty"`
// ProtectionLevel: The ProtectionLevel of the CryptoKeyVersion used for
// signing.
//
// Possible values:
// "PROTECTION_LEVEL_UNSPECIFIED" - Not specified.
// "SOFTWARE" - Crypto operations are performed in software.
// "HSM" - Crypto operations are performed in a Hardware Security Module.
// "EXTERNAL" - Crypto operations are performed by an external key manager.
// "EXTERNAL_VPC" - Crypto operations are performed in an EKM-over-VPC
// backend.
ProtectionLevel string `json:"protectionLevel,omitempty"`
// Signature: The created signature.
Signature string `json:"signature,omitempty"`
// SignatureCrc32c: Integrity verification field. A CRC32C checksum of the
// returned AsymmetricSignResponse.signature. An integrity check of
// AsymmetricSignResponse.signature can be performed by computing the CRC32C
// checksum of AsymmetricSignResponse.signature and comparing your results to
// this field. Discard the response in case of non-matching checksum values,
// and perform a limited number of retries. A persistent mismatch may indicate
// an issue in your computation of the CRC32C checksum. Note: This field is
// defined as int64 for reasons of compatibility across different languages.
// However, it is a non-negative integer, which will never exceed 2^32-1, and
// can be safely downconverted to uint32 in languages that support this type.
SignatureCrc32c int64 `json:"signatureCrc32c,omitempty,string"`
// VerifiedDataCrc32c: Integrity verification field. A flag indicating whether
// AsymmetricSignRequest.data_crc32c was received by KeyManagementService and
// used for the integrity verification of the data. A false value of this field
// indicates either that AsymmetricSignRequest.data_crc32c was left unset or
// that it was not delivered to KeyManagementService. If you've set
// AsymmetricSignRequest.data_crc32c but this field is still false, discard the
// response and perform a limited number of retries.
VerifiedDataCrc32c bool `json:"verifiedDataCrc32c,omitempty"`
// VerifiedDigestCrc32c: Integrity verification field. A flag indicating
// whether AsymmetricSignRequest.digest_crc32c was received by
// KeyManagementService and used for the integrity verification of the digest.
// A false value of this field indicates either that
// AsymmetricSignRequest.digest_crc32c was left unset or that it was not
// delivered to KeyManagementService. If you've set
// AsymmetricSignRequest.digest_crc32c but this field is still false, discard
// the response and perform a limited number of retries.
VerifiedDigestCrc32c bool `json:"verifiedDigestCrc32c,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API requests
// with the JSON null value. By default, fields with empty values are omitted
// from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *AsymmetricSignResponse) MarshalJSON() ([]byte, error) {
type NoMethod AsymmetricSignResponse
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// AuditConfig: Specifies the audit configuration for a service. The
// configuration determines which permission types are logged, and what
// identities, if any, are exempted from logging. An AuditConfig must have one
// or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
// and a specific service, the union of the two AuditConfigs is used for that
// service: the log_types specified in each AuditConfig are enabled, and the
// exempted_members in each AuditLogConfig are exempted. Example Policy with
// multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
// "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
// "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
// "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
// "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For
// sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
// logging. It also exempts `[email protected]` from DATA_READ logging, and
// `[email protected]` from DATA_WRITE logging.
type AuditConfig struct {
// AuditLogConfigs: The configuration for logging of each type of permission.
AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
// Service: Specifies a service that will be enabled for audit logging. For
// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
// is a special value that covers all services.
Service string `json:"service,omitempty"`
// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
// API requests with the JSON null value. By default, fields with empty values
// are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *AuditConfig) MarshalJSON() ([]byte, error) {
type NoMethod AuditConfig
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// AuditLogConfig: Provides the configuration for logging a type of
// permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
// "exempted_members": [ "user:[email protected]" ] }, { "log_type":
// "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
// exempting [email protected] from DATA_READ logging.
type AuditLogConfig struct {
// ExemptedMembers: Specifies the identities that do not cause logging for this
// type of permission. Follows the same format of Binding.members.
ExemptedMembers []string `json:"exemptedMembers,omitempty"`
// LogType: The log type that this config enables.
//
// Possible values:
// "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
// "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
// "DATA_WRITE" - Data writes. Example: CloudSQL Users create
// "DATA_READ" - Data reads. Example: CloudSQL Users list
LogType string `json:"logType,omitempty"`
// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
// API requests with the JSON null value. By default, fields with empty values
// are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
type NoMethod AuditLogConfig
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// AutokeyConfig: Cloud KMS Autokey configuration for a folder.
type AutokeyConfig struct {
// KeyProject: Optional. Name of the key project, e.g. `projects/{PROJECT_ID}`
// or `projects/{PROJECT_NUMBER}`, where Cloud KMS Autokey will provision a new
// CryptoKey when a KeyHandle is created. On UpdateAutokeyConfig, the caller
// will require `cloudkms.cryptoKeys.setIamPolicy` permission on this key
// project. Once configured, for Cloud KMS Autokey to function properly, this
// key project must have the Cloud KMS API activated and the Cloud KMS Service
// Agent for this key project must be granted the `cloudkms.admin` role (or
// pertinent permissions). A request with an empty key project field will clear
// the configuration.
KeyProject string `json:"keyProject,omitempty"`
// Name: Identifier. Name of the AutokeyConfig resource, e.g.
// `folders/{FOLDER_NUMBER}/autokeyConfig`.
Name string `json:"name,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "KeyProject") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "KeyProject") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *AutokeyConfig) MarshalJSON() ([]byte, error) {
type NoMethod AutokeyConfig
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// Binding: Associates `members`, or principals, with a `role`.
type Binding struct {
// Condition: The condition that is associated with this binding. If the
// condition evaluates to `true`, then this binding applies to the current
// request. If the condition evaluates to `false`, then this binding does not
// apply to the current request. However, a different role binding might grant
// the same role to one or more of the principals in this binding. To learn
// which resources support conditions in their IAM policies, see the IAM
// documentation
// (https://cloud.google.com/iam/help/conditions/resource-policies).
Condition *Expr `json:"condition,omitempty"`
// Members: Specifies the principals requesting access for a Google Cloud
// resource. `members` can have the following values: * `allUsers`: A special
// identifier that represents anyone who is on the internet; with or without a
// Google account. * `allAuthenticatedUsers`: A special identifier that
// represents anyone who is authenticated with a Google account or a service
// account. Does not include identities that come from external identity
// providers (IdPs) through identity federation. * `user:{emailid}`: An email
// address that represents a specific Google account. For example,
// `[email protected]` . * `serviceAccount:{emailid}`: An email address that
// represents a Google service account. For example,
// `[email protected]`. *
// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
// identifier for a Kubernetes service account
// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
// `group:{emailid}`: An email address that represents a Google group. For
// example, `[email protected]`. * `domain:{domain}`: The G Suite domain
// (primary) that represents all the users of that domain. For example,
// `google.com` or `example.com`. *
// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
// ject/{subject_attribute_value}`: A single identity in a workforce identity
// pool. *
// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
// group/{group_id}`: All workforce identities in a group. *
// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
// a specific attribute value. *
// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
// *`: All identities in a workforce identity pool. *
// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
// identity in a workload identity pool. *
// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
// group. *
// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
// `: All identities in a workload identity pool with a certain attribute. *
// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
// unique identifier) representing a user that has been recently deleted. For
// example, `[email protected]?uid=123456789012345678901`. If the user is
// recovered, this value reverts to `user:{emailid}` and the recovered user
// retains the role in the binding. *
// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
// unique identifier) representing a service account that has been recently
// deleted. For example,
// `[email protected]?uid=123456789012345678901`. If the
// service account is undeleted, this value reverts to
// `serviceAccount:{emailid}` and the undeleted service account retains the
// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
// address (plus unique identifier) representing a Google group that has been
// recently deleted. For example,
// `[email protected]?uid=123456789012345678901`. If the group is recovered,
// this value reverts to `group:{emailid}` and the recovered group retains the
// role in the binding. *
// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
// workforce identity pool. For example,
// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
// ol-id/subject/my-subject-attribute-value`.
Members []string `json:"members,omitempty"`
// Role: Role that is assigned to the list of `members`, or principals. For
// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
// of the IAM roles and permissions, see the IAM documentation
// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
// available pre-defined roles, see here
// (https://cloud.google.com/iam/docs/understanding-roles).
Role string `json:"role,omitempty"`
// ForceSendFields is a list of field names (e.g. "Condition") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Condition") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *Binding) MarshalJSON() ([]byte, error) {
type NoMethod Binding
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// Certificate: A Certificate represents an X.509 certificate used to
// authenticate HTTPS connections to EKM replicas.
type Certificate struct {
// Issuer: Output only. The issuer distinguished name in RFC 2253 format. Only
// present if parsed is true.
Issuer string `json:"issuer,omitempty"`
// NotAfterTime: Output only. The certificate is not valid after this time.
// Only present if parsed is true.
NotAfterTime string `json:"notAfterTime,omitempty"`
// NotBeforeTime: Output only. The certificate is not valid before this time.
// Only present if parsed is true.
NotBeforeTime string `json:"notBeforeTime,omitempty"`
// Parsed: Output only. True if the certificate was parsed successfully.
Parsed bool `json:"parsed,omitempty"`
// RawDer: Required. The raw certificate bytes in DER format.
RawDer string `json:"rawDer,omitempty"`
// SerialNumber: Output only. The certificate serial number as a hex string.
// Only present if parsed is true.
SerialNumber string `json:"serialNumber,omitempty"`
// Sha256Fingerprint: Output only. The SHA-256 certificate fingerprint as a hex
// string. Only present if parsed is true.
Sha256Fingerprint string `json:"sha256Fingerprint,omitempty"`
// Subject: Output only. The subject distinguished name in RFC 2253 format.
// Only present if parsed is true.
Subject string `json:"subject,omitempty"`
// SubjectAlternativeDnsNames: Output only. The subject Alternative DNS names.
// Only present if parsed is true.
SubjectAlternativeDnsNames []string `json:"subjectAlternativeDnsNames,omitempty"`
// ForceSendFields is a list of field names (e.g. "Issuer") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Issuer") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *Certificate) MarshalJSON() ([]byte, error) {
type NoMethod Certificate
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// CertificateChains: Certificate chains needed to verify the attestation.
// Certificates in chains are PEM-encoded and are ordered based on
// https://tools.ietf.org/html/rfc5246#section-7.4.2.
type CertificateChains struct {
// CaviumCerts: Cavium certificate chain corresponding to the attestation.
CaviumCerts []string `json:"caviumCerts,omitempty"`
// GoogleCardCerts: Google card certificate chain corresponding to the
// attestation.
GoogleCardCerts []string `json:"googleCardCerts,omitempty"`
// GooglePartitionCerts: Google partition certificate chain corresponding to
// the attestation.
GooglePartitionCerts []string `json:"googlePartitionCerts,omitempty"`
// ForceSendFields is a list of field names (e.g. "CaviumCerts") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CaviumCerts") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *CertificateChains) MarshalJSON() ([]byte, error) {
type NoMethod CertificateChains
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// CryptoKey: A CryptoKey represents a logical key that can be used for
// cryptographic operations. A CryptoKey is made up of zero or more versions,
// which represent the actual key material used in cryptographic operations.
type CryptoKey struct {
// CreateTime: Output only. The time at which this CryptoKey was created.
CreateTime string `json:"createTime,omitempty"`
// CryptoKeyBackend: Immutable. The resource name of the backend environment
// where the key material for all CryptoKeyVersions associated with this
// CryptoKey reside and where all related cryptographic operations are
// performed. Only applicable if CryptoKeyVersions have a ProtectionLevel of
// EXTERNAL_VPC, with the resource name in the format
// `projects/*/locations/*/ekmConnections/*`. Note, this list is non-exhaustive
// and may apply to additional ProtectionLevels in the future.
CryptoKeyBackend string `json:"cryptoKeyBackend,omitempty"`
// DestroyScheduledDuration: Immutable. The period of time that versions of
// this key spend in the DESTROY_SCHEDULED state before transitioning to
// DESTROYED. If not specified at creation time, the default duration is 24
// hours.
DestroyScheduledDuration string `json:"destroyScheduledDuration,omitempty"`
// ImportOnly: Immutable. Whether this key may contain imported versions only.
ImportOnly bool `json:"importOnly,omitempty"`
// Labels: Labels with user-defined metadata. For more information, see
// Labeling Keys (https://cloud.google.com/kms/docs/labeling-keys).
Labels map[string]string `json:"labels,omitempty"`
// Name: Output only. The resource name for this CryptoKey in the format
// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
Name string `json:"name,omitempty"`
// NextRotationTime: At next_rotation_time, the Key Management Service will
// automatically: 1. Create a new version of this CryptoKey. 2. Mark the new
// version as primary. Key rotations performed manually via
// CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect
// next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic
// rotation. For other keys, this field must be omitted.
NextRotationTime string `json:"nextRotationTime,omitempty"`
// Primary: Output only. A copy of the "primary" CryptoKeyVersion that will be
// used by Encrypt when this CryptoKey is given in EncryptRequest.name. The
// CryptoKey's primary version can be updated via
// UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a
// primary. For other keys, this field will be omitted.
Primary *CryptoKeyVersion `json:"primary,omitempty"`
// Purpose: Immutable. The immutable purpose of this CryptoKey.
//
// Possible values:
// "CRYPTO_KEY_PURPOSE_UNSPECIFIED" - Not specified.
// "ENCRYPT_DECRYPT" - CryptoKeys with this purpose may be used with Encrypt
// and Decrypt.
// "ASYMMETRIC_SIGN" - CryptoKeys with this purpose may be used with
// AsymmetricSign and GetPublicKey.
// "ASYMMETRIC_DECRYPT" - CryptoKeys with this purpose may be used with
// AsymmetricDecrypt and GetPublicKey.
// "RAW_ENCRYPT_DECRYPT" - CryptoKeys with this purpose may be used with
// RawEncrypt and RawDecrypt. This purpose is meant to be used for
// interoperable symmetric encryption and does not support automatic CryptoKey
// rotation.
// "MAC" - CryptoKeys with this purpose may be used with MacSign.
Purpose string `json:"purpose,omitempty"`
// RotationPeriod: next_rotation_time will be advanced by this period when the
// service automatically rotates a key. Must be at least 24 hours and at most
// 876,000 hours. If rotation_period is set, next_rotation_time must also be
// set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other
// keys, this field must be omitted.
RotationPeriod string `json:"rotationPeriod,omitempty"`
// VersionTemplate: A template describing settings for new CryptoKeyVersion
// instances. The properties of new CryptoKeyVersion instances created by
// either CreateCryptoKeyVersion or auto-rotation are controlled by this
// template.
VersionTemplate *CryptoKeyVersionTemplate `json:"versionTemplate,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s *CryptoKey) MarshalJSON() ([]byte, error) {
type NoMethod CryptoKey
return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
}
// CryptoKeyVersion: A CryptoKeyVersion represents an individual cryptographic
// key, and the associated key material. An ENABLED version can be used for
// cryptographic operations. For security reasons, the raw cryptographic key
// material represented by a CryptoKeyVersion can never be viewed or exported.
// It can only be used to encrypt, decrypt, or sign data when an authorized
// user or application invokes Cloud KMS.
type CryptoKeyVersion struct {
// Algorithm: Output only. The CryptoKeyVersionAlgorithm that this
// CryptoKeyVersion supports.
//
// Possible values:
// "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED" - Not specified.
// "GOOGLE_SYMMETRIC_ENCRYPTION" - Creates symmetric encryption keys.
// "AES_128_GCM" - AES-GCM (Galois Counter Mode) using 128-bit keys.
// "AES_256_GCM" - AES-GCM (Galois Counter Mode) using 256-bit keys.
// "AES_128_CBC" - AES-CBC (Cipher Block Chaining Mode) using 128-bit keys.
// "AES_256_CBC" - AES-CBC (Cipher Block Chaining Mode) using 256-bit keys.
// "AES_128_CTR" - AES-CTR (Counter Mode) using 128-bit keys.
// "AES_256_CTR" - AES-CTR (Counter Mode) using 256-bit keys.
// "RSA_SIGN_PSS_2048_SHA256" - RSASSA-PSS 2048 bit key with a SHA256 digest.
// "RSA_SIGN_PSS_3072_SHA256" - RSASSA-PSS 3072 bit key with a SHA256 digest.
// "RSA_SIGN_PSS_4096_SHA256" - RSASSA-PSS 4096 bit key with a SHA256 digest.
// "RSA_SIGN_PSS_4096_SHA512" - RSASSA-PSS 4096 bit key with a SHA512 digest.
// "RSA_SIGN_PKCS1_2048_SHA256" - RSASSA-PKCS1-v1_5 with a 2048 bit key and a
// SHA256 digest.
// "RSA_SIGN_PKCS1_3072_SHA256" - RSASSA-PKCS1-v1_5 with a 3072 bit key and a
// SHA256 digest.
// "RSA_SIGN_PKCS1_4096_SHA256" - RSASSA-PKCS1-v1_5 with a 4096 bit key and a
// SHA256 digest.
// "RSA_SIGN_PKCS1_4096_SHA512" - RSASSA-PKCS1-v1_5 with a 4096 bit key and a
// SHA512 digest.
// "RSA_SIGN_RAW_PKCS1_2048" - RSASSA-PKCS1-v1_5 signing without encoding,
// with a 2048 bit key.
// "RSA_SIGN_RAW_PKCS1_3072" - RSASSA-PKCS1-v1_5 signing without encoding,
// with a 3072 bit key.
// "RSA_SIGN_RAW_PKCS1_4096" - RSASSA-PKCS1-v1_5 signing without encoding,
// with a 4096 bit key.
// "RSA_DECRYPT_OAEP_2048_SHA256" - RSAES-OAEP 2048 bit key with a SHA256
// digest.
// "RSA_DECRYPT_OAEP_3072_SHA256" - RSAES-OAEP 3072 bit key with a SHA256
// digest.
// "RSA_DECRYPT_OAEP_4096_SHA256" - RSAES-OAEP 4096 bit key with a SHA256
// digest.
// "RSA_DECRYPT_OAEP_4096_SHA512" - RSAES-OAEP 4096 bit key with a SHA512
// digest.
// "RSA_DECRYPT_OAEP_2048_SHA1" - RSAES-OAEP 2048 bit key with a SHA1 digest.
// "RSA_DECRYPT_OAEP_3072_SHA1" - RSAES-OAEP 3072 bit key with a SHA1 digest.
// "RSA_DECRYPT_OAEP_4096_SHA1" - RSAES-OAEP 4096 bit key with a SHA1 digest.
// "EC_SIGN_P256_SHA256" - 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
// "EC_SIGN_P384_SHA384" - 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
// "EC_SIGN_SECP256K1_SHA256" - 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
// "EC_SIGN_ED25519" - EdDSA on the Curve25519 in pure mode (taking data as
// input).
// "HMAC_SHA256" - HMAC-SHA256 signing with a 256 bit key.
// "HMAC_SHA1" - HMAC-SHA1 signing with a 160 bit key.
// "HMAC_SHA384" - HMAC-SHA384 signing with a 384 bit key.
// "HMAC_SHA512" - HMAC-SHA512 signing with a 512 bit key.
// "HMAC_SHA224" - HMAC-SHA224 signing with a 224 bit key.
// "EXTERNAL_SYMMETRIC_ENCRYPTION" - Algorithm representing symmetric
// encryption by an external key manager.
Algorithm string `json:"algorithm,omitempty"`
// Attestation: Output only. Statement that was generated and signed by the HSM
// at key creation time. Use this statement to verify attributes of the key as
// stored on the HSM, independently of Google. Only provided for key versions
// with protection_level HSM.
Attestation *KeyOperationAttestation `json:"attestation,omitempty"`
// CreateTime: Output only. The time at which this CryptoKeyVersion was
// created.
CreateTime string `json:"createTime,omitempty"`
// DestroyEventTime: Output only. The time this CryptoKeyVersion's key material
// was destroyed. Only present if state is DESTROYED.
DestroyEventTime string `json:"destroyEventTime,omitempty"`
// DestroyTime: Output only. The time this CryptoKeyVersion's key material is
// scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
DestroyTime string `json:"destroyTime,omitempty"`
// ExternalDestructionFailureReason: Output only. The root cause of the most
// recent external destruction failure. Only present if state is
// EXTERNAL_DESTRUCTION_FAILED.
ExternalDestructionFailureReason string `json:"externalDestructionFailureReason,omitempty"`
// ExternalProtectionLevelOptions: ExternalProtectionLevelOptions stores a
// group of additional fields for configuring a CryptoKeyVersion that are
// specific to the EXTERNAL protection level and EXTERNAL_VPC protection
// levels.
ExternalProtectionLevelOptions *ExternalProtectionLevelOptions `json:"externalProtectionLevelOptions,omitempty"`
// GenerateTime: Output only. The time this CryptoKeyVersion's key material was
// generated.
GenerateTime string `json:"generateTime,omitempty"`
// GenerationFailureReason: Output only. The root cause of the most recent
// generation failure. Only present if state is GENERATION_FAILED.
GenerationFailureReason string `json:"generationFailureReason,omitempty"`
// ImportFailureReason: Output only. The root cause of the most recent import
// failure. Only present if state is IMPORT_FAILED.
ImportFailureReason string `json:"importFailureReason,omitempty"`
// ImportJob: Output only. The name of the ImportJob used in the most recent
// import of this CryptoKeyVersion. Only present if the underlying key material
// was imported.
ImportJob string `json:"importJob,omitempty"`
// ImportTime: Output only. The time at which this CryptoKeyVersion's key
// material was most recently imported.
ImportTime string `json:"importTime,omitempty"`
// Name: Output only. The resource name for this CryptoKeyVersion in the format
// `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Name string `json:"name,omitempty"`
// ProtectionLevel: Output only. The ProtectionLevel describing how crypto