/
classes.rb
3095 lines (2580 loc) · 128 KB
/
classes.rb
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 2015 Google Inc.
#
# 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AppengineV1beta
# Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/
# endpoints/) configuration for API handlers.
class ApiConfigHandler
include Google::Apis::Core::Hashable
# Action to take when users access resources that require authentication.
# Defaults to redirect.
# Corresponds to the JSON property `authFailAction`
# @return [String]
attr_accessor :auth_fail_action
# Level of login required to access this resource. Defaults to optional.
# Corresponds to the JSON property `login`
# @return [String]
attr_accessor :login
# Path to the script from the application root directory.
# Corresponds to the JSON property `script`
# @return [String]
attr_accessor :script
# Security (HTTPS) enforcement for this URL.
# Corresponds to the JSON property `securityLevel`
# @return [String]
attr_accessor :security_level
# URL to serve the endpoint at.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@auth_fail_action = args[:auth_fail_action] if args.key?(:auth_fail_action)
@login = args[:login] if args.key?(:login)
@script = args[:script] if args.key?(:script)
@security_level = args[:security_level] if args.key?(:security_level)
@url = args[:url] if args.key?(:url)
end
end
# Uses Google Cloud Endpoints to handle requests.
class ApiEndpointHandler
include Google::Apis::Core::Hashable
# Path to the script from the application root directory.
# Corresponds to the JSON property `scriptPath`
# @return [String]
attr_accessor :script_path
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@script_path = args[:script_path] if args.key?(:script_path)
end
end
# An Application resource contains the top-level configuration of an App Engine
# application.
class Application
include Google::Apis::Core::Hashable
# Google Apps authentication domain that controls which users can access this
# application.Defaults to open access for any Google Account.
# Corresponds to the JSON property `authDomain`
# @return [String]
attr_accessor :auth_domain
# Google Cloud Storage bucket that can be used for storing files associated with
# this application. This bucket is associated with the application and can be
# used by the gcloud deployment commands.@OutputOnly
# Corresponds to the JSON property `codeBucket`
# @return [String]
attr_accessor :code_bucket
# The type of the Cloud Firestore or Cloud Datastore database associated with
# this application.
# Corresponds to the JSON property `databaseType`
# @return [String]
attr_accessor :database_type
# Google Cloud Storage bucket that can be used by this application to store
# content.@OutputOnly
# Corresponds to the JSON property `defaultBucket`
# @return [String]
attr_accessor :default_bucket
# Cookie expiration policy for this application.
# Corresponds to the JSON property `defaultCookieExpiration`
# @return [String]
attr_accessor :default_cookie_expiration
# Hostname used to reach this application, as resolved by App Engine.@OutputOnly
# Corresponds to the JSON property `defaultHostname`
# @return [String]
attr_accessor :default_hostname
# HTTP path dispatch rules for requests to the application that do not
# explicitly target a service or version. Rules are order-dependent. Up to 20
# dispatch rules can be supported.
# Corresponds to the JSON property `dispatchRules`
# @return [Array<Google::Apis::AppengineV1beta::UrlDispatchRule>]
attr_accessor :dispatch_rules
# The feature specific settings to be used in the application. These define
# behaviors that are user configurable.
# Corresponds to the JSON property `featureSettings`
# @return [Google::Apis::AppengineV1beta::FeatureSettings]
attr_accessor :feature_settings
# The Google Container Registry domain used for storing managed build docker
# images for this application.
# Corresponds to the JSON property `gcrDomain`
# @return [String]
attr_accessor :gcr_domain
# Identity-Aware Proxy
# Corresponds to the JSON property `iap`
# @return [Google::Apis::AppengineV1beta::IdentityAwareProxy]
attr_accessor :iap
# Identifier of the Application resource. This identifier is equivalent to the
# project ID of the Google Cloud Platform project where you want to deploy your
# application. Example: myapp.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Location from which this application runs. Application instances run out of
# the data centers in the specified location, which is also where all of the
# application's end user content is stored.Defaults to us-central.View the list
# of supported locations (https://cloud.google.com/appengine/docs/locations).
# Corresponds to the JSON property `locationId`
# @return [String]
attr_accessor :location_id
# Full path to the Application resource in the API. Example: apps/myapp.@
# OutputOnly
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Serving status of this application.
# Corresponds to the JSON property `servingStatus`
# @return [String]
attr_accessor :serving_status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@auth_domain = args[:auth_domain] if args.key?(:auth_domain)
@code_bucket = args[:code_bucket] if args.key?(:code_bucket)
@database_type = args[:database_type] if args.key?(:database_type)
@default_bucket = args[:default_bucket] if args.key?(:default_bucket)
@default_cookie_expiration = args[:default_cookie_expiration] if args.key?(:default_cookie_expiration)
@default_hostname = args[:default_hostname] if args.key?(:default_hostname)
@dispatch_rules = args[:dispatch_rules] if args.key?(:dispatch_rules)
@feature_settings = args[:feature_settings] if args.key?(:feature_settings)
@gcr_domain = args[:gcr_domain] if args.key?(:gcr_domain)
@iap = args[:iap] if args.key?(:iap)
@id = args[:id] if args.key?(:id)
@location_id = args[:location_id] if args.key?(:location_id)
@name = args[:name] if args.key?(:name)
@serving_status = args[:serving_status] if args.key?(:serving_status)
end
end
# An SSL certificate that a user has been authorized to administer. A user is
# authorized to administer any certificate that applies to one of their
# authorized domains.
class AuthorizedCertificate
include Google::Apis::Core::Hashable
# An SSL certificate obtained from a certificate authority.
# Corresponds to the JSON property `certificateRawData`
# @return [Google::Apis::AppengineV1beta::CertificateRawData]
attr_accessor :certificate_raw_data
# The user-specified display name of the certificate. This is not guaranteed to
# be unique. Example: My Certificate.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Aggregate count of the domain mappings with this certificate mapped. This
# count includes domain mappings on applications for which the user does not
# have VIEWER permissions.Only returned by GET or LIST requests when
# specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly
# Corresponds to the JSON property `domainMappingsCount`
# @return [Fixnum]
attr_accessor :domain_mappings_count
# Topmost applicable domains of this certificate. This certificate applies to
# these domains and their subdomains. Example: example.com.@OutputOnly
# Corresponds to the JSON property `domainNames`
# @return [Array<String>]
attr_accessor :domain_names
# The time when this certificate expires. To update the renewal time on this
# certificate, upload an SSL certificate with a different expiration time using
# AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly
# Corresponds to the JSON property `expireTime`
# @return [String]
attr_accessor :expire_time
# Relative name of the certificate. This is a unique value autogenerated on
# AuthorizedCertificate resource creation. Example: 12345.@OutputOnly
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# A certificate managed by App Engine.
# Corresponds to the JSON property `managedCertificate`
# @return [Google::Apis::AppengineV1beta::ManagedCertificate]
attr_accessor :managed_certificate
# Full path to the AuthorizedCertificate resource in the API. Example: apps/
# myapp/authorizedCertificates/12345.@OutputOnly
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The full paths to user visible Domain Mapping resources that have this
# certificate mapped. Example: apps/myapp/domainMappings/example.com.This may
# not represent the full list of mapped domain mappings if the user does not
# have VIEWER permissions on all of the applications that have this certificate
# mapped. See domain_mappings_count for a complete count.Only returned by GET or
# LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@
# OutputOnly
# Corresponds to the JSON property `visibleDomainMappings`
# @return [Array<String>]
attr_accessor :visible_domain_mappings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@certificate_raw_data = args[:certificate_raw_data] if args.key?(:certificate_raw_data)
@display_name = args[:display_name] if args.key?(:display_name)
@domain_mappings_count = args[:domain_mappings_count] if args.key?(:domain_mappings_count)
@domain_names = args[:domain_names] if args.key?(:domain_names)
@expire_time = args[:expire_time] if args.key?(:expire_time)
@id = args[:id] if args.key?(:id)
@managed_certificate = args[:managed_certificate] if args.key?(:managed_certificate)
@name = args[:name] if args.key?(:name)
@visible_domain_mappings = args[:visible_domain_mappings] if args.key?(:visible_domain_mappings)
end
end
# A domain that a user has been authorized to administer. To authorize use of a
# domain, verify ownership via Webmaster Central (https://www.google.com/
# webmasters/verification/home).
class AuthorizedDomain
include Google::Apis::Core::Hashable
# Fully qualified domain name of the domain authorized for use. Example: example.
# com.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/
# authorizedDomains/example.com.@OutputOnly
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@name = args[:name] if args.key?(:name)
end
end
# Automatic scaling is based on request rate, response latencies, and other
# application metrics.
class AutomaticScaling
include Google::Apis::Core::Hashable
# The time period that the Autoscaler (https://cloud.google.com/compute/docs/
# autoscaler/) should wait before it starts collecting information from a new
# instance. This prevents the autoscaler from collecting information when the
# instance is initializing, during which the collected usage would not be
# reliable. Only applicable in the App Engine flexible environment.
# Corresponds to the JSON property `coolDownPeriod`
# @return [String]
attr_accessor :cool_down_period
# Target scaling by CPU usage.
# Corresponds to the JSON property `cpuUtilization`
# @return [Google::Apis::AppengineV1beta::CpuUtilization]
attr_accessor :cpu_utilization
# Target scaling by user-provided metrics. Only applicable in the App Engine
# flexible environment.
# Corresponds to the JSON property `customMetrics`
# @return [Array<Google::Apis::AppengineV1beta::CustomMetric>]
attr_accessor :custom_metrics
# Target scaling by disk usage. Only applicable in the App Engine flexible
# environment.
# Corresponds to the JSON property `diskUtilization`
# @return [Google::Apis::AppengineV1beta::DiskUtilization]
attr_accessor :disk_utilization
# Number of concurrent requests an automatic scaling instance can accept before
# the scheduler spawns a new instance.Defaults to a runtime-specific value.
# Corresponds to the JSON property `maxConcurrentRequests`
# @return [Fixnum]
attr_accessor :max_concurrent_requests
# Maximum number of idle instances that should be maintained for this version.
# Corresponds to the JSON property `maxIdleInstances`
# @return [Fixnum]
attr_accessor :max_idle_instances
# Maximum amount of time that a request should wait in the pending queue before
# starting a new instance to handle it.
# Corresponds to the JSON property `maxPendingLatency`
# @return [String]
attr_accessor :max_pending_latency
# Maximum number of instances that should be started to handle requests for this
# version.
# Corresponds to the JSON property `maxTotalInstances`
# @return [Fixnum]
attr_accessor :max_total_instances
# Minimum number of idle instances that should be maintained for this version.
# Only applicable for the default version of a service.
# Corresponds to the JSON property `minIdleInstances`
# @return [Fixnum]
attr_accessor :min_idle_instances
# Minimum amount of time a request should wait in the pending queue before
# starting a new instance to handle it.
# Corresponds to the JSON property `minPendingLatency`
# @return [String]
attr_accessor :min_pending_latency
# Minimum number of running instances that should be maintained for this version.
# Corresponds to the JSON property `minTotalInstances`
# @return [Fixnum]
attr_accessor :min_total_instances
# Target scaling by network usage. Only applicable in the App Engine flexible
# environment.
# Corresponds to the JSON property `networkUtilization`
# @return [Google::Apis::AppengineV1beta::NetworkUtilization]
attr_accessor :network_utilization
# Target scaling by request utilization. Only applicable in the App Engine
# flexible environment.
# Corresponds to the JSON property `requestUtilization`
# @return [Google::Apis::AppengineV1beta::RequestUtilization]
attr_accessor :request_utilization
# Scheduler settings for standard environment.
# Corresponds to the JSON property `standardSchedulerSettings`
# @return [Google::Apis::AppengineV1beta::StandardSchedulerSettings]
attr_accessor :standard_scheduler_settings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cool_down_period = args[:cool_down_period] if args.key?(:cool_down_period)
@cpu_utilization = args[:cpu_utilization] if args.key?(:cpu_utilization)
@custom_metrics = args[:custom_metrics] if args.key?(:custom_metrics)
@disk_utilization = args[:disk_utilization] if args.key?(:disk_utilization)
@max_concurrent_requests = args[:max_concurrent_requests] if args.key?(:max_concurrent_requests)
@max_idle_instances = args[:max_idle_instances] if args.key?(:max_idle_instances)
@max_pending_latency = args[:max_pending_latency] if args.key?(:max_pending_latency)
@max_total_instances = args[:max_total_instances] if args.key?(:max_total_instances)
@min_idle_instances = args[:min_idle_instances] if args.key?(:min_idle_instances)
@min_pending_latency = args[:min_pending_latency] if args.key?(:min_pending_latency)
@min_total_instances = args[:min_total_instances] if args.key?(:min_total_instances)
@network_utilization = args[:network_utilization] if args.key?(:network_utilization)
@request_utilization = args[:request_utilization] if args.key?(:request_utilization)
@standard_scheduler_settings = args[:standard_scheduler_settings] if args.key?(:standard_scheduler_settings)
end
end
# A service 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.
class BasicScaling
include Google::Apis::Core::Hashable
# Duration of time after the last request that an instance must wait before the
# instance is shut down.
# Corresponds to the JSON property `idleTimeout`
# @return [String]
attr_accessor :idle_timeout
# Maximum number of instances to create for this version.
# Corresponds to the JSON property `maxInstances`
# @return [Fixnum]
attr_accessor :max_instances
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@idle_timeout = args[:idle_timeout] if args.key?(:idle_timeout)
@max_instances = args[:max_instances] if args.key?(:max_instances)
end
end
# Request message for Firewall.BatchUpdateIngressRules.
class BatchUpdateIngressRulesRequest
include Google::Apis::Core::Hashable
# A list of FirewallRules to replace the existing set.
# Corresponds to the JSON property `ingressRules`
# @return [Array<Google::Apis::AppengineV1beta::FirewallRule>]
attr_accessor :ingress_rules
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ingress_rules = args[:ingress_rules] if args.key?(:ingress_rules)
end
end
# Response message for Firewall.UpdateAllIngressRules.
class BatchUpdateIngressRulesResponse
include Google::Apis::Core::Hashable
# The full list of ingress FirewallRules for this application.
# Corresponds to the JSON property `ingressRules`
# @return [Array<Google::Apis::AppengineV1beta::FirewallRule>]
attr_accessor :ingress_rules
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ingress_rules = args[:ingress_rules] if args.key?(:ingress_rules)
end
end
# Google Cloud Build information.
class BuildInfo
include Google::Apis::Core::Hashable
# The Google Cloud Build id. Example: "f966068f-08b2-42c8-bdfe-74137dff2bf9"
# Corresponds to the JSON property `cloudBuildId`
# @return [String]
attr_accessor :cloud_build_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cloud_build_id = args[:cloud_build_id] if args.key?(:cloud_build_id)
end
end
# An SSL certificate obtained from a certificate authority.
class CertificateRawData
include Google::Apis::Core::Hashable
# Unencrypted PEM encoded RSA private key. This field is set once on certificate
# creation and then encrypted. The key size must be 2048 bits or fewer. Must
# include the header and footer. Example: -----BEGIN RSA PRIVATE KEY----- -----
# END RSA PRIVATE KEY----- @InputOnly
# Corresponds to the JSON property `privateKey`
# @return [String]
attr_accessor :private_key
# PEM encoded x.509 public key certificate. This field is set once on
# certificate creation. Must include the header and footer. Example: -----BEGIN
# CERTIFICATE----- -----END CERTIFICATE-----
# Corresponds to the JSON property `publicCertificate`
# @return [String]
attr_accessor :public_certificate
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@private_key = args[:private_key] if args.key?(:private_key)
@public_certificate = args[:public_certificate] if args.key?(:public_certificate)
end
end
# Options for the build operations performed as a part of the version deployment.
# Only applicable for App Engine flexible environment when creating a version
# using source code directly.
class CloudBuildOptions
include Google::Apis::Core::Hashable
# Path to the yaml file used in deployment, used to determine runtime
# configuration details.Required for flexible environment builds.See https://
# cloud.google.com/appengine/docs/standard/python/config/appref for more details.
# Corresponds to the JSON property `appYamlPath`
# @return [String]
attr_accessor :app_yaml_path
# The Cloud Build timeout used as part of any dependent builds performed by
# version creation. Defaults to 10 minutes.
# Corresponds to the JSON property `cloudBuildTimeout`
# @return [String]
attr_accessor :cloud_build_timeout
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@app_yaml_path = args[:app_yaml_path] if args.key?(:app_yaml_path)
@cloud_build_timeout = args[:cloud_build_timeout] if args.key?(:cloud_build_timeout)
end
end
# Docker image that is used to create a container and start a VM instance for
# the version that you deploy. Only applicable for instances running in the App
# Engine flexible environment.
class ContainerInfo
include Google::Apis::Core::Hashable
# URI to the hosted container image in Google Container Registry. The URI must
# be fully qualified and include a tag or digest. Examples: "gcr.io/my-project/
# image:tag" or "gcr.io/my-project/image@digest"
# Corresponds to the JSON property `image`
# @return [String]
attr_accessor :image
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@image = args[:image] if args.key?(:image)
end
end
# Target scaling by CPU usage.
class CpuUtilization
include Google::Apis::Core::Hashable
# Period of time over which CPU utilization is calculated.
# Corresponds to the JSON property `aggregationWindowLength`
# @return [String]
attr_accessor :aggregation_window_length
# Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.
# Corresponds to the JSON property `targetUtilization`
# @return [Float]
attr_accessor :target_utilization
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@aggregation_window_length = args[:aggregation_window_length] if args.key?(:aggregation_window_length)
@target_utilization = args[:target_utilization] if args.key?(:target_utilization)
end
end
# Metadata for the given google.longrunning.Operation during a google.appengine.
# v1.CreateVersionRequest.
class CreateVersionMetadataV1
include Google::Apis::Core::Hashable
# The Cloud Build ID if one was created as part of the version create. @
# OutputOnly
# Corresponds to the JSON property `cloudBuildId`
# @return [String]
attr_accessor :cloud_build_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cloud_build_id = args[:cloud_build_id] if args.key?(:cloud_build_id)
end
end
# Metadata for the given google.longrunning.Operation during a google.appengine.
# v1alpha.CreateVersionRequest.
class CreateVersionMetadataV1Alpha
include Google::Apis::Core::Hashable
# The Cloud Build ID if one was created as part of the version create. @
# OutputOnly
# Corresponds to the JSON property `cloudBuildId`
# @return [String]
attr_accessor :cloud_build_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cloud_build_id = args[:cloud_build_id] if args.key?(:cloud_build_id)
end
end
# Metadata for the given google.longrunning.Operation during a google.appengine.
# v1beta.CreateVersionRequest.
class CreateVersionMetadataV1Beta
include Google::Apis::Core::Hashable
# The Cloud Build ID if one was created as part of the version create. @
# OutputOnly
# Corresponds to the JSON property `cloudBuildId`
# @return [String]
attr_accessor :cloud_build_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cloud_build_id = args[:cloud_build_id] if args.key?(:cloud_build_id)
end
end
# Allows autoscaling based on Stackdriver metrics.
class CustomMetric
include Google::Apis::Core::Hashable
# Allows filtering on the metric's fields.
# Corresponds to the JSON property `filter`
# @return [String]
attr_accessor :filter
# The name of the metric.
# Corresponds to the JSON property `metricName`
# @return [String]
attr_accessor :metric_name
# May be used instead of target_utilization when an instance can handle a
# specific amount of work/resources and the metric value is equal to the current
# amount of work remaining. The autoscaler will try to keep the number of
# instances equal to the metric value divided by single_instance_assignment.
# Corresponds to the JSON property `singleInstanceAssignment`
# @return [Float]
attr_accessor :single_instance_assignment
# The type of the metric. Must be a string representing a Stackdriver metric
# type e.g. GAGUE, DELTA_PER_SECOND, etc.
# Corresponds to the JSON property `targetType`
# @return [String]
attr_accessor :target_type
# The target value for the metric.
# Corresponds to the JSON property `targetUtilization`
# @return [Float]
attr_accessor :target_utilization
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@filter = args[:filter] if args.key?(:filter)
@metric_name = args[:metric_name] if args.key?(:metric_name)
@single_instance_assignment = args[:single_instance_assignment] if args.key?(:single_instance_assignment)
@target_type = args[:target_type] if args.key?(:target_type)
@target_utilization = args[:target_utilization] if args.key?(:target_utilization)
end
end
# Request message for Instances.DebugInstance.
class DebugInstanceRequest
include Google::Apis::Core::Hashable
# Public SSH key to add to the instance. Examples: [USERNAME]:ssh-rsa [KEY_VALUE]
# [USERNAME] [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh `"userName":"[USERNAME]",
# "expireOn":"[EXPIRE_TIME]"`For more information, see Adding and Removing SSH
# Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys)
# .
# Corresponds to the JSON property `sshKey`
# @return [String]
attr_accessor :ssh_key
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@ssh_key = args[:ssh_key] if args.key?(:ssh_key)
end
end
# Code and application artifacts used to deploy a version to App Engine.
class Deployment
include Google::Apis::Core::Hashable
# Google Cloud Build information.
# Corresponds to the JSON property `build`
# @return [Google::Apis::AppengineV1beta::BuildInfo]
attr_accessor :build
# Options for the build operations performed as a part of the version deployment.
# Only applicable for App Engine flexible environment when creating a version
# using source code directly.
# Corresponds to the JSON property `cloudBuildOptions`
# @return [Google::Apis::AppengineV1beta::CloudBuildOptions]
attr_accessor :cloud_build_options
# Docker image that is used to create a container and start a VM instance for
# the version that you deploy. Only applicable for instances running in the App
# Engine flexible environment.
# Corresponds to the JSON property `container`
# @return [Google::Apis::AppengineV1beta::ContainerInfo]
attr_accessor :container
# Manifest of the files stored in Google Cloud Storage that are included as part
# of this version. All files must be readable using the credentials supplied
# with this call.
# Corresponds to the JSON property `files`
# @return [Hash<String,Google::Apis::AppengineV1beta::FileInfo>]
attr_accessor :files
# The zip file information for a zip deployment.
# Corresponds to the JSON property `zip`
# @return [Google::Apis::AppengineV1beta::ZipInfo]
attr_accessor :zip
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@build = args[:build] if args.key?(:build)
@cloud_build_options = args[:cloud_build_options] if args.key?(:cloud_build_options)
@container = args[:container] if args.key?(:container)
@files = args[:files] if args.key?(:files)
@zip = args[:zip] if args.key?(:zip)
end
end
# Target scaling by disk usage. Only applicable in the App Engine flexible
# environment.
class DiskUtilization
include Google::Apis::Core::Hashable
# Target bytes read per second.
# Corresponds to the JSON property `targetReadBytesPerSecond`
# @return [Fixnum]
attr_accessor :target_read_bytes_per_second
# Target ops read per seconds.
# Corresponds to the JSON property `targetReadOpsPerSecond`
# @return [Fixnum]
attr_accessor :target_read_ops_per_second
# Target bytes written per second.
# Corresponds to the JSON property `targetWriteBytesPerSecond`
# @return [Fixnum]
attr_accessor :target_write_bytes_per_second
# Target ops written per second.
# Corresponds to the JSON property `targetWriteOpsPerSecond`
# @return [Fixnum]
attr_accessor :target_write_ops_per_second
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@target_read_bytes_per_second = args[:target_read_bytes_per_second] if args.key?(:target_read_bytes_per_second)
@target_read_ops_per_second = args[:target_read_ops_per_second] if args.key?(:target_read_ops_per_second)
@target_write_bytes_per_second = args[:target_write_bytes_per_second] if args.key?(:target_write_bytes_per_second)
@target_write_ops_per_second = args[:target_write_ops_per_second] if args.key?(:target_write_ops_per_second)
end
end
# A domain serving an App Engine application.
class DomainMapping
include Google::Apis::Core::Hashable
# Relative name of the domain serving the application. Example: example.com.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Full path to the DomainMapping resource in the API. Example: apps/myapp/
# domainMapping/example.com.@OutputOnly
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The resource records required to configure this domain mapping. These records
# must be added to the domain's DNS configuration in order to serve the
# application via this domain mapping.@OutputOnly
# Corresponds to the JSON property `resourceRecords`
# @return [Array<Google::Apis::AppengineV1beta::ResourceRecord>]
attr_accessor :resource_records
# SSL configuration for a DomainMapping resource.
# Corresponds to the JSON property `sslSettings`
# @return [Google::Apis::AppengineV1beta::SslSettings]
attr_accessor :ssl_settings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@name = args[:name] if args.key?(:name)
@resource_records = args[:resource_records] if args.key?(:resource_records)
@ssl_settings = args[:ssl_settings] if args.key?(:ssl_settings)
end
end
# A generic empty message that you can re-use to avoid defining duplicated empty
# messages in your APIs. A typical example is to use it as the request or the
# response type of an API method. For instance: service Foo ` rpc Bar(google.
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
# Empty is empty JSON object ``.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The
# Endpoints API Service provides tooling for serving Open API and gRPC endpoints
# via an NGINX proxy. Only valid for App Engine Flexible environment deployments.
# The fields here refer to the name and configuration ID of a "service" resource
# in the Service Management API (https://cloud.google.com/service-management/
# overview).
class EndpointsApiService
include Google::Apis::Core::Hashable
# Endpoints service configuration ID as specified by the Service Management API.
# For example "2016-09-19r1".By default, the rollout strategy for Endpoints is
# RolloutStrategy.FIXED. This means that Endpoints starts up with a particular
# configuration ID. When a new configuration is rolled out, Endpoints must be
# given the new configuration ID. The config_id field is used to give the
# configuration ID and is required in this case.Endpoints also has a rollout
# strategy called RolloutStrategy.MANAGED. When using this, Endpoints fetches
# the latest configuration and does not need the configuration ID. In this case,
# config_id must be omitted.
# Corresponds to the JSON property `configId`
# @return [String]
attr_accessor :config_id
# Enable or disable trace sampling. By default, this is set to false for enabled.
# Corresponds to the JSON property `disableTraceSampling`
# @return [Boolean]
attr_accessor :disable_trace_sampling
alias_method :disable_trace_sampling?, :disable_trace_sampling
# Endpoints service name which is the name of the "service" resource in the
# Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Endpoints rollout strategy. If FIXED, config_id must be specified. If MANAGED,
# config_id must be omitted.
# Corresponds to the JSON property `rolloutStrategy`
# @return [String]
attr_accessor :rollout_strategy
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@config_id = args[:config_id] if args.key?(:config_id)
@disable_trace_sampling = args[:disable_trace_sampling] if args.key?(:disable_trace_sampling)
@name = args[:name] if args.key?(:name)
@rollout_strategy = args[:rollout_strategy] if args.key?(:rollout_strategy)
end
end
# The entrypoint for the application.
class Entrypoint
include Google::Apis::Core::Hashable
# The format should be a shell command that can be fed to bash -c.
# Corresponds to the JSON property `shell`
# @return [String]
attr_accessor :shell
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@shell = args[:shell] if args.key?(:shell)
end
end
# Custom static error page to be served when an error occurs.
class ErrorHandler
include Google::Apis::Core::Hashable
# Error condition this handler applies to.
# Corresponds to the JSON property `errorCode`
# @return [String]
attr_accessor :error_code
# MIME type of file. Defaults to text/html.
# Corresponds to the JSON property `mimeType`
# @return [String]
attr_accessor :mime_type
# Static file content to be served for this error.
# Corresponds to the JSON property `staticFile`
# @return [String]
attr_accessor :static_file
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@error_code = args[:error_code] if args.key?(:error_code)
@mime_type = args[:mime_type] if args.key?(:mime_type)
@static_file = args[:static_file] if args.key?(:static_file)
end
end
# The feature specific settings to be used in the application. These define