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
1001
1002
1003
1004
// This file is @generated by prost-build.
/// CertificateIssuanceConfig specifies how to issue and manage a certificate.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateIssuanceConfig {
/// A user-defined name of the certificate issuance config.
/// CertificateIssuanceConfig names must be unique globally and match pattern
/// `projects/*/locations/*/certificateIssuanceConfigs/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a CertificateIssuanceConfig.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Output only. The last update timestamp of a CertificateIssuanceConfig.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Set of labels associated with a CertificateIssuanceConfig.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// One or more paragraphs of text description of a CertificateIssuanceConfig.
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
/// Required. The CA that issues the workload certificate. It includes the CA
/// address, type, authentication to CA service, etc.
#[prost(message, optional, tag = "6")]
pub certificate_authority_config: ::core::option::Option<
certificate_issuance_config::CertificateAuthorityConfig,
>,
/// Required. Workload certificate lifetime requested.
#[prost(message, optional, tag = "7")]
pub lifetime: ::core::option::Option<::pbjson_types::Duration>,
/// Required. Specifies the percentage of elapsed time of the certificate
/// lifetime to wait before renewing the certificate. Must be a number between
/// 1-99, inclusive.
#[prost(int32, tag = "8")]
pub rotation_window_percentage: i32,
/// Required. The key algorithm to use when generating the private key.
#[prost(enumeration = "certificate_issuance_config::KeyAlgorithm", tag = "9")]
pub key_algorithm: i32,
}
/// Nested message and enum types in `CertificateIssuanceConfig`.
pub mod certificate_issuance_config {
/// The CA that issues the workload certificate. It includes CA address, type,
/// authentication to CA service, etc.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateAuthorityConfig {
#[prost(oneof = "certificate_authority_config::Kind", tags = "1")]
pub kind: ::core::option::Option<certificate_authority_config::Kind>,
}
/// Nested message and enum types in `CertificateAuthorityConfig`.
pub mod certificate_authority_config {
/// Contains information required to contact CA service.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateAuthorityServiceConfig {
/// Required. A CA pool resource used to issue a certificate.
/// The CA pool string has a relative resource path following the form
/// "projects/{project}/locations/{location}/caPools/{ca_pool}".
#[prost(string, tag = "1")]
pub ca_pool: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
/// Defines a CertificateAuthorityServiceConfig.
#[prost(message, tag = "1")]
CertificateAuthorityServiceConfig(CertificateAuthorityServiceConfig),
}
}
/// The type of keypair to generate.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum KeyAlgorithm {
/// Unspecified key algorithm.
Unspecified = 0,
/// Specifies RSA with a 2048-bit modulus.
Rsa2048 = 1,
/// Specifies ECDSA with curve P256.
EcdsaP256 = 4,
}
impl KeyAlgorithm {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "KEY_ALGORITHM_UNSPECIFIED",
Self::Rsa2048 => "RSA_2048",
Self::EcdsaP256 => "ECDSA_P256",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KEY_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
"RSA_2048" => Some(Self::Rsa2048),
"ECDSA_P256" => Some(Self::EcdsaP256),
_ => None,
}
}
}
}
/// Defines TLS certificate.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Certificate {
/// A user-defined name of the certificate. Certificate names must be unique
/// globally and match pattern `projects/*/locations/*/certificates/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// One or more paragraphs of text description of a certificate.
#[prost(string, tag = "8")]
pub description: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a Certificate.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Output only. The last update timestamp of a Certificate.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Set of labels associated with a Certificate.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. The list of Subject Alternative Names of dnsName type defined
/// in the certificate (see RFC 5280 4.2.1.6). Managed certificates that
/// haven't been provisioned yet have this field populated with a value of the
/// managed.domains field.
#[prost(string, repeated, tag = "6")]
pub san_dnsnames: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. The PEM-encoded certificate chain.
#[prost(string, tag = "9")]
pub pem_certificate: ::prost::alloc::string::String,
/// Output only. The expiry timestamp of a Certificate.
#[prost(message, optional, tag = "7")]
pub expire_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Immutable. The scope of the certificate.
#[prost(enumeration = "certificate::Scope", tag = "12")]
pub scope: i32,
#[prost(oneof = "certificate::Type", tags = "5, 11")]
pub r#type: ::core::option::Option<certificate::Type>,
}
/// Nested message and enum types in `Certificate`.
pub mod certificate {
/// Certificate data for a SelfManaged Certificate.
/// SelfManaged Certificates are uploaded by the user. Updating such
/// certificates before they expire remains the user's responsibility.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SelfManagedCertificate {}
/// Configuration and state of a Managed Certificate.
/// Certificate Manager provisions and renews Managed Certificates
/// automatically, for as long as it's authorized to do so.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ManagedCertificate {
/// Immutable. The domains for which a managed SSL certificate will be
/// generated. Wildcard domains are only supported with DNS challenge
/// resolution.
#[prost(string, repeated, tag = "1")]
pub domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Immutable. Authorizations that will be used for performing domain
/// authorization.
#[prost(string, repeated, tag = "2")]
pub dns_authorizations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Immutable. The resource name for a
/// [CertificateIssuanceConfig][google.cloud.certificatemanager.v1.CertificateIssuanceConfig]
/// used to configure private PKI certificates in the format
/// `projects/*/locations/*/certificateIssuanceConfigs/*`.
/// If this field is not set, the certificates will instead be publicly
/// signed as documented at
/// <https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa.>
#[prost(string, tag = "6")]
pub issuance_config: ::prost::alloc::string::String,
/// Output only. State of the managed certificate resource.
#[prost(enumeration = "managed_certificate::State", tag = "4")]
pub state: i32,
/// Output only. Information about issues with provisioning a Managed
/// Certificate.
#[prost(message, optional, tag = "3")]
pub provisioning_issue: ::core::option::Option<
managed_certificate::ProvisioningIssue,
>,
/// Output only. Detailed state of the latest authorization attempt for each
/// domain specified for managed certificate resource.
#[prost(message, repeated, tag = "5")]
pub authorization_attempt_info: ::prost::alloc::vec::Vec<
managed_certificate::AuthorizationAttemptInfo,
>,
}
/// Nested message and enum types in `ManagedCertificate`.
pub mod managed_certificate {
/// Information about issues with provisioning a Managed Certificate.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProvisioningIssue {
/// Output only. Reason for provisioning failures.
#[prost(enumeration = "provisioning_issue::Reason", tag = "1")]
pub reason: i32,
/// Output only. Human readable explanation about the issue. Provided to
/// help address the configuration issues. Not guaranteed to be stable. For
/// programmatic access use Reason enum.
#[prost(string, tag = "2")]
pub details: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ProvisioningIssue`.
pub mod provisioning_issue {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Reason {
Unspecified = 0,
/// Certificate provisioning failed due to an issue with one or more of
/// the domains on the certificate.
/// For details of which domains failed, consult the
/// `authorization_attempt_info` field.
AuthorizationIssue = 1,
/// Exceeded Certificate Authority quotas or internal rate limits of the
/// system. Provisioning may take longer to complete.
RateLimited = 2,
}
impl Reason {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "REASON_UNSPECIFIED",
Self::AuthorizationIssue => "AUTHORIZATION_ISSUE",
Self::RateLimited => "RATE_LIMITED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REASON_UNSPECIFIED" => Some(Self::Unspecified),
"AUTHORIZATION_ISSUE" => Some(Self::AuthorizationIssue),
"RATE_LIMITED" => Some(Self::RateLimited),
_ => None,
}
}
}
}
/// State of the latest attempt to authorize a domain for certificate
/// issuance.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizationAttemptInfo {
/// Domain name of the authorization attempt.
#[prost(string, tag = "1")]
pub domain: ::prost::alloc::string::String,
/// Output only. State of the domain for managed certificate issuance.
#[prost(enumeration = "authorization_attempt_info::State", tag = "2")]
pub state: i32,
/// Output only. Reason for failure of the authorization attempt for the
/// domain.
#[prost(
enumeration = "authorization_attempt_info::FailureReason",
tag = "3"
)]
pub failure_reason: i32,
/// Output only. Human readable explanation for reaching the state.
/// Provided to help address the configuration issues. Not guaranteed to be
/// stable. For programmatic access use FailureReason enum.
#[prost(string, tag = "4")]
pub details: ::prost::alloc::string::String,
}
/// Nested message and enum types in `AuthorizationAttemptInfo`.
pub mod authorization_attempt_info {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
/// Certificate provisioning for this domain is under way. GCP will
/// attempt to authorize the domain.
Authorizing = 1,
/// A managed certificate can be provisioned, no issues for this domain.
Authorized = 6,
/// Attempt to authorize the domain failed. This prevents the Managed
/// Certificate from being issued.
/// See `failure_reason` and `details` fields for more information.
Failed = 7,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Authorizing => "AUTHORIZING",
Self::Authorized => "AUTHORIZED",
Self::Failed => "FAILED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"AUTHORIZING" => Some(Self::Authorizing),
"AUTHORIZED" => Some(Self::Authorized),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FailureReason {
Unspecified = 0,
/// There was a problem with the user's DNS or load balancer
/// configuration for this domain.
Config = 1,
/// Certificate issuance forbidden by an explicit CAA record for the
/// domain or a failure to check CAA records for the domain.
Caa = 2,
/// Reached a CA or internal rate-limit for the domain,
/// e.g. for certificates per top-level private domain.
RateLimited = 3,
}
impl FailureReason {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "FAILURE_REASON_UNSPECIFIED",
Self::Config => "CONFIG",
Self::Caa => "CAA",
Self::RateLimited => "RATE_LIMITED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FAILURE_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"CONFIG" => Some(Self::Config),
"CAA" => Some(Self::Caa),
"RATE_LIMITED" => Some(Self::RateLimited),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
/// Certificate Manager attempts to provision or renew the certificate.
/// If the process takes longer than expected, consult the
/// `provisioning_issue` field.
Provisioning = 1,
/// Multiple certificate provisioning attempts failed and Certificate
/// Manager gave up. To try again, delete and create a new managed
/// Certificate resource.
/// For details see the `provisioning_issue` field.
Failed = 2,
/// The certificate management is working, and a certificate has been
/// provisioned.
Active = 3,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Provisioning => "PROVISIONING",
Self::Failed => "FAILED",
Self::Active => "ACTIVE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"PROVISIONING" => Some(Self::Provisioning),
"FAILED" => Some(Self::Failed),
"ACTIVE" => Some(Self::Active),
_ => None,
}
}
}
}
/// Certificate scope.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Scope {
/// Certificates with default scope are served from core Google data centers.
/// If unsure, choose this option.
Default = 0,
/// Certificates with scope EDGE_CACHE are special-purposed certificates,
/// served from non-core Google data centers.
EdgeCache = 1,
}
impl Scope {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "DEFAULT",
Self::EdgeCache => "EDGE_CACHE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEFAULT" => Some(Self::Default),
"EDGE_CACHE" => Some(Self::EdgeCache),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
/// If set, defines data of a self-managed certificate.
#[prost(message, tag = "5")]
SelfManaged(SelfManagedCertificate),
/// If set, contains configuration and state of a managed certificate.
#[prost(message, tag = "11")]
Managed(ManagedCertificate),
}
}
/// Defines a collection of certificate configurations.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMap {
/// A user-defined name of the Certificate Map. Certificate Map names must be
/// unique globally and match pattern
/// `projects/*/locations/*/certificateMaps/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// One or more paragraphs of text description of a certificate map.
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a Certificate Map.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Output only. The update timestamp of a Certificate Map.
#[prost(message, optional, tag = "6")]
pub update_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Set of labels associated with a Certificate Map.
#[prost(map = "string, string", tag = "3")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. A list of GCLB targets that use this Certificate Map.
/// A Target Proxy is only present on this list if it's attached to a
/// Forwarding Rule.
#[prost(message, repeated, tag = "4")]
pub gclb_targets: ::prost::alloc::vec::Vec<certificate_map::GclbTarget>,
}
/// Nested message and enum types in `CertificateMap`.
pub mod certificate_map {
/// Describes a Target Proxy that uses this Certificate Map.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GclbTarget {
/// Output only. IP configurations for this Target Proxy where the
/// Certificate Map is serving.
#[prost(message, repeated, tag = "2")]
pub ip_configs: ::prost::alloc::vec::Vec<gclb_target::IpConfig>,
/// A Target Proxy to which this map is attached to.
#[prost(oneof = "gclb_target::TargetProxy", tags = "1, 3")]
pub target_proxy: ::core::option::Option<gclb_target::TargetProxy>,
}
/// Nested message and enum types in `GclbTarget`.
pub mod gclb_target {
/// Defines IP configuration where this Certificate Map is serving.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IpConfig {
/// Output only. An external IP address.
#[prost(string, tag = "1")]
pub ip_address: ::prost::alloc::string::String,
/// Output only. Ports.
#[prost(uint32, repeated, tag = "3")]
pub ports: ::prost::alloc::vec::Vec<u32>,
}
/// A Target Proxy to which this map is attached to.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TargetProxy {
/// Output only. This field returns the resource name in the following
/// format:
/// `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
#[prost(string, tag = "1")]
TargetHttpsProxy(::prost::alloc::string::String),
/// Output only. This field returns the resource name in the following
/// format:
/// `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
#[prost(string, tag = "3")]
TargetSslProxy(::prost::alloc::string::String),
}
}
}
/// Defines a certificate map entry.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMapEntry {
/// A user-defined name of the Certificate Map Entry. Certificate Map Entry
/// names must be unique globally and match pattern
/// `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// One or more paragraphs of text description of a certificate map entry.
#[prost(string, tag = "9")]
pub description: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a Certificate Map Entry.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Output only. The update timestamp of a Certificate Map Entry.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Set of labels associated with a Certificate Map Entry.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// A set of Certificates defines for the given `hostname`. There can be
/// defined up to fifteen certificates in each Certificate Map Entry. Each
/// certificate must match pattern `projects/*/locations/*/certificates/*`.
#[prost(string, repeated, tag = "7")]
pub certificates: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. A serving state of this Certificate Map Entry.
#[prost(enumeration = "ServingState", tag = "8")]
pub state: i32,
#[prost(oneof = "certificate_map_entry::Match", tags = "5, 10")]
pub r#match: ::core::option::Option<certificate_map_entry::Match>,
}
/// Nested message and enum types in `CertificateMapEntry`.
pub mod certificate_map_entry {
/// Defines predefined cases other than SNI-hostname match when this
/// configuration should be applied.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Matcher {
/// A matcher has't been recognized.
Unspecified = 0,
/// A primary certificate that is served when SNI wasn't specified in the
/// request or SNI couldn't be found in the map.
Primary = 1,
}
impl Matcher {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MATCHER_UNSPECIFIED",
Self::Primary => "PRIMARY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MATCHER_UNSPECIFIED" => Some(Self::Unspecified),
"PRIMARY" => Some(Self::Primary),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Match {
/// A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
/// (`*.example.com`) for a set of hostnames with common suffix. Used as
/// Server Name Indication (SNI) for selecting a proper certificate.
#[prost(string, tag = "5")]
Hostname(::prost::alloc::string::String),
/// A predefined matcher for particular cases, other than SNI selection.
#[prost(enumeration = "Matcher", tag = "10")]
Matcher(i32),
}
}
/// A DnsAuthorization resource describes a way to perform domain authorization
/// for certificate issuance.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DnsAuthorization {
/// A user-defined name of the dns authorization. DnsAuthorization names must
/// be unique globally and match pattern
/// `projects/*/locations/*/dnsAuthorizations/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a DnsAuthorization.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Output only. The last update timestamp of a DnsAuthorization.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::pbjson_types::Timestamp>,
/// Set of labels associated with a DnsAuthorization.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// One or more paragraphs of text description of a DnsAuthorization.
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
/// Required. Immutable. A domain that is being authorized. A DnsAuthorization
/// resource covers a single domain and its wildcard, e.g. authorization for
/// `example.com` can be used to issue certificates for `example.com` and
/// `*.example.com`.
#[prost(string, tag = "6")]
pub domain: ::prost::alloc::string::String,
/// Output only. DNS Resource Record that needs to be added to DNS
/// configuration.
#[prost(message, optional, tag = "10")]
pub dns_resource_record: ::core::option::Option<
dns_authorization::DnsResourceRecord,
>,
}
/// Nested message and enum types in `DnsAuthorization`.
pub mod dns_authorization {
/// The structure describing the DNS Resource Record that needs to be added
/// to DNS configuration for the authorization to be usable by
/// certificate.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DnsResourceRecord {
/// Output only. Fully qualified name of the DNS Resource Record.
/// e.g. `_acme-challenge.example.com`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Type of the DNS Resource Record.
/// Currently always set to "CNAME".
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
/// Output only. Data of the DNS Resource Record.
#[prost(string, tag = "3")]
pub data: ::prost::alloc::string::String,
}
}
/// The data within all DnsAuthorization events.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DnsAuthorizationEventData {
/// Optional. The DnsAuthorization event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<DnsAuthorization>,
}
/// The data within all CertificateIssuanceConfig events.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateIssuanceConfigEventData {
/// Optional. The CertificateIssuanceConfig event payload. Unset for deletion
/// events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<CertificateIssuanceConfig>,
}
/// The data within all CertificateMapEntry events.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMapEntryEventData {
/// Optional. The CertificateMapEntry event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<CertificateMapEntry>,
}
/// The data within all CertificateMap events.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMapEventData {
/// Optional. The CertificateMap event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<CertificateMap>,
}
/// The data within all Certificate events.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateEventData {
/// Optional. The Certificate event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<Certificate>,
}
/// Defines set of serving states associated with a resource.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ServingState {
/// The status is undefined.
Unspecified = 0,
/// The configuration is serving.
Active = 1,
/// Update is in progress. Some frontends may serve this configuration.
Pending = 2,
}
impl ServingState {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SERVING_STATE_UNSPECIFIED",
Self::Active => "ACTIVE",
Self::Pending => "PENDING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SERVING_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"ACTIVE" => Some(Self::Active),
"PENDING" => Some(Self::Pending),
_ => None,
}
}
}
/// The CloudEvent raised when a Certificate is created.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateEventData>,
}
/// The CloudEvent raised when a Certificate is updated.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateUpdatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateEventData>,
}
/// The CloudEvent raised when a Certificate is deleted.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateEventData>,
}
/// The CloudEvent raised when a CertificateMap is created.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMapCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateMapEventData>,
}
/// The CloudEvent raised when a CertificateMap is updated.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMapUpdatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateMapEventData>,
}
/// The CloudEvent raised when a CertificateMap is deleted.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMapDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateMapEventData>,
}
/// The CloudEvent raised when a CertificateMapEntry is created.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMapEntryCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateMapEntryEventData>,
}
/// The CloudEvent raised when a CertificateMapEntry is updated.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMapEntryUpdatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateMapEntryEventData>,
}
/// The CloudEvent raised when a CertificateMapEntry is deleted.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMapEntryDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateMapEntryEventData>,
}
/// The CloudEvent raised when a DnsAuthorization is created.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DnsAuthorizationCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<DnsAuthorizationEventData>,
}
/// The CloudEvent raised when a DnsAuthorization is updated.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DnsAuthorizationUpdatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<DnsAuthorizationEventData>,
}
/// The CloudEvent raised when a DnsAuthorization is deleted.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DnsAuthorizationDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<DnsAuthorizationEventData>,
}
/// The CloudEvent raised when a CertificateIssuanceConfig is created.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateIssuanceConfigCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateIssuanceConfigEventData>,
}
/// The CloudEvent raised when a CertificateIssuanceConfig is deleted.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateIssuanceConfigDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<CertificateIssuanceConfigEventData>,
}