-
Notifications
You must be signed in to change notification settings - Fork 195
/
functions.pb.go
3301 lines (2984 loc) · 147 KB
/
functions.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.12.4
// source: mockgcp/cloud/functions/v1/functions.proto
package functionspb
import (
iampb "cloud.google.com/go/iam/apiv1/iampb"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
duration "github.com/golang/protobuf/ptypes/duration"
_ "github.com/golang/protobuf/ptypes/empty"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
field_mask "google.golang.org/genproto/protobuf/field_mask"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Describes the current stage of a deployment.
type CloudFunctionStatus int32
const (
// Not specified. Invalid state.
CloudFunctionStatus_CLOUD_FUNCTION_STATUS_UNSPECIFIED CloudFunctionStatus = 0
// Function has been successfully deployed and is serving.
CloudFunctionStatus_ACTIVE CloudFunctionStatus = 1
// Function deployment failed and the function isn’t serving.
CloudFunctionStatus_OFFLINE CloudFunctionStatus = 2
// Function is being created or updated.
CloudFunctionStatus_DEPLOY_IN_PROGRESS CloudFunctionStatus = 3
// Function is being deleted.
CloudFunctionStatus_DELETE_IN_PROGRESS CloudFunctionStatus = 4
// Function deployment failed and the function serving state is undefined.
// The function should be updated or deleted to move it out of this state.
CloudFunctionStatus_UNKNOWN CloudFunctionStatus = 5
)
// Enum value maps for CloudFunctionStatus.
var (
CloudFunctionStatus_name = map[int32]string{
0: "CLOUD_FUNCTION_STATUS_UNSPECIFIED",
1: "ACTIVE",
2: "OFFLINE",
3: "DEPLOY_IN_PROGRESS",
4: "DELETE_IN_PROGRESS",
5: "UNKNOWN",
}
CloudFunctionStatus_value = map[string]int32{
"CLOUD_FUNCTION_STATUS_UNSPECIFIED": 0,
"ACTIVE": 1,
"OFFLINE": 2,
"DEPLOY_IN_PROGRESS": 3,
"DELETE_IN_PROGRESS": 4,
"UNKNOWN": 5,
}
)
func (x CloudFunctionStatus) Enum() *CloudFunctionStatus {
p := new(CloudFunctionStatus)
*p = x
return p
}
func (x CloudFunctionStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CloudFunctionStatus) Descriptor() protoreflect.EnumDescriptor {
return file_mockgcp_cloud_functions_v1_functions_proto_enumTypes[0].Descriptor()
}
func (CloudFunctionStatus) Type() protoreflect.EnumType {
return &file_mockgcp_cloud_functions_v1_functions_proto_enumTypes[0]
}
func (x CloudFunctionStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CloudFunctionStatus.Descriptor instead.
func (CloudFunctionStatus) EnumDescriptor() ([]byte, []int) {
return file_mockgcp_cloud_functions_v1_functions_proto_rawDescGZIP(), []int{0}
}
// Available egress settings.
//
// This controls what traffic is diverted through the VPC Access Connector
// resource. By default PRIVATE_RANGES_ONLY will be used.
type CloudFunction_VpcConnectorEgressSettings int32
const (
// Unspecified.
CloudFunction_VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED CloudFunction_VpcConnectorEgressSettings = 0
// Use the VPC Access Connector only for private IP space from RFC1918.
CloudFunction_PRIVATE_RANGES_ONLY CloudFunction_VpcConnectorEgressSettings = 1
// Force the use of VPC Access Connector for all egress traffic from the
// function.
CloudFunction_ALL_TRAFFIC CloudFunction_VpcConnectorEgressSettings = 2
)
// Enum value maps for CloudFunction_VpcConnectorEgressSettings.
var (
CloudFunction_VpcConnectorEgressSettings_name = map[int32]string{
0: "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED",
1: "PRIVATE_RANGES_ONLY",
2: "ALL_TRAFFIC",
}
CloudFunction_VpcConnectorEgressSettings_value = map[string]int32{
"VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED": 0,
"PRIVATE_RANGES_ONLY": 1,
"ALL_TRAFFIC": 2,
}
)
func (x CloudFunction_VpcConnectorEgressSettings) Enum() *CloudFunction_VpcConnectorEgressSettings {
p := new(CloudFunction_VpcConnectorEgressSettings)
*p = x
return p
}
func (x CloudFunction_VpcConnectorEgressSettings) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CloudFunction_VpcConnectorEgressSettings) Descriptor() protoreflect.EnumDescriptor {
return file_mockgcp_cloud_functions_v1_functions_proto_enumTypes[1].Descriptor()
}
func (CloudFunction_VpcConnectorEgressSettings) Type() protoreflect.EnumType {
return &file_mockgcp_cloud_functions_v1_functions_proto_enumTypes[1]
}
func (x CloudFunction_VpcConnectorEgressSettings) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CloudFunction_VpcConnectorEgressSettings.Descriptor instead.
func (CloudFunction_VpcConnectorEgressSettings) EnumDescriptor() ([]byte, []int) {
return file_mockgcp_cloud_functions_v1_functions_proto_rawDescGZIP(), []int{0, 0}
}
// Available ingress settings.
//
// This controls what traffic can reach the function.
//
// If unspecified, ALLOW_ALL will be used.
type CloudFunction_IngressSettings int32
const (
// Unspecified.
CloudFunction_INGRESS_SETTINGS_UNSPECIFIED CloudFunction_IngressSettings = 0
// Allow HTTP traffic from public and private sources.
CloudFunction_ALLOW_ALL CloudFunction_IngressSettings = 1
// Allow HTTP traffic from only private VPC sources.
CloudFunction_ALLOW_INTERNAL_ONLY CloudFunction_IngressSettings = 2
// Allow HTTP traffic from private VPC sources and through GCLB.
CloudFunction_ALLOW_INTERNAL_AND_GCLB CloudFunction_IngressSettings = 3
)
// Enum value maps for CloudFunction_IngressSettings.
var (
CloudFunction_IngressSettings_name = map[int32]string{
0: "INGRESS_SETTINGS_UNSPECIFIED",
1: "ALLOW_ALL",
2: "ALLOW_INTERNAL_ONLY",
3: "ALLOW_INTERNAL_AND_GCLB",
}
CloudFunction_IngressSettings_value = map[string]int32{
"INGRESS_SETTINGS_UNSPECIFIED": 0,
"ALLOW_ALL": 1,
"ALLOW_INTERNAL_ONLY": 2,
"ALLOW_INTERNAL_AND_GCLB": 3,
}
)
func (x CloudFunction_IngressSettings) Enum() *CloudFunction_IngressSettings {
p := new(CloudFunction_IngressSettings)
*p = x
return p
}
func (x CloudFunction_IngressSettings) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CloudFunction_IngressSettings) Descriptor() protoreflect.EnumDescriptor {
return file_mockgcp_cloud_functions_v1_functions_proto_enumTypes[2].Descriptor()
}
func (CloudFunction_IngressSettings) Type() protoreflect.EnumType {
return &file_mockgcp_cloud_functions_v1_functions_proto_enumTypes[2]
}
func (x CloudFunction_IngressSettings) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CloudFunction_IngressSettings.Descriptor instead.
func (CloudFunction_IngressSettings) EnumDescriptor() ([]byte, []int) {
return file_mockgcp_cloud_functions_v1_functions_proto_rawDescGZIP(), []int{0, 1}
}
// Docker Registry to use for storing function Docker images.
type CloudFunction_DockerRegistry int32
const (
// Unspecified.
CloudFunction_DOCKER_REGISTRY_UNSPECIFIED CloudFunction_DockerRegistry = 0
// Docker images will be stored in multi-regional Container Registry
// repositories named `gcf`.
CloudFunction_CONTAINER_REGISTRY CloudFunction_DockerRegistry = 1
// Docker images will be stored in regional Artifact Registry repositories.
// By default, GCF will create and use repositories named `gcf-artifacts`
// in every region in which a function is deployed. But the repository to
// use can also be specified by the user using the `docker_repository`
// field.
CloudFunction_ARTIFACT_REGISTRY CloudFunction_DockerRegistry = 2
)
// Enum value maps for CloudFunction_DockerRegistry.
var (
CloudFunction_DockerRegistry_name = map[int32]string{
0: "DOCKER_REGISTRY_UNSPECIFIED",
1: "CONTAINER_REGISTRY",
2: "ARTIFACT_REGISTRY",
}
CloudFunction_DockerRegistry_value = map[string]int32{
"DOCKER_REGISTRY_UNSPECIFIED": 0,
"CONTAINER_REGISTRY": 1,
"ARTIFACT_REGISTRY": 2,
}
)
func (x CloudFunction_DockerRegistry) Enum() *CloudFunction_DockerRegistry {
p := new(CloudFunction_DockerRegistry)
*p = x
return p
}
func (x CloudFunction_DockerRegistry) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CloudFunction_DockerRegistry) Descriptor() protoreflect.EnumDescriptor {
return file_mockgcp_cloud_functions_v1_functions_proto_enumTypes[3].Descriptor()
}
func (CloudFunction_DockerRegistry) Type() protoreflect.EnumType {
return &file_mockgcp_cloud_functions_v1_functions_proto_enumTypes[3]
}
func (x CloudFunction_DockerRegistry) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CloudFunction_DockerRegistry.Descriptor instead.
func (CloudFunction_DockerRegistry) EnumDescriptor() ([]byte, []int) {
return file_mockgcp_cloud_functions_v1_functions_proto_rawDescGZIP(), []int{0, 2}
}
// Available security level settings.
//
// This controls the methods to enforce security (HTTPS) on a URL.
//
// If unspecified, SECURE_OPTIONAL will be used.
type HttpsTrigger_SecurityLevel int32
const (
// Unspecified.
HttpsTrigger_SECURITY_LEVEL_UNSPECIFIED HttpsTrigger_SecurityLevel = 0
// Requests for a URL that match this handler that do not use HTTPS are
// automatically redirected to the HTTPS URL with the same path. Query
// parameters are reserved for the redirect.
HttpsTrigger_SECURE_ALWAYS HttpsTrigger_SecurityLevel = 1
// Both HTTP and HTTPS requests with URLs that match the handler succeed
// without redirects. The application can examine the request to determine
// which protocol was used and respond accordingly.
HttpsTrigger_SECURE_OPTIONAL HttpsTrigger_SecurityLevel = 2
)
// Enum value maps for HttpsTrigger_SecurityLevel.
var (
HttpsTrigger_SecurityLevel_name = map[int32]string{
0: "SECURITY_LEVEL_UNSPECIFIED",
1: "SECURE_ALWAYS",
2: "SECURE_OPTIONAL",
}
HttpsTrigger_SecurityLevel_value = map[string]int32{
"SECURITY_LEVEL_UNSPECIFIED": 0,
"SECURE_ALWAYS": 1,
"SECURE_OPTIONAL": 2,
}
)
func (x HttpsTrigger_SecurityLevel) Enum() *HttpsTrigger_SecurityLevel {
p := new(HttpsTrigger_SecurityLevel)
*p = x
return p
}
func (x HttpsTrigger_SecurityLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (HttpsTrigger_SecurityLevel) Descriptor() protoreflect.EnumDescriptor {
return file_mockgcp_cloud_functions_v1_functions_proto_enumTypes[4].Descriptor()
}
func (HttpsTrigger_SecurityLevel) Type() protoreflect.EnumType {
return &file_mockgcp_cloud_functions_v1_functions_proto_enumTypes[4]
}
func (x HttpsTrigger_SecurityLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use HttpsTrigger_SecurityLevel.Descriptor instead.
func (HttpsTrigger_SecurityLevel) EnumDescriptor() ([]byte, []int) {
return file_mockgcp_cloud_functions_v1_functions_proto_rawDescGZIP(), []int{2, 0}
}
// Describes a Cloud Function that contains user computation executed in
// response to an event. It encapsulate function and triggers configurations.
type CloudFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A user-defined name of the function. Function names must be unique
// globally and match pattern `projects/*/locations/*/functions/*`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// User-provided description of a function.
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// The location of the function source code.
//
// Types that are assignable to SourceCode:
//
// *CloudFunction_SourceArchiveUrl
// *CloudFunction_SourceRepository
// *CloudFunction_SourceUploadUrl
SourceCode isCloudFunction_SourceCode `protobuf_oneof:"source_code"`
// An event that triggers the function.
//
// Types that are assignable to Trigger:
//
// *CloudFunction_HttpsTrigger
// *CloudFunction_EventTrigger
Trigger isCloudFunction_Trigger `protobuf_oneof:"trigger"`
// Output only. Status of the function deployment.
Status CloudFunctionStatus `protobuf:"varint,7,opt,name=status,proto3,enum=mockgcp.cloud.functions.v1.CloudFunctionStatus" json:"status,omitempty"`
// The name of the function (as defined in source code) that will be
// executed. Defaults to the resource name suffix (ID of the function), if not
// specified.
EntryPoint string `protobuf:"bytes,8,opt,name=entry_point,json=entryPoint,proto3" json:"entry_point,omitempty"`
// The runtime in which to run the function. Required when deploying a new
// function, optional when updating an existing function. For a complete
// list of possible choices, see the
// [`gcloud` command
// reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
Runtime string `protobuf:"bytes,19,opt,name=runtime,proto3" json:"runtime,omitempty"`
// The function execution timeout. Execution is considered failed and
// can be terminated if the function is not completed at the end of the
// timeout period. Defaults to 60 seconds.
Timeout *duration.Duration `protobuf:"bytes,9,opt,name=timeout,proto3" json:"timeout,omitempty"`
// The amount of memory in MB available for a function.
// Defaults to 256MB.
AvailableMemoryMb int32 `protobuf:"varint,10,opt,name=available_memory_mb,json=availableMemoryMb,proto3" json:"available_memory_mb,omitempty"`
// The email of the function's service account. If empty, defaults to
// `{project_id}@appspot.gserviceaccount.com`.
ServiceAccountEmail string `protobuf:"bytes,11,opt,name=service_account_email,json=serviceAccountEmail,proto3" json:"service_account_email,omitempty"`
// Output only. The last update timestamp of a Cloud Function.
UpdateTime *timestamp.Timestamp `protobuf:"bytes,12,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// Output only. The version identifier of the Cloud Function. Each deployment
// attempt results in a new version of a function being created.
VersionId int64 `protobuf:"varint,14,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"`
// Labels associated with this Cloud Function.
Labels map[string]string `protobuf:"bytes,15,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Environment variables that shall be available during function execution.
EnvironmentVariables map[string]string `protobuf:"bytes,17,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Build environment variables that shall be available during build time.
BuildEnvironmentVariables map[string]string `protobuf:"bytes,28,rep,name=build_environment_variables,json=buildEnvironmentVariables,proto3" json:"build_environment_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Deprecated: use vpc_connector
//
// Deprecated: Do not use.
Network string `protobuf:"bytes,18,opt,name=network,proto3" json:"network,omitempty"`
// The limit on the maximum number of function instances that may coexist at a
// given time.
//
// In some cases, such as rapid traffic surges, Cloud Functions may, for a
// short period of time, create more instances than the specified max
// instances limit. If your function cannot tolerate this temporary behavior,
// you may want to factor in a safety margin and set a lower max instances
// value than your function can tolerate.
//
// See the [Max
// Instances](https://cloud.google.com/functions/docs/max-instances) Guide for
// more details.
MaxInstances int32 `protobuf:"varint,20,opt,name=max_instances,json=maxInstances,proto3" json:"max_instances,omitempty"`
// A lower bound for the number function instances that may coexist at a
// given time.
MinInstances int32 `protobuf:"varint,32,opt,name=min_instances,json=minInstances,proto3" json:"min_instances,omitempty"`
// The VPC Network Connector that this cloud function can connect to. It can
// be either the fully-qualified URI, or the short name of the network
// connector resource. The format of this field is
// `projects/*/locations/*/connectors/*`
//
// This field is mutually exclusive with `network` field and will eventually
// replace it.
//
// See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
// more information on connecting Cloud projects.
VpcConnector string `protobuf:"bytes,22,opt,name=vpc_connector,json=vpcConnector,proto3" json:"vpc_connector,omitempty"`
// The egress settings for the connector, controlling what traffic is diverted
// through it.
VpcConnectorEgressSettings CloudFunction_VpcConnectorEgressSettings `protobuf:"varint,23,opt,name=vpc_connector_egress_settings,json=vpcConnectorEgressSettings,proto3,enum=mockgcp.cloud.functions.v1.CloudFunction_VpcConnectorEgressSettings" json:"vpc_connector_egress_settings,omitempty"`
// The ingress settings for the function, controlling what traffic can reach
// it.
IngressSettings CloudFunction_IngressSettings `protobuf:"varint,24,opt,name=ingress_settings,json=ingressSettings,proto3,enum=mockgcp.cloud.functions.v1.CloudFunction_IngressSettings" json:"ingress_settings,omitempty"`
// Resource name of a KMS crypto key (managed by the user) used to
// encrypt/decrypt function resources.
//
// It must match the pattern
// `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
//
// If specified, you must also provide an artifact registry repository using
// the `docker_repository` field that was created with the same KMS crypto
// key.
//
// The following service accounts need to be granted the role 'Cloud KMS
// CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)'
// on the Key/KeyRing/Project/Organization (least access preferred).
//
// 1. Google Cloud Functions service account
// (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) -
// Required to protect the function's image.
// 2. Google Storage service account
// (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) -
// Required to protect the function's source code.
// If this service account does not exist, deploying a function without a
// KMS key or retrieving the service agent name provisions it. For more
// information, see
// https://cloud.google.com/storage/docs/projects#service-agents and
// https://cloud.google.com/storage/docs/getting-service-agent#gsutil.
//
// Google Cloud Functions delegates access to service agents to protect
// function resources in internal projects that are not accessible by the
// end user.
KmsKeyName string `protobuf:"bytes,25,opt,name=kms_key_name,json=kmsKeyName,proto3" json:"kms_key_name,omitempty"`
// Name of the Cloud Build Custom Worker Pool that should be used to build the
// function. The format of this field is
// `projects/{project}/locations/{region}/workerPools/{workerPool}` where
// `{project}` and `{region}` are the project id and region respectively where
// the worker pool is defined and `{workerPool}` is the short name of the
// worker pool.
//
// If the project id is not the same as the function, then the Cloud
// Functions Service Agent
// (`service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com`) must
// be granted the role Cloud Build Custom Workers Builder
// (`roles/cloudbuild.customworkers.builder`) in the project.
BuildWorkerPool string `protobuf:"bytes,26,opt,name=build_worker_pool,json=buildWorkerPool,proto3" json:"build_worker_pool,omitempty"`
// Output only. The Cloud Build ID of the latest successful deployment of the
// function.
BuildId string `protobuf:"bytes,27,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"`
// Output only. The Cloud Build Name of the function deployment.
// `projects/<project-number>/locations/<region>/builds/<build-id>`.
BuildName string `protobuf:"bytes,33,opt,name=build_name,json=buildName,proto3" json:"build_name,omitempty"`
// Secret environment variables configuration.
SecretEnvironmentVariables []*SecretEnvVar `protobuf:"bytes,29,rep,name=secret_environment_variables,json=secretEnvironmentVariables,proto3" json:"secret_environment_variables,omitempty"`
// Secret volumes configuration.
SecretVolumes []*SecretVolume `protobuf:"bytes,30,rep,name=secret_volumes,json=secretVolumes,proto3" json:"secret_volumes,omitempty"`
// Input only. An identifier for Firebase function sources. Disclaimer: This
// field is only supported for Firebase function deployments.
SourceToken string `protobuf:"bytes,31,opt,name=source_token,json=sourceToken,proto3" json:"source_token,omitempty"`
// User managed repository created in Artifact Registry optionally with a
// customer managed encryption key. If specified, deployments will use
// Artifact Registry. If unspecified and the deployment is eligible to use
// Artifact Registry, GCF will create and use a repository named
// 'gcf-artifacts' for every deployed region. This is the repository to which
// the function docker image will be pushed after it is built by Cloud Build.
//
// It must match the pattern
// `projects/{project}/locations/{location}/repositories/{repository}`.
//
// Cross-project repositories are not supported.
// Cross-location repositories are not supported.
// Repository format must be 'DOCKER'.
DockerRepository string `protobuf:"bytes,34,opt,name=docker_repository,json=dockerRepository,proto3" json:"docker_repository,omitempty"`
// Docker Registry to use for this deployment.
//
// If unspecified, it defaults to `ARTIFACT_REGISTRY`.
// If `docker_repository` field is specified, this field should either be left
// unspecified or set to `ARTIFACT_REGISTRY`.
DockerRegistry CloudFunction_DockerRegistry `protobuf:"varint,35,opt,name=docker_registry,json=dockerRegistry,proto3,enum=mockgcp.cloud.functions.v1.CloudFunction_DockerRegistry" json:"docker_registry,omitempty"`
// Runtime update policy can be one of the following.
//
// Types that are assignable to RuntimeUpdatePolicy:
//
// *CloudFunction_AutomaticUpdatePolicy_
// *CloudFunction_OnDeployUpdatePolicy_
RuntimeUpdatePolicy isCloudFunction_RuntimeUpdatePolicy `protobuf_oneof:"runtime_update_policy"`
}
func (x *CloudFunction) Reset() {
*x = CloudFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_cloud_functions_v1_functions_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CloudFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CloudFunction) ProtoMessage() {}
func (x *CloudFunction) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_cloud_functions_v1_functions_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CloudFunction.ProtoReflect.Descriptor instead.
func (*CloudFunction) Descriptor() ([]byte, []int) {
return file_mockgcp_cloud_functions_v1_functions_proto_rawDescGZIP(), []int{0}
}
func (x *CloudFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CloudFunction) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (m *CloudFunction) GetSourceCode() isCloudFunction_SourceCode {
if m != nil {
return m.SourceCode
}
return nil
}
func (x *CloudFunction) GetSourceArchiveUrl() string {
if x, ok := x.GetSourceCode().(*CloudFunction_SourceArchiveUrl); ok {
return x.SourceArchiveUrl
}
return ""
}
func (x *CloudFunction) GetSourceRepository() *SourceRepository {
if x, ok := x.GetSourceCode().(*CloudFunction_SourceRepository); ok {
return x.SourceRepository
}
return nil
}
func (x *CloudFunction) GetSourceUploadUrl() string {
if x, ok := x.GetSourceCode().(*CloudFunction_SourceUploadUrl); ok {
return x.SourceUploadUrl
}
return ""
}
func (m *CloudFunction) GetTrigger() isCloudFunction_Trigger {
if m != nil {
return m.Trigger
}
return nil
}
func (x *CloudFunction) GetHttpsTrigger() *HttpsTrigger {
if x, ok := x.GetTrigger().(*CloudFunction_HttpsTrigger); ok {
return x.HttpsTrigger
}
return nil
}
func (x *CloudFunction) GetEventTrigger() *EventTrigger {
if x, ok := x.GetTrigger().(*CloudFunction_EventTrigger); ok {
return x.EventTrigger
}
return nil
}
func (x *CloudFunction) GetStatus() CloudFunctionStatus {
if x != nil {
return x.Status
}
return CloudFunctionStatus_CLOUD_FUNCTION_STATUS_UNSPECIFIED
}
func (x *CloudFunction) GetEntryPoint() string {
if x != nil {
return x.EntryPoint
}
return ""
}
func (x *CloudFunction) GetRuntime() string {
if x != nil {
return x.Runtime
}
return ""
}
func (x *CloudFunction) GetTimeout() *duration.Duration {
if x != nil {
return x.Timeout
}
return nil
}
func (x *CloudFunction) GetAvailableMemoryMb() int32 {
if x != nil {
return x.AvailableMemoryMb
}
return 0
}
func (x *CloudFunction) GetServiceAccountEmail() string {
if x != nil {
return x.ServiceAccountEmail
}
return ""
}
func (x *CloudFunction) GetUpdateTime() *timestamp.Timestamp {
if x != nil {
return x.UpdateTime
}
return nil
}
func (x *CloudFunction) GetVersionId() int64 {
if x != nil {
return x.VersionId
}
return 0
}
func (x *CloudFunction) GetLabels() map[string]string {
if x != nil {
return x.Labels
}
return nil
}
func (x *CloudFunction) GetEnvironmentVariables() map[string]string {
if x != nil {
return x.EnvironmentVariables
}
return nil
}
func (x *CloudFunction) GetBuildEnvironmentVariables() map[string]string {
if x != nil {
return x.BuildEnvironmentVariables
}
return nil
}
// Deprecated: Do not use.
func (x *CloudFunction) GetNetwork() string {
if x != nil {
return x.Network
}
return ""
}
func (x *CloudFunction) GetMaxInstances() int32 {
if x != nil {
return x.MaxInstances
}
return 0
}
func (x *CloudFunction) GetMinInstances() int32 {
if x != nil {
return x.MinInstances
}
return 0
}
func (x *CloudFunction) GetVpcConnector() string {
if x != nil {
return x.VpcConnector
}
return ""
}
func (x *CloudFunction) GetVpcConnectorEgressSettings() CloudFunction_VpcConnectorEgressSettings {
if x != nil {
return x.VpcConnectorEgressSettings
}
return CloudFunction_VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED
}
func (x *CloudFunction) GetIngressSettings() CloudFunction_IngressSettings {
if x != nil {
return x.IngressSettings
}
return CloudFunction_INGRESS_SETTINGS_UNSPECIFIED
}
func (x *CloudFunction) GetKmsKeyName() string {
if x != nil {
return x.KmsKeyName
}
return ""
}
func (x *CloudFunction) GetBuildWorkerPool() string {
if x != nil {
return x.BuildWorkerPool
}
return ""
}
func (x *CloudFunction) GetBuildId() string {
if x != nil {
return x.BuildId
}
return ""
}
func (x *CloudFunction) GetBuildName() string {
if x != nil {
return x.BuildName
}
return ""
}
func (x *CloudFunction) GetSecretEnvironmentVariables() []*SecretEnvVar {
if x != nil {
return x.SecretEnvironmentVariables
}
return nil
}
func (x *CloudFunction) GetSecretVolumes() []*SecretVolume {
if x != nil {
return x.SecretVolumes
}
return nil
}
func (x *CloudFunction) GetSourceToken() string {
if x != nil {
return x.SourceToken
}
return ""
}
func (x *CloudFunction) GetDockerRepository() string {
if x != nil {
return x.DockerRepository
}
return ""
}
func (x *CloudFunction) GetDockerRegistry() CloudFunction_DockerRegistry {
if x != nil {
return x.DockerRegistry
}
return CloudFunction_DOCKER_REGISTRY_UNSPECIFIED
}
func (m *CloudFunction) GetRuntimeUpdatePolicy() isCloudFunction_RuntimeUpdatePolicy {
if m != nil {
return m.RuntimeUpdatePolicy
}
return nil
}
func (x *CloudFunction) GetAutomaticUpdatePolicy() *CloudFunction_AutomaticUpdatePolicy {
if x, ok := x.GetRuntimeUpdatePolicy().(*CloudFunction_AutomaticUpdatePolicy_); ok {
return x.AutomaticUpdatePolicy
}
return nil
}
func (x *CloudFunction) GetOnDeployUpdatePolicy() *CloudFunction_OnDeployUpdatePolicy {
if x, ok := x.GetRuntimeUpdatePolicy().(*CloudFunction_OnDeployUpdatePolicy_); ok {
return x.OnDeployUpdatePolicy
}
return nil
}
type isCloudFunction_SourceCode interface {
isCloudFunction_SourceCode()
}
type CloudFunction_SourceArchiveUrl struct {
// The Google Cloud Storage URL, starting with `gs://`, pointing to the zip
// archive which contains the function.
SourceArchiveUrl string `protobuf:"bytes,3,opt,name=source_archive_url,json=sourceArchiveUrl,proto3,oneof"`
}
type CloudFunction_SourceRepository struct {
// **Beta Feature**
//
// The source repository where a function is hosted.
SourceRepository *SourceRepository `protobuf:"bytes,4,opt,name=source_repository,json=sourceRepository,proto3,oneof"`
}
type CloudFunction_SourceUploadUrl struct {
// The Google Cloud Storage signed URL used for source uploading, generated
// by calling [mockgcp.cloud.functions.v1.GenerateUploadUrl].
//
// The signature is validated on write methods (Create, Update)
// The signature is stripped from the Function object on read methods (Get,
// List)
SourceUploadUrl string `protobuf:"bytes,16,opt,name=source_upload_url,json=sourceUploadUrl,proto3,oneof"`
}
func (*CloudFunction_SourceArchiveUrl) isCloudFunction_SourceCode() {}
func (*CloudFunction_SourceRepository) isCloudFunction_SourceCode() {}
func (*CloudFunction_SourceUploadUrl) isCloudFunction_SourceCode() {}
type isCloudFunction_Trigger interface {
isCloudFunction_Trigger()
}
type CloudFunction_HttpsTrigger struct {
// An HTTPS endpoint type of source that can be triggered via URL.
HttpsTrigger *HttpsTrigger `protobuf:"bytes,5,opt,name=https_trigger,json=httpsTrigger,proto3,oneof"`
}
type CloudFunction_EventTrigger struct {
// A source that fires events in response to a condition in another service.
EventTrigger *EventTrigger `protobuf:"bytes,6,opt,name=event_trigger,json=eventTrigger,proto3,oneof"`
}
func (*CloudFunction_HttpsTrigger) isCloudFunction_Trigger() {}
func (*CloudFunction_EventTrigger) isCloudFunction_Trigger() {}
type isCloudFunction_RuntimeUpdatePolicy interface {
isCloudFunction_RuntimeUpdatePolicy()
}
type CloudFunction_AutomaticUpdatePolicy_ struct {
// See the comment next to this message for more details.
AutomaticUpdatePolicy *CloudFunction_AutomaticUpdatePolicy `protobuf:"bytes,40,opt,name=automatic_update_policy,json=automaticUpdatePolicy,proto3,oneof"`
}
type CloudFunction_OnDeployUpdatePolicy_ struct {
// See the comment next to this message for more details.
OnDeployUpdatePolicy *CloudFunction_OnDeployUpdatePolicy `protobuf:"bytes,41,opt,name=on_deploy_update_policy,json=onDeployUpdatePolicy,proto3,oneof"`
}
func (*CloudFunction_AutomaticUpdatePolicy_) isCloudFunction_RuntimeUpdatePolicy() {}
func (*CloudFunction_OnDeployUpdatePolicy_) isCloudFunction_RuntimeUpdatePolicy() {}
// Describes SourceRepository, used to represent parameters related to
// source repository where a function is hosted.
type SourceRepository struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The URL pointing to the hosted repository where the function is defined.
// There are supported Cloud Source Repository URLs in the following
// formats:
//
// To refer to a specific commit:
// `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
// To refer to a moveable alias (branch):
// `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
// In particular, to refer to HEAD use `master` moveable alias.
// To refer to a specific fixed alias (tag):
// `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
//
// You may omit `paths/*` if you want to use the main directory.
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
// Output only. The URL pointing to the hosted repository where the function
// were defined at the time of deployment. It always points to a specific
// commit in the format described above.
DeployedUrl string `protobuf:"bytes,2,opt,name=deployed_url,json=deployedUrl,proto3" json:"deployed_url,omitempty"`
}
func (x *SourceRepository) Reset() {
*x = SourceRepository{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_cloud_functions_v1_functions_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SourceRepository) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SourceRepository) ProtoMessage() {}
func (x *SourceRepository) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_cloud_functions_v1_functions_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SourceRepository.ProtoReflect.Descriptor instead.
func (*SourceRepository) Descriptor() ([]byte, []int) {
return file_mockgcp_cloud_functions_v1_functions_proto_rawDescGZIP(), []int{1}
}
func (x *SourceRepository) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *SourceRepository) GetDeployedUrl() string {
if x != nil {
return x.DeployedUrl
}
return ""
}
// Describes HttpsTrigger, could be used to connect web hooks to function.
type HttpsTrigger struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Output only. The deployed URL for the function.
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
// The security level for the function.
SecurityLevel HttpsTrigger_SecurityLevel `protobuf:"varint,2,opt,name=security_level,json=securityLevel,proto3,enum=mockgcp.cloud.functions.v1.HttpsTrigger_SecurityLevel" json:"security_level,omitempty"`
}
func (x *HttpsTrigger) Reset() {
*x = HttpsTrigger{}
if protoimpl.UnsafeEnabled {
mi := &file_mockgcp_cloud_functions_v1_functions_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HttpsTrigger) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HttpsTrigger) ProtoMessage() {}
func (x *HttpsTrigger) ProtoReflect() protoreflect.Message {
mi := &file_mockgcp_cloud_functions_v1_functions_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))