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.
 
 
 

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