Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / appengine / v1 / version.proto
1 // Copyright 2016 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.appengine.v1;
18
19 import "google/api/annotations.proto";
20 import "google/appengine/v1/app_yaml.proto";
21 import "google/appengine/v1/deploy.proto";
22 import "google/protobuf/duration.proto";
23 import "google/protobuf/timestamp.proto";
24
25 option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
26 option java_multiple_files = true;
27 option java_outer_classname = "VersionProto";
28 option java_package = "com.google.appengine.v1";
29
30 // A Version resource is a specific set of source code and configuration files
31 // that are deployed into a service.
32 message Version {
33   // Full path to the Version resource in the API.  Example:
34   // `apps/myapp/services/default/versions/v1`.
35   //
36   // @OutputOnly
37   string name = 1;
38
39   // Relative name of the version within the service.  Example: `v1`.
40   // Version names can contain only lowercase letters, numbers, or hyphens.
41   // Reserved names: "default", "latest", and any name with the prefix "ah-".
42   string id = 2;
43
44   // Controls how instances are created.
45   //
46   // Defaults to `AutomaticScaling`.
47   oneof scaling {
48     // Automatic scaling is based on request rate, response latencies, and other
49     // application metrics.
50     AutomaticScaling automatic_scaling = 3;
51
52     // A service with basic scaling will create an instance when the application
53     // receives a request. The instance will be turned down when the app becomes
54     // idle. Basic scaling is ideal for work that is intermittent or driven by
55     // user activity.
56     BasicScaling basic_scaling = 4;
57
58     // A service with manual scaling runs continuously, allowing you to perform
59     // complex initialization and rely on the state of its memory over time.
60     ManualScaling manual_scaling = 5;
61   }
62
63   // Before an application can receive email or XMPP messages, the application
64   // must be configured to enable the service.
65   repeated InboundServiceType inbound_services = 6;
66
67   // Instance class that is used to run this version. Valid values are:
68   // * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
69   // * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
70   //
71   // Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
72   // BasicScaling.
73   string instance_class = 7;
74
75   // Extra network settings. Only applicable for VM runtimes.
76   Network network = 8;
77
78   // Machine resources for this version. Only applicable for VM runtimes.
79   Resources resources = 9;
80
81   // Desired runtime. Example: `python27`.
82   string runtime = 10;
83
84   // Whether multiple requests can be dispatched to this version at once.
85   bool threadsafe = 11;
86
87   // Whether to deploy this version in a container on a virtual machine.
88   bool vm = 12;
89
90   // Metadata settings that are supplied to this version to enable
91   // beta runtime features.
92   map<string, string> beta_settings = 13;
93
94   // App Engine execution environment for this version.
95   //
96   // Defaults to `standard`.
97   string env = 14;
98
99   // Current serving status of this version. Only the versions with a
100   // `SERVING` status create instances and can be billed.
101   //
102   // `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
103   ServingStatus serving_status = 15;
104
105   // Email address of the user who created this version.
106   //
107   // @OutputOnly
108   string created_by = 16;
109
110   // Time that this version was created.
111   //
112   // @OutputOnly
113   google.protobuf.Timestamp create_time = 17;
114
115   // Total size in bytes of all the files that are included in this version
116   // and curerntly hosted on the App Engine disk.
117   //
118   // @OutputOnly
119   int64 disk_usage_bytes = 18;
120
121   // An ordered list of URL-matching patterns that should be applied to incoming
122   // requests. The first matching URL handles the request and other request
123   // handlers are not attempted.
124   //
125   // Only returned in `GET` requests if `view=FULL` is set.
126   repeated UrlMap handlers = 100;
127
128   // Custom static error pages. Limited to 10KB per page.
129   //
130   // Only returned in `GET` requests if `view=FULL` is set.
131   repeated ErrorHandler error_handlers = 101;
132
133   // Configuration for third-party Python runtime libraries that are required
134   // by the application.
135   //
136   // Only returned in `GET` requests if `view=FULL` is set.
137   repeated Library libraries = 102;
138
139   // Serving configuration for
140   // [Google Cloud
141   // Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
142   //
143   // Only returned in `GET` requests if `view=FULL` is set.
144   ApiConfigHandler api_config = 103;
145
146   // Environment variables available to the application.
147   //
148   // Only returned in `GET` requests if `view=FULL` is set.
149   map<string, string> env_variables = 104;
150
151   // Duration that static files should be cached by web proxies and browsers.
152   // Only applicable if the corresponding
153   // [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler)
154   // does not specify its own expiration time.
155   //
156   // Only returned in `GET` requests if `view=FULL` is set.
157   google.protobuf.Duration default_expiration = 105;
158
159   // Configures health checking for VM instances. Unhealthy instances are
160   // stopped and replaced with new instances. Only applicable for VM
161   // runtimes.
162   //
163   // Only returned in `GET` requests if `view=FULL` is set.
164   HealthCheck health_check = 106;
165
166   // Files that match this pattern will not be built into this version.
167   // Only applicable for Go runtimes.
168   //
169   // Only returned in `GET` requests if `view=FULL` is set.
170   string nobuild_files_regex = 107;
171
172   // Code and application artifacts that make up this version.
173   //
174   // Only returned in `GET` requests if `view=FULL` is set.
175   Deployment deployment = 108;
176
177   // Serving URL for this version. Example:
178   // "https://myversion-dot-myservice-dot-myapp.appspot.com"
179   //
180   // @OutputOnly
181   string version_url = 109;
182 }
183
184 // Automatic scaling is based on request rate, response latencies, and other
185 // application metrics.
186 message AutomaticScaling {
187   // Amount of time that the
188   // [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
189   // should wait between changes to the number of virtual machines.
190   // Only applicable for VM runtimes.
191   google.protobuf.Duration cool_down_period = 1;
192
193   // Target scaling by CPU usage.
194   CpuUtilization cpu_utilization = 2;
195
196   // Number of concurrent requests an automatic scaling instance can accept
197   // before the scheduler spawns a new instance.
198   //
199   // Defaults to a runtime-specific value.
200   int32 max_concurrent_requests = 3;
201
202   // Maximum number of idle instances that should be maintained for this
203   // version.
204   int32 max_idle_instances = 4;
205
206   // Maximum number of instances that should be started to handle requests.
207   int32 max_total_instances = 5;
208
209   // Maximum amount of time that a request should wait in the pending queue
210   // before starting a new instance to handle it.
211   google.protobuf.Duration max_pending_latency = 6;
212
213   // Minimum number of idle instances that should be maintained for
214   // this version. Only applicable for the default version of a service.
215   int32 min_idle_instances = 7;
216
217   // Minimum number of instances that should be maintained for this version.
218   int32 min_total_instances = 8;
219
220   // Minimum amount of time a request should wait in the pending queue before
221   // starting a new instance to handle it.
222   google.protobuf.Duration min_pending_latency = 9;
223
224   // Target scaling by request utilization.
225   RequestUtilization request_utilization = 10;
226
227   // Target scaling by disk usage.
228   DiskUtilization disk_utilization = 11;
229
230   // Target scaling by network usage.
231   NetworkUtilization network_utilization = 12;
232 }
233
234 // A service with basic scaling will create an instance when the application
235 // receives a request. The instance will be turned down when the app becomes
236 // idle. Basic scaling is ideal for work that is intermittent or driven by
237 // user activity.
238 message BasicScaling {
239   // Duration of time after the last request that an instance must wait before
240   // the instance is shut down.
241   google.protobuf.Duration idle_timeout = 1;
242
243   // Maximum number of instances to create for this version.
244   int32 max_instances = 2;
245 }
246
247 // A service with manual scaling runs continuously, allowing you to perform
248 // complex initialization and rely on the state of its memory over time.
249 message ManualScaling {
250   // Number of instances to assign to the service at the start. This number
251   // can later be altered by using the
252   // [Modules
253   // API](https://cloud.google.com/appengine/docs/python/modules/functions)
254   // `set_num_instances()` function.
255   int32 instances = 1;
256 }
257
258 // Target scaling by CPU usage.
259 message CpuUtilization {
260   // Period of time over which CPU utilization is calculated.
261   google.protobuf.Duration aggregation_window_length = 1;
262
263   // Target CPU utilization ratio to maintain when scaling. Must be between 0
264   // and 1.
265   double target_utilization = 2;
266 }
267
268 // Target scaling by request utilization. Only applicable for VM runtimes.
269 message RequestUtilization {
270   // Target requests per second.
271   int32 target_request_count_per_second = 1;
272
273   // Target number of concurrent requests.
274   int32 target_concurrent_requests = 2;
275 }
276
277 // Target scaling by disk usage. Only applicable for VM runtimes.
278 message DiskUtilization {
279   // Target bytes written per second.
280   int32 target_write_bytes_per_second = 14;
281
282   // Target ops written per second.
283   int32 target_write_ops_per_second = 15;
284
285   // Target bytes read per second.
286   int32 target_read_bytes_per_second = 16;
287
288   // Target ops read per seconds.
289   int32 target_read_ops_per_second = 17;
290 }
291
292 // Target scaling by network usage. Only applicable for VM runtimes.
293 message NetworkUtilization {
294   // Target bytes sent per second.
295   int32 target_sent_bytes_per_second = 1;
296
297   // Target packets sent per second.
298   int32 target_sent_packets_per_second = 11;
299
300   // Target bytes received per second.
301   int32 target_received_bytes_per_second = 12;
302
303   // Target packets received per second.
304   int32 target_received_packets_per_second = 13;
305 }
306
307 // Extra network settings. Only applicable for VM runtimes.
308 message Network {
309   // List of ports, or port pairs, to forward from the virtual machine to the
310   // application container.
311   repeated string forwarded_ports = 1;
312
313   // Tag to apply to the VM instance during creation.
314   string instance_tag = 2;
315
316   // Google Cloud Platform network where the virtual machines are created.
317   // Specify the short name, not the resource path.
318   //
319   // Defaults to `default`.
320   string name = 3;
321 }
322
323 // Machine resources for a version.
324 message Resources {
325   // Number of CPU cores needed.
326   double cpu = 1;
327
328   // Disk size (GB) needed.
329   double disk_gb = 2;
330
331   // Memory (GB) needed.
332   double memory_gb = 3;
333 }
334
335 // Available inbound services.
336 enum InboundServiceType {
337   // Not specified.
338   INBOUND_SERVICE_UNSPECIFIED = 0;
339
340   // Allows an application to receive mail.
341   INBOUND_SERVICE_MAIL = 1;
342
343   // Allows an application to receive email-bound notifications.
344   INBOUND_SERVICE_MAIL_BOUNCE = 2;
345
346   // Allows an application to receive error stanzas.
347   INBOUND_SERVICE_XMPP_ERROR = 3;
348
349   // Allows an application to receive instant messages.
350   INBOUND_SERVICE_XMPP_MESSAGE = 4;
351
352   // Allows an application to receive user subscription POSTs.
353   INBOUND_SERVICE_XMPP_SUBSCRIBE = 5;
354
355   // Allows an application to receive a user's chat presence.
356   INBOUND_SERVICE_XMPP_PRESENCE = 6;
357
358   // Registers an application for notifications when a client connects or
359   // disconnects from a channel.
360   INBOUND_SERVICE_CHANNEL_PRESENCE = 7;
361
362   // Enables warmup requests.
363   INBOUND_SERVICE_WARMUP = 9;
364 }
365
366 // Run states of a version.
367 enum ServingStatus {
368   // Not specified.
369   SERVING_STATUS_UNSPECIFIED = 0;
370
371   // Currently serving. Instances are created according to the
372   // scaling settings of the version.
373   SERVING = 1;
374
375   // Disabled. No instances will be created and the scaling
376   // settings are ignored until the state of the version changes
377   // to `SERVING`.
378   STOPPED = 2;
379 }