forked from distribution/distribution
/
appengine-gen.go
3083 lines (2757 loc) · 108 KB
/
appengine-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
// Package appengine provides access to the Google App Engine Admin API.
//
// See https://developers.google.com/appengine/
//
// Usage example:
//
// import "google.golang.org/api/appengine/v1beta4"
// ...
// appengineService, err := appengine.New(oauthHttpClient)
package appengine // import "google.golang.org/api/appengine/v1beta4"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"golang.org/x/net/context"
"golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"google.golang.org/api/internal"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// 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 _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = internal.MarshalJSON
var _ = context.Canceled
var _ = ctxhttp.Do
const apiId = "appengine:v1beta4"
const apiName = "appengine"
const apiVersion = "v1beta4"
const basePath = "https://appengine.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Apps = NewAppsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Apps *AppsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewAppsService(s *Service) *AppsService {
rs := &AppsService{s: s}
rs.Modules = NewAppsModulesService(s)
rs.Operations = NewAppsOperationsService(s)
return rs
}
type AppsService struct {
s *Service
Modules *AppsModulesService
Operations *AppsOperationsService
}
func NewAppsModulesService(s *Service) *AppsModulesService {
rs := &AppsModulesService{s: s}
rs.Versions = NewAppsModulesVersionsService(s)
return rs
}
type AppsModulesService struct {
s *Service
Versions *AppsModulesVersionsService
}
func NewAppsModulesVersionsService(s *Service) *AppsModulesVersionsService {
rs := &AppsModulesVersionsService{s: s}
return rs
}
type AppsModulesVersionsService struct {
s *Service
}
func NewAppsOperationsService(s *Service) *AppsOperationsService {
rs := &AppsOperationsService{s: s}
return rs
}
type AppsOperationsService struct {
s *Service
}
// ApiConfigHandler: API Serving configuration for Cloud Endpoints.
type ApiConfigHandler struct {
// AuthFailAction: For users not logged in, how to handle access to
// resources with required login. Defaults to "redirect".
//
// Possible values:
// "AUTH_FAIL_ACTION_UNSPECIFIED"
// "AUTH_FAIL_ACTION_REDIRECT"
// "AUTH_FAIL_ACTION_UNAUTHORIZED"
AuthFailAction string `json:"authFailAction,omitempty"`
// Login: What level of login is required to access this resource.
// Default is "optional".
//
// Possible values:
// "LOGIN_UNSPECIFIED"
// "LOGIN_OPTIONAL"
// "LOGIN_ADMIN"
// "LOGIN_REQUIRED"
Login string `json:"login,omitempty"`
// Script: Specifies the path to the script from the application root
// directory.
Script string `json:"script,omitempty"`
// SecurityLevel: Configures whether security (HTTPS) should be enforced
// for this URL.
//
// Possible values:
// "SECURE_UNSPECIFIED"
// "SECURE_DEFAULT"
// "SECURE_NEVER"
// "SECURE_OPTIONAL"
// "SECURE_ALWAYS"
SecurityLevel string `json:"securityLevel,omitempty"`
// Url: URL to serve the endpoint at.
Url string `json:"url,omitempty"`
// ForceSendFields is a list of field names (e.g. "AuthFailAction") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ApiConfigHandler) MarshalJSON() ([]byte, error) {
type noMethod ApiConfigHandler
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ApiEndpointHandler: Use Google Cloud Endpoints to handle requests.
type ApiEndpointHandler struct {
// ScriptPath: Specifies the path to the script from the application
// root directory.
ScriptPath string `json:"scriptPath,omitempty"`
// ForceSendFields is a list of field names (e.g. "ScriptPath") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ApiEndpointHandler) MarshalJSON() ([]byte, error) {
type noMethod ApiEndpointHandler
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Application: An Application contains the top-level configuration of
// an App Engine application.
type Application struct {
// CodeBucket: A Google Cloud Storage bucket which can be used for
// storing files associated with an application. This bucket is
// associated with the application and can be used by the gcloud
// deployment commands. @OutputOnly
CodeBucket string `json:"codeBucket,omitempty"`
// DispatchRules: HTTP path dispatch rules for requests to the app that
// do not explicitly target a module or version. The rules are
// order-dependent.
DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"`
// Id: The relative name/path of the application. Example: "myapp".
// @OutputOnly
Id string `json:"id,omitempty"`
// Location: The location from which the application will be run.
// Choices are "us-central" for United States and "europe-west" for
// European Union. Application instances will run out of data centers in
// the chosen location and all of the application's End User Content
// will be stored at rest in the chosen location. The default is
// "us-central".
Location string `json:"location,omitempty"`
// Name: The full path to the application in the API. Example:
// "apps/myapp". @OutputOnly
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. "CodeBucket") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Application) MarshalJSON() ([]byte, error) {
type noMethod Application
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// AutomaticScaling: Automatic scaling is the scaling policy that App
// Engine has used since its inception. It is based on request rate,
// response latencies, and other application metrics.
type AutomaticScaling struct {
// CoolDownPeriod: The amount of time that the
// [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
// should wait between changes to the number of virtual machines.
// Applies only to the VM runtime.
CoolDownPeriod string `json:"coolDownPeriod,omitempty"`
// CpuUtilization: Target scaling by CPU usage.
CpuUtilization *CpuUtilization `json:"cpuUtilization,omitempty"`
// MaxConcurrentRequests: The number of concurrent requests an automatic
// scaling instance can accept before the scheduler spawns a new
// instance. Default value is chosen based on the runtime.
MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"`
// MaxIdleInstances: The maximum number of idle instances that App
// Engine should maintain for this version.
MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"`
// MaxPendingLatency: The maximum amount of time that App Engine should
// allow a request to wait in the pending queue before starting a new
// instance to handle it.
MaxPendingLatency string `json:"maxPendingLatency,omitempty"`
// MaxTotalInstances: Max number of instances that App Engine should
// start to handle requests.
MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"`
// MinIdleInstances: The minimum number of idle instances that App
// Engine should maintain for this version. Only applies to the default
// version of a module, since other versions are not expected to receive
// significant traffic.
MinIdleInstances int64 `json:"minIdleInstances,omitempty"`
// MinPendingLatency: The minimum amount of time that App Engine should
// allow a request to wait in the pending queue before starting a new
// instance to handle it.
MinPendingLatency string `json:"minPendingLatency,omitempty"`
// MinTotalInstances: Minimum number of instances that App Engine should
// maintain.
MinTotalInstances int64 `json:"minTotalInstances,omitempty"`
// ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AutomaticScaling) MarshalJSON() ([]byte, error) {
type noMethod AutomaticScaling
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// BasicScaling: A module with basic scaling will create an instance
// when the application receives a request. The instance will be turned
// down when the app becomes idle. Basic scaling is ideal for work that
// is intermittent or driven by user activity.
type BasicScaling struct {
// IdleTimeout: The instance will be shut down this amount of time after
// receiving its last request.
IdleTimeout string `json:"idleTimeout,omitempty"`
// MaxInstances: The maximum number of instances for App Engine to
// create for this version.
MaxInstances int64 `json:"maxInstances,omitempty"`
// ForceSendFields is a list of field names (e.g. "IdleTimeout") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BasicScaling) MarshalJSON() ([]byte, error) {
type noMethod BasicScaling
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ContainerInfo: A Docker (container) image which should be used to
// start the application.
type ContainerInfo struct {
// Image: Reference to a hosted container image. Must be a URI to a
// resource in a Docker repository. Must be fully qualified, including
// tag or digest. e.g. gcr.io/my-project/image:tag or
// gcr.io/my-project/image@digest
Image string `json:"image,omitempty"`
// ForceSendFields is a list of field names (e.g. "Image") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ContainerInfo) MarshalJSON() ([]byte, error) {
type noMethod ContainerInfo
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// CpuUtilization: Target scaling by CPU usage.
type CpuUtilization struct {
// AggregationWindowLength: The period of time over which CPU
// utilization is calculated.
AggregationWindowLength string `json:"aggregationWindowLength,omitempty"`
// TargetUtilization: Target (0-1) CPU utilization ratio to maintain
// when scaling.
TargetUtilization float64 `json:"targetUtilization,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "AggregationWindowLength") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *CpuUtilization) MarshalJSON() ([]byte, error) {
type noMethod CpuUtilization
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Deployment: Code and application artifacts used to deploy a version
// to App Engine.
type Deployment struct {
// Container: If supplied, a docker (container) image which should be
// used to start the application. Only applicable to the 'vm' runtime.
Container *ContainerInfo `json:"container,omitempty"`
// Files: A manifest of files stored in Google Cloud Storage which
// should be included as part of this application. All files must be
// readable using the credentials supplied with this call.
Files map[string]FileInfo `json:"files,omitempty"`
// SourceReferences: The origin of the source code for this deployment.
// There can be more than one source reference per Version if source
// code is distributed among multiple repositories.
SourceReferences []*SourceReference `json:"sourceReferences,omitempty"`
// ForceSendFields is a list of field names (e.g. "Container") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Deployment) MarshalJSON() ([]byte, error) {
type noMethod Deployment
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ErrorHandler: A custom static error page to be served when an error
// occurs.
type ErrorHandler struct {
// ErrorCode: The error condition this handler applies to.
//
// Possible values:
// "ERROR_CODE_UNSPECIFIED"
// "ERROR_CODE_DEFAULT"
// "ERROR_CODE_OVER_QUOTA"
// "ERROR_CODE_DOS_API_DENIAL"
// "ERROR_CODE_TIMEOUT"
ErrorCode string `json:"errorCode,omitempty"`
// MimeType: MIME type of file. If unspecified, "text/html" is assumed.
MimeType string `json:"mimeType,omitempty"`
// StaticFile: Static file content to be served for this error.
StaticFile string `json:"staticFile,omitempty"`
// ForceSendFields is a list of field names (e.g. "ErrorCode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ErrorHandler) MarshalJSON() ([]byte, error) {
type noMethod ErrorHandler
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// FileInfo: A single source file which is part of the application to be
// deployed.
type FileInfo struct {
// MimeType: The MIME type of the file; if unspecified, the value from
// Google Cloud Storage will be used.
MimeType string `json:"mimeType,omitempty"`
// Sha1Sum: The SHA1 (160 bits) hash of the file in hex.
Sha1Sum string `json:"sha1Sum,omitempty"`
// SourceUrl: The URL source to use to fetch this file. Must be a URL to
// a resource in Google Cloud Storage.
SourceUrl string `json:"sourceUrl,omitempty"`
// ForceSendFields is a list of field names (e.g. "MimeType") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *FileInfo) MarshalJSON() ([]byte, error) {
type noMethod FileInfo
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// HealthCheck: Configure health checking for the VM instances.
// Unhealthy VM instances will be killed and replaced with new
// instances.
type HealthCheck struct {
// CheckInterval: The interval between health checks.
CheckInterval string `json:"checkInterval,omitempty"`
// DisableHealthCheck: Whether to explicitly disable health checks for
// this instance.
DisableHealthCheck bool `json:"disableHealthCheck,omitempty"`
// HealthyThreshold: The number of consecutive successful health checks
// before receiving traffic.
HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
// Host: The host header to send when performing an HTTP health check
// (e.g. myapp.appspot.com)
Host string `json:"host,omitempty"`
// RestartThreshold: The number of consecutive failed health checks
// before an instance is restarted.
RestartThreshold int64 `json:"restartThreshold,omitempty"`
// Timeout: The amount of time before the health check is considered
// failed.
Timeout string `json:"timeout,omitempty"`
// UnhealthyThreshold: The number of consecutive failed health checks
// before removing traffic.
UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
// ForceSendFields is a list of field names (e.g. "CheckInterval") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *HealthCheck) MarshalJSON() ([]byte, error) {
type noMethod HealthCheck
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Library: A Python runtime third-party library required by the
// application.
type Library struct {
// Name: The name of the library, e.g. "PIL" or "django".
Name string `json:"name,omitempty"`
// Version: The version of the library to select, or "latest".
Version string `json:"version,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Library) MarshalJSON() ([]byte, error) {
type noMethod Library
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListModulesResponse: Response message for `Modules.ListModules`.
type ListModulesResponse struct {
// Modules: The modules belonging to the requested application.
Modules []*Module `json:"modules,omitempty"`
// NextPageToken: Continuation token for fetching the next page of
// results.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Modules") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ListModulesResponse) MarshalJSON() ([]byte, error) {
type noMethod ListModulesResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListOperationsResponse: The response message for
// [Operations.ListOperations][google.longrunning.Operations.ListOperatio
// ns].
type ListOperationsResponse struct {
// NextPageToken: The standard List next-page token.
NextPageToken string `json:"nextPageToken,omitempty"`
// Operations: A list of operations that matches the specified filter in
// the request.
Operations []*Operation `json:"operations,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListOperationsResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListVersionsResponse: Response message for `Versions.ListVersions`.
type ListVersionsResponse struct {
// NextPageToken: Continuation token for fetching the next page of
// results.
NextPageToken string `json:"nextPageToken,omitempty"`
// Versions: The versions belonging to the requested application module.
Versions []*Version `json:"versions,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListVersionsResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ManualScaling: A module with manual scaling runs continuously,
// allowing you to perform complex initialization and rely on the state
// of its memory over time.
type ManualScaling struct {
// Instances: The number of instances to assign to the module at the
// start. This number can later be altered by using the [Modules
// API](https://cloud.google.com/appengine/docs/python/modules/functions)
// `set_num_instances()` function.
Instances int64 `json:"instances,omitempty"`
// ForceSendFields is a list of field names (e.g. "Instances") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ManualScaling) MarshalJSON() ([]byte, error) {
type noMethod ManualScaling
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Module: A module is a component of an application that provides a
// single service or configuration. A module has a collection of
// versions that define a specific set of code used to implement the
// functionality of that module.
type Module struct {
// Id: The relative name/path of the module within the application.
// Example: "default" @OutputOnly
Id string `json:"id,omitempty"`
// Name: The full path to the Module resource in the API. Example:
// "apps/myapp/modules/default" @OutputOnly
Name string `json:"name,omitempty"`
// Split: A mapping that defines fractional HTTP traffic diversion to
// different versions within the module.
Split *TrafficSplit `json:"split,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Id") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Module) MarshalJSON() ([]byte, error) {
type noMethod Module
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Network: Used to specify extra network settings (for VM runtimes
// only).
type Network struct {
// ForwardedPorts: A list of ports (or port pairs) to forward from the
// VM into the app container.
ForwardedPorts []string `json:"forwardedPorts,omitempty"`
// InstanceTag: A tag to apply to the VM instance during creation.
InstanceTag string `json:"instanceTag,omitempty"`
// Name: The Google Compute Engine network where the VMs will be
// created. If not specified, or empty, the network named "default" will
// be used. (The short name should be specified, not the resource path.)
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "ForwardedPorts") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Network) MarshalJSON() ([]byte, error) {
type noMethod Network
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Operation: This resource represents a long-running operation that is
// the result of a network API call.
type Operation struct {
// Done: If the value is `false`, it means the operation is still in
// progress. If true, the operation is completed, and either `error` or
// `response` is available.
Done bool `json:"done,omitempty"`
// Error: The error result of the operation in case of failure.
Error *Status `json:"error,omitempty"`
// Metadata: Service-specific metadata associated with the operation. It
// typically contains progress information and common metadata such as
// create time. Some services might not provide such metadata. Any
// method that returns a long-running operation should document the
// metadata type, if any.
Metadata OperationMetadata `json:"metadata,omitempty"`
// Name: The server-assigned name, which is only unique within the same
// service that originally returns it. If you use the default HTTP
// mapping above, the `name` should have the format of
// `operations/some/unique/name`.
Name string `json:"name,omitempty"`
// Response: The normal response of the operation in case of success. If
// the original method returns no data on success, such as `Delete`, the
// response is `google.protobuf.Empty`. If the original method is
// standard `Get`/`Create`/`Update`, the response should be the
// resource. For other methods, the response should have the type
// `XxxResponse`, where `Xxx` is the original method name. For example,
// if the original method name is `TakeSnapshot()`, the inferred
// response type is `TakeSnapshotResponse`.
Response OperationResponse `json:"response,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Done") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Operation) MarshalJSON() ([]byte, error) {
type noMethod Operation
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
type OperationMetadata interface{}
type OperationResponse interface{}
// OperationMetadata1: Metadata for the given
// [google.longrunning.Operation][google.longrunning.Operation].
type OperationMetadata1 struct {
// EndTime: Timestamp that this operation was completed. (Not present if
// the operation is still in progress.) @OutputOnly
EndTime string `json:"endTime,omitempty"`
// InsertTime: Timestamp that this operation was received. @OutputOnly
InsertTime string `json:"insertTime,omitempty"`
// Method: API method name that initiated the operation. Example:
// "google.appengine.v1beta4.Version.CreateVersion". @OutputOnly
Method string `json:"method,omitempty"`
// OperationType: The type of the operation (deprecated, use method
// field instead). Example: "create_version". @OutputOnly
OperationType string `json:"operationType,omitempty"`
// Target: Resource that this operation is acting on. Example:
// "apps/myapp/modules/default". @OutputOnly
Target string `json:"target,omitempty"`
// User: The user who requested this operation. @OutputOnly
User string `json:"user,omitempty"`
// ForceSendFields is a list of field names (e.g. "EndTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *OperationMetadata1) MarshalJSON() ([]byte, error) {
type noMethod OperationMetadata1
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Resources: Used to specify how many machine resources an app version
// needs.
type Resources struct {
// Cpu: How many CPU cores an app version needs.
Cpu float64 `json:"cpu,omitempty"`
// DiskGb: How much disk size, in GB, an app version needs.
DiskGb float64 `json:"diskGb,omitempty"`
// MemoryGb: How much memory, in GB, an app version needs.
MemoryGb float64 `json:"memoryGb,omitempty"`
// ForceSendFields is a list of field names (e.g. "Cpu") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Resources) MarshalJSON() ([]byte, error) {
type noMethod Resources
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ScriptHandler: Executes a script to handle the request that matches
// the URL pattern.
type ScriptHandler struct {
// ScriptPath: Specifies the path to the script from the application
// root directory.
ScriptPath string `json:"scriptPath,omitempty"`
// ForceSendFields is a list of field names (e.g. "ScriptPath") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ScriptHandler) MarshalJSON() ([]byte, error) {
type noMethod ScriptHandler
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// SourceReference: A reference to a particular snapshot of the source
// tree used to build and deploy the application.
type SourceReference struct {
// Repository: Optional. A URI string identifying the repository.
// Example: "https://source.developers.google.com/p/app-123/r/default"
Repository string `json:"repository,omitempty"`
// RevisionId: The canonical (and persistent) identifier of the deployed
// revision, i.e. any kind of aliases including tags or branch names are
// not allowed. Example (git):
// "2198322f89e0bb2e25021667c2ed489d1fd34e6b"
RevisionId string `json:"revisionId,omitempty"`
// ForceSendFields is a list of field names (e.g. "Repository") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *SourceReference) MarshalJSON() ([]byte, error) {
type noMethod SourceReference
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// StaticDirectoryHandler: Files served directly to the user for a given
// URL, such as images, CSS stylesheets, or JavaScript source files.
// Static directory handlers make it easy to serve the entire contents
// of a directory as static files.
type StaticDirectoryHandler struct {
// ApplicationReadable: By default, files declared in static file
// handlers are uploaded as static data and are only served to end
// users, they cannot be read by an application. If this field is set to
// true, the files are also uploaded as code data so your application
// can read them. Both uploads are charged against your code and static
// data storage resource quotas.
ApplicationReadable bool `json:"applicationReadable,omitempty"`
// Directory: The path to the directory containing the static files,
// from the application root directory. Everything after the end of the
// matched url pattern is appended to static_dir to form the full path
// to the requested file.
Directory string `json:"directory,omitempty"`
// Expiration: The length of time a static file served by this handler
// ought to be cached by web proxies and browsers.
Expiration string `json:"expiration,omitempty"`
// HttpHeaders: HTTP headers to use for all responses from these URLs.
HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
// MimeType: If specified, all files served by this handler will be
// served using the specified MIME type. If not specified, the MIME type
// for a file will be derived from the file's filename extension.
MimeType string `json:"mimeType,omitempty"`
// RequireMatchingFile: If true, this UrlMap entry does not match the
// request unless the file referenced by the handler also exists. If no
// such file exists, processing will continue with the next UrlMap that
// matches the requested URL.
RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
// ForceSendFields is a list of field names (e.g. "ApplicationReadable")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *StaticDirectoryHandler) MarshalJSON() ([]byte, error) {
type noMethod StaticDirectoryHandler
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// StaticFilesHandler: Files served directly to the user for a given
// URL, such as images, CSS stylesheets, or JavaScript source files.
// Static file handlers describe which files in the application
// directory are static files, and which URLs serve them.
type StaticFilesHandler struct {
// ApplicationReadable: By default, files declared in static file
// handlers are uploaded as static data and are only served to end
// users, they cannot be read by an application. If this field is set to
// true, the files are also uploaded as code data so your application
// can read them. Both uploads are charged against your code and static
// data storage resource quotas.
ApplicationReadable bool `json:"applicationReadable,omitempty"`
// Expiration: The length of time a static file served by this handler
// ought to be cached by web proxies and browsers.
Expiration string `json:"expiration,omitempty"`
// HttpHeaders: HTTP headers to use for all responses from these URLs.
HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
// MimeType: If specified, all files served by this handler will be
// served using the specified MIME type. If not specified, the MIME type
// for a file will be derived from the file's filename extension.
MimeType string `json:"mimeType,omitempty"`
// Path: The path to the static files matched by the URL pattern, from
// the application root directory. The path can refer to text matched in
// groupings in the URL pattern.
Path string `json:"path,omitempty"`
// RequireMatchingFile: If true, this
// [UrlMap][google.appengine.v1beta4.UrlMap] entry does not match the
// request unless the file referenced by the handler also exists. If no
// such file exists, processing will continue with the next
// [UrlMap][google.appengine.v1beta4.UrlMap] that matches the requested
// URL.
RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
// UploadPathRegex: A regular expression that matches the file paths for
// all files that will be referenced by this handler.
UploadPathRegex string `json:"uploadPathRegex,omitempty"`
// ForceSendFields is a list of field names (e.g. "ApplicationReadable")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be