You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

6075 lines
224 KiB

  1. // Copyright 2019 Google Inc. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package appengine provides access to the App Engine Admin API.
  6. //
  7. // See https://cloud.google.com/appengine/docs/admin-api/
  8. //
  9. // Usage example:
  10. //
  11. // import "google.golang.org/api/appengine/v1beta5"
  12. // ...
  13. // appengineService, err := appengine.New(oauthHttpClient)
  14. package appengine // import "google.golang.org/api/appengine/v1beta5"
  15. import (
  16. "bytes"
  17. "context"
  18. "encoding/json"
  19. "errors"
  20. "fmt"
  21. "io"
  22. "net/http"
  23. "net/url"
  24. "strconv"
  25. "strings"
  26. gensupport "google.golang.org/api/gensupport"
  27. googleapi "google.golang.org/api/googleapi"
  28. )
  29. // Always reference these packages, just in case the auto-generated code
  30. // below doesn't.
  31. var _ = bytes.NewBuffer
  32. var _ = strconv.Itoa
  33. var _ = fmt.Sprintf
  34. var _ = json.NewDecoder
  35. var _ = io.Copy
  36. var _ = url.Parse
  37. var _ = gensupport.MarshalJSON
  38. var _ = googleapi.Version
  39. var _ = errors.New
  40. var _ = strings.Replace
  41. var _ = context.Canceled
  42. const apiId = "appengine:v1beta5"
  43. const apiName = "appengine"
  44. const apiVersion = "v1beta5"
  45. const basePath = "https://appengine.googleapis.com/"
  46. // OAuth2 scopes used by this API.
  47. const (
  48. // View and manage your applications deployed on Google App Engine
  49. AppengineAdminScope = "https://www.googleapis.com/auth/appengine.admin"
  50. // View and manage your data across Google Cloud Platform services
  51. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  52. // View your data across Google Cloud Platform services
  53. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  54. )
  55. func New(client *http.Client) (*APIService, error) {
  56. if client == nil {
  57. return nil, errors.New("client is nil")
  58. }
  59. s := &APIService{client: client, BasePath: basePath}
  60. s.Apps = NewAppsService(s)
  61. return s, nil
  62. }
  63. type APIService struct {
  64. client *http.Client
  65. BasePath string // API endpoint base URL
  66. UserAgent string // optional additional User-Agent fragment
  67. Apps *AppsService
  68. }
  69. func (s *APIService) userAgent() string {
  70. if s.UserAgent == "" {
  71. return googleapi.UserAgent
  72. }
  73. return googleapi.UserAgent + " " + s.UserAgent
  74. }
  75. func NewAppsService(s *APIService) *AppsService {
  76. rs := &AppsService{s: s}
  77. rs.Locations = NewAppsLocationsService(s)
  78. rs.Operations = NewAppsOperationsService(s)
  79. rs.Services = NewAppsServicesService(s)
  80. return rs
  81. }
  82. type AppsService struct {
  83. s *APIService
  84. Locations *AppsLocationsService
  85. Operations *AppsOperationsService
  86. Services *AppsServicesService
  87. }
  88. func NewAppsLocationsService(s *APIService) *AppsLocationsService {
  89. rs := &AppsLocationsService{s: s}
  90. return rs
  91. }
  92. type AppsLocationsService struct {
  93. s *APIService
  94. }
  95. func NewAppsOperationsService(s *APIService) *AppsOperationsService {
  96. rs := &AppsOperationsService{s: s}
  97. return rs
  98. }
  99. type AppsOperationsService struct {
  100. s *APIService
  101. }
  102. func NewAppsServicesService(s *APIService) *AppsServicesService {
  103. rs := &AppsServicesService{s: s}
  104. rs.Versions = NewAppsServicesVersionsService(s)
  105. return rs
  106. }
  107. type AppsServicesService struct {
  108. s *APIService
  109. Versions *AppsServicesVersionsService
  110. }
  111. func NewAppsServicesVersionsService(s *APIService) *AppsServicesVersionsService {
  112. rs := &AppsServicesVersionsService{s: s}
  113. rs.Instances = NewAppsServicesVersionsInstancesService(s)
  114. return rs
  115. }
  116. type AppsServicesVersionsService struct {
  117. s *APIService
  118. Instances *AppsServicesVersionsInstancesService
  119. }
  120. func NewAppsServicesVersionsInstancesService(s *APIService) *AppsServicesVersionsInstancesService {
  121. rs := &AppsServicesVersionsInstancesService{s: s}
  122. return rs
  123. }
  124. type AppsServicesVersionsInstancesService struct {
  125. s *APIService
  126. }
  127. // ApiConfigHandler: Google Cloud Endpoints
  128. // (https://cloud.google.com/appengine/docs/python/endpoints/)
  129. // configuration for API handlers.
  130. type ApiConfigHandler struct {
  131. // AuthFailAction: Action to take when users access resources that
  132. // require authentication. Defaults to redirect.
  133. //
  134. // Possible values:
  135. // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified.
  136. // AUTH_FAIL_ACTION_REDIRECT is assumed.
  137. // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to
  138. // "accounts.google.com". The user is redirected back to the application
  139. // URL after signing in or creating an account.
  140. // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with an401 HTTP
  141. // status code and an error message.
  142. AuthFailAction string `json:"authFailAction,omitempty"`
  143. // Login: Level of login required to access this resource. Defaults to
  144. // optional.
  145. //
  146. // Possible values:
  147. // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed.
  148. // "LOGIN_OPTIONAL" - Does not require that the user is signed in.
  149. // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action
  150. // is taken. In addition, if the user is not an administrator for the
  151. // application, they are given an error message regardless of
  152. // auth_fail_action. If the user is an administrator, the handler
  153. // proceeds.
  154. // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds
  155. // normally. Otherwise, the action given in auth_fail_action is taken.
  156. Login string `json:"login,omitempty"`
  157. // Script: Path to the script from the application root directory.
  158. Script string `json:"script,omitempty"`
  159. // SecurityLevel: Security (HTTPS) enforcement for this URL.
  160. //
  161. // Possible values:
  162. // "SECURE_UNSPECIFIED" - Not specified.
  163. // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that
  164. // match the handler succeed without redirects. The application can
  165. // examine the request to determine which protocol was used, and respond
  166. // accordingly.
  167. // "SECURE_NEVER" - Requests for a URL that match this handler that
  168. // use HTTPS are automatically redirected to the HTTP equivalent URL.
  169. // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that
  170. // match the handler succeed without redirects. The application can
  171. // examine the request to determine which protocol was used and respond
  172. // accordingly.
  173. // "SECURE_ALWAYS" - Requests for a URL that match this handler that
  174. // do not use HTTPS are automatically redirected to the HTTPS URL with
  175. // the same path. Query parameters are reserved for the redirect.
  176. SecurityLevel string `json:"securityLevel,omitempty"`
  177. // Url: URL to serve the endpoint at.
  178. Url string `json:"url,omitempty"`
  179. // ForceSendFields is a list of field names (e.g. "AuthFailAction") to
  180. // unconditionally include in API requests. By default, fields with
  181. // empty values are omitted from API requests. However, any non-pointer,
  182. // non-interface field appearing in ForceSendFields will be sent to the
  183. // server regardless of whether the field is empty or not. This may be
  184. // used to include empty fields in Patch requests.
  185. ForceSendFields []string `json:"-"`
  186. // NullFields is a list of field names (e.g. "AuthFailAction") to
  187. // include in API requests with the JSON null value. By default, fields
  188. // with empty values are omitted from API requests. However, any field
  189. // with an empty value appearing in NullFields will be sent to the
  190. // server as null. It is an error if a field in this list has a
  191. // non-empty value. This may be used to include null fields in Patch
  192. // requests.
  193. NullFields []string `json:"-"`
  194. }
  195. func (s *ApiConfigHandler) MarshalJSON() ([]byte, error) {
  196. type NoMethod ApiConfigHandler
  197. raw := NoMethod(*s)
  198. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  199. }
  200. // ApiEndpointHandler: Uses Google Cloud Endpoints to handle requests.
  201. type ApiEndpointHandler struct {
  202. // ScriptPath: Path to the script from the application root directory.
  203. ScriptPath string `json:"scriptPath,omitempty"`
  204. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  205. // unconditionally include in API requests. By default, fields with
  206. // empty values are omitted from API requests. However, any non-pointer,
  207. // non-interface field appearing in ForceSendFields will be sent to the
  208. // server regardless of whether the field is empty or not. This may be
  209. // used to include empty fields in Patch requests.
  210. ForceSendFields []string `json:"-"`
  211. // NullFields is a list of field names (e.g. "ScriptPath") to include in
  212. // API requests with the JSON null value. By default, fields with empty
  213. // values are omitted from API requests. However, any field with an
  214. // empty value appearing in NullFields will be sent to the server as
  215. // null. It is an error if a field in this list has a non-empty value.
  216. // This may be used to include null fields in Patch requests.
  217. NullFields []string `json:"-"`
  218. }
  219. func (s *ApiEndpointHandler) MarshalJSON() ([]byte, error) {
  220. type NoMethod ApiEndpointHandler
  221. raw := NoMethod(*s)
  222. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  223. }
  224. // Application: An Application resource contains the top-level
  225. // configuration of an App Engine application.
  226. type Application struct {
  227. // AuthDomain: Google Apps authentication domain that controls which
  228. // users can access this application.Defaults to open access for any
  229. // Google Account.
  230. AuthDomain string `json:"authDomain,omitempty"`
  231. // CodeBucket: A Google Cloud Storage bucket that can be used for
  232. // storing files associated with this application. This bucket is
  233. // associated with the application and can be used by the gcloud
  234. // deployment commands.@OutputOnly
  235. CodeBucket string `json:"codeBucket,omitempty"`
  236. // DefaultBucket: A Google Cloud Storage bucket that can be used by the
  237. // application to store content.@OutputOnly
  238. DefaultBucket string `json:"defaultBucket,omitempty"`
  239. // DefaultCookieExpiration: Cookie expiration policy for this
  240. // application.
  241. DefaultCookieExpiration string `json:"defaultCookieExpiration,omitempty"`
  242. // DefaultHostname: Hostname used to reach the application, as resolved
  243. // by App Engine.@OutputOnly
  244. DefaultHostname string `json:"defaultHostname,omitempty"`
  245. // DispatchRules: HTTP path dispatch rules for requests to the
  246. // application that do not explicitly target a service or version. Rules
  247. // are order-dependent.@OutputOnly
  248. DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"`
  249. Iap *IdentityAwareProxy `json:"iap,omitempty"`
  250. // Id: Identifier of the Application resource. This identifier is
  251. // equivalent to the project ID of the Google Cloud Platform project
  252. // where you want to deploy your application. Example: myapp.
  253. Id string `json:"id,omitempty"`
  254. // Location: Location from which this application will be run.
  255. // Application instances will run out of data centers in the chosen
  256. // location, which is also where all of the application's end user
  257. // content is stored.Defaults to us-central.Options are:us-central -
  258. // Central USeurope-west - Western Europeus-east1 - Eastern US
  259. Location string `json:"location,omitempty"`
  260. // Name: Full path to the Application resource in the API. Example:
  261. // apps/myapp.@OutputOnly
  262. Name string `json:"name,omitempty"`
  263. // ServerResponse contains the HTTP response code and headers from the
  264. // server.
  265. googleapi.ServerResponse `json:"-"`
  266. // ForceSendFields is a list of field names (e.g. "AuthDomain") to
  267. // unconditionally include in API requests. By default, fields with
  268. // empty values are omitted from API requests. However, any non-pointer,
  269. // non-interface field appearing in ForceSendFields will be sent to the
  270. // server regardless of whether the field is empty or not. This may be
  271. // used to include empty fields in Patch requests.
  272. ForceSendFields []string `json:"-"`
  273. // NullFields is a list of field names (e.g. "AuthDomain") to include in
  274. // API requests with the JSON null value. By default, fields with empty
  275. // values are omitted from API requests. However, any field with an
  276. // empty value appearing in NullFields will be sent to the server as
  277. // null. It is an error if a field in this list has a non-empty value.
  278. // This may be used to include null fields in Patch requests.
  279. NullFields []string `json:"-"`
  280. }
  281. func (s *Application) MarshalJSON() ([]byte, error) {
  282. type NoMethod Application
  283. raw := NoMethod(*s)
  284. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  285. }
  286. // AutomaticScaling: Automatic scaling is based on request rate,
  287. // response latencies, and other application metrics.
  288. type AutomaticScaling struct {
  289. // CoolDownPeriod: The time period that the Autoscaler
  290. // (https://cloud.google.com/compute/docs/autoscaler/) should wait
  291. // before it starts collecting information from a new instance. This
  292. // prevents the autoscaler from collecting information when the instance
  293. // is initializing, during which the collected usage would not be
  294. // reliable. Only applicable in the App Engine flexible environment.
  295. CoolDownPeriod string `json:"coolDownPeriod,omitempty"`
  296. // CpuUtilization: Target scaling by CPU usage.
  297. CpuUtilization *CpuUtilization `json:"cpuUtilization,omitempty"`
  298. // DiskUtilization: Target scaling by disk usage.
  299. DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"`
  300. // MaxConcurrentRequests: Number of concurrent requests an automatic
  301. // scaling instance can accept before the scheduler spawns a new
  302. // instance.Defaults to a runtime-specific value.
  303. MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"`
  304. // MaxIdleInstances: Maximum number of idle instances that should be
  305. // maintained for this version.
  306. MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"`
  307. // MaxPendingLatency: Maximum amount of time that a request should wait
  308. // in the pending queue before starting a new instance to handle it.
  309. MaxPendingLatency string `json:"maxPendingLatency,omitempty"`
  310. // MaxTotalInstances: Maximum number of instances that should be started
  311. // to handle requests.
  312. MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"`
  313. // MinIdleInstances: Minimum number of idle instances that should be
  314. // maintained for this version. Only applicable for the default version
  315. // of a module.
  316. MinIdleInstances int64 `json:"minIdleInstances,omitempty"`
  317. // MinPendingLatency: Minimum amount of time a request should wait in
  318. // the pending queue before starting a new instance to handle it.
  319. MinPendingLatency string `json:"minPendingLatency,omitempty"`
  320. // MinTotalInstances: Minimum number of instances that should be
  321. // maintained for this version.
  322. MinTotalInstances int64 `json:"minTotalInstances,omitempty"`
  323. // NetworkUtilization: Target scaling by network usage.
  324. NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"`
  325. // RequestUtilization: Target scaling by request utilization.
  326. RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"`
  327. // ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to
  328. // unconditionally include in API requests. By default, fields with
  329. // empty values are omitted from API requests. However, any non-pointer,
  330. // non-interface field appearing in ForceSendFields will be sent to the
  331. // server regardless of whether the field is empty or not. This may be
  332. // used to include empty fields in Patch requests.
  333. ForceSendFields []string `json:"-"`
  334. // NullFields is a list of field names (e.g. "CoolDownPeriod") to
  335. // include in API requests with the JSON null value. By default, fields
  336. // with empty values are omitted from API requests. However, any field
  337. // with an empty value appearing in NullFields will be sent to the
  338. // server as null. It is an error if a field in this list has a
  339. // non-empty value. This may be used to include null fields in Patch
  340. // requests.
  341. NullFields []string `json:"-"`
  342. }
  343. func (s *AutomaticScaling) MarshalJSON() ([]byte, error) {
  344. type NoMethod AutomaticScaling
  345. raw := NoMethod(*s)
  346. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  347. }
  348. // BasicScaling: A service with basic scaling will create an instance
  349. // when the application receives a request. The instance will be turned
  350. // down when the app becomes idle. Basic scaling is ideal for work that
  351. // is intermittent or driven by user activity.
  352. type BasicScaling struct {
  353. // IdleTimeout: Duration of time after the last request that an instance
  354. // must wait before the instance is shut down.
  355. IdleTimeout string `json:"idleTimeout,omitempty"`
  356. // MaxInstances: Maximum number of instances to create for this version.
  357. MaxInstances int64 `json:"maxInstances,omitempty"`
  358. // ForceSendFields is a list of field names (e.g. "IdleTimeout") to
  359. // unconditionally include in API requests. By default, fields with
  360. // empty values are omitted from API requests. However, any non-pointer,
  361. // non-interface field appearing in ForceSendFields will be sent to the
  362. // server regardless of whether the field is empty or not. This may be
  363. // used to include empty fields in Patch requests.
  364. ForceSendFields []string `json:"-"`
  365. // NullFields is a list of field names (e.g. "IdleTimeout") to include
  366. // in API requests with the JSON null value. By default, fields with
  367. // empty values are omitted from API requests. However, any field with
  368. // an empty value appearing in NullFields will be sent to the server as
  369. // null. It is an error if a field in this list has a non-empty value.
  370. // This may be used to include null fields in Patch requests.
  371. NullFields []string `json:"-"`
  372. }
  373. func (s *BasicScaling) MarshalJSON() ([]byte, error) {
  374. type NoMethod BasicScaling
  375. raw := NoMethod(*s)
  376. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  377. }
  378. // ContainerInfo: Docker image that is used to create a container and
  379. // start a VM instance for the version that you deploy. Only applicable
  380. // for instances running in the App Engine flexible environment.
  381. type ContainerInfo struct {
  382. // Image: URI to the hosted container image in Google Container
  383. // Registry. The URI must be fully qualified and include a tag or
  384. // digest. Examples: "gcr.io/my-project/image:tag" or
  385. // "gcr.io/my-project/image@digest"
  386. Image string `json:"image,omitempty"`
  387. // ForceSendFields is a list of field names (e.g. "Image") to
  388. // unconditionally include in API requests. By default, fields with
  389. // empty values are omitted from API requests. However, any non-pointer,
  390. // non-interface field appearing in ForceSendFields will be sent to the
  391. // server regardless of whether the field is empty or not. This may be
  392. // used to include empty fields in Patch requests.
  393. ForceSendFields []string `json:"-"`
  394. // NullFields is a list of field names (e.g. "Image") to include in API
  395. // requests with the JSON null value. By default, fields with empty
  396. // values are omitted from API requests. However, any field with an
  397. // empty value appearing in NullFields will be sent to the server as
  398. // null. It is an error if a field in this list has a non-empty value.
  399. // This may be used to include null fields in Patch requests.
  400. NullFields []string `json:"-"`
  401. }
  402. func (s *ContainerInfo) MarshalJSON() ([]byte, error) {
  403. type NoMethod ContainerInfo
  404. raw := NoMethod(*s)
  405. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  406. }
  407. // CpuUtilization: Target scaling by CPU usage.
  408. type CpuUtilization struct {
  409. // AggregationWindowLength: Period of time over which CPU utilization is
  410. // calculated.
  411. AggregationWindowLength string `json:"aggregationWindowLength,omitempty"`
  412. // TargetUtilization: Target CPU utilization ratio to maintain when
  413. // scaling. Must be between 0 and 1.
  414. TargetUtilization float64 `json:"targetUtilization,omitempty"`
  415. // ForceSendFields is a list of field names (e.g.
  416. // "AggregationWindowLength") to unconditionally include in API
  417. // requests. By default, fields with empty values are omitted from API
  418. // requests. However, any non-pointer, non-interface field appearing in
  419. // ForceSendFields will be sent to the server regardless of whether the
  420. // field is empty or not. This may be used to include empty fields in
  421. // Patch requests.
  422. ForceSendFields []string `json:"-"`
  423. // NullFields is a list of field names (e.g. "AggregationWindowLength")
  424. // to include in API requests with the JSON null value. By default,
  425. // fields with empty values are omitted from API requests. However, any
  426. // field with an empty value appearing in NullFields will be sent to the
  427. // server as null. It is an error if a field in this list has a
  428. // non-empty value. This may be used to include null fields in Patch
  429. // requests.
  430. NullFields []string `json:"-"`
  431. }
  432. func (s *CpuUtilization) MarshalJSON() ([]byte, error) {
  433. type NoMethod CpuUtilization
  434. raw := NoMethod(*s)
  435. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  436. }
  437. func (s *CpuUtilization) UnmarshalJSON(data []byte) error {
  438. type NoMethod CpuUtilization
  439. var s1 struct {
  440. TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"`
  441. *NoMethod
  442. }
  443. s1.NoMethod = (*NoMethod)(s)
  444. if err := json.Unmarshal(data, &s1); err != nil {
  445. return err
  446. }
  447. s.TargetUtilization = float64(s1.TargetUtilization)
  448. return nil
  449. }
  450. // CreateVersionMetadataV1: Metadata for the given
  451. // google.longrunning.Operation during a
  452. // google.appengine.v1.CreateVersionRequest.
  453. type CreateVersionMetadataV1 struct {
  454. // CloudBuildId: The Cloud Build ID if one was created as part of the
  455. // version create. @OutputOnly
  456. CloudBuildId string `json:"cloudBuildId,omitempty"`
  457. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  458. // unconditionally include in API requests. By default, fields with
  459. // empty values are omitted from API requests. However, any non-pointer,
  460. // non-interface field appearing in ForceSendFields will be sent to the
  461. // server regardless of whether the field is empty or not. This may be
  462. // used to include empty fields in Patch requests.
  463. ForceSendFields []string `json:"-"`
  464. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  465. // in API requests with the JSON null value. By default, fields with
  466. // empty values are omitted from API requests. However, any field with
  467. // an empty value appearing in NullFields will be sent to the server as
  468. // null. It is an error if a field in this list has a non-empty value.
  469. // This may be used to include null fields in Patch requests.
  470. NullFields []string `json:"-"`
  471. }
  472. func (s *CreateVersionMetadataV1) MarshalJSON() ([]byte, error) {
  473. type NoMethod CreateVersionMetadataV1
  474. raw := NoMethod(*s)
  475. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  476. }
  477. // CreateVersionMetadataV1Alpha: Metadata for the given
  478. // google.longrunning.Operation during a
  479. // google.appengine.v1alpha.CreateVersionRequest.
  480. type CreateVersionMetadataV1Alpha struct {
  481. // CloudBuildId: The Cloud Build ID if one was created as part of the
  482. // version create. @OutputOnly
  483. CloudBuildId string `json:"cloudBuildId,omitempty"`
  484. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  485. // unconditionally include in API requests. By default, fields with
  486. // empty values are omitted from API requests. However, any non-pointer,
  487. // non-interface field appearing in ForceSendFields will be sent to the
  488. // server regardless of whether the field is empty or not. This may be
  489. // used to include empty fields in Patch requests.
  490. ForceSendFields []string `json:"-"`
  491. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  492. // in API requests with the JSON null value. By default, fields with
  493. // empty values are omitted from API requests. However, any field with
  494. // an empty value appearing in NullFields will be sent to the server as
  495. // null. It is an error if a field in this list has a non-empty value.
  496. // This may be used to include null fields in Patch requests.
  497. NullFields []string `json:"-"`
  498. }
  499. func (s *CreateVersionMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  500. type NoMethod CreateVersionMetadataV1Alpha
  501. raw := NoMethod(*s)
  502. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  503. }
  504. // CreateVersionMetadataV1Beta: Metadata for the given
  505. // google.longrunning.Operation during a
  506. // google.appengine.v1beta.CreateVersionRequest.
  507. type CreateVersionMetadataV1Beta struct {
  508. // CloudBuildId: The Cloud Build ID if one was created as part of the
  509. // version create. @OutputOnly
  510. CloudBuildId string `json:"cloudBuildId,omitempty"`
  511. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  512. // unconditionally include in API requests. By default, fields with
  513. // empty values are omitted from API requests. However, any non-pointer,
  514. // non-interface field appearing in ForceSendFields will be sent to the
  515. // server regardless of whether the field is empty or not. This may be
  516. // used to include empty fields in Patch requests.
  517. ForceSendFields []string `json:"-"`
  518. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  519. // in API requests with the JSON null value. By default, fields with
  520. // empty values are omitted from API requests. However, any field with
  521. // an empty value appearing in NullFields will be sent to the server as
  522. // null. It is an error if a field in this list has a non-empty value.
  523. // This may be used to include null fields in Patch requests.
  524. NullFields []string `json:"-"`
  525. }
  526. func (s *CreateVersionMetadataV1Beta) MarshalJSON() ([]byte, error) {
  527. type NoMethod CreateVersionMetadataV1Beta
  528. raw := NoMethod(*s)
  529. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  530. }
  531. // DebugInstanceRequest: Request message for Instances.DebugInstance.
  532. type DebugInstanceRequest struct {
  533. // SshKey: Public SSH key to add to the instance.
  534. // Examples:
  535. // [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]
  536. // [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh
  537. // {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more
  538. // information, see Adding and Removing SSH Keys
  539. // (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-k
  540. // eys).
  541. SshKey string `json:"sshKey,omitempty"`
  542. // ForceSendFields is a list of field names (e.g. "SshKey") to
  543. // unconditionally include in API requests. By default, fields with
  544. // empty values are omitted from API requests. However, any non-pointer,
  545. // non-interface field appearing in ForceSendFields will be sent to the
  546. // server regardless of whether the field is empty or not. This may be
  547. // used to include empty fields in Patch requests.
  548. ForceSendFields []string `json:"-"`
  549. // NullFields is a list of field names (e.g. "SshKey") to include in API
  550. // requests with the JSON null value. By default, fields with empty
  551. // values are omitted from API requests. However, any field with an
  552. // empty value appearing in NullFields will be sent to the server as
  553. // null. It is an error if a field in this list has a non-empty value.
  554. // This may be used to include null fields in Patch requests.
  555. NullFields []string `json:"-"`
  556. }
  557. func (s *DebugInstanceRequest) MarshalJSON() ([]byte, error) {
  558. type NoMethod DebugInstanceRequest
  559. raw := NoMethod(*s)
  560. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  561. }
  562. // Deployment: Code and application artifacts used to deploy a version
  563. // to App Engine.
  564. type Deployment struct {
  565. // Container: The Docker image for the container that runs the version.
  566. // Only applicable for instances running in the App Engine flexible
  567. // environment.
  568. Container *ContainerInfo `json:"container,omitempty"`
  569. // Files: Manifest of the files stored in Google Cloud Storage that are
  570. // included as part of this version. All files must be readable using
  571. // the credentials supplied with this call.
  572. Files map[string]FileInfo `json:"files,omitempty"`
  573. // SourceReferences: Origin of the source code for this deployment.
  574. // There can be more than one source reference per version if source
  575. // code is distributed among multiple repositories.
  576. SourceReferences []*SourceReference `json:"sourceReferences,omitempty"`
  577. // ForceSendFields is a list of field names (e.g. "Container") to
  578. // unconditionally include in API requests. By default, fields with
  579. // empty values are omitted from API requests. However, any non-pointer,
  580. // non-interface field appearing in ForceSendFields will be sent to the
  581. // server regardless of whether the field is empty or not. This may be
  582. // used to include empty fields in Patch requests.
  583. ForceSendFields []string `json:"-"`
  584. // NullFields is a list of field names (e.g. "Container") to include in
  585. // API requests with the JSON null value. By default, fields with empty
  586. // values are omitted from API requests. However, any field with an
  587. // empty value appearing in NullFields will be sent to the server as
  588. // null. It is an error if a field in this list has a non-empty value.
  589. // This may be used to include null fields in Patch requests.
  590. NullFields []string `json:"-"`
  591. }
  592. func (s *Deployment) MarshalJSON() ([]byte, error) {
  593. type NoMethod Deployment
  594. raw := NoMethod(*s)
  595. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  596. }
  597. // DiskUtilization: Target scaling by disk usage. Only applicable for VM
  598. // runtimes.
  599. type DiskUtilization struct {
  600. // TargetReadBytesPerSec: Target bytes read per second.
  601. TargetReadBytesPerSec int64 `json:"targetReadBytesPerSec,omitempty"`
  602. // TargetReadOpsPerSec: Target ops read per second.
  603. TargetReadOpsPerSec int64 `json:"targetReadOpsPerSec,omitempty"`
  604. // TargetWriteBytesPerSec: Target bytes written per second.
  605. TargetWriteBytesPerSec int64 `json:"targetWriteBytesPerSec,omitempty"`
  606. // TargetWriteOpsPerSec: Target ops written per second.
  607. TargetWriteOpsPerSec int64 `json:"targetWriteOpsPerSec,omitempty"`
  608. // ForceSendFields is a list of field names (e.g.
  609. // "TargetReadBytesPerSec") to unconditionally include in API requests.
  610. // By default, fields with empty values are omitted from API requests.
  611. // However, any non-pointer, non-interface field appearing in
  612. // ForceSendFields will be sent to the server regardless of whether the
  613. // field is empty or not. This may be used to include empty fields in
  614. // Patch requests.
  615. ForceSendFields []string `json:"-"`
  616. // NullFields is a list of field names (e.g. "TargetReadBytesPerSec") to
  617. // include in API requests with the JSON null value. By default, fields
  618. // with empty values are omitted from API requests. However, any field
  619. // with an empty value appearing in NullFields will be sent to the
  620. // server as null. It is an error if a field in this list has a
  621. // non-empty value. This may be used to include null fields in Patch
  622. // requests.
  623. NullFields []string `json:"-"`
  624. }
  625. func (s *DiskUtilization) MarshalJSON() ([]byte, error) {
  626. type NoMethod DiskUtilization
  627. raw := NoMethod(*s)
  628. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  629. }
  630. // EndpointsApiService: Cloud Endpoints
  631. // (https://cloud.google.com/endpoints) configuration. The Endpoints API
  632. // Service provides tooling for serving Open API and gRPC endpoints via
  633. // an NGINX proxy. Only valid for App Engine Flexible environment
  634. // deployments.The fields here refer to the name and configuration id of
  635. // a "service" resource in the Service Management API
  636. // (https://cloud.google.com/service-management/overview).
  637. type EndpointsApiService struct {
  638. // ConfigId: Endpoints service configuration id as specified by the
  639. // Service Management API. For example "2016-09-19r1"By default, the
  640. // Endpoints service configuration id is fixed and config_id must be
  641. // specified. To keep the Endpoints service configuration id updated
  642. // with each rollout, specify RolloutStrategy.MANAGED and omit
  643. // config_id.
  644. ConfigId string `json:"configId,omitempty"`
  645. // DisableTraceSampling: Enable or disable trace sampling. By default,
  646. // this is set to false for enabled.
  647. DisableTraceSampling bool `json:"disableTraceSampling,omitempty"`
  648. // Name: Endpoints service name which is the name of the "service"
  649. // resource in the Service Management API. For example
  650. // "myapi.endpoints.myproject.cloud.goog"
  651. Name string `json:"name,omitempty"`
  652. // RolloutStrategy: Endpoints rollout strategy. If FIXED, config_id must
  653. // be specified. If MANAGED, config_id must be omitted.
  654. //
  655. // Possible values:
  656. // "UNSPECIFIED_ROLLOUT_STRATEGY" - Not specified. Defaults to FIXED.
  657. // "FIXED" - Endpoints service configuration id will be fixed to the
  658. // configuration id specified by config_id.
  659. // "MANAGED" - Endpoints service configuration id will be updated with
  660. // each rollout.
  661. RolloutStrategy string `json:"rolloutStrategy,omitempty"`
  662. // ForceSendFields is a list of field names (e.g. "ConfigId") to
  663. // unconditionally include in API requests. By default, fields with
  664. // empty values are omitted from API requests. However, any non-pointer,
  665. // non-interface field appearing in ForceSendFields will be sent to the
  666. // server regardless of whether the field is empty or not. This may be
  667. // used to include empty fields in Patch requests.
  668. ForceSendFields []string `json:"-"`
  669. // NullFields is a list of field names (e.g. "ConfigId") to include in
  670. // API requests with the JSON null value. By default, fields with empty
  671. // values are omitted from API requests. However, any field with an
  672. // empty value appearing in NullFields will be sent to the server as
  673. // null. It is an error if a field in this list has a non-empty value.
  674. // This may be used to include null fields in Patch requests.
  675. NullFields []string `json:"-"`
  676. }
  677. func (s *EndpointsApiService) MarshalJSON() ([]byte, error) {
  678. type NoMethod EndpointsApiService
  679. raw := NoMethod(*s)
  680. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  681. }
  682. // ErrorHandler: Custom static error page to be served when an error
  683. // occurs.
  684. type ErrorHandler struct {
  685. // ErrorCode: Error condition this handler applies to.
  686. //
  687. // Possible values:
  688. // "ERROR_CODE_UNSPECIFIED" - Not specified. ERROR_CODE_DEFAULT is
  689. // assumed.
  690. // "ERROR_CODE_DEFAULT" - All other error types.
  691. // "ERROR_CODE_OVER_QUOTA" - Application has exceeded a resource
  692. // quota.
  693. // "ERROR_CODE_DOS_API_DENIAL" - Client blocked by the application's
  694. // Denial of Service protection configuration.
  695. // "ERROR_CODE_TIMEOUT" - Deadline reached before the application
  696. // responds.
  697. ErrorCode string `json:"errorCode,omitempty"`
  698. // MimeType: MIME type of file. Defaults to text/html.
  699. MimeType string `json:"mimeType,omitempty"`
  700. // StaticFile: Static file content to be served for this error.
  701. StaticFile string `json:"staticFile,omitempty"`
  702. // ForceSendFields is a list of field names (e.g. "ErrorCode") to
  703. // unconditionally include in API requests. By default, fields with
  704. // empty values are omitted from API requests. However, any non-pointer,
  705. // non-interface field appearing in ForceSendFields will be sent to the
  706. // server regardless of whether the field is empty or not. This may be
  707. // used to include empty fields in Patch requests.
  708. ForceSendFields []string `json:"-"`
  709. // NullFields is a list of field names (e.g. "ErrorCode") to include in
  710. // API requests with the JSON null value. By default, fields with empty
  711. // values are omitted from API requests. However, any field with an
  712. // empty value appearing in NullFields will be sent to the server as
  713. // null. It is an error if a field in this list has a non-empty value.
  714. // This may be used to include null fields in Patch requests.
  715. NullFields []string `json:"-"`
  716. }
  717. func (s *ErrorHandler) MarshalJSON() ([]byte, error) {
  718. type NoMethod ErrorHandler
  719. raw := NoMethod(*s)
  720. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  721. }
  722. // FileInfo: Single source file that is part of the version to be
  723. // deployed. Each source file that is deployed must be specified
  724. // separately.
  725. type FileInfo struct {
  726. // MimeType: The MIME type of the file.Defaults to the value from Google
  727. // Cloud Storage.
  728. MimeType string `json:"mimeType,omitempty"`
  729. // Sha1Sum: The SHA1 hash of the file, in hex.
  730. Sha1Sum string `json:"sha1Sum,omitempty"`
  731. // SourceUrl: URL source to use to fetch this file. Must be a URL to a
  732. // resource in Google Cloud Storage in the form
  733. // 'http(s)://storage.googleapis.com/<bucket>/<object>'.
  734. SourceUrl string `json:"sourceUrl,omitempty"`
  735. // ForceSendFields is a list of field names (e.g. "MimeType") to
  736. // unconditionally include in API requests. By default, fields with
  737. // empty values are omitted from API requests. However, any non-pointer,
  738. // non-interface field appearing in ForceSendFields will be sent to the
  739. // server regardless of whether the field is empty or not. This may be
  740. // used to include empty fields in Patch requests.
  741. ForceSendFields []string `json:"-"`
  742. // NullFields is a list of field names (e.g. "MimeType") to include in
  743. // API requests with the JSON null value. By default, fields with empty
  744. // values are omitted from API requests. However, any field with an
  745. // empty value appearing in NullFields will be sent to the server as
  746. // null. It is an error if a field in this list has a non-empty value.
  747. // This may be used to include null fields in Patch requests.
  748. NullFields []string `json:"-"`
  749. }
  750. func (s *FileInfo) MarshalJSON() ([]byte, error) {
  751. type NoMethod FileInfo
  752. raw := NoMethod(*s)
  753. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  754. }
  755. // HealthCheck: Health checking configuration for VM instances.
  756. // Unhealthy instances are killed and replaced with new instances. Only
  757. // applicable for instances in App Engine flexible environment.
  758. type HealthCheck struct {
  759. // CheckInterval: Interval between health checks.
  760. CheckInterval string `json:"checkInterval,omitempty"`
  761. // DisableHealthCheck: Whether to explicitly disable health checks for
  762. // this instance.
  763. DisableHealthCheck bool `json:"disableHealthCheck,omitempty"`
  764. // HealthyThreshold: Number of consecutive successful health checks
  765. // required before receiving traffic.
  766. HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
  767. // Host: Host header to send when performing an HTTP health check.
  768. // Example: "myapp.appspot.com"
  769. Host string `json:"host,omitempty"`
  770. // RestartThreshold: Number of consecutive failed health checks required
  771. // before an instance is restarted.
  772. RestartThreshold int64 `json:"restartThreshold,omitempty"`
  773. // Timeout: Time before the health check is considered failed.
  774. Timeout string `json:"timeout,omitempty"`
  775. // UnhealthyThreshold: Number of consecutive failed health checks
  776. // required before removing traffic.
  777. UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
  778. // ForceSendFields is a list of field names (e.g. "CheckInterval") to
  779. // unconditionally include in API requests. By default, fields with
  780. // empty values are omitted from API requests. However, any non-pointer,
  781. // non-interface field appearing in ForceSendFields will be sent to the
  782. // server regardless of whether the field is empty or not. This may be
  783. // used to include empty fields in Patch requests.
  784. ForceSendFields []string `json:"-"`
  785. // NullFields is a list of field names (e.g. "CheckInterval") to include
  786. // in API requests with the JSON null value. By default, fields with
  787. // empty values are omitted from API requests. However, any field with
  788. // an empty value appearing in NullFields will be sent to the server as
  789. // null. It is an error if a field in this list has a non-empty value.
  790. // This may be used to include null fields in Patch requests.
  791. NullFields []string `json:"-"`
  792. }
  793. func (s *HealthCheck) MarshalJSON() ([]byte, error) {
  794. type NoMethod HealthCheck
  795. raw := NoMethod(*s)
  796. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  797. }
  798. // IdentityAwareProxy: Identity-Aware Proxy
  799. type IdentityAwareProxy struct {
  800. // Enabled: Whether the serving infrastructure will authenticate and
  801. // authorize all incoming requests.If true, the oauth2_client_id and
  802. // oauth2_client_secret fields must be non-empty.
  803. Enabled bool `json:"enabled,omitempty"`
  804. // Oauth2ClientId: OAuth2 client ID to use for the authentication flow.
  805. Oauth2ClientId string `json:"oauth2ClientId,omitempty"`
  806. // Oauth2ClientSecret: For security reasons, this value cannot be
  807. // retrieved via the API. Instead, the SHA-256 hash of the value is
  808. // returned in the oauth2_client_secret_sha256 field.@InputOnly
  809. Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"`
  810. // Oauth2ClientSecretSha256: Hex-encoded SHA-256 hash of the client
  811. // secret.@OutputOnly
  812. Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"`
  813. // ForceSendFields is a list of field names (e.g. "Enabled") to
  814. // unconditionally include in API requests. By default, fields with
  815. // empty values are omitted from API requests. However, any non-pointer,
  816. // non-interface field appearing in ForceSendFields will be sent to the
  817. // server regardless of whether the field is empty or not. This may be
  818. // used to include empty fields in Patch requests.
  819. ForceSendFields []string `json:"-"`
  820. // NullFields is a list of field names (e.g. "Enabled") to include in
  821. // API requests with the JSON null value. By default, fields with empty
  822. // values are omitted from API requests. However, any field with an
  823. // empty value appearing in NullFields will be sent to the server as
  824. // null. It is an error if a field in this list has a non-empty value.
  825. // This may be used to include null fields in Patch requests.
  826. NullFields []string `json:"-"`
  827. }
  828. func (s *IdentityAwareProxy) MarshalJSON() ([]byte, error) {
  829. type NoMethod IdentityAwareProxy
  830. raw := NoMethod(*s)
  831. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  832. }
  833. // Instance: An Instance resource is the computing unit that App Engine
  834. // uses to automatically scale an application.
  835. type Instance struct {
  836. // AppEngineRelease: App Engine release this instance is running
  837. // on.@OutputOnly
  838. AppEngineRelease string `json:"appEngineRelease,omitempty"`
  839. // Availability: Availability of the instance.@OutputOnly
  840. //
  841. // Possible values:
  842. // "UNSPECIFIED"
  843. // "RESIDENT"
  844. // "DYNAMIC"
  845. Availability string `json:"availability,omitempty"`
  846. // AverageLatency: Average latency (ms) over the last minute.@OutputOnly
  847. AverageLatency int64 `json:"averageLatency,omitempty"`
  848. // Errors: Number of errors since this instance was started.@OutputOnly
  849. Errors int64 `json:"errors,omitempty"`
  850. // Id: Relative name of the instance within the version. Example:
  851. // instance-1.@OutputOnly
  852. Id string `json:"id,omitempty"`
  853. // MemoryUsage: Total memory in use (bytes).@OutputOnly
  854. MemoryUsage int64 `json:"memoryUsage,omitempty,string"`
  855. // Name: Full path to the Instance resource in the API. Example:
  856. // apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOn
  857. // ly
  858. Name string `json:"name,omitempty"`
  859. // Qps: Average queries per second (QPS) over the last
  860. // minute.@OutputOnly
  861. Qps float64 `json:"qps,omitempty"`
  862. // Requests: Number of requests since this instance was
  863. // started.@OutputOnly
  864. Requests int64 `json:"requests,omitempty"`
  865. // StartTimestamp: Time that this instance was started.@OutputOnly
  866. StartTimestamp string `json:"startTimestamp,omitempty"`
  867. // VmId: Virtual machine ID of this instance. Only applicable for
  868. // instances in App Engine flexible environment.@OutputOnly
  869. VmId string `json:"vmId,omitempty"`
  870. // VmIp: The IP address of this instance. Only applicable for instances
  871. // in App Engine flexible environment.@OutputOnly
  872. VmIp string `json:"vmIp,omitempty"`
  873. // VmName: Name of the virtual machine where this instance lives. Only
  874. // applicable for instances in App Engine flexible
  875. // environment.@OutputOnly
  876. VmName string `json:"vmName,omitempty"`
  877. // VmStatus: Status of the virtual machine where this instance lives.
  878. // Only applicable for instances in App Engine flexible
  879. // environment.@OutputOnly
  880. VmStatus string `json:"vmStatus,omitempty"`
  881. // VmUnlocked: Whether this instance is in debug mode. Only applicable
  882. // for instances in App Engine flexible environment.@OutputOnly
  883. VmUnlocked bool `json:"vmUnlocked,omitempty"`
  884. // VmZoneName: Zone where the virtual machine is located. Only
  885. // applicable for instances in App Engine flexible
  886. // environment.@OutputOnly
  887. VmZoneName string `json:"vmZoneName,omitempty"`
  888. // ServerResponse contains the HTTP response code and headers from the
  889. // server.
  890. googleapi.ServerResponse `json:"-"`
  891. // ForceSendFields is a list of field names (e.g. "AppEngineRelease") to
  892. // unconditionally include in API requests. By default, fields with
  893. // empty values are omitted from API requests. However, any non-pointer,
  894. // non-interface field appearing in ForceSendFields will be sent to the
  895. // server regardless of whether the field is empty or not. This may be
  896. // used to include empty fields in Patch requests.
  897. ForceSendFields []string `json:"-"`
  898. // NullFields is a list of field names (e.g. "AppEngineRelease") to
  899. // include in API requests with the JSON null value. By default, fields
  900. // with empty values are omitted from API requests. However, any field
  901. // with an empty value appearing in NullFields will be sent to the
  902. // server as null. It is an error if a field in this list has a
  903. // non-empty value. This may be used to include null fields in Patch
  904. // requests.
  905. NullFields []string `json:"-"`
  906. }
  907. func (s *Instance) MarshalJSON() ([]byte, error) {
  908. type NoMethod Instance
  909. raw := NoMethod(*s)
  910. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  911. }
  912. func (s *Instance) UnmarshalJSON(data []byte) error {
  913. type NoMethod Instance
  914. var s1 struct {
  915. Qps gensupport.JSONFloat64 `json:"qps"`
  916. *NoMethod
  917. }
  918. s1.NoMethod = (*NoMethod)(s)
  919. if err := json.Unmarshal(data, &s1); err != nil {
  920. return err
  921. }
  922. s.Qps = float64(s1.Qps)
  923. return nil
  924. }
  925. // Library: Third-party Python runtime library that is required by the
  926. // application.
  927. type Library struct {
  928. // Name: Name of the library. Example: "django".
  929. Name string `json:"name,omitempty"`
  930. // Version: Version of the library to select, or "latest".
  931. Version string `json:"version,omitempty"`
  932. // ForceSendFields is a list of field names (e.g. "Name") to
  933. // unconditionally include in API requests. By default, fields with
  934. // empty values are omitted from API requests. However, any non-pointer,
  935. // non-interface field appearing in ForceSendFields will be sent to the
  936. // server regardless of whether the field is empty or not. This may be
  937. // used to include empty fields in Patch requests.
  938. ForceSendFields []string `json:"-"`
  939. // NullFields is a list of field names (e.g. "Name") to include in API
  940. // requests with the JSON null value. By default, fields with empty
  941. // values are omitted from API requests. However, any field with an
  942. // empty value appearing in NullFields will be sent to the server as
  943. // null. It is an error if a field in this list has a non-empty value.
  944. // This may be used to include null fields in Patch requests.
  945. NullFields []string `json:"-"`
  946. }
  947. func (s *Library) MarshalJSON() ([]byte, error) {
  948. type NoMethod Library
  949. raw := NoMethod(*s)
  950. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  951. }
  952. // ListInstancesResponse: Response message for Instances.ListInstances.
  953. type ListInstancesResponse struct {
  954. // Instances: The instances belonging to the requested version.
  955. Instances []*Instance `json:"instances,omitempty"`
  956. // NextPageToken: Continuation token for fetching the next page of
  957. // results.
  958. NextPageToken string `json:"nextPageToken,omitempty"`
  959. // ServerResponse contains the HTTP response code and headers from the
  960. // server.
  961. googleapi.ServerResponse `json:"-"`
  962. // ForceSendFields is a list of field names (e.g. "Instances") to
  963. // unconditionally include in API requests. By default, fields with
  964. // empty values are omitted from API requests. However, any non-pointer,
  965. // non-interface field appearing in ForceSendFields will be sent to the
  966. // server regardless of whether the field is empty or not. This may be
  967. // used to include empty fields in Patch requests.
  968. ForceSendFields []string `json:"-"`
  969. // NullFields is a list of field names (e.g. "Instances") to include in
  970. // API requests with the JSON null value. By default, fields with empty
  971. // values are omitted from API requests. However, any field with an
  972. // empty value appearing in NullFields will be sent to the server as
  973. // null. It is an error if a field in this list has a non-empty value.
  974. // This may be used to include null fields in Patch requests.
  975. NullFields []string `json:"-"`
  976. }
  977. func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
  978. type NoMethod ListInstancesResponse
  979. raw := NoMethod(*s)
  980. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  981. }
  982. // ListLocationsResponse: The response message for
  983. // Locations.ListLocations.
  984. type ListLocationsResponse struct {
  985. // Locations: A list of locations that matches the specified filter in
  986. // the request.
  987. Locations []*Location `json:"locations,omitempty"`
  988. // NextPageToken: The standard List next-page token.
  989. NextPageToken string `json:"nextPageToken,omitempty"`
  990. // ServerResponse contains the HTTP response code and headers from the
  991. // server.
  992. googleapi.ServerResponse `json:"-"`
  993. // ForceSendFields is a list of field names (e.g. "Locations") to
  994. // unconditionally include in API requests. By default, fields with
  995. // empty values are omitted from API requests. However, any non-pointer,
  996. // non-interface field appearing in ForceSendFields will be sent to the
  997. // server regardless of whether the field is empty or not. This may be
  998. // used to include empty fields in Patch requests.
  999. ForceSendFields []string `json:"-"`
  1000. // NullFields is a list of field names (e.g. "Locations") to include in
  1001. // API requests with the JSON null value. By default, fields with empty
  1002. // values are omitted from API requests. However, any field with an
  1003. // empty value appearing in NullFields will be sent to the server as
  1004. // null. It is an error if a field in this list has a non-empty value.
  1005. // This may be used to include null fields in Patch requests.
  1006. NullFields []string `json:"-"`
  1007. }
  1008. func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1009. type NoMethod ListLocationsResponse
  1010. raw := NoMethod(*s)
  1011. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1012. }
  1013. // ListOperationsResponse: The response message for
  1014. // Operations.ListOperations.
  1015. type ListOperationsResponse struct {
  1016. // NextPageToken: The standard List next-page token.
  1017. NextPageToken string `json:"nextPageToken,omitempty"`
  1018. // Operations: A list of operations that matches the specified filter in
  1019. // the request.
  1020. Operations []*Operation `json:"operations,omitempty"`
  1021. // ServerResponse contains the HTTP response code and headers from the
  1022. // server.
  1023. googleapi.ServerResponse `json:"-"`
  1024. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1025. // unconditionally include in API requests. By default, fields with
  1026. // empty values are omitted from API requests. However, any non-pointer,
  1027. // non-interface field appearing in ForceSendFields will be sent to the
  1028. // server regardless of whether the field is empty or not. This may be
  1029. // used to include empty fields in Patch requests.
  1030. ForceSendFields []string `json:"-"`
  1031. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1032. // in API requests with the JSON null value. By default, fields with
  1033. // empty values are omitted from API requests. However, any field with
  1034. // an empty value appearing in NullFields will be sent to the server as
  1035. // null. It is an error if a field in this list has a non-empty value.
  1036. // This may be used to include null fields in Patch requests.
  1037. NullFields []string `json:"-"`
  1038. }
  1039. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1040. type NoMethod ListOperationsResponse
  1041. raw := NoMethod(*s)
  1042. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1043. }
  1044. // ListServicesResponse: Response message for Services.ListServices.
  1045. type ListServicesResponse struct {
  1046. // NextPageToken: Continuation token for fetching the next page of
  1047. // results.
  1048. NextPageToken string `json:"nextPageToken,omitempty"`
  1049. // Services: The services belonging to the requested application.
  1050. Services []*Service `json:"services,omitempty"`
  1051. // ServerResponse contains the HTTP response code and headers from the
  1052. // server.
  1053. googleapi.ServerResponse `json:"-"`
  1054. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1055. // unconditionally include in API requests. By default, fields with
  1056. // empty values are omitted from API requests. However, any non-pointer,
  1057. // non-interface field appearing in ForceSendFields will be sent to the
  1058. // server regardless of whether the field is empty or not. This may be
  1059. // used to include empty fields in Patch requests.
  1060. ForceSendFields []string `json:"-"`
  1061. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1062. // in API requests with the JSON null value. By default, fields with
  1063. // empty values are omitted from API requests. However, any field with
  1064. // an empty value appearing in NullFields will be sent to the server as
  1065. // null. It is an error if a field in this list has a non-empty value.
  1066. // This may be used to include null fields in Patch requests.
  1067. NullFields []string `json:"-"`
  1068. }
  1069. func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
  1070. type NoMethod ListServicesResponse
  1071. raw := NoMethod(*s)
  1072. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1073. }
  1074. // ListVersionsResponse: Response message for Versions.ListVersions.
  1075. type ListVersionsResponse struct {
  1076. // NextPageToken: Continuation token for fetching the next page of
  1077. // results.
  1078. NextPageToken string `json:"nextPageToken,omitempty"`
  1079. // Versions: The versions belonging to the requested service.
  1080. Versions []*Version `json:"versions,omitempty"`
  1081. // ServerResponse contains the HTTP response code and headers from the
  1082. // server.
  1083. googleapi.ServerResponse `json:"-"`
  1084. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1085. // unconditionally include in API requests. By default, fields with
  1086. // empty values are omitted from API requests. However, any non-pointer,
  1087. // non-interface field appearing in ForceSendFields will be sent to the
  1088. // server regardless of whether the field is empty or not. This may be
  1089. // used to include empty fields in Patch requests.
  1090. ForceSendFields []string `json:"-"`
  1091. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1092. // in API requests with the JSON null value. By default, fields with
  1093. // empty values are omitted from API requests. However, any field with
  1094. // an empty value appearing in NullFields will be sent to the server as
  1095. // null. It is an error if a field in this list has a non-empty value.
  1096. // This may be used to include null fields in Patch requests.
  1097. NullFields []string `json:"-"`
  1098. }
  1099. func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
  1100. type NoMethod ListVersionsResponse
  1101. raw := NoMethod(*s)
  1102. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1103. }
  1104. // Location: A resource that represents Google Cloud Platform location.
  1105. type Location struct {
  1106. // DisplayName: The friendly name for this location, typically a nearby
  1107. // city name. For example, "Tokyo".
  1108. DisplayName string `json:"displayName,omitempty"`
  1109. // Labels: Cross-service attributes for the location. For
  1110. // example
  1111. // {"cloud.googleapis.com/region": "us-east1"}
  1112. //
  1113. Labels map[string]string `json:"labels,omitempty"`
  1114. // LocationId: The canonical id for this location. For example:
  1115. // "us-east1".
  1116. LocationId string `json:"locationId,omitempty"`
  1117. // Metadata: Service-specific metadata. For example the available
  1118. // capacity at the given location.
  1119. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1120. // Name: Resource name for the location, which may vary between
  1121. // implementations. For example:
  1122. // "projects/example-project/locations/us-east1"
  1123. Name string `json:"name,omitempty"`
  1124. // ServerResponse contains the HTTP response code and headers from the
  1125. // server.
  1126. googleapi.ServerResponse `json:"-"`
  1127. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1128. // unconditionally include in API requests. By default, fields with
  1129. // empty values are omitted from API requests. However, any non-pointer,
  1130. // non-interface field appearing in ForceSendFields will be sent to the
  1131. // server regardless of whether the field is empty or not. This may be
  1132. // used to include empty fields in Patch requests.
  1133. ForceSendFields []string `json:"-"`
  1134. // NullFields is a list of field names (e.g. "DisplayName") to include
  1135. // in API requests with the JSON null value. By default, fields with
  1136. // empty values are omitted from API requests. However, any field with
  1137. // an empty value appearing in NullFields will be sent to the server as
  1138. // null. It is an error if a field in this list has a non-empty value.
  1139. // This may be used to include null fields in Patch requests.
  1140. NullFields []string `json:"-"`
  1141. }
  1142. func (s *Location) MarshalJSON() ([]byte, error) {
  1143. type NoMethod Location
  1144. raw := NoMethod(*s)
  1145. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1146. }
  1147. // LocationMetadata: Metadata for the given
  1148. // google.cloud.location.Location.
  1149. type LocationMetadata struct {
  1150. // FlexibleEnvironmentAvailable: App Engine flexible environment is
  1151. // available in the given location.@OutputOnly
  1152. FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"`
  1153. // StandardEnvironmentAvailable: App Engine standard environment is
  1154. // available in the given location.@OutputOnly
  1155. StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"`
  1156. // ForceSendFields is a list of field names (e.g.
  1157. // "FlexibleEnvironmentAvailable") to unconditionally include in API
  1158. // requests. By default, fields with empty values are omitted from API
  1159. // requests. However, any non-pointer, non-interface field appearing in
  1160. // ForceSendFields will be sent to the server regardless of whether the
  1161. // field is empty or not. This may be used to include empty fields in
  1162. // Patch requests.
  1163. ForceSendFields []string `json:"-"`
  1164. // NullFields is a list of field names (e.g.
  1165. // "FlexibleEnvironmentAvailable") to include in API requests with the
  1166. // JSON null value. By default, fields with empty values are omitted
  1167. // from API requests. However, any field with an empty value appearing
  1168. // in NullFields will be sent to the server as null. It is an error if a
  1169. // field in this list has a non-empty value. This may be used to include
  1170. // null fields in Patch requests.
  1171. NullFields []string `json:"-"`
  1172. }
  1173. func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
  1174. type NoMethod LocationMetadata
  1175. raw := NoMethod(*s)
  1176. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1177. }
  1178. // ManualScaling: A service with manual scaling runs continuously,
  1179. // allowing you to perform complex initialization and rely on the state
  1180. // of its memory over time.
  1181. type ManualScaling struct {
  1182. // Instances: Number of instances to assign to the service at the start.
  1183. // This number can later be altered by using the Modules API
  1184. // (https://cloud.google.com/appengine/docs/python/modules/functions)
  1185. // set_num_instances() function.
  1186. Instances int64 `json:"instances,omitempty"`
  1187. // ForceSendFields is a list of field names (e.g. "Instances") to
  1188. // unconditionally include in API requests. By default, fields with
  1189. // empty values are omitted from API requests. However, any non-pointer,
  1190. // non-interface field appearing in ForceSendFields will be sent to the
  1191. // server regardless of whether the field is empty or not. This may be
  1192. // used to include empty fields in Patch requests.
  1193. ForceSendFields []string `json:"-"`
  1194. // NullFields is a list of field names (e.g. "Instances") to include in
  1195. // API requests with the JSON null value. By default, fields with empty
  1196. // values are omitted from API requests. However, any field with an
  1197. // empty value appearing in NullFields will be sent to the server as
  1198. // null. It is an error if a field in this list has a non-empty value.
  1199. // This may be used to include null fields in Patch requests.
  1200. NullFields []string `json:"-"`
  1201. }
  1202. func (s *ManualScaling) MarshalJSON() ([]byte, error) {
  1203. type NoMethod ManualScaling
  1204. raw := NoMethod(*s)
  1205. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1206. }
  1207. // Network: Extra network settings. Only applicable for VM runtimes.
  1208. type Network struct {
  1209. // ForwardedPorts: List of ports, or port pairs, to forward from the
  1210. // virtual machine to the application container.
  1211. ForwardedPorts []string `json:"forwardedPorts,omitempty"`
  1212. // InstanceTag: Tag to apply to the VM instance during creation.
  1213. InstanceTag string `json:"instanceTag,omitempty"`
  1214. // Name: Google Cloud Platform network where the virtual machines are
  1215. // created. Specify the short name, not the resource path.Defaults to
  1216. // default.
  1217. Name string `json:"name,omitempty"`
  1218. // SubnetworkName: Google Cloud Platform sub-network where the virtual
  1219. // machines are created. Specify the short name, not the resource
  1220. // path.If a subnetwork name is specified, a network name will also be
  1221. // required unless it is for the default network.
  1222. // If the network the VM instance is being created in is a Legacy
  1223. // network, then the IP address is allocated from the IPv4Range.
  1224. // If the network the VM instance is being created in is an auto Subnet
  1225. // Mode Network, then only network name should be specified (not the
  1226. // subnetwork_name) and the IP address is created from the IPCidrRange
  1227. // of the subnetwork that exists in that zone for that network.
  1228. // If the network the VM instance is being created in is a custom Subnet
  1229. // Mode Network, then the subnetwork_name must be specified and the IP
  1230. // address is created from the IPCidrRange of the subnetwork.If
  1231. // specified, the subnetwork must exist in the same region as the Flex
  1232. // app.
  1233. SubnetworkName string `json:"subnetworkName,omitempty"`
  1234. // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to
  1235. // unconditionally include in API requests. By default, fields with
  1236. // empty values are omitted from API requests. However, any non-pointer,
  1237. // non-interface field appearing in ForceSendFields will be sent to the
  1238. // server regardless of whether the field is empty or not. This may be
  1239. // used to include empty fields in Patch requests.
  1240. ForceSendFields []string `json:"-"`
  1241. // NullFields is a list of field names (e.g. "ForwardedPorts") to
  1242. // include in API requests with the JSON null value. By default, fields
  1243. // with empty values are omitted from API requests. However, any field
  1244. // with an empty value appearing in NullFields will be sent to the
  1245. // server as null. It is an error if a field in this list has a
  1246. // non-empty value. This may be used to include null fields in Patch
  1247. // requests.
  1248. NullFields []string `json:"-"`
  1249. }
  1250. func (s *Network) MarshalJSON() ([]byte, error) {
  1251. type NoMethod Network
  1252. raw := NoMethod(*s)
  1253. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1254. }
  1255. // NetworkUtilization: Target scaling by network usage. Only applicable
  1256. // for VM runtimes.
  1257. type NetworkUtilization struct {
  1258. // TargetReceivedBytesPerSec: Target bytes received per second.
  1259. TargetReceivedBytesPerSec int64 `json:"targetReceivedBytesPerSec,omitempty"`
  1260. // TargetReceivedPacketsPerSec: Target packets received per second.
  1261. TargetReceivedPacketsPerSec int64 `json:"targetReceivedPacketsPerSec,omitempty"`
  1262. // TargetSentBytesPerSec: Target bytes sent per second.
  1263. TargetSentBytesPerSec int64 `json:"targetSentBytesPerSec,omitempty"`
  1264. // TargetSentPacketsPerSec: Target packets sent per second.
  1265. TargetSentPacketsPerSec int64 `json:"targetSentPacketsPerSec,omitempty"`
  1266. // ForceSendFields is a list of field names (e.g.
  1267. // "TargetReceivedBytesPerSec") to unconditionally include in API
  1268. // requests. By default, fields with empty values are omitted from API
  1269. // requests. However, any non-pointer, non-interface field appearing in
  1270. // ForceSendFields will be sent to the server regardless of whether the
  1271. // field is empty or not. This may be used to include empty fields in
  1272. // Patch requests.
  1273. ForceSendFields []string `json:"-"`
  1274. // NullFields is a list of field names (e.g.
  1275. // "TargetReceivedBytesPerSec") to include in API requests with the JSON
  1276. // null value. By default, fields with empty values are omitted from API
  1277. // requests. However, any field with an empty value appearing in
  1278. // NullFields will be sent to the server as null. It is an error if a
  1279. // field in this list has a non-empty value. This may be used to include
  1280. // null fields in Patch requests.
  1281. NullFields []string `json:"-"`
  1282. }
  1283. func (s *NetworkUtilization) MarshalJSON() ([]byte, error) {
  1284. type NoMethod NetworkUtilization
  1285. raw := NoMethod(*s)
  1286. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1287. }
  1288. // Operation: This resource represents a long-running operation that is
  1289. // the result of a network API call.
  1290. type Operation struct {
  1291. // Done: If the value is false, it means the operation is still in
  1292. // progress. If true, the operation is completed, and either error or
  1293. // response is available.
  1294. Done bool `json:"done,omitempty"`
  1295. // Error: The error result of the operation in case of failure or
  1296. // cancellation.
  1297. Error *Status `json:"error,omitempty"`
  1298. // Metadata: Service-specific metadata associated with the operation. It
  1299. // typically contains progress information and common metadata such as
  1300. // create time. Some services might not provide such metadata. Any
  1301. // method that returns a long-running operation should document the
  1302. // metadata type, if any.
  1303. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1304. // Name: The server-assigned name, which is only unique within the same
  1305. // service that originally returns it. If you use the default HTTP
  1306. // mapping, the name should have the format of
  1307. // operations/some/unique/name.
  1308. Name string `json:"name,omitempty"`
  1309. // Response: The normal response of the operation in case of success. If
  1310. // the original method returns no data on success, such as Delete, the
  1311. // response is google.protobuf.Empty. If the original method is standard
  1312. // Get/Create/Update, the response should be the resource. For other
  1313. // methods, the response should have the type XxxResponse, where Xxx is
  1314. // the original method name. For example, if the original method name is
  1315. // TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
  1316. Response googleapi.RawMessage `json:"response,omitempty"`
  1317. // ServerResponse contains the HTTP response code and headers from the
  1318. // server.
  1319. googleapi.ServerResponse `json:"-"`
  1320. // ForceSendFields is a list of field names (e.g. "Done") to
  1321. // unconditionally include in API requests. By default, fields with
  1322. // empty values are omitted from API requests. However, any non-pointer,
  1323. // non-interface field appearing in ForceSendFields will be sent to the
  1324. // server regardless of whether the field is empty or not. This may be
  1325. // used to include empty fields in Patch requests.
  1326. ForceSendFields []string `json:"-"`
  1327. // NullFields is a list of field names (e.g. "Done") to include in API
  1328. // requests with the JSON null value. By default, fields with empty
  1329. // values are omitted from API requests. However, any field with an
  1330. // empty value appearing in NullFields will be sent to the server as
  1331. // null. It is an error if a field in this list has a non-empty value.
  1332. // This may be used to include null fields in Patch requests.
  1333. NullFields []string `json:"-"`
  1334. }
  1335. func (s *Operation) MarshalJSON() ([]byte, error) {
  1336. type NoMethod Operation
  1337. raw := NoMethod(*s)
  1338. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1339. }
  1340. // OperationMetadata: Metadata for the given
  1341. // google.longrunning.Operation.
  1342. type OperationMetadata struct {
  1343. // EndTime: Timestamp that this operation completed.@OutputOnly
  1344. EndTime string `json:"endTime,omitempty"`
  1345. // InsertTime: Timestamp that this operation was created.@OutputOnly
  1346. InsertTime string `json:"insertTime,omitempty"`
  1347. // Method: API method that initiated this operation. Example:
  1348. // google.appengine.v1beta4.Version.CreateVersion.@OutputOnly
  1349. Method string `json:"method,omitempty"`
  1350. // OperationType: Type of this operation. Deprecated, use method field
  1351. // instead. Example: "create_version".@OutputOnly
  1352. OperationType string `json:"operationType,omitempty"`
  1353. // Target: Name of the resource that this operation is acting on.
  1354. // Example: apps/myapp/modules/default.@OutputOnly
  1355. Target string `json:"target,omitempty"`
  1356. // User: User who requested this operation.@OutputOnly
  1357. User string `json:"user,omitempty"`
  1358. // ForceSendFields is a list of field names (e.g. "EndTime") to
  1359. // unconditionally include in API requests. By default, fields with
  1360. // empty values are omitted from API requests. However, any non-pointer,
  1361. // non-interface field appearing in ForceSendFields will be sent to the
  1362. // server regardless of whether the field is empty or not. This may be
  1363. // used to include empty fields in Patch requests.
  1364. ForceSendFields []string `json:"-"`
  1365. // NullFields is a list of field names (e.g. "EndTime") to include in
  1366. // API requests with the JSON null value. By default, fields with empty
  1367. // values are omitted from API requests. However, any field with an
  1368. // empty value appearing in NullFields will be sent to the server as
  1369. // null. It is an error if a field in this list has a non-empty value.
  1370. // This may be used to include null fields in Patch requests.
  1371. NullFields []string `json:"-"`
  1372. }
  1373. func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1374. type NoMethod OperationMetadata
  1375. raw := NoMethod(*s)
  1376. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1377. }
  1378. // OperationMetadataV1: Metadata for the given
  1379. // google.longrunning.Operation.
  1380. type OperationMetadataV1 struct {
  1381. CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"`
  1382. // EndTime: Time that this operation completed.@OutputOnly
  1383. EndTime string `json:"endTime,omitempty"`
  1384. // EphemeralMessage: Ephemeral message that may change every time the
  1385. // operation is polled. @OutputOnly
  1386. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  1387. // InsertTime: Time that this operation was created.@OutputOnly
  1388. InsertTime string `json:"insertTime,omitempty"`
  1389. // Method: API method that initiated this operation. Example:
  1390. // google.appengine.v1.Versions.CreateVersion.@OutputOnly
  1391. Method string `json:"method,omitempty"`
  1392. // Target: Name of the resource that this operation is acting on.
  1393. // Example: apps/myapp/services/default.@OutputOnly
  1394. Target string `json:"target,omitempty"`
  1395. // User: User who requested this operation.@OutputOnly
  1396. User string `json:"user,omitempty"`
  1397. // Warning: Durable messages that persist on every operation poll.
  1398. // @OutputOnly
  1399. Warning []string `json:"warning,omitempty"`
  1400. // ForceSendFields is a list of field names (e.g.
  1401. // "CreateVersionMetadata") to unconditionally include in API requests.
  1402. // By default, fields with empty values are omitted from API requests.
  1403. // However, any non-pointer, non-interface field appearing in
  1404. // ForceSendFields will be sent to the server regardless of whether the
  1405. // field is empty or not. This may be used to include empty fields in
  1406. // Patch requests.
  1407. ForceSendFields []string `json:"-"`
  1408. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  1409. // include in API requests with the JSON null value. By default, fields
  1410. // with empty values are omitted from API requests. However, any field
  1411. // with an empty value appearing in NullFields will be sent to the
  1412. // server as null. It is an error if a field in this list has a
  1413. // non-empty value. This may be used to include null fields in Patch
  1414. // requests.
  1415. NullFields []string `json:"-"`
  1416. }
  1417. func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) {
  1418. type NoMethod OperationMetadataV1
  1419. raw := NoMethod(*s)
  1420. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1421. }
  1422. // OperationMetadataV1Alpha: Metadata for the given
  1423. // google.longrunning.Operation.
  1424. type OperationMetadataV1Alpha struct {
  1425. CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"`
  1426. // EndTime: Time that this operation completed.@OutputOnly
  1427. EndTime string `json:"endTime,omitempty"`
  1428. // EphemeralMessage: Ephemeral message that may change every time the
  1429. // operation is polled. @OutputOnly
  1430. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  1431. // InsertTime: Time that this operation was created.@OutputOnly
  1432. InsertTime string `json:"insertTime,omitempty"`
  1433. // Method: API method that initiated this operation. Example:
  1434. // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly
  1435. Method string `json:"method,omitempty"`
  1436. // Target: Name of the resource that this operation is acting on.
  1437. // Example: apps/myapp/services/default.@OutputOnly
  1438. Target string `json:"target,omitempty"`
  1439. // User: User who requested this operation.@OutputOnly
  1440. User string `json:"user,omitempty"`
  1441. // Warning: Durable messages that persist on every operation poll.
  1442. // @OutputOnly
  1443. Warning []string `json:"warning,omitempty"`
  1444. // ForceSendFields is a list of field names (e.g.
  1445. // "CreateVersionMetadata") to unconditionally include in API requests.
  1446. // By default, fields with empty values are omitted from API requests.
  1447. // However, any non-pointer, non-interface field appearing in
  1448. // ForceSendFields will be sent to the server regardless of whether the
  1449. // field is empty or not. This may be used to include empty fields in
  1450. // Patch requests.
  1451. ForceSendFields []string `json:"-"`
  1452. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  1453. // include in API requests with the JSON null value. By default, fields
  1454. // with empty values are omitted from API requests. However, any field
  1455. // with an empty value appearing in NullFields will be sent to the
  1456. // server as null. It is an error if a field in this list has a
  1457. // non-empty value. This may be used to include null fields in Patch
  1458. // requests.
  1459. NullFields []string `json:"-"`
  1460. }
  1461. func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  1462. type NoMethod OperationMetadataV1Alpha
  1463. raw := NoMethod(*s)
  1464. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1465. }
  1466. // OperationMetadataV1Beta: Metadata for the given
  1467. // google.longrunning.Operation.
  1468. type OperationMetadataV1Beta struct {
  1469. CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"`
  1470. // EndTime: Time that this operation completed.@OutputOnly
  1471. EndTime string `json:"endTime,omitempty"`
  1472. // EphemeralMessage: Ephemeral message that may change every time the
  1473. // operation is polled. @OutputOnly
  1474. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  1475. // InsertTime: Time that this operation was created.@OutputOnly
  1476. InsertTime string `json:"insertTime,omitempty"`
  1477. // Method: API method that initiated this operation. Example:
  1478. // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly
  1479. Method string `json:"method,omitempty"`
  1480. // Target: Name of the resource that this operation is acting on.
  1481. // Example: apps/myapp/services/default.@OutputOnly
  1482. Target string `json:"target,omitempty"`
  1483. // User: User who requested this operation.@OutputOnly
  1484. User string `json:"user,omitempty"`
  1485. // Warning: Durable messages that persist on every operation poll.
  1486. // @OutputOnly
  1487. Warning []string `json:"warning,omitempty"`
  1488. // ForceSendFields is a list of field names (e.g.
  1489. // "CreateVersionMetadata") to unconditionally include in API requests.
  1490. // By default, fields with empty values are omitted from API requests.
  1491. // However, any non-pointer, non-interface field appearing in
  1492. // ForceSendFields will be sent to the server regardless of whether the
  1493. // field is empty or not. This may be used to include empty fields in
  1494. // Patch requests.
  1495. ForceSendFields []string `json:"-"`
  1496. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  1497. // include in API requests with the JSON null value. By default, fields
  1498. // with empty values are omitted from API requests. However, any field
  1499. // with an empty value appearing in NullFields will be sent to the
  1500. // server as null. It is an error if a field in this list has a
  1501. // non-empty value. This may be used to include null fields in Patch
  1502. // requests.
  1503. NullFields []string `json:"-"`
  1504. }
  1505. func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) {
  1506. type NoMethod OperationMetadataV1Beta
  1507. raw := NoMethod(*s)
  1508. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1509. }
  1510. // OperationMetadataV1Beta5: Metadata for the given
  1511. // google.longrunning.Operation.
  1512. type OperationMetadataV1Beta5 struct {
  1513. // EndTime: Timestamp that this operation completed.@OutputOnly
  1514. EndTime string `json:"endTime,omitempty"`
  1515. // InsertTime: Timestamp that this operation was created.@OutputOnly
  1516. InsertTime string `json:"insertTime,omitempty"`
  1517. // Method: API method name that initiated this operation. Example:
  1518. // google.appengine.v1beta5.Version.CreateVersion.@OutputOnly
  1519. Method string `json:"method,omitempty"`
  1520. // Target: Name of the resource that this operation is acting on.
  1521. // Example: apps/myapp/services/default.@OutputOnly
  1522. Target string `json:"target,omitempty"`
  1523. // User: User who requested this operation.@OutputOnly
  1524. User string `json:"user,omitempty"`
  1525. // ForceSendFields is a list of field names (e.g. "EndTime") to
  1526. // unconditionally include in API requests. By default, fields with
  1527. // empty values are omitted from API requests. However, any non-pointer,
  1528. // non-interface field appearing in ForceSendFields will be sent to the
  1529. // server regardless of whether the field is empty or not. This may be
  1530. // used to include empty fields in Patch requests.
  1531. ForceSendFields []string `json:"-"`
  1532. // NullFields is a list of field names (e.g. "EndTime") to include in
  1533. // API requests with the JSON null value. By default, fields with empty
  1534. // values are omitted from API requests. However, any field with an
  1535. // empty value appearing in NullFields will be sent to the server as
  1536. // null. It is an error if a field in this list has a non-empty value.
  1537. // This may be used to include null fields in Patch requests.
  1538. NullFields []string `json:"-"`
  1539. }
  1540. func (s *OperationMetadataV1Beta5) MarshalJSON() ([]byte, error) {
  1541. type NoMethod OperationMetadataV1Beta5
  1542. raw := NoMethod(*s)
  1543. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1544. }
  1545. // RequestUtilization: Target scaling by request utilization. Only
  1546. // applicable for VM runtimes.
  1547. type RequestUtilization struct {
  1548. // TargetConcurrentRequests: Target number of concurrent requests.
  1549. TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"`
  1550. // TargetRequestCountPerSec: Target requests per second.
  1551. TargetRequestCountPerSec int64 `json:"targetRequestCountPerSec,omitempty"`
  1552. // ForceSendFields is a list of field names (e.g.
  1553. // "TargetConcurrentRequests") to unconditionally include in API
  1554. // requests. By default, fields with empty values are omitted from API
  1555. // requests. However, any non-pointer, non-interface field appearing in
  1556. // ForceSendFields will be sent to the server regardless of whether the
  1557. // field is empty or not. This may be used to include empty fields in
  1558. // Patch requests.
  1559. ForceSendFields []string `json:"-"`
  1560. // NullFields is a list of field names (e.g. "TargetConcurrentRequests")
  1561. // to include in API requests with the JSON null value. By default,
  1562. // fields with empty values are omitted from API requests. However, any
  1563. // field with an empty value appearing in NullFields will be sent to the
  1564. // server as null. It is an error if a field in this list has a
  1565. // non-empty value. This may be used to include null fields in Patch
  1566. // requests.
  1567. NullFields []string `json:"-"`
  1568. }
  1569. func (s *RequestUtilization) MarshalJSON() ([]byte, error) {
  1570. type NoMethod RequestUtilization
  1571. raw := NoMethod(*s)
  1572. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1573. }
  1574. // Resources: Machine resources for a version.
  1575. type Resources struct {
  1576. // Cpu: Number of CPU cores needed.
  1577. Cpu float64 `json:"cpu,omitempty"`
  1578. // DiskGb: Disk size (GB) needed.
  1579. DiskGb float64 `json:"diskGb,omitempty"`
  1580. // MemoryGb: Memory (GB) needed.
  1581. MemoryGb float64 `json:"memoryGb,omitempty"`
  1582. // Volumes: Volumes mounted within the app container.
  1583. Volumes []*Volume `json:"volumes,omitempty"`
  1584. // ForceSendFields is a list of field names (e.g. "Cpu") to
  1585. // unconditionally include in API requests. By default, fields with
  1586. // empty values are omitted from API requests. However, any non-pointer,
  1587. // non-interface field appearing in ForceSendFields will be sent to the
  1588. // server regardless of whether the field is empty or not. This may be
  1589. // used to include empty fields in Patch requests.
  1590. ForceSendFields []string `json:"-"`
  1591. // NullFields is a list of field names (e.g. "Cpu") to include in API
  1592. // requests with the JSON null value. By default, fields with empty
  1593. // values are omitted from API requests. However, any field with an
  1594. // empty value appearing in NullFields will be sent to the server as
  1595. // null. It is an error if a field in this list has a non-empty value.
  1596. // This may be used to include null fields in Patch requests.
  1597. NullFields []string `json:"-"`
  1598. }
  1599. func (s *Resources) MarshalJSON() ([]byte, error) {
  1600. type NoMethod Resources
  1601. raw := NoMethod(*s)
  1602. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1603. }
  1604. func (s *Resources) UnmarshalJSON(data []byte) error {
  1605. type NoMethod Resources
  1606. var s1 struct {
  1607. Cpu gensupport.JSONFloat64 `json:"cpu"`
  1608. DiskGb gensupport.JSONFloat64 `json:"diskGb"`
  1609. MemoryGb gensupport.JSONFloat64 `json:"memoryGb"`
  1610. *NoMethod
  1611. }
  1612. s1.NoMethod = (*NoMethod)(s)
  1613. if err := json.Unmarshal(data, &s1); err != nil {
  1614. return err
  1615. }
  1616. s.Cpu = float64(s1.Cpu)
  1617. s.DiskGb = float64(s1.DiskGb)
  1618. s.MemoryGb = float64(s1.MemoryGb)
  1619. return nil
  1620. }
  1621. // ScriptHandler: Executes a script to handle the request that matches
  1622. // the URL pattern.
  1623. type ScriptHandler struct {
  1624. // ScriptPath: Path to the script from the application root directory.
  1625. ScriptPath string `json:"scriptPath,omitempty"`
  1626. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  1627. // unconditionally include in API requests. By default, fields with
  1628. // empty values are omitted from API requests. However, any non-pointer,
  1629. // non-interface field appearing in ForceSendFields will be sent to the
  1630. // server regardless of whether the field is empty or not. This may be
  1631. // used to include empty fields in Patch requests.
  1632. ForceSendFields []string `json:"-"`
  1633. // NullFields is a list of field names (e.g. "ScriptPath") to include in
  1634. // API requests with the JSON null value. By default, fields with empty
  1635. // values are omitted from API requests. However, any field with an
  1636. // empty value appearing in NullFields will be sent to the server as
  1637. // null. It is an error if a field in this list has a non-empty value.
  1638. // This may be used to include null fields in Patch requests.
  1639. NullFields []string `json:"-"`
  1640. }
  1641. func (s *ScriptHandler) MarshalJSON() ([]byte, error) {
  1642. type NoMethod ScriptHandler
  1643. raw := NoMethod(*s)
  1644. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1645. }
  1646. // Service: A Service resource is a logical component of an application
  1647. // that can share state and communicate in a secure fashion with other
  1648. // services. For example, an application that handles customer requests
  1649. // might include separate services to handle other tasks such as API
  1650. // requests from mobile devices or backend data analysis. Each service
  1651. // has a collection of versions that define a specific set of code used
  1652. // to implement the functionality of that service.
  1653. type Service struct {
  1654. // Id: Relative name of the service within the application. Example:
  1655. // default.@OutputOnly
  1656. Id string `json:"id,omitempty"`
  1657. // Name: Full path to the Service resource in the API. Example:
  1658. // apps/myapp/services/default.@OutputOnly
  1659. Name string `json:"name,omitempty"`
  1660. // Split: Mapping that defines fractional HTTP traffic diversion to
  1661. // different versions within the service.
  1662. Split *TrafficSplit `json:"split,omitempty"`
  1663. // ServerResponse contains the HTTP response code and headers from the
  1664. // server.
  1665. googleapi.ServerResponse `json:"-"`
  1666. // ForceSendFields is a list of field names (e.g. "Id") to
  1667. // unconditionally include in API requests. By default, fields with
  1668. // empty values are omitted from API requests. However, any non-pointer,
  1669. // non-interface field appearing in ForceSendFields will be sent to the
  1670. // server regardless of whether the field is empty or not. This may be
  1671. // used to include empty fields in Patch requests.
  1672. ForceSendFields []string `json:"-"`
  1673. // NullFields is a list of field names (e.g. "Id") to include in API
  1674. // requests with the JSON null value. By default, fields with empty
  1675. // values are omitted from API requests. However, any field with an
  1676. // empty value appearing in NullFields will be sent to the server as
  1677. // null. It is an error if a field in this list has a non-empty value.
  1678. // This may be used to include null fields in Patch requests.
  1679. NullFields []string `json:"-"`
  1680. }
  1681. func (s *Service) MarshalJSON() ([]byte, error) {
  1682. type NoMethod Service
  1683. raw := NoMethod(*s)
  1684. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1685. }
  1686. // SourceReference: Reference to a particular snapshot of the source
  1687. // tree used to build and deploy the application.
  1688. type SourceReference struct {
  1689. // Repository: URI string identifying the repository. Example:
  1690. // "https://source.developers.google.com/p/app-123/r/default"
  1691. Repository string `json:"repository,omitempty"`
  1692. // RevisionId: The canonical, persistent identifier of the deployed
  1693. // revision. Aliases that include tags or branch names are not allowed.
  1694. // Example (git): "2198322f89e0bb2e25021667c2ed489d1fd34e6b"
  1695. RevisionId string `json:"revisionId,omitempty"`
  1696. // ForceSendFields is a list of field names (e.g. "Repository") to
  1697. // unconditionally include in API requests. By default, fields with
  1698. // empty values are omitted from API requests. However, any non-pointer,
  1699. // non-interface field appearing in ForceSendFields will be sent to the
  1700. // server regardless of whether the field is empty or not. This may be
  1701. // used to include empty fields in Patch requests.
  1702. ForceSendFields []string `json:"-"`
  1703. // NullFields is a list of field names (e.g. "Repository") to include in
  1704. // API requests with the JSON null value. By default, fields with empty
  1705. // values are omitted from API requests. However, any field with an
  1706. // empty value appearing in NullFields will be sent to the server as
  1707. // null. It is an error if a field in this list has a non-empty value.
  1708. // This may be used to include null fields in Patch requests.
  1709. NullFields []string `json:"-"`
  1710. }
  1711. func (s *SourceReference) MarshalJSON() ([]byte, error) {
  1712. type NoMethod SourceReference
  1713. raw := NoMethod(*s)
  1714. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1715. }
  1716. // StaticFilesHandler: Files served directly to the user for a given
  1717. // URL, such as images, CSS stylesheets, or JavaScript source files.
  1718. // Static file handlers describe which files in the application
  1719. // directory are static files, and which URLs serve them.
  1720. type StaticFilesHandler struct {
  1721. // ApplicationReadable: Whether files should also be uploaded as code
  1722. // data. By default, files declared in static file handlers are uploaded
  1723. // as static data and are only served to end users; they cannot be read
  1724. // by the application. If enabled, uploads are charged against both your
  1725. // code and static data storage resource quotas.
  1726. ApplicationReadable bool `json:"applicationReadable,omitempty"`
  1727. // Expiration: Time a static file served by this handler should be
  1728. // cached.
  1729. Expiration string `json:"expiration,omitempty"`
  1730. // HttpHeaders: HTTP headers to use for all responses from these URLs.
  1731. HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
  1732. // MimeType: MIME type used to serve all files served by this handler.
  1733. // Defaults to file-specific MIME types, which are derived from each
  1734. // file's filename extension.
  1735. MimeType string `json:"mimeType,omitempty"`
  1736. // Path: Path to the static files matched by the URL pattern, from the
  1737. // application root directory. The path can refer to text matched in
  1738. // groupings in the URL pattern.
  1739. Path string `json:"path,omitempty"`
  1740. // RequireMatchingFile: Whether this handler should match the request if
  1741. // the file referenced by the handler does not exist.
  1742. RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
  1743. // UploadPathRegex: Regular expression that matches the file paths for
  1744. // all files that should be referenced by this handler.
  1745. UploadPathRegex string `json:"uploadPathRegex,omitempty"`
  1746. // ForceSendFields is a list of field names (e.g. "ApplicationReadable")
  1747. // to unconditionally include in API requests. By default, fields with
  1748. // empty values are omitted from API requests. However, any non-pointer,
  1749. // non-interface field appearing in ForceSendFields will be sent to the
  1750. // server regardless of whether the field is empty or not. This may be
  1751. // used to include empty fields in Patch requests.
  1752. ForceSendFields []string `json:"-"`
  1753. // NullFields is a list of field names (e.g. "ApplicationReadable") to
  1754. // include in API requests with the JSON null value. By default, fields
  1755. // with empty values are omitted from API requests. However, any field
  1756. // with an empty value appearing in NullFields will be sent to the
  1757. // server as null. It is an error if a field in this list has a
  1758. // non-empty value. This may be used to include null fields in Patch
  1759. // requests.
  1760. NullFields []string `json:"-"`
  1761. }
  1762. func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) {
  1763. type NoMethod StaticFilesHandler
  1764. raw := NoMethod(*s)
  1765. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1766. }
  1767. // Status: The Status type defines a logical error model that is
  1768. // suitable for different programming environments, including REST APIs
  1769. // and RPC APIs. It is used by gRPC (https://github.com/grpc). The error
  1770. // model is designed to be:
  1771. // Simple to use and understand for most users
  1772. // Flexible enough to meet unexpected needsOverviewThe Status message
  1773. // contains three pieces of data: error code, error message, and error
  1774. // details. The error code should be an enum value of google.rpc.Code,
  1775. // but it may accept additional error codes if needed. The error message
  1776. // should be a developer-facing English message that helps developers
  1777. // understand and resolve the error. If a localized user-facing error
  1778. // message is needed, put the localized message in the error details or
  1779. // localize it in the client. The optional error details may contain
  1780. // arbitrary information about the error. There is a predefined set of
  1781. // error detail types in the package google.rpc that can be used for
  1782. // common error conditions.Language mappingThe Status message is the
  1783. // logical representation of the error model, but it is not necessarily
  1784. // the actual wire format. When the Status message is exposed in
  1785. // different client libraries and different wire protocols, it can be
  1786. // mapped differently. For example, it will likely be mapped to some
  1787. // exceptions in Java, but more likely mapped to some error codes in
  1788. // C.Other usesThe error model and the Status message can be used in a
  1789. // variety of environments, either with or without APIs, to provide a
  1790. // consistent developer experience across different environments.Example
  1791. // uses of this error model include:
  1792. // Partial errors. If a service needs to return partial errors to the
  1793. // client, it may embed the Status in the normal response to indicate
  1794. // the partial errors.
  1795. // Workflow errors. A typical workflow has multiple steps. Each step may
  1796. // have a Status message for error reporting.
  1797. // Batch operations. If a client uses batch request and batch response,
  1798. // the Status message should be used directly inside batch response, one
  1799. // for each error sub-response.
  1800. // Asynchronous operations. If an API call embeds asynchronous operation
  1801. // results in its response, the status of those operations should be
  1802. // represented directly using the Status message.
  1803. // Logging. If some API errors are stored in logs, the message Status
  1804. // could be used directly after any stripping needed for
  1805. // security/privacy reasons.
  1806. type Status struct {
  1807. // Code: The status code, which should be an enum value of
  1808. // google.rpc.Code.
  1809. Code int64 `json:"code,omitempty"`
  1810. // Details: A list of messages that carry the error details. There is a
  1811. // common set of message types for APIs to use.
  1812. Details []googleapi.RawMessage `json:"details,omitempty"`
  1813. // Message: A developer-facing error message, which should be in
  1814. // English. Any user-facing error message should be localized and sent
  1815. // in the google.rpc.Status.details field, or localized by the client.
  1816. Message string `json:"message,omitempty"`
  1817. // ForceSendFields is a list of field names (e.g. "Code") to
  1818. // unconditionally include in API requests. By default, fields with
  1819. // empty values are omitted from API requests. However, any non-pointer,
  1820. // non-interface field appearing in ForceSendFields will be sent to the
  1821. // server regardless of whether the field is empty or not. This may be
  1822. // used to include empty fields in Patch requests.
  1823. ForceSendFields []string `json:"-"`
  1824. // NullFields is a list of field names (e.g. "Code") to include in API
  1825. // requests with the JSON null value. By default, fields with empty
  1826. // values are omitted from API requests. However, any field with an
  1827. // empty value appearing in NullFields will be sent to the server as
  1828. // null. It is an error if a field in this list has a non-empty value.
  1829. // This may be used to include null fields in Patch requests.
  1830. NullFields []string `json:"-"`
  1831. }
  1832. func (s *Status) MarshalJSON() ([]byte, error) {
  1833. type NoMethod Status
  1834. raw := NoMethod(*s)
  1835. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1836. }
  1837. // TrafficSplit: Traffic routing configuration for versions within a
  1838. // single service. Traffic splits define how traffic directed to the
  1839. // service is assigned to versions.
  1840. type TrafficSplit struct {
  1841. // Allocations: Mapping from version IDs within the service to
  1842. // fractional (0.000, 1] allocations of traffic for that version. Each
  1843. // version can be specified only once, but some versions in the service
  1844. // may not have any traffic allocation. Services that have traffic
  1845. // allocated cannot be deleted until either the service is deleted or
  1846. // their traffic allocation is removed. Allocations must sum to 1. Up to
  1847. // two decimal place precision is supported for IP-based splits and up
  1848. // to three decimal places is supported for cookie-based splits.
  1849. Allocations map[string]float64 `json:"allocations,omitempty"`
  1850. // ShardBy: Mechanism used to determine which version a request is sent
  1851. // to. The traffic selection algorithm will be stable for either type
  1852. // until allocations are changed.
  1853. //
  1854. // Possible values:
  1855. // "UNSPECIFIED" - Diversion method unspecified.
  1856. // "COOKIE" - Diversion based on a specially named cookie,
  1857. // "GOOGAPPUID." The cookie must be set by the application itself or
  1858. // else no diversion will occur.
  1859. // "IP" - Diversion based on applying the modulus operation to a
  1860. // fingerprint of the IP address.
  1861. ShardBy string `json:"shardBy,omitempty"`
  1862. // ForceSendFields is a list of field names (e.g. "Allocations") to
  1863. // unconditionally include in API requests. By default, fields with
  1864. // empty values are omitted from API requests. However, any non-pointer,
  1865. // non-interface field appearing in ForceSendFields will be sent to the
  1866. // server regardless of whether the field is empty or not. This may be
  1867. // used to include empty fields in Patch requests.
  1868. ForceSendFields []string `json:"-"`
  1869. // NullFields is a list of field names (e.g. "Allocations") to include
  1870. // in API requests with the JSON null value. By default, fields with
  1871. // empty values are omitted from API requests. However, any field with
  1872. // an empty value appearing in NullFields will be sent to the server as
  1873. // null. It is an error if a field in this list has a non-empty value.
  1874. // This may be used to include null fields in Patch requests.
  1875. NullFields []string `json:"-"`
  1876. }
  1877. func (s *TrafficSplit) MarshalJSON() ([]byte, error) {
  1878. type NoMethod TrafficSplit
  1879. raw := NoMethod(*s)
  1880. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1881. }
  1882. // UrlDispatchRule: Rules to match an HTTP request and dispatch that
  1883. // request to a service.
  1884. type UrlDispatchRule struct {
  1885. // Domain: Domain name to match against. The wildcard "*" is supported
  1886. // if specified before a period: "*.".Defaults to matching all domains:
  1887. // "*".
  1888. Domain string `json:"domain,omitempty"`
  1889. // Path: Pathname within the host. Must start with a "/". A single "*"
  1890. // can be included at the end of the path. The sum of the lengths of the
  1891. // domain and path may not exceed 100 characters.
  1892. Path string `json:"path,omitempty"`
  1893. // Service: Resource id of a service in this application that should
  1894. // serve the matched request. The service must already exist. Example:
  1895. // default.
  1896. Service string `json:"service,omitempty"`
  1897. // ForceSendFields is a list of field names (e.g. "Domain") to
  1898. // unconditionally include in API requests. By default, fields with
  1899. // empty values are omitted from API requests. However, any non-pointer,
  1900. // non-interface field appearing in ForceSendFields will be sent to the
  1901. // server regardless of whether the field is empty or not. This may be
  1902. // used to include empty fields in Patch requests.
  1903. ForceSendFields []string `json:"-"`
  1904. // NullFields is a list of field names (e.g. "Domain") to include in API
  1905. // requests with the JSON null value. By default, fields with empty
  1906. // values are omitted from API requests. However, any field with an
  1907. // empty value appearing in NullFields will be sent to the server as
  1908. // null. It is an error if a field in this list has a non-empty value.
  1909. // This may be used to include null fields in Patch requests.
  1910. NullFields []string `json:"-"`
  1911. }
  1912. func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) {
  1913. type NoMethod UrlDispatchRule
  1914. raw := NoMethod(*s)
  1915. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1916. }
  1917. // UrlMap: URL pattern and description of how the URL should be handled.
  1918. // App Engine can handle URLs by executing application code, or by
  1919. // serving static files uploaded with the version, such as images, CSS,
  1920. // or JavaScript.
  1921. type UrlMap struct {
  1922. // ApiEndpoint: Uses API Endpoints to handle requests.
  1923. ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"`
  1924. // AuthFailAction: Action to take when users access resources that
  1925. // require authentication. Defaults to redirect.
  1926. //
  1927. // Possible values:
  1928. // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified.
  1929. // AUTH_FAIL_ACTION_REDIRECT is assumed.
  1930. // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to
  1931. // "accounts.google.com". The user is redirected back to the application
  1932. // URL after signing in or creating an account.
  1933. // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with an401 HTTP
  1934. // status code and an error message.
  1935. AuthFailAction string `json:"authFailAction,omitempty"`
  1936. // Login: Level of login required to access this resource.
  1937. //
  1938. // Possible values:
  1939. // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed.
  1940. // "LOGIN_OPTIONAL" - Does not require that the user is signed in.
  1941. // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action
  1942. // is taken. In addition, if the user is not an administrator for the
  1943. // application, they are given an error message regardless of
  1944. // auth_fail_action. If the user is an administrator, the handler
  1945. // proceeds.
  1946. // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds
  1947. // normally. Otherwise, the action given in auth_fail_action is taken.
  1948. Login string `json:"login,omitempty"`
  1949. // RedirectHttpResponseCode: 30x code to use when performing redirects
  1950. // for the secure field. Defaults to 302.
  1951. //
  1952. // Possible values:
  1953. // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" - Not specified. 302 is
  1954. // assumed.
  1955. // "REDIRECT_HTTP_RESPONSE_CODE_301" - 301 Moved Permanently code.
  1956. // "REDIRECT_HTTP_RESPONSE_CODE_302" - 302 Moved Temporarily code.
  1957. // "REDIRECT_HTTP_RESPONSE_CODE_303" - 303 See Other code.
  1958. // "REDIRECT_HTTP_RESPONSE_CODE_307" - 307 Temporary Redirect code.
  1959. RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"`
  1960. // Script: Executes a script to handle the request that matches this URL
  1961. // pattern.
  1962. Script *ScriptHandler `json:"script,omitempty"`
  1963. // SecurityLevel: Security (HTTPS) enforcement for this URL.
  1964. //
  1965. // Possible values:
  1966. // "SECURE_UNSPECIFIED" - Not specified.
  1967. // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that
  1968. // match the handler succeed without redirects. The application can
  1969. // examine the request to determine which protocol was used, and respond
  1970. // accordingly.
  1971. // "SECURE_NEVER" - Requests for a URL that match this handler that
  1972. // use HTTPS are automatically redirected to the HTTP equivalent URL.
  1973. // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that
  1974. // match the handler succeed without redirects. The application can
  1975. // examine the request to determine which protocol was used and respond
  1976. // accordingly.
  1977. // "SECURE_ALWAYS" - Requests for a URL that match this handler that
  1978. // do not use HTTPS are automatically redirected to the HTTPS URL with
  1979. // the same path. Query parameters are reserved for the redirect.
  1980. SecurityLevel string `json:"securityLevel,omitempty"`
  1981. // StaticFiles: Returns the contents of a file, such as an image, as the
  1982. // response.
  1983. StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"`
  1984. // UrlRegex: A URL prefix. Uses regular expression syntax, which means
  1985. // regexp special characters must be escaped, but should not contain
  1986. // groupings. All URLs that begin with this prefix are handled by this
  1987. // handler, using the portion of the URL after the prefix as part of the
  1988. // file path.
  1989. UrlRegex string `json:"urlRegex,omitempty"`
  1990. // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to
  1991. // unconditionally include in API requests. By default, fields with
  1992. // empty values are omitted from API requests. However, any non-pointer,
  1993. // non-interface field appearing in ForceSendFields will be sent to the
  1994. // server regardless of whether the field is empty or not. This may be
  1995. // used to include empty fields in Patch requests.
  1996. ForceSendFields []string `json:"-"`
  1997. // NullFields is a list of field names (e.g. "ApiEndpoint") to include
  1998. // in API requests with the JSON null value. By default, fields with
  1999. // empty values are omitted from API requests. However, any field with
  2000. // an empty value appearing in NullFields will be sent to the server as
  2001. // null. It is an error if a field in this list has a non-empty value.
  2002. // This may be used to include null fields in Patch requests.
  2003. NullFields []string `json:"-"`
  2004. }
  2005. func (s *UrlMap) MarshalJSON() ([]byte, error) {
  2006. type NoMethod UrlMap
  2007. raw := NoMethod(*s)
  2008. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2009. }
  2010. // Version: A Version resource is a specific set of source code and
  2011. // configuration files that are deployed into a service.
  2012. type Version struct {
  2013. // ApiConfig: Serving configuration for Google Cloud Endpoints
  2014. // (https://cloud.google.com/appengine/docs/python/endpoints/).Only
  2015. // returned in GET requests if view=FULL is set.
  2016. ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"`
  2017. // AutomaticScaling: Automatic scaling is based on request rate,
  2018. // response latencies, and other application metrics.
  2019. AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"`
  2020. // BasicScaling: A service with basic scaling will create an instance
  2021. // when the application receives a request. The instance will be turned
  2022. // down when the app becomes idle. Basic scaling is ideal for work that
  2023. // is intermittent or driven by user activity.
  2024. BasicScaling *BasicScaling `json:"basicScaling,omitempty"`
  2025. // BetaSettings: Metadata settings that are supplied to this version to
  2026. // enable beta runtime features.
  2027. BetaSettings map[string]string `json:"betaSettings,omitempty"`
  2028. // CreationTime: Time that this version was created.@OutputOnly
  2029. CreationTime string `json:"creationTime,omitempty"`
  2030. // DefaultExpiration: Duration that static files should be cached by web
  2031. // proxies and browsers. Only applicable if the corresponding
  2032. // StaticFilesHandler
  2033. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  2034. // pps.services.versions#staticfileshandler) does not specify its own
  2035. // expiration time.Only returned in GET requests if view=FULL is set.
  2036. DefaultExpiration string `json:"defaultExpiration,omitempty"`
  2037. // Deployer: Email address of the user who created this
  2038. // version.@OutputOnly
  2039. Deployer string `json:"deployer,omitempty"`
  2040. // Deployment: Code and application artifacts that make up this
  2041. // version.Only returned in GET requests if view=FULL is set.
  2042. Deployment *Deployment `json:"deployment,omitempty"`
  2043. // DiskUsageBytes: Total size of version files hosted on App Engine disk
  2044. // in bytes.@OutputOnly
  2045. DiskUsageBytes int64 `json:"diskUsageBytes,omitempty,string"`
  2046. // EndpointsApiService: Cloud Endpoints configuration.If
  2047. // endpoints_api_service is set, the Cloud Endpoints Extensible Service
  2048. // Proxy will be provided to serve the API implemented by the app.
  2049. EndpointsApiService *EndpointsApiService `json:"endpointsApiService,omitempty"`
  2050. // Env: App Engine execution environment to use for this
  2051. // version.Defaults to 1.
  2052. Env string `json:"env,omitempty"`
  2053. // EnvVariables: Environment variables made available to the
  2054. // application.Only returned in GET requests if view=FULL is set.
  2055. EnvVariables map[string]string `json:"envVariables,omitempty"`
  2056. // ErrorHandlers: Custom static error pages. Limited to 10KB per
  2057. // page.Only returned in GET requests if view=FULL is set.
  2058. ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"`
  2059. // Handlers: An ordered list of URL-matching patterns that should be
  2060. // applied to incoming requests. The first matching URL handles the
  2061. // request and other request handlers are not attempted.Only returned in
  2062. // GET requests if view=FULL is set.
  2063. Handlers []*UrlMap `json:"handlers,omitempty"`
  2064. // HealthCheck: Configures health checking for VM instances. Unhealthy
  2065. // instances are be stopped and replaced with new instances. Only
  2066. // applicable for VM runtimes.Only returned in GET requests if view=FULL
  2067. // is set.
  2068. HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
  2069. // Id: Relative name of the version within the module. Example: v1.
  2070. // Version names can contain only lowercase letters, numbers, or
  2071. // hyphens. Reserved names: "default", "latest", and any name with the
  2072. // prefix "ah-".
  2073. Id string `json:"id,omitempty"`
  2074. // InboundServices: Before an application can receive email or XMPP
  2075. // messages, the application must be configured to enable the service.
  2076. //
  2077. // Possible values:
  2078. // "INBOUND_SERVICE_UNSPECIFIED" - Not specified.
  2079. // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail.
  2080. // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive
  2081. // email-bound notifications.
  2082. // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive
  2083. // error stanzas.
  2084. // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive
  2085. // instant messages.
  2086. // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive
  2087. // user subscription POSTs.
  2088. // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive
  2089. // a user's chat presence.
  2090. // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for
  2091. // notifications when a client connects or disconnects from a channel.
  2092. // "INBOUND_SERVICE_WARMUP" - Enables warmup requests.
  2093. InboundServices []string `json:"inboundServices,omitempty"`
  2094. // InstanceClass: Instance class that is used to run this version. Valid
  2095. // values are:
  2096. // AutomaticScaling: F1, F2, F4, F4_1G
  2097. // ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1
  2098. // for AutomaticScaling and B1 for ManualScaling or BasicScaling.
  2099. InstanceClass string `json:"instanceClass,omitempty"`
  2100. // Libraries: Configuration for third-party Python runtime libraries
  2101. // required by the application.Only returned in GET requests if
  2102. // view=FULL is set.
  2103. Libraries []*Library `json:"libraries,omitempty"`
  2104. // ManualScaling: A service with manual scaling runs continuously,
  2105. // allowing you to perform complex initialization and rely on the state
  2106. // of its memory over time.
  2107. ManualScaling *ManualScaling `json:"manualScaling,omitempty"`
  2108. // Name: Full path to the Version resource in the API. Example:
  2109. // apps/myapp/services/default/versions/v1.@OutputOnly
  2110. Name string `json:"name,omitempty"`
  2111. // Network: Extra network settings. Only applicable for VM runtimes.
  2112. Network *Network `json:"network,omitempty"`
  2113. // NobuildFilesRegex: Files that match this pattern will not be built
  2114. // into this version. Only applicable for Go runtimes.Only returned in
  2115. // GET requests if view=FULL is set.
  2116. NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"`
  2117. // Resources: Machine resources for this version. Only applicable for VM
  2118. // runtimes.
  2119. Resources *Resources `json:"resources,omitempty"`
  2120. // Runtime: Desired runtime. Example: python27.
  2121. Runtime string `json:"runtime,omitempty"`
  2122. // RuntimeApiVersion: The version of the API in the given runtime
  2123. // environment. Please see the app.yaml reference for valid values at
  2124. // https://cloud.google.com/appengine/docs/standard/<language>/config/appref
  2125. RuntimeApiVersion string `json:"runtimeApiVersion,omitempty"`
  2126. // RuntimeMainExecutablePath: The path or name of the app's main
  2127. // executable.
  2128. RuntimeMainExecutablePath string `json:"runtimeMainExecutablePath,omitempty"`
  2129. // ServingStatus: Current serving status of this version. Only the
  2130. // versions with a SERVING status create instances and can be
  2131. // billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to
  2132. // SERVING.
  2133. //
  2134. // Possible values:
  2135. // "SERVING_STATUS_UNSPECIFIED" - Not specified.
  2136. // "SERVING" - Currently serving. Instances are created according to
  2137. // the scaling settings of the version.
  2138. // "STOPPED" - Disabled from serving. No instances will be created and
  2139. // the scaling settings are ignored until the state of the version
  2140. // changes to SERVING.
  2141. ServingStatus string `json:"servingStatus,omitempty"`
  2142. // Threadsafe: Whether multiple requests can be dispatched to this
  2143. // version at once.
  2144. Threadsafe bool `json:"threadsafe,omitempty"`
  2145. // Vm: Whether to deploy this version in a container on a virtual
  2146. // machine.
  2147. Vm bool `json:"vm,omitempty"`
  2148. // ServerResponse contains the HTTP response code and headers from the
  2149. // server.
  2150. googleapi.ServerResponse `json:"-"`
  2151. // ForceSendFields is a list of field names (e.g. "ApiConfig") to
  2152. // unconditionally include in API requests. By default, fields with
  2153. // empty values are omitted from API requests. However, any non-pointer,
  2154. // non-interface field appearing in ForceSendFields will be sent to the
  2155. // server regardless of whether the field is empty or not. This may be
  2156. // used to include empty fields in Patch requests.
  2157. ForceSendFields []string `json:"-"`
  2158. // NullFields is a list of field names (e.g. "ApiConfig") to include in
  2159. // API requests with the JSON null value. By default, fields with empty
  2160. // values are omitted from API requests. However, any field with an
  2161. // empty value appearing in NullFields will be sent to the server as
  2162. // null. It is an error if a field in this list has a non-empty value.
  2163. // This may be used to include null fields in Patch requests.
  2164. NullFields []string `json:"-"`
  2165. }
  2166. func (s *Version) MarshalJSON() ([]byte, error) {
  2167. type NoMethod Version
  2168. raw := NoMethod(*s)
  2169. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2170. }
  2171. // Volume: Volumes mounted within the app container. Only applicable for
  2172. // VM runtimes.
  2173. type Volume struct {
  2174. // Name: Unique name for the volume.
  2175. Name string `json:"name,omitempty"`
  2176. // SizeGb: Volume size in gigabytes.
  2177. SizeGb float64 `json:"sizeGb,omitempty"`
  2178. // VolumeType: Underlying volume type, e.g. 'tmpfs'.
  2179. VolumeType string `json:"volumeType,omitempty"`
  2180. // ForceSendFields is a list of field names (e.g. "Name") to
  2181. // unconditionally include in API requests. By default, fields with
  2182. // empty values are omitted from API requests. However, any non-pointer,
  2183. // non-interface field appearing in ForceSendFields will be sent to the
  2184. // server regardless of whether the field is empty or not. This may be
  2185. // used to include empty fields in Patch requests.
  2186. ForceSendFields []string `json:"-"`
  2187. // NullFields is a list of field names (e.g. "Name") to include in API
  2188. // requests with the JSON null value. By default, fields with empty
  2189. // values are omitted from API requests. However, any field with an
  2190. // empty value appearing in NullFields will be sent to the server as
  2191. // null. It is an error if a field in this list has a non-empty value.
  2192. // This may be used to include null fields in Patch requests.
  2193. NullFields []string `json:"-"`
  2194. }
  2195. func (s *Volume) MarshalJSON() ([]byte, error) {
  2196. type NoMethod Volume
  2197. raw := NoMethod(*s)
  2198. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2199. }
  2200. func (s *Volume) UnmarshalJSON(data []byte) error {
  2201. type NoMethod Volume
  2202. var s1 struct {
  2203. SizeGb gensupport.JSONFloat64 `json:"sizeGb"`
  2204. *NoMethod
  2205. }
  2206. s1.NoMethod = (*NoMethod)(s)
  2207. if err := json.Unmarshal(data, &s1); err != nil {
  2208. return err
  2209. }
  2210. s.SizeGb = float64(s1.SizeGb)
  2211. return nil
  2212. }
  2213. // method id "appengine.apps.create":
  2214. type AppsCreateCall struct {
  2215. s *APIService
  2216. application *Application
  2217. urlParams_ gensupport.URLParams
  2218. ctx_ context.Context
  2219. header_ http.Header
  2220. }
  2221. // Create: Creates an App Engine application for a Google Cloud Platform
  2222. // project. Required fields:
  2223. // id - The ID of the target Cloud Platform project.
  2224. // location - The region
  2225. // (https://cloud.google.com/appengine/docs/locations) where you want
  2226. // the App Engine application located.For more information about App
  2227. // Engine applications, see Managing Projects, Applications, and Billing
  2228. // (https://cloud.google.com/appengine/docs/python/console/).
  2229. func (r *AppsService) Create(application *Application) *AppsCreateCall {
  2230. c := &AppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2231. c.application = application
  2232. return c
  2233. }
  2234. // Fields allows partial responses to be retrieved. See
  2235. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2236. // for more information.
  2237. func (c *AppsCreateCall) Fields(s ...googleapi.Field) *AppsCreateCall {
  2238. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2239. return c
  2240. }
  2241. // Context sets the context to be used in this call's Do method. Any
  2242. // pending HTTP request will be aborted if the provided context is
  2243. // canceled.
  2244. func (c *AppsCreateCall) Context(ctx context.Context) *AppsCreateCall {
  2245. c.ctx_ = ctx
  2246. return c
  2247. }
  2248. // Header returns an http.Header that can be modified by the caller to
  2249. // add HTTP headers to the request.
  2250. func (c *AppsCreateCall) Header() http.Header {
  2251. if c.header_ == nil {
  2252. c.header_ = make(http.Header)
  2253. }
  2254. return c.header_
  2255. }
  2256. func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) {
  2257. reqHeaders := make(http.Header)
  2258. for k, v := range c.header_ {
  2259. reqHeaders[k] = v
  2260. }
  2261. reqHeaders.Set("User-Agent", c.s.userAgent())
  2262. var body io.Reader = nil
  2263. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  2264. if err != nil {
  2265. return nil, err
  2266. }
  2267. reqHeaders.Set("Content-Type", "application/json")
  2268. c.urlParams_.Set("alt", alt)
  2269. c.urlParams_.Set("prettyPrint", "false")
  2270. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps")
  2271. urls += "?" + c.urlParams_.Encode()
  2272. req, err := http.NewRequest("POST", urls, body)
  2273. if err != nil {
  2274. return nil, err
  2275. }
  2276. req.Header = reqHeaders
  2277. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2278. }
  2279. // Do executes the "appengine.apps.create" call.
  2280. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2281. // status code is an error. Response headers are in either
  2282. // *Operation.ServerResponse.Header or (if a response was returned at
  2283. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2284. // to check whether the returned error was because
  2285. // http.StatusNotModified was returned.
  2286. func (c *AppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2287. gensupport.SetOptions(c.urlParams_, opts...)
  2288. res, err := c.doRequest("json")
  2289. if res != nil && res.StatusCode == http.StatusNotModified {
  2290. if res.Body != nil {
  2291. res.Body.Close()
  2292. }
  2293. return nil, &googleapi.Error{
  2294. Code: res.StatusCode,
  2295. Header: res.Header,
  2296. }
  2297. }
  2298. if err != nil {
  2299. return nil, err
  2300. }
  2301. defer googleapi.CloseBody(res)
  2302. if err := googleapi.CheckResponse(res); err != nil {
  2303. return nil, err
  2304. }
  2305. ret := &Operation{
  2306. ServerResponse: googleapi.ServerResponse{
  2307. Header: res.Header,
  2308. HTTPStatusCode: res.StatusCode,
  2309. },
  2310. }
  2311. target := &ret
  2312. if err := gensupport.DecodeResponse(target, res); err != nil {
  2313. return nil, err
  2314. }
  2315. return ret, nil
  2316. // {
  2317. // "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).",
  2318. // "flatPath": "v1beta5/apps",
  2319. // "httpMethod": "POST",
  2320. // "id": "appengine.apps.create",
  2321. // "parameterOrder": [],
  2322. // "parameters": {},
  2323. // "path": "v1beta5/apps",
  2324. // "request": {
  2325. // "$ref": "Application"
  2326. // },
  2327. // "response": {
  2328. // "$ref": "Operation"
  2329. // },
  2330. // "scopes": [
  2331. // "https://www.googleapis.com/auth/cloud-platform"
  2332. // ]
  2333. // }
  2334. }
  2335. // method id "appengine.apps.get":
  2336. type AppsGetCall struct {
  2337. s *APIService
  2338. appsId string
  2339. urlParams_ gensupport.URLParams
  2340. ifNoneMatch_ string
  2341. ctx_ context.Context
  2342. header_ http.Header
  2343. }
  2344. // Get: Gets information about an application.
  2345. func (r *AppsService) Get(appsId string) *AppsGetCall {
  2346. c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2347. c.appsId = appsId
  2348. return c
  2349. }
  2350. // EnsureResourcesExist sets the optional parameter
  2351. // "ensureResourcesExist": Certain resources associated with an
  2352. // application are created on-demand. Controls whether these resources
  2353. // should be created when performing the GET operation. If specified and
  2354. // any resources could not be created, the request will fail with an
  2355. // error code. Additionally, this parameter can cause the request to
  2356. // take longer to complete. Note: This parameter will be deprecated in a
  2357. // future version of the API.
  2358. func (c *AppsGetCall) EnsureResourcesExist(ensureResourcesExist bool) *AppsGetCall {
  2359. c.urlParams_.Set("ensureResourcesExist", fmt.Sprint(ensureResourcesExist))
  2360. return c
  2361. }
  2362. // Fields allows partial responses to be retrieved. See
  2363. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2364. // for more information.
  2365. func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
  2366. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2367. return c
  2368. }
  2369. // IfNoneMatch sets the optional parameter which makes the operation
  2370. // fail if the object's ETag matches the given value. This is useful for
  2371. // getting updates only after the object has changed since the last
  2372. // request. Use googleapi.IsNotModified to check whether the response
  2373. // error from Do is the result of In-None-Match.
  2374. func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
  2375. c.ifNoneMatch_ = entityTag
  2376. return c
  2377. }
  2378. // Context sets the context to be used in this call's Do method. Any
  2379. // pending HTTP request will be aborted if the provided context is
  2380. // canceled.
  2381. func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
  2382. c.ctx_ = ctx
  2383. return c
  2384. }
  2385. // Header returns an http.Header that can be modified by the caller to
  2386. // add HTTP headers to the request.
  2387. func (c *AppsGetCall) Header() http.Header {
  2388. if c.header_ == nil {
  2389. c.header_ = make(http.Header)
  2390. }
  2391. return c.header_
  2392. }
  2393. func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
  2394. reqHeaders := make(http.Header)
  2395. for k, v := range c.header_ {
  2396. reqHeaders[k] = v
  2397. }
  2398. reqHeaders.Set("User-Agent", c.s.userAgent())
  2399. if c.ifNoneMatch_ != "" {
  2400. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2401. }
  2402. var body io.Reader = nil
  2403. c.urlParams_.Set("alt", alt)
  2404. c.urlParams_.Set("prettyPrint", "false")
  2405. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}")
  2406. urls += "?" + c.urlParams_.Encode()
  2407. req, err := http.NewRequest("GET", urls, body)
  2408. if err != nil {
  2409. return nil, err
  2410. }
  2411. req.Header = reqHeaders
  2412. googleapi.Expand(req.URL, map[string]string{
  2413. "appsId": c.appsId,
  2414. })
  2415. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2416. }
  2417. // Do executes the "appengine.apps.get" call.
  2418. // Exactly one of *Application or error will be non-nil. Any non-2xx
  2419. // status code is an error. Response headers are in either
  2420. // *Application.ServerResponse.Header or (if a response was returned at
  2421. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2422. // to check whether the returned error was because
  2423. // http.StatusNotModified was returned.
  2424. func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
  2425. gensupport.SetOptions(c.urlParams_, opts...)
  2426. res, err := c.doRequest("json")
  2427. if res != nil && res.StatusCode == http.StatusNotModified {
  2428. if res.Body != nil {
  2429. res.Body.Close()
  2430. }
  2431. return nil, &googleapi.Error{
  2432. Code: res.StatusCode,
  2433. Header: res.Header,
  2434. }
  2435. }
  2436. if err != nil {
  2437. return nil, err
  2438. }
  2439. defer googleapi.CloseBody(res)
  2440. if err := googleapi.CheckResponse(res); err != nil {
  2441. return nil, err
  2442. }
  2443. ret := &Application{
  2444. ServerResponse: googleapi.ServerResponse{
  2445. Header: res.Header,
  2446. HTTPStatusCode: res.StatusCode,
  2447. },
  2448. }
  2449. target := &ret
  2450. if err := gensupport.DecodeResponse(target, res); err != nil {
  2451. return nil, err
  2452. }
  2453. return ret, nil
  2454. // {
  2455. // "description": "Gets information about an application.",
  2456. // "flatPath": "v1beta5/apps/{appsId}",
  2457. // "httpMethod": "GET",
  2458. // "id": "appengine.apps.get",
  2459. // "parameterOrder": [
  2460. // "appsId"
  2461. // ],
  2462. // "parameters": {
  2463. // "appsId": {
  2464. // "description": "Part of `name`. Name of the application to get. Example: apps/myapp.",
  2465. // "location": "path",
  2466. // "required": true,
  2467. // "type": "string"
  2468. // },
  2469. // "ensureResourcesExist": {
  2470. // "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete. Note: This parameter will be deprecated in a future version of the API.",
  2471. // "location": "query",
  2472. // "type": "boolean"
  2473. // }
  2474. // },
  2475. // "path": "v1beta5/apps/{appsId}",
  2476. // "response": {
  2477. // "$ref": "Application"
  2478. // },
  2479. // "scopes": [
  2480. // "https://www.googleapis.com/auth/cloud-platform"
  2481. // ]
  2482. // }
  2483. }
  2484. // method id "appengine.apps.patch":
  2485. type AppsPatchCall struct {
  2486. s *APIService
  2487. appsId string
  2488. application *Application
  2489. urlParams_ gensupport.URLParams
  2490. ctx_ context.Context
  2491. header_ http.Header
  2492. }
  2493. // Patch: Updates the specified Application resource. You can update the
  2494. // following fields:
  2495. // auth_domain
  2496. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  2497. // ta5/apps#Application.FIELDS.auth_domain)
  2498. // default_cookie_expiration
  2499. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  2500. // ta5/apps#Application.FIELDS.default_cookie_expiration)
  2501. func (r *AppsService) Patch(appsId string, application *Application) *AppsPatchCall {
  2502. c := &AppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2503. c.appsId = appsId
  2504. c.application = application
  2505. return c
  2506. }
  2507. // Mask sets the optional parameter "mask": Standard field mask for the
  2508. // set of fields to be updated.
  2509. func (c *AppsPatchCall) Mask(mask string) *AppsPatchCall {
  2510. c.urlParams_.Set("mask", mask)
  2511. return c
  2512. }
  2513. // Fields allows partial responses to be retrieved. See
  2514. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2515. // for more information.
  2516. func (c *AppsPatchCall) Fields(s ...googleapi.Field) *AppsPatchCall {
  2517. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2518. return c
  2519. }
  2520. // Context sets the context to be used in this call's Do method. Any
  2521. // pending HTTP request will be aborted if the provided context is
  2522. // canceled.
  2523. func (c *AppsPatchCall) Context(ctx context.Context) *AppsPatchCall {
  2524. c.ctx_ = ctx
  2525. return c
  2526. }
  2527. // Header returns an http.Header that can be modified by the caller to
  2528. // add HTTP headers to the request.
  2529. func (c *AppsPatchCall) Header() http.Header {
  2530. if c.header_ == nil {
  2531. c.header_ = make(http.Header)
  2532. }
  2533. return c.header_
  2534. }
  2535. func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) {
  2536. reqHeaders := make(http.Header)
  2537. for k, v := range c.header_ {
  2538. reqHeaders[k] = v
  2539. }
  2540. reqHeaders.Set("User-Agent", c.s.userAgent())
  2541. var body io.Reader = nil
  2542. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  2543. if err != nil {
  2544. return nil, err
  2545. }
  2546. reqHeaders.Set("Content-Type", "application/json")
  2547. c.urlParams_.Set("alt", alt)
  2548. c.urlParams_.Set("prettyPrint", "false")
  2549. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}")
  2550. urls += "?" + c.urlParams_.Encode()
  2551. req, err := http.NewRequest("PATCH", urls, body)
  2552. if err != nil {
  2553. return nil, err
  2554. }
  2555. req.Header = reqHeaders
  2556. googleapi.Expand(req.URL, map[string]string{
  2557. "appsId": c.appsId,
  2558. })
  2559. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2560. }
  2561. // Do executes the "appengine.apps.patch" call.
  2562. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2563. // status code is an error. Response headers are in either
  2564. // *Operation.ServerResponse.Header or (if a response was returned at
  2565. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2566. // to check whether the returned error was because
  2567. // http.StatusNotModified was returned.
  2568. func (c *AppsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2569. gensupport.SetOptions(c.urlParams_, opts...)
  2570. res, err := c.doRequest("json")
  2571. if res != nil && res.StatusCode == http.StatusNotModified {
  2572. if res.Body != nil {
  2573. res.Body.Close()
  2574. }
  2575. return nil, &googleapi.Error{
  2576. Code: res.StatusCode,
  2577. Header: res.Header,
  2578. }
  2579. }
  2580. if err != nil {
  2581. return nil, err
  2582. }
  2583. defer googleapi.CloseBody(res)
  2584. if err := googleapi.CheckResponse(res); err != nil {
  2585. return nil, err
  2586. }
  2587. ret := &Operation{
  2588. ServerResponse: googleapi.ServerResponse{
  2589. Header: res.Header,
  2590. HTTPStatusCode: res.StatusCode,
  2591. },
  2592. }
  2593. target := &ret
  2594. if err := gensupport.DecodeResponse(target, res); err != nil {
  2595. return nil, err
  2596. }
  2597. return ret, nil
  2598. // {
  2599. // "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)",
  2600. // "flatPath": "v1beta5/apps/{appsId}",
  2601. // "httpMethod": "PATCH",
  2602. // "id": "appengine.apps.patch",
  2603. // "parameterOrder": [
  2604. // "appsId"
  2605. // ],
  2606. // "parameters": {
  2607. // "appsId": {
  2608. // "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.",
  2609. // "location": "path",
  2610. // "required": true,
  2611. // "type": "string"
  2612. // },
  2613. // "mask": {
  2614. // "description": "Standard field mask for the set of fields to be updated.",
  2615. // "format": "google-fieldmask",
  2616. // "location": "query",
  2617. // "type": "string"
  2618. // }
  2619. // },
  2620. // "path": "v1beta5/apps/{appsId}",
  2621. // "request": {
  2622. // "$ref": "Application"
  2623. // },
  2624. // "response": {
  2625. // "$ref": "Operation"
  2626. // },
  2627. // "scopes": [
  2628. // "https://www.googleapis.com/auth/cloud-platform"
  2629. // ]
  2630. // }
  2631. }
  2632. // method id "appengine.apps.locations.get":
  2633. type AppsLocationsGetCall struct {
  2634. s *APIService
  2635. appsId string
  2636. locationsId string
  2637. urlParams_ gensupport.URLParams
  2638. ifNoneMatch_ string
  2639. ctx_ context.Context
  2640. header_ http.Header
  2641. }
  2642. // Get: Gets information about a location.
  2643. func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall {
  2644. c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2645. c.appsId = appsId
  2646. c.locationsId = locationsId
  2647. return c
  2648. }
  2649. // Fields allows partial responses to be retrieved. See
  2650. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2651. // for more information.
  2652. func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall {
  2653. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2654. return c
  2655. }
  2656. // IfNoneMatch sets the optional parameter which makes the operation
  2657. // fail if the object's ETag matches the given value. This is useful for
  2658. // getting updates only after the object has changed since the last
  2659. // request. Use googleapi.IsNotModified to check whether the response
  2660. // error from Do is the result of In-None-Match.
  2661. func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall {
  2662. c.ifNoneMatch_ = entityTag
  2663. return c
  2664. }
  2665. // Context sets the context to be used in this call's Do method. Any
  2666. // pending HTTP request will be aborted if the provided context is
  2667. // canceled.
  2668. func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall {
  2669. c.ctx_ = ctx
  2670. return c
  2671. }
  2672. // Header returns an http.Header that can be modified by the caller to
  2673. // add HTTP headers to the request.
  2674. func (c *AppsLocationsGetCall) Header() http.Header {
  2675. if c.header_ == nil {
  2676. c.header_ = make(http.Header)
  2677. }
  2678. return c.header_
  2679. }
  2680. func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  2681. reqHeaders := make(http.Header)
  2682. for k, v := range c.header_ {
  2683. reqHeaders[k] = v
  2684. }
  2685. reqHeaders.Set("User-Agent", c.s.userAgent())
  2686. if c.ifNoneMatch_ != "" {
  2687. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2688. }
  2689. var body io.Reader = nil
  2690. c.urlParams_.Set("alt", alt)
  2691. c.urlParams_.Set("prettyPrint", "false")
  2692. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/locations/{locationsId}")
  2693. urls += "?" + c.urlParams_.Encode()
  2694. req, err := http.NewRequest("GET", urls, body)
  2695. if err != nil {
  2696. return nil, err
  2697. }
  2698. req.Header = reqHeaders
  2699. googleapi.Expand(req.URL, map[string]string{
  2700. "appsId": c.appsId,
  2701. "locationsId": c.locationsId,
  2702. })
  2703. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2704. }
  2705. // Do executes the "appengine.apps.locations.get" call.
  2706. // Exactly one of *Location or error will be non-nil. Any non-2xx status
  2707. // code is an error. Response headers are in either
  2708. // *Location.ServerResponse.Header or (if a response was returned at
  2709. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2710. // to check whether the returned error was because
  2711. // http.StatusNotModified was returned.
  2712. func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2713. gensupport.SetOptions(c.urlParams_, opts...)
  2714. res, err := c.doRequest("json")
  2715. if res != nil && res.StatusCode == http.StatusNotModified {
  2716. if res.Body != nil {
  2717. res.Body.Close()
  2718. }
  2719. return nil, &googleapi.Error{
  2720. Code: res.StatusCode,
  2721. Header: res.Header,
  2722. }
  2723. }
  2724. if err != nil {
  2725. return nil, err
  2726. }
  2727. defer googleapi.CloseBody(res)
  2728. if err := googleapi.CheckResponse(res); err != nil {
  2729. return nil, err
  2730. }
  2731. ret := &Location{
  2732. ServerResponse: googleapi.ServerResponse{
  2733. Header: res.Header,
  2734. HTTPStatusCode: res.StatusCode,
  2735. },
  2736. }
  2737. target := &ret
  2738. if err := gensupport.DecodeResponse(target, res); err != nil {
  2739. return nil, err
  2740. }
  2741. return ret, nil
  2742. // {
  2743. // "description": "Gets information about a location.",
  2744. // "flatPath": "v1beta5/apps/{appsId}/locations/{locationsId}",
  2745. // "httpMethod": "GET",
  2746. // "id": "appengine.apps.locations.get",
  2747. // "parameterOrder": [
  2748. // "appsId",
  2749. // "locationsId"
  2750. // ],
  2751. // "parameters": {
  2752. // "appsId": {
  2753. // "description": "Part of `name`. Resource name for the location.",
  2754. // "location": "path",
  2755. // "required": true,
  2756. // "type": "string"
  2757. // },
  2758. // "locationsId": {
  2759. // "description": "Part of `name`. See documentation of `appsId`.",
  2760. // "location": "path",
  2761. // "required": true,
  2762. // "type": "string"
  2763. // }
  2764. // },
  2765. // "path": "v1beta5/apps/{appsId}/locations/{locationsId}",
  2766. // "response": {
  2767. // "$ref": "Location"
  2768. // },
  2769. // "scopes": [
  2770. // "https://www.googleapis.com/auth/appengine.admin",
  2771. // "https://www.googleapis.com/auth/cloud-platform",
  2772. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2773. // ]
  2774. // }
  2775. }
  2776. // method id "appengine.apps.locations.list":
  2777. type AppsLocationsListCall struct {
  2778. s *APIService
  2779. appsId string
  2780. urlParams_ gensupport.URLParams
  2781. ifNoneMatch_ string
  2782. ctx_ context.Context
  2783. header_ http.Header
  2784. }
  2785. // List: Lists information about the supported locations for this
  2786. // service.
  2787. func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall {
  2788. c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2789. c.appsId = appsId
  2790. return c
  2791. }
  2792. // Filter sets the optional parameter "filter": The standard list
  2793. // filter.
  2794. func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall {
  2795. c.urlParams_.Set("filter", filter)
  2796. return c
  2797. }
  2798. // PageSize sets the optional parameter "pageSize": The standard list
  2799. // page size.
  2800. func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall {
  2801. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2802. return c
  2803. }
  2804. // PageToken sets the optional parameter "pageToken": The standard list
  2805. // page token.
  2806. func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall {
  2807. c.urlParams_.Set("pageToken", pageToken)
  2808. return c
  2809. }
  2810. // Fields allows partial responses to be retrieved. See
  2811. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2812. // for more information.
  2813. func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall {
  2814. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2815. return c
  2816. }
  2817. // IfNoneMatch sets the optional parameter which makes the operation
  2818. // fail if the object's ETag matches the given value. This is useful for
  2819. // getting updates only after the object has changed since the last
  2820. // request. Use googleapi.IsNotModified to check whether the response
  2821. // error from Do is the result of In-None-Match.
  2822. func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall {
  2823. c.ifNoneMatch_ = entityTag
  2824. return c
  2825. }
  2826. // Context sets the context to be used in this call's Do method. Any
  2827. // pending HTTP request will be aborted if the provided context is
  2828. // canceled.
  2829. func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall {
  2830. c.ctx_ = ctx
  2831. return c
  2832. }
  2833. // Header returns an http.Header that can be modified by the caller to
  2834. // add HTTP headers to the request.
  2835. func (c *AppsLocationsListCall) Header() http.Header {
  2836. if c.header_ == nil {
  2837. c.header_ = make(http.Header)
  2838. }
  2839. return c.header_
  2840. }
  2841. func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2842. reqHeaders := make(http.Header)
  2843. for k, v := range c.header_ {
  2844. reqHeaders[k] = v
  2845. }
  2846. reqHeaders.Set("User-Agent", c.s.userAgent())
  2847. if c.ifNoneMatch_ != "" {
  2848. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2849. }
  2850. var body io.Reader = nil
  2851. c.urlParams_.Set("alt", alt)
  2852. c.urlParams_.Set("prettyPrint", "false")
  2853. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/locations")
  2854. urls += "?" + c.urlParams_.Encode()
  2855. req, err := http.NewRequest("GET", urls, body)
  2856. if err != nil {
  2857. return nil, err
  2858. }
  2859. req.Header = reqHeaders
  2860. googleapi.Expand(req.URL, map[string]string{
  2861. "appsId": c.appsId,
  2862. })
  2863. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2864. }
  2865. // Do executes the "appengine.apps.locations.list" call.
  2866. // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  2867. // non-2xx status code is an error. Response headers are in either
  2868. // *ListLocationsResponse.ServerResponse.Header or (if a response was
  2869. // returned at all) in error.(*googleapi.Error).Header. Use
  2870. // googleapi.IsNotModified to check whether the returned error was
  2871. // because http.StatusNotModified was returned.
  2872. func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2873. gensupport.SetOptions(c.urlParams_, opts...)
  2874. res, err := c.doRequest("json")
  2875. if res != nil && res.StatusCode == http.StatusNotModified {
  2876. if res.Body != nil {
  2877. res.Body.Close()
  2878. }
  2879. return nil, &googleapi.Error{
  2880. Code: res.StatusCode,
  2881. Header: res.Header,
  2882. }
  2883. }
  2884. if err != nil {
  2885. return nil, err
  2886. }
  2887. defer googleapi.CloseBody(res)
  2888. if err := googleapi.CheckResponse(res); err != nil {
  2889. return nil, err
  2890. }
  2891. ret := &ListLocationsResponse{
  2892. ServerResponse: googleapi.ServerResponse{
  2893. Header: res.Header,
  2894. HTTPStatusCode: res.StatusCode,
  2895. },
  2896. }
  2897. target := &ret
  2898. if err := gensupport.DecodeResponse(target, res); err != nil {
  2899. return nil, err
  2900. }
  2901. return ret, nil
  2902. // {
  2903. // "description": "Lists information about the supported locations for this service.",
  2904. // "flatPath": "v1beta5/apps/{appsId}/locations",
  2905. // "httpMethod": "GET",
  2906. // "id": "appengine.apps.locations.list",
  2907. // "parameterOrder": [
  2908. // "appsId"
  2909. // ],
  2910. // "parameters": {
  2911. // "appsId": {
  2912. // "description": "Part of `name`. The resource that owns the locations collection, if applicable.",
  2913. // "location": "path",
  2914. // "required": true,
  2915. // "type": "string"
  2916. // },
  2917. // "filter": {
  2918. // "description": "The standard list filter.",
  2919. // "location": "query",
  2920. // "type": "string"
  2921. // },
  2922. // "pageSize": {
  2923. // "description": "The standard list page size.",
  2924. // "format": "int32",
  2925. // "location": "query",
  2926. // "type": "integer"
  2927. // },
  2928. // "pageToken": {
  2929. // "description": "The standard list page token.",
  2930. // "location": "query",
  2931. // "type": "string"
  2932. // }
  2933. // },
  2934. // "path": "v1beta5/apps/{appsId}/locations",
  2935. // "response": {
  2936. // "$ref": "ListLocationsResponse"
  2937. // },
  2938. // "scopes": [
  2939. // "https://www.googleapis.com/auth/appengine.admin",
  2940. // "https://www.googleapis.com/auth/cloud-platform",
  2941. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2942. // ]
  2943. // }
  2944. }
  2945. // Pages invokes f for each page of results.
  2946. // A non-nil error returned from f will halt the iteration.
  2947. // The provided context supersedes any context provided to the Context method.
  2948. func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2949. c.ctx_ = ctx
  2950. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2951. for {
  2952. x, err := c.Do()
  2953. if err != nil {
  2954. return err
  2955. }
  2956. if err := f(x); err != nil {
  2957. return err
  2958. }
  2959. if x.NextPageToken == "" {
  2960. return nil
  2961. }
  2962. c.PageToken(x.NextPageToken)
  2963. }
  2964. }
  2965. // method id "appengine.apps.operations.get":
  2966. type AppsOperationsGetCall struct {
  2967. s *APIService
  2968. appsId string
  2969. operationsId string
  2970. urlParams_ gensupport.URLParams
  2971. ifNoneMatch_ string
  2972. ctx_ context.Context
  2973. header_ http.Header
  2974. }
  2975. // Get: Gets the latest state of a long-running operation. Clients can
  2976. // use this method to poll the operation result at intervals as
  2977. // recommended by the API service.
  2978. func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall {
  2979. c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2980. c.appsId = appsId
  2981. c.operationsId = operationsId
  2982. return c
  2983. }
  2984. // Fields allows partial responses to be retrieved. See
  2985. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2986. // for more information.
  2987. func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall {
  2988. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2989. return c
  2990. }
  2991. // IfNoneMatch sets the optional parameter which makes the operation
  2992. // fail if the object's ETag matches the given value. This is useful for
  2993. // getting updates only after the object has changed since the last
  2994. // request. Use googleapi.IsNotModified to check whether the response
  2995. // error from Do is the result of In-None-Match.
  2996. func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall {
  2997. c.ifNoneMatch_ = entityTag
  2998. return c
  2999. }
  3000. // Context sets the context to be used in this call's Do method. Any
  3001. // pending HTTP request will be aborted if the provided context is
  3002. // canceled.
  3003. func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall {
  3004. c.ctx_ = ctx
  3005. return c
  3006. }
  3007. // Header returns an http.Header that can be modified by the caller to
  3008. // add HTTP headers to the request.
  3009. func (c *AppsOperationsGetCall) Header() http.Header {
  3010. if c.header_ == nil {
  3011. c.header_ = make(http.Header)
  3012. }
  3013. return c.header_
  3014. }
  3015. func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3016. reqHeaders := make(http.Header)
  3017. for k, v := range c.header_ {
  3018. reqHeaders[k] = v
  3019. }
  3020. reqHeaders.Set("User-Agent", c.s.userAgent())
  3021. if c.ifNoneMatch_ != "" {
  3022. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3023. }
  3024. var body io.Reader = nil
  3025. c.urlParams_.Set("alt", alt)
  3026. c.urlParams_.Set("prettyPrint", "false")
  3027. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/operations/{operationsId}")
  3028. urls += "?" + c.urlParams_.Encode()
  3029. req, err := http.NewRequest("GET", urls, body)
  3030. if err != nil {
  3031. return nil, err
  3032. }
  3033. req.Header = reqHeaders
  3034. googleapi.Expand(req.URL, map[string]string{
  3035. "appsId": c.appsId,
  3036. "operationsId": c.operationsId,
  3037. })
  3038. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3039. }
  3040. // Do executes the "appengine.apps.operations.get" call.
  3041. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3042. // status code is an error. Response headers are in either
  3043. // *Operation.ServerResponse.Header or (if a response was returned at
  3044. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3045. // to check whether the returned error was because
  3046. // http.StatusNotModified was returned.
  3047. func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3048. gensupport.SetOptions(c.urlParams_, opts...)
  3049. res, err := c.doRequest("json")
  3050. if res != nil && res.StatusCode == http.StatusNotModified {
  3051. if res.Body != nil {
  3052. res.Body.Close()
  3053. }
  3054. return nil, &googleapi.Error{
  3055. Code: res.StatusCode,
  3056. Header: res.Header,
  3057. }
  3058. }
  3059. if err != nil {
  3060. return nil, err
  3061. }
  3062. defer googleapi.CloseBody(res)
  3063. if err := googleapi.CheckResponse(res); err != nil {
  3064. return nil, err
  3065. }
  3066. ret := &Operation{
  3067. ServerResponse: googleapi.ServerResponse{
  3068. Header: res.Header,
  3069. HTTPStatusCode: res.StatusCode,
  3070. },
  3071. }
  3072. target := &ret
  3073. if err := gensupport.DecodeResponse(target, res); err != nil {
  3074. return nil, err
  3075. }
  3076. return ret, nil
  3077. // {
  3078. // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
  3079. // "flatPath": "v1beta5/apps/{appsId}/operations/{operationsId}",
  3080. // "httpMethod": "GET",
  3081. // "id": "appengine.apps.operations.get",
  3082. // "parameterOrder": [
  3083. // "appsId",
  3084. // "operationsId"
  3085. // ],
  3086. // "parameters": {
  3087. // "appsId": {
  3088. // "description": "Part of `name`. The name of the operation resource.",
  3089. // "location": "path",
  3090. // "required": true,
  3091. // "type": "string"
  3092. // },
  3093. // "operationsId": {
  3094. // "description": "Part of `name`. See documentation of `appsId`.",
  3095. // "location": "path",
  3096. // "required": true,
  3097. // "type": "string"
  3098. // }
  3099. // },
  3100. // "path": "v1beta5/apps/{appsId}/operations/{operationsId}",
  3101. // "response": {
  3102. // "$ref": "Operation"
  3103. // },
  3104. // "scopes": [
  3105. // "https://www.googleapis.com/auth/appengine.admin",
  3106. // "https://www.googleapis.com/auth/cloud-platform",
  3107. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3108. // ]
  3109. // }
  3110. }
  3111. // method id "appengine.apps.operations.list":
  3112. type AppsOperationsListCall struct {
  3113. s *APIService
  3114. appsId string
  3115. urlParams_ gensupport.URLParams
  3116. ifNoneMatch_ string
  3117. ctx_ context.Context
  3118. header_ http.Header
  3119. }
  3120. // List: Lists operations that match the specified filter in the
  3121. // request. If the server doesn't support this method, it returns
  3122. // UNIMPLEMENTED.NOTE: the name binding allows API services to override
  3123. // the binding to use different resource name schemes, such as
  3124. // users/*/operations. To override the binding, API services can add a
  3125. // binding such as "/v1/{name=users/*}/operations" to their service
  3126. // configuration. For backwards compatibility, the default name includes
  3127. // the operations collection id, however overriding users must ensure
  3128. // the name binding is the parent resource, without the operations
  3129. // collection id.
  3130. func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall {
  3131. c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3132. c.appsId = appsId
  3133. return c
  3134. }
  3135. // Filter sets the optional parameter "filter": The standard list
  3136. // filter.
  3137. func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall {
  3138. c.urlParams_.Set("filter", filter)
  3139. return c
  3140. }
  3141. // PageSize sets the optional parameter "pageSize": The standard list
  3142. // page size.
  3143. func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall {
  3144. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3145. return c
  3146. }
  3147. // PageToken sets the optional parameter "pageToken": The standard list
  3148. // page token.
  3149. func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall {
  3150. c.urlParams_.Set("pageToken", pageToken)
  3151. return c
  3152. }
  3153. // Fields allows partial responses to be retrieved. See
  3154. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3155. // for more information.
  3156. func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall {
  3157. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3158. return c
  3159. }
  3160. // IfNoneMatch sets the optional parameter which makes the operation
  3161. // fail if the object's ETag matches the given value. This is useful for
  3162. // getting updates only after the object has changed since the last
  3163. // request. Use googleapi.IsNotModified to check whether the response
  3164. // error from Do is the result of In-None-Match.
  3165. func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall {
  3166. c.ifNoneMatch_ = entityTag
  3167. return c
  3168. }
  3169. // Context sets the context to be used in this call's Do method. Any
  3170. // pending HTTP request will be aborted if the provided context is
  3171. // canceled.
  3172. func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall {
  3173. c.ctx_ = ctx
  3174. return c
  3175. }
  3176. // Header returns an http.Header that can be modified by the caller to
  3177. // add HTTP headers to the request.
  3178. func (c *AppsOperationsListCall) Header() http.Header {
  3179. if c.header_ == nil {
  3180. c.header_ = make(http.Header)
  3181. }
  3182. return c.header_
  3183. }
  3184. func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3185. reqHeaders := make(http.Header)
  3186. for k, v := range c.header_ {
  3187. reqHeaders[k] = v
  3188. }
  3189. reqHeaders.Set("User-Agent", c.s.userAgent())
  3190. if c.ifNoneMatch_ != "" {
  3191. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3192. }
  3193. var body io.Reader = nil
  3194. c.urlParams_.Set("alt", alt)
  3195. c.urlParams_.Set("prettyPrint", "false")
  3196. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/operations")
  3197. urls += "?" + c.urlParams_.Encode()
  3198. req, err := http.NewRequest("GET", urls, body)
  3199. if err != nil {
  3200. return nil, err
  3201. }
  3202. req.Header = reqHeaders
  3203. googleapi.Expand(req.URL, map[string]string{
  3204. "appsId": c.appsId,
  3205. })
  3206. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3207. }
  3208. // Do executes the "appengine.apps.operations.list" call.
  3209. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  3210. // non-2xx status code is an error. Response headers are in either
  3211. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  3212. // returned at all) in error.(*googleapi.Error).Header. Use
  3213. // googleapi.IsNotModified to check whether the returned error was
  3214. // because http.StatusNotModified was returned.
  3215. func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  3216. gensupport.SetOptions(c.urlParams_, opts...)
  3217. res, err := c.doRequest("json")
  3218. if res != nil && res.StatusCode == http.StatusNotModified {
  3219. if res.Body != nil {
  3220. res.Body.Close()
  3221. }
  3222. return nil, &googleapi.Error{
  3223. Code: res.StatusCode,
  3224. Header: res.Header,
  3225. }
  3226. }
  3227. if err != nil {
  3228. return nil, err
  3229. }
  3230. defer googleapi.CloseBody(res)
  3231. if err := googleapi.CheckResponse(res); err != nil {
  3232. return nil, err
  3233. }
  3234. ret := &ListOperationsResponse{
  3235. ServerResponse: googleapi.ServerResponse{
  3236. Header: res.Header,
  3237. HTTPStatusCode: res.StatusCode,
  3238. },
  3239. }
  3240. target := &ret
  3241. if err := gensupport.DecodeResponse(target, res); err != nil {
  3242. return nil, err
  3243. }
  3244. return ret, nil
  3245. // {
  3246. // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
  3247. // "flatPath": "v1beta5/apps/{appsId}/operations",
  3248. // "httpMethod": "GET",
  3249. // "id": "appengine.apps.operations.list",
  3250. // "parameterOrder": [
  3251. // "appsId"
  3252. // ],
  3253. // "parameters": {
  3254. // "appsId": {
  3255. // "description": "Part of `name`. The name of the operation's parent resource.",
  3256. // "location": "path",
  3257. // "required": true,
  3258. // "type": "string"
  3259. // },
  3260. // "filter": {
  3261. // "description": "The standard list filter.",
  3262. // "location": "query",
  3263. // "type": "string"
  3264. // },
  3265. // "pageSize": {
  3266. // "description": "The standard list page size.",
  3267. // "format": "int32",
  3268. // "location": "query",
  3269. // "type": "integer"
  3270. // },
  3271. // "pageToken": {
  3272. // "description": "The standard list page token.",
  3273. // "location": "query",
  3274. // "type": "string"
  3275. // }
  3276. // },
  3277. // "path": "v1beta5/apps/{appsId}/operations",
  3278. // "response": {
  3279. // "$ref": "ListOperationsResponse"
  3280. // },
  3281. // "scopes": [
  3282. // "https://www.googleapis.com/auth/appengine.admin",
  3283. // "https://www.googleapis.com/auth/cloud-platform",
  3284. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3285. // ]
  3286. // }
  3287. }
  3288. // Pages invokes f for each page of results.
  3289. // A non-nil error returned from f will halt the iteration.
  3290. // The provided context supersedes any context provided to the Context method.
  3291. func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  3292. c.ctx_ = ctx
  3293. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3294. for {
  3295. x, err := c.Do()
  3296. if err != nil {
  3297. return err
  3298. }
  3299. if err := f(x); err != nil {
  3300. return err
  3301. }
  3302. if x.NextPageToken == "" {
  3303. return nil
  3304. }
  3305. c.PageToken(x.NextPageToken)
  3306. }
  3307. }
  3308. // method id "appengine.apps.services.delete":
  3309. type AppsServicesDeleteCall struct {
  3310. s *APIService
  3311. appsId string
  3312. servicesId string
  3313. urlParams_ gensupport.URLParams
  3314. ctx_ context.Context
  3315. header_ http.Header
  3316. }
  3317. // Delete: Deletes the specified service and all enclosed versions.
  3318. func (r *AppsServicesService) Delete(appsId string, servicesId string) *AppsServicesDeleteCall {
  3319. c := &AppsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3320. c.appsId = appsId
  3321. c.servicesId = servicesId
  3322. return c
  3323. }
  3324. // Fields allows partial responses to be retrieved. See
  3325. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3326. // for more information.
  3327. func (c *AppsServicesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesDeleteCall {
  3328. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3329. return c
  3330. }
  3331. // Context sets the context to be used in this call's Do method. Any
  3332. // pending HTTP request will be aborted if the provided context is
  3333. // canceled.
  3334. func (c *AppsServicesDeleteCall) Context(ctx context.Context) *AppsServicesDeleteCall {
  3335. c.ctx_ = ctx
  3336. return c
  3337. }
  3338. // Header returns an http.Header that can be modified by the caller to
  3339. // add HTTP headers to the request.
  3340. func (c *AppsServicesDeleteCall) Header() http.Header {
  3341. if c.header_ == nil {
  3342. c.header_ = make(http.Header)
  3343. }
  3344. return c.header_
  3345. }
  3346. func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3347. reqHeaders := make(http.Header)
  3348. for k, v := range c.header_ {
  3349. reqHeaders[k] = v
  3350. }
  3351. reqHeaders.Set("User-Agent", c.s.userAgent())
  3352. var body io.Reader = nil
  3353. c.urlParams_.Set("alt", alt)
  3354. c.urlParams_.Set("prettyPrint", "false")
  3355. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}")
  3356. urls += "?" + c.urlParams_.Encode()
  3357. req, err := http.NewRequest("DELETE", urls, body)
  3358. if err != nil {
  3359. return nil, err
  3360. }
  3361. req.Header = reqHeaders
  3362. googleapi.Expand(req.URL, map[string]string{
  3363. "appsId": c.appsId,
  3364. "servicesId": c.servicesId,
  3365. })
  3366. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3367. }
  3368. // Do executes the "appengine.apps.services.delete" call.
  3369. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3370. // status code is an error. Response headers are in either
  3371. // *Operation.ServerResponse.Header or (if a response was returned at
  3372. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3373. // to check whether the returned error was because
  3374. // http.StatusNotModified was returned.
  3375. func (c *AppsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3376. gensupport.SetOptions(c.urlParams_, opts...)
  3377. res, err := c.doRequest("json")
  3378. if res != nil && res.StatusCode == http.StatusNotModified {
  3379. if res.Body != nil {
  3380. res.Body.Close()
  3381. }
  3382. return nil, &googleapi.Error{
  3383. Code: res.StatusCode,
  3384. Header: res.Header,
  3385. }
  3386. }
  3387. if err != nil {
  3388. return nil, err
  3389. }
  3390. defer googleapi.CloseBody(res)
  3391. if err := googleapi.CheckResponse(res); err != nil {
  3392. return nil, err
  3393. }
  3394. ret := &Operation{
  3395. ServerResponse: googleapi.ServerResponse{
  3396. Header: res.Header,
  3397. HTTPStatusCode: res.StatusCode,
  3398. },
  3399. }
  3400. target := &ret
  3401. if err := gensupport.DecodeResponse(target, res); err != nil {
  3402. return nil, err
  3403. }
  3404. return ret, nil
  3405. // {
  3406. // "description": "Deletes the specified service and all enclosed versions.",
  3407. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}",
  3408. // "httpMethod": "DELETE",
  3409. // "id": "appengine.apps.services.delete",
  3410. // "parameterOrder": [
  3411. // "appsId",
  3412. // "servicesId"
  3413. // ],
  3414. // "parameters": {
  3415. // "appsId": {
  3416. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  3417. // "location": "path",
  3418. // "required": true,
  3419. // "type": "string"
  3420. // },
  3421. // "servicesId": {
  3422. // "description": "Part of `name`. See documentation of `appsId`.",
  3423. // "location": "path",
  3424. // "required": true,
  3425. // "type": "string"
  3426. // }
  3427. // },
  3428. // "path": "v1beta5/apps/{appsId}/services/{servicesId}",
  3429. // "response": {
  3430. // "$ref": "Operation"
  3431. // },
  3432. // "scopes": [
  3433. // "https://www.googleapis.com/auth/cloud-platform"
  3434. // ]
  3435. // }
  3436. }
  3437. // method id "appengine.apps.services.get":
  3438. type AppsServicesGetCall struct {
  3439. s *APIService
  3440. appsId string
  3441. servicesId string
  3442. urlParams_ gensupport.URLParams
  3443. ifNoneMatch_ string
  3444. ctx_ context.Context
  3445. header_ http.Header
  3446. }
  3447. // Get: Gets the current configuration of the specified service.
  3448. func (r *AppsServicesService) Get(appsId string, servicesId string) *AppsServicesGetCall {
  3449. c := &AppsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3450. c.appsId = appsId
  3451. c.servicesId = servicesId
  3452. return c
  3453. }
  3454. // Fields allows partial responses to be retrieved. See
  3455. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3456. // for more information.
  3457. func (c *AppsServicesGetCall) Fields(s ...googleapi.Field) *AppsServicesGetCall {
  3458. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3459. return c
  3460. }
  3461. // IfNoneMatch sets the optional parameter which makes the operation
  3462. // fail if the object's ETag matches the given value. This is useful for
  3463. // getting updates only after the object has changed since the last
  3464. // request. Use googleapi.IsNotModified to check whether the response
  3465. // error from Do is the result of In-None-Match.
  3466. func (c *AppsServicesGetCall) IfNoneMatch(entityTag string) *AppsServicesGetCall {
  3467. c.ifNoneMatch_ = entityTag
  3468. return c
  3469. }
  3470. // Context sets the context to be used in this call's Do method. Any
  3471. // pending HTTP request will be aborted if the provided context is
  3472. // canceled.
  3473. func (c *AppsServicesGetCall) Context(ctx context.Context) *AppsServicesGetCall {
  3474. c.ctx_ = ctx
  3475. return c
  3476. }
  3477. // Header returns an http.Header that can be modified by the caller to
  3478. // add HTTP headers to the request.
  3479. func (c *AppsServicesGetCall) Header() http.Header {
  3480. if c.header_ == nil {
  3481. c.header_ = make(http.Header)
  3482. }
  3483. return c.header_
  3484. }
  3485. func (c *AppsServicesGetCall) doRequest(alt string) (*http.Response, error) {
  3486. reqHeaders := make(http.Header)
  3487. for k, v := range c.header_ {
  3488. reqHeaders[k] = v
  3489. }
  3490. reqHeaders.Set("User-Agent", c.s.userAgent())
  3491. if c.ifNoneMatch_ != "" {
  3492. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3493. }
  3494. var body io.Reader = nil
  3495. c.urlParams_.Set("alt", alt)
  3496. c.urlParams_.Set("prettyPrint", "false")
  3497. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}")
  3498. urls += "?" + c.urlParams_.Encode()
  3499. req, err := http.NewRequest("GET", urls, body)
  3500. if err != nil {
  3501. return nil, err
  3502. }
  3503. req.Header = reqHeaders
  3504. googleapi.Expand(req.URL, map[string]string{
  3505. "appsId": c.appsId,
  3506. "servicesId": c.servicesId,
  3507. })
  3508. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3509. }
  3510. // Do executes the "appengine.apps.services.get" call.
  3511. // Exactly one of *Service or error will be non-nil. Any non-2xx status
  3512. // code is an error. Response headers are in either
  3513. // *Service.ServerResponse.Header or (if a response was returned at all)
  3514. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3515. // check whether the returned error was because http.StatusNotModified
  3516. // was returned.
  3517. func (c *AppsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
  3518. gensupport.SetOptions(c.urlParams_, opts...)
  3519. res, err := c.doRequest("json")
  3520. if res != nil && res.StatusCode == http.StatusNotModified {
  3521. if res.Body != nil {
  3522. res.Body.Close()
  3523. }
  3524. return nil, &googleapi.Error{
  3525. Code: res.StatusCode,
  3526. Header: res.Header,
  3527. }
  3528. }
  3529. if err != nil {
  3530. return nil, err
  3531. }
  3532. defer googleapi.CloseBody(res)
  3533. if err := googleapi.CheckResponse(res); err != nil {
  3534. return nil, err
  3535. }
  3536. ret := &Service{
  3537. ServerResponse: googleapi.ServerResponse{
  3538. Header: res.Header,
  3539. HTTPStatusCode: res.StatusCode,
  3540. },
  3541. }
  3542. target := &ret
  3543. if err := gensupport.DecodeResponse(target, res); err != nil {
  3544. return nil, err
  3545. }
  3546. return ret, nil
  3547. // {
  3548. // "description": "Gets the current configuration of the specified service.",
  3549. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}",
  3550. // "httpMethod": "GET",
  3551. // "id": "appengine.apps.services.get",
  3552. // "parameterOrder": [
  3553. // "appsId",
  3554. // "servicesId"
  3555. // ],
  3556. // "parameters": {
  3557. // "appsId": {
  3558. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  3559. // "location": "path",
  3560. // "required": true,
  3561. // "type": "string"
  3562. // },
  3563. // "servicesId": {
  3564. // "description": "Part of `name`. See documentation of `appsId`.",
  3565. // "location": "path",
  3566. // "required": true,
  3567. // "type": "string"
  3568. // }
  3569. // },
  3570. // "path": "v1beta5/apps/{appsId}/services/{servicesId}",
  3571. // "response": {
  3572. // "$ref": "Service"
  3573. // },
  3574. // "scopes": [
  3575. // "https://www.googleapis.com/auth/appengine.admin",
  3576. // "https://www.googleapis.com/auth/cloud-platform",
  3577. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3578. // ]
  3579. // }
  3580. }
  3581. // method id "appengine.apps.services.list":
  3582. type AppsServicesListCall struct {
  3583. s *APIService
  3584. appsId string
  3585. urlParams_ gensupport.URLParams
  3586. ifNoneMatch_ string
  3587. ctx_ context.Context
  3588. header_ http.Header
  3589. }
  3590. // List: Lists all the services in the application.
  3591. func (r *AppsServicesService) List(appsId string) *AppsServicesListCall {
  3592. c := &AppsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3593. c.appsId = appsId
  3594. return c
  3595. }
  3596. // PageSize sets the optional parameter "pageSize": Maximum results to
  3597. // return per page.
  3598. func (c *AppsServicesListCall) PageSize(pageSize int64) *AppsServicesListCall {
  3599. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3600. return c
  3601. }
  3602. // PageToken sets the optional parameter "pageToken": Continuation token
  3603. // for fetching the next page of results.
  3604. func (c *AppsServicesListCall) PageToken(pageToken string) *AppsServicesListCall {
  3605. c.urlParams_.Set("pageToken", pageToken)
  3606. return c
  3607. }
  3608. // Fields allows partial responses to be retrieved. See
  3609. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3610. // for more information.
  3611. func (c *AppsServicesListCall) Fields(s ...googleapi.Field) *AppsServicesListCall {
  3612. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3613. return c
  3614. }
  3615. // IfNoneMatch sets the optional parameter which makes the operation
  3616. // fail if the object's ETag matches the given value. This is useful for
  3617. // getting updates only after the object has changed since the last
  3618. // request. Use googleapi.IsNotModified to check whether the response
  3619. // error from Do is the result of In-None-Match.
  3620. func (c *AppsServicesListCall) IfNoneMatch(entityTag string) *AppsServicesListCall {
  3621. c.ifNoneMatch_ = entityTag
  3622. return c
  3623. }
  3624. // Context sets the context to be used in this call's Do method. Any
  3625. // pending HTTP request will be aborted if the provided context is
  3626. // canceled.
  3627. func (c *AppsServicesListCall) Context(ctx context.Context) *AppsServicesListCall {
  3628. c.ctx_ = ctx
  3629. return c
  3630. }
  3631. // Header returns an http.Header that can be modified by the caller to
  3632. // add HTTP headers to the request.
  3633. func (c *AppsServicesListCall) Header() http.Header {
  3634. if c.header_ == nil {
  3635. c.header_ = make(http.Header)
  3636. }
  3637. return c.header_
  3638. }
  3639. func (c *AppsServicesListCall) doRequest(alt string) (*http.Response, error) {
  3640. reqHeaders := make(http.Header)
  3641. for k, v := range c.header_ {
  3642. reqHeaders[k] = v
  3643. }
  3644. reqHeaders.Set("User-Agent", c.s.userAgent())
  3645. if c.ifNoneMatch_ != "" {
  3646. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3647. }
  3648. var body io.Reader = nil
  3649. c.urlParams_.Set("alt", alt)
  3650. c.urlParams_.Set("prettyPrint", "false")
  3651. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services")
  3652. urls += "?" + c.urlParams_.Encode()
  3653. req, err := http.NewRequest("GET", urls, body)
  3654. if err != nil {
  3655. return nil, err
  3656. }
  3657. req.Header = reqHeaders
  3658. googleapi.Expand(req.URL, map[string]string{
  3659. "appsId": c.appsId,
  3660. })
  3661. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3662. }
  3663. // Do executes the "appengine.apps.services.list" call.
  3664. // Exactly one of *ListServicesResponse or error will be non-nil. Any
  3665. // non-2xx status code is an error. Response headers are in either
  3666. // *ListServicesResponse.ServerResponse.Header or (if a response was
  3667. // returned at all) in error.(*googleapi.Error).Header. Use
  3668. // googleapi.IsNotModified to check whether the returned error was
  3669. // because http.StatusNotModified was returned.
  3670. func (c *AppsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
  3671. gensupport.SetOptions(c.urlParams_, opts...)
  3672. res, err := c.doRequest("json")
  3673. if res != nil && res.StatusCode == http.StatusNotModified {
  3674. if res.Body != nil {
  3675. res.Body.Close()
  3676. }
  3677. return nil, &googleapi.Error{
  3678. Code: res.StatusCode,
  3679. Header: res.Header,
  3680. }
  3681. }
  3682. if err != nil {
  3683. return nil, err
  3684. }
  3685. defer googleapi.CloseBody(res)
  3686. if err := googleapi.CheckResponse(res); err != nil {
  3687. return nil, err
  3688. }
  3689. ret := &ListServicesResponse{
  3690. ServerResponse: googleapi.ServerResponse{
  3691. Header: res.Header,
  3692. HTTPStatusCode: res.StatusCode,
  3693. },
  3694. }
  3695. target := &ret
  3696. if err := gensupport.DecodeResponse(target, res); err != nil {
  3697. return nil, err
  3698. }
  3699. return ret, nil
  3700. // {
  3701. // "description": "Lists all the services in the application.",
  3702. // "flatPath": "v1beta5/apps/{appsId}/services",
  3703. // "httpMethod": "GET",
  3704. // "id": "appengine.apps.services.list",
  3705. // "parameterOrder": [
  3706. // "appsId"
  3707. // ],
  3708. // "parameters": {
  3709. // "appsId": {
  3710. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.",
  3711. // "location": "path",
  3712. // "required": true,
  3713. // "type": "string"
  3714. // },
  3715. // "pageSize": {
  3716. // "description": "Maximum results to return per page.",
  3717. // "format": "int32",
  3718. // "location": "query",
  3719. // "type": "integer"
  3720. // },
  3721. // "pageToken": {
  3722. // "description": "Continuation token for fetching the next page of results.",
  3723. // "location": "query",
  3724. // "type": "string"
  3725. // }
  3726. // },
  3727. // "path": "v1beta5/apps/{appsId}/services",
  3728. // "response": {
  3729. // "$ref": "ListServicesResponse"
  3730. // },
  3731. // "scopes": [
  3732. // "https://www.googleapis.com/auth/appengine.admin",
  3733. // "https://www.googleapis.com/auth/cloud-platform",
  3734. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3735. // ]
  3736. // }
  3737. }
  3738. // Pages invokes f for each page of results.
  3739. // A non-nil error returned from f will halt the iteration.
  3740. // The provided context supersedes any context provided to the Context method.
  3741. func (c *AppsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
  3742. c.ctx_ = ctx
  3743. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3744. for {
  3745. x, err := c.Do()
  3746. if err != nil {
  3747. return err
  3748. }
  3749. if err := f(x); err != nil {
  3750. return err
  3751. }
  3752. if x.NextPageToken == "" {
  3753. return nil
  3754. }
  3755. c.PageToken(x.NextPageToken)
  3756. }
  3757. }
  3758. // method id "appengine.apps.services.patch":
  3759. type AppsServicesPatchCall struct {
  3760. s *APIService
  3761. appsId string
  3762. servicesId string
  3763. service *Service
  3764. urlParams_ gensupport.URLParams
  3765. ctx_ context.Context
  3766. header_ http.Header
  3767. }
  3768. // Patch: Updates the configuration of the specified service.
  3769. func (r *AppsServicesService) Patch(appsId string, servicesId string, service *Service) *AppsServicesPatchCall {
  3770. c := &AppsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3771. c.appsId = appsId
  3772. c.servicesId = servicesId
  3773. c.service = service
  3774. return c
  3775. }
  3776. // Mask sets the optional parameter "mask": Standard field mask for the
  3777. // set of fields to be updated.
  3778. func (c *AppsServicesPatchCall) Mask(mask string) *AppsServicesPatchCall {
  3779. c.urlParams_.Set("mask", mask)
  3780. return c
  3781. }
  3782. // MigrateTraffic sets the optional parameter "migrateTraffic": Set to
  3783. // true to gradually shift traffic to one or more versions that you
  3784. // specify. By default, traffic is shifted immediately. For gradual
  3785. // traffic migration, the target versions must be located within
  3786. // instances that are configured for both warmup requests
  3787. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  3788. // ta5/apps.services.versions#inboundservicetype) and automatic scaling
  3789. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  3790. // ta5/apps.services.versions#automaticscaling). You must specify the
  3791. // shardBy
  3792. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  3793. // ta5/apps.services#shardby) field in the Service resource. Gradual
  3794. // traffic migration is not supported in the App Engine flexible
  3795. // environment. For examples, see Migrating and Splitting Traffic
  3796. // (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting
  3797. // -traffic).
  3798. func (c *AppsServicesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsServicesPatchCall {
  3799. c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic))
  3800. return c
  3801. }
  3802. // Fields allows partial responses to be retrieved. See
  3803. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3804. // for more information.
  3805. func (c *AppsServicesPatchCall) Fields(s ...googleapi.Field) *AppsServicesPatchCall {
  3806. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3807. return c
  3808. }
  3809. // Context sets the context to be used in this call's Do method. Any
  3810. // pending HTTP request will be aborted if the provided context is
  3811. // canceled.
  3812. func (c *AppsServicesPatchCall) Context(ctx context.Context) *AppsServicesPatchCall {
  3813. c.ctx_ = ctx
  3814. return c
  3815. }
  3816. // Header returns an http.Header that can be modified by the caller to
  3817. // add HTTP headers to the request.
  3818. func (c *AppsServicesPatchCall) Header() http.Header {
  3819. if c.header_ == nil {
  3820. c.header_ = make(http.Header)
  3821. }
  3822. return c.header_
  3823. }
  3824. func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
  3825. reqHeaders := make(http.Header)
  3826. for k, v := range c.header_ {
  3827. reqHeaders[k] = v
  3828. }
  3829. reqHeaders.Set("User-Agent", c.s.userAgent())
  3830. var body io.Reader = nil
  3831. body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
  3832. if err != nil {
  3833. return nil, err
  3834. }
  3835. reqHeaders.Set("Content-Type", "application/json")
  3836. c.urlParams_.Set("alt", alt)
  3837. c.urlParams_.Set("prettyPrint", "false")
  3838. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}")
  3839. urls += "?" + c.urlParams_.Encode()
  3840. req, err := http.NewRequest("PATCH", urls, body)
  3841. if err != nil {
  3842. return nil, err
  3843. }
  3844. req.Header = reqHeaders
  3845. googleapi.Expand(req.URL, map[string]string{
  3846. "appsId": c.appsId,
  3847. "servicesId": c.servicesId,
  3848. })
  3849. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3850. }
  3851. // Do executes the "appengine.apps.services.patch" call.
  3852. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3853. // status code is an error. Response headers are in either
  3854. // *Operation.ServerResponse.Header or (if a response was returned at
  3855. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3856. // to check whether the returned error was because
  3857. // http.StatusNotModified was returned.
  3858. func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3859. gensupport.SetOptions(c.urlParams_, opts...)
  3860. res, err := c.doRequest("json")
  3861. if res != nil && res.StatusCode == http.StatusNotModified {
  3862. if res.Body != nil {
  3863. res.Body.Close()
  3864. }
  3865. return nil, &googleapi.Error{
  3866. Code: res.StatusCode,
  3867. Header: res.Header,
  3868. }
  3869. }
  3870. if err != nil {
  3871. return nil, err
  3872. }
  3873. defer googleapi.CloseBody(res)
  3874. if err := googleapi.CheckResponse(res); err != nil {
  3875. return nil, err
  3876. }
  3877. ret := &Operation{
  3878. ServerResponse: googleapi.ServerResponse{
  3879. Header: res.Header,
  3880. HTTPStatusCode: res.StatusCode,
  3881. },
  3882. }
  3883. target := &ret
  3884. if err := gensupport.DecodeResponse(target, res); err != nil {
  3885. return nil, err
  3886. }
  3887. return ret, nil
  3888. // {
  3889. // "description": "Updates the configuration of the specified service.",
  3890. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}",
  3891. // "httpMethod": "PATCH",
  3892. // "id": "appengine.apps.services.patch",
  3893. // "parameterOrder": [
  3894. // "appsId",
  3895. // "servicesId"
  3896. // ],
  3897. // "parameters": {
  3898. // "appsId": {
  3899. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.",
  3900. // "location": "path",
  3901. // "required": true,
  3902. // "type": "string"
  3903. // },
  3904. // "mask": {
  3905. // "description": "Standard field mask for the set of fields to be updated.",
  3906. // "format": "google-fieldmask",
  3907. // "location": "query",
  3908. // "type": "string"
  3909. // },
  3910. // "migrateTraffic": {
  3911. // "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).",
  3912. // "location": "query",
  3913. // "type": "boolean"
  3914. // },
  3915. // "servicesId": {
  3916. // "description": "Part of `name`. See documentation of `appsId`.",
  3917. // "location": "path",
  3918. // "required": true,
  3919. // "type": "string"
  3920. // }
  3921. // },
  3922. // "path": "v1beta5/apps/{appsId}/services/{servicesId}",
  3923. // "request": {
  3924. // "$ref": "Service"
  3925. // },
  3926. // "response": {
  3927. // "$ref": "Operation"
  3928. // },
  3929. // "scopes": [
  3930. // "https://www.googleapis.com/auth/cloud-platform"
  3931. // ]
  3932. // }
  3933. }
  3934. // method id "appengine.apps.services.versions.create":
  3935. type AppsServicesVersionsCreateCall struct {
  3936. s *APIService
  3937. appsId string
  3938. servicesId string
  3939. version *Version
  3940. urlParams_ gensupport.URLParams
  3941. ctx_ context.Context
  3942. header_ http.Header
  3943. }
  3944. // Create: Deploys new code and resource files to a new version.
  3945. func (r *AppsServicesVersionsService) Create(appsId string, servicesId string, version *Version) *AppsServicesVersionsCreateCall {
  3946. c := &AppsServicesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3947. c.appsId = appsId
  3948. c.servicesId = servicesId
  3949. c.version = version
  3950. return c
  3951. }
  3952. // Fields allows partial responses to be retrieved. See
  3953. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3954. // for more information.
  3955. func (c *AppsServicesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsServicesVersionsCreateCall {
  3956. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3957. return c
  3958. }
  3959. // Context sets the context to be used in this call's Do method. Any
  3960. // pending HTTP request will be aborted if the provided context is
  3961. // canceled.
  3962. func (c *AppsServicesVersionsCreateCall) Context(ctx context.Context) *AppsServicesVersionsCreateCall {
  3963. c.ctx_ = ctx
  3964. return c
  3965. }
  3966. // Header returns an http.Header that can be modified by the caller to
  3967. // add HTTP headers to the request.
  3968. func (c *AppsServicesVersionsCreateCall) Header() http.Header {
  3969. if c.header_ == nil {
  3970. c.header_ = make(http.Header)
  3971. }
  3972. return c.header_
  3973. }
  3974. func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  3975. reqHeaders := make(http.Header)
  3976. for k, v := range c.header_ {
  3977. reqHeaders[k] = v
  3978. }
  3979. reqHeaders.Set("User-Agent", c.s.userAgent())
  3980. var body io.Reader = nil
  3981. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  3982. if err != nil {
  3983. return nil, err
  3984. }
  3985. reqHeaders.Set("Content-Type", "application/json")
  3986. c.urlParams_.Set("alt", alt)
  3987. c.urlParams_.Set("prettyPrint", "false")
  3988. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}/versions")
  3989. urls += "?" + c.urlParams_.Encode()
  3990. req, err := http.NewRequest("POST", urls, body)
  3991. if err != nil {
  3992. return nil, err
  3993. }
  3994. req.Header = reqHeaders
  3995. googleapi.Expand(req.URL, map[string]string{
  3996. "appsId": c.appsId,
  3997. "servicesId": c.servicesId,
  3998. })
  3999. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4000. }
  4001. // Do executes the "appengine.apps.services.versions.create" call.
  4002. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4003. // status code is an error. Response headers are in either
  4004. // *Operation.ServerResponse.Header or (if a response was returned at
  4005. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4006. // to check whether the returned error was because
  4007. // http.StatusNotModified was returned.
  4008. func (c *AppsServicesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4009. gensupport.SetOptions(c.urlParams_, opts...)
  4010. res, err := c.doRequest("json")
  4011. if res != nil && res.StatusCode == http.StatusNotModified {
  4012. if res.Body != nil {
  4013. res.Body.Close()
  4014. }
  4015. return nil, &googleapi.Error{
  4016. Code: res.StatusCode,
  4017. Header: res.Header,
  4018. }
  4019. }
  4020. if err != nil {
  4021. return nil, err
  4022. }
  4023. defer googleapi.CloseBody(res)
  4024. if err := googleapi.CheckResponse(res); err != nil {
  4025. return nil, err
  4026. }
  4027. ret := &Operation{
  4028. ServerResponse: googleapi.ServerResponse{
  4029. Header: res.Header,
  4030. HTTPStatusCode: res.StatusCode,
  4031. },
  4032. }
  4033. target := &ret
  4034. if err := gensupport.DecodeResponse(target, res); err != nil {
  4035. return nil, err
  4036. }
  4037. return ret, nil
  4038. // {
  4039. // "description": "Deploys new code and resource files to a new version.",
  4040. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions",
  4041. // "httpMethod": "POST",
  4042. // "id": "appengine.apps.services.versions.create",
  4043. // "parameterOrder": [
  4044. // "appsId",
  4045. // "servicesId"
  4046. // ],
  4047. // "parameters": {
  4048. // "appsId": {
  4049. // "description": "Part of `name`. Name of the resource to update. For example: \"apps/myapp/services/default\".",
  4050. // "location": "path",
  4051. // "required": true,
  4052. // "type": "string"
  4053. // },
  4054. // "servicesId": {
  4055. // "description": "Part of `name`. See documentation of `appsId`.",
  4056. // "location": "path",
  4057. // "required": true,
  4058. // "type": "string"
  4059. // }
  4060. // },
  4061. // "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions",
  4062. // "request": {
  4063. // "$ref": "Version"
  4064. // },
  4065. // "response": {
  4066. // "$ref": "Operation"
  4067. // },
  4068. // "scopes": [
  4069. // "https://www.googleapis.com/auth/cloud-platform"
  4070. // ]
  4071. // }
  4072. }
  4073. // method id "appengine.apps.services.versions.delete":
  4074. type AppsServicesVersionsDeleteCall struct {
  4075. s *APIService
  4076. appsId string
  4077. servicesId string
  4078. versionsId string
  4079. urlParams_ gensupport.URLParams
  4080. ctx_ context.Context
  4081. header_ http.Header
  4082. }
  4083. // Delete: Deletes an existing version.
  4084. func (r *AppsServicesVersionsService) Delete(appsId string, servicesId string, versionsId string) *AppsServicesVersionsDeleteCall {
  4085. c := &AppsServicesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4086. c.appsId = appsId
  4087. c.servicesId = servicesId
  4088. c.versionsId = versionsId
  4089. return c
  4090. }
  4091. // Fields allows partial responses to be retrieved. See
  4092. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4093. // for more information.
  4094. func (c *AppsServicesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsDeleteCall {
  4095. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4096. return c
  4097. }
  4098. // Context sets the context to be used in this call's Do method. Any
  4099. // pending HTTP request will be aborted if the provided context is
  4100. // canceled.
  4101. func (c *AppsServicesVersionsDeleteCall) Context(ctx context.Context) *AppsServicesVersionsDeleteCall {
  4102. c.ctx_ = ctx
  4103. return c
  4104. }
  4105. // Header returns an http.Header that can be modified by the caller to
  4106. // add HTTP headers to the request.
  4107. func (c *AppsServicesVersionsDeleteCall) Header() http.Header {
  4108. if c.header_ == nil {
  4109. c.header_ = make(http.Header)
  4110. }
  4111. return c.header_
  4112. }
  4113. func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4114. reqHeaders := make(http.Header)
  4115. for k, v := range c.header_ {
  4116. reqHeaders[k] = v
  4117. }
  4118. reqHeaders.Set("User-Agent", c.s.userAgent())
  4119. var body io.Reader = nil
  4120. c.urlParams_.Set("alt", alt)
  4121. c.urlParams_.Set("prettyPrint", "false")
  4122. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  4123. urls += "?" + c.urlParams_.Encode()
  4124. req, err := http.NewRequest("DELETE", urls, body)
  4125. if err != nil {
  4126. return nil, err
  4127. }
  4128. req.Header = reqHeaders
  4129. googleapi.Expand(req.URL, map[string]string{
  4130. "appsId": c.appsId,
  4131. "servicesId": c.servicesId,
  4132. "versionsId": c.versionsId,
  4133. })
  4134. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4135. }
  4136. // Do executes the "appengine.apps.services.versions.delete" call.
  4137. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4138. // status code is an error. Response headers are in either
  4139. // *Operation.ServerResponse.Header or (if a response was returned at
  4140. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4141. // to check whether the returned error was because
  4142. // http.StatusNotModified was returned.
  4143. func (c *AppsServicesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4144. gensupport.SetOptions(c.urlParams_, opts...)
  4145. res, err := c.doRequest("json")
  4146. if res != nil && res.StatusCode == http.StatusNotModified {
  4147. if res.Body != nil {
  4148. res.Body.Close()
  4149. }
  4150. return nil, &googleapi.Error{
  4151. Code: res.StatusCode,
  4152. Header: res.Header,
  4153. }
  4154. }
  4155. if err != nil {
  4156. return nil, err
  4157. }
  4158. defer googleapi.CloseBody(res)
  4159. if err := googleapi.CheckResponse(res); err != nil {
  4160. return nil, err
  4161. }
  4162. ret := &Operation{
  4163. ServerResponse: googleapi.ServerResponse{
  4164. Header: res.Header,
  4165. HTTPStatusCode: res.StatusCode,
  4166. },
  4167. }
  4168. target := &ret
  4169. if err := gensupport.DecodeResponse(target, res); err != nil {
  4170. return nil, err
  4171. }
  4172. return ret, nil
  4173. // {
  4174. // "description": "Deletes an existing version.",
  4175. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  4176. // "httpMethod": "DELETE",
  4177. // "id": "appengine.apps.services.versions.delete",
  4178. // "parameterOrder": [
  4179. // "appsId",
  4180. // "servicesId",
  4181. // "versionsId"
  4182. // ],
  4183. // "parameters": {
  4184. // "appsId": {
  4185. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  4186. // "location": "path",
  4187. // "required": true,
  4188. // "type": "string"
  4189. // },
  4190. // "servicesId": {
  4191. // "description": "Part of `name`. See documentation of `appsId`.",
  4192. // "location": "path",
  4193. // "required": true,
  4194. // "type": "string"
  4195. // },
  4196. // "versionsId": {
  4197. // "description": "Part of `name`. See documentation of `appsId`.",
  4198. // "location": "path",
  4199. // "required": true,
  4200. // "type": "string"
  4201. // }
  4202. // },
  4203. // "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  4204. // "response": {
  4205. // "$ref": "Operation"
  4206. // },
  4207. // "scopes": [
  4208. // "https://www.googleapis.com/auth/cloud-platform"
  4209. // ]
  4210. // }
  4211. }
  4212. // method id "appengine.apps.services.versions.get":
  4213. type AppsServicesVersionsGetCall struct {
  4214. s *APIService
  4215. appsId string
  4216. servicesId string
  4217. versionsId string
  4218. urlParams_ gensupport.URLParams
  4219. ifNoneMatch_ string
  4220. ctx_ context.Context
  4221. header_ http.Header
  4222. }
  4223. // Get: Gets the specified Version resource. By default, only a
  4224. // BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get
  4225. // the full resource.
  4226. func (r *AppsServicesVersionsService) Get(appsId string, servicesId string, versionsId string) *AppsServicesVersionsGetCall {
  4227. c := &AppsServicesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4228. c.appsId = appsId
  4229. c.servicesId = servicesId
  4230. c.versionsId = versionsId
  4231. return c
  4232. }
  4233. // View sets the optional parameter "view": Controls the set of fields
  4234. // returned in the Get response.
  4235. //
  4236. // Possible values:
  4237. // "BASIC"
  4238. // "FULL"
  4239. func (c *AppsServicesVersionsGetCall) View(view string) *AppsServicesVersionsGetCall {
  4240. c.urlParams_.Set("view", view)
  4241. return c
  4242. }
  4243. // Fields allows partial responses to be retrieved. See
  4244. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4245. // for more information.
  4246. func (c *AppsServicesVersionsGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsGetCall {
  4247. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4248. return c
  4249. }
  4250. // IfNoneMatch sets the optional parameter which makes the operation
  4251. // fail if the object's ETag matches the given value. This is useful for
  4252. // getting updates only after the object has changed since the last
  4253. // request. Use googleapi.IsNotModified to check whether the response
  4254. // error from Do is the result of In-None-Match.
  4255. func (c *AppsServicesVersionsGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsGetCall {
  4256. c.ifNoneMatch_ = entityTag
  4257. return c
  4258. }
  4259. // Context sets the context to be used in this call's Do method. Any
  4260. // pending HTTP request will be aborted if the provided context is
  4261. // canceled.
  4262. func (c *AppsServicesVersionsGetCall) Context(ctx context.Context) *AppsServicesVersionsGetCall {
  4263. c.ctx_ = ctx
  4264. return c
  4265. }
  4266. // Header returns an http.Header that can be modified by the caller to
  4267. // add HTTP headers to the request.
  4268. func (c *AppsServicesVersionsGetCall) Header() http.Header {
  4269. if c.header_ == nil {
  4270. c.header_ = make(http.Header)
  4271. }
  4272. return c.header_
  4273. }
  4274. func (c *AppsServicesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  4275. reqHeaders := make(http.Header)
  4276. for k, v := range c.header_ {
  4277. reqHeaders[k] = v
  4278. }
  4279. reqHeaders.Set("User-Agent", c.s.userAgent())
  4280. if c.ifNoneMatch_ != "" {
  4281. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4282. }
  4283. var body io.Reader = nil
  4284. c.urlParams_.Set("alt", alt)
  4285. c.urlParams_.Set("prettyPrint", "false")
  4286. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  4287. urls += "?" + c.urlParams_.Encode()
  4288. req, err := http.NewRequest("GET", urls, body)
  4289. if err != nil {
  4290. return nil, err
  4291. }
  4292. req.Header = reqHeaders
  4293. googleapi.Expand(req.URL, map[string]string{
  4294. "appsId": c.appsId,
  4295. "servicesId": c.servicesId,
  4296. "versionsId": c.versionsId,
  4297. })
  4298. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4299. }
  4300. // Do executes the "appengine.apps.services.versions.get" call.
  4301. // Exactly one of *Version or error will be non-nil. Any non-2xx status
  4302. // code is an error. Response headers are in either
  4303. // *Version.ServerResponse.Header or (if a response was returned at all)
  4304. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4305. // check whether the returned error was because http.StatusNotModified
  4306. // was returned.
  4307. func (c *AppsServicesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  4308. gensupport.SetOptions(c.urlParams_, opts...)
  4309. res, err := c.doRequest("json")
  4310. if res != nil && res.StatusCode == http.StatusNotModified {
  4311. if res.Body != nil {
  4312. res.Body.Close()
  4313. }
  4314. return nil, &googleapi.Error{
  4315. Code: res.StatusCode,
  4316. Header: res.Header,
  4317. }
  4318. }
  4319. if err != nil {
  4320. return nil, err
  4321. }
  4322. defer googleapi.CloseBody(res)
  4323. if err := googleapi.CheckResponse(res); err != nil {
  4324. return nil, err
  4325. }
  4326. ret := &Version{
  4327. ServerResponse: googleapi.ServerResponse{
  4328. Header: res.Header,
  4329. HTTPStatusCode: res.StatusCode,
  4330. },
  4331. }
  4332. target := &ret
  4333. if err := gensupport.DecodeResponse(target, res); err != nil {
  4334. return nil, err
  4335. }
  4336. return ret, nil
  4337. // {
  4338. // "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.",
  4339. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  4340. // "httpMethod": "GET",
  4341. // "id": "appengine.apps.services.versions.get",
  4342. // "parameterOrder": [
  4343. // "appsId",
  4344. // "servicesId",
  4345. // "versionsId"
  4346. // ],
  4347. // "parameters": {
  4348. // "appsId": {
  4349. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  4350. // "location": "path",
  4351. // "required": true,
  4352. // "type": "string"
  4353. // },
  4354. // "servicesId": {
  4355. // "description": "Part of `name`. See documentation of `appsId`.",
  4356. // "location": "path",
  4357. // "required": true,
  4358. // "type": "string"
  4359. // },
  4360. // "versionsId": {
  4361. // "description": "Part of `name`. See documentation of `appsId`.",
  4362. // "location": "path",
  4363. // "required": true,
  4364. // "type": "string"
  4365. // },
  4366. // "view": {
  4367. // "description": "Controls the set of fields returned in the Get response.",
  4368. // "enum": [
  4369. // "BASIC",
  4370. // "FULL"
  4371. // ],
  4372. // "location": "query",
  4373. // "type": "string"
  4374. // }
  4375. // },
  4376. // "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  4377. // "response": {
  4378. // "$ref": "Version"
  4379. // },
  4380. // "scopes": [
  4381. // "https://www.googleapis.com/auth/appengine.admin",
  4382. // "https://www.googleapis.com/auth/cloud-platform",
  4383. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4384. // ]
  4385. // }
  4386. }
  4387. // method id "appengine.apps.services.versions.list":
  4388. type AppsServicesVersionsListCall struct {
  4389. s *APIService
  4390. appsId string
  4391. servicesId string
  4392. urlParams_ gensupport.URLParams
  4393. ifNoneMatch_ string
  4394. ctx_ context.Context
  4395. header_ http.Header
  4396. }
  4397. // List: Lists the versions of a service.
  4398. func (r *AppsServicesVersionsService) List(appsId string, servicesId string) *AppsServicesVersionsListCall {
  4399. c := &AppsServicesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4400. c.appsId = appsId
  4401. c.servicesId = servicesId
  4402. return c
  4403. }
  4404. // PageSize sets the optional parameter "pageSize": Maximum results to
  4405. // return per page.
  4406. func (c *AppsServicesVersionsListCall) PageSize(pageSize int64) *AppsServicesVersionsListCall {
  4407. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4408. return c
  4409. }
  4410. // PageToken sets the optional parameter "pageToken": Continuation token
  4411. // for fetching the next page of results.
  4412. func (c *AppsServicesVersionsListCall) PageToken(pageToken string) *AppsServicesVersionsListCall {
  4413. c.urlParams_.Set("pageToken", pageToken)
  4414. return c
  4415. }
  4416. // View sets the optional parameter "view": Controls the set of fields
  4417. // returned in the List response.
  4418. //
  4419. // Possible values:
  4420. // "BASIC"
  4421. // "FULL"
  4422. func (c *AppsServicesVersionsListCall) View(view string) *AppsServicesVersionsListCall {
  4423. c.urlParams_.Set("view", view)
  4424. return c
  4425. }
  4426. // Fields allows partial responses to be retrieved. See
  4427. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4428. // for more information.
  4429. func (c *AppsServicesVersionsListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsListCall {
  4430. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4431. return c
  4432. }
  4433. // IfNoneMatch sets the optional parameter which makes the operation
  4434. // fail if the object's ETag matches the given value. This is useful for
  4435. // getting updates only after the object has changed since the last
  4436. // request. Use googleapi.IsNotModified to check whether the response
  4437. // error from Do is the result of In-None-Match.
  4438. func (c *AppsServicesVersionsListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsListCall {
  4439. c.ifNoneMatch_ = entityTag
  4440. return c
  4441. }
  4442. // Context sets the context to be used in this call's Do method. Any
  4443. // pending HTTP request will be aborted if the provided context is
  4444. // canceled.
  4445. func (c *AppsServicesVersionsListCall) Context(ctx context.Context) *AppsServicesVersionsListCall {
  4446. c.ctx_ = ctx
  4447. return c
  4448. }
  4449. // Header returns an http.Header that can be modified by the caller to
  4450. // add HTTP headers to the request.
  4451. func (c *AppsServicesVersionsListCall) Header() http.Header {
  4452. if c.header_ == nil {
  4453. c.header_ = make(http.Header)
  4454. }
  4455. return c.header_
  4456. }
  4457. func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  4458. reqHeaders := make(http.Header)
  4459. for k, v := range c.header_ {
  4460. reqHeaders[k] = v
  4461. }
  4462. reqHeaders.Set("User-Agent", c.s.userAgent())
  4463. if c.ifNoneMatch_ != "" {
  4464. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4465. }
  4466. var body io.Reader = nil
  4467. c.urlParams_.Set("alt", alt)
  4468. c.urlParams_.Set("prettyPrint", "false")
  4469. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}/versions")
  4470. urls += "?" + c.urlParams_.Encode()
  4471. req, err := http.NewRequest("GET", urls, body)
  4472. if err != nil {
  4473. return nil, err
  4474. }
  4475. req.Header = reqHeaders
  4476. googleapi.Expand(req.URL, map[string]string{
  4477. "appsId": c.appsId,
  4478. "servicesId": c.servicesId,
  4479. })
  4480. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4481. }
  4482. // Do executes the "appengine.apps.services.versions.list" call.
  4483. // Exactly one of *ListVersionsResponse or error will be non-nil. Any
  4484. // non-2xx status code is an error. Response headers are in either
  4485. // *ListVersionsResponse.ServerResponse.Header or (if a response was
  4486. // returned at all) in error.(*googleapi.Error).Header. Use
  4487. // googleapi.IsNotModified to check whether the returned error was
  4488. // because http.StatusNotModified was returned.
  4489. func (c *AppsServicesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  4490. gensupport.SetOptions(c.urlParams_, opts...)
  4491. res, err := c.doRequest("json")
  4492. if res != nil && res.StatusCode == http.StatusNotModified {
  4493. if res.Body != nil {
  4494. res.Body.Close()
  4495. }
  4496. return nil, &googleapi.Error{
  4497. Code: res.StatusCode,
  4498. Header: res.Header,
  4499. }
  4500. }
  4501. if err != nil {
  4502. return nil, err
  4503. }
  4504. defer googleapi.CloseBody(res)
  4505. if err := googleapi.CheckResponse(res); err != nil {
  4506. return nil, err
  4507. }
  4508. ret := &ListVersionsResponse{
  4509. ServerResponse: googleapi.ServerResponse{
  4510. Header: res.Header,
  4511. HTTPStatusCode: res.StatusCode,
  4512. },
  4513. }
  4514. target := &ret
  4515. if err := gensupport.DecodeResponse(target, res); err != nil {
  4516. return nil, err
  4517. }
  4518. return ret, nil
  4519. // {
  4520. // "description": "Lists the versions of a service.",
  4521. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions",
  4522. // "httpMethod": "GET",
  4523. // "id": "appengine.apps.services.versions.list",
  4524. // "parameterOrder": [
  4525. // "appsId",
  4526. // "servicesId"
  4527. // ],
  4528. // "parameters": {
  4529. // "appsId": {
  4530. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  4531. // "location": "path",
  4532. // "required": true,
  4533. // "type": "string"
  4534. // },
  4535. // "pageSize": {
  4536. // "description": "Maximum results to return per page.",
  4537. // "format": "int32",
  4538. // "location": "query",
  4539. // "type": "integer"
  4540. // },
  4541. // "pageToken": {
  4542. // "description": "Continuation token for fetching the next page of results.",
  4543. // "location": "query",
  4544. // "type": "string"
  4545. // },
  4546. // "servicesId": {
  4547. // "description": "Part of `name`. See documentation of `appsId`.",
  4548. // "location": "path",
  4549. // "required": true,
  4550. // "type": "string"
  4551. // },
  4552. // "view": {
  4553. // "description": "Controls the set of fields returned in the List response.",
  4554. // "enum": [
  4555. // "BASIC",
  4556. // "FULL"
  4557. // ],
  4558. // "location": "query",
  4559. // "type": "string"
  4560. // }
  4561. // },
  4562. // "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions",
  4563. // "response": {
  4564. // "$ref": "ListVersionsResponse"
  4565. // },
  4566. // "scopes": [
  4567. // "https://www.googleapis.com/auth/appengine.admin",
  4568. // "https://www.googleapis.com/auth/cloud-platform",
  4569. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4570. // ]
  4571. // }
  4572. }
  4573. // Pages invokes f for each page of results.
  4574. // A non-nil error returned from f will halt the iteration.
  4575. // The provided context supersedes any context provided to the Context method.
  4576. func (c *AppsServicesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  4577. c.ctx_ = ctx
  4578. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4579. for {
  4580. x, err := c.Do()
  4581. if err != nil {
  4582. return err
  4583. }
  4584. if err := f(x); err != nil {
  4585. return err
  4586. }
  4587. if x.NextPageToken == "" {
  4588. return nil
  4589. }
  4590. c.PageToken(x.NextPageToken)
  4591. }
  4592. }
  4593. // method id "appengine.apps.services.versions.patch":
  4594. type AppsServicesVersionsPatchCall struct {
  4595. s *APIService
  4596. appsId string
  4597. servicesId string
  4598. versionsId string
  4599. version *Version
  4600. urlParams_ gensupport.URLParams
  4601. ctx_ context.Context
  4602. header_ http.Header
  4603. }
  4604. // Patch: Updates the specified Version resource. You can specify the
  4605. // following fields depending on the App Engine environment and type of
  4606. // scaling that the version resource uses:
  4607. // serving_status
  4608. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  4609. // ta5/apps.services.versions#Version.FIELDS.serving_status): For
  4610. // Version resources that use basic scaling, manual scaling, or run in
  4611. // the App Engine flexible environment.
  4612. // instance_class
  4613. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  4614. // ta5/apps.services.versions#Version.FIELDS.instance_class): For
  4615. // Version resources that run in the App Engine standard
  4616. // environment.
  4617. // automatic_scaling.min_idle_instances
  4618. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  4619. // ta5/apps.services.versions#Version.FIELDS.automatic_scaling): For
  4620. // Version resources that use automatic scaling and run in the App
  4621. // Engine standard environment.
  4622. // automatic_scaling.max_idle_instances
  4623. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  4624. // ta5/apps.services.versions#Version.FIELDS.automatic_scaling): For
  4625. // Version resources that use automatic scaling and run in the App
  4626. // Engine standard environment.
  4627. func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall {
  4628. c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4629. c.appsId = appsId
  4630. c.servicesId = servicesId
  4631. c.versionsId = versionsId
  4632. c.version = version
  4633. return c
  4634. }
  4635. // Mask sets the optional parameter "mask": Standard field mask for the
  4636. // set of fields to be updated.
  4637. func (c *AppsServicesVersionsPatchCall) Mask(mask string) *AppsServicesVersionsPatchCall {
  4638. c.urlParams_.Set("mask", mask)
  4639. return c
  4640. }
  4641. // Fields allows partial responses to be retrieved. See
  4642. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4643. // for more information.
  4644. func (c *AppsServicesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsServicesVersionsPatchCall {
  4645. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4646. return c
  4647. }
  4648. // Context sets the context to be used in this call's Do method. Any
  4649. // pending HTTP request will be aborted if the provided context is
  4650. // canceled.
  4651. func (c *AppsServicesVersionsPatchCall) Context(ctx context.Context) *AppsServicesVersionsPatchCall {
  4652. c.ctx_ = ctx
  4653. return c
  4654. }
  4655. // Header returns an http.Header that can be modified by the caller to
  4656. // add HTTP headers to the request.
  4657. func (c *AppsServicesVersionsPatchCall) Header() http.Header {
  4658. if c.header_ == nil {
  4659. c.header_ = make(http.Header)
  4660. }
  4661. return c.header_
  4662. }
  4663. func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
  4664. reqHeaders := make(http.Header)
  4665. for k, v := range c.header_ {
  4666. reqHeaders[k] = v
  4667. }
  4668. reqHeaders.Set("User-Agent", c.s.userAgent())
  4669. var body io.Reader = nil
  4670. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  4671. if err != nil {
  4672. return nil, err
  4673. }
  4674. reqHeaders.Set("Content-Type", "application/json")
  4675. c.urlParams_.Set("alt", alt)
  4676. c.urlParams_.Set("prettyPrint", "false")
  4677. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  4678. urls += "?" + c.urlParams_.Encode()
  4679. req, err := http.NewRequest("PATCH", urls, body)
  4680. if err != nil {
  4681. return nil, err
  4682. }
  4683. req.Header = reqHeaders
  4684. googleapi.Expand(req.URL, map[string]string{
  4685. "appsId": c.appsId,
  4686. "servicesId": c.servicesId,
  4687. "versionsId": c.versionsId,
  4688. })
  4689. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4690. }
  4691. // Do executes the "appengine.apps.services.versions.patch" call.
  4692. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4693. // status code is an error. Response headers are in either
  4694. // *Operation.ServerResponse.Header or (if a response was returned at
  4695. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4696. // to check whether the returned error was because
  4697. // http.StatusNotModified was returned.
  4698. func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4699. gensupport.SetOptions(c.urlParams_, opts...)
  4700. res, err := c.doRequest("json")
  4701. if res != nil && res.StatusCode == http.StatusNotModified {
  4702. if res.Body != nil {
  4703. res.Body.Close()
  4704. }
  4705. return nil, &googleapi.Error{
  4706. Code: res.StatusCode,
  4707. Header: res.Header,
  4708. }
  4709. }
  4710. if err != nil {
  4711. return nil, err
  4712. }
  4713. defer googleapi.CloseBody(res)
  4714. if err := googleapi.CheckResponse(res); err != nil {
  4715. return nil, err
  4716. }
  4717. ret := &Operation{
  4718. ServerResponse: googleapi.ServerResponse{
  4719. Header: res.Header,
  4720. HTTPStatusCode: res.StatusCode,
  4721. },
  4722. }
  4723. target := &ret
  4724. if err := gensupport.DecodeResponse(target, res); err != nil {
  4725. return nil, err
  4726. }
  4727. return ret, nil
  4728. // {
  4729. // "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.",
  4730. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  4731. // "httpMethod": "PATCH",
  4732. // "id": "appengine.apps.services.versions.patch",
  4733. // "parameterOrder": [
  4734. // "appsId",
  4735. // "servicesId",
  4736. // "versionsId"
  4737. // ],
  4738. // "parameters": {
  4739. // "appsId": {
  4740. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.",
  4741. // "location": "path",
  4742. // "required": true,
  4743. // "type": "string"
  4744. // },
  4745. // "mask": {
  4746. // "description": "Standard field mask for the set of fields to be updated.",
  4747. // "format": "google-fieldmask",
  4748. // "location": "query",
  4749. // "type": "string"
  4750. // },
  4751. // "servicesId": {
  4752. // "description": "Part of `name`. See documentation of `appsId`.",
  4753. // "location": "path",
  4754. // "required": true,
  4755. // "type": "string"
  4756. // },
  4757. // "versionsId": {
  4758. // "description": "Part of `name`. See documentation of `appsId`.",
  4759. // "location": "path",
  4760. // "required": true,
  4761. // "type": "string"
  4762. // }
  4763. // },
  4764. // "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  4765. // "request": {
  4766. // "$ref": "Version"
  4767. // },
  4768. // "response": {
  4769. // "$ref": "Operation"
  4770. // },
  4771. // "scopes": [
  4772. // "https://www.googleapis.com/auth/cloud-platform"
  4773. // ]
  4774. // }
  4775. }
  4776. // method id "appengine.apps.services.versions.instances.debug":
  4777. type AppsServicesVersionsInstancesDebugCall struct {
  4778. s *APIService
  4779. appsId string
  4780. servicesId string
  4781. versionsId string
  4782. instancesId string
  4783. debuginstancerequest *DebugInstanceRequest
  4784. urlParams_ gensupport.URLParams
  4785. ctx_ context.Context
  4786. header_ http.Header
  4787. }
  4788. // Debug: Enables debugging on a VM instance. This allows you to use the
  4789. // SSH command to connect to the virtual machine where the instance
  4790. // lives. While in "debug mode", the instance continues to serve live
  4791. // traffic. You should delete the instance when you are done debugging
  4792. // and then allow the system to take over and determine if another
  4793. // instance should be started.Only applicable for instances in App
  4794. // Engine flexible environment.
  4795. func (r *AppsServicesVersionsInstancesService) Debug(appsId string, servicesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsServicesVersionsInstancesDebugCall {
  4796. c := &AppsServicesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4797. c.appsId = appsId
  4798. c.servicesId = servicesId
  4799. c.versionsId = versionsId
  4800. c.instancesId = instancesId
  4801. c.debuginstancerequest = debuginstancerequest
  4802. return c
  4803. }
  4804. // Fields allows partial responses to be retrieved. See
  4805. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4806. // for more information.
  4807. func (c *AppsServicesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDebugCall {
  4808. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4809. return c
  4810. }
  4811. // Context sets the context to be used in this call's Do method. Any
  4812. // pending HTTP request will be aborted if the provided context is
  4813. // canceled.
  4814. func (c *AppsServicesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDebugCall {
  4815. c.ctx_ = ctx
  4816. return c
  4817. }
  4818. // Header returns an http.Header that can be modified by the caller to
  4819. // add HTTP headers to the request.
  4820. func (c *AppsServicesVersionsInstancesDebugCall) Header() http.Header {
  4821. if c.header_ == nil {
  4822. c.header_ = make(http.Header)
  4823. }
  4824. return c.header_
  4825. }
  4826. func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) {
  4827. reqHeaders := make(http.Header)
  4828. for k, v := range c.header_ {
  4829. reqHeaders[k] = v
  4830. }
  4831. reqHeaders.Set("User-Agent", c.s.userAgent())
  4832. var body io.Reader = nil
  4833. body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest)
  4834. if err != nil {
  4835. return nil, err
  4836. }
  4837. reqHeaders.Set("Content-Type", "application/json")
  4838. c.urlParams_.Set("alt", alt)
  4839. c.urlParams_.Set("prettyPrint", "false")
  4840. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug")
  4841. urls += "?" + c.urlParams_.Encode()
  4842. req, err := http.NewRequest("POST", urls, body)
  4843. if err != nil {
  4844. return nil, err
  4845. }
  4846. req.Header = reqHeaders
  4847. googleapi.Expand(req.URL, map[string]string{
  4848. "appsId": c.appsId,
  4849. "servicesId": c.servicesId,
  4850. "versionsId": c.versionsId,
  4851. "instancesId": c.instancesId,
  4852. })
  4853. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4854. }
  4855. // Do executes the "appengine.apps.services.versions.instances.debug" call.
  4856. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4857. // status code is an error. Response headers are in either
  4858. // *Operation.ServerResponse.Header or (if a response was returned at
  4859. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4860. // to check whether the returned error was because
  4861. // http.StatusNotModified was returned.
  4862. func (c *AppsServicesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4863. gensupport.SetOptions(c.urlParams_, opts...)
  4864. res, err := c.doRequest("json")
  4865. if res != nil && res.StatusCode == http.StatusNotModified {
  4866. if res.Body != nil {
  4867. res.Body.Close()
  4868. }
  4869. return nil, &googleapi.Error{
  4870. Code: res.StatusCode,
  4871. Header: res.Header,
  4872. }
  4873. }
  4874. if err != nil {
  4875. return nil, err
  4876. }
  4877. defer googleapi.CloseBody(res)
  4878. if err := googleapi.CheckResponse(res); err != nil {
  4879. return nil, err
  4880. }
  4881. ret := &Operation{
  4882. ServerResponse: googleapi.ServerResponse{
  4883. Header: res.Header,
  4884. HTTPStatusCode: res.StatusCode,
  4885. },
  4886. }
  4887. target := &ret
  4888. if err := gensupport.DecodeResponse(target, res); err != nil {
  4889. return nil, err
  4890. }
  4891. return ret, nil
  4892. // {
  4893. // "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.",
  4894. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
  4895. // "httpMethod": "POST",
  4896. // "id": "appengine.apps.services.versions.instances.debug",
  4897. // "parameterOrder": [
  4898. // "appsId",
  4899. // "servicesId",
  4900. // "versionsId",
  4901. // "instancesId"
  4902. // ],
  4903. // "parameters": {
  4904. // "appsId": {
  4905. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  4906. // "location": "path",
  4907. // "required": true,
  4908. // "type": "string"
  4909. // },
  4910. // "instancesId": {
  4911. // "description": "Part of `name`. See documentation of `appsId`.",
  4912. // "location": "path",
  4913. // "required": true,
  4914. // "type": "string"
  4915. // },
  4916. // "servicesId": {
  4917. // "description": "Part of `name`. See documentation of `appsId`.",
  4918. // "location": "path",
  4919. // "required": true,
  4920. // "type": "string"
  4921. // },
  4922. // "versionsId": {
  4923. // "description": "Part of `name`. See documentation of `appsId`.",
  4924. // "location": "path",
  4925. // "required": true,
  4926. // "type": "string"
  4927. // }
  4928. // },
  4929. // "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
  4930. // "request": {
  4931. // "$ref": "DebugInstanceRequest"
  4932. // },
  4933. // "response": {
  4934. // "$ref": "Operation"
  4935. // },
  4936. // "scopes": [
  4937. // "https://www.googleapis.com/auth/cloud-platform"
  4938. // ]
  4939. // }
  4940. }
  4941. // method id "appengine.apps.services.versions.instances.delete":
  4942. type AppsServicesVersionsInstancesDeleteCall struct {
  4943. s *APIService
  4944. appsId string
  4945. servicesId string
  4946. versionsId string
  4947. instancesId string
  4948. urlParams_ gensupport.URLParams
  4949. ctx_ context.Context
  4950. header_ http.Header
  4951. }
  4952. // Delete: Stops a running instance.
  4953. func (r *AppsServicesVersionsInstancesService) Delete(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesDeleteCall {
  4954. c := &AppsServicesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4955. c.appsId = appsId
  4956. c.servicesId = servicesId
  4957. c.versionsId = versionsId
  4958. c.instancesId = instancesId
  4959. return c
  4960. }
  4961. // Fields allows partial responses to be retrieved. See
  4962. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4963. // for more information.
  4964. func (c *AppsServicesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDeleteCall {
  4965. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4966. return c
  4967. }
  4968. // Context sets the context to be used in this call's Do method. Any
  4969. // pending HTTP request will be aborted if the provided context is
  4970. // canceled.
  4971. func (c *AppsServicesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDeleteCall {
  4972. c.ctx_ = ctx
  4973. return c
  4974. }
  4975. // Header returns an http.Header that can be modified by the caller to
  4976. // add HTTP headers to the request.
  4977. func (c *AppsServicesVersionsInstancesDeleteCall) Header() http.Header {
  4978. if c.header_ == nil {
  4979. c.header_ = make(http.Header)
  4980. }
  4981. return c.header_
  4982. }
  4983. func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4984. reqHeaders := make(http.Header)
  4985. for k, v := range c.header_ {
  4986. reqHeaders[k] = v
  4987. }
  4988. reqHeaders.Set("User-Agent", c.s.userAgent())
  4989. var body io.Reader = nil
  4990. c.urlParams_.Set("alt", alt)
  4991. c.urlParams_.Set("prettyPrint", "false")
  4992. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
  4993. urls += "?" + c.urlParams_.Encode()
  4994. req, err := http.NewRequest("DELETE", urls, body)
  4995. if err != nil {
  4996. return nil, err
  4997. }
  4998. req.Header = reqHeaders
  4999. googleapi.Expand(req.URL, map[string]string{
  5000. "appsId": c.appsId,
  5001. "servicesId": c.servicesId,
  5002. "versionsId": c.versionsId,
  5003. "instancesId": c.instancesId,
  5004. })
  5005. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5006. }
  5007. // Do executes the "appengine.apps.services.versions.instances.delete" call.
  5008. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5009. // status code is an error. Response headers are in either
  5010. // *Operation.ServerResponse.Header or (if a response was returned at
  5011. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5012. // to check whether the returned error was because
  5013. // http.StatusNotModified was returned.
  5014. func (c *AppsServicesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5015. gensupport.SetOptions(c.urlParams_, opts...)
  5016. res, err := c.doRequest("json")
  5017. if res != nil && res.StatusCode == http.StatusNotModified {
  5018. if res.Body != nil {
  5019. res.Body.Close()
  5020. }
  5021. return nil, &googleapi.Error{
  5022. Code: res.StatusCode,
  5023. Header: res.Header,
  5024. }
  5025. }
  5026. if err != nil {
  5027. return nil, err
  5028. }
  5029. defer googleapi.CloseBody(res)
  5030. if err := googleapi.CheckResponse(res); err != nil {
  5031. return nil, err
  5032. }
  5033. ret := &Operation{
  5034. ServerResponse: googleapi.ServerResponse{
  5035. Header: res.Header,
  5036. HTTPStatusCode: res.StatusCode,
  5037. },
  5038. }
  5039. target := &ret
  5040. if err := gensupport.DecodeResponse(target, res); err != nil {
  5041. return nil, err
  5042. }
  5043. return ret, nil
  5044. // {
  5045. // "description": "Stops a running instance.",
  5046. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  5047. // "httpMethod": "DELETE",
  5048. // "id": "appengine.apps.services.versions.instances.delete",
  5049. // "parameterOrder": [
  5050. // "appsId",
  5051. // "servicesId",
  5052. // "versionsId",
  5053. // "instancesId"
  5054. // ],
  5055. // "parameters": {
  5056. // "appsId": {
  5057. // "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/services/default/versions/v1/instances/instance-1\".",
  5058. // "location": "path",
  5059. // "required": true,
  5060. // "type": "string"
  5061. // },
  5062. // "instancesId": {
  5063. // "description": "Part of `name`. See documentation of `appsId`.",
  5064. // "location": "path",
  5065. // "required": true,
  5066. // "type": "string"
  5067. // },
  5068. // "servicesId": {
  5069. // "description": "Part of `name`. See documentation of `appsId`.",
  5070. // "location": "path",
  5071. // "required": true,
  5072. // "type": "string"
  5073. // },
  5074. // "versionsId": {
  5075. // "description": "Part of `name`. See documentation of `appsId`.",
  5076. // "location": "path",
  5077. // "required": true,
  5078. // "type": "string"
  5079. // }
  5080. // },
  5081. // "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  5082. // "response": {
  5083. // "$ref": "Operation"
  5084. // },
  5085. // "scopes": [
  5086. // "https://www.googleapis.com/auth/cloud-platform"
  5087. // ]
  5088. // }
  5089. }
  5090. // method id "appengine.apps.services.versions.instances.get":
  5091. type AppsServicesVersionsInstancesGetCall struct {
  5092. s *APIService
  5093. appsId string
  5094. servicesId string
  5095. versionsId string
  5096. instancesId string
  5097. urlParams_ gensupport.URLParams
  5098. ifNoneMatch_ string
  5099. ctx_ context.Context
  5100. header_ http.Header
  5101. }
  5102. // Get: Gets instance information.
  5103. func (r *AppsServicesVersionsInstancesService) Get(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesGetCall {
  5104. c := &AppsServicesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5105. c.appsId = appsId
  5106. c.servicesId = servicesId
  5107. c.versionsId = versionsId
  5108. c.instancesId = instancesId
  5109. return c
  5110. }
  5111. // Fields allows partial responses to be retrieved. See
  5112. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5113. // for more information.
  5114. func (c *AppsServicesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesGetCall {
  5115. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5116. return c
  5117. }
  5118. // IfNoneMatch sets the optional parameter which makes the operation
  5119. // fail if the object's ETag matches the given value. This is useful for
  5120. // getting updates only after the object has changed since the last
  5121. // request. Use googleapi.IsNotModified to check whether the response
  5122. // error from Do is the result of In-None-Match.
  5123. func (c *AppsServicesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesGetCall {
  5124. c.ifNoneMatch_ = entityTag
  5125. return c
  5126. }
  5127. // Context sets the context to be used in this call's Do method. Any
  5128. // pending HTTP request will be aborted if the provided context is
  5129. // canceled.
  5130. func (c *AppsServicesVersionsInstancesGetCall) Context(ctx context.Context) *AppsServicesVersionsInstancesGetCall {
  5131. c.ctx_ = ctx
  5132. return c
  5133. }
  5134. // Header returns an http.Header that can be modified by the caller to
  5135. // add HTTP headers to the request.
  5136. func (c *AppsServicesVersionsInstancesGetCall) Header() http.Header {
  5137. if c.header_ == nil {
  5138. c.header_ = make(http.Header)
  5139. }
  5140. return c.header_
  5141. }
  5142. func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  5143. reqHeaders := make(http.Header)
  5144. for k, v := range c.header_ {
  5145. reqHeaders[k] = v
  5146. }
  5147. reqHeaders.Set("User-Agent", c.s.userAgent())
  5148. if c.ifNoneMatch_ != "" {
  5149. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5150. }
  5151. var body io.Reader = nil
  5152. c.urlParams_.Set("alt", alt)
  5153. c.urlParams_.Set("prettyPrint", "false")
  5154. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
  5155. urls += "?" + c.urlParams_.Encode()
  5156. req, err := http.NewRequest("GET", urls, body)
  5157. if err != nil {
  5158. return nil, err
  5159. }
  5160. req.Header = reqHeaders
  5161. googleapi.Expand(req.URL, map[string]string{
  5162. "appsId": c.appsId,
  5163. "servicesId": c.servicesId,
  5164. "versionsId": c.versionsId,
  5165. "instancesId": c.instancesId,
  5166. })
  5167. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5168. }
  5169. // Do executes the "appengine.apps.services.versions.instances.get" call.
  5170. // Exactly one of *Instance or error will be non-nil. Any non-2xx status
  5171. // code is an error. Response headers are in either
  5172. // *Instance.ServerResponse.Header or (if a response was returned at
  5173. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5174. // to check whether the returned error was because
  5175. // http.StatusNotModified was returned.
  5176. func (c *AppsServicesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  5177. gensupport.SetOptions(c.urlParams_, opts...)
  5178. res, err := c.doRequest("json")
  5179. if res != nil && res.StatusCode == http.StatusNotModified {
  5180. if res.Body != nil {
  5181. res.Body.Close()
  5182. }
  5183. return nil, &googleapi.Error{
  5184. Code: res.StatusCode,
  5185. Header: res.Header,
  5186. }
  5187. }
  5188. if err != nil {
  5189. return nil, err
  5190. }
  5191. defer googleapi.CloseBody(res)
  5192. if err := googleapi.CheckResponse(res); err != nil {
  5193. return nil, err
  5194. }
  5195. ret := &Instance{
  5196. ServerResponse: googleapi.ServerResponse{
  5197. Header: res.Header,
  5198. HTTPStatusCode: res.StatusCode,
  5199. },
  5200. }
  5201. target := &ret
  5202. if err := gensupport.DecodeResponse(target, res); err != nil {
  5203. return nil, err
  5204. }
  5205. return ret, nil
  5206. // {
  5207. // "description": "Gets instance information.",
  5208. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  5209. // "httpMethod": "GET",
  5210. // "id": "appengine.apps.services.versions.instances.get",
  5211. // "parameterOrder": [
  5212. // "appsId",
  5213. // "servicesId",
  5214. // "versionsId",
  5215. // "instancesId"
  5216. // ],
  5217. // "parameters": {
  5218. // "appsId": {
  5219. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  5220. // "location": "path",
  5221. // "required": true,
  5222. // "type": "string"
  5223. // },
  5224. // "instancesId": {
  5225. // "description": "Part of `name`. See documentation of `appsId`.",
  5226. // "location": "path",
  5227. // "required": true,
  5228. // "type": "string"
  5229. // },
  5230. // "servicesId": {
  5231. // "description": "Part of `name`. See documentation of `appsId`.",
  5232. // "location": "path",
  5233. // "required": true,
  5234. // "type": "string"
  5235. // },
  5236. // "versionsId": {
  5237. // "description": "Part of `name`. See documentation of `appsId`.",
  5238. // "location": "path",
  5239. // "required": true,
  5240. // "type": "string"
  5241. // }
  5242. // },
  5243. // "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  5244. // "response": {
  5245. // "$ref": "Instance"
  5246. // },
  5247. // "scopes": [
  5248. // "https://www.googleapis.com/auth/appengine.admin",
  5249. // "https://www.googleapis.com/auth/cloud-platform",
  5250. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5251. // ]
  5252. // }
  5253. }
  5254. // method id "appengine.apps.services.versions.instances.list":
  5255. type AppsServicesVersionsInstancesListCall struct {
  5256. s *APIService
  5257. appsId string
  5258. servicesId string
  5259. versionsId string
  5260. urlParams_ gensupport.URLParams
  5261. ifNoneMatch_ string
  5262. ctx_ context.Context
  5263. header_ http.Header
  5264. }
  5265. // List: Lists the instances of a version.Tip: To aggregate details
  5266. // about instances over time, see the Stackdriver Monitoring API
  5267. // (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeS
  5268. // eries/list).
  5269. func (r *AppsServicesVersionsInstancesService) List(appsId string, servicesId string, versionsId string) *AppsServicesVersionsInstancesListCall {
  5270. c := &AppsServicesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5271. c.appsId = appsId
  5272. c.servicesId = servicesId
  5273. c.versionsId = versionsId
  5274. return c
  5275. }
  5276. // PageSize sets the optional parameter "pageSize": Maximum results to
  5277. // return per page.
  5278. func (c *AppsServicesVersionsInstancesListCall) PageSize(pageSize int64) *AppsServicesVersionsInstancesListCall {
  5279. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5280. return c
  5281. }
  5282. // PageToken sets the optional parameter "pageToken": Continuation token
  5283. // for fetching the next page of results.
  5284. func (c *AppsServicesVersionsInstancesListCall) PageToken(pageToken string) *AppsServicesVersionsInstancesListCall {
  5285. c.urlParams_.Set("pageToken", pageToken)
  5286. return c
  5287. }
  5288. // Fields allows partial responses to be retrieved. See
  5289. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5290. // for more information.
  5291. func (c *AppsServicesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesListCall {
  5292. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5293. return c
  5294. }
  5295. // IfNoneMatch sets the optional parameter which makes the operation
  5296. // fail if the object's ETag matches the given value. This is useful for
  5297. // getting updates only after the object has changed since the last
  5298. // request. Use googleapi.IsNotModified to check whether the response
  5299. // error from Do is the result of In-None-Match.
  5300. func (c *AppsServicesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesListCall {
  5301. c.ifNoneMatch_ = entityTag
  5302. return c
  5303. }
  5304. // Context sets the context to be used in this call's Do method. Any
  5305. // pending HTTP request will be aborted if the provided context is
  5306. // canceled.
  5307. func (c *AppsServicesVersionsInstancesListCall) Context(ctx context.Context) *AppsServicesVersionsInstancesListCall {
  5308. c.ctx_ = ctx
  5309. return c
  5310. }
  5311. // Header returns an http.Header that can be modified by the caller to
  5312. // add HTTP headers to the request.
  5313. func (c *AppsServicesVersionsInstancesListCall) Header() http.Header {
  5314. if c.header_ == nil {
  5315. c.header_ = make(http.Header)
  5316. }
  5317. return c.header_
  5318. }
  5319. func (c *AppsServicesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  5320. reqHeaders := make(http.Header)
  5321. for k, v := range c.header_ {
  5322. reqHeaders[k] = v
  5323. }
  5324. reqHeaders.Set("User-Agent", c.s.userAgent())
  5325. if c.ifNoneMatch_ != "" {
  5326. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5327. }
  5328. var body io.Reader = nil
  5329. c.urlParams_.Set("alt", alt)
  5330. c.urlParams_.Set("prettyPrint", "false")
  5331. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances")
  5332. urls += "?" + c.urlParams_.Encode()
  5333. req, err := http.NewRequest("GET", urls, body)
  5334. if err != nil {
  5335. return nil, err
  5336. }
  5337. req.Header = reqHeaders
  5338. googleapi.Expand(req.URL, map[string]string{
  5339. "appsId": c.appsId,
  5340. "servicesId": c.servicesId,
  5341. "versionsId": c.versionsId,
  5342. })
  5343. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5344. }
  5345. // Do executes the "appengine.apps.services.versions.instances.list" call.
  5346. // Exactly one of *ListInstancesResponse or error will be non-nil. Any
  5347. // non-2xx status code is an error. Response headers are in either
  5348. // *ListInstancesResponse.ServerResponse.Header or (if a response was
  5349. // returned at all) in error.(*googleapi.Error).Header. Use
  5350. // googleapi.IsNotModified to check whether the returned error was
  5351. // because http.StatusNotModified was returned.
  5352. func (c *AppsServicesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  5353. gensupport.SetOptions(c.urlParams_, opts...)
  5354. res, err := c.doRequest("json")
  5355. if res != nil && res.StatusCode == http.StatusNotModified {
  5356. if res.Body != nil {
  5357. res.Body.Close()
  5358. }
  5359. return nil, &googleapi.Error{
  5360. Code: res.StatusCode,
  5361. Header: res.Header,
  5362. }
  5363. }
  5364. if err != nil {
  5365. return nil, err
  5366. }
  5367. defer googleapi.CloseBody(res)
  5368. if err := googleapi.CheckResponse(res); err != nil {
  5369. return nil, err
  5370. }
  5371. ret := &ListInstancesResponse{
  5372. ServerResponse: googleapi.ServerResponse{
  5373. Header: res.Header,
  5374. HTTPStatusCode: res.StatusCode,
  5375. },
  5376. }
  5377. target := &ret
  5378. if err := gensupport.DecodeResponse(target, res); err != nil {
  5379. return nil, err
  5380. }
  5381. return ret, nil
  5382. // {
  5383. // "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).",
  5384. // "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
  5385. // "httpMethod": "GET",
  5386. // "id": "appengine.apps.services.versions.instances.list",
  5387. // "parameterOrder": [
  5388. // "appsId",
  5389. // "servicesId",
  5390. // "versionsId"
  5391. // ],
  5392. // "parameters": {
  5393. // "appsId": {
  5394. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  5395. // "location": "path",
  5396. // "required": true,
  5397. // "type": "string"
  5398. // },
  5399. // "pageSize": {
  5400. // "description": "Maximum results to return per page.",
  5401. // "format": "int32",
  5402. // "location": "query",
  5403. // "type": "integer"
  5404. // },
  5405. // "pageToken": {
  5406. // "description": "Continuation token for fetching the next page of results.",
  5407. // "location": "query",
  5408. // "type": "string"
  5409. // },
  5410. // "servicesId": {
  5411. // "description": "Part of `name`. See documentation of `appsId`.",
  5412. // "location": "path",
  5413. // "required": true,
  5414. // "type": "string"
  5415. // },
  5416. // "versionsId": {
  5417. // "description": "Part of `name`. See documentation of `appsId`.",
  5418. // "location": "path",
  5419. // "required": true,
  5420. // "type": "string"
  5421. // }
  5422. // },
  5423. // "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
  5424. // "response": {
  5425. // "$ref": "ListInstancesResponse"
  5426. // },
  5427. // "scopes": [
  5428. // "https://www.googleapis.com/auth/appengine.admin",
  5429. // "https://www.googleapis.com/auth/cloud-platform",
  5430. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5431. // ]
  5432. // }
  5433. }
  5434. // Pages invokes f for each page of results.
  5435. // A non-nil error returned from f will halt the iteration.
  5436. // The provided context supersedes any context provided to the Context method.
  5437. func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  5438. c.ctx_ = ctx
  5439. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5440. for {
  5441. x, err := c.Do()
  5442. if err != nil {
  5443. return err
  5444. }
  5445. if err := f(x); err != nil {
  5446. return err
  5447. }
  5448. if x.NextPageToken == "" {
  5449. return nil
  5450. }
  5451. c.PageToken(x.NextPageToken)
  5452. }
  5453. }