google-cloud-app_engine-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google-cloud-app_engine-v1.rb +21 -0
- data/lib/google/appengine/v1/app_yaml_pb.rb +137 -0
- data/lib/google/appengine/v1/appengine_pb.rb +261 -0
- data/lib/google/appengine/v1/appengine_services_pb.rb +313 -0
- data/lib/google/appengine/v1/application_pb.rb +69 -0
- data/lib/google/appengine/v1/audit_data_pb.rb +35 -0
- data/lib/google/appengine/v1/certificate_pb.rb +52 -0
- data/lib/google/appengine/v1/deploy_pb.rb +47 -0
- data/lib/google/appengine/v1/deployed_files_pb.rb +19 -0
- data/lib/google/appengine/v1/domain_mapping_pb.rb +51 -0
- data/lib/google/appengine/v1/domain_pb.rb +24 -0
- data/lib/google/appengine/v1/firewall_pb.rb +32 -0
- data/lib/google/appengine/v1/instance_pb.rb +45 -0
- data/lib/google/appengine/v1/location_pb.rb +24 -0
- data/lib/google/appengine/v1/network_settings_pb.rb +19 -0
- data/lib/google/appengine/v1/operation_pb.rb +37 -0
- data/lib/google/appengine/v1/service_pb.rb +37 -0
- data/lib/google/appengine/v1/version_pb.rb +183 -0
- data/lib/google/cloud/app_engine/v1.rb +45 -0
- data/lib/google/cloud/app_engine/v1/applications.rb +49 -0
- data/lib/google/cloud/app_engine/v1/applications/client.rb +624 -0
- data/lib/google/cloud/app_engine/v1/applications/credentials.rb +53 -0
- data/lib/google/cloud/app_engine/v1/applications/operations.rb +655 -0
- data/lib/google/cloud/app_engine/v1/authorized_certificates.rb +49 -0
- data/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb +690 -0
- data/lib/google/cloud/app_engine/v1/authorized_certificates/credentials.rb +53 -0
- data/lib/google/cloud/app_engine/v1/authorized_domains.rb +50 -0
- data/lib/google/cloud/app_engine/v1/authorized_domains/client.rb +380 -0
- data/lib/google/cloud/app_engine/v1/authorized_domains/credentials.rb +53 -0
- data/lib/google/cloud/app_engine/v1/domain_mappings.rb +49 -0
- data/lib/google/cloud/app_engine/v1/domain_mappings/client.rb +705 -0
- data/lib/google/cloud/app_engine/v1/domain_mappings/credentials.rb +53 -0
- data/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb +655 -0
- data/lib/google/cloud/app_engine/v1/firewall.rb +57 -0
- data/lib/google/cloud/app_engine/v1/firewall/client.rb +783 -0
- data/lib/google/cloud/app_engine/v1/firewall/credentials.rb +53 -0
- data/lib/google/cloud/app_engine/v1/instances.rb +49 -0
- data/lib/google/cloud/app_engine/v1/instances/client.rb +644 -0
- data/lib/google/cloud/app_engine/v1/instances/credentials.rb +53 -0
- data/lib/google/cloud/app_engine/v1/instances/operations.rb +655 -0
- data/lib/google/cloud/app_engine/v1/services.rb +49 -0
- data/lib/google/cloud/app_engine/v1/services/client.rb +629 -0
- data/lib/google/cloud/app_engine/v1/services/credentials.rb +53 -0
- data/lib/google/cloud/app_engine/v1/services/operations.rb +655 -0
- data/lib/google/cloud/app_engine/v1/version.rb +28 -0
- data/lib/google/cloud/app_engine/v1/versions.rb +49 -0
- data/lib/google/cloud/app_engine/v1/versions/client.rb +738 -0
- data/lib/google/cloud/app_engine/v1/versions/credentials.rb +53 -0
- data/lib/google/cloud/app_engine/v1/versions/operations.rb +655 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/appengine/v1/app_yaml.rb +379 -0
- data/proto_docs/google/appengine/v1/appengine.rb +639 -0
- data/proto_docs/google/appengine/v1/application.rb +192 -0
- data/proto_docs/google/appengine/v1/audit_data.rb +56 -0
- data/proto_docs/google/appengine/v1/certificate.rb +161 -0
- data/proto_docs/google/appengine/v1/deploy.rb +130 -0
- data/proto_docs/google/appengine/v1/domain.rb +42 -0
- data/proto_docs/google/appengine/v1/domain_mapping.rb +127 -0
- data/proto_docs/google/appengine/v1/firewall.rb +72 -0
- data/proto_docs/google/appengine/v1/instance.rb +98 -0
- data/proto_docs/google/appengine/v1/location.rb +38 -0
- data/proto_docs/google/appengine/v1/operation.rb +67 -0
- data/proto_docs/google/appengine/v1/service.rb +100 -0
- data/proto_docs/google/appengine/v1/version.rb +597 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +261 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# source: google/appengine/v1/service.proto
|
|
3
|
+
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
6
|
+
require 'google/api/annotations_pb'
|
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
8
|
+
add_file("google/appengine/v1/service.proto", :syntax => :proto3) do
|
|
9
|
+
add_message "google.appengine.v1.Service" do
|
|
10
|
+
optional :name, :string, 1
|
|
11
|
+
optional :id, :string, 2
|
|
12
|
+
optional :split, :message, 3, "google.appengine.v1.TrafficSplit"
|
|
13
|
+
end
|
|
14
|
+
add_message "google.appengine.v1.TrafficSplit" do
|
|
15
|
+
optional :shard_by, :enum, 1, "google.appengine.v1.TrafficSplit.ShardBy"
|
|
16
|
+
map :allocations, :string, :double, 2
|
|
17
|
+
end
|
|
18
|
+
add_enum "google.appengine.v1.TrafficSplit.ShardBy" do
|
|
19
|
+
value :UNSPECIFIED, 0
|
|
20
|
+
value :COOKIE, 1
|
|
21
|
+
value :IP, 2
|
|
22
|
+
value :RANDOM, 3
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
module Google
|
|
28
|
+
module Cloud
|
|
29
|
+
module AppEngine
|
|
30
|
+
module V1
|
|
31
|
+
Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Service").msgclass
|
|
32
|
+
TrafficSplit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.TrafficSplit").msgclass
|
|
33
|
+
TrafficSplit::ShardBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.TrafficSplit.ShardBy").enummodule
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# source: google/appengine/v1/version.proto
|
|
3
|
+
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
6
|
+
require 'google/appengine/v1/app_yaml_pb'
|
|
7
|
+
require 'google/appengine/v1/deploy_pb'
|
|
8
|
+
require 'google/protobuf/duration_pb'
|
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
|
10
|
+
require 'google/api/annotations_pb'
|
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
12
|
+
add_file("google/appengine/v1/version.proto", :syntax => :proto3) do
|
|
13
|
+
add_message "google.appengine.v1.Version" do
|
|
14
|
+
optional :name, :string, 1
|
|
15
|
+
optional :id, :string, 2
|
|
16
|
+
repeated :inbound_services, :enum, 6, "google.appengine.v1.InboundServiceType"
|
|
17
|
+
optional :instance_class, :string, 7
|
|
18
|
+
optional :network, :message, 8, "google.appengine.v1.Network"
|
|
19
|
+
repeated :zones, :string, 118
|
|
20
|
+
optional :resources, :message, 9, "google.appengine.v1.Resources"
|
|
21
|
+
optional :runtime, :string, 10
|
|
22
|
+
optional :runtime_channel, :string, 117
|
|
23
|
+
optional :threadsafe, :bool, 11
|
|
24
|
+
optional :vm, :bool, 12
|
|
25
|
+
map :beta_settings, :string, :string, 13
|
|
26
|
+
optional :env, :string, 14
|
|
27
|
+
optional :serving_status, :enum, 15, "google.appengine.v1.ServingStatus"
|
|
28
|
+
optional :created_by, :string, 16
|
|
29
|
+
optional :create_time, :message, 17, "google.protobuf.Timestamp"
|
|
30
|
+
optional :disk_usage_bytes, :int64, 18
|
|
31
|
+
optional :runtime_api_version, :string, 21
|
|
32
|
+
optional :runtime_main_executable_path, :string, 22
|
|
33
|
+
repeated :handlers, :message, 100, "google.appengine.v1.UrlMap"
|
|
34
|
+
repeated :error_handlers, :message, 101, "google.appengine.v1.ErrorHandler"
|
|
35
|
+
repeated :libraries, :message, 102, "google.appengine.v1.Library"
|
|
36
|
+
optional :api_config, :message, 103, "google.appengine.v1.ApiConfigHandler"
|
|
37
|
+
map :env_variables, :string, :string, 104
|
|
38
|
+
optional :default_expiration, :message, 105, "google.protobuf.Duration"
|
|
39
|
+
optional :health_check, :message, 106, "google.appengine.v1.HealthCheck"
|
|
40
|
+
optional :readiness_check, :message, 112, "google.appengine.v1.ReadinessCheck"
|
|
41
|
+
optional :liveness_check, :message, 113, "google.appengine.v1.LivenessCheck"
|
|
42
|
+
optional :nobuild_files_regex, :string, 107
|
|
43
|
+
optional :deployment, :message, 108, "google.appengine.v1.Deployment"
|
|
44
|
+
optional :version_url, :string, 109
|
|
45
|
+
optional :endpoints_api_service, :message, 110, "google.appengine.v1.EndpointsApiService"
|
|
46
|
+
optional :entrypoint, :message, 122, "google.appengine.v1.Entrypoint"
|
|
47
|
+
optional :vpc_access_connector, :message, 121, "google.appengine.v1.VpcAccessConnector"
|
|
48
|
+
oneof :scaling do
|
|
49
|
+
optional :automatic_scaling, :message, 3, "google.appengine.v1.AutomaticScaling"
|
|
50
|
+
optional :basic_scaling, :message, 4, "google.appengine.v1.BasicScaling"
|
|
51
|
+
optional :manual_scaling, :message, 5, "google.appengine.v1.ManualScaling"
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
add_message "google.appengine.v1.EndpointsApiService" do
|
|
55
|
+
optional :name, :string, 1
|
|
56
|
+
optional :config_id, :string, 2
|
|
57
|
+
optional :rollout_strategy, :enum, 3, "google.appengine.v1.EndpointsApiService.RolloutStrategy"
|
|
58
|
+
optional :disable_trace_sampling, :bool, 4
|
|
59
|
+
end
|
|
60
|
+
add_enum "google.appengine.v1.EndpointsApiService.RolloutStrategy" do
|
|
61
|
+
value :UNSPECIFIED_ROLLOUT_STRATEGY, 0
|
|
62
|
+
value :FIXED, 1
|
|
63
|
+
value :MANAGED, 2
|
|
64
|
+
end
|
|
65
|
+
add_message "google.appengine.v1.AutomaticScaling" do
|
|
66
|
+
optional :cool_down_period, :message, 1, "google.protobuf.Duration"
|
|
67
|
+
optional :cpu_utilization, :message, 2, "google.appengine.v1.CpuUtilization"
|
|
68
|
+
optional :max_concurrent_requests, :int32, 3
|
|
69
|
+
optional :max_idle_instances, :int32, 4
|
|
70
|
+
optional :max_total_instances, :int32, 5
|
|
71
|
+
optional :max_pending_latency, :message, 6, "google.protobuf.Duration"
|
|
72
|
+
optional :min_idle_instances, :int32, 7
|
|
73
|
+
optional :min_total_instances, :int32, 8
|
|
74
|
+
optional :min_pending_latency, :message, 9, "google.protobuf.Duration"
|
|
75
|
+
optional :request_utilization, :message, 10, "google.appengine.v1.RequestUtilization"
|
|
76
|
+
optional :disk_utilization, :message, 11, "google.appengine.v1.DiskUtilization"
|
|
77
|
+
optional :network_utilization, :message, 12, "google.appengine.v1.NetworkUtilization"
|
|
78
|
+
optional :standard_scheduler_settings, :message, 20, "google.appengine.v1.StandardSchedulerSettings"
|
|
79
|
+
end
|
|
80
|
+
add_message "google.appengine.v1.BasicScaling" do
|
|
81
|
+
optional :idle_timeout, :message, 1, "google.protobuf.Duration"
|
|
82
|
+
optional :max_instances, :int32, 2
|
|
83
|
+
end
|
|
84
|
+
add_message "google.appengine.v1.ManualScaling" do
|
|
85
|
+
optional :instances, :int32, 1
|
|
86
|
+
end
|
|
87
|
+
add_message "google.appengine.v1.CpuUtilization" do
|
|
88
|
+
optional :aggregation_window_length, :message, 1, "google.protobuf.Duration"
|
|
89
|
+
optional :target_utilization, :double, 2
|
|
90
|
+
end
|
|
91
|
+
add_message "google.appengine.v1.RequestUtilization" do
|
|
92
|
+
optional :target_request_count_per_second, :int32, 1
|
|
93
|
+
optional :target_concurrent_requests, :int32, 2
|
|
94
|
+
end
|
|
95
|
+
add_message "google.appengine.v1.DiskUtilization" do
|
|
96
|
+
optional :target_write_bytes_per_second, :int32, 14
|
|
97
|
+
optional :target_write_ops_per_second, :int32, 15
|
|
98
|
+
optional :target_read_bytes_per_second, :int32, 16
|
|
99
|
+
optional :target_read_ops_per_second, :int32, 17
|
|
100
|
+
end
|
|
101
|
+
add_message "google.appengine.v1.NetworkUtilization" do
|
|
102
|
+
optional :target_sent_bytes_per_second, :int32, 1
|
|
103
|
+
optional :target_sent_packets_per_second, :int32, 11
|
|
104
|
+
optional :target_received_bytes_per_second, :int32, 12
|
|
105
|
+
optional :target_received_packets_per_second, :int32, 13
|
|
106
|
+
end
|
|
107
|
+
add_message "google.appengine.v1.StandardSchedulerSettings" do
|
|
108
|
+
optional :target_cpu_utilization, :double, 1
|
|
109
|
+
optional :target_throughput_utilization, :double, 2
|
|
110
|
+
optional :min_instances, :int32, 3
|
|
111
|
+
optional :max_instances, :int32, 4
|
|
112
|
+
end
|
|
113
|
+
add_message "google.appengine.v1.Network" do
|
|
114
|
+
repeated :forwarded_ports, :string, 1
|
|
115
|
+
optional :instance_tag, :string, 2
|
|
116
|
+
optional :name, :string, 3
|
|
117
|
+
optional :subnetwork_name, :string, 4
|
|
118
|
+
optional :session_affinity, :bool, 5
|
|
119
|
+
end
|
|
120
|
+
add_message "google.appengine.v1.Volume" do
|
|
121
|
+
optional :name, :string, 1
|
|
122
|
+
optional :volume_type, :string, 2
|
|
123
|
+
optional :size_gb, :double, 3
|
|
124
|
+
end
|
|
125
|
+
add_message "google.appengine.v1.Resources" do
|
|
126
|
+
optional :cpu, :double, 1
|
|
127
|
+
optional :disk_gb, :double, 2
|
|
128
|
+
optional :memory_gb, :double, 3
|
|
129
|
+
repeated :volumes, :message, 4, "google.appengine.v1.Volume"
|
|
130
|
+
end
|
|
131
|
+
add_message "google.appengine.v1.VpcAccessConnector" do
|
|
132
|
+
optional :name, :string, 1
|
|
133
|
+
end
|
|
134
|
+
add_message "google.appengine.v1.Entrypoint" do
|
|
135
|
+
oneof :command do
|
|
136
|
+
optional :shell, :string, 1
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
add_enum "google.appengine.v1.InboundServiceType" do
|
|
140
|
+
value :INBOUND_SERVICE_UNSPECIFIED, 0
|
|
141
|
+
value :INBOUND_SERVICE_MAIL, 1
|
|
142
|
+
value :INBOUND_SERVICE_MAIL_BOUNCE, 2
|
|
143
|
+
value :INBOUND_SERVICE_XMPP_ERROR, 3
|
|
144
|
+
value :INBOUND_SERVICE_XMPP_MESSAGE, 4
|
|
145
|
+
value :INBOUND_SERVICE_XMPP_SUBSCRIBE, 5
|
|
146
|
+
value :INBOUND_SERVICE_XMPP_PRESENCE, 6
|
|
147
|
+
value :INBOUND_SERVICE_CHANNEL_PRESENCE, 7
|
|
148
|
+
value :INBOUND_SERVICE_WARMUP, 9
|
|
149
|
+
end
|
|
150
|
+
add_enum "google.appengine.v1.ServingStatus" do
|
|
151
|
+
value :SERVING_STATUS_UNSPECIFIED, 0
|
|
152
|
+
value :SERVING, 1
|
|
153
|
+
value :STOPPED, 2
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
module Google
|
|
159
|
+
module Cloud
|
|
160
|
+
module AppEngine
|
|
161
|
+
module V1
|
|
162
|
+
Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Version").msgclass
|
|
163
|
+
EndpointsApiService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.EndpointsApiService").msgclass
|
|
164
|
+
EndpointsApiService::RolloutStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.EndpointsApiService.RolloutStrategy").enummodule
|
|
165
|
+
AutomaticScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.AutomaticScaling").msgclass
|
|
166
|
+
BasicScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.BasicScaling").msgclass
|
|
167
|
+
ManualScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ManualScaling").msgclass
|
|
168
|
+
CpuUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.CpuUtilization").msgclass
|
|
169
|
+
RequestUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.RequestUtilization").msgclass
|
|
170
|
+
DiskUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.DiskUtilization").msgclass
|
|
171
|
+
NetworkUtilization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.NetworkUtilization").msgclass
|
|
172
|
+
StandardSchedulerSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.StandardSchedulerSettings").msgclass
|
|
173
|
+
Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Network").msgclass
|
|
174
|
+
Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Volume").msgclass
|
|
175
|
+
Resources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Resources").msgclass
|
|
176
|
+
VpcAccessConnector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.VpcAccessConnector").msgclass
|
|
177
|
+
Entrypoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.Entrypoint").msgclass
|
|
178
|
+
InboundServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.InboundServiceType").enummodule
|
|
179
|
+
ServingStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.appengine.v1.ServingStatus").enummodule
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2021 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "google/cloud/app_engine/v1/applications"
|
|
20
|
+
require "google/cloud/app_engine/v1/services"
|
|
21
|
+
require "google/cloud/app_engine/v1/versions"
|
|
22
|
+
require "google/cloud/app_engine/v1/instances"
|
|
23
|
+
require "google/cloud/app_engine/v1/firewall"
|
|
24
|
+
require "google/cloud/app_engine/v1/authorized_domains"
|
|
25
|
+
require "google/cloud/app_engine/v1/authorized_certificates"
|
|
26
|
+
require "google/cloud/app_engine/v1/domain_mappings"
|
|
27
|
+
require "google/cloud/app_engine/v1/version"
|
|
28
|
+
|
|
29
|
+
module Google
|
|
30
|
+
module Cloud
|
|
31
|
+
module AppEngine
|
|
32
|
+
##
|
|
33
|
+
# To load this package, including all its services, and instantiate a client:
|
|
34
|
+
#
|
|
35
|
+
# require "google/cloud/app_engine/v1"
|
|
36
|
+
# client = ::Google::Cloud::AppEngine::V1::Applications::Client.new
|
|
37
|
+
#
|
|
38
|
+
module V1
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
helper_path = ::File.join __dir__, "v1", "_helpers.rb"
|
|
45
|
+
require "google/cloud/app_engine/v1/_helpers" if ::File.file? helper_path
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2021 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "gapic/common"
|
|
20
|
+
require "gapic/config"
|
|
21
|
+
require "gapic/config/method"
|
|
22
|
+
|
|
23
|
+
require "google/cloud/app_engine/v1/version"
|
|
24
|
+
|
|
25
|
+
require "google/cloud/app_engine/v1/applications/credentials"
|
|
26
|
+
require "google/cloud/app_engine/v1/applications/operations"
|
|
27
|
+
require "google/cloud/app_engine/v1/applications/client"
|
|
28
|
+
|
|
29
|
+
module Google
|
|
30
|
+
module Cloud
|
|
31
|
+
module AppEngine
|
|
32
|
+
module V1
|
|
33
|
+
##
|
|
34
|
+
# Manages App Engine applications.
|
|
35
|
+
#
|
|
36
|
+
# To load this service and instantiate a client:
|
|
37
|
+
#
|
|
38
|
+
# require "google/cloud/app_engine/v1/applications"
|
|
39
|
+
# client = ::Google::Cloud::AppEngine::V1::Applications::Client.new
|
|
40
|
+
#
|
|
41
|
+
module Applications
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
helper_path = ::File.join __dir__, "applications", "helpers.rb"
|
|
49
|
+
require "google/cloud/app_engine/v1/applications/helpers" if ::File.file? helper_path
|
|
@@ -0,0 +1,624 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2021 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "google/cloud/errors"
|
|
20
|
+
require "google/appengine/v1/appengine_pb"
|
|
21
|
+
|
|
22
|
+
module Google
|
|
23
|
+
module Cloud
|
|
24
|
+
module AppEngine
|
|
25
|
+
module V1
|
|
26
|
+
module Applications
|
|
27
|
+
##
|
|
28
|
+
# Client for the Applications service.
|
|
29
|
+
#
|
|
30
|
+
# Manages App Engine applications.
|
|
31
|
+
#
|
|
32
|
+
class Client
|
|
33
|
+
# @private
|
|
34
|
+
attr_reader :applications_stub
|
|
35
|
+
|
|
36
|
+
##
|
|
37
|
+
# Configure the Applications Client class.
|
|
38
|
+
#
|
|
39
|
+
# See {::Google::Cloud::AppEngine::V1::Applications::Client::Configuration}
|
|
40
|
+
# for a description of the configuration fields.
|
|
41
|
+
#
|
|
42
|
+
# ## Example
|
|
43
|
+
#
|
|
44
|
+
# To modify the configuration for all Applications clients:
|
|
45
|
+
#
|
|
46
|
+
# ::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config|
|
|
47
|
+
# config.timeout = 10.0
|
|
48
|
+
# end
|
|
49
|
+
#
|
|
50
|
+
# @yield [config] Configure the Client client.
|
|
51
|
+
# @yieldparam config [Client::Configuration]
|
|
52
|
+
#
|
|
53
|
+
# @return [Client::Configuration]
|
|
54
|
+
#
|
|
55
|
+
def self.configure
|
|
56
|
+
@configure ||= begin
|
|
57
|
+
namespace = ["Google", "Cloud", "AppEngine", "V1"]
|
|
58
|
+
parent_config = while namespace.any?
|
|
59
|
+
parent_name = namespace.join "::"
|
|
60
|
+
parent_const = const_get parent_name
|
|
61
|
+
break parent_const.configure if parent_const&.respond_to? :configure
|
|
62
|
+
namespace.pop
|
|
63
|
+
end
|
|
64
|
+
default_config = Client::Configuration.new parent_config
|
|
65
|
+
|
|
66
|
+
default_config
|
|
67
|
+
end
|
|
68
|
+
yield @configure if block_given?
|
|
69
|
+
@configure
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
##
|
|
73
|
+
# Configure the Applications Client instance.
|
|
74
|
+
#
|
|
75
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
76
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
77
|
+
# should be made on {Client.configure}.
|
|
78
|
+
#
|
|
79
|
+
# See {::Google::Cloud::AppEngine::V1::Applications::Client::Configuration}
|
|
80
|
+
# for a description of the configuration fields.
|
|
81
|
+
#
|
|
82
|
+
# @yield [config] Configure the Client client.
|
|
83
|
+
# @yieldparam config [Client::Configuration]
|
|
84
|
+
#
|
|
85
|
+
# @return [Client::Configuration]
|
|
86
|
+
#
|
|
87
|
+
def configure
|
|
88
|
+
yield @config if block_given?
|
|
89
|
+
@config
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
##
|
|
93
|
+
# Create a new Applications client object.
|
|
94
|
+
#
|
|
95
|
+
# ## Examples
|
|
96
|
+
#
|
|
97
|
+
# To create a new Applications client with the default
|
|
98
|
+
# configuration:
|
|
99
|
+
#
|
|
100
|
+
# client = ::Google::Cloud::AppEngine::V1::Applications::Client.new
|
|
101
|
+
#
|
|
102
|
+
# To create a new Applications client with a custom
|
|
103
|
+
# configuration:
|
|
104
|
+
#
|
|
105
|
+
# client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config|
|
|
106
|
+
# config.timeout = 10.0
|
|
107
|
+
# end
|
|
108
|
+
#
|
|
109
|
+
# @yield [config] Configure the Applications client.
|
|
110
|
+
# @yieldparam config [Client::Configuration]
|
|
111
|
+
#
|
|
112
|
+
def initialize
|
|
113
|
+
# These require statements are intentionally placed here to initialize
|
|
114
|
+
# the gRPC module only when it's required.
|
|
115
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
|
116
|
+
require "gapic/grpc"
|
|
117
|
+
require "google/appengine/v1/appengine_services_pb"
|
|
118
|
+
|
|
119
|
+
# Create the configuration object
|
|
120
|
+
@config = Configuration.new Client.configure
|
|
121
|
+
|
|
122
|
+
# Yield the configuration if needed
|
|
123
|
+
yield @config if block_given?
|
|
124
|
+
|
|
125
|
+
# Create credentials
|
|
126
|
+
credentials = @config.credentials
|
|
127
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
|
128
|
+
# but only if the default endpoint does not have a region prefix.
|
|
129
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
|
130
|
+
@config.endpoint == Client.configure.endpoint &&
|
|
131
|
+
!@config.endpoint.split(".").first.include?("-")
|
|
132
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
133
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
134
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
|
135
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
136
|
+
end
|
|
137
|
+
@quota_project_id = @config.quota_project
|
|
138
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
139
|
+
|
|
140
|
+
@operations_client = Operations.new do |config|
|
|
141
|
+
config.credentials = credentials
|
|
142
|
+
config.endpoint = @config.endpoint
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@applications_stub = ::Gapic::ServiceStub.new(
|
|
146
|
+
::Google::Cloud::AppEngine::V1::Applications::Stub,
|
|
147
|
+
credentials: credentials,
|
|
148
|
+
endpoint: @config.endpoint,
|
|
149
|
+
channel_args: @config.channel_args,
|
|
150
|
+
interceptors: @config.interceptors
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
##
|
|
155
|
+
# Get the associated client for long-running operations.
|
|
156
|
+
#
|
|
157
|
+
# @return [::Google::Cloud::AppEngine::V1::Applications::Operations]
|
|
158
|
+
#
|
|
159
|
+
attr_reader :operations_client
|
|
160
|
+
|
|
161
|
+
# Service calls
|
|
162
|
+
|
|
163
|
+
##
|
|
164
|
+
# Gets information about an application.
|
|
165
|
+
#
|
|
166
|
+
# @overload get_application(request, options = nil)
|
|
167
|
+
# Pass arguments to `get_application` via a request object, either of type
|
|
168
|
+
# {::Google::Cloud::AppEngine::V1::GetApplicationRequest} or an equivalent Hash.
|
|
169
|
+
#
|
|
170
|
+
# @param request [::Google::Cloud::AppEngine::V1::GetApplicationRequest, ::Hash]
|
|
171
|
+
# A request object representing the call parameters. Required. To specify no
|
|
172
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
173
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
174
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
175
|
+
#
|
|
176
|
+
# @overload get_application(name: nil)
|
|
177
|
+
# Pass arguments to `get_application` via keyword arguments. Note that at
|
|
178
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
179
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
180
|
+
#
|
|
181
|
+
# @param name [::String]
|
|
182
|
+
# Name of the Application resource to get. Example: `apps/myapp`.
|
|
183
|
+
#
|
|
184
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
185
|
+
# @yieldparam response [::Google::Cloud::AppEngine::V1::Application]
|
|
186
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
187
|
+
#
|
|
188
|
+
# @return [::Google::Cloud::AppEngine::V1::Application]
|
|
189
|
+
#
|
|
190
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
191
|
+
#
|
|
192
|
+
def get_application request, options = nil
|
|
193
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
194
|
+
|
|
195
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetApplicationRequest
|
|
196
|
+
|
|
197
|
+
# Converts hash and nil to an options object
|
|
198
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
199
|
+
|
|
200
|
+
# Customize the options with defaults
|
|
201
|
+
metadata = @config.rpcs.get_application.metadata.to_h
|
|
202
|
+
|
|
203
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
204
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
205
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
206
|
+
gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
|
|
207
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
208
|
+
|
|
209
|
+
header_params = {
|
|
210
|
+
"name" => request.name
|
|
211
|
+
}
|
|
212
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
213
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
214
|
+
|
|
215
|
+
options.apply_defaults timeout: @config.rpcs.get_application.timeout,
|
|
216
|
+
metadata: metadata,
|
|
217
|
+
retry_policy: @config.rpcs.get_application.retry_policy
|
|
218
|
+
options.apply_defaults metadata: @config.metadata,
|
|
219
|
+
retry_policy: @config.retry_policy
|
|
220
|
+
|
|
221
|
+
@applications_stub.call_rpc :get_application, request, options: options do |response, operation|
|
|
222
|
+
yield response, operation if block_given?
|
|
223
|
+
return response
|
|
224
|
+
end
|
|
225
|
+
rescue ::GRPC::BadStatus => e
|
|
226
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
##
|
|
230
|
+
# Creates an App Engine application for a Google Cloud Platform project.
|
|
231
|
+
# Required fields:
|
|
232
|
+
#
|
|
233
|
+
# * `id` - The ID of the target Cloud Platform project.
|
|
234
|
+
# * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.
|
|
235
|
+
#
|
|
236
|
+
# For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/).
|
|
237
|
+
#
|
|
238
|
+
# @overload create_application(request, options = nil)
|
|
239
|
+
# Pass arguments to `create_application` via a request object, either of type
|
|
240
|
+
# {::Google::Cloud::AppEngine::V1::CreateApplicationRequest} or an equivalent Hash.
|
|
241
|
+
#
|
|
242
|
+
# @param request [::Google::Cloud::AppEngine::V1::CreateApplicationRequest, ::Hash]
|
|
243
|
+
# A request object representing the call parameters. Required. To specify no
|
|
244
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
245
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
246
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
247
|
+
#
|
|
248
|
+
# @overload create_application(application: nil)
|
|
249
|
+
# Pass arguments to `create_application` via keyword arguments. Note that at
|
|
250
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
251
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
252
|
+
#
|
|
253
|
+
# @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash]
|
|
254
|
+
# Application configuration.
|
|
255
|
+
#
|
|
256
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
257
|
+
# @yieldparam response [::Gapic::Operation]
|
|
258
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
259
|
+
#
|
|
260
|
+
# @return [::Gapic::Operation]
|
|
261
|
+
#
|
|
262
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
263
|
+
#
|
|
264
|
+
def create_application request, options = nil
|
|
265
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
266
|
+
|
|
267
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateApplicationRequest
|
|
268
|
+
|
|
269
|
+
# Converts hash and nil to an options object
|
|
270
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
271
|
+
|
|
272
|
+
# Customize the options with defaults
|
|
273
|
+
metadata = @config.rpcs.create_application.metadata.to_h
|
|
274
|
+
|
|
275
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
276
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
277
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
278
|
+
gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
|
|
279
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
280
|
+
|
|
281
|
+
options.apply_defaults timeout: @config.rpcs.create_application.timeout,
|
|
282
|
+
metadata: metadata,
|
|
283
|
+
retry_policy: @config.rpcs.create_application.retry_policy
|
|
284
|
+
options.apply_defaults metadata: @config.metadata,
|
|
285
|
+
retry_policy: @config.retry_policy
|
|
286
|
+
|
|
287
|
+
@applications_stub.call_rpc :create_application, request, options: options do |response, operation|
|
|
288
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
289
|
+
yield response, operation if block_given?
|
|
290
|
+
return response
|
|
291
|
+
end
|
|
292
|
+
rescue ::GRPC::BadStatus => e
|
|
293
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
##
|
|
297
|
+
# Updates the specified Application resource.
|
|
298
|
+
# You can update the following fields:
|
|
299
|
+
#
|
|
300
|
+
# * `auth_domain` - Google authentication domain for controlling user access to the application.
|
|
301
|
+
# * `default_cookie_expiration` - Cookie expiration policy for the application.
|
|
302
|
+
#
|
|
303
|
+
# @overload update_application(request, options = nil)
|
|
304
|
+
# Pass arguments to `update_application` via a request object, either of type
|
|
305
|
+
# {::Google::Cloud::AppEngine::V1::UpdateApplicationRequest} or an equivalent Hash.
|
|
306
|
+
#
|
|
307
|
+
# @param request [::Google::Cloud::AppEngine::V1::UpdateApplicationRequest, ::Hash]
|
|
308
|
+
# A request object representing the call parameters. Required. To specify no
|
|
309
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
310
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
311
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
312
|
+
#
|
|
313
|
+
# @overload update_application(name: nil, application: nil, update_mask: nil)
|
|
314
|
+
# Pass arguments to `update_application` via keyword arguments. Note that at
|
|
315
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
316
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
317
|
+
#
|
|
318
|
+
# @param name [::String]
|
|
319
|
+
# Name of the Application resource to update. Example: `apps/myapp`.
|
|
320
|
+
# @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash]
|
|
321
|
+
# An Application containing the updated resource.
|
|
322
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
323
|
+
# Standard field mask for the set of fields to be updated.
|
|
324
|
+
#
|
|
325
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
326
|
+
# @yieldparam response [::Gapic::Operation]
|
|
327
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
328
|
+
#
|
|
329
|
+
# @return [::Gapic::Operation]
|
|
330
|
+
#
|
|
331
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
332
|
+
#
|
|
333
|
+
def update_application request, options = nil
|
|
334
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
335
|
+
|
|
336
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest
|
|
337
|
+
|
|
338
|
+
# Converts hash and nil to an options object
|
|
339
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
340
|
+
|
|
341
|
+
# Customize the options with defaults
|
|
342
|
+
metadata = @config.rpcs.update_application.metadata.to_h
|
|
343
|
+
|
|
344
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
345
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
346
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
347
|
+
gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
|
|
348
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
349
|
+
|
|
350
|
+
header_params = {
|
|
351
|
+
"name" => request.name
|
|
352
|
+
}
|
|
353
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
354
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
355
|
+
|
|
356
|
+
options.apply_defaults timeout: @config.rpcs.update_application.timeout,
|
|
357
|
+
metadata: metadata,
|
|
358
|
+
retry_policy: @config.rpcs.update_application.retry_policy
|
|
359
|
+
options.apply_defaults metadata: @config.metadata,
|
|
360
|
+
retry_policy: @config.retry_policy
|
|
361
|
+
|
|
362
|
+
@applications_stub.call_rpc :update_application, request, options: options do |response, operation|
|
|
363
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
364
|
+
yield response, operation if block_given?
|
|
365
|
+
return response
|
|
366
|
+
end
|
|
367
|
+
rescue ::GRPC::BadStatus => e
|
|
368
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
##
|
|
372
|
+
# Recreates the required App Engine features for the specified App Engine
|
|
373
|
+
# application, for example a Cloud Storage bucket or App Engine service
|
|
374
|
+
# account.
|
|
375
|
+
# Use this method if you receive an error message about a missing feature,
|
|
376
|
+
# for example, *Error retrieving the App Engine service account*.
|
|
377
|
+
# If you have deleted your App Engine service account, this will
|
|
378
|
+
# not be able to recreate it. Instead, you should attempt to use the
|
|
379
|
+
# IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D .
|
|
380
|
+
# If the deletion was recent, the numeric ID can be found in the Cloud
|
|
381
|
+
# Console Activity Log.
|
|
382
|
+
#
|
|
383
|
+
# @overload repair_application(request, options = nil)
|
|
384
|
+
# Pass arguments to `repair_application` via a request object, either of type
|
|
385
|
+
# {::Google::Cloud::AppEngine::V1::RepairApplicationRequest} or an equivalent Hash.
|
|
386
|
+
#
|
|
387
|
+
# @param request [::Google::Cloud::AppEngine::V1::RepairApplicationRequest, ::Hash]
|
|
388
|
+
# A request object representing the call parameters. Required. To specify no
|
|
389
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
390
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
391
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
392
|
+
#
|
|
393
|
+
# @overload repair_application(name: nil)
|
|
394
|
+
# Pass arguments to `repair_application` via keyword arguments. Note that at
|
|
395
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
396
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
397
|
+
#
|
|
398
|
+
# @param name [::String]
|
|
399
|
+
# Name of the application to repair. Example: `apps/myapp`
|
|
400
|
+
#
|
|
401
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
402
|
+
# @yieldparam response [::Gapic::Operation]
|
|
403
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
404
|
+
#
|
|
405
|
+
# @return [::Gapic::Operation]
|
|
406
|
+
#
|
|
407
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
408
|
+
#
|
|
409
|
+
def repair_application request, options = nil
|
|
410
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
411
|
+
|
|
412
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::RepairApplicationRequest
|
|
413
|
+
|
|
414
|
+
# Converts hash and nil to an options object
|
|
415
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
416
|
+
|
|
417
|
+
# Customize the options with defaults
|
|
418
|
+
metadata = @config.rpcs.repair_application.metadata.to_h
|
|
419
|
+
|
|
420
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
421
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
422
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
423
|
+
gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
|
|
424
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
425
|
+
|
|
426
|
+
header_params = {
|
|
427
|
+
"name" => request.name
|
|
428
|
+
}
|
|
429
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
430
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
431
|
+
|
|
432
|
+
options.apply_defaults timeout: @config.rpcs.repair_application.timeout,
|
|
433
|
+
metadata: metadata,
|
|
434
|
+
retry_policy: @config.rpcs.repair_application.retry_policy
|
|
435
|
+
options.apply_defaults metadata: @config.metadata,
|
|
436
|
+
retry_policy: @config.retry_policy
|
|
437
|
+
|
|
438
|
+
@applications_stub.call_rpc :repair_application, request, options: options do |response, operation|
|
|
439
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
440
|
+
yield response, operation if block_given?
|
|
441
|
+
return response
|
|
442
|
+
end
|
|
443
|
+
rescue ::GRPC::BadStatus => e
|
|
444
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
##
|
|
448
|
+
# Configuration class for the Applications API.
|
|
449
|
+
#
|
|
450
|
+
# This class represents the configuration for Applications,
|
|
451
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
452
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
453
|
+
# applied individually to specific RPCs. See
|
|
454
|
+
# {::Google::Cloud::AppEngine::V1::Applications::Client::Configuration::Rpcs}
|
|
455
|
+
# for a list of RPCs that can be configured independently.
|
|
456
|
+
#
|
|
457
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
458
|
+
# on construction.
|
|
459
|
+
#
|
|
460
|
+
# # Examples
|
|
461
|
+
#
|
|
462
|
+
# To modify the global config, setting the timeout for get_application
|
|
463
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
|
464
|
+
#
|
|
465
|
+
# ::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config|
|
|
466
|
+
# config.timeout = 10.0
|
|
467
|
+
# config.rpcs.get_application.timeout = 20.0
|
|
468
|
+
# end
|
|
469
|
+
#
|
|
470
|
+
# To apply the above configuration only to a new client:
|
|
471
|
+
#
|
|
472
|
+
# client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config|
|
|
473
|
+
# config.timeout = 10.0
|
|
474
|
+
# config.rpcs.get_application.timeout = 20.0
|
|
475
|
+
# end
|
|
476
|
+
#
|
|
477
|
+
# @!attribute [rw] endpoint
|
|
478
|
+
# The hostname or hostname:port of the service endpoint.
|
|
479
|
+
# Defaults to `"appengine.googleapis.com"`.
|
|
480
|
+
# @return [::String]
|
|
481
|
+
# @!attribute [rw] credentials
|
|
482
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
483
|
+
# * (`String`) The path to a service account key file in JSON format
|
|
484
|
+
# * (`Hash`) A service account key as a Hash
|
|
485
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
486
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
|
487
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
488
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
|
489
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
490
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
491
|
+
# * (`nil`) indicating no credentials
|
|
492
|
+
# @return [::Object]
|
|
493
|
+
# @!attribute [rw] scope
|
|
494
|
+
# The OAuth scopes
|
|
495
|
+
# @return [::Array<::String>]
|
|
496
|
+
# @!attribute [rw] lib_name
|
|
497
|
+
# The library name as recorded in instrumentation and logging
|
|
498
|
+
# @return [::String]
|
|
499
|
+
# @!attribute [rw] lib_version
|
|
500
|
+
# The library version as recorded in instrumentation and logging
|
|
501
|
+
# @return [::String]
|
|
502
|
+
# @!attribute [rw] channel_args
|
|
503
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
|
504
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
|
505
|
+
# @return [::Hash]
|
|
506
|
+
# @!attribute [rw] interceptors
|
|
507
|
+
# An array of interceptors that are run before calls are executed.
|
|
508
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
|
509
|
+
# @!attribute [rw] timeout
|
|
510
|
+
# The call timeout in seconds.
|
|
511
|
+
# @return [::Numeric]
|
|
512
|
+
# @!attribute [rw] metadata
|
|
513
|
+
# Additional gRPC headers to be sent with the call.
|
|
514
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
515
|
+
# @!attribute [rw] retry_policy
|
|
516
|
+
# The retry policy. The value is a hash with the following keys:
|
|
517
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
518
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
519
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
520
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
521
|
+
# trigger a retry.
|
|
522
|
+
# @return [::Hash]
|
|
523
|
+
# @!attribute [rw] quota_project
|
|
524
|
+
# A separate project against which to charge quota.
|
|
525
|
+
# @return [::String]
|
|
526
|
+
#
|
|
527
|
+
class Configuration
|
|
528
|
+
extend ::Gapic::Config
|
|
529
|
+
|
|
530
|
+
config_attr :endpoint, "appengine.googleapis.com", ::String
|
|
531
|
+
config_attr :credentials, nil do |value|
|
|
532
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
533
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
|
534
|
+
allowed.any? { |klass| klass === value }
|
|
535
|
+
end
|
|
536
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
537
|
+
config_attr :lib_name, nil, ::String, nil
|
|
538
|
+
config_attr :lib_version, nil, ::String, nil
|
|
539
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
|
540
|
+
config_attr :interceptors, nil, ::Array, nil
|
|
541
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
542
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
543
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
544
|
+
config_attr :quota_project, nil, ::String, nil
|
|
545
|
+
|
|
546
|
+
# @private
|
|
547
|
+
def initialize parent_config = nil
|
|
548
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
549
|
+
|
|
550
|
+
yield self if block_given?
|
|
551
|
+
end
|
|
552
|
+
|
|
553
|
+
##
|
|
554
|
+
# Configurations for individual RPCs
|
|
555
|
+
# @return [Rpcs]
|
|
556
|
+
#
|
|
557
|
+
def rpcs
|
|
558
|
+
@rpcs ||= begin
|
|
559
|
+
parent_rpcs = nil
|
|
560
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
|
561
|
+
Rpcs.new parent_rpcs
|
|
562
|
+
end
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
##
|
|
566
|
+
# Configuration RPC class for the Applications API.
|
|
567
|
+
#
|
|
568
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
569
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
570
|
+
# the following configuration fields:
|
|
571
|
+
#
|
|
572
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
573
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
574
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
575
|
+
# include the following keys:
|
|
576
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
577
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
578
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
579
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
580
|
+
# trigger a retry.
|
|
581
|
+
#
|
|
582
|
+
class Rpcs
|
|
583
|
+
##
|
|
584
|
+
# RPC-specific configuration for `get_application`
|
|
585
|
+
# @return [::Gapic::Config::Method]
|
|
586
|
+
#
|
|
587
|
+
attr_reader :get_application
|
|
588
|
+
##
|
|
589
|
+
# RPC-specific configuration for `create_application`
|
|
590
|
+
# @return [::Gapic::Config::Method]
|
|
591
|
+
#
|
|
592
|
+
attr_reader :create_application
|
|
593
|
+
##
|
|
594
|
+
# RPC-specific configuration for `update_application`
|
|
595
|
+
# @return [::Gapic::Config::Method]
|
|
596
|
+
#
|
|
597
|
+
attr_reader :update_application
|
|
598
|
+
##
|
|
599
|
+
# RPC-specific configuration for `repair_application`
|
|
600
|
+
# @return [::Gapic::Config::Method]
|
|
601
|
+
#
|
|
602
|
+
attr_reader :repair_application
|
|
603
|
+
|
|
604
|
+
# @private
|
|
605
|
+
def initialize parent_rpcs = nil
|
|
606
|
+
get_application_config = parent_rpcs&.get_application if parent_rpcs&.respond_to? :get_application
|
|
607
|
+
@get_application = ::Gapic::Config::Method.new get_application_config
|
|
608
|
+
create_application_config = parent_rpcs&.create_application if parent_rpcs&.respond_to? :create_application
|
|
609
|
+
@create_application = ::Gapic::Config::Method.new create_application_config
|
|
610
|
+
update_application_config = parent_rpcs&.update_application if parent_rpcs&.respond_to? :update_application
|
|
611
|
+
@update_application = ::Gapic::Config::Method.new update_application_config
|
|
612
|
+
repair_application_config = parent_rpcs&.repair_application if parent_rpcs&.respond_to? :repair_application
|
|
613
|
+
@repair_application = ::Gapic::Config::Method.new repair_application_config
|
|
614
|
+
|
|
615
|
+
yield self if block_given?
|
|
616
|
+
end
|
|
617
|
+
end
|
|
618
|
+
end
|
|
619
|
+
end
|
|
620
|
+
end
|
|
621
|
+
end
|
|
622
|
+
end
|
|
623
|
+
end
|
|
624
|
+
end
|