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.
 
 
 

6020 lines
223 KiB

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