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.
 
 
 

6115 lines
225 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/v1beta4"
  12. // ...
  13. // appengineService, err := appengine.New(oauthHttpClient)
  14. package appengine // import "google.golang.org/api/appengine/v1beta4"
  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:v1beta4"
  43. const apiName = "appengine"
  44. const apiVersion = "v1beta4"
  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.Modules = NewAppsModulesService(s)
  79. rs.Operations = NewAppsOperationsService(s)
  80. return rs
  81. }
  82. type AppsService struct {
  83. s *APIService
  84. Locations *AppsLocationsService
  85. Modules *AppsModulesService
  86. Operations *AppsOperationsService
  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 NewAppsModulesService(s *APIService) *AppsModulesService {
  96. rs := &AppsModulesService{s: s}
  97. rs.Versions = NewAppsModulesVersionsService(s)
  98. return rs
  99. }
  100. type AppsModulesService struct {
  101. s *APIService
  102. Versions *AppsModulesVersionsService
  103. }
  104. func NewAppsModulesVersionsService(s *APIService) *AppsModulesVersionsService {
  105. rs := &AppsModulesVersionsService{s: s}
  106. rs.Instances = NewAppsModulesVersionsInstancesService(s)
  107. return rs
  108. }
  109. type AppsModulesVersionsService struct {
  110. s *APIService
  111. Instances *AppsModulesVersionsInstancesService
  112. }
  113. func NewAppsModulesVersionsInstancesService(s *APIService) *AppsModulesVersionsInstancesService {
  114. rs := &AppsModulesVersionsInstancesService{s: s}
  115. return rs
  116. }
  117. type AppsModulesVersionsInstancesService struct {
  118. s *APIService
  119. }
  120. func NewAppsOperationsService(s *APIService) *AppsOperationsService {
  121. rs := &AppsOperationsService{s: s}
  122. return rs
  123. }
  124. type AppsOperationsService 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 a 401 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 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: Google Cloud Storage bucket that can be used for storing
  232. // files associated with this application. This bucket is associated
  233. // with the application and can be used by the gcloud deployment
  234. // commands.@OutputOnly
  235. CodeBucket string `json:"codeBucket,omitempty"`
  236. // DefaultBucket: Google Cloud Storage bucket that can be used by this
  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 module 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 module 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
  635. // of 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/modules/default/versions/v1/instances/instance-1.@OutputOnl
  857. // y
  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. // ListModulesResponse: Response message for Modules.ListModules.
  1014. type ListModulesResponse struct {
  1015. // Modules: The modules belonging to the requested application.
  1016. Modules []*Module `json:"modules,omitempty"`
  1017. // NextPageToken: Continuation token for fetching the next page of
  1018. // results.
  1019. NextPageToken string `json:"nextPageToken,omitempty"`
  1020. // ServerResponse contains the HTTP response code and headers from the
  1021. // server.
  1022. googleapi.ServerResponse `json:"-"`
  1023. // ForceSendFields is a list of field names (e.g. "Modules") to
  1024. // unconditionally include in API requests. By default, fields with
  1025. // empty values are omitted from API requests. However, any non-pointer,
  1026. // non-interface field appearing in ForceSendFields will be sent to the
  1027. // server regardless of whether the field is empty or not. This may be
  1028. // used to include empty fields in Patch requests.
  1029. ForceSendFields []string `json:"-"`
  1030. // NullFields is a list of field names (e.g. "Modules") to include in
  1031. // API requests with the JSON null value. By default, fields with empty
  1032. // values are omitted from API requests. However, any field with an
  1033. // empty value appearing in NullFields will be sent to the server as
  1034. // null. It is an error if a field in this list has a non-empty value.
  1035. // This may be used to include null fields in Patch requests.
  1036. NullFields []string `json:"-"`
  1037. }
  1038. func (s *ListModulesResponse) MarshalJSON() ([]byte, error) {
  1039. type NoMethod ListModulesResponse
  1040. raw := NoMethod(*s)
  1041. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1042. }
  1043. // ListOperationsResponse: The response message for
  1044. // Operations.ListOperations.
  1045. type ListOperationsResponse struct {
  1046. // NextPageToken: The standard List next-page token.
  1047. NextPageToken string `json:"nextPageToken,omitempty"`
  1048. // Operations: A list of operations that matches the specified filter in
  1049. // the request.
  1050. Operations []*Operation `json:"operations,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 *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1070. type NoMethod ListOperationsResponse
  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 module.
  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 module 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 module 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. // Module: A Module resource is a logical component of an application
  1208. // that can share state and communicate in a secure fashion with other
  1209. // modules. For example, an application that handles customer requests
  1210. // might include separate modules to handle tasks such as backend data
  1211. // analysis or API requests from mobile devices. Each module has a
  1212. // collection of versions that define a specific set of code used to
  1213. // implement the functionality of that module.
  1214. type Module struct {
  1215. // Id: Relative name of the module within the application. Example:
  1216. // default.@OutputOnly
  1217. Id string `json:"id,omitempty"`
  1218. // Name: Full path to the Module resource in the API. Example:
  1219. // apps/myapp/modules/default.@OutputOnly
  1220. Name string `json:"name,omitempty"`
  1221. // Split: Mapping that defines fractional HTTP traffic diversion to
  1222. // different versions within the module.
  1223. Split *TrafficSplit `json:"split,omitempty"`
  1224. // ServerResponse contains the HTTP response code and headers from the
  1225. // server.
  1226. googleapi.ServerResponse `json:"-"`
  1227. // ForceSendFields is a list of field names (e.g. "Id") to
  1228. // unconditionally include in API requests. By default, fields with
  1229. // empty values are omitted from API requests. However, any non-pointer,
  1230. // non-interface field appearing in ForceSendFields will be sent to the
  1231. // server regardless of whether the field is empty or not. This may be
  1232. // used to include empty fields in Patch requests.
  1233. ForceSendFields []string `json:"-"`
  1234. // NullFields is a list of field names (e.g. "Id") to include in API
  1235. // requests with the JSON null value. By default, fields with empty
  1236. // values are omitted from API requests. However, any field with an
  1237. // empty value appearing in NullFields will be sent to the server as
  1238. // null. It is an error if a field in this list has a non-empty value.
  1239. // This may be used to include null fields in Patch requests.
  1240. NullFields []string `json:"-"`
  1241. }
  1242. func (s *Module) MarshalJSON() ([]byte, error) {
  1243. type NoMethod Module
  1244. raw := NoMethod(*s)
  1245. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1246. }
  1247. // Network: Extra network settings. Only applicable for VM runtimes.
  1248. type Network struct {
  1249. // ForwardedPorts: List of ports, or port pairs, to forward from the
  1250. // virtual machine to the application container.
  1251. ForwardedPorts []string `json:"forwardedPorts,omitempty"`
  1252. // InstanceTag: Tag to apply to the VM instance during creation.
  1253. InstanceTag string `json:"instanceTag,omitempty"`
  1254. // Name: Google Cloud Platform network where the virtual machines are
  1255. // created. Specify the short name, not the resource path.Defaults to
  1256. // default.
  1257. Name string `json:"name,omitempty"`
  1258. // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to
  1259. // unconditionally include in API requests. By default, fields with
  1260. // empty values are omitted from API requests. However, any non-pointer,
  1261. // non-interface field appearing in ForceSendFields will be sent to the
  1262. // server regardless of whether the field is empty or not. This may be
  1263. // used to include empty fields in Patch requests.
  1264. ForceSendFields []string `json:"-"`
  1265. // NullFields is a list of field names (e.g. "ForwardedPorts") to
  1266. // include in API requests with the JSON null value. By default, fields
  1267. // with empty values are omitted from API requests. However, any field
  1268. // with an empty value appearing in NullFields will be sent to the
  1269. // server as null. It is an error if a field in this list has a
  1270. // non-empty value. This may be used to include null fields in Patch
  1271. // requests.
  1272. NullFields []string `json:"-"`
  1273. }
  1274. func (s *Network) MarshalJSON() ([]byte, error) {
  1275. type NoMethod Network
  1276. raw := NoMethod(*s)
  1277. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1278. }
  1279. // NetworkUtilization: Target scaling by network usage. Only applicable
  1280. // for VM runtimes.
  1281. type NetworkUtilization struct {
  1282. // TargetReceivedBytesPerSec: Target bytes received per second.
  1283. TargetReceivedBytesPerSec int64 `json:"targetReceivedBytesPerSec,omitempty"`
  1284. // TargetReceivedPacketsPerSec: Target packets received per second.
  1285. TargetReceivedPacketsPerSec int64 `json:"targetReceivedPacketsPerSec,omitempty"`
  1286. // TargetSentBytesPerSec: Target bytes sent per second.
  1287. TargetSentBytesPerSec int64 `json:"targetSentBytesPerSec,omitempty"`
  1288. // TargetSentPacketsPerSec: Target packets sent per second.
  1289. TargetSentPacketsPerSec int64 `json:"targetSentPacketsPerSec,omitempty"`
  1290. // ForceSendFields is a list of field names (e.g.
  1291. // "TargetReceivedBytesPerSec") to unconditionally include in API
  1292. // requests. By default, fields with empty values are omitted from API
  1293. // requests. However, any non-pointer, non-interface field appearing in
  1294. // ForceSendFields will be sent to the server regardless of whether the
  1295. // field is empty or not. This may be used to include empty fields in
  1296. // Patch requests.
  1297. ForceSendFields []string `json:"-"`
  1298. // NullFields is a list of field names (e.g.
  1299. // "TargetReceivedBytesPerSec") to include in API requests with the JSON
  1300. // null value. By default, fields with empty values are omitted from API
  1301. // requests. However, any field with an empty value appearing in
  1302. // NullFields will be sent to the server as null. It is an error if a
  1303. // field in this list has a non-empty value. This may be used to include
  1304. // null fields in Patch requests.
  1305. NullFields []string `json:"-"`
  1306. }
  1307. func (s *NetworkUtilization) MarshalJSON() ([]byte, error) {
  1308. type NoMethod NetworkUtilization
  1309. raw := NoMethod(*s)
  1310. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1311. }
  1312. // Operation: This resource represents a long-running operation that is
  1313. // the result of a network API call.
  1314. type Operation struct {
  1315. // Done: If the value is false, it means the operation is still in
  1316. // progress. If true, the operation is completed, and either error or
  1317. // response is available.
  1318. Done bool `json:"done,omitempty"`
  1319. // Error: The error result of the operation in case of failure or
  1320. // cancellation.
  1321. Error *Status `json:"error,omitempty"`
  1322. // Metadata: Service-specific metadata associated with the operation. It
  1323. // typically contains progress information and common metadata such as
  1324. // create time. Some services might not provide such metadata. Any
  1325. // method that returns a long-running operation should document the
  1326. // metadata type, if any.
  1327. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1328. // Name: The server-assigned name, which is only unique within the same
  1329. // service that originally returns it. If you use the default HTTP
  1330. // mapping, the name should have the format of
  1331. // operations/some/unique/name.
  1332. Name string `json:"name,omitempty"`
  1333. // Response: The normal response of the operation in case of success. If
  1334. // the original method returns no data on success, such as Delete, the
  1335. // response is google.protobuf.Empty. If the original method is standard
  1336. // Get/Create/Update, the response should be the resource. For other
  1337. // methods, the response should have the type XxxResponse, where Xxx is
  1338. // the original method name. For example, if the original method name is
  1339. // TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
  1340. Response googleapi.RawMessage `json:"response,omitempty"`
  1341. // ServerResponse contains the HTTP response code and headers from the
  1342. // server.
  1343. googleapi.ServerResponse `json:"-"`
  1344. // ForceSendFields is a list of field names (e.g. "Done") to
  1345. // unconditionally include in API requests. By default, fields with
  1346. // empty values are omitted from API requests. However, any non-pointer,
  1347. // non-interface field appearing in ForceSendFields will be sent to the
  1348. // server regardless of whether the field is empty or not. This may be
  1349. // used to include empty fields in Patch requests.
  1350. ForceSendFields []string `json:"-"`
  1351. // NullFields is a list of field names (e.g. "Done") to include in API
  1352. // requests with the JSON null value. By default, fields with empty
  1353. // values are omitted from API requests. However, any field with an
  1354. // empty value appearing in NullFields will be sent to the server as
  1355. // null. It is an error if a field in this list has a non-empty value.
  1356. // This may be used to include null fields in Patch requests.
  1357. NullFields []string `json:"-"`
  1358. }
  1359. func (s *Operation) MarshalJSON() ([]byte, error) {
  1360. type NoMethod Operation
  1361. raw := NoMethod(*s)
  1362. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1363. }
  1364. // OperationMetadata: Metadata for the given
  1365. // google.longrunning.Operation.
  1366. type OperationMetadata struct {
  1367. // EndTime: Timestamp that this operation completed.@OutputOnly
  1368. EndTime string `json:"endTime,omitempty"`
  1369. // InsertTime: Timestamp that this operation was created.@OutputOnly
  1370. InsertTime string `json:"insertTime,omitempty"`
  1371. // Method: API method that initiated this operation. Example:
  1372. // google.appengine.v1beta4.Version.CreateVersion.@OutputOnly
  1373. Method string `json:"method,omitempty"`
  1374. // OperationType: Type of this operation. Deprecated, use method field
  1375. // instead. Example: "create_version".@OutputOnly
  1376. OperationType string `json:"operationType,omitempty"`
  1377. // Target: Name of the resource that this operation is acting on.
  1378. // Example: apps/myapp/modules/default.@OutputOnly
  1379. Target string `json:"target,omitempty"`
  1380. // User: User who requested this operation.@OutputOnly
  1381. User string `json:"user,omitempty"`
  1382. // ForceSendFields is a list of field names (e.g. "EndTime") to
  1383. // unconditionally include in API requests. By default, fields with
  1384. // empty values are omitted from API requests. However, any non-pointer,
  1385. // non-interface field appearing in ForceSendFields will be sent to the
  1386. // server regardless of whether the field is empty or not. This may be
  1387. // used to include empty fields in Patch requests.
  1388. ForceSendFields []string `json:"-"`
  1389. // NullFields is a list of field names (e.g. "EndTime") to include in
  1390. // API requests with the JSON null value. By default, fields with empty
  1391. // values are omitted from API requests. However, any field with an
  1392. // empty value appearing in NullFields will be sent to the server as
  1393. // null. It is an error if a field in this list has a non-empty value.
  1394. // This may be used to include null fields in Patch requests.
  1395. NullFields []string `json:"-"`
  1396. }
  1397. func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1398. type NoMethod OperationMetadata
  1399. raw := NoMethod(*s)
  1400. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1401. }
  1402. // OperationMetadataV1: Metadata for the given
  1403. // google.longrunning.Operation.
  1404. type OperationMetadataV1 struct {
  1405. CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"`
  1406. // EndTime: Time that this operation completed.@OutputOnly
  1407. EndTime string `json:"endTime,omitempty"`
  1408. // EphemeralMessage: Ephemeral message that may change every time the
  1409. // operation is polled. @OutputOnly
  1410. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  1411. // InsertTime: Time that this operation was created.@OutputOnly
  1412. InsertTime string `json:"insertTime,omitempty"`
  1413. // Method: API method that initiated this operation. Example:
  1414. // google.appengine.v1.Versions.CreateVersion.@OutputOnly
  1415. Method string `json:"method,omitempty"`
  1416. // Target: Name of the resource that this operation is acting on.
  1417. // Example: apps/myapp/services/default.@OutputOnly
  1418. Target string `json:"target,omitempty"`
  1419. // User: User who requested this operation.@OutputOnly
  1420. User string `json:"user,omitempty"`
  1421. // Warning: Durable messages that persist on every operation poll.
  1422. // @OutputOnly
  1423. Warning []string `json:"warning,omitempty"`
  1424. // ForceSendFields is a list of field names (e.g.
  1425. // "CreateVersionMetadata") to unconditionally include in API requests.
  1426. // By default, fields with empty values are omitted from API requests.
  1427. // However, any non-pointer, non-interface field appearing in
  1428. // ForceSendFields will be sent to the server regardless of whether the
  1429. // field is empty or not. This may be used to include empty fields in
  1430. // Patch requests.
  1431. ForceSendFields []string `json:"-"`
  1432. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  1433. // include in API requests with the JSON null value. By default, fields
  1434. // with empty values are omitted from API requests. However, any field
  1435. // with an empty value appearing in NullFields will be sent to the
  1436. // server as null. It is an error if a field in this list has a
  1437. // non-empty value. This may be used to include null fields in Patch
  1438. // requests.
  1439. NullFields []string `json:"-"`
  1440. }
  1441. func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) {
  1442. type NoMethod OperationMetadataV1
  1443. raw := NoMethod(*s)
  1444. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1445. }
  1446. // OperationMetadataV1Alpha: Metadata for the given
  1447. // google.longrunning.Operation.
  1448. type OperationMetadataV1Alpha struct {
  1449. CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"`
  1450. // EndTime: Time that this operation completed.@OutputOnly
  1451. EndTime string `json:"endTime,omitempty"`
  1452. // EphemeralMessage: Ephemeral message that may change every time the
  1453. // operation is polled. @OutputOnly
  1454. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  1455. // InsertTime: Time that this operation was created.@OutputOnly
  1456. InsertTime string `json:"insertTime,omitempty"`
  1457. // Method: API method that initiated this operation. Example:
  1458. // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly
  1459. Method string `json:"method,omitempty"`
  1460. // Target: Name of the resource that this operation is acting on.
  1461. // Example: apps/myapp/services/default.@OutputOnly
  1462. Target string `json:"target,omitempty"`
  1463. // User: User who requested this operation.@OutputOnly
  1464. User string `json:"user,omitempty"`
  1465. // Warning: Durable messages that persist on every operation poll.
  1466. // @OutputOnly
  1467. Warning []string `json:"warning,omitempty"`
  1468. // ForceSendFields is a list of field names (e.g.
  1469. // "CreateVersionMetadata") to unconditionally include in API requests.
  1470. // By default, fields with empty values are omitted from API requests.
  1471. // However, any non-pointer, non-interface field appearing in
  1472. // ForceSendFields will be sent to the server regardless of whether the
  1473. // field is empty or not. This may be used to include empty fields in
  1474. // Patch requests.
  1475. ForceSendFields []string `json:"-"`
  1476. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  1477. // include in API requests with the JSON null value. By default, fields
  1478. // with empty values are omitted from API requests. However, any field
  1479. // with an empty value appearing in NullFields will be sent to the
  1480. // server as null. It is an error if a field in this list has a
  1481. // non-empty value. This may be used to include null fields in Patch
  1482. // requests.
  1483. NullFields []string `json:"-"`
  1484. }
  1485. func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  1486. type NoMethod OperationMetadataV1Alpha
  1487. raw := NoMethod(*s)
  1488. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1489. }
  1490. // OperationMetadataV1Beta: Metadata for the given
  1491. // google.longrunning.Operation.
  1492. type OperationMetadataV1Beta struct {
  1493. CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"`
  1494. // EndTime: Time that this operation completed.@OutputOnly
  1495. EndTime string `json:"endTime,omitempty"`
  1496. // EphemeralMessage: Ephemeral message that may change every time the
  1497. // operation is polled. @OutputOnly
  1498. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  1499. // InsertTime: Time that this operation was created.@OutputOnly
  1500. InsertTime string `json:"insertTime,omitempty"`
  1501. // Method: API method that initiated this operation. Example:
  1502. // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly
  1503. Method string `json:"method,omitempty"`
  1504. // Target: Name of the resource that this operation is acting on.
  1505. // Example: apps/myapp/services/default.@OutputOnly
  1506. Target string `json:"target,omitempty"`
  1507. // User: User who requested this operation.@OutputOnly
  1508. User string `json:"user,omitempty"`
  1509. // Warning: Durable messages that persist on every operation poll.
  1510. // @OutputOnly
  1511. Warning []string `json:"warning,omitempty"`
  1512. // ForceSendFields is a list of field names (e.g.
  1513. // "CreateVersionMetadata") to unconditionally include in API requests.
  1514. // By default, fields with empty values are omitted from API requests.
  1515. // However, any non-pointer, non-interface field appearing in
  1516. // ForceSendFields will be sent to the server regardless of whether the
  1517. // field is empty or not. This may be used to include empty fields in
  1518. // Patch requests.
  1519. ForceSendFields []string `json:"-"`
  1520. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  1521. // include in API requests with the JSON null value. By default, fields
  1522. // with empty values are omitted from API requests. However, any field
  1523. // with an empty value appearing in NullFields will be sent to the
  1524. // server as null. It is an error if a field in this list has a
  1525. // non-empty value. This may be used to include null fields in Patch
  1526. // requests.
  1527. NullFields []string `json:"-"`
  1528. }
  1529. func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) {
  1530. type NoMethod OperationMetadataV1Beta
  1531. raw := NoMethod(*s)
  1532. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1533. }
  1534. // OperationMetadataV1Beta5: Metadata for the given
  1535. // google.longrunning.Operation.
  1536. type OperationMetadataV1Beta5 struct {
  1537. // EndTime: Timestamp that this operation completed.@OutputOnly
  1538. EndTime string `json:"endTime,omitempty"`
  1539. // InsertTime: Timestamp that this operation was created.@OutputOnly
  1540. InsertTime string `json:"insertTime,omitempty"`
  1541. // Method: API method name that initiated this operation. Example:
  1542. // google.appengine.v1beta5.Version.CreateVersion.@OutputOnly
  1543. Method string `json:"method,omitempty"`
  1544. // Target: Name of the resource that this operation is acting on.
  1545. // Example: apps/myapp/services/default.@OutputOnly
  1546. Target string `json:"target,omitempty"`
  1547. // User: User who requested this operation.@OutputOnly
  1548. User string `json:"user,omitempty"`
  1549. // ForceSendFields is a list of field names (e.g. "EndTime") to
  1550. // unconditionally include in API requests. By default, fields with
  1551. // empty values are omitted from API requests. However, any non-pointer,
  1552. // non-interface field appearing in ForceSendFields will be sent to the
  1553. // server regardless of whether the field is empty or not. This may be
  1554. // used to include empty fields in Patch requests.
  1555. ForceSendFields []string `json:"-"`
  1556. // NullFields is a list of field names (e.g. "EndTime") to include in
  1557. // API requests with the JSON null value. By default, fields with empty
  1558. // values are omitted from API requests. However, any field with an
  1559. // empty value appearing in NullFields will be sent to the server as
  1560. // null. It is an error if a field in this list has a non-empty value.
  1561. // This may be used to include null fields in Patch requests.
  1562. NullFields []string `json:"-"`
  1563. }
  1564. func (s *OperationMetadataV1Beta5) MarshalJSON() ([]byte, error) {
  1565. type NoMethod OperationMetadataV1Beta5
  1566. raw := NoMethod(*s)
  1567. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1568. }
  1569. // RequestUtilization: Target scaling by request utilization. Only
  1570. // applicable for VM runtimes.
  1571. type RequestUtilization struct {
  1572. // TargetConcurrentRequests: Target number of concurrent requests.
  1573. TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"`
  1574. // TargetRequestCountPerSec: Target requests per second.
  1575. TargetRequestCountPerSec int64 `json:"targetRequestCountPerSec,omitempty"`
  1576. // ForceSendFields is a list of field names (e.g.
  1577. // "TargetConcurrentRequests") to unconditionally include in API
  1578. // requests. By default, fields with empty values are omitted from API
  1579. // requests. However, any non-pointer, non-interface field appearing in
  1580. // ForceSendFields will be sent to the server regardless of whether the
  1581. // field is empty or not. This may be used to include empty fields in
  1582. // Patch requests.
  1583. ForceSendFields []string `json:"-"`
  1584. // NullFields is a list of field names (e.g. "TargetConcurrentRequests")
  1585. // to include in API requests with the JSON null value. By default,
  1586. // fields with empty values are omitted from API requests. However, any
  1587. // field with an empty value appearing in NullFields will be sent to the
  1588. // server as null. It is an error if a field in this list has a
  1589. // non-empty value. This may be used to include null fields in Patch
  1590. // requests.
  1591. NullFields []string `json:"-"`
  1592. }
  1593. func (s *RequestUtilization) MarshalJSON() ([]byte, error) {
  1594. type NoMethod RequestUtilization
  1595. raw := NoMethod(*s)
  1596. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1597. }
  1598. // Resources: Machine resources for a version.
  1599. type Resources struct {
  1600. // Cpu: Number of CPU cores needed.
  1601. Cpu float64 `json:"cpu,omitempty"`
  1602. // DiskGb: Disk size (GB) needed.
  1603. DiskGb float64 `json:"diskGb,omitempty"`
  1604. // MemoryGb: Memory (GB) needed.
  1605. MemoryGb float64 `json:"memoryGb,omitempty"`
  1606. // Volumes: User specified volumes.
  1607. Volumes []*Volume `json:"volumes,omitempty"`
  1608. // ForceSendFields is a list of field names (e.g. "Cpu") to
  1609. // unconditionally include in API requests. By default, fields with
  1610. // empty values are omitted from API requests. However, any non-pointer,
  1611. // non-interface field appearing in ForceSendFields will be sent to the
  1612. // server regardless of whether the field is empty or not. This may be
  1613. // used to include empty fields in Patch requests.
  1614. ForceSendFields []string `json:"-"`
  1615. // NullFields is a list of field names (e.g. "Cpu") to include in API
  1616. // requests with the JSON null value. By default, fields with empty
  1617. // values are omitted from API requests. However, any field with an
  1618. // empty value appearing in NullFields will be sent to the server as
  1619. // null. It is an error if a field in this list has a non-empty value.
  1620. // This may be used to include null fields in Patch requests.
  1621. NullFields []string `json:"-"`
  1622. }
  1623. func (s *Resources) MarshalJSON() ([]byte, error) {
  1624. type NoMethod Resources
  1625. raw := NoMethod(*s)
  1626. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1627. }
  1628. func (s *Resources) UnmarshalJSON(data []byte) error {
  1629. type NoMethod Resources
  1630. var s1 struct {
  1631. Cpu gensupport.JSONFloat64 `json:"cpu"`
  1632. DiskGb gensupport.JSONFloat64 `json:"diskGb"`
  1633. MemoryGb gensupport.JSONFloat64 `json:"memoryGb"`
  1634. *NoMethod
  1635. }
  1636. s1.NoMethod = (*NoMethod)(s)
  1637. if err := json.Unmarshal(data, &s1); err != nil {
  1638. return err
  1639. }
  1640. s.Cpu = float64(s1.Cpu)
  1641. s.DiskGb = float64(s1.DiskGb)
  1642. s.MemoryGb = float64(s1.MemoryGb)
  1643. return nil
  1644. }
  1645. // ScriptHandler: Executes a script to handle the request that matches
  1646. // the URL pattern.
  1647. type ScriptHandler struct {
  1648. // ScriptPath: Path to the script from the application root directory.
  1649. ScriptPath string `json:"scriptPath,omitempty"`
  1650. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  1651. // unconditionally include in API requests. By default, fields with
  1652. // empty values are omitted from API requests. However, any non-pointer,
  1653. // non-interface field appearing in ForceSendFields will be sent to the
  1654. // server regardless of whether the field is empty or not. This may be
  1655. // used to include empty fields in Patch requests.
  1656. ForceSendFields []string `json:"-"`
  1657. // NullFields is a list of field names (e.g. "ScriptPath") to include in
  1658. // API requests with the JSON null value. By default, fields with empty
  1659. // values are omitted from API requests. However, any field with an
  1660. // empty value appearing in NullFields will be sent to the server as
  1661. // null. It is an error if a field in this list has a non-empty value.
  1662. // This may be used to include null fields in Patch requests.
  1663. NullFields []string `json:"-"`
  1664. }
  1665. func (s *ScriptHandler) MarshalJSON() ([]byte, error) {
  1666. type NoMethod ScriptHandler
  1667. raw := NoMethod(*s)
  1668. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1669. }
  1670. // SourceReference: Reference to a particular snapshot of the source
  1671. // tree used to build and deploy the application.
  1672. type SourceReference struct {
  1673. // Repository: URI string identifying the repository. Example:
  1674. // "https://source.developers.google.com/p/app-123/r/default"
  1675. Repository string `json:"repository,omitempty"`
  1676. // RevisionId: The canonical, persistent identifier of the deployed
  1677. // revision. Aliases that include tags or branch names are not allowed.
  1678. // Example (git): "2198322f89e0bb2e25021667c2ed489d1fd34e6b"
  1679. RevisionId string `json:"revisionId,omitempty"`
  1680. // ForceSendFields is a list of field names (e.g. "Repository") to
  1681. // unconditionally include in API requests. By default, fields with
  1682. // empty values are omitted from API requests. However, any non-pointer,
  1683. // non-interface field appearing in ForceSendFields will be sent to the
  1684. // server regardless of whether the field is empty or not. This may be
  1685. // used to include empty fields in Patch requests.
  1686. ForceSendFields []string `json:"-"`
  1687. // NullFields is a list of field names (e.g. "Repository") to include in
  1688. // API requests with the JSON null value. By default, fields with empty
  1689. // values are omitted from API requests. However, any field with an
  1690. // empty value appearing in NullFields will be sent to the server as
  1691. // null. It is an error if a field in this list has a non-empty value.
  1692. // This may be used to include null fields in Patch requests.
  1693. NullFields []string `json:"-"`
  1694. }
  1695. func (s *SourceReference) MarshalJSON() ([]byte, error) {
  1696. type NoMethod SourceReference
  1697. raw := NoMethod(*s)
  1698. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1699. }
  1700. // StaticDirectoryHandler: Files served directly to the user for a given
  1701. // URL, such as images, CSS stylesheets, or JavaScript source files.
  1702. // Static directory handlers make it easy to serve the entire contents
  1703. // of a directory as static files.
  1704. type StaticDirectoryHandler struct {
  1705. // ApplicationReadable: Whether files should also be uploaded as code
  1706. // data. By default, files declared in static directory handlers are
  1707. // uploaded as static data and are only served to end users; they cannot
  1708. // be read by the application. If enabled, uploads are charged against
  1709. // both your code and static data storage resource quotas.
  1710. ApplicationReadable bool `json:"applicationReadable,omitempty"`
  1711. // Directory: Path to the directory containing the static files from the
  1712. // application root directory. Everything after the end of the matched
  1713. // URL pattern is appended to static_dir to form the full path to the
  1714. // requested file.
  1715. Directory string `json:"directory,omitempty"`
  1716. // Expiration: Time a static file served by this handler should be
  1717. // cached.
  1718. Expiration string `json:"expiration,omitempty"`
  1719. // HttpHeaders: HTTP headers to use for all responses from these URLs.
  1720. HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
  1721. // MimeType: MIME type used to serve all files served by this handler.
  1722. // Defaults to file-specific MIME types, which are direved from each
  1723. // file's filename extension.
  1724. MimeType string `json:"mimeType,omitempty"`
  1725. // RequireMatchingFile: Whether this handler should match the request if
  1726. // the file referenced by the handler does not exist.
  1727. RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
  1728. // ForceSendFields is a list of field names (e.g. "ApplicationReadable")
  1729. // to unconditionally include in API requests. By default, fields with
  1730. // empty values are omitted from API requests. However, any non-pointer,
  1731. // non-interface field appearing in ForceSendFields will be sent to the
  1732. // server regardless of whether the field is empty or not. This may be
  1733. // used to include empty fields in Patch requests.
  1734. ForceSendFields []string `json:"-"`
  1735. // NullFields is a list of field names (e.g. "ApplicationReadable") to
  1736. // include in API requests with the JSON null value. By default, fields
  1737. // with empty values are omitted from API requests. However, any field
  1738. // with an empty value appearing in NullFields will be sent to the
  1739. // server as null. It is an error if a field in this list has a
  1740. // non-empty value. This may be used to include null fields in Patch
  1741. // requests.
  1742. NullFields []string `json:"-"`
  1743. }
  1744. func (s *StaticDirectoryHandler) MarshalJSON() ([]byte, error) {
  1745. type NoMethod StaticDirectoryHandler
  1746. raw := NoMethod(*s)
  1747. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1748. }
  1749. // StaticFilesHandler: Files served directly to the user for a given
  1750. // URL, such as images, CSS stylesheets, or JavaScript source files.
  1751. // Static file handlers describe which files in the application
  1752. // directory are static files, and which URLs serve them.
  1753. type StaticFilesHandler struct {
  1754. // ApplicationReadable: Whether files should also be uploaded as code
  1755. // data. By default, files declared in static file handlers are uploaded
  1756. // as static data and are only served to end users; they cannot be read
  1757. // by the application. If enabled, uploads are charged against both your
  1758. // code and static data storage resource quotas.
  1759. ApplicationReadable bool `json:"applicationReadable,omitempty"`
  1760. // Expiration: Time a static file served by this handler should be
  1761. // cached.
  1762. Expiration string `json:"expiration,omitempty"`
  1763. // HttpHeaders: HTTP headers to use for all responses from these URLs.
  1764. HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
  1765. // MimeType: MIME type used to serve all files served by this handler.
  1766. // Defaults to file-specific MIME types, which are derived from each
  1767. // file's filename extension.
  1768. MimeType string `json:"mimeType,omitempty"`
  1769. // Path: Path to the static files matched by the URL pattern, from the
  1770. // application root directory. The path can refer to text matched in
  1771. // groupings in the URL pattern.
  1772. Path string `json:"path,omitempty"`
  1773. // RequireMatchingFile: Whether this handler should match the request if
  1774. // the file referenced by the handler does not exist.
  1775. RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
  1776. // UploadPathRegex: Regular expression that matches the file paths for
  1777. // all files that should be referenced by this handler.
  1778. UploadPathRegex string `json:"uploadPathRegex,omitempty"`
  1779. // ForceSendFields is a list of field names (e.g. "ApplicationReadable")
  1780. // to unconditionally include in API requests. By default, fields with
  1781. // empty values are omitted from API requests. However, any non-pointer,
  1782. // non-interface field appearing in ForceSendFields will be sent to the
  1783. // server regardless of whether the field is empty or not. This may be
  1784. // used to include empty fields in Patch requests.
  1785. ForceSendFields []string `json:"-"`
  1786. // NullFields is a list of field names (e.g. "ApplicationReadable") to
  1787. // include in API requests with the JSON null value. By default, fields
  1788. // with empty values are omitted from API requests. However, any field
  1789. // with an empty value appearing in NullFields will be sent to the
  1790. // server as null. It is an error if a field in this list has a
  1791. // non-empty value. This may be used to include null fields in Patch
  1792. // requests.
  1793. NullFields []string `json:"-"`
  1794. }
  1795. func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) {
  1796. type NoMethod StaticFilesHandler
  1797. raw := NoMethod(*s)
  1798. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1799. }
  1800. // Status: The Status type defines a logical error model that is
  1801. // suitable for different programming environments, including REST APIs
  1802. // and RPC APIs. It is used by gRPC (https://github.com/grpc). The error
  1803. // model is designed to be:
  1804. // Simple to use and understand for most users
  1805. // Flexible enough to meet unexpected needsOverviewThe Status message
  1806. // contains three pieces of data: error code, error message, and error
  1807. // details. The error code should be an enum value of google.rpc.Code,
  1808. // but it may accept additional error codes if needed. The error message
  1809. // should be a developer-facing English message that helps developers
  1810. // understand and resolve the error. If a localized user-facing error
  1811. // message is needed, put the localized message in the error details or
  1812. // localize it in the client. The optional error details may contain
  1813. // arbitrary information about the error. There is a predefined set of
  1814. // error detail types in the package google.rpc that can be used for
  1815. // common error conditions.Language mappingThe Status message is the
  1816. // logical representation of the error model, but it is not necessarily
  1817. // the actual wire format. When the Status message is exposed in
  1818. // different client libraries and different wire protocols, it can be
  1819. // mapped differently. For example, it will likely be mapped to some
  1820. // exceptions in Java, but more likely mapped to some error codes in
  1821. // C.Other usesThe error model and the Status message can be used in a
  1822. // variety of environments, either with or without APIs, to provide a
  1823. // consistent developer experience across different environments.Example
  1824. // uses of this error model include:
  1825. // Partial errors. If a service needs to return partial errors to the
  1826. // client, it may embed the Status in the normal response to indicate
  1827. // the partial errors.
  1828. // Workflow errors. A typical workflow has multiple steps. Each step may
  1829. // have a Status message for error reporting.
  1830. // Batch operations. If a client uses batch request and batch response,
  1831. // the Status message should be used directly inside batch response, one
  1832. // for each error sub-response.
  1833. // Asynchronous operations. If an API call embeds asynchronous operation
  1834. // results in its response, the status of those operations should be
  1835. // represented directly using the Status message.
  1836. // Logging. If some API errors are stored in logs, the message Status
  1837. // could be used directly after any stripping needed for
  1838. // security/privacy reasons.
  1839. type Status struct {
  1840. // Code: The status code, which should be an enum value of
  1841. // google.rpc.Code.
  1842. Code int64 `json:"code,omitempty"`
  1843. // Details: A list of messages that carry the error details. There is a
  1844. // common set of message types for APIs to use.
  1845. Details []googleapi.RawMessage `json:"details,omitempty"`
  1846. // Message: A developer-facing error message, which should be in
  1847. // English. Any user-facing error message should be localized and sent
  1848. // in the google.rpc.Status.details field, or localized by the client.
  1849. Message string `json:"message,omitempty"`
  1850. // ForceSendFields is a list of field names (e.g. "Code") to
  1851. // unconditionally include in API requests. By default, fields with
  1852. // empty values are omitted from API requests. However, any non-pointer,
  1853. // non-interface field appearing in ForceSendFields will be sent to the
  1854. // server regardless of whether the field is empty or not. This may be
  1855. // used to include empty fields in Patch requests.
  1856. ForceSendFields []string `json:"-"`
  1857. // NullFields is a list of field names (e.g. "Code") to include in API
  1858. // requests with the JSON null value. By default, fields with empty
  1859. // values are omitted from API requests. However, any field with an
  1860. // empty value appearing in NullFields will be sent to the server as
  1861. // null. It is an error if a field in this list has a non-empty value.
  1862. // This may be used to include null fields in Patch requests.
  1863. NullFields []string `json:"-"`
  1864. }
  1865. func (s *Status) MarshalJSON() ([]byte, error) {
  1866. type NoMethod Status
  1867. raw := NoMethod(*s)
  1868. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1869. }
  1870. // TrafficSplit: Traffic routing configuration for versions within a
  1871. // single module. Traffic splits define how traffic directed to the
  1872. // module is assigned to versions.
  1873. type TrafficSplit struct {
  1874. // Allocations: Mapping from version IDs within the module to fractional
  1875. // (0.000, 1] allocations of traffic for that version. Each version can
  1876. // be specified only once, but some versions in the module may not have
  1877. // any traffic allocation. Modules that have traffic allocated cannot be
  1878. // deleted until either the module is deleted or their traffic
  1879. // allocation is removed. Allocations must sum to 1. Up to two decimal
  1880. // place precision is supported for IP-based splits and up to three
  1881. // decimal places is supported for cookie-based splits.
  1882. Allocations map[string]float64 `json:"allocations,omitempty"`
  1883. // ShardBy: Mechanism used to determine which version a request is sent
  1884. // to. The traffic selection algorithm will be stable for either type
  1885. // until allocations are changed.
  1886. //
  1887. // Possible values:
  1888. // "UNSPECIFIED" - Diversion method unspecified.
  1889. // "COOKIE" - Diversion based on a specially named cookie,
  1890. // "GOOGAPPUID." The cookie must be set by the application itself or
  1891. // else no diversion will occur.
  1892. // "IP" - Diversion based on applying the modulus operation to a
  1893. // fingerprint of the IP address.
  1894. ShardBy string `json:"shardBy,omitempty"`
  1895. // ForceSendFields is a list of field names (e.g. "Allocations") to
  1896. // unconditionally include in API requests. By default, fields with
  1897. // empty values are omitted from API requests. However, any non-pointer,
  1898. // non-interface field appearing in ForceSendFields will be sent to the
  1899. // server regardless of whether the field is empty or not. This may be
  1900. // used to include empty fields in Patch requests.
  1901. ForceSendFields []string `json:"-"`
  1902. // NullFields is a list of field names (e.g. "Allocations") to include
  1903. // in API requests with the JSON null value. By default, fields with
  1904. // empty values are omitted from API requests. However, any field with
  1905. // an empty value appearing in NullFields will be sent to the server as
  1906. // null. It is an error if a field in this list has a non-empty value.
  1907. // This may be used to include null fields in Patch requests.
  1908. NullFields []string `json:"-"`
  1909. }
  1910. func (s *TrafficSplit) MarshalJSON() ([]byte, error) {
  1911. type NoMethod TrafficSplit
  1912. raw := NoMethod(*s)
  1913. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1914. }
  1915. // UrlDispatchRule: Rules to match an HTTP request and dispatch that
  1916. // request to a module.
  1917. type UrlDispatchRule struct {
  1918. // Domain: Domain name to match against. The wildcard "*" is supported
  1919. // if specified before a period: "*.".Defaults to matching all domains:
  1920. // "*".
  1921. Domain string `json:"domain,omitempty"`
  1922. // Module: Resource ID of a module in this application that should serve
  1923. // the matched request. The module must already exist. Example: default.
  1924. Module string `json:"module,omitempty"`
  1925. // Path: Pathname within the host. Must start with a "/". A single "*"
  1926. // can be included at the end of the path. The sum of the lengths of the
  1927. // domain and path may not exceed 100 characters.
  1928. Path string `json:"path,omitempty"`
  1929. // ForceSendFields is a list of field names (e.g. "Domain") to
  1930. // unconditionally include in API requests. By default, fields with
  1931. // empty values are omitted from API requests. However, any non-pointer,
  1932. // non-interface field appearing in ForceSendFields will be sent to the
  1933. // server regardless of whether the field is empty or not. This may be
  1934. // used to include empty fields in Patch requests.
  1935. ForceSendFields []string `json:"-"`
  1936. // NullFields is a list of field names (e.g. "Domain") to include in API
  1937. // requests with the JSON null value. By default, fields with empty
  1938. // values are omitted from API requests. However, any field with an
  1939. // empty value appearing in NullFields will be sent to the server as
  1940. // null. It is an error if a field in this list has a non-empty value.
  1941. // This may be used to include null fields in Patch requests.
  1942. NullFields []string `json:"-"`
  1943. }
  1944. func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) {
  1945. type NoMethod UrlDispatchRule
  1946. raw := NoMethod(*s)
  1947. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1948. }
  1949. // UrlMap: URL pattern and description of how the URL should be handled.
  1950. // App Engine can handle URLs by executing application code, or by
  1951. // serving static files uploaded with the version, such as images, CSS,
  1952. // or JavaScript.
  1953. type UrlMap struct {
  1954. // ApiEndpoint: Uses API Endpoints to handle requests.
  1955. ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"`
  1956. // AuthFailAction: Action to take when users access resources that
  1957. // require authentication. Defaults to redirect.
  1958. //
  1959. // Possible values:
  1960. // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified.
  1961. // AUTH_FAIL_ACTION_REDIRECT is assumed.
  1962. // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to
  1963. // "accounts.google.com". The user is redirected back to the application
  1964. // URL after signing in or creating an account.
  1965. // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP
  1966. // status code and an error message.
  1967. AuthFailAction string `json:"authFailAction,omitempty"`
  1968. // Login: Level of login required to access this resource.
  1969. //
  1970. // Possible values:
  1971. // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed.
  1972. // "LOGIN_OPTIONAL" - Does not require that the user is signed in.
  1973. // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action
  1974. // is taken. In addition, if the user is not an administrator for the
  1975. // application, they are given an error message regardless of
  1976. // auth_fail_action. If the user is an administrator, the handler
  1977. // proceeds.
  1978. // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds
  1979. // normally. Otherwise, the auth_fail_action is taken.
  1980. Login string `json:"login,omitempty"`
  1981. // RedirectHttpResponseCode: 30x code to use when performing redirects
  1982. // for the secure field. Defaults to 302.
  1983. //
  1984. // Possible values:
  1985. // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" - Not specified. 302 is
  1986. // assumed.
  1987. // "REDIRECT_HTTP_RESPONSE_CODE_301" - 301 Moved Permanently code.
  1988. // "REDIRECT_HTTP_RESPONSE_CODE_302" - 302 Moved Temporarily code.
  1989. // "REDIRECT_HTTP_RESPONSE_CODE_303" - 303 See Other code.
  1990. // "REDIRECT_HTTP_RESPONSE_CODE_307" - 307 Temporary Redirect code.
  1991. RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"`
  1992. // Script: Executes a script to handle the request that matches this URL
  1993. // pattern.
  1994. Script *ScriptHandler `json:"script,omitempty"`
  1995. // SecurityLevel: Security (HTTPS) enforcement for this URL.
  1996. //
  1997. // Possible values:
  1998. // "SECURE_UNSPECIFIED" - Not specified.
  1999. // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that
  2000. // match the handler succeed without redirects. The application can
  2001. // examine the request to determine which protocol was used, and respond
  2002. // accordingly.
  2003. // "SECURE_NEVER" - Requests for a URL that match this handler that
  2004. // use HTTPS are automatically redirected to the HTTP equivalent URL.
  2005. // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that
  2006. // match the handler succeed without redirects. The application can
  2007. // examine the request to determine which protocol was used and respond
  2008. // accordingly.
  2009. // "SECURE_ALWAYS" - Requests for a URL that match this handler that
  2010. // do not use HTTPS are automatically redirected to the HTTPS URL with
  2011. // the same path. Query parameters are reserved for the redirect.
  2012. SecurityLevel string `json:"securityLevel,omitempty"`
  2013. // StaticDirectory: Serves the entire contents of a directory as static
  2014. // files.This attribute is deprecated. You can mimic the behavior of
  2015. // static directories using static files.
  2016. StaticDirectory *StaticDirectoryHandler `json:"staticDirectory,omitempty"`
  2017. // StaticFiles: Returns the contents of a file, such as an image, as the
  2018. // response.
  2019. StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"`
  2020. // UrlRegex: A URL prefix. Uses regular expression syntax, which means
  2021. // regexp special characters must be escaped, but should not contain
  2022. // groupings. All URLs that begin with this prefix are handled by this
  2023. // handler, using the portion of the URL after the prefix as part of the
  2024. // file path.
  2025. UrlRegex string `json:"urlRegex,omitempty"`
  2026. // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to
  2027. // unconditionally include in API requests. By default, fields with
  2028. // empty values are omitted from API requests. However, any non-pointer,
  2029. // non-interface field appearing in ForceSendFields will be sent to the
  2030. // server regardless of whether the field is empty or not. This may be
  2031. // used to include empty fields in Patch requests.
  2032. ForceSendFields []string `json:"-"`
  2033. // NullFields is a list of field names (e.g. "ApiEndpoint") to include
  2034. // in API requests with the JSON null value. By default, fields with
  2035. // empty values are omitted from API requests. However, any field with
  2036. // an empty value appearing in NullFields will be sent to the server as
  2037. // null. It is an error if a field in this list has a non-empty value.
  2038. // This may be used to include null fields in Patch requests.
  2039. NullFields []string `json:"-"`
  2040. }
  2041. func (s *UrlMap) MarshalJSON() ([]byte, error) {
  2042. type NoMethod UrlMap
  2043. raw := NoMethod(*s)
  2044. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2045. }
  2046. // Version: A Version resource is a specific set of source code and
  2047. // configuration files that are deployed into a module.
  2048. type Version struct {
  2049. // ApiConfig: Serving configuration for Google Cloud Endpoints
  2050. // (https://cloud.google.com/appengine/docs/python/endpoints/).Only
  2051. // returned in GET requests if view=FULL is set.
  2052. ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"`
  2053. // AutomaticScaling: Automatic scaling is based on request rate,
  2054. // response latencies, and other application metrics.
  2055. AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"`
  2056. // BasicScaling: A module with basic scaling will create an instance
  2057. // when the application receives a request. The instance will be turned
  2058. // down when the app becomes idle. Basic scaling is ideal for work that
  2059. // is intermittent or driven by user activity.
  2060. BasicScaling *BasicScaling `json:"basicScaling,omitempty"`
  2061. // BetaSettings: Metadata settings that are supplied to this version to
  2062. // enable beta runtime features.
  2063. BetaSettings map[string]string `json:"betaSettings,omitempty"`
  2064. // CreationTime: Time that this version was created.@OutputOnly
  2065. CreationTime string `json:"creationTime,omitempty"`
  2066. // DefaultExpiration: Duration that static files should be cached by web
  2067. // proxies and browsers. Only applicable if the corresponding
  2068. // StaticFilesHandler
  2069. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  2070. // pps.services.versions#staticfileshandler) does not specify its own
  2071. // expiration time.Only returned in GET requests if view=FULL is set.
  2072. DefaultExpiration string `json:"defaultExpiration,omitempty"`
  2073. // Deployer: Email address of the user who created this
  2074. // version.@OutputOnly
  2075. Deployer string `json:"deployer,omitempty"`
  2076. // Deployment: Code and application artifacts that make up this
  2077. // version.Only returned in GET requests if view=FULL is set.
  2078. Deployment *Deployment `json:"deployment,omitempty"`
  2079. // EndpointsApiService: Cloud Endpoints configuration.If
  2080. // endpoints_api_service is set, the Cloud Endpoints Extensible Service
  2081. // Proxy will be provided to serve the API implemented by the app.
  2082. EndpointsApiService *EndpointsApiService `json:"endpointsApiService,omitempty"`
  2083. // Env: App Engine execution environment to use for this
  2084. // version.Defaults to 1.
  2085. Env string `json:"env,omitempty"`
  2086. // EnvVariables: Environment variables made available to the
  2087. // application.Only returned in GET requests if view=FULL is set.
  2088. EnvVariables map[string]string `json:"envVariables,omitempty"`
  2089. // ErrorHandlers: Custom static error pages. Limited to 10KB per
  2090. // page.Only returned in GET requests if view=FULL is set.
  2091. ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"`
  2092. // Handlers: An ordered list of URL-matching patterns that should be
  2093. // applied to incoming requests. The first matching URL handles the
  2094. // request and other request handlers are not attempted.Only returned in
  2095. // GET requests if view=FULL is set.
  2096. Handlers []*UrlMap `json:"handlers,omitempty"`
  2097. // HealthCheck: Configures health checking for VM instances. Unhealthy
  2098. // instances are stopped and replaced with new instances. Only
  2099. // applicable for VM runtimes.Only returned in GET requests if view=FULL
  2100. // is set.
  2101. HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
  2102. // Id: Relative name of the version within the module. Example: v1.
  2103. // Version names can contain only lowercase letters, numbers, or
  2104. // hyphens. Reserved names: "default", "latest", and any name with the
  2105. // prefix "ah-".
  2106. Id string `json:"id,omitempty"`
  2107. // InboundServices: Before an application can receive email or XMPP
  2108. // messages, the application must be configured to enable the service.
  2109. //
  2110. // Possible values:
  2111. // "INBOUND_SERVICE_UNSPECIFIED" - Not specified.
  2112. // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail.
  2113. // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive
  2114. // email-bound notifications.
  2115. // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive
  2116. // error stanzas.
  2117. // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive
  2118. // instant messages.
  2119. // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive
  2120. // user subscription POSTs.
  2121. // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive
  2122. // a user's chat presence.
  2123. // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for
  2124. // notifications when a client connects or disconnects from a channel.
  2125. // "INBOUND_SERVICE_WARMUP" - Enables warmup requests.
  2126. InboundServices []string `json:"inboundServices,omitempty"`
  2127. // InstanceClass: Instance class that is used to run this version. Valid
  2128. // values are:
  2129. // AutomaticScaling: F1, F2, F4, F4_1G
  2130. // ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1
  2131. // for AutomaticScaling and B1 for ManualScaling or BasicScaling.
  2132. InstanceClass string `json:"instanceClass,omitempty"`
  2133. // Libraries: Configuration for third-party Python runtime libraries
  2134. // required by the application.Only returned in GET requests if
  2135. // view=FULL is set.
  2136. Libraries []*Library `json:"libraries,omitempty"`
  2137. // ManualScaling: A module with manual scaling runs continuously,
  2138. // allowing you to perform complex initialization and rely on the state
  2139. // of its memory over time.
  2140. ManualScaling *ManualScaling `json:"manualScaling,omitempty"`
  2141. // Name: Full path to the Version resource in the API. Example:
  2142. // apps/myapp/modules/default/versions/v1.@OutputOnly
  2143. Name string `json:"name,omitempty"`
  2144. // Network: Extra network settings. Only applicable for VM runtimes.
  2145. Network *Network `json:"network,omitempty"`
  2146. // NobuildFilesRegex: Files that match this pattern will not be built
  2147. // into this version. Only applicable for Go runtimes.Only returned in
  2148. // GET requests if view=FULL is set.
  2149. NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"`
  2150. // Resources: Machine resources for this version. Only applicable for VM
  2151. // runtimes.
  2152. Resources *Resources `json:"resources,omitempty"`
  2153. // Runtime: Desired runtime. Example: python27.
  2154. Runtime string `json:"runtime,omitempty"`
  2155. // RuntimeApiVersion: The version of the API in the given runtime
  2156. // environment. Please see the app.yaml reference for valid values at
  2157. // https://cloud.google.com/appengine/docs/standard/<language>/config/appref
  2158. RuntimeApiVersion string `json:"runtimeApiVersion,omitempty"`
  2159. // RuntimeMainExecutablePath: The path or name of the app's main
  2160. // executable.
  2161. RuntimeMainExecutablePath string `json:"runtimeMainExecutablePath,omitempty"`
  2162. // ServingStatus: Current serving status of this version. Only the
  2163. // versions with a SERVING status create instances and can be
  2164. // billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to
  2165. // SERVING.
  2166. //
  2167. // Possible values:
  2168. // "SERVING_STATUS_UNSPECIFIED" - Not specified.
  2169. // "SERVING" - Currently serving. Instances are created according to
  2170. // the scaling settings of the version.
  2171. // "STOPPED" - Disabled. No instances will be created and the scaling
  2172. // settings are ignored until the state of the version changes to
  2173. // SERVING.
  2174. ServingStatus string `json:"servingStatus,omitempty"`
  2175. // Threadsafe: Whether multiple requests can be dispatched to this
  2176. // version at once.
  2177. Threadsafe bool `json:"threadsafe,omitempty"`
  2178. // Vm: Whether to deploy this version in a container on a virtual
  2179. // machine.
  2180. Vm bool `json:"vm,omitempty"`
  2181. // ServerResponse contains the HTTP response code and headers from the
  2182. // server.
  2183. googleapi.ServerResponse `json:"-"`
  2184. // ForceSendFields is a list of field names (e.g. "ApiConfig") to
  2185. // unconditionally include in API requests. By default, fields with
  2186. // empty values are omitted from API requests. However, any non-pointer,
  2187. // non-interface field appearing in ForceSendFields will be sent to the
  2188. // server regardless of whether the field is empty or not. This may be
  2189. // used to include empty fields in Patch requests.
  2190. ForceSendFields []string `json:"-"`
  2191. // NullFields is a list of field names (e.g. "ApiConfig") to include in
  2192. // API requests with the JSON null value. By default, fields with empty
  2193. // values are omitted from API requests. However, any field with an
  2194. // empty value appearing in NullFields will be sent to the server as
  2195. // null. It is an error if a field in this list has a non-empty value.
  2196. // This may be used to include null fields in Patch requests.
  2197. NullFields []string `json:"-"`
  2198. }
  2199. func (s *Version) MarshalJSON() ([]byte, error) {
  2200. type NoMethod Version
  2201. raw := NoMethod(*s)
  2202. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2203. }
  2204. // Volume: Volumes mounted within the app container. Only applicable for
  2205. // VM runtimes.
  2206. type Volume struct {
  2207. // Name: Unique name for the volume.
  2208. Name string `json:"name,omitempty"`
  2209. // SizeGb: Volume size in gigabytes.
  2210. SizeGb float64 `json:"sizeGb,omitempty"`
  2211. // VolumeType: Underlying volume type, e.g. 'tmpfs'.
  2212. VolumeType string `json:"volumeType,omitempty"`
  2213. // ForceSendFields is a list of field names (e.g. "Name") to
  2214. // unconditionally include in API requests. By default, fields with
  2215. // empty values are omitted from API requests. However, any non-pointer,
  2216. // non-interface field appearing in ForceSendFields will be sent to the
  2217. // server regardless of whether the field is empty or not. This may be
  2218. // used to include empty fields in Patch requests.
  2219. ForceSendFields []string `json:"-"`
  2220. // NullFields is a list of field names (e.g. "Name") to include in API
  2221. // requests with the JSON null value. By default, fields with empty
  2222. // values are omitted from API requests. However, any field with an
  2223. // empty value appearing in NullFields will be sent to the server as
  2224. // null. It is an error if a field in this list has a non-empty value.
  2225. // This may be used to include null fields in Patch requests.
  2226. NullFields []string `json:"-"`
  2227. }
  2228. func (s *Volume) MarshalJSON() ([]byte, error) {
  2229. type NoMethod Volume
  2230. raw := NoMethod(*s)
  2231. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2232. }
  2233. func (s *Volume) UnmarshalJSON(data []byte) error {
  2234. type NoMethod Volume
  2235. var s1 struct {
  2236. SizeGb gensupport.JSONFloat64 `json:"sizeGb"`
  2237. *NoMethod
  2238. }
  2239. s1.NoMethod = (*NoMethod)(s)
  2240. if err := json.Unmarshal(data, &s1); err != nil {
  2241. return err
  2242. }
  2243. s.SizeGb = float64(s1.SizeGb)
  2244. return nil
  2245. }
  2246. // method id "appengine.apps.create":
  2247. type AppsCreateCall struct {
  2248. s *APIService
  2249. application *Application
  2250. urlParams_ gensupport.URLParams
  2251. ctx_ context.Context
  2252. header_ http.Header
  2253. }
  2254. // Create: Creates an App Engine application for a Google Cloud Platform
  2255. // project. Required fields:
  2256. // id - The ID of the target Cloud Platform project.
  2257. // location - The region
  2258. // (https://cloud.google.com/appengine/docs/locations) where you want
  2259. // the App Engine application located.For more information about App
  2260. // Engine applications, see Managing Projects, Applications, and Billing
  2261. // (https://cloud.google.com/appengine/docs/python/console/).
  2262. func (r *AppsService) Create(application *Application) *AppsCreateCall {
  2263. c := &AppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2264. c.application = application
  2265. return c
  2266. }
  2267. // Fields allows partial responses to be retrieved. See
  2268. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2269. // for more information.
  2270. func (c *AppsCreateCall) Fields(s ...googleapi.Field) *AppsCreateCall {
  2271. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2272. return c
  2273. }
  2274. // Context sets the context to be used in this call's Do method. Any
  2275. // pending HTTP request will be aborted if the provided context is
  2276. // canceled.
  2277. func (c *AppsCreateCall) Context(ctx context.Context) *AppsCreateCall {
  2278. c.ctx_ = ctx
  2279. return c
  2280. }
  2281. // Header returns an http.Header that can be modified by the caller to
  2282. // add HTTP headers to the request.
  2283. func (c *AppsCreateCall) Header() http.Header {
  2284. if c.header_ == nil {
  2285. c.header_ = make(http.Header)
  2286. }
  2287. return c.header_
  2288. }
  2289. func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) {
  2290. reqHeaders := make(http.Header)
  2291. for k, v := range c.header_ {
  2292. reqHeaders[k] = v
  2293. }
  2294. reqHeaders.Set("User-Agent", c.s.userAgent())
  2295. var body io.Reader = nil
  2296. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  2297. if err != nil {
  2298. return nil, err
  2299. }
  2300. reqHeaders.Set("Content-Type", "application/json")
  2301. c.urlParams_.Set("alt", alt)
  2302. c.urlParams_.Set("prettyPrint", "false")
  2303. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps")
  2304. urls += "?" + c.urlParams_.Encode()
  2305. req, err := http.NewRequest("POST", urls, body)
  2306. if err != nil {
  2307. return nil, err
  2308. }
  2309. req.Header = reqHeaders
  2310. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2311. }
  2312. // Do executes the "appengine.apps.create" call.
  2313. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2314. // status code is an error. Response headers are in either
  2315. // *Operation.ServerResponse.Header or (if a response was returned at
  2316. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2317. // to check whether the returned error was because
  2318. // http.StatusNotModified was returned.
  2319. func (c *AppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2320. gensupport.SetOptions(c.urlParams_, opts...)
  2321. res, err := c.doRequest("json")
  2322. if res != nil && res.StatusCode == http.StatusNotModified {
  2323. if res.Body != nil {
  2324. res.Body.Close()
  2325. }
  2326. return nil, &googleapi.Error{
  2327. Code: res.StatusCode,
  2328. Header: res.Header,
  2329. }
  2330. }
  2331. if err != nil {
  2332. return nil, err
  2333. }
  2334. defer googleapi.CloseBody(res)
  2335. if err := googleapi.CheckResponse(res); err != nil {
  2336. return nil, err
  2337. }
  2338. ret := &Operation{
  2339. ServerResponse: googleapi.ServerResponse{
  2340. Header: res.Header,
  2341. HTTPStatusCode: res.StatusCode,
  2342. },
  2343. }
  2344. target := &ret
  2345. if err := gensupport.DecodeResponse(target, res); err != nil {
  2346. return nil, err
  2347. }
  2348. return ret, nil
  2349. // {
  2350. // "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/).",
  2351. // "flatPath": "v1beta4/apps",
  2352. // "httpMethod": "POST",
  2353. // "id": "appengine.apps.create",
  2354. // "parameterOrder": [],
  2355. // "parameters": {},
  2356. // "path": "v1beta4/apps",
  2357. // "request": {
  2358. // "$ref": "Application"
  2359. // },
  2360. // "response": {
  2361. // "$ref": "Operation"
  2362. // },
  2363. // "scopes": [
  2364. // "https://www.googleapis.com/auth/cloud-platform"
  2365. // ]
  2366. // }
  2367. }
  2368. // method id "appengine.apps.get":
  2369. type AppsGetCall struct {
  2370. s *APIService
  2371. appsId string
  2372. urlParams_ gensupport.URLParams
  2373. ifNoneMatch_ string
  2374. ctx_ context.Context
  2375. header_ http.Header
  2376. }
  2377. // Get: Gets information about an application.
  2378. func (r *AppsService) Get(appsId string) *AppsGetCall {
  2379. c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2380. c.appsId = appsId
  2381. return c
  2382. }
  2383. // EnsureResourcesExist sets the optional parameter
  2384. // "ensureResourcesExist": Certain resources associated with an
  2385. // application are created on-demand. Controls whether these resources
  2386. // should be created when performing the GET operation. If specified and
  2387. // any resources could not be created, the request will fail with an
  2388. // error code. Additionally, this parameter can cause the request to
  2389. // take longer to complete.
  2390. func (c *AppsGetCall) EnsureResourcesExist(ensureResourcesExist bool) *AppsGetCall {
  2391. c.urlParams_.Set("ensureResourcesExist", fmt.Sprint(ensureResourcesExist))
  2392. return c
  2393. }
  2394. // Fields allows partial responses to be retrieved. See
  2395. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2396. // for more information.
  2397. func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
  2398. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2399. return c
  2400. }
  2401. // IfNoneMatch sets the optional parameter which makes the operation
  2402. // fail if the object's ETag matches the given value. This is useful for
  2403. // getting updates only after the object has changed since the last
  2404. // request. Use googleapi.IsNotModified to check whether the response
  2405. // error from Do is the result of In-None-Match.
  2406. func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
  2407. c.ifNoneMatch_ = entityTag
  2408. return c
  2409. }
  2410. // Context sets the context to be used in this call's Do method. Any
  2411. // pending HTTP request will be aborted if the provided context is
  2412. // canceled.
  2413. func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
  2414. c.ctx_ = ctx
  2415. return c
  2416. }
  2417. // Header returns an http.Header that can be modified by the caller to
  2418. // add HTTP headers to the request.
  2419. func (c *AppsGetCall) Header() http.Header {
  2420. if c.header_ == nil {
  2421. c.header_ = make(http.Header)
  2422. }
  2423. return c.header_
  2424. }
  2425. func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
  2426. reqHeaders := make(http.Header)
  2427. for k, v := range c.header_ {
  2428. reqHeaders[k] = v
  2429. }
  2430. reqHeaders.Set("User-Agent", c.s.userAgent())
  2431. if c.ifNoneMatch_ != "" {
  2432. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2433. }
  2434. var body io.Reader = nil
  2435. c.urlParams_.Set("alt", alt)
  2436. c.urlParams_.Set("prettyPrint", "false")
  2437. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}")
  2438. urls += "?" + c.urlParams_.Encode()
  2439. req, err := http.NewRequest("GET", urls, body)
  2440. if err != nil {
  2441. return nil, err
  2442. }
  2443. req.Header = reqHeaders
  2444. googleapi.Expand(req.URL, map[string]string{
  2445. "appsId": c.appsId,
  2446. })
  2447. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2448. }
  2449. // Do executes the "appengine.apps.get" call.
  2450. // Exactly one of *Application or error will be non-nil. Any non-2xx
  2451. // status code is an error. Response headers are in either
  2452. // *Application.ServerResponse.Header or (if a response was returned at
  2453. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2454. // to check whether the returned error was because
  2455. // http.StatusNotModified was returned.
  2456. func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
  2457. gensupport.SetOptions(c.urlParams_, opts...)
  2458. res, err := c.doRequest("json")
  2459. if res != nil && res.StatusCode == http.StatusNotModified {
  2460. if res.Body != nil {
  2461. res.Body.Close()
  2462. }
  2463. return nil, &googleapi.Error{
  2464. Code: res.StatusCode,
  2465. Header: res.Header,
  2466. }
  2467. }
  2468. if err != nil {
  2469. return nil, err
  2470. }
  2471. defer googleapi.CloseBody(res)
  2472. if err := googleapi.CheckResponse(res); err != nil {
  2473. return nil, err
  2474. }
  2475. ret := &Application{
  2476. ServerResponse: googleapi.ServerResponse{
  2477. Header: res.Header,
  2478. HTTPStatusCode: res.StatusCode,
  2479. },
  2480. }
  2481. target := &ret
  2482. if err := gensupport.DecodeResponse(target, res); err != nil {
  2483. return nil, err
  2484. }
  2485. return ret, nil
  2486. // {
  2487. // "description": "Gets information about an application.",
  2488. // "flatPath": "v1beta4/apps/{appsId}",
  2489. // "httpMethod": "GET",
  2490. // "id": "appengine.apps.get",
  2491. // "parameterOrder": [
  2492. // "appsId"
  2493. // ],
  2494. // "parameters": {
  2495. // "appsId": {
  2496. // "description": "Part of `name`. Name of the application to get. Example: apps/myapp.",
  2497. // "location": "path",
  2498. // "required": true,
  2499. // "type": "string"
  2500. // },
  2501. // "ensureResourcesExist": {
  2502. // "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.",
  2503. // "location": "query",
  2504. // "type": "boolean"
  2505. // }
  2506. // },
  2507. // "path": "v1beta4/apps/{appsId}",
  2508. // "response": {
  2509. // "$ref": "Application"
  2510. // },
  2511. // "scopes": [
  2512. // "https://www.googleapis.com/auth/cloud-platform"
  2513. // ]
  2514. // }
  2515. }
  2516. // method id "appengine.apps.patch":
  2517. type AppsPatchCall struct {
  2518. s *APIService
  2519. appsId string
  2520. application *Application
  2521. urlParams_ gensupport.URLParams
  2522. ctx_ context.Context
  2523. header_ http.Header
  2524. }
  2525. // Patch: Updates the specified Application resource. You can update the
  2526. // following fields:
  2527. // auth_domain
  2528. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  2529. // ta4/apps#Application.FIELDS.auth_domain)
  2530. // default_cookie_expiration
  2531. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  2532. // ta4/apps#Application.FIELDS.default_cookie_expiration)
  2533. func (r *AppsService) Patch(appsId string, application *Application) *AppsPatchCall {
  2534. c := &AppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2535. c.appsId = appsId
  2536. c.application = application
  2537. return c
  2538. }
  2539. // Mask sets the optional parameter "mask": Standard field mask for the
  2540. // set of fields to be updated.
  2541. func (c *AppsPatchCall) Mask(mask string) *AppsPatchCall {
  2542. c.urlParams_.Set("mask", mask)
  2543. return c
  2544. }
  2545. // Fields allows partial responses to be retrieved. See
  2546. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2547. // for more information.
  2548. func (c *AppsPatchCall) Fields(s ...googleapi.Field) *AppsPatchCall {
  2549. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2550. return c
  2551. }
  2552. // Context sets the context to be used in this call's Do method. Any
  2553. // pending HTTP request will be aborted if the provided context is
  2554. // canceled.
  2555. func (c *AppsPatchCall) Context(ctx context.Context) *AppsPatchCall {
  2556. c.ctx_ = ctx
  2557. return c
  2558. }
  2559. // Header returns an http.Header that can be modified by the caller to
  2560. // add HTTP headers to the request.
  2561. func (c *AppsPatchCall) Header() http.Header {
  2562. if c.header_ == nil {
  2563. c.header_ = make(http.Header)
  2564. }
  2565. return c.header_
  2566. }
  2567. func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) {
  2568. reqHeaders := make(http.Header)
  2569. for k, v := range c.header_ {
  2570. reqHeaders[k] = v
  2571. }
  2572. reqHeaders.Set("User-Agent", c.s.userAgent())
  2573. var body io.Reader = nil
  2574. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  2575. if err != nil {
  2576. return nil, err
  2577. }
  2578. reqHeaders.Set("Content-Type", "application/json")
  2579. c.urlParams_.Set("alt", alt)
  2580. c.urlParams_.Set("prettyPrint", "false")
  2581. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}")
  2582. urls += "?" + c.urlParams_.Encode()
  2583. req, err := http.NewRequest("PATCH", urls, body)
  2584. if err != nil {
  2585. return nil, err
  2586. }
  2587. req.Header = reqHeaders
  2588. googleapi.Expand(req.URL, map[string]string{
  2589. "appsId": c.appsId,
  2590. })
  2591. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2592. }
  2593. // Do executes the "appengine.apps.patch" call.
  2594. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2595. // status code is an error. Response headers are in either
  2596. // *Operation.ServerResponse.Header or (if a response was returned at
  2597. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2598. // to check whether the returned error was because
  2599. // http.StatusNotModified was returned.
  2600. func (c *AppsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2601. gensupport.SetOptions(c.urlParams_, opts...)
  2602. res, err := c.doRequest("json")
  2603. if res != nil && res.StatusCode == http.StatusNotModified {
  2604. if res.Body != nil {
  2605. res.Body.Close()
  2606. }
  2607. return nil, &googleapi.Error{
  2608. Code: res.StatusCode,
  2609. Header: res.Header,
  2610. }
  2611. }
  2612. if err != nil {
  2613. return nil, err
  2614. }
  2615. defer googleapi.CloseBody(res)
  2616. if err := googleapi.CheckResponse(res); err != nil {
  2617. return nil, err
  2618. }
  2619. ret := &Operation{
  2620. ServerResponse: googleapi.ServerResponse{
  2621. Header: res.Header,
  2622. HTTPStatusCode: res.StatusCode,
  2623. },
  2624. }
  2625. target := &ret
  2626. if err := gensupport.DecodeResponse(target, res); err != nil {
  2627. return nil, err
  2628. }
  2629. return ret, nil
  2630. // {
  2631. // "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration)",
  2632. // "flatPath": "v1beta4/apps/{appsId}",
  2633. // "httpMethod": "PATCH",
  2634. // "id": "appengine.apps.patch",
  2635. // "parameterOrder": [
  2636. // "appsId"
  2637. // ],
  2638. // "parameters": {
  2639. // "appsId": {
  2640. // "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.",
  2641. // "location": "path",
  2642. // "required": true,
  2643. // "type": "string"
  2644. // },
  2645. // "mask": {
  2646. // "description": "Standard field mask for the set of fields to be updated.",
  2647. // "format": "google-fieldmask",
  2648. // "location": "query",
  2649. // "type": "string"
  2650. // }
  2651. // },
  2652. // "path": "v1beta4/apps/{appsId}",
  2653. // "request": {
  2654. // "$ref": "Application"
  2655. // },
  2656. // "response": {
  2657. // "$ref": "Operation"
  2658. // },
  2659. // "scopes": [
  2660. // "https://www.googleapis.com/auth/cloud-platform"
  2661. // ]
  2662. // }
  2663. }
  2664. // method id "appengine.apps.locations.get":
  2665. type AppsLocationsGetCall struct {
  2666. s *APIService
  2667. appsId string
  2668. locationsId string
  2669. urlParams_ gensupport.URLParams
  2670. ifNoneMatch_ string
  2671. ctx_ context.Context
  2672. header_ http.Header
  2673. }
  2674. // Get: Gets information about a location.
  2675. func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall {
  2676. c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2677. c.appsId = appsId
  2678. c.locationsId = locationsId
  2679. return c
  2680. }
  2681. // Fields allows partial responses to be retrieved. See
  2682. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2683. // for more information.
  2684. func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall {
  2685. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2686. return c
  2687. }
  2688. // IfNoneMatch sets the optional parameter which makes the operation
  2689. // fail if the object's ETag matches the given value. This is useful for
  2690. // getting updates only after the object has changed since the last
  2691. // request. Use googleapi.IsNotModified to check whether the response
  2692. // error from Do is the result of In-None-Match.
  2693. func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall {
  2694. c.ifNoneMatch_ = entityTag
  2695. return c
  2696. }
  2697. // Context sets the context to be used in this call's Do method. Any
  2698. // pending HTTP request will be aborted if the provided context is
  2699. // canceled.
  2700. func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall {
  2701. c.ctx_ = ctx
  2702. return c
  2703. }
  2704. // Header returns an http.Header that can be modified by the caller to
  2705. // add HTTP headers to the request.
  2706. func (c *AppsLocationsGetCall) Header() http.Header {
  2707. if c.header_ == nil {
  2708. c.header_ = make(http.Header)
  2709. }
  2710. return c.header_
  2711. }
  2712. func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  2713. reqHeaders := make(http.Header)
  2714. for k, v := range c.header_ {
  2715. reqHeaders[k] = v
  2716. }
  2717. reqHeaders.Set("User-Agent", c.s.userAgent())
  2718. if c.ifNoneMatch_ != "" {
  2719. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2720. }
  2721. var body io.Reader = nil
  2722. c.urlParams_.Set("alt", alt)
  2723. c.urlParams_.Set("prettyPrint", "false")
  2724. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/locations/{locationsId}")
  2725. urls += "?" + c.urlParams_.Encode()
  2726. req, err := http.NewRequest("GET", urls, body)
  2727. if err != nil {
  2728. return nil, err
  2729. }
  2730. req.Header = reqHeaders
  2731. googleapi.Expand(req.URL, map[string]string{
  2732. "appsId": c.appsId,
  2733. "locationsId": c.locationsId,
  2734. })
  2735. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2736. }
  2737. // Do executes the "appengine.apps.locations.get" call.
  2738. // Exactly one of *Location or error will be non-nil. Any non-2xx status
  2739. // code is an error. Response headers are in either
  2740. // *Location.ServerResponse.Header or (if a response was returned at
  2741. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2742. // to check whether the returned error was because
  2743. // http.StatusNotModified was returned.
  2744. func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2745. gensupport.SetOptions(c.urlParams_, opts...)
  2746. res, err := c.doRequest("json")
  2747. if res != nil && res.StatusCode == http.StatusNotModified {
  2748. if res.Body != nil {
  2749. res.Body.Close()
  2750. }
  2751. return nil, &googleapi.Error{
  2752. Code: res.StatusCode,
  2753. Header: res.Header,
  2754. }
  2755. }
  2756. if err != nil {
  2757. return nil, err
  2758. }
  2759. defer googleapi.CloseBody(res)
  2760. if err := googleapi.CheckResponse(res); err != nil {
  2761. return nil, err
  2762. }
  2763. ret := &Location{
  2764. ServerResponse: googleapi.ServerResponse{
  2765. Header: res.Header,
  2766. HTTPStatusCode: res.StatusCode,
  2767. },
  2768. }
  2769. target := &ret
  2770. if err := gensupport.DecodeResponse(target, res); err != nil {
  2771. return nil, err
  2772. }
  2773. return ret, nil
  2774. // {
  2775. // "description": "Gets information about a location.",
  2776. // "flatPath": "v1beta4/apps/{appsId}/locations/{locationsId}",
  2777. // "httpMethod": "GET",
  2778. // "id": "appengine.apps.locations.get",
  2779. // "parameterOrder": [
  2780. // "appsId",
  2781. // "locationsId"
  2782. // ],
  2783. // "parameters": {
  2784. // "appsId": {
  2785. // "description": "Part of `name`. Resource name for the location.",
  2786. // "location": "path",
  2787. // "required": true,
  2788. // "type": "string"
  2789. // },
  2790. // "locationsId": {
  2791. // "description": "Part of `name`. See documentation of `appsId`.",
  2792. // "location": "path",
  2793. // "required": true,
  2794. // "type": "string"
  2795. // }
  2796. // },
  2797. // "path": "v1beta4/apps/{appsId}/locations/{locationsId}",
  2798. // "response": {
  2799. // "$ref": "Location"
  2800. // },
  2801. // "scopes": [
  2802. // "https://www.googleapis.com/auth/appengine.admin",
  2803. // "https://www.googleapis.com/auth/cloud-platform",
  2804. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2805. // ]
  2806. // }
  2807. }
  2808. // method id "appengine.apps.locations.list":
  2809. type AppsLocationsListCall struct {
  2810. s *APIService
  2811. appsId string
  2812. urlParams_ gensupport.URLParams
  2813. ifNoneMatch_ string
  2814. ctx_ context.Context
  2815. header_ http.Header
  2816. }
  2817. // List: Lists information about the supported locations for this
  2818. // service.
  2819. func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall {
  2820. c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2821. c.appsId = appsId
  2822. return c
  2823. }
  2824. // Filter sets the optional parameter "filter": The standard list
  2825. // filter.
  2826. func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall {
  2827. c.urlParams_.Set("filter", filter)
  2828. return c
  2829. }
  2830. // PageSize sets the optional parameter "pageSize": The standard list
  2831. // page size.
  2832. func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall {
  2833. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2834. return c
  2835. }
  2836. // PageToken sets the optional parameter "pageToken": The standard list
  2837. // page token.
  2838. func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall {
  2839. c.urlParams_.Set("pageToken", pageToken)
  2840. return c
  2841. }
  2842. // Fields allows partial responses to be retrieved. See
  2843. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2844. // for more information.
  2845. func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall {
  2846. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2847. return c
  2848. }
  2849. // IfNoneMatch sets the optional parameter which makes the operation
  2850. // fail if the object's ETag matches the given value. This is useful for
  2851. // getting updates only after the object has changed since the last
  2852. // request. Use googleapi.IsNotModified to check whether the response
  2853. // error from Do is the result of In-None-Match.
  2854. func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall {
  2855. c.ifNoneMatch_ = entityTag
  2856. return c
  2857. }
  2858. // Context sets the context to be used in this call's Do method. Any
  2859. // pending HTTP request will be aborted if the provided context is
  2860. // canceled.
  2861. func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall {
  2862. c.ctx_ = ctx
  2863. return c
  2864. }
  2865. // Header returns an http.Header that can be modified by the caller to
  2866. // add HTTP headers to the request.
  2867. func (c *AppsLocationsListCall) Header() http.Header {
  2868. if c.header_ == nil {
  2869. c.header_ = make(http.Header)
  2870. }
  2871. return c.header_
  2872. }
  2873. func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2874. reqHeaders := make(http.Header)
  2875. for k, v := range c.header_ {
  2876. reqHeaders[k] = v
  2877. }
  2878. reqHeaders.Set("User-Agent", c.s.userAgent())
  2879. if c.ifNoneMatch_ != "" {
  2880. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2881. }
  2882. var body io.Reader = nil
  2883. c.urlParams_.Set("alt", alt)
  2884. c.urlParams_.Set("prettyPrint", "false")
  2885. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/locations")
  2886. urls += "?" + c.urlParams_.Encode()
  2887. req, err := http.NewRequest("GET", urls, body)
  2888. if err != nil {
  2889. return nil, err
  2890. }
  2891. req.Header = reqHeaders
  2892. googleapi.Expand(req.URL, map[string]string{
  2893. "appsId": c.appsId,
  2894. })
  2895. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2896. }
  2897. // Do executes the "appengine.apps.locations.list" call.
  2898. // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  2899. // non-2xx status code is an error. Response headers are in either
  2900. // *ListLocationsResponse.ServerResponse.Header or (if a response was
  2901. // returned at all) in error.(*googleapi.Error).Header. Use
  2902. // googleapi.IsNotModified to check whether the returned error was
  2903. // because http.StatusNotModified was returned.
  2904. func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2905. gensupport.SetOptions(c.urlParams_, opts...)
  2906. res, err := c.doRequest("json")
  2907. if res != nil && res.StatusCode == http.StatusNotModified {
  2908. if res.Body != nil {
  2909. res.Body.Close()
  2910. }
  2911. return nil, &googleapi.Error{
  2912. Code: res.StatusCode,
  2913. Header: res.Header,
  2914. }
  2915. }
  2916. if err != nil {
  2917. return nil, err
  2918. }
  2919. defer googleapi.CloseBody(res)
  2920. if err := googleapi.CheckResponse(res); err != nil {
  2921. return nil, err
  2922. }
  2923. ret := &ListLocationsResponse{
  2924. ServerResponse: googleapi.ServerResponse{
  2925. Header: res.Header,
  2926. HTTPStatusCode: res.StatusCode,
  2927. },
  2928. }
  2929. target := &ret
  2930. if err := gensupport.DecodeResponse(target, res); err != nil {
  2931. return nil, err
  2932. }
  2933. return ret, nil
  2934. // {
  2935. // "description": "Lists information about the supported locations for this service.",
  2936. // "flatPath": "v1beta4/apps/{appsId}/locations",
  2937. // "httpMethod": "GET",
  2938. // "id": "appengine.apps.locations.list",
  2939. // "parameterOrder": [
  2940. // "appsId"
  2941. // ],
  2942. // "parameters": {
  2943. // "appsId": {
  2944. // "description": "Part of `name`. The resource that owns the locations collection, if applicable.",
  2945. // "location": "path",
  2946. // "required": true,
  2947. // "type": "string"
  2948. // },
  2949. // "filter": {
  2950. // "description": "The standard list filter.",
  2951. // "location": "query",
  2952. // "type": "string"
  2953. // },
  2954. // "pageSize": {
  2955. // "description": "The standard list page size.",
  2956. // "format": "int32",
  2957. // "location": "query",
  2958. // "type": "integer"
  2959. // },
  2960. // "pageToken": {
  2961. // "description": "The standard list page token.",
  2962. // "location": "query",
  2963. // "type": "string"
  2964. // }
  2965. // },
  2966. // "path": "v1beta4/apps/{appsId}/locations",
  2967. // "response": {
  2968. // "$ref": "ListLocationsResponse"
  2969. // },
  2970. // "scopes": [
  2971. // "https://www.googleapis.com/auth/appengine.admin",
  2972. // "https://www.googleapis.com/auth/cloud-platform",
  2973. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2974. // ]
  2975. // }
  2976. }
  2977. // Pages invokes f for each page of results.
  2978. // A non-nil error returned from f will halt the iteration.
  2979. // The provided context supersedes any context provided to the Context method.
  2980. func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2981. c.ctx_ = ctx
  2982. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2983. for {
  2984. x, err := c.Do()
  2985. if err != nil {
  2986. return err
  2987. }
  2988. if err := f(x); err != nil {
  2989. return err
  2990. }
  2991. if x.NextPageToken == "" {
  2992. return nil
  2993. }
  2994. c.PageToken(x.NextPageToken)
  2995. }
  2996. }
  2997. // method id "appengine.apps.modules.delete":
  2998. type AppsModulesDeleteCall struct {
  2999. s *APIService
  3000. appsId string
  3001. modulesId string
  3002. urlParams_ gensupport.URLParams
  3003. ctx_ context.Context
  3004. header_ http.Header
  3005. }
  3006. // Delete: Deletes the specified module and all enclosed versions.
  3007. func (r *AppsModulesService) Delete(appsId string, modulesId string) *AppsModulesDeleteCall {
  3008. c := &AppsModulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3009. c.appsId = appsId
  3010. c.modulesId = modulesId
  3011. return c
  3012. }
  3013. // Fields allows partial responses to be retrieved. See
  3014. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3015. // for more information.
  3016. func (c *AppsModulesDeleteCall) Fields(s ...googleapi.Field) *AppsModulesDeleteCall {
  3017. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3018. return c
  3019. }
  3020. // Context sets the context to be used in this call's Do method. Any
  3021. // pending HTTP request will be aborted if the provided context is
  3022. // canceled.
  3023. func (c *AppsModulesDeleteCall) Context(ctx context.Context) *AppsModulesDeleteCall {
  3024. c.ctx_ = ctx
  3025. return c
  3026. }
  3027. // Header returns an http.Header that can be modified by the caller to
  3028. // add HTTP headers to the request.
  3029. func (c *AppsModulesDeleteCall) Header() http.Header {
  3030. if c.header_ == nil {
  3031. c.header_ = make(http.Header)
  3032. }
  3033. return c.header_
  3034. }
  3035. func (c *AppsModulesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3036. reqHeaders := make(http.Header)
  3037. for k, v := range c.header_ {
  3038. reqHeaders[k] = v
  3039. }
  3040. reqHeaders.Set("User-Agent", c.s.userAgent())
  3041. var body io.Reader = nil
  3042. c.urlParams_.Set("alt", alt)
  3043. c.urlParams_.Set("prettyPrint", "false")
  3044. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}")
  3045. urls += "?" + c.urlParams_.Encode()
  3046. req, err := http.NewRequest("DELETE", urls, body)
  3047. if err != nil {
  3048. return nil, err
  3049. }
  3050. req.Header = reqHeaders
  3051. googleapi.Expand(req.URL, map[string]string{
  3052. "appsId": c.appsId,
  3053. "modulesId": c.modulesId,
  3054. })
  3055. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3056. }
  3057. // Do executes the "appengine.apps.modules.delete" call.
  3058. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3059. // status code is an error. Response headers are in either
  3060. // *Operation.ServerResponse.Header or (if a response was returned at
  3061. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3062. // to check whether the returned error was because
  3063. // http.StatusNotModified was returned.
  3064. func (c *AppsModulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3065. gensupport.SetOptions(c.urlParams_, opts...)
  3066. res, err := c.doRequest("json")
  3067. if res != nil && res.StatusCode == http.StatusNotModified {
  3068. if res.Body != nil {
  3069. res.Body.Close()
  3070. }
  3071. return nil, &googleapi.Error{
  3072. Code: res.StatusCode,
  3073. Header: res.Header,
  3074. }
  3075. }
  3076. if err != nil {
  3077. return nil, err
  3078. }
  3079. defer googleapi.CloseBody(res)
  3080. if err := googleapi.CheckResponse(res); err != nil {
  3081. return nil, err
  3082. }
  3083. ret := &Operation{
  3084. ServerResponse: googleapi.ServerResponse{
  3085. Header: res.Header,
  3086. HTTPStatusCode: res.StatusCode,
  3087. },
  3088. }
  3089. target := &ret
  3090. if err := gensupport.DecodeResponse(target, res); err != nil {
  3091. return nil, err
  3092. }
  3093. return ret, nil
  3094. // {
  3095. // "description": "Deletes the specified module and all enclosed versions.",
  3096. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}",
  3097. // "httpMethod": "DELETE",
  3098. // "id": "appengine.apps.modules.delete",
  3099. // "parameterOrder": [
  3100. // "appsId",
  3101. // "modulesId"
  3102. // ],
  3103. // "parameters": {
  3104. // "appsId": {
  3105. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.",
  3106. // "location": "path",
  3107. // "required": true,
  3108. // "type": "string"
  3109. // },
  3110. // "modulesId": {
  3111. // "description": "Part of `name`. See documentation of `appsId`.",
  3112. // "location": "path",
  3113. // "required": true,
  3114. // "type": "string"
  3115. // }
  3116. // },
  3117. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}",
  3118. // "response": {
  3119. // "$ref": "Operation"
  3120. // },
  3121. // "scopes": [
  3122. // "https://www.googleapis.com/auth/cloud-platform"
  3123. // ]
  3124. // }
  3125. }
  3126. // method id "appengine.apps.modules.get":
  3127. type AppsModulesGetCall struct {
  3128. s *APIService
  3129. appsId string
  3130. modulesId string
  3131. urlParams_ gensupport.URLParams
  3132. ifNoneMatch_ string
  3133. ctx_ context.Context
  3134. header_ http.Header
  3135. }
  3136. // Get: Gets the current configuration of the specified module.
  3137. func (r *AppsModulesService) Get(appsId string, modulesId string) *AppsModulesGetCall {
  3138. c := &AppsModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3139. c.appsId = appsId
  3140. c.modulesId = modulesId
  3141. return c
  3142. }
  3143. // Fields allows partial responses to be retrieved. See
  3144. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3145. // for more information.
  3146. func (c *AppsModulesGetCall) Fields(s ...googleapi.Field) *AppsModulesGetCall {
  3147. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3148. return c
  3149. }
  3150. // IfNoneMatch sets the optional parameter which makes the operation
  3151. // fail if the object's ETag matches the given value. This is useful for
  3152. // getting updates only after the object has changed since the last
  3153. // request. Use googleapi.IsNotModified to check whether the response
  3154. // error from Do is the result of In-None-Match.
  3155. func (c *AppsModulesGetCall) IfNoneMatch(entityTag string) *AppsModulesGetCall {
  3156. c.ifNoneMatch_ = entityTag
  3157. return c
  3158. }
  3159. // Context sets the context to be used in this call's Do method. Any
  3160. // pending HTTP request will be aborted if the provided context is
  3161. // canceled.
  3162. func (c *AppsModulesGetCall) Context(ctx context.Context) *AppsModulesGetCall {
  3163. c.ctx_ = ctx
  3164. return c
  3165. }
  3166. // Header returns an http.Header that can be modified by the caller to
  3167. // add HTTP headers to the request.
  3168. func (c *AppsModulesGetCall) Header() http.Header {
  3169. if c.header_ == nil {
  3170. c.header_ = make(http.Header)
  3171. }
  3172. return c.header_
  3173. }
  3174. func (c *AppsModulesGetCall) doRequest(alt string) (*http.Response, error) {
  3175. reqHeaders := make(http.Header)
  3176. for k, v := range c.header_ {
  3177. reqHeaders[k] = v
  3178. }
  3179. reqHeaders.Set("User-Agent", c.s.userAgent())
  3180. if c.ifNoneMatch_ != "" {
  3181. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3182. }
  3183. var body io.Reader = nil
  3184. c.urlParams_.Set("alt", alt)
  3185. c.urlParams_.Set("prettyPrint", "false")
  3186. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}")
  3187. urls += "?" + c.urlParams_.Encode()
  3188. req, err := http.NewRequest("GET", urls, body)
  3189. if err != nil {
  3190. return nil, err
  3191. }
  3192. req.Header = reqHeaders
  3193. googleapi.Expand(req.URL, map[string]string{
  3194. "appsId": c.appsId,
  3195. "modulesId": c.modulesId,
  3196. })
  3197. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3198. }
  3199. // Do executes the "appengine.apps.modules.get" call.
  3200. // Exactly one of *Module or error will be non-nil. Any non-2xx status
  3201. // code is an error. Response headers are in either
  3202. // *Module.ServerResponse.Header or (if a response was returned at all)
  3203. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3204. // check whether the returned error was because http.StatusNotModified
  3205. // was returned.
  3206. func (c *AppsModulesGetCall) Do(opts ...googleapi.CallOption) (*Module, error) {
  3207. gensupport.SetOptions(c.urlParams_, opts...)
  3208. res, err := c.doRequest("json")
  3209. if res != nil && res.StatusCode == http.StatusNotModified {
  3210. if res.Body != nil {
  3211. res.Body.Close()
  3212. }
  3213. return nil, &googleapi.Error{
  3214. Code: res.StatusCode,
  3215. Header: res.Header,
  3216. }
  3217. }
  3218. if err != nil {
  3219. return nil, err
  3220. }
  3221. defer googleapi.CloseBody(res)
  3222. if err := googleapi.CheckResponse(res); err != nil {
  3223. return nil, err
  3224. }
  3225. ret := &Module{
  3226. ServerResponse: googleapi.ServerResponse{
  3227. Header: res.Header,
  3228. HTTPStatusCode: res.StatusCode,
  3229. },
  3230. }
  3231. target := &ret
  3232. if err := gensupport.DecodeResponse(target, res); err != nil {
  3233. return nil, err
  3234. }
  3235. return ret, nil
  3236. // {
  3237. // "description": "Gets the current configuration of the specified module.",
  3238. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}",
  3239. // "httpMethod": "GET",
  3240. // "id": "appengine.apps.modules.get",
  3241. // "parameterOrder": [
  3242. // "appsId",
  3243. // "modulesId"
  3244. // ],
  3245. // "parameters": {
  3246. // "appsId": {
  3247. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.",
  3248. // "location": "path",
  3249. // "required": true,
  3250. // "type": "string"
  3251. // },
  3252. // "modulesId": {
  3253. // "description": "Part of `name`. See documentation of `appsId`.",
  3254. // "location": "path",
  3255. // "required": true,
  3256. // "type": "string"
  3257. // }
  3258. // },
  3259. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}",
  3260. // "response": {
  3261. // "$ref": "Module"
  3262. // },
  3263. // "scopes": [
  3264. // "https://www.googleapis.com/auth/appengine.admin",
  3265. // "https://www.googleapis.com/auth/cloud-platform",
  3266. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3267. // ]
  3268. // }
  3269. }
  3270. // method id "appengine.apps.modules.list":
  3271. type AppsModulesListCall struct {
  3272. s *APIService
  3273. appsId string
  3274. urlParams_ gensupport.URLParams
  3275. ifNoneMatch_ string
  3276. ctx_ context.Context
  3277. header_ http.Header
  3278. }
  3279. // List: Lists all the modules in the application.
  3280. func (r *AppsModulesService) List(appsId string) *AppsModulesListCall {
  3281. c := &AppsModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3282. c.appsId = appsId
  3283. return c
  3284. }
  3285. // PageSize sets the optional parameter "pageSize": Maximum results to
  3286. // return per page.
  3287. func (c *AppsModulesListCall) PageSize(pageSize int64) *AppsModulesListCall {
  3288. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3289. return c
  3290. }
  3291. // PageToken sets the optional parameter "pageToken": Continuation token
  3292. // for fetching the next page of results.
  3293. func (c *AppsModulesListCall) PageToken(pageToken string) *AppsModulesListCall {
  3294. c.urlParams_.Set("pageToken", pageToken)
  3295. return c
  3296. }
  3297. // Fields allows partial responses to be retrieved. See
  3298. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3299. // for more information.
  3300. func (c *AppsModulesListCall) Fields(s ...googleapi.Field) *AppsModulesListCall {
  3301. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3302. return c
  3303. }
  3304. // IfNoneMatch sets the optional parameter which makes the operation
  3305. // fail if the object's ETag matches the given value. This is useful for
  3306. // getting updates only after the object has changed since the last
  3307. // request. Use googleapi.IsNotModified to check whether the response
  3308. // error from Do is the result of In-None-Match.
  3309. func (c *AppsModulesListCall) IfNoneMatch(entityTag string) *AppsModulesListCall {
  3310. c.ifNoneMatch_ = entityTag
  3311. return c
  3312. }
  3313. // Context sets the context to be used in this call's Do method. Any
  3314. // pending HTTP request will be aborted if the provided context is
  3315. // canceled.
  3316. func (c *AppsModulesListCall) Context(ctx context.Context) *AppsModulesListCall {
  3317. c.ctx_ = ctx
  3318. return c
  3319. }
  3320. // Header returns an http.Header that can be modified by the caller to
  3321. // add HTTP headers to the request.
  3322. func (c *AppsModulesListCall) Header() http.Header {
  3323. if c.header_ == nil {
  3324. c.header_ = make(http.Header)
  3325. }
  3326. return c.header_
  3327. }
  3328. func (c *AppsModulesListCall) doRequest(alt string) (*http.Response, error) {
  3329. reqHeaders := make(http.Header)
  3330. for k, v := range c.header_ {
  3331. reqHeaders[k] = v
  3332. }
  3333. reqHeaders.Set("User-Agent", c.s.userAgent())
  3334. if c.ifNoneMatch_ != "" {
  3335. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3336. }
  3337. var body io.Reader = nil
  3338. c.urlParams_.Set("alt", alt)
  3339. c.urlParams_.Set("prettyPrint", "false")
  3340. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules")
  3341. urls += "?" + c.urlParams_.Encode()
  3342. req, err := http.NewRequest("GET", urls, body)
  3343. if err != nil {
  3344. return nil, err
  3345. }
  3346. req.Header = reqHeaders
  3347. googleapi.Expand(req.URL, map[string]string{
  3348. "appsId": c.appsId,
  3349. })
  3350. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3351. }
  3352. // Do executes the "appengine.apps.modules.list" call.
  3353. // Exactly one of *ListModulesResponse or error will be non-nil. Any
  3354. // non-2xx status code is an error. Response headers are in either
  3355. // *ListModulesResponse.ServerResponse.Header or (if a response was
  3356. // returned at all) in error.(*googleapi.Error).Header. Use
  3357. // googleapi.IsNotModified to check whether the returned error was
  3358. // because http.StatusNotModified was returned.
  3359. func (c *AppsModulesListCall) Do(opts ...googleapi.CallOption) (*ListModulesResponse, error) {
  3360. gensupport.SetOptions(c.urlParams_, opts...)
  3361. res, err := c.doRequest("json")
  3362. if res != nil && res.StatusCode == http.StatusNotModified {
  3363. if res.Body != nil {
  3364. res.Body.Close()
  3365. }
  3366. return nil, &googleapi.Error{
  3367. Code: res.StatusCode,
  3368. Header: res.Header,
  3369. }
  3370. }
  3371. if err != nil {
  3372. return nil, err
  3373. }
  3374. defer googleapi.CloseBody(res)
  3375. if err := googleapi.CheckResponse(res); err != nil {
  3376. return nil, err
  3377. }
  3378. ret := &ListModulesResponse{
  3379. ServerResponse: googleapi.ServerResponse{
  3380. Header: res.Header,
  3381. HTTPStatusCode: res.StatusCode,
  3382. },
  3383. }
  3384. target := &ret
  3385. if err := gensupport.DecodeResponse(target, res); err != nil {
  3386. return nil, err
  3387. }
  3388. return ret, nil
  3389. // {
  3390. // "description": "Lists all the modules in the application.",
  3391. // "flatPath": "v1beta4/apps/{appsId}/modules",
  3392. // "httpMethod": "GET",
  3393. // "id": "appengine.apps.modules.list",
  3394. // "parameterOrder": [
  3395. // "appsId"
  3396. // ],
  3397. // "parameters": {
  3398. // "appsId": {
  3399. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.",
  3400. // "location": "path",
  3401. // "required": true,
  3402. // "type": "string"
  3403. // },
  3404. // "pageSize": {
  3405. // "description": "Maximum results to return per page.",
  3406. // "format": "int32",
  3407. // "location": "query",
  3408. // "type": "integer"
  3409. // },
  3410. // "pageToken": {
  3411. // "description": "Continuation token for fetching the next page of results.",
  3412. // "location": "query",
  3413. // "type": "string"
  3414. // }
  3415. // },
  3416. // "path": "v1beta4/apps/{appsId}/modules",
  3417. // "response": {
  3418. // "$ref": "ListModulesResponse"
  3419. // },
  3420. // "scopes": [
  3421. // "https://www.googleapis.com/auth/appengine.admin",
  3422. // "https://www.googleapis.com/auth/cloud-platform",
  3423. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3424. // ]
  3425. // }
  3426. }
  3427. // Pages invokes f for each page of results.
  3428. // A non-nil error returned from f will halt the iteration.
  3429. // The provided context supersedes any context provided to the Context method.
  3430. func (c *AppsModulesListCall) Pages(ctx context.Context, f func(*ListModulesResponse) error) error {
  3431. c.ctx_ = ctx
  3432. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3433. for {
  3434. x, err := c.Do()
  3435. if err != nil {
  3436. return err
  3437. }
  3438. if err := f(x); err != nil {
  3439. return err
  3440. }
  3441. if x.NextPageToken == "" {
  3442. return nil
  3443. }
  3444. c.PageToken(x.NextPageToken)
  3445. }
  3446. }
  3447. // method id "appengine.apps.modules.patch":
  3448. type AppsModulesPatchCall struct {
  3449. s *APIService
  3450. appsId string
  3451. modulesId string
  3452. module *Module
  3453. urlParams_ gensupport.URLParams
  3454. ctx_ context.Context
  3455. header_ http.Header
  3456. }
  3457. // Patch: Updates the configuration of the specified module.
  3458. func (r *AppsModulesService) Patch(appsId string, modulesId string, module *Module) *AppsModulesPatchCall {
  3459. c := &AppsModulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3460. c.appsId = appsId
  3461. c.modulesId = modulesId
  3462. c.module = module
  3463. return c
  3464. }
  3465. // Mask sets the optional parameter "mask": Standard field mask for the
  3466. // set of fields to be updated.
  3467. func (c *AppsModulesPatchCall) Mask(mask string) *AppsModulesPatchCall {
  3468. c.urlParams_.Set("mask", mask)
  3469. return c
  3470. }
  3471. // MigrateTraffic sets the optional parameter "migrateTraffic": Set to
  3472. // true to gradually shift traffic to one or more versions that you
  3473. // specify. By default, traffic is shifted immediately. For gradual
  3474. // traffic migration, the target versions must be located within
  3475. // instances that are configured for both warmup requests
  3476. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  3477. // ta4/apps.modules.versions#inboundservicetype) and automatic scaling
  3478. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  3479. // ta4/apps.modules.versions#automaticscaling). You must specify the
  3480. // shardBy
  3481. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  3482. // ta4/apps.modules#shardby) field in the Module resource. Gradual
  3483. // traffic migration is not supported in the App Engine flexible
  3484. // environment. For examples, see Migrating and Splitting Traffic
  3485. // (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting
  3486. // -traffic).
  3487. func (c *AppsModulesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsModulesPatchCall {
  3488. c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic))
  3489. return c
  3490. }
  3491. // Fields allows partial responses to be retrieved. See
  3492. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3493. // for more information.
  3494. func (c *AppsModulesPatchCall) Fields(s ...googleapi.Field) *AppsModulesPatchCall {
  3495. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3496. return c
  3497. }
  3498. // Context sets the context to be used in this call's Do method. Any
  3499. // pending HTTP request will be aborted if the provided context is
  3500. // canceled.
  3501. func (c *AppsModulesPatchCall) Context(ctx context.Context) *AppsModulesPatchCall {
  3502. c.ctx_ = ctx
  3503. return c
  3504. }
  3505. // Header returns an http.Header that can be modified by the caller to
  3506. // add HTTP headers to the request.
  3507. func (c *AppsModulesPatchCall) Header() http.Header {
  3508. if c.header_ == nil {
  3509. c.header_ = make(http.Header)
  3510. }
  3511. return c.header_
  3512. }
  3513. func (c *AppsModulesPatchCall) doRequest(alt string) (*http.Response, error) {
  3514. reqHeaders := make(http.Header)
  3515. for k, v := range c.header_ {
  3516. reqHeaders[k] = v
  3517. }
  3518. reqHeaders.Set("User-Agent", c.s.userAgent())
  3519. var body io.Reader = nil
  3520. body, err := googleapi.WithoutDataWrapper.JSONReader(c.module)
  3521. if err != nil {
  3522. return nil, err
  3523. }
  3524. reqHeaders.Set("Content-Type", "application/json")
  3525. c.urlParams_.Set("alt", alt)
  3526. c.urlParams_.Set("prettyPrint", "false")
  3527. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}")
  3528. urls += "?" + c.urlParams_.Encode()
  3529. req, err := http.NewRequest("PATCH", urls, body)
  3530. if err != nil {
  3531. return nil, err
  3532. }
  3533. req.Header = reqHeaders
  3534. googleapi.Expand(req.URL, map[string]string{
  3535. "appsId": c.appsId,
  3536. "modulesId": c.modulesId,
  3537. })
  3538. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3539. }
  3540. // Do executes the "appengine.apps.modules.patch" call.
  3541. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3542. // status code is an error. Response headers are in either
  3543. // *Operation.ServerResponse.Header or (if a response was returned at
  3544. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3545. // to check whether the returned error was because
  3546. // http.StatusNotModified was returned.
  3547. func (c *AppsModulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3548. gensupport.SetOptions(c.urlParams_, opts...)
  3549. res, err := c.doRequest("json")
  3550. if res != nil && res.StatusCode == http.StatusNotModified {
  3551. if res.Body != nil {
  3552. res.Body.Close()
  3553. }
  3554. return nil, &googleapi.Error{
  3555. Code: res.StatusCode,
  3556. Header: res.Header,
  3557. }
  3558. }
  3559. if err != nil {
  3560. return nil, err
  3561. }
  3562. defer googleapi.CloseBody(res)
  3563. if err := googleapi.CheckResponse(res); err != nil {
  3564. return nil, err
  3565. }
  3566. ret := &Operation{
  3567. ServerResponse: googleapi.ServerResponse{
  3568. Header: res.Header,
  3569. HTTPStatusCode: res.StatusCode,
  3570. },
  3571. }
  3572. target := &ret
  3573. if err := gensupport.DecodeResponse(target, res); err != nil {
  3574. return nil, err
  3575. }
  3576. return ret, nil
  3577. // {
  3578. // "description": "Updates the configuration of the specified module.",
  3579. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}",
  3580. // "httpMethod": "PATCH",
  3581. // "id": "appengine.apps.modules.patch",
  3582. // "parameterOrder": [
  3583. // "appsId",
  3584. // "modulesId"
  3585. // ],
  3586. // "parameters": {
  3587. // "appsId": {
  3588. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.",
  3589. // "location": "path",
  3590. // "required": true,
  3591. // "type": "string"
  3592. // },
  3593. // "mask": {
  3594. // "description": "Standard field mask for the set of fields to be updated.",
  3595. // "format": "google-fieldmask",
  3596. // "location": "query",
  3597. // "type": "string"
  3598. // },
  3599. // "migrateTraffic": {
  3600. // "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/v1beta4/apps.modules.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules#shardby) field in the Module 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).",
  3601. // "location": "query",
  3602. // "type": "boolean"
  3603. // },
  3604. // "modulesId": {
  3605. // "description": "Part of `name`. See documentation of `appsId`.",
  3606. // "location": "path",
  3607. // "required": true,
  3608. // "type": "string"
  3609. // }
  3610. // },
  3611. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}",
  3612. // "request": {
  3613. // "$ref": "Module"
  3614. // },
  3615. // "response": {
  3616. // "$ref": "Operation"
  3617. // },
  3618. // "scopes": [
  3619. // "https://www.googleapis.com/auth/cloud-platform"
  3620. // ]
  3621. // }
  3622. }
  3623. // method id "appengine.apps.modules.versions.create":
  3624. type AppsModulesVersionsCreateCall struct {
  3625. s *APIService
  3626. appsId string
  3627. modulesId string
  3628. version *Version
  3629. urlParams_ gensupport.URLParams
  3630. ctx_ context.Context
  3631. header_ http.Header
  3632. }
  3633. // Create: Deploys code and resource files to a new version.
  3634. func (r *AppsModulesVersionsService) Create(appsId string, modulesId string, version *Version) *AppsModulesVersionsCreateCall {
  3635. c := &AppsModulesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3636. c.appsId = appsId
  3637. c.modulesId = modulesId
  3638. c.version = version
  3639. return c
  3640. }
  3641. // Fields allows partial responses to be retrieved. See
  3642. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3643. // for more information.
  3644. func (c *AppsModulesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsModulesVersionsCreateCall {
  3645. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3646. return c
  3647. }
  3648. // Context sets the context to be used in this call's Do method. Any
  3649. // pending HTTP request will be aborted if the provided context is
  3650. // canceled.
  3651. func (c *AppsModulesVersionsCreateCall) Context(ctx context.Context) *AppsModulesVersionsCreateCall {
  3652. c.ctx_ = ctx
  3653. return c
  3654. }
  3655. // Header returns an http.Header that can be modified by the caller to
  3656. // add HTTP headers to the request.
  3657. func (c *AppsModulesVersionsCreateCall) Header() http.Header {
  3658. if c.header_ == nil {
  3659. c.header_ = make(http.Header)
  3660. }
  3661. return c.header_
  3662. }
  3663. func (c *AppsModulesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  3664. reqHeaders := make(http.Header)
  3665. for k, v := range c.header_ {
  3666. reqHeaders[k] = v
  3667. }
  3668. reqHeaders.Set("User-Agent", c.s.userAgent())
  3669. var body io.Reader = nil
  3670. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  3671. if err != nil {
  3672. return nil, err
  3673. }
  3674. reqHeaders.Set("Content-Type", "application/json")
  3675. c.urlParams_.Set("alt", alt)
  3676. c.urlParams_.Set("prettyPrint", "false")
  3677. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions")
  3678. urls += "?" + c.urlParams_.Encode()
  3679. req, err := http.NewRequest("POST", urls, body)
  3680. if err != nil {
  3681. return nil, err
  3682. }
  3683. req.Header = reqHeaders
  3684. googleapi.Expand(req.URL, map[string]string{
  3685. "appsId": c.appsId,
  3686. "modulesId": c.modulesId,
  3687. })
  3688. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3689. }
  3690. // Do executes the "appengine.apps.modules.versions.create" call.
  3691. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3692. // status code is an error. Response headers are in either
  3693. // *Operation.ServerResponse.Header or (if a response was returned at
  3694. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3695. // to check whether the returned error was because
  3696. // http.StatusNotModified was returned.
  3697. func (c *AppsModulesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3698. gensupport.SetOptions(c.urlParams_, opts...)
  3699. res, err := c.doRequest("json")
  3700. if res != nil && res.StatusCode == http.StatusNotModified {
  3701. if res.Body != nil {
  3702. res.Body.Close()
  3703. }
  3704. return nil, &googleapi.Error{
  3705. Code: res.StatusCode,
  3706. Header: res.Header,
  3707. }
  3708. }
  3709. if err != nil {
  3710. return nil, err
  3711. }
  3712. defer googleapi.CloseBody(res)
  3713. if err := googleapi.CheckResponse(res); err != nil {
  3714. return nil, err
  3715. }
  3716. ret := &Operation{
  3717. ServerResponse: googleapi.ServerResponse{
  3718. Header: res.Header,
  3719. HTTPStatusCode: res.StatusCode,
  3720. },
  3721. }
  3722. target := &ret
  3723. if err := gensupport.DecodeResponse(target, res); err != nil {
  3724. return nil, err
  3725. }
  3726. return ret, nil
  3727. // {
  3728. // "description": "Deploys code and resource files to a new version.",
  3729. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions",
  3730. // "httpMethod": "POST",
  3731. // "id": "appengine.apps.modules.versions.create",
  3732. // "parameterOrder": [
  3733. // "appsId",
  3734. // "modulesId"
  3735. // ],
  3736. // "parameters": {
  3737. // "appsId": {
  3738. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.",
  3739. // "location": "path",
  3740. // "required": true,
  3741. // "type": "string"
  3742. // },
  3743. // "modulesId": {
  3744. // "description": "Part of `name`. See documentation of `appsId`.",
  3745. // "location": "path",
  3746. // "required": true,
  3747. // "type": "string"
  3748. // }
  3749. // },
  3750. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions",
  3751. // "request": {
  3752. // "$ref": "Version"
  3753. // },
  3754. // "response": {
  3755. // "$ref": "Operation"
  3756. // },
  3757. // "scopes": [
  3758. // "https://www.googleapis.com/auth/cloud-platform"
  3759. // ]
  3760. // }
  3761. }
  3762. // method id "appengine.apps.modules.versions.delete":
  3763. type AppsModulesVersionsDeleteCall struct {
  3764. s *APIService
  3765. appsId string
  3766. modulesId string
  3767. versionsId string
  3768. urlParams_ gensupport.URLParams
  3769. ctx_ context.Context
  3770. header_ http.Header
  3771. }
  3772. // Delete: Deletes an existing version.
  3773. func (r *AppsModulesVersionsService) Delete(appsId string, modulesId string, versionsId string) *AppsModulesVersionsDeleteCall {
  3774. c := &AppsModulesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3775. c.appsId = appsId
  3776. c.modulesId = modulesId
  3777. c.versionsId = versionsId
  3778. return c
  3779. }
  3780. // Fields allows partial responses to be retrieved. See
  3781. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3782. // for more information.
  3783. func (c *AppsModulesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsModulesVersionsDeleteCall {
  3784. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3785. return c
  3786. }
  3787. // Context sets the context to be used in this call's Do method. Any
  3788. // pending HTTP request will be aborted if the provided context is
  3789. // canceled.
  3790. func (c *AppsModulesVersionsDeleteCall) Context(ctx context.Context) *AppsModulesVersionsDeleteCall {
  3791. c.ctx_ = ctx
  3792. return c
  3793. }
  3794. // Header returns an http.Header that can be modified by the caller to
  3795. // add HTTP headers to the request.
  3796. func (c *AppsModulesVersionsDeleteCall) Header() http.Header {
  3797. if c.header_ == nil {
  3798. c.header_ = make(http.Header)
  3799. }
  3800. return c.header_
  3801. }
  3802. func (c *AppsModulesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3803. reqHeaders := make(http.Header)
  3804. for k, v := range c.header_ {
  3805. reqHeaders[k] = v
  3806. }
  3807. reqHeaders.Set("User-Agent", c.s.userAgent())
  3808. var body io.Reader = nil
  3809. c.urlParams_.Set("alt", alt)
  3810. c.urlParams_.Set("prettyPrint", "false")
  3811. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}")
  3812. urls += "?" + c.urlParams_.Encode()
  3813. req, err := http.NewRequest("DELETE", urls, body)
  3814. if err != nil {
  3815. return nil, err
  3816. }
  3817. req.Header = reqHeaders
  3818. googleapi.Expand(req.URL, map[string]string{
  3819. "appsId": c.appsId,
  3820. "modulesId": c.modulesId,
  3821. "versionsId": c.versionsId,
  3822. })
  3823. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3824. }
  3825. // Do executes the "appengine.apps.modules.versions.delete" call.
  3826. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3827. // status code is an error. Response headers are in either
  3828. // *Operation.ServerResponse.Header or (if a response was returned at
  3829. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3830. // to check whether the returned error was because
  3831. // http.StatusNotModified was returned.
  3832. func (c *AppsModulesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3833. gensupport.SetOptions(c.urlParams_, opts...)
  3834. res, err := c.doRequest("json")
  3835. if res != nil && res.StatusCode == http.StatusNotModified {
  3836. if res.Body != nil {
  3837. res.Body.Close()
  3838. }
  3839. return nil, &googleapi.Error{
  3840. Code: res.StatusCode,
  3841. Header: res.Header,
  3842. }
  3843. }
  3844. if err != nil {
  3845. return nil, err
  3846. }
  3847. defer googleapi.CloseBody(res)
  3848. if err := googleapi.CheckResponse(res); err != nil {
  3849. return nil, err
  3850. }
  3851. ret := &Operation{
  3852. ServerResponse: googleapi.ServerResponse{
  3853. Header: res.Header,
  3854. HTTPStatusCode: res.StatusCode,
  3855. },
  3856. }
  3857. target := &ret
  3858. if err := gensupport.DecodeResponse(target, res); err != nil {
  3859. return nil, err
  3860. }
  3861. return ret, nil
  3862. // {
  3863. // "description": "Deletes an existing version.",
  3864. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}",
  3865. // "httpMethod": "DELETE",
  3866. // "id": "appengine.apps.modules.versions.delete",
  3867. // "parameterOrder": [
  3868. // "appsId",
  3869. // "modulesId",
  3870. // "versionsId"
  3871. // ],
  3872. // "parameters": {
  3873. // "appsId": {
  3874. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.",
  3875. // "location": "path",
  3876. // "required": true,
  3877. // "type": "string"
  3878. // },
  3879. // "modulesId": {
  3880. // "description": "Part of `name`. See documentation of `appsId`.",
  3881. // "location": "path",
  3882. // "required": true,
  3883. // "type": "string"
  3884. // },
  3885. // "versionsId": {
  3886. // "description": "Part of `name`. See documentation of `appsId`.",
  3887. // "location": "path",
  3888. // "required": true,
  3889. // "type": "string"
  3890. // }
  3891. // },
  3892. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}",
  3893. // "response": {
  3894. // "$ref": "Operation"
  3895. // },
  3896. // "scopes": [
  3897. // "https://www.googleapis.com/auth/cloud-platform"
  3898. // ]
  3899. // }
  3900. }
  3901. // method id "appengine.apps.modules.versions.get":
  3902. type AppsModulesVersionsGetCall struct {
  3903. s *APIService
  3904. appsId string
  3905. modulesId string
  3906. versionsId string
  3907. urlParams_ gensupport.URLParams
  3908. ifNoneMatch_ string
  3909. ctx_ context.Context
  3910. header_ http.Header
  3911. }
  3912. // Get: Gets the specified Version resource. By default, only a
  3913. // BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get
  3914. // the full resource.
  3915. func (r *AppsModulesVersionsService) Get(appsId string, modulesId string, versionsId string) *AppsModulesVersionsGetCall {
  3916. c := &AppsModulesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3917. c.appsId = appsId
  3918. c.modulesId = modulesId
  3919. c.versionsId = versionsId
  3920. return c
  3921. }
  3922. // View sets the optional parameter "view": Controls the set of fields
  3923. // returned in the Get response.
  3924. //
  3925. // Possible values:
  3926. // "BASIC"
  3927. // "FULL"
  3928. func (c *AppsModulesVersionsGetCall) View(view string) *AppsModulesVersionsGetCall {
  3929. c.urlParams_.Set("view", view)
  3930. return c
  3931. }
  3932. // Fields allows partial responses to be retrieved. See
  3933. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3934. // for more information.
  3935. func (c *AppsModulesVersionsGetCall) Fields(s ...googleapi.Field) *AppsModulesVersionsGetCall {
  3936. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3937. return c
  3938. }
  3939. // IfNoneMatch sets the optional parameter which makes the operation
  3940. // fail if the object's ETag matches the given value. This is useful for
  3941. // getting updates only after the object has changed since the last
  3942. // request. Use googleapi.IsNotModified to check whether the response
  3943. // error from Do is the result of In-None-Match.
  3944. func (c *AppsModulesVersionsGetCall) IfNoneMatch(entityTag string) *AppsModulesVersionsGetCall {
  3945. c.ifNoneMatch_ = entityTag
  3946. return c
  3947. }
  3948. // Context sets the context to be used in this call's Do method. Any
  3949. // pending HTTP request will be aborted if the provided context is
  3950. // canceled.
  3951. func (c *AppsModulesVersionsGetCall) Context(ctx context.Context) *AppsModulesVersionsGetCall {
  3952. c.ctx_ = ctx
  3953. return c
  3954. }
  3955. // Header returns an http.Header that can be modified by the caller to
  3956. // add HTTP headers to the request.
  3957. func (c *AppsModulesVersionsGetCall) Header() http.Header {
  3958. if c.header_ == nil {
  3959. c.header_ = make(http.Header)
  3960. }
  3961. return c.header_
  3962. }
  3963. func (c *AppsModulesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  3964. reqHeaders := make(http.Header)
  3965. for k, v := range c.header_ {
  3966. reqHeaders[k] = v
  3967. }
  3968. reqHeaders.Set("User-Agent", c.s.userAgent())
  3969. if c.ifNoneMatch_ != "" {
  3970. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3971. }
  3972. var body io.Reader = nil
  3973. c.urlParams_.Set("alt", alt)
  3974. c.urlParams_.Set("prettyPrint", "false")
  3975. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}")
  3976. urls += "?" + c.urlParams_.Encode()
  3977. req, err := http.NewRequest("GET", urls, body)
  3978. if err != nil {
  3979. return nil, err
  3980. }
  3981. req.Header = reqHeaders
  3982. googleapi.Expand(req.URL, map[string]string{
  3983. "appsId": c.appsId,
  3984. "modulesId": c.modulesId,
  3985. "versionsId": c.versionsId,
  3986. })
  3987. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3988. }
  3989. // Do executes the "appengine.apps.modules.versions.get" call.
  3990. // Exactly one of *Version or error will be non-nil. Any non-2xx status
  3991. // code is an error. Response headers are in either
  3992. // *Version.ServerResponse.Header or (if a response was returned at all)
  3993. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3994. // check whether the returned error was because http.StatusNotModified
  3995. // was returned.
  3996. func (c *AppsModulesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  3997. gensupport.SetOptions(c.urlParams_, opts...)
  3998. res, err := c.doRequest("json")
  3999. if res != nil && res.StatusCode == http.StatusNotModified {
  4000. if res.Body != nil {
  4001. res.Body.Close()
  4002. }
  4003. return nil, &googleapi.Error{
  4004. Code: res.StatusCode,
  4005. Header: res.Header,
  4006. }
  4007. }
  4008. if err != nil {
  4009. return nil, err
  4010. }
  4011. defer googleapi.CloseBody(res)
  4012. if err := googleapi.CheckResponse(res); err != nil {
  4013. return nil, err
  4014. }
  4015. ret := &Version{
  4016. ServerResponse: googleapi.ServerResponse{
  4017. Header: res.Header,
  4018. HTTPStatusCode: res.StatusCode,
  4019. },
  4020. }
  4021. target := &ret
  4022. if err := gensupport.DecodeResponse(target, res); err != nil {
  4023. return nil, err
  4024. }
  4025. return ret, nil
  4026. // {
  4027. // "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.",
  4028. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}",
  4029. // "httpMethod": "GET",
  4030. // "id": "appengine.apps.modules.versions.get",
  4031. // "parameterOrder": [
  4032. // "appsId",
  4033. // "modulesId",
  4034. // "versionsId"
  4035. // ],
  4036. // "parameters": {
  4037. // "appsId": {
  4038. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.",
  4039. // "location": "path",
  4040. // "required": true,
  4041. // "type": "string"
  4042. // },
  4043. // "modulesId": {
  4044. // "description": "Part of `name`. See documentation of `appsId`.",
  4045. // "location": "path",
  4046. // "required": true,
  4047. // "type": "string"
  4048. // },
  4049. // "versionsId": {
  4050. // "description": "Part of `name`. See documentation of `appsId`.",
  4051. // "location": "path",
  4052. // "required": true,
  4053. // "type": "string"
  4054. // },
  4055. // "view": {
  4056. // "description": "Controls the set of fields returned in the Get response.",
  4057. // "enum": [
  4058. // "BASIC",
  4059. // "FULL"
  4060. // ],
  4061. // "location": "query",
  4062. // "type": "string"
  4063. // }
  4064. // },
  4065. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}",
  4066. // "response": {
  4067. // "$ref": "Version"
  4068. // },
  4069. // "scopes": [
  4070. // "https://www.googleapis.com/auth/appengine.admin",
  4071. // "https://www.googleapis.com/auth/cloud-platform",
  4072. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4073. // ]
  4074. // }
  4075. }
  4076. // method id "appengine.apps.modules.versions.list":
  4077. type AppsModulesVersionsListCall struct {
  4078. s *APIService
  4079. appsId string
  4080. modulesId string
  4081. urlParams_ gensupport.URLParams
  4082. ifNoneMatch_ string
  4083. ctx_ context.Context
  4084. header_ http.Header
  4085. }
  4086. // List: Lists the versions of a module.
  4087. func (r *AppsModulesVersionsService) List(appsId string, modulesId string) *AppsModulesVersionsListCall {
  4088. c := &AppsModulesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4089. c.appsId = appsId
  4090. c.modulesId = modulesId
  4091. return c
  4092. }
  4093. // PageSize sets the optional parameter "pageSize": Maximum results to
  4094. // return per page.
  4095. func (c *AppsModulesVersionsListCall) PageSize(pageSize int64) *AppsModulesVersionsListCall {
  4096. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4097. return c
  4098. }
  4099. // PageToken sets the optional parameter "pageToken": Continuation token
  4100. // for fetching the next page of results.
  4101. func (c *AppsModulesVersionsListCall) PageToken(pageToken string) *AppsModulesVersionsListCall {
  4102. c.urlParams_.Set("pageToken", pageToken)
  4103. return c
  4104. }
  4105. // View sets the optional parameter "view": Controls the set of fields
  4106. // returned in the List response.
  4107. //
  4108. // Possible values:
  4109. // "BASIC"
  4110. // "FULL"
  4111. func (c *AppsModulesVersionsListCall) View(view string) *AppsModulesVersionsListCall {
  4112. c.urlParams_.Set("view", view)
  4113. return c
  4114. }
  4115. // Fields allows partial responses to be retrieved. See
  4116. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4117. // for more information.
  4118. func (c *AppsModulesVersionsListCall) Fields(s ...googleapi.Field) *AppsModulesVersionsListCall {
  4119. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4120. return c
  4121. }
  4122. // IfNoneMatch sets the optional parameter which makes the operation
  4123. // fail if the object's ETag matches the given value. This is useful for
  4124. // getting updates only after the object has changed since the last
  4125. // request. Use googleapi.IsNotModified to check whether the response
  4126. // error from Do is the result of In-None-Match.
  4127. func (c *AppsModulesVersionsListCall) IfNoneMatch(entityTag string) *AppsModulesVersionsListCall {
  4128. c.ifNoneMatch_ = entityTag
  4129. return c
  4130. }
  4131. // Context sets the context to be used in this call's Do method. Any
  4132. // pending HTTP request will be aborted if the provided context is
  4133. // canceled.
  4134. func (c *AppsModulesVersionsListCall) Context(ctx context.Context) *AppsModulesVersionsListCall {
  4135. c.ctx_ = ctx
  4136. return c
  4137. }
  4138. // Header returns an http.Header that can be modified by the caller to
  4139. // add HTTP headers to the request.
  4140. func (c *AppsModulesVersionsListCall) Header() http.Header {
  4141. if c.header_ == nil {
  4142. c.header_ = make(http.Header)
  4143. }
  4144. return c.header_
  4145. }
  4146. func (c *AppsModulesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  4147. reqHeaders := make(http.Header)
  4148. for k, v := range c.header_ {
  4149. reqHeaders[k] = v
  4150. }
  4151. reqHeaders.Set("User-Agent", c.s.userAgent())
  4152. if c.ifNoneMatch_ != "" {
  4153. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4154. }
  4155. var body io.Reader = nil
  4156. c.urlParams_.Set("alt", alt)
  4157. c.urlParams_.Set("prettyPrint", "false")
  4158. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions")
  4159. urls += "?" + c.urlParams_.Encode()
  4160. req, err := http.NewRequest("GET", urls, body)
  4161. if err != nil {
  4162. return nil, err
  4163. }
  4164. req.Header = reqHeaders
  4165. googleapi.Expand(req.URL, map[string]string{
  4166. "appsId": c.appsId,
  4167. "modulesId": c.modulesId,
  4168. })
  4169. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4170. }
  4171. // Do executes the "appengine.apps.modules.versions.list" call.
  4172. // Exactly one of *ListVersionsResponse or error will be non-nil. Any
  4173. // non-2xx status code is an error. Response headers are in either
  4174. // *ListVersionsResponse.ServerResponse.Header or (if a response was
  4175. // returned at all) in error.(*googleapi.Error).Header. Use
  4176. // googleapi.IsNotModified to check whether the returned error was
  4177. // because http.StatusNotModified was returned.
  4178. func (c *AppsModulesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  4179. gensupport.SetOptions(c.urlParams_, opts...)
  4180. res, err := c.doRequest("json")
  4181. if res != nil && res.StatusCode == http.StatusNotModified {
  4182. if res.Body != nil {
  4183. res.Body.Close()
  4184. }
  4185. return nil, &googleapi.Error{
  4186. Code: res.StatusCode,
  4187. Header: res.Header,
  4188. }
  4189. }
  4190. if err != nil {
  4191. return nil, err
  4192. }
  4193. defer googleapi.CloseBody(res)
  4194. if err := googleapi.CheckResponse(res); err != nil {
  4195. return nil, err
  4196. }
  4197. ret := &ListVersionsResponse{
  4198. ServerResponse: googleapi.ServerResponse{
  4199. Header: res.Header,
  4200. HTTPStatusCode: res.StatusCode,
  4201. },
  4202. }
  4203. target := &ret
  4204. if err := gensupport.DecodeResponse(target, res); err != nil {
  4205. return nil, err
  4206. }
  4207. return ret, nil
  4208. // {
  4209. // "description": "Lists the versions of a module.",
  4210. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions",
  4211. // "httpMethod": "GET",
  4212. // "id": "appengine.apps.modules.versions.list",
  4213. // "parameterOrder": [
  4214. // "appsId",
  4215. // "modulesId"
  4216. // ],
  4217. // "parameters": {
  4218. // "appsId": {
  4219. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.",
  4220. // "location": "path",
  4221. // "required": true,
  4222. // "type": "string"
  4223. // },
  4224. // "modulesId": {
  4225. // "description": "Part of `name`. See documentation of `appsId`.",
  4226. // "location": "path",
  4227. // "required": true,
  4228. // "type": "string"
  4229. // },
  4230. // "pageSize": {
  4231. // "description": "Maximum results to return per page.",
  4232. // "format": "int32",
  4233. // "location": "query",
  4234. // "type": "integer"
  4235. // },
  4236. // "pageToken": {
  4237. // "description": "Continuation token for fetching the next page of results.",
  4238. // "location": "query",
  4239. // "type": "string"
  4240. // },
  4241. // "view": {
  4242. // "description": "Controls the set of fields returned in the List response.",
  4243. // "enum": [
  4244. // "BASIC",
  4245. // "FULL"
  4246. // ],
  4247. // "location": "query",
  4248. // "type": "string"
  4249. // }
  4250. // },
  4251. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions",
  4252. // "response": {
  4253. // "$ref": "ListVersionsResponse"
  4254. // },
  4255. // "scopes": [
  4256. // "https://www.googleapis.com/auth/appengine.admin",
  4257. // "https://www.googleapis.com/auth/cloud-platform",
  4258. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4259. // ]
  4260. // }
  4261. }
  4262. // Pages invokes f for each page of results.
  4263. // A non-nil error returned from f will halt the iteration.
  4264. // The provided context supersedes any context provided to the Context method.
  4265. func (c *AppsModulesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  4266. c.ctx_ = ctx
  4267. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4268. for {
  4269. x, err := c.Do()
  4270. if err != nil {
  4271. return err
  4272. }
  4273. if err := f(x); err != nil {
  4274. return err
  4275. }
  4276. if x.NextPageToken == "" {
  4277. return nil
  4278. }
  4279. c.PageToken(x.NextPageToken)
  4280. }
  4281. }
  4282. // method id "appengine.apps.modules.versions.patch":
  4283. type AppsModulesVersionsPatchCall struct {
  4284. s *APIService
  4285. appsId string
  4286. modulesId string
  4287. versionsId string
  4288. version *Version
  4289. urlParams_ gensupport.URLParams
  4290. ctx_ context.Context
  4291. header_ http.Header
  4292. }
  4293. // Patch: Updates the specified Version resource. You can specify the
  4294. // following fields depending on the App Engine environment and type of
  4295. // scaling that the version resource uses:
  4296. // serving_status
  4297. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  4298. // ta4/apps.modules.versions#Version.FIELDS.serving_status): For
  4299. // Version resources that use basic scaling, manual scaling, or run in
  4300. // the App Engine flexible environment.
  4301. // instance_class
  4302. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  4303. // ta4/apps.modules.versions#Version.FIELDS.instance_class): For
  4304. // Version resources that run in the App Engine standard
  4305. // environment.
  4306. // automatic_scaling.min_idle_instances
  4307. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  4308. // ta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For
  4309. // Version resources that use automatic scaling and run in the App
  4310. // Engine standard environment.
  4311. // automatic_scaling.max_idle_instances
  4312. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  4313. // ta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For
  4314. // Version resources that use automatic scaling and run in the App
  4315. // Engine standard environment.
  4316. func (r *AppsModulesVersionsService) Patch(appsId string, modulesId string, versionsId string, version *Version) *AppsModulesVersionsPatchCall {
  4317. c := &AppsModulesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4318. c.appsId = appsId
  4319. c.modulesId = modulesId
  4320. c.versionsId = versionsId
  4321. c.version = version
  4322. return c
  4323. }
  4324. // Mask sets the optional parameter "mask": Standard field mask for the
  4325. // set of fields to be updated.
  4326. func (c *AppsModulesVersionsPatchCall) Mask(mask string) *AppsModulesVersionsPatchCall {
  4327. c.urlParams_.Set("mask", mask)
  4328. return c
  4329. }
  4330. // Fields allows partial responses to be retrieved. See
  4331. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4332. // for more information.
  4333. func (c *AppsModulesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsModulesVersionsPatchCall {
  4334. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4335. return c
  4336. }
  4337. // Context sets the context to be used in this call's Do method. Any
  4338. // pending HTTP request will be aborted if the provided context is
  4339. // canceled.
  4340. func (c *AppsModulesVersionsPatchCall) Context(ctx context.Context) *AppsModulesVersionsPatchCall {
  4341. c.ctx_ = ctx
  4342. return c
  4343. }
  4344. // Header returns an http.Header that can be modified by the caller to
  4345. // add HTTP headers to the request.
  4346. func (c *AppsModulesVersionsPatchCall) Header() http.Header {
  4347. if c.header_ == nil {
  4348. c.header_ = make(http.Header)
  4349. }
  4350. return c.header_
  4351. }
  4352. func (c *AppsModulesVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
  4353. reqHeaders := make(http.Header)
  4354. for k, v := range c.header_ {
  4355. reqHeaders[k] = v
  4356. }
  4357. reqHeaders.Set("User-Agent", c.s.userAgent())
  4358. var body io.Reader = nil
  4359. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  4360. if err != nil {
  4361. return nil, err
  4362. }
  4363. reqHeaders.Set("Content-Type", "application/json")
  4364. c.urlParams_.Set("alt", alt)
  4365. c.urlParams_.Set("prettyPrint", "false")
  4366. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}")
  4367. urls += "?" + c.urlParams_.Encode()
  4368. req, err := http.NewRequest("PATCH", urls, body)
  4369. if err != nil {
  4370. return nil, err
  4371. }
  4372. req.Header = reqHeaders
  4373. googleapi.Expand(req.URL, map[string]string{
  4374. "appsId": c.appsId,
  4375. "modulesId": c.modulesId,
  4376. "versionsId": c.versionsId,
  4377. })
  4378. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4379. }
  4380. // Do executes the "appengine.apps.modules.versions.patch" call.
  4381. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4382. // status code is an error. Response headers are in either
  4383. // *Operation.ServerResponse.Header or (if a response was returned at
  4384. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4385. // to check whether the returned error was because
  4386. // http.StatusNotModified was returned.
  4387. func (c *AppsModulesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4388. gensupport.SetOptions(c.urlParams_, opts...)
  4389. res, err := c.doRequest("json")
  4390. if res != nil && res.StatusCode == http.StatusNotModified {
  4391. if res.Body != nil {
  4392. res.Body.Close()
  4393. }
  4394. return nil, &googleapi.Error{
  4395. Code: res.StatusCode,
  4396. Header: res.Header,
  4397. }
  4398. }
  4399. if err != nil {
  4400. return nil, err
  4401. }
  4402. defer googleapi.CloseBody(res)
  4403. if err := googleapi.CheckResponse(res); err != nil {
  4404. return nil, err
  4405. }
  4406. ret := &Operation{
  4407. ServerResponse: googleapi.ServerResponse{
  4408. Header: res.Header,
  4409. HTTPStatusCode: res.StatusCode,
  4410. },
  4411. }
  4412. target := &ret
  4413. if err := gensupport.DecodeResponse(target, res); err != nil {
  4414. return nil, err
  4415. }
  4416. return ret, nil
  4417. // {
  4418. // "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/v1beta4/apps.modules.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/v1beta4/apps.modules.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/v1beta4/apps.modules.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/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.",
  4419. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}",
  4420. // "httpMethod": "PATCH",
  4421. // "id": "appengine.apps.modules.versions.patch",
  4422. // "parameterOrder": [
  4423. // "appsId",
  4424. // "modulesId",
  4425. // "versionsId"
  4426. // ],
  4427. // "parameters": {
  4428. // "appsId": {
  4429. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default/versions/1.",
  4430. // "location": "path",
  4431. // "required": true,
  4432. // "type": "string"
  4433. // },
  4434. // "mask": {
  4435. // "description": "Standard field mask for the set of fields to be updated.",
  4436. // "format": "google-fieldmask",
  4437. // "location": "query",
  4438. // "type": "string"
  4439. // },
  4440. // "modulesId": {
  4441. // "description": "Part of `name`. See documentation of `appsId`.",
  4442. // "location": "path",
  4443. // "required": true,
  4444. // "type": "string"
  4445. // },
  4446. // "versionsId": {
  4447. // "description": "Part of `name`. See documentation of `appsId`.",
  4448. // "location": "path",
  4449. // "required": true,
  4450. // "type": "string"
  4451. // }
  4452. // },
  4453. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}",
  4454. // "request": {
  4455. // "$ref": "Version"
  4456. // },
  4457. // "response": {
  4458. // "$ref": "Operation"
  4459. // },
  4460. // "scopes": [
  4461. // "https://www.googleapis.com/auth/cloud-platform"
  4462. // ]
  4463. // }
  4464. }
  4465. // method id "appengine.apps.modules.versions.instances.debug":
  4466. type AppsModulesVersionsInstancesDebugCall struct {
  4467. s *APIService
  4468. appsId string
  4469. modulesId string
  4470. versionsId string
  4471. instancesId string
  4472. debuginstancerequest *DebugInstanceRequest
  4473. urlParams_ gensupport.URLParams
  4474. ctx_ context.Context
  4475. header_ http.Header
  4476. }
  4477. // Debug: Enables debugging on a VM instance. This allows you to use the
  4478. // SSH command to connect to the virtual machine where the instance
  4479. // lives. While in "debug mode", the instance continues to serve live
  4480. // traffic. You should delete the instance when you are done debugging
  4481. // and then allow the system to take over and determine if another
  4482. // instance should be started.Only applicable for instances in App
  4483. // Engine flexible environment.
  4484. func (r *AppsModulesVersionsInstancesService) Debug(appsId string, modulesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsModulesVersionsInstancesDebugCall {
  4485. c := &AppsModulesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4486. c.appsId = appsId
  4487. c.modulesId = modulesId
  4488. c.versionsId = versionsId
  4489. c.instancesId = instancesId
  4490. c.debuginstancerequest = debuginstancerequest
  4491. return c
  4492. }
  4493. // Fields allows partial responses to be retrieved. See
  4494. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4495. // for more information.
  4496. func (c *AppsModulesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsModulesVersionsInstancesDebugCall {
  4497. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4498. return c
  4499. }
  4500. // Context sets the context to be used in this call's Do method. Any
  4501. // pending HTTP request will be aborted if the provided context is
  4502. // canceled.
  4503. func (c *AppsModulesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsModulesVersionsInstancesDebugCall {
  4504. c.ctx_ = ctx
  4505. return c
  4506. }
  4507. // Header returns an http.Header that can be modified by the caller to
  4508. // add HTTP headers to the request.
  4509. func (c *AppsModulesVersionsInstancesDebugCall) Header() http.Header {
  4510. if c.header_ == nil {
  4511. c.header_ = make(http.Header)
  4512. }
  4513. return c.header_
  4514. }
  4515. func (c *AppsModulesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) {
  4516. reqHeaders := make(http.Header)
  4517. for k, v := range c.header_ {
  4518. reqHeaders[k] = v
  4519. }
  4520. reqHeaders.Set("User-Agent", c.s.userAgent())
  4521. var body io.Reader = nil
  4522. body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest)
  4523. if err != nil {
  4524. return nil, err
  4525. }
  4526. reqHeaders.Set("Content-Type", "application/json")
  4527. c.urlParams_.Set("alt", alt)
  4528. c.urlParams_.Set("prettyPrint", "false")
  4529. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug")
  4530. urls += "?" + c.urlParams_.Encode()
  4531. req, err := http.NewRequest("POST", urls, body)
  4532. if err != nil {
  4533. return nil, err
  4534. }
  4535. req.Header = reqHeaders
  4536. googleapi.Expand(req.URL, map[string]string{
  4537. "appsId": c.appsId,
  4538. "modulesId": c.modulesId,
  4539. "versionsId": c.versionsId,
  4540. "instancesId": c.instancesId,
  4541. })
  4542. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4543. }
  4544. // Do executes the "appengine.apps.modules.versions.instances.debug" call.
  4545. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4546. // status code is an error. Response headers are in either
  4547. // *Operation.ServerResponse.Header or (if a response was returned at
  4548. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4549. // to check whether the returned error was because
  4550. // http.StatusNotModified was returned.
  4551. func (c *AppsModulesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4552. gensupport.SetOptions(c.urlParams_, opts...)
  4553. res, err := c.doRequest("json")
  4554. if res != nil && res.StatusCode == http.StatusNotModified {
  4555. if res.Body != nil {
  4556. res.Body.Close()
  4557. }
  4558. return nil, &googleapi.Error{
  4559. Code: res.StatusCode,
  4560. Header: res.Header,
  4561. }
  4562. }
  4563. if err != nil {
  4564. return nil, err
  4565. }
  4566. defer googleapi.CloseBody(res)
  4567. if err := googleapi.CheckResponse(res); err != nil {
  4568. return nil, err
  4569. }
  4570. ret := &Operation{
  4571. ServerResponse: googleapi.ServerResponse{
  4572. Header: res.Header,
  4573. HTTPStatusCode: res.StatusCode,
  4574. },
  4575. }
  4576. target := &ret
  4577. if err := gensupport.DecodeResponse(target, res); err != nil {
  4578. return nil, err
  4579. }
  4580. return ret, nil
  4581. // {
  4582. // "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.",
  4583. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug",
  4584. // "httpMethod": "POST",
  4585. // "id": "appengine.apps.modules.versions.instances.debug",
  4586. // "parameterOrder": [
  4587. // "appsId",
  4588. // "modulesId",
  4589. // "versionsId",
  4590. // "instancesId"
  4591. // ],
  4592. // "parameters": {
  4593. // "appsId": {
  4594. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.",
  4595. // "location": "path",
  4596. // "required": true,
  4597. // "type": "string"
  4598. // },
  4599. // "instancesId": {
  4600. // "description": "Part of `name`. See documentation of `appsId`.",
  4601. // "location": "path",
  4602. // "required": true,
  4603. // "type": "string"
  4604. // },
  4605. // "modulesId": {
  4606. // "description": "Part of `name`. See documentation of `appsId`.",
  4607. // "location": "path",
  4608. // "required": true,
  4609. // "type": "string"
  4610. // },
  4611. // "versionsId": {
  4612. // "description": "Part of `name`. See documentation of `appsId`.",
  4613. // "location": "path",
  4614. // "required": true,
  4615. // "type": "string"
  4616. // }
  4617. // },
  4618. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug",
  4619. // "request": {
  4620. // "$ref": "DebugInstanceRequest"
  4621. // },
  4622. // "response": {
  4623. // "$ref": "Operation"
  4624. // },
  4625. // "scopes": [
  4626. // "https://www.googleapis.com/auth/cloud-platform"
  4627. // ]
  4628. // }
  4629. }
  4630. // method id "appengine.apps.modules.versions.instances.delete":
  4631. type AppsModulesVersionsInstancesDeleteCall struct {
  4632. s *APIService
  4633. appsId string
  4634. modulesId string
  4635. versionsId string
  4636. instancesId string
  4637. urlParams_ gensupport.URLParams
  4638. ctx_ context.Context
  4639. header_ http.Header
  4640. }
  4641. // Delete: Stops a running instance.
  4642. func (r *AppsModulesVersionsInstancesService) Delete(appsId string, modulesId string, versionsId string, instancesId string) *AppsModulesVersionsInstancesDeleteCall {
  4643. c := &AppsModulesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4644. c.appsId = appsId
  4645. c.modulesId = modulesId
  4646. c.versionsId = versionsId
  4647. c.instancesId = instancesId
  4648. return c
  4649. }
  4650. // Fields allows partial responses to be retrieved. See
  4651. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4652. // for more information.
  4653. func (c *AppsModulesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsModulesVersionsInstancesDeleteCall {
  4654. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4655. return c
  4656. }
  4657. // Context sets the context to be used in this call's Do method. Any
  4658. // pending HTTP request will be aborted if the provided context is
  4659. // canceled.
  4660. func (c *AppsModulesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsModulesVersionsInstancesDeleteCall {
  4661. c.ctx_ = ctx
  4662. return c
  4663. }
  4664. // Header returns an http.Header that can be modified by the caller to
  4665. // add HTTP headers to the request.
  4666. func (c *AppsModulesVersionsInstancesDeleteCall) Header() http.Header {
  4667. if c.header_ == nil {
  4668. c.header_ = make(http.Header)
  4669. }
  4670. return c.header_
  4671. }
  4672. func (c *AppsModulesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4673. reqHeaders := make(http.Header)
  4674. for k, v := range c.header_ {
  4675. reqHeaders[k] = v
  4676. }
  4677. reqHeaders.Set("User-Agent", c.s.userAgent())
  4678. var body io.Reader = nil
  4679. c.urlParams_.Set("alt", alt)
  4680. c.urlParams_.Set("prettyPrint", "false")
  4681. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}")
  4682. urls += "?" + c.urlParams_.Encode()
  4683. req, err := http.NewRequest("DELETE", urls, body)
  4684. if err != nil {
  4685. return nil, err
  4686. }
  4687. req.Header = reqHeaders
  4688. googleapi.Expand(req.URL, map[string]string{
  4689. "appsId": c.appsId,
  4690. "modulesId": c.modulesId,
  4691. "versionsId": c.versionsId,
  4692. "instancesId": c.instancesId,
  4693. })
  4694. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4695. }
  4696. // Do executes the "appengine.apps.modules.versions.instances.delete" call.
  4697. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4698. // status code is an error. Response headers are in either
  4699. // *Operation.ServerResponse.Header or (if a response was returned at
  4700. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4701. // to check whether the returned error was because
  4702. // http.StatusNotModified was returned.
  4703. func (c *AppsModulesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4704. gensupport.SetOptions(c.urlParams_, opts...)
  4705. res, err := c.doRequest("json")
  4706. if res != nil && res.StatusCode == http.StatusNotModified {
  4707. if res.Body != nil {
  4708. res.Body.Close()
  4709. }
  4710. return nil, &googleapi.Error{
  4711. Code: res.StatusCode,
  4712. Header: res.Header,
  4713. }
  4714. }
  4715. if err != nil {
  4716. return nil, err
  4717. }
  4718. defer googleapi.CloseBody(res)
  4719. if err := googleapi.CheckResponse(res); err != nil {
  4720. return nil, err
  4721. }
  4722. ret := &Operation{
  4723. ServerResponse: googleapi.ServerResponse{
  4724. Header: res.Header,
  4725. HTTPStatusCode: res.StatusCode,
  4726. },
  4727. }
  4728. target := &ret
  4729. if err := gensupport.DecodeResponse(target, res); err != nil {
  4730. return nil, err
  4731. }
  4732. return ret, nil
  4733. // {
  4734. // "description": "Stops a running instance.",
  4735. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}",
  4736. // "httpMethod": "DELETE",
  4737. // "id": "appengine.apps.modules.versions.instances.delete",
  4738. // "parameterOrder": [
  4739. // "appsId",
  4740. // "modulesId",
  4741. // "versionsId",
  4742. // "instancesId"
  4743. // ],
  4744. // "parameters": {
  4745. // "appsId": {
  4746. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.",
  4747. // "location": "path",
  4748. // "required": true,
  4749. // "type": "string"
  4750. // },
  4751. // "instancesId": {
  4752. // "description": "Part of `name`. See documentation of `appsId`.",
  4753. // "location": "path",
  4754. // "required": true,
  4755. // "type": "string"
  4756. // },
  4757. // "modulesId": {
  4758. // "description": "Part of `name`. See documentation of `appsId`.",
  4759. // "location": "path",
  4760. // "required": true,
  4761. // "type": "string"
  4762. // },
  4763. // "versionsId": {
  4764. // "description": "Part of `name`. See documentation of `appsId`.",
  4765. // "location": "path",
  4766. // "required": true,
  4767. // "type": "string"
  4768. // }
  4769. // },
  4770. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}",
  4771. // "response": {
  4772. // "$ref": "Operation"
  4773. // },
  4774. // "scopes": [
  4775. // "https://www.googleapis.com/auth/cloud-platform"
  4776. // ]
  4777. // }
  4778. }
  4779. // method id "appengine.apps.modules.versions.instances.get":
  4780. type AppsModulesVersionsInstancesGetCall struct {
  4781. s *APIService
  4782. appsId string
  4783. modulesId string
  4784. versionsId string
  4785. instancesId string
  4786. urlParams_ gensupport.URLParams
  4787. ifNoneMatch_ string
  4788. ctx_ context.Context
  4789. header_ http.Header
  4790. }
  4791. // Get: Gets instance information.
  4792. func (r *AppsModulesVersionsInstancesService) Get(appsId string, modulesId string, versionsId string, instancesId string) *AppsModulesVersionsInstancesGetCall {
  4793. c := &AppsModulesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4794. c.appsId = appsId
  4795. c.modulesId = modulesId
  4796. c.versionsId = versionsId
  4797. c.instancesId = instancesId
  4798. return c
  4799. }
  4800. // Fields allows partial responses to be retrieved. See
  4801. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4802. // for more information.
  4803. func (c *AppsModulesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsModulesVersionsInstancesGetCall {
  4804. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4805. return c
  4806. }
  4807. // IfNoneMatch sets the optional parameter which makes the operation
  4808. // fail if the object's ETag matches the given value. This is useful for
  4809. // getting updates only after the object has changed since the last
  4810. // request. Use googleapi.IsNotModified to check whether the response
  4811. // error from Do is the result of In-None-Match.
  4812. func (c *AppsModulesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsModulesVersionsInstancesGetCall {
  4813. c.ifNoneMatch_ = entityTag
  4814. return c
  4815. }
  4816. // Context sets the context to be used in this call's Do method. Any
  4817. // pending HTTP request will be aborted if the provided context is
  4818. // canceled.
  4819. func (c *AppsModulesVersionsInstancesGetCall) Context(ctx context.Context) *AppsModulesVersionsInstancesGetCall {
  4820. c.ctx_ = ctx
  4821. return c
  4822. }
  4823. // Header returns an http.Header that can be modified by the caller to
  4824. // add HTTP headers to the request.
  4825. func (c *AppsModulesVersionsInstancesGetCall) Header() http.Header {
  4826. if c.header_ == nil {
  4827. c.header_ = make(http.Header)
  4828. }
  4829. return c.header_
  4830. }
  4831. func (c *AppsModulesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  4832. reqHeaders := make(http.Header)
  4833. for k, v := range c.header_ {
  4834. reqHeaders[k] = v
  4835. }
  4836. reqHeaders.Set("User-Agent", c.s.userAgent())
  4837. if c.ifNoneMatch_ != "" {
  4838. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4839. }
  4840. var body io.Reader = nil
  4841. c.urlParams_.Set("alt", alt)
  4842. c.urlParams_.Set("prettyPrint", "false")
  4843. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}")
  4844. urls += "?" + c.urlParams_.Encode()
  4845. req, err := http.NewRequest("GET", urls, body)
  4846. if err != nil {
  4847. return nil, err
  4848. }
  4849. req.Header = reqHeaders
  4850. googleapi.Expand(req.URL, map[string]string{
  4851. "appsId": c.appsId,
  4852. "modulesId": c.modulesId,
  4853. "versionsId": c.versionsId,
  4854. "instancesId": c.instancesId,
  4855. })
  4856. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4857. }
  4858. // Do executes the "appengine.apps.modules.versions.instances.get" call.
  4859. // Exactly one of *Instance or error will be non-nil. Any non-2xx status
  4860. // code is an error. Response headers are in either
  4861. // *Instance.ServerResponse.Header or (if a response was returned at
  4862. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4863. // to check whether the returned error was because
  4864. // http.StatusNotModified was returned.
  4865. func (c *AppsModulesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  4866. gensupport.SetOptions(c.urlParams_, opts...)
  4867. res, err := c.doRequest("json")
  4868. if res != nil && res.StatusCode == http.StatusNotModified {
  4869. if res.Body != nil {
  4870. res.Body.Close()
  4871. }
  4872. return nil, &googleapi.Error{
  4873. Code: res.StatusCode,
  4874. Header: res.Header,
  4875. }
  4876. }
  4877. if err != nil {
  4878. return nil, err
  4879. }
  4880. defer googleapi.CloseBody(res)
  4881. if err := googleapi.CheckResponse(res); err != nil {
  4882. return nil, err
  4883. }
  4884. ret := &Instance{
  4885. ServerResponse: googleapi.ServerResponse{
  4886. Header: res.Header,
  4887. HTTPStatusCode: res.StatusCode,
  4888. },
  4889. }
  4890. target := &ret
  4891. if err := gensupport.DecodeResponse(target, res); err != nil {
  4892. return nil, err
  4893. }
  4894. return ret, nil
  4895. // {
  4896. // "description": "Gets instance information.",
  4897. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}",
  4898. // "httpMethod": "GET",
  4899. // "id": "appengine.apps.modules.versions.instances.get",
  4900. // "parameterOrder": [
  4901. // "appsId",
  4902. // "modulesId",
  4903. // "versionsId",
  4904. // "instancesId"
  4905. // ],
  4906. // "parameters": {
  4907. // "appsId": {
  4908. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.",
  4909. // "location": "path",
  4910. // "required": true,
  4911. // "type": "string"
  4912. // },
  4913. // "instancesId": {
  4914. // "description": "Part of `name`. See documentation of `appsId`.",
  4915. // "location": "path",
  4916. // "required": true,
  4917. // "type": "string"
  4918. // },
  4919. // "modulesId": {
  4920. // "description": "Part of `name`. See documentation of `appsId`.",
  4921. // "location": "path",
  4922. // "required": true,
  4923. // "type": "string"
  4924. // },
  4925. // "versionsId": {
  4926. // "description": "Part of `name`. See documentation of `appsId`.",
  4927. // "location": "path",
  4928. // "required": true,
  4929. // "type": "string"
  4930. // }
  4931. // },
  4932. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}",
  4933. // "response": {
  4934. // "$ref": "Instance"
  4935. // },
  4936. // "scopes": [
  4937. // "https://www.googleapis.com/auth/appengine.admin",
  4938. // "https://www.googleapis.com/auth/cloud-platform",
  4939. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4940. // ]
  4941. // }
  4942. }
  4943. // method id "appengine.apps.modules.versions.instances.list":
  4944. type AppsModulesVersionsInstancesListCall struct {
  4945. s *APIService
  4946. appsId string
  4947. modulesId string
  4948. versionsId string
  4949. urlParams_ gensupport.URLParams
  4950. ifNoneMatch_ string
  4951. ctx_ context.Context
  4952. header_ http.Header
  4953. }
  4954. // List: Lists the instances of a version.Tip: To aggregate details
  4955. // about instances over time, see the Stackdriver Monitoring API
  4956. // (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeS
  4957. // eries/list).
  4958. func (r *AppsModulesVersionsInstancesService) List(appsId string, modulesId string, versionsId string) *AppsModulesVersionsInstancesListCall {
  4959. c := &AppsModulesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4960. c.appsId = appsId
  4961. c.modulesId = modulesId
  4962. c.versionsId = versionsId
  4963. return c
  4964. }
  4965. // PageSize sets the optional parameter "pageSize": Maximum results to
  4966. // return per page.
  4967. func (c *AppsModulesVersionsInstancesListCall) PageSize(pageSize int64) *AppsModulesVersionsInstancesListCall {
  4968. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4969. return c
  4970. }
  4971. // PageToken sets the optional parameter "pageToken": Continuation token
  4972. // for fetching the next page of results.
  4973. func (c *AppsModulesVersionsInstancesListCall) PageToken(pageToken string) *AppsModulesVersionsInstancesListCall {
  4974. c.urlParams_.Set("pageToken", pageToken)
  4975. return c
  4976. }
  4977. // Fields allows partial responses to be retrieved. See
  4978. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4979. // for more information.
  4980. func (c *AppsModulesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsModulesVersionsInstancesListCall {
  4981. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4982. return c
  4983. }
  4984. // IfNoneMatch sets the optional parameter which makes the operation
  4985. // fail if the object's ETag matches the given value. This is useful for
  4986. // getting updates only after the object has changed since the last
  4987. // request. Use googleapi.IsNotModified to check whether the response
  4988. // error from Do is the result of In-None-Match.
  4989. func (c *AppsModulesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsModulesVersionsInstancesListCall {
  4990. c.ifNoneMatch_ = entityTag
  4991. return c
  4992. }
  4993. // Context sets the context to be used in this call's Do method. Any
  4994. // pending HTTP request will be aborted if the provided context is
  4995. // canceled.
  4996. func (c *AppsModulesVersionsInstancesListCall) Context(ctx context.Context) *AppsModulesVersionsInstancesListCall {
  4997. c.ctx_ = ctx
  4998. return c
  4999. }
  5000. // Header returns an http.Header that can be modified by the caller to
  5001. // add HTTP headers to the request.
  5002. func (c *AppsModulesVersionsInstancesListCall) Header() http.Header {
  5003. if c.header_ == nil {
  5004. c.header_ = make(http.Header)
  5005. }
  5006. return c.header_
  5007. }
  5008. func (c *AppsModulesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  5009. reqHeaders := make(http.Header)
  5010. for k, v := range c.header_ {
  5011. reqHeaders[k] = v
  5012. }
  5013. reqHeaders.Set("User-Agent", c.s.userAgent())
  5014. if c.ifNoneMatch_ != "" {
  5015. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5016. }
  5017. var body io.Reader = nil
  5018. c.urlParams_.Set("alt", alt)
  5019. c.urlParams_.Set("prettyPrint", "false")
  5020. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances")
  5021. urls += "?" + c.urlParams_.Encode()
  5022. req, err := http.NewRequest("GET", urls, body)
  5023. if err != nil {
  5024. return nil, err
  5025. }
  5026. req.Header = reqHeaders
  5027. googleapi.Expand(req.URL, map[string]string{
  5028. "appsId": c.appsId,
  5029. "modulesId": c.modulesId,
  5030. "versionsId": c.versionsId,
  5031. })
  5032. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5033. }
  5034. // Do executes the "appengine.apps.modules.versions.instances.list" call.
  5035. // Exactly one of *ListInstancesResponse or error will be non-nil. Any
  5036. // non-2xx status code is an error. Response headers are in either
  5037. // *ListInstancesResponse.ServerResponse.Header or (if a response was
  5038. // returned at all) in error.(*googleapi.Error).Header. Use
  5039. // googleapi.IsNotModified to check whether the returned error was
  5040. // because http.StatusNotModified was returned.
  5041. func (c *AppsModulesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  5042. gensupport.SetOptions(c.urlParams_, opts...)
  5043. res, err := c.doRequest("json")
  5044. if res != nil && res.StatusCode == http.StatusNotModified {
  5045. if res.Body != nil {
  5046. res.Body.Close()
  5047. }
  5048. return nil, &googleapi.Error{
  5049. Code: res.StatusCode,
  5050. Header: res.Header,
  5051. }
  5052. }
  5053. if err != nil {
  5054. return nil, err
  5055. }
  5056. defer googleapi.CloseBody(res)
  5057. if err := googleapi.CheckResponse(res); err != nil {
  5058. return nil, err
  5059. }
  5060. ret := &ListInstancesResponse{
  5061. ServerResponse: googleapi.ServerResponse{
  5062. Header: res.Header,
  5063. HTTPStatusCode: res.StatusCode,
  5064. },
  5065. }
  5066. target := &ret
  5067. if err := gensupport.DecodeResponse(target, res); err != nil {
  5068. return nil, err
  5069. }
  5070. return ret, nil
  5071. // {
  5072. // "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).",
  5073. // "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances",
  5074. // "httpMethod": "GET",
  5075. // "id": "appengine.apps.modules.versions.instances.list",
  5076. // "parameterOrder": [
  5077. // "appsId",
  5078. // "modulesId",
  5079. // "versionsId"
  5080. // ],
  5081. // "parameters": {
  5082. // "appsId": {
  5083. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.",
  5084. // "location": "path",
  5085. // "required": true,
  5086. // "type": "string"
  5087. // },
  5088. // "modulesId": {
  5089. // "description": "Part of `name`. See documentation of `appsId`.",
  5090. // "location": "path",
  5091. // "required": true,
  5092. // "type": "string"
  5093. // },
  5094. // "pageSize": {
  5095. // "description": "Maximum results to return per page.",
  5096. // "format": "int32",
  5097. // "location": "query",
  5098. // "type": "integer"
  5099. // },
  5100. // "pageToken": {
  5101. // "description": "Continuation token for fetching the next page of results.",
  5102. // "location": "query",
  5103. // "type": "string"
  5104. // },
  5105. // "versionsId": {
  5106. // "description": "Part of `name`. See documentation of `appsId`.",
  5107. // "location": "path",
  5108. // "required": true,
  5109. // "type": "string"
  5110. // }
  5111. // },
  5112. // "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances",
  5113. // "response": {
  5114. // "$ref": "ListInstancesResponse"
  5115. // },
  5116. // "scopes": [
  5117. // "https://www.googleapis.com/auth/appengine.admin",
  5118. // "https://www.googleapis.com/auth/cloud-platform",
  5119. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5120. // ]
  5121. // }
  5122. }
  5123. // Pages invokes f for each page of results.
  5124. // A non-nil error returned from f will halt the iteration.
  5125. // The provided context supersedes any context provided to the Context method.
  5126. func (c *AppsModulesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  5127. c.ctx_ = ctx
  5128. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5129. for {
  5130. x, err := c.Do()
  5131. if err != nil {
  5132. return err
  5133. }
  5134. if err := f(x); err != nil {
  5135. return err
  5136. }
  5137. if x.NextPageToken == "" {
  5138. return nil
  5139. }
  5140. c.PageToken(x.NextPageToken)
  5141. }
  5142. }
  5143. // method id "appengine.apps.operations.get":
  5144. type AppsOperationsGetCall struct {
  5145. s *APIService
  5146. appsId string
  5147. operationsId string
  5148. urlParams_ gensupport.URLParams
  5149. ifNoneMatch_ string
  5150. ctx_ context.Context
  5151. header_ http.Header
  5152. }
  5153. // Get: Gets the latest state of a long-running operation. Clients can
  5154. // use this method to poll the operation result at intervals as
  5155. // recommended by the API service.
  5156. func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall {
  5157. c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5158. c.appsId = appsId
  5159. c.operationsId = operationsId
  5160. return c
  5161. }
  5162. // Fields allows partial responses to be retrieved. See
  5163. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5164. // for more information.
  5165. func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall {
  5166. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5167. return c
  5168. }
  5169. // IfNoneMatch sets the optional parameter which makes the operation
  5170. // fail if the object's ETag matches the given value. This is useful for
  5171. // getting updates only after the object has changed since the last
  5172. // request. Use googleapi.IsNotModified to check whether the response
  5173. // error from Do is the result of In-None-Match.
  5174. func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall {
  5175. c.ifNoneMatch_ = entityTag
  5176. return c
  5177. }
  5178. // Context sets the context to be used in this call's Do method. Any
  5179. // pending HTTP request will be aborted if the provided context is
  5180. // canceled.
  5181. func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall {
  5182. c.ctx_ = ctx
  5183. return c
  5184. }
  5185. // Header returns an http.Header that can be modified by the caller to
  5186. // add HTTP headers to the request.
  5187. func (c *AppsOperationsGetCall) Header() http.Header {
  5188. if c.header_ == nil {
  5189. c.header_ = make(http.Header)
  5190. }
  5191. return c.header_
  5192. }
  5193. func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5194. reqHeaders := make(http.Header)
  5195. for k, v := range c.header_ {
  5196. reqHeaders[k] = v
  5197. }
  5198. reqHeaders.Set("User-Agent", c.s.userAgent())
  5199. if c.ifNoneMatch_ != "" {
  5200. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5201. }
  5202. var body io.Reader = nil
  5203. c.urlParams_.Set("alt", alt)
  5204. c.urlParams_.Set("prettyPrint", "false")
  5205. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/operations/{operationsId}")
  5206. urls += "?" + c.urlParams_.Encode()
  5207. req, err := http.NewRequest("GET", urls, body)
  5208. if err != nil {
  5209. return nil, err
  5210. }
  5211. req.Header = reqHeaders
  5212. googleapi.Expand(req.URL, map[string]string{
  5213. "appsId": c.appsId,
  5214. "operationsId": c.operationsId,
  5215. })
  5216. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5217. }
  5218. // Do executes the "appengine.apps.operations.get" call.
  5219. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5220. // status code is an error. Response headers are in either
  5221. // *Operation.ServerResponse.Header or (if a response was returned at
  5222. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5223. // to check whether the returned error was because
  5224. // http.StatusNotModified was returned.
  5225. func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5226. gensupport.SetOptions(c.urlParams_, opts...)
  5227. res, err := c.doRequest("json")
  5228. if res != nil && res.StatusCode == http.StatusNotModified {
  5229. if res.Body != nil {
  5230. res.Body.Close()
  5231. }
  5232. return nil, &googleapi.Error{
  5233. Code: res.StatusCode,
  5234. Header: res.Header,
  5235. }
  5236. }
  5237. if err != nil {
  5238. return nil, err
  5239. }
  5240. defer googleapi.CloseBody(res)
  5241. if err := googleapi.CheckResponse(res); err != nil {
  5242. return nil, err
  5243. }
  5244. ret := &Operation{
  5245. ServerResponse: googleapi.ServerResponse{
  5246. Header: res.Header,
  5247. HTTPStatusCode: res.StatusCode,
  5248. },
  5249. }
  5250. target := &ret
  5251. if err := gensupport.DecodeResponse(target, res); err != nil {
  5252. return nil, err
  5253. }
  5254. return ret, nil
  5255. // {
  5256. // "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.",
  5257. // "flatPath": "v1beta4/apps/{appsId}/operations/{operationsId}",
  5258. // "httpMethod": "GET",
  5259. // "id": "appengine.apps.operations.get",
  5260. // "parameterOrder": [
  5261. // "appsId",
  5262. // "operationsId"
  5263. // ],
  5264. // "parameters": {
  5265. // "appsId": {
  5266. // "description": "Part of `name`. The name of the operation resource.",
  5267. // "location": "path",
  5268. // "required": true,
  5269. // "type": "string"
  5270. // },
  5271. // "operationsId": {
  5272. // "description": "Part of `name`. See documentation of `appsId`.",
  5273. // "location": "path",
  5274. // "required": true,
  5275. // "type": "string"
  5276. // }
  5277. // },
  5278. // "path": "v1beta4/apps/{appsId}/operations/{operationsId}",
  5279. // "response": {
  5280. // "$ref": "Operation"
  5281. // },
  5282. // "scopes": [
  5283. // "https://www.googleapis.com/auth/appengine.admin",
  5284. // "https://www.googleapis.com/auth/cloud-platform",
  5285. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5286. // ]
  5287. // }
  5288. }
  5289. // method id "appengine.apps.operations.list":
  5290. type AppsOperationsListCall struct {
  5291. s *APIService
  5292. appsId string
  5293. urlParams_ gensupport.URLParams
  5294. ifNoneMatch_ string
  5295. ctx_ context.Context
  5296. header_ http.Header
  5297. }
  5298. // List: Lists operations that match the specified filter in the
  5299. // request. If the server doesn't support this method, it returns
  5300. // UNIMPLEMENTED.NOTE: the name binding allows API services to override
  5301. // the binding to use different resource name schemes, such as
  5302. // users/*/operations. To override the binding, API services can add a
  5303. // binding such as "/v1/{name=users/*}/operations" to their service
  5304. // configuration. For backwards compatibility, the default name includes
  5305. // the operations collection id, however overriding users must ensure
  5306. // the name binding is the parent resource, without the operations
  5307. // collection id.
  5308. func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall {
  5309. c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5310. c.appsId = appsId
  5311. return c
  5312. }
  5313. // Filter sets the optional parameter "filter": The standard list
  5314. // filter.
  5315. func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall {
  5316. c.urlParams_.Set("filter", filter)
  5317. return c
  5318. }
  5319. // PageSize sets the optional parameter "pageSize": The standard list
  5320. // page size.
  5321. func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall {
  5322. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5323. return c
  5324. }
  5325. // PageToken sets the optional parameter "pageToken": The standard list
  5326. // page token.
  5327. func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall {
  5328. c.urlParams_.Set("pageToken", pageToken)
  5329. return c
  5330. }
  5331. // Fields allows partial responses to be retrieved. See
  5332. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5333. // for more information.
  5334. func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall {
  5335. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5336. return c
  5337. }
  5338. // IfNoneMatch sets the optional parameter which makes the operation
  5339. // fail if the object's ETag matches the given value. This is useful for
  5340. // getting updates only after the object has changed since the last
  5341. // request. Use googleapi.IsNotModified to check whether the response
  5342. // error from Do is the result of In-None-Match.
  5343. func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall {
  5344. c.ifNoneMatch_ = entityTag
  5345. return c
  5346. }
  5347. // Context sets the context to be used in this call's Do method. Any
  5348. // pending HTTP request will be aborted if the provided context is
  5349. // canceled.
  5350. func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall {
  5351. c.ctx_ = ctx
  5352. return c
  5353. }
  5354. // Header returns an http.Header that can be modified by the caller to
  5355. // add HTTP headers to the request.
  5356. func (c *AppsOperationsListCall) Header() http.Header {
  5357. if c.header_ == nil {
  5358. c.header_ = make(http.Header)
  5359. }
  5360. return c.header_
  5361. }
  5362. func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  5363. reqHeaders := make(http.Header)
  5364. for k, v := range c.header_ {
  5365. reqHeaders[k] = v
  5366. }
  5367. reqHeaders.Set("User-Agent", c.s.userAgent())
  5368. if c.ifNoneMatch_ != "" {
  5369. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5370. }
  5371. var body io.Reader = nil
  5372. c.urlParams_.Set("alt", alt)
  5373. c.urlParams_.Set("prettyPrint", "false")
  5374. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta4/apps/{appsId}/operations")
  5375. urls += "?" + c.urlParams_.Encode()
  5376. req, err := http.NewRequest("GET", urls, body)
  5377. if err != nil {
  5378. return nil, err
  5379. }
  5380. req.Header = reqHeaders
  5381. googleapi.Expand(req.URL, map[string]string{
  5382. "appsId": c.appsId,
  5383. })
  5384. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5385. }
  5386. // Do executes the "appengine.apps.operations.list" call.
  5387. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  5388. // non-2xx status code is an error. Response headers are in either
  5389. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  5390. // returned at all) in error.(*googleapi.Error).Header. Use
  5391. // googleapi.IsNotModified to check whether the returned error was
  5392. // because http.StatusNotModified was returned.
  5393. func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  5394. gensupport.SetOptions(c.urlParams_, opts...)
  5395. res, err := c.doRequest("json")
  5396. if res != nil && res.StatusCode == http.StatusNotModified {
  5397. if res.Body != nil {
  5398. res.Body.Close()
  5399. }
  5400. return nil, &googleapi.Error{
  5401. Code: res.StatusCode,
  5402. Header: res.Header,
  5403. }
  5404. }
  5405. if err != nil {
  5406. return nil, err
  5407. }
  5408. defer googleapi.CloseBody(res)
  5409. if err := googleapi.CheckResponse(res); err != nil {
  5410. return nil, err
  5411. }
  5412. ret := &ListOperationsResponse{
  5413. ServerResponse: googleapi.ServerResponse{
  5414. Header: res.Header,
  5415. HTTPStatusCode: res.StatusCode,
  5416. },
  5417. }
  5418. target := &ret
  5419. if err := gensupport.DecodeResponse(target, res); err != nil {
  5420. return nil, err
  5421. }
  5422. return ret, nil
  5423. // {
  5424. // "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.",
  5425. // "flatPath": "v1beta4/apps/{appsId}/operations",
  5426. // "httpMethod": "GET",
  5427. // "id": "appengine.apps.operations.list",
  5428. // "parameterOrder": [
  5429. // "appsId"
  5430. // ],
  5431. // "parameters": {
  5432. // "appsId": {
  5433. // "description": "Part of `name`. The name of the operation's parent resource.",
  5434. // "location": "path",
  5435. // "required": true,
  5436. // "type": "string"
  5437. // },
  5438. // "filter": {
  5439. // "description": "The standard list filter.",
  5440. // "location": "query",
  5441. // "type": "string"
  5442. // },
  5443. // "pageSize": {
  5444. // "description": "The standard list page size.",
  5445. // "format": "int32",
  5446. // "location": "query",
  5447. // "type": "integer"
  5448. // },
  5449. // "pageToken": {
  5450. // "description": "The standard list page token.",
  5451. // "location": "query",
  5452. // "type": "string"
  5453. // }
  5454. // },
  5455. // "path": "v1beta4/apps/{appsId}/operations",
  5456. // "response": {
  5457. // "$ref": "ListOperationsResponse"
  5458. // },
  5459. // "scopes": [
  5460. // "https://www.googleapis.com/auth/appengine.admin",
  5461. // "https://www.googleapis.com/auth/cloud-platform",
  5462. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5463. // ]
  5464. // }
  5465. }
  5466. // Pages invokes f for each page of results.
  5467. // A non-nil error returned from f will halt the iteration.
  5468. // The provided context supersedes any context provided to the Context method.
  5469. func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  5470. c.ctx_ = ctx
  5471. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5472. for {
  5473. x, err := c.Do()
  5474. if err != nil {
  5475. return err
  5476. }
  5477. if err := f(x); err != nil {
  5478. return err
  5479. }
  5480. if x.NextPageToken == "" {
  5481. return nil
  5482. }
  5483. c.PageToken(x.NextPageToken)
  5484. }
  5485. }