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.
 
 
 

10204 lines
374 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package appengine provides access to the App Engine Admin API.
  6. //
  7. // For product documentation, see: https://cloud.google.com/appengine/docs/admin-api/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/appengine/v1beta"
  14. // ...
  15. // ctx := context.Background()
  16. // appengineService, err := appengine.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  25. //
  26. // appengineService, err := appengine.NewService(ctx, option.WithScopes(appengine.CloudPlatformReadOnlyScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // appengineService, err := appengine.NewService(ctx, option.WithAPIKey("AIza..."))
  31. //
  32. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  33. //
  34. // config := &oauth2.Config{...}
  35. // // ...
  36. // token, err := config.Exchange(ctx, ...)
  37. // appengineService, err := appengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  38. //
  39. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  40. package appengine // import "google.golang.org/api/appengine/v1beta"
  41. import (
  42. "bytes"
  43. "context"
  44. "encoding/json"
  45. "errors"
  46. "fmt"
  47. "io"
  48. "net/http"
  49. "net/url"
  50. "strconv"
  51. "strings"
  52. gensupport "google.golang.org/api/gensupport"
  53. googleapi "google.golang.org/api/googleapi"
  54. option "google.golang.org/api/option"
  55. htransport "google.golang.org/api/transport/http"
  56. )
  57. // Always reference these packages, just in case the auto-generated code
  58. // below doesn't.
  59. var _ = bytes.NewBuffer
  60. var _ = strconv.Itoa
  61. var _ = fmt.Sprintf
  62. var _ = json.NewDecoder
  63. var _ = io.Copy
  64. var _ = url.Parse
  65. var _ = gensupport.MarshalJSON
  66. var _ = googleapi.Version
  67. var _ = errors.New
  68. var _ = strings.Replace
  69. var _ = context.Canceled
  70. const apiId = "appengine:v1beta"
  71. const apiName = "appengine"
  72. const apiVersion = "v1beta"
  73. const basePath = "https://appengine.googleapis.com/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // View and manage your applications deployed on Google App Engine
  77. AppengineAdminScope = "https://www.googleapis.com/auth/appengine.admin"
  78. // View and manage your data across Google Cloud Platform services
  79. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  80. // View your data across Google Cloud Platform services
  81. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  82. )
  83. // NewService creates a new APIService.
  84. func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) {
  85. scopesOption := option.WithScopes(
  86. "https://www.googleapis.com/auth/appengine.admin",
  87. "https://www.googleapis.com/auth/cloud-platform",
  88. "https://www.googleapis.com/auth/cloud-platform.read-only",
  89. )
  90. // NOTE: prepend, so we don't override user-specified scopes.
  91. opts = append([]option.ClientOption{scopesOption}, opts...)
  92. client, endpoint, err := htransport.NewClient(ctx, opts...)
  93. if err != nil {
  94. return nil, err
  95. }
  96. s, err := New(client)
  97. if err != nil {
  98. return nil, err
  99. }
  100. if endpoint != "" {
  101. s.BasePath = endpoint
  102. }
  103. return s, nil
  104. }
  105. // New creates a new APIService. It uses the provided http.Client for requests.
  106. //
  107. // Deprecated: please use NewService instead.
  108. // To provide a custom HTTP client, use option.WithHTTPClient.
  109. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  110. func New(client *http.Client) (*APIService, error) {
  111. if client == nil {
  112. return nil, errors.New("client is nil")
  113. }
  114. s := &APIService{client: client, BasePath: basePath}
  115. s.Apps = NewAppsService(s)
  116. return s, nil
  117. }
  118. type APIService struct {
  119. client *http.Client
  120. BasePath string // API endpoint base URL
  121. UserAgent string // optional additional User-Agent fragment
  122. Apps *AppsService
  123. }
  124. func (s *APIService) userAgent() string {
  125. if s.UserAgent == "" {
  126. return googleapi.UserAgent
  127. }
  128. return googleapi.UserAgent + " " + s.UserAgent
  129. }
  130. func NewAppsService(s *APIService) *AppsService {
  131. rs := &AppsService{s: s}
  132. rs.AuthorizedCertificates = NewAppsAuthorizedCertificatesService(s)
  133. rs.AuthorizedDomains = NewAppsAuthorizedDomainsService(s)
  134. rs.DomainMappings = NewAppsDomainMappingsService(s)
  135. rs.Firewall = NewAppsFirewallService(s)
  136. rs.Locations = NewAppsLocationsService(s)
  137. rs.Operations = NewAppsOperationsService(s)
  138. rs.Services = NewAppsServicesService(s)
  139. return rs
  140. }
  141. type AppsService struct {
  142. s *APIService
  143. AuthorizedCertificates *AppsAuthorizedCertificatesService
  144. AuthorizedDomains *AppsAuthorizedDomainsService
  145. DomainMappings *AppsDomainMappingsService
  146. Firewall *AppsFirewallService
  147. Locations *AppsLocationsService
  148. Operations *AppsOperationsService
  149. Services *AppsServicesService
  150. }
  151. func NewAppsAuthorizedCertificatesService(s *APIService) *AppsAuthorizedCertificatesService {
  152. rs := &AppsAuthorizedCertificatesService{s: s}
  153. return rs
  154. }
  155. type AppsAuthorizedCertificatesService struct {
  156. s *APIService
  157. }
  158. func NewAppsAuthorizedDomainsService(s *APIService) *AppsAuthorizedDomainsService {
  159. rs := &AppsAuthorizedDomainsService{s: s}
  160. return rs
  161. }
  162. type AppsAuthorizedDomainsService struct {
  163. s *APIService
  164. }
  165. func NewAppsDomainMappingsService(s *APIService) *AppsDomainMappingsService {
  166. rs := &AppsDomainMappingsService{s: s}
  167. return rs
  168. }
  169. type AppsDomainMappingsService struct {
  170. s *APIService
  171. }
  172. func NewAppsFirewallService(s *APIService) *AppsFirewallService {
  173. rs := &AppsFirewallService{s: s}
  174. rs.IngressRules = NewAppsFirewallIngressRulesService(s)
  175. return rs
  176. }
  177. type AppsFirewallService struct {
  178. s *APIService
  179. IngressRules *AppsFirewallIngressRulesService
  180. }
  181. func NewAppsFirewallIngressRulesService(s *APIService) *AppsFirewallIngressRulesService {
  182. rs := &AppsFirewallIngressRulesService{s: s}
  183. return rs
  184. }
  185. type AppsFirewallIngressRulesService struct {
  186. s *APIService
  187. }
  188. func NewAppsLocationsService(s *APIService) *AppsLocationsService {
  189. rs := &AppsLocationsService{s: s}
  190. return rs
  191. }
  192. type AppsLocationsService struct {
  193. s *APIService
  194. }
  195. func NewAppsOperationsService(s *APIService) *AppsOperationsService {
  196. rs := &AppsOperationsService{s: s}
  197. return rs
  198. }
  199. type AppsOperationsService struct {
  200. s *APIService
  201. }
  202. func NewAppsServicesService(s *APIService) *AppsServicesService {
  203. rs := &AppsServicesService{s: s}
  204. rs.Versions = NewAppsServicesVersionsService(s)
  205. return rs
  206. }
  207. type AppsServicesService struct {
  208. s *APIService
  209. Versions *AppsServicesVersionsService
  210. }
  211. func NewAppsServicesVersionsService(s *APIService) *AppsServicesVersionsService {
  212. rs := &AppsServicesVersionsService{s: s}
  213. rs.Instances = NewAppsServicesVersionsInstancesService(s)
  214. return rs
  215. }
  216. type AppsServicesVersionsService struct {
  217. s *APIService
  218. Instances *AppsServicesVersionsInstancesService
  219. }
  220. func NewAppsServicesVersionsInstancesService(s *APIService) *AppsServicesVersionsInstancesService {
  221. rs := &AppsServicesVersionsInstancesService{s: s}
  222. return rs
  223. }
  224. type AppsServicesVersionsInstancesService struct {
  225. s *APIService
  226. }
  227. // ApiConfigHandler: Google Cloud Endpoints
  228. // (https://cloud.google.com/appengine/docs/python/endpoints/)
  229. // configuration for API handlers.
  230. type ApiConfigHandler struct {
  231. // AuthFailAction: Action to take when users access resources that
  232. // require authentication. Defaults to redirect.
  233. //
  234. // Possible values:
  235. // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified.
  236. // AUTH_FAIL_ACTION_REDIRECT is assumed.
  237. // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to
  238. // "accounts.google.com". The user is redirected back to the application
  239. // URL after signing in or creating an account.
  240. // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP
  241. // status code and an error message.
  242. AuthFailAction string `json:"authFailAction,omitempty"`
  243. // Login: Level of login required to access this resource. Defaults to
  244. // optional.
  245. //
  246. // Possible values:
  247. // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed.
  248. // "LOGIN_OPTIONAL" - Does not require that the user is signed in.
  249. // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action
  250. // is taken. In addition, if the user is not an administrator for the
  251. // application, they are given an error message regardless of
  252. // auth_fail_action. If the user is an administrator, the handler
  253. // proceeds.
  254. // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds
  255. // normally. Otherwise, the auth_fail_action is taken.
  256. Login string `json:"login,omitempty"`
  257. // Script: Path to the script from the application root directory.
  258. Script string `json:"script,omitempty"`
  259. // SecurityLevel: Security (HTTPS) enforcement for this URL.
  260. //
  261. // Possible values:
  262. // "SECURE_UNSPECIFIED" - Not specified.
  263. // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that
  264. // match the handler succeed without redirects. The application can
  265. // examine the request to determine which protocol was used, and respond
  266. // accordingly.
  267. // "SECURE_NEVER" - Requests for a URL that match this handler that
  268. // use HTTPS are automatically redirected to the HTTP equivalent URL.
  269. // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that
  270. // match the handler succeed without redirects. The application can
  271. // examine the request to determine which protocol was used and respond
  272. // accordingly.
  273. // "SECURE_ALWAYS" - Requests for a URL that match this handler that
  274. // do not use HTTPS are automatically redirected to the HTTPS URL with
  275. // the same path. Query parameters are reserved for the redirect.
  276. SecurityLevel string `json:"securityLevel,omitempty"`
  277. // Url: URL to serve the endpoint at.
  278. Url string `json:"url,omitempty"`
  279. // ForceSendFields is a list of field names (e.g. "AuthFailAction") to
  280. // unconditionally include in API requests. By default, fields with
  281. // empty values are omitted from API requests. However, any non-pointer,
  282. // non-interface field appearing in ForceSendFields will be sent to the
  283. // server regardless of whether the field is empty or not. This may be
  284. // used to include empty fields in Patch requests.
  285. ForceSendFields []string `json:"-"`
  286. // NullFields is a list of field names (e.g. "AuthFailAction") to
  287. // include in API requests with the JSON null value. By default, fields
  288. // with empty values are omitted from API requests. However, any field
  289. // with an empty value appearing in NullFields will be sent to the
  290. // server as null. It is an error if a field in this list has a
  291. // non-empty value. This may be used to include null fields in Patch
  292. // requests.
  293. NullFields []string `json:"-"`
  294. }
  295. func (s *ApiConfigHandler) MarshalJSON() ([]byte, error) {
  296. type NoMethod ApiConfigHandler
  297. raw := NoMethod(*s)
  298. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  299. }
  300. // ApiEndpointHandler: Uses Google Cloud Endpoints to handle requests.
  301. type ApiEndpointHandler struct {
  302. // ScriptPath: Path to the script from the application root directory.
  303. ScriptPath string `json:"scriptPath,omitempty"`
  304. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  305. // unconditionally include in API requests. By default, fields with
  306. // empty values are omitted from API requests. However, any non-pointer,
  307. // non-interface field appearing in ForceSendFields will be sent to the
  308. // server regardless of whether the field is empty or not. This may be
  309. // used to include empty fields in Patch requests.
  310. ForceSendFields []string `json:"-"`
  311. // NullFields is a list of field names (e.g. "ScriptPath") to include in
  312. // API requests with the JSON null value. By default, fields with empty
  313. // values are omitted from API requests. However, any field with an
  314. // empty value appearing in NullFields will be sent to the server as
  315. // null. It is an error if a field in this list has a non-empty value.
  316. // This may be used to include null fields in Patch requests.
  317. NullFields []string `json:"-"`
  318. }
  319. func (s *ApiEndpointHandler) MarshalJSON() ([]byte, error) {
  320. type NoMethod ApiEndpointHandler
  321. raw := NoMethod(*s)
  322. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  323. }
  324. // Application: An Application resource contains the top-level
  325. // configuration of an App Engine application.
  326. type Application struct {
  327. // AuthDomain: Google Apps authentication domain that controls which
  328. // users can access this application.Defaults to open access for any
  329. // Google Account.
  330. AuthDomain string `json:"authDomain,omitempty"`
  331. // CodeBucket: Google Cloud Storage bucket that can be used for storing
  332. // files associated with this application. This bucket is associated
  333. // with the application and can be used by the gcloud deployment
  334. // commands.@OutputOnly
  335. CodeBucket string `json:"codeBucket,omitempty"`
  336. // DefaultBucket: Google Cloud Storage bucket that can be used by this
  337. // application to store content.@OutputOnly
  338. DefaultBucket string `json:"defaultBucket,omitempty"`
  339. // DefaultCookieExpiration: Cookie expiration policy for this
  340. // application.
  341. DefaultCookieExpiration string `json:"defaultCookieExpiration,omitempty"`
  342. // DefaultHostname: Hostname used to reach this application, as resolved
  343. // by App Engine.@OutputOnly
  344. DefaultHostname string `json:"defaultHostname,omitempty"`
  345. // DispatchRules: HTTP path dispatch rules for requests to the
  346. // application that do not explicitly target a service or version. Rules
  347. // are order-dependent. Up to 20 dispatch rules can be supported.
  348. DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"`
  349. // FeatureSettings: The feature specific settings to be used in the
  350. // application.
  351. FeatureSettings *FeatureSettings `json:"featureSettings,omitempty"`
  352. // GcrDomain: The Google Container Registry domain used for storing
  353. // managed build docker images for this application.
  354. GcrDomain string `json:"gcrDomain,omitempty"`
  355. Iap *IdentityAwareProxy `json:"iap,omitempty"`
  356. // Id: Identifier of the Application resource. This identifier is
  357. // equivalent to the project ID of the Google Cloud Platform project
  358. // where you want to deploy your application. Example: myapp.
  359. Id string `json:"id,omitempty"`
  360. // LocationId: Location from which this application runs. Application
  361. // instances run out of the data centers in the specified location,
  362. // which is also where all of the application's end user content is
  363. // stored.Defaults to us-central.View the list of supported locations
  364. // (https://cloud.google.com/appengine/docs/locations).
  365. LocationId string `json:"locationId,omitempty"`
  366. // Name: Full path to the Application resource in the API. Example:
  367. // apps/myapp.@OutputOnly
  368. Name string `json:"name,omitempty"`
  369. // ServingStatus: Serving status of this application.
  370. //
  371. // Possible values:
  372. // "UNSPECIFIED" - Serving status is unspecified.
  373. // "SERVING" - Application is serving.
  374. // "USER_DISABLED" - Application has been disabled by the user.
  375. // "SYSTEM_DISABLED" - Application has been disabled by the system.
  376. ServingStatus string `json:"servingStatus,omitempty"`
  377. // ServerResponse contains the HTTP response code and headers from the
  378. // server.
  379. googleapi.ServerResponse `json:"-"`
  380. // ForceSendFields is a list of field names (e.g. "AuthDomain") to
  381. // unconditionally include in API requests. By default, fields with
  382. // empty values are omitted from API requests. However, any non-pointer,
  383. // non-interface field appearing in ForceSendFields will be sent to the
  384. // server regardless of whether the field is empty or not. This may be
  385. // used to include empty fields in Patch requests.
  386. ForceSendFields []string `json:"-"`
  387. // NullFields is a list of field names (e.g. "AuthDomain") to include in
  388. // API requests with the JSON null value. By default, fields with empty
  389. // values are omitted from API requests. However, any field with an
  390. // empty value appearing in NullFields will be sent to the server as
  391. // null. It is an error if a field in this list has a non-empty value.
  392. // This may be used to include null fields in Patch requests.
  393. NullFields []string `json:"-"`
  394. }
  395. func (s *Application) MarshalJSON() ([]byte, error) {
  396. type NoMethod Application
  397. raw := NoMethod(*s)
  398. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  399. }
  400. // AuthorizedCertificate: An SSL certificate that a user has been
  401. // authorized to administer. A user is authorized to administer any
  402. // certificate that applies to one of their authorized domains.
  403. type AuthorizedCertificate struct {
  404. // CertificateRawData: The SSL certificate serving the
  405. // AuthorizedCertificate resource. This must be obtained independently
  406. // from a certificate authority.
  407. CertificateRawData *CertificateRawData `json:"certificateRawData,omitempty"`
  408. // DisplayName: The user-specified display name of the certificate. This
  409. // is not guaranteed to be unique. Example: My Certificate.
  410. DisplayName string `json:"displayName,omitempty"`
  411. // DomainMappingsCount: Aggregate count of the domain mappings with this
  412. // certificate mapped. This count includes domain mappings on
  413. // applications for which the user does not have VIEWER permissions.Only
  414. // returned by GET or LIST requests when specifically requested by the
  415. // view=FULL_CERTIFICATE option.@OutputOnly
  416. DomainMappingsCount int64 `json:"domainMappingsCount,omitempty"`
  417. // DomainNames: Topmost applicable domains of this certificate. This
  418. // certificate applies to these domains and their subdomains. Example:
  419. // example.com.@OutputOnly
  420. DomainNames []string `json:"domainNames,omitempty"`
  421. // ExpireTime: The time when this certificate expires. To update the
  422. // renewal time on this certificate, upload an SSL certificate with a
  423. // different expiration time using
  424. // AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly
  425. ExpireTime string `json:"expireTime,omitempty"`
  426. // Id: Relative name of the certificate. This is a unique value
  427. // autogenerated on AuthorizedCertificate resource creation. Example:
  428. // 12345.@OutputOnly
  429. Id string `json:"id,omitempty"`
  430. // ManagedCertificate: Only applicable if this certificate is managed by
  431. // App Engine. Managed certificates are tied to the lifecycle of a
  432. // DomainMapping and cannot be updated or deleted via the
  433. // AuthorizedCertificates API. If this certificate is manually
  434. // administered by the user, this field will be empty.@OutputOnly
  435. ManagedCertificate *ManagedCertificate `json:"managedCertificate,omitempty"`
  436. // Name: Full path to the AuthorizedCertificate resource in the API.
  437. // Example: apps/myapp/authorizedCertificates/12345.@OutputOnly
  438. Name string `json:"name,omitempty"`
  439. // VisibleDomainMappings: The full paths to user visible Domain Mapping
  440. // resources that have this certificate mapped. Example:
  441. // apps/myapp/domainMappings/example.com.This may not represent the full
  442. // list of mapped domain mappings if the user does not have VIEWER
  443. // permissions on all of the applications that have this certificate
  444. // mapped. See domain_mappings_count for a complete count.Only returned
  445. // by GET or LIST requests when specifically requested by the
  446. // view=FULL_CERTIFICATE option.@OutputOnly
  447. VisibleDomainMappings []string `json:"visibleDomainMappings,omitempty"`
  448. // ServerResponse contains the HTTP response code and headers from the
  449. // server.
  450. googleapi.ServerResponse `json:"-"`
  451. // ForceSendFields is a list of field names (e.g. "CertificateRawData")
  452. // to unconditionally include in API requests. By default, fields with
  453. // empty values are omitted from API requests. However, any non-pointer,
  454. // non-interface field appearing in ForceSendFields will be sent to the
  455. // server regardless of whether the field is empty or not. This may be
  456. // used to include empty fields in Patch requests.
  457. ForceSendFields []string `json:"-"`
  458. // NullFields is a list of field names (e.g. "CertificateRawData") to
  459. // include in API requests with the JSON null value. By default, fields
  460. // with empty values are omitted from API requests. However, any field
  461. // with an empty value appearing in NullFields will be sent to the
  462. // server as null. It is an error if a field in this list has a
  463. // non-empty value. This may be used to include null fields in Patch
  464. // requests.
  465. NullFields []string `json:"-"`
  466. }
  467. func (s *AuthorizedCertificate) MarshalJSON() ([]byte, error) {
  468. type NoMethod AuthorizedCertificate
  469. raw := NoMethod(*s)
  470. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  471. }
  472. // AuthorizedDomain: A domain that a user has been authorized to
  473. // administer. To authorize use of a domain, verify ownership via
  474. // Webmaster Central
  475. // (https://www.google.com/webmasters/verification/home).
  476. type AuthorizedDomain struct {
  477. // Id: Fully qualified domain name of the domain authorized for use.
  478. // Example: example.com.
  479. Id string `json:"id,omitempty"`
  480. // Name: Full path to the AuthorizedDomain resource in the API. Example:
  481. // apps/myapp/authorizedDomains/example.com.@OutputOnly
  482. Name string `json:"name,omitempty"`
  483. // ForceSendFields is a list of field names (e.g. "Id") to
  484. // unconditionally include in API requests. By default, fields with
  485. // empty values are omitted from API requests. However, any non-pointer,
  486. // non-interface field appearing in ForceSendFields will be sent to the
  487. // server regardless of whether the field is empty or not. This may be
  488. // used to include empty fields in Patch requests.
  489. ForceSendFields []string `json:"-"`
  490. // NullFields is a list of field names (e.g. "Id") to include in API
  491. // requests with the JSON null value. By default, fields with empty
  492. // values are omitted from API requests. However, any field with an
  493. // empty value appearing in NullFields will be sent to the server as
  494. // null. It is an error if a field in this list has a non-empty value.
  495. // This may be used to include null fields in Patch requests.
  496. NullFields []string `json:"-"`
  497. }
  498. func (s *AuthorizedDomain) MarshalJSON() ([]byte, error) {
  499. type NoMethod AuthorizedDomain
  500. raw := NoMethod(*s)
  501. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  502. }
  503. // AutomaticScaling: Automatic scaling is based on request rate,
  504. // response latencies, and other application metrics.
  505. type AutomaticScaling struct {
  506. // CoolDownPeriod: The time period that the Autoscaler
  507. // (https://cloud.google.com/compute/docs/autoscaler/) should wait
  508. // before it starts collecting information from a new instance. This
  509. // prevents the autoscaler from collecting information when the instance
  510. // is initializing, during which the collected usage would not be
  511. // reliable. Only applicable in the App Engine flexible environment.
  512. CoolDownPeriod string `json:"coolDownPeriod,omitempty"`
  513. // CpuUtilization: Target scaling by CPU usage.
  514. CpuUtilization *CpuUtilization `json:"cpuUtilization,omitempty"`
  515. // CustomMetrics: Target scaling by user-provided metrics.
  516. CustomMetrics []*CustomMetric `json:"customMetrics,omitempty"`
  517. // DiskUtilization: Target scaling by disk usage.
  518. DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"`
  519. // MaxConcurrentRequests: Number of concurrent requests an automatic
  520. // scaling instance can accept before the scheduler spawns a new
  521. // instance.Defaults to a runtime-specific value.
  522. MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"`
  523. // MaxIdleInstances: Maximum number of idle instances that should be
  524. // maintained for this version.
  525. MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"`
  526. // MaxPendingLatency: Maximum amount of time that a request should wait
  527. // in the pending queue before starting a new instance to handle it.
  528. MaxPendingLatency string `json:"maxPendingLatency,omitempty"`
  529. // MaxTotalInstances: Maximum number of instances that should be started
  530. // to handle requests for this version.
  531. MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"`
  532. // MinIdleInstances: Minimum number of idle instances that should be
  533. // maintained for this version. Only applicable for the default version
  534. // of a service.
  535. MinIdleInstances int64 `json:"minIdleInstances,omitempty"`
  536. // MinPendingLatency: Minimum amount of time a request should wait in
  537. // the pending queue before starting a new instance to handle it.
  538. MinPendingLatency string `json:"minPendingLatency,omitempty"`
  539. // MinTotalInstances: Minimum number of running instances that should be
  540. // maintained for this version.
  541. MinTotalInstances int64 `json:"minTotalInstances,omitempty"`
  542. // NetworkUtilization: Target scaling by network usage.
  543. NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"`
  544. // RequestUtilization: Target scaling by request utilization.
  545. RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"`
  546. // StandardSchedulerSettings: Scheduler settings for standard
  547. // environment.
  548. StandardSchedulerSettings *StandardSchedulerSettings `json:"standardSchedulerSettings,omitempty"`
  549. // ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to
  550. // unconditionally include in API requests. By default, fields with
  551. // empty values are omitted from API requests. However, any non-pointer,
  552. // non-interface field appearing in ForceSendFields will be sent to the
  553. // server regardless of whether the field is empty or not. This may be
  554. // used to include empty fields in Patch requests.
  555. ForceSendFields []string `json:"-"`
  556. // NullFields is a list of field names (e.g. "CoolDownPeriod") to
  557. // include in API requests with the JSON null value. By default, fields
  558. // with empty values are omitted from API requests. However, any field
  559. // with an empty value appearing in NullFields will be sent to the
  560. // server as null. It is an error if a field in this list has a
  561. // non-empty value. This may be used to include null fields in Patch
  562. // requests.
  563. NullFields []string `json:"-"`
  564. }
  565. func (s *AutomaticScaling) MarshalJSON() ([]byte, error) {
  566. type NoMethod AutomaticScaling
  567. raw := NoMethod(*s)
  568. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  569. }
  570. // BasicScaling: A service with basic scaling will create an instance
  571. // when the application receives a request. The instance will be turned
  572. // down when the app becomes idle. Basic scaling is ideal for work that
  573. // is intermittent or driven by user activity.
  574. type BasicScaling struct {
  575. // IdleTimeout: Duration of time after the last request that an instance
  576. // must wait before the instance is shut down.
  577. IdleTimeout string `json:"idleTimeout,omitempty"`
  578. // MaxInstances: Maximum number of instances to create for this version.
  579. MaxInstances int64 `json:"maxInstances,omitempty"`
  580. // ForceSendFields is a list of field names (e.g. "IdleTimeout") to
  581. // unconditionally include in API requests. By default, fields with
  582. // empty values are omitted from API requests. However, any non-pointer,
  583. // non-interface field appearing in ForceSendFields will be sent to the
  584. // server regardless of whether the field is empty or not. This may be
  585. // used to include empty fields in Patch requests.
  586. ForceSendFields []string `json:"-"`
  587. // NullFields is a list of field names (e.g. "IdleTimeout") to include
  588. // in API requests with the JSON null value. By default, fields with
  589. // empty values are omitted from API requests. However, any field with
  590. // an empty value appearing in NullFields will be sent to the server as
  591. // null. It is an error if a field in this list has a non-empty value.
  592. // This may be used to include null fields in Patch requests.
  593. NullFields []string `json:"-"`
  594. }
  595. func (s *BasicScaling) MarshalJSON() ([]byte, error) {
  596. type NoMethod BasicScaling
  597. raw := NoMethod(*s)
  598. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  599. }
  600. // BatchUpdateIngressRulesRequest: Request message for
  601. // Firewall.BatchUpdateIngressRules.
  602. type BatchUpdateIngressRulesRequest struct {
  603. // IngressRules: A list of FirewallRules to replace the existing set.
  604. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  605. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  606. // unconditionally include in API requests. By default, fields with
  607. // empty values are omitted from API requests. However, any non-pointer,
  608. // non-interface field appearing in ForceSendFields will be sent to the
  609. // server regardless of whether the field is empty or not. This may be
  610. // used to include empty fields in Patch requests.
  611. ForceSendFields []string `json:"-"`
  612. // NullFields is a list of field names (e.g. "IngressRules") to include
  613. // in API requests with the JSON null value. By default, fields with
  614. // empty values are omitted from API requests. However, any field with
  615. // an empty value appearing in NullFields will be sent to the server as
  616. // null. It is an error if a field in this list has a non-empty value.
  617. // This may be used to include null fields in Patch requests.
  618. NullFields []string `json:"-"`
  619. }
  620. func (s *BatchUpdateIngressRulesRequest) MarshalJSON() ([]byte, error) {
  621. type NoMethod BatchUpdateIngressRulesRequest
  622. raw := NoMethod(*s)
  623. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  624. }
  625. // BatchUpdateIngressRulesResponse: Response message for
  626. // Firewall.UpdateAllIngressRules.
  627. type BatchUpdateIngressRulesResponse struct {
  628. // IngressRules: The full list of ingress FirewallRules for this
  629. // application.
  630. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  631. // ServerResponse contains the HTTP response code and headers from the
  632. // server.
  633. googleapi.ServerResponse `json:"-"`
  634. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  635. // unconditionally include in API requests. By default, fields with
  636. // empty values are omitted from API requests. However, any non-pointer,
  637. // non-interface field appearing in ForceSendFields will be sent to the
  638. // server regardless of whether the field is empty or not. This may be
  639. // used to include empty fields in Patch requests.
  640. ForceSendFields []string `json:"-"`
  641. // NullFields is a list of field names (e.g. "IngressRules") to include
  642. // in API requests with the JSON null value. By default, fields with
  643. // empty values are omitted from API requests. However, any field with
  644. // an empty value appearing in NullFields will be sent to the server as
  645. // null. It is an error if a field in this list has a non-empty value.
  646. // This may be used to include null fields in Patch requests.
  647. NullFields []string `json:"-"`
  648. }
  649. func (s *BatchUpdateIngressRulesResponse) MarshalJSON() ([]byte, error) {
  650. type NoMethod BatchUpdateIngressRulesResponse
  651. raw := NoMethod(*s)
  652. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  653. }
  654. // BuildInfo: Google Cloud Build information.
  655. type BuildInfo struct {
  656. // CloudBuildId: The Google Cloud Build id. Example:
  657. // "f966068f-08b2-42c8-bdfe-74137dff2bf9"
  658. CloudBuildId string `json:"cloudBuildId,omitempty"`
  659. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  660. // unconditionally include in API requests. By default, fields with
  661. // empty values are omitted from API requests. However, any non-pointer,
  662. // non-interface field appearing in ForceSendFields will be sent to the
  663. // server regardless of whether the field is empty or not. This may be
  664. // used to include empty fields in Patch requests.
  665. ForceSendFields []string `json:"-"`
  666. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  667. // in API requests with the JSON null value. By default, fields with
  668. // empty values are omitted from API requests. However, any field with
  669. // an empty value appearing in NullFields will be sent to the server as
  670. // null. It is an error if a field in this list has a non-empty value.
  671. // This may be used to include null fields in Patch requests.
  672. NullFields []string `json:"-"`
  673. }
  674. func (s *BuildInfo) MarshalJSON() ([]byte, error) {
  675. type NoMethod BuildInfo
  676. raw := NoMethod(*s)
  677. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  678. }
  679. // CertificateRawData: An SSL certificate obtained from a certificate
  680. // authority.
  681. type CertificateRawData struct {
  682. // PrivateKey: Unencrypted PEM encoded RSA private key. This field is
  683. // set once on certificate creation and then encrypted. The key size
  684. // must be 2048 bits or fewer. Must include the header and footer.
  685. // Example: <pre> -----BEGIN RSA PRIVATE KEY-----
  686. // <unencrypted_key_value> -----END RSA PRIVATE KEY----- </pre>
  687. // @InputOnly
  688. PrivateKey string `json:"privateKey,omitempty"`
  689. // PublicCertificate: PEM encoded x.509 public key certificate. This
  690. // field is set once on certificate creation. Must include the header
  691. // and footer. Example: <pre> -----BEGIN CERTIFICATE-----
  692. // <certificate_value> -----END CERTIFICATE----- </pre>
  693. PublicCertificate string `json:"publicCertificate,omitempty"`
  694. // ForceSendFields is a list of field names (e.g. "PrivateKey") to
  695. // unconditionally include in API requests. By default, fields with
  696. // empty values are omitted from API requests. However, any non-pointer,
  697. // non-interface field appearing in ForceSendFields will be sent to the
  698. // server regardless of whether the field is empty or not. This may be
  699. // used to include empty fields in Patch requests.
  700. ForceSendFields []string `json:"-"`
  701. // NullFields is a list of field names (e.g. "PrivateKey") to include in
  702. // API requests with the JSON null value. By default, fields with empty
  703. // values are omitted from API requests. However, any field with an
  704. // empty value appearing in NullFields will be sent to the server as
  705. // null. It is an error if a field in this list has a non-empty value.
  706. // This may be used to include null fields in Patch requests.
  707. NullFields []string `json:"-"`
  708. }
  709. func (s *CertificateRawData) MarshalJSON() ([]byte, error) {
  710. type NoMethod CertificateRawData
  711. raw := NoMethod(*s)
  712. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  713. }
  714. // CloudBuildOptions: Options for the build operations performed as a
  715. // part of the version deployment. Only applicable for App Engine
  716. // flexible environment when creating a version using source code
  717. // directly.
  718. type CloudBuildOptions struct {
  719. // AppYamlPath: Path to the yaml file used in deployment, used to
  720. // determine runtime configuration details.Required for flexible
  721. // environment builds.See
  722. // https://cloud.google.com/appengine/docs/standard/python/config/appref
  723. // for more details.
  724. AppYamlPath string `json:"appYamlPath,omitempty"`
  725. // CloudBuildTimeout: The Cloud Build timeout used as part of any
  726. // dependent builds performed by version creation. Defaults to 10
  727. // minutes.
  728. CloudBuildTimeout string `json:"cloudBuildTimeout,omitempty"`
  729. // ForceSendFields is a list of field names (e.g. "AppYamlPath") to
  730. // unconditionally include in API requests. By default, fields with
  731. // empty values are omitted from API requests. However, any non-pointer,
  732. // non-interface field appearing in ForceSendFields will be sent to the
  733. // server regardless of whether the field is empty or not. This may be
  734. // used to include empty fields in Patch requests.
  735. ForceSendFields []string `json:"-"`
  736. // NullFields is a list of field names (e.g. "AppYamlPath") to include
  737. // in API requests with the JSON null value. By default, fields with
  738. // empty values are omitted from API requests. However, any field with
  739. // an empty value appearing in NullFields will be sent to the server as
  740. // null. It is an error if a field in this list has a non-empty value.
  741. // This may be used to include null fields in Patch requests.
  742. NullFields []string `json:"-"`
  743. }
  744. func (s *CloudBuildOptions) MarshalJSON() ([]byte, error) {
  745. type NoMethod CloudBuildOptions
  746. raw := NoMethod(*s)
  747. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  748. }
  749. // ContainerInfo: Docker image that is used to create a container and
  750. // start a VM instance for the version that you deploy. Only applicable
  751. // for instances running in the App Engine flexible environment.
  752. type ContainerInfo struct {
  753. // Image: URI to the hosted container image in Google Container
  754. // Registry. The URI must be fully qualified and include a tag or
  755. // digest. Examples: "gcr.io/my-project/image:tag" or
  756. // "gcr.io/my-project/image@digest"
  757. Image string `json:"image,omitempty"`
  758. // ForceSendFields is a list of field names (e.g. "Image") to
  759. // unconditionally include in API requests. By default, fields with
  760. // empty values are omitted from API requests. However, any non-pointer,
  761. // non-interface field appearing in ForceSendFields will be sent to the
  762. // server regardless of whether the field is empty or not. This may be
  763. // used to include empty fields in Patch requests.
  764. ForceSendFields []string `json:"-"`
  765. // NullFields is a list of field names (e.g. "Image") to include in API
  766. // requests with the JSON null value. By default, fields with empty
  767. // values are omitted from API requests. However, any field with an
  768. // empty value appearing in NullFields will be sent to the server as
  769. // null. It is an error if a field in this list has a non-empty value.
  770. // This may be used to include null fields in Patch requests.
  771. NullFields []string `json:"-"`
  772. }
  773. func (s *ContainerInfo) MarshalJSON() ([]byte, error) {
  774. type NoMethod ContainerInfo
  775. raw := NoMethod(*s)
  776. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  777. }
  778. // CpuUtilization: Target scaling by CPU usage.
  779. type CpuUtilization struct {
  780. // AggregationWindowLength: Period of time over which CPU utilization is
  781. // calculated.
  782. AggregationWindowLength string `json:"aggregationWindowLength,omitempty"`
  783. // TargetUtilization: Target CPU utilization ratio to maintain when
  784. // scaling. Must be between 0 and 1.
  785. TargetUtilization float64 `json:"targetUtilization,omitempty"`
  786. // ForceSendFields is a list of field names (e.g.
  787. // "AggregationWindowLength") to unconditionally include in API
  788. // requests. By default, fields with empty values are omitted from API
  789. // requests. However, any non-pointer, non-interface field appearing in
  790. // ForceSendFields will be sent to the server regardless of whether the
  791. // field is empty or not. This may be used to include empty fields in
  792. // Patch requests.
  793. ForceSendFields []string `json:"-"`
  794. // NullFields is a list of field names (e.g. "AggregationWindowLength")
  795. // to include in API requests with the JSON null value. By default,
  796. // fields with empty values are omitted from API requests. However, any
  797. // field with an empty value appearing in NullFields will be sent to the
  798. // server as null. It is an error if a field in this list has a
  799. // non-empty value. This may be used to include null fields in Patch
  800. // requests.
  801. NullFields []string `json:"-"`
  802. }
  803. func (s *CpuUtilization) MarshalJSON() ([]byte, error) {
  804. type NoMethod CpuUtilization
  805. raw := NoMethod(*s)
  806. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  807. }
  808. func (s *CpuUtilization) UnmarshalJSON(data []byte) error {
  809. type NoMethod CpuUtilization
  810. var s1 struct {
  811. TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"`
  812. *NoMethod
  813. }
  814. s1.NoMethod = (*NoMethod)(s)
  815. if err := json.Unmarshal(data, &s1); err != nil {
  816. return err
  817. }
  818. s.TargetUtilization = float64(s1.TargetUtilization)
  819. return nil
  820. }
  821. // CreateVersionMetadataV1: Metadata for the given
  822. // google.longrunning.Operation during a
  823. // google.appengine.v1.CreateVersionRequest.
  824. type CreateVersionMetadataV1 struct {
  825. // CloudBuildId: The Cloud Build ID if one was created as part of the
  826. // version create. @OutputOnly
  827. CloudBuildId string `json:"cloudBuildId,omitempty"`
  828. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  829. // unconditionally include in API requests. By default, fields with
  830. // empty values are omitted from API requests. However, any non-pointer,
  831. // non-interface field appearing in ForceSendFields will be sent to the
  832. // server regardless of whether the field is empty or not. This may be
  833. // used to include empty fields in Patch requests.
  834. ForceSendFields []string `json:"-"`
  835. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  836. // in API requests with the JSON null value. By default, fields with
  837. // empty values are omitted from API requests. However, any field with
  838. // an empty value appearing in NullFields will be sent to the server as
  839. // null. It is an error if a field in this list has a non-empty value.
  840. // This may be used to include null fields in Patch requests.
  841. NullFields []string `json:"-"`
  842. }
  843. func (s *CreateVersionMetadataV1) MarshalJSON() ([]byte, error) {
  844. type NoMethod CreateVersionMetadataV1
  845. raw := NoMethod(*s)
  846. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  847. }
  848. // CreateVersionMetadataV1Alpha: Metadata for the given
  849. // google.longrunning.Operation during a
  850. // google.appengine.v1alpha.CreateVersionRequest.
  851. type CreateVersionMetadataV1Alpha struct {
  852. // CloudBuildId: The Cloud Build ID if one was created as part of the
  853. // version create. @OutputOnly
  854. CloudBuildId string `json:"cloudBuildId,omitempty"`
  855. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  856. // unconditionally include in API requests. By default, fields with
  857. // empty values are omitted from API requests. However, any non-pointer,
  858. // non-interface field appearing in ForceSendFields will be sent to the
  859. // server regardless of whether the field is empty or not. This may be
  860. // used to include empty fields in Patch requests.
  861. ForceSendFields []string `json:"-"`
  862. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  863. // in API requests with the JSON null value. By default, fields with
  864. // empty values are omitted from API requests. However, any field with
  865. // an empty value appearing in NullFields will be sent to the server as
  866. // null. It is an error if a field in this list has a non-empty value.
  867. // This may be used to include null fields in Patch requests.
  868. NullFields []string `json:"-"`
  869. }
  870. func (s *CreateVersionMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  871. type NoMethod CreateVersionMetadataV1Alpha
  872. raw := NoMethod(*s)
  873. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  874. }
  875. // CreateVersionMetadataV1Beta: Metadata for the given
  876. // google.longrunning.Operation during a
  877. // google.appengine.v1beta.CreateVersionRequest.
  878. type CreateVersionMetadataV1Beta struct {
  879. // CloudBuildId: The Cloud Build ID if one was created as part of the
  880. // version create. @OutputOnly
  881. CloudBuildId string `json:"cloudBuildId,omitempty"`
  882. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  883. // unconditionally include in API requests. By default, fields with
  884. // empty values are omitted from API requests. However, any non-pointer,
  885. // non-interface field appearing in ForceSendFields will be sent to the
  886. // server regardless of whether the field is empty or not. This may be
  887. // used to include empty fields in Patch requests.
  888. ForceSendFields []string `json:"-"`
  889. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  890. // in API requests with the JSON null value. By default, fields with
  891. // empty values are omitted from API requests. However, any field with
  892. // an empty value appearing in NullFields will be sent to the server as
  893. // null. It is an error if a field in this list has a non-empty value.
  894. // This may be used to include null fields in Patch requests.
  895. NullFields []string `json:"-"`
  896. }
  897. func (s *CreateVersionMetadataV1Beta) MarshalJSON() ([]byte, error) {
  898. type NoMethod CreateVersionMetadataV1Beta
  899. raw := NoMethod(*s)
  900. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  901. }
  902. // CustomMetric: Allows autoscaling based on Stackdriver metrics.
  903. type CustomMetric struct {
  904. // Filter: Allows filtering on the metric's fields.
  905. Filter string `json:"filter,omitempty"`
  906. // MetricName: The name of the metric.
  907. MetricName string `json:"metricName,omitempty"`
  908. // SingleInstanceAssignment: May be used instead of target_utilization
  909. // when an instance can handle a specific amount of work/resources and
  910. // the metric value is equal to the current amount of work remaining.
  911. // The autoscaler will try to keep the number of instances equal to the
  912. // metric value divided by single_instance_assignment.
  913. SingleInstanceAssignment float64 `json:"singleInstanceAssignment,omitempty"`
  914. // TargetType: The type of the metric. Must be a string representing a
  915. // Stackdriver metric type e.g. GAGUE, DELTA_PER_SECOND, etc.
  916. TargetType string `json:"targetType,omitempty"`
  917. // TargetUtilization: The target value for the metric.
  918. TargetUtilization float64 `json:"targetUtilization,omitempty"`
  919. // ForceSendFields is a list of field names (e.g. "Filter") to
  920. // unconditionally include in API requests. By default, fields with
  921. // empty values are omitted from API requests. However, any non-pointer,
  922. // non-interface field appearing in ForceSendFields will be sent to the
  923. // server regardless of whether the field is empty or not. This may be
  924. // used to include empty fields in Patch requests.
  925. ForceSendFields []string `json:"-"`
  926. // NullFields is a list of field names (e.g. "Filter") to include in API
  927. // requests with the JSON null value. By default, fields with empty
  928. // values are omitted from API requests. However, any field with an
  929. // empty value appearing in NullFields will be sent to the server as
  930. // null. It is an error if a field in this list has a non-empty value.
  931. // This may be used to include null fields in Patch requests.
  932. NullFields []string `json:"-"`
  933. }
  934. func (s *CustomMetric) MarshalJSON() ([]byte, error) {
  935. type NoMethod CustomMetric
  936. raw := NoMethod(*s)
  937. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  938. }
  939. func (s *CustomMetric) UnmarshalJSON(data []byte) error {
  940. type NoMethod CustomMetric
  941. var s1 struct {
  942. SingleInstanceAssignment gensupport.JSONFloat64 `json:"singleInstanceAssignment"`
  943. TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"`
  944. *NoMethod
  945. }
  946. s1.NoMethod = (*NoMethod)(s)
  947. if err := json.Unmarshal(data, &s1); err != nil {
  948. return err
  949. }
  950. s.SingleInstanceAssignment = float64(s1.SingleInstanceAssignment)
  951. s.TargetUtilization = float64(s1.TargetUtilization)
  952. return nil
  953. }
  954. // DebugInstanceRequest: Request message for Instances.DebugInstance.
  955. type DebugInstanceRequest struct {
  956. // SshKey: Public SSH key to add to the instance.
  957. // Examples:
  958. // [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]
  959. // [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh
  960. // {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more
  961. // information, see Adding and Removing SSH Keys
  962. // (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-k
  963. // eys).
  964. SshKey string `json:"sshKey,omitempty"`
  965. // ForceSendFields is a list of field names (e.g. "SshKey") to
  966. // unconditionally include in API requests. By default, fields with
  967. // empty values are omitted from API requests. However, any non-pointer,
  968. // non-interface field appearing in ForceSendFields will be sent to the
  969. // server regardless of whether the field is empty or not. This may be
  970. // used to include empty fields in Patch requests.
  971. ForceSendFields []string `json:"-"`
  972. // NullFields is a list of field names (e.g. "SshKey") to include in API
  973. // requests with the JSON null value. By default, fields with empty
  974. // values are omitted from API requests. However, any field with an
  975. // empty value appearing in NullFields will be sent to the server as
  976. // null. It is an error if a field in this list has a non-empty value.
  977. // This may be used to include null fields in Patch requests.
  978. NullFields []string `json:"-"`
  979. }
  980. func (s *DebugInstanceRequest) MarshalJSON() ([]byte, error) {
  981. type NoMethod DebugInstanceRequest
  982. raw := NoMethod(*s)
  983. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  984. }
  985. // Deployment: Code and application artifacts used to deploy a version
  986. // to App Engine.
  987. type Deployment struct {
  988. // Build: Google Cloud Build build information. Only applicable for
  989. // instances running in the App Engine flexible environment.
  990. Build *BuildInfo `json:"build,omitempty"`
  991. // CloudBuildOptions: Options for any Google Cloud Build builds created
  992. // as a part of this deployment.These options will only be used if a new
  993. // build is created, such as when deploying to the App Engine flexible
  994. // environment using files or zip.
  995. CloudBuildOptions *CloudBuildOptions `json:"cloudBuildOptions,omitempty"`
  996. // Container: The Docker image for the container that runs the version.
  997. // Only applicable for instances running in the App Engine flexible
  998. // environment.
  999. Container *ContainerInfo `json:"container,omitempty"`
  1000. // Files: Manifest of the files stored in Google Cloud Storage that are
  1001. // included as part of this version. All files must be readable using
  1002. // the credentials supplied with this call.
  1003. Files map[string]FileInfo `json:"files,omitempty"`
  1004. // Zip: The zip file for this deployment, if this is a zip deployment.
  1005. Zip *ZipInfo `json:"zip,omitempty"`
  1006. // ForceSendFields is a list of field names (e.g. "Build") to
  1007. // unconditionally include in API requests. By default, fields with
  1008. // empty values are omitted from API requests. However, any non-pointer,
  1009. // non-interface field appearing in ForceSendFields will be sent to the
  1010. // server regardless of whether the field is empty or not. This may be
  1011. // used to include empty fields in Patch requests.
  1012. ForceSendFields []string `json:"-"`
  1013. // NullFields is a list of field names (e.g. "Build") to include in API
  1014. // requests with the JSON null value. By default, fields with empty
  1015. // values are omitted from API requests. However, any field with an
  1016. // empty value appearing in NullFields will be sent to the server as
  1017. // null. It is an error if a field in this list has a non-empty value.
  1018. // This may be used to include null fields in Patch requests.
  1019. NullFields []string `json:"-"`
  1020. }
  1021. func (s *Deployment) MarshalJSON() ([]byte, error) {
  1022. type NoMethod Deployment
  1023. raw := NoMethod(*s)
  1024. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1025. }
  1026. // DiskUtilization: Target scaling by disk usage. Only applicable in the
  1027. // App Engine flexible environment.
  1028. type DiskUtilization struct {
  1029. // TargetReadBytesPerSecond: Target bytes read per second.
  1030. TargetReadBytesPerSecond int64 `json:"targetReadBytesPerSecond,omitempty"`
  1031. // TargetReadOpsPerSecond: Target ops read per seconds.
  1032. TargetReadOpsPerSecond int64 `json:"targetReadOpsPerSecond,omitempty"`
  1033. // TargetWriteBytesPerSecond: Target bytes written per second.
  1034. TargetWriteBytesPerSecond int64 `json:"targetWriteBytesPerSecond,omitempty"`
  1035. // TargetWriteOpsPerSecond: Target ops written per second.
  1036. TargetWriteOpsPerSecond int64 `json:"targetWriteOpsPerSecond,omitempty"`
  1037. // ForceSendFields is a list of field names (e.g.
  1038. // "TargetReadBytesPerSecond") to unconditionally include in API
  1039. // requests. By default, fields with empty values are omitted from API
  1040. // requests. However, any non-pointer, non-interface field appearing in
  1041. // ForceSendFields will be sent to the server regardless of whether the
  1042. // field is empty or not. This may be used to include empty fields in
  1043. // Patch requests.
  1044. ForceSendFields []string `json:"-"`
  1045. // NullFields is a list of field names (e.g. "TargetReadBytesPerSecond")
  1046. // to include in API requests with the JSON null value. By default,
  1047. // fields with empty values are omitted from API requests. However, any
  1048. // field with an empty value appearing in NullFields will be sent to the
  1049. // server as null. It is an error if a field in this list has a
  1050. // non-empty value. This may be used to include null fields in Patch
  1051. // requests.
  1052. NullFields []string `json:"-"`
  1053. }
  1054. func (s *DiskUtilization) MarshalJSON() ([]byte, error) {
  1055. type NoMethod DiskUtilization
  1056. raw := NoMethod(*s)
  1057. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1058. }
  1059. // DomainMapping: A domain serving an App Engine application.
  1060. type DomainMapping struct {
  1061. // Id: Relative name of the domain serving the application. Example:
  1062. // example.com.
  1063. Id string `json:"id,omitempty"`
  1064. // Name: Full path to the DomainMapping resource in the API. Example:
  1065. // apps/myapp/domainMapping/example.com.@OutputOnly
  1066. Name string `json:"name,omitempty"`
  1067. // ResourceRecords: The resource records required to configure this
  1068. // domain mapping. These records must be added to the domain's DNS
  1069. // configuration in order to serve the application via this domain
  1070. // mapping.@OutputOnly
  1071. ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"`
  1072. // SslSettings: SSL configuration for this domain. If unconfigured, this
  1073. // domain will not serve with SSL.
  1074. SslSettings *SslSettings `json:"sslSettings,omitempty"`
  1075. // ServerResponse contains the HTTP response code and headers from the
  1076. // server.
  1077. googleapi.ServerResponse `json:"-"`
  1078. // ForceSendFields is a list of field names (e.g. "Id") to
  1079. // unconditionally include in API requests. By default, fields with
  1080. // empty values are omitted from API requests. However, any non-pointer,
  1081. // non-interface field appearing in ForceSendFields will be sent to the
  1082. // server regardless of whether the field is empty or not. This may be
  1083. // used to include empty fields in Patch requests.
  1084. ForceSendFields []string `json:"-"`
  1085. // NullFields is a list of field names (e.g. "Id") to include in API
  1086. // requests with the JSON null value. By default, fields with empty
  1087. // values are omitted from API requests. However, any field with an
  1088. // empty value appearing in NullFields will be sent to the server as
  1089. // null. It is an error if a field in this list has a non-empty value.
  1090. // This may be used to include null fields in Patch requests.
  1091. NullFields []string `json:"-"`
  1092. }
  1093. func (s *DomainMapping) MarshalJSON() ([]byte, error) {
  1094. type NoMethod DomainMapping
  1095. raw := NoMethod(*s)
  1096. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1097. }
  1098. // Empty: A generic empty message that you can re-use to avoid defining
  1099. // duplicated empty messages in your APIs. A typical example is to use
  1100. // it as the request or the response type of an API method. For
  1101. // instance:
  1102. // service Foo {
  1103. // rpc Bar(google.protobuf.Empty) returns
  1104. // (google.protobuf.Empty);
  1105. // }
  1106. // The JSON representation for Empty is empty JSON object {}.
  1107. type Empty struct {
  1108. // ServerResponse contains the HTTP response code and headers from the
  1109. // server.
  1110. googleapi.ServerResponse `json:"-"`
  1111. }
  1112. // EndpointsApiService: Cloud Endpoints
  1113. // (https://cloud.google.com/endpoints) configuration. The Endpoints API
  1114. // Service provides tooling for serving Open API and gRPC endpoints via
  1115. // an NGINX proxy. Only valid for App Engine Flexible environment
  1116. // deployments.The fields here refer to the name and configuration ID of
  1117. // a "service" resource in the Service Management API
  1118. // (https://cloud.google.com/service-management/overview).
  1119. type EndpointsApiService struct {
  1120. // ConfigId: Endpoints service configuration ID as specified by the
  1121. // Service Management API. For example "2016-09-19r1".By default, the
  1122. // rollout strategy for Endpoints is RolloutStrategy.FIXED. This means
  1123. // that Endpoints starts up with a particular configuration ID. When a
  1124. // new configuration is rolled out, Endpoints must be given the new
  1125. // configuration ID. The config_id field is used to give the
  1126. // configuration ID and is required in this case.Endpoints also has a
  1127. // rollout strategy called RolloutStrategy.MANAGED. When using this,
  1128. // Endpoints fetches the latest configuration and does not need the
  1129. // configuration ID. In this case, config_id must be omitted.
  1130. ConfigId string `json:"configId,omitempty"`
  1131. // DisableTraceSampling: Enable or disable trace sampling. By default,
  1132. // this is set to false for enabled.
  1133. DisableTraceSampling bool `json:"disableTraceSampling,omitempty"`
  1134. // Name: Endpoints service name which is the name of the "service"
  1135. // resource in the Service Management API. For example
  1136. // "myapi.endpoints.myproject.cloud.goog"
  1137. Name string `json:"name,omitempty"`
  1138. // RolloutStrategy: Endpoints rollout strategy. If FIXED, config_id must
  1139. // be specified. If MANAGED, config_id must be omitted.
  1140. //
  1141. // Possible values:
  1142. // "UNSPECIFIED_ROLLOUT_STRATEGY" - Not specified. Defaults to FIXED.
  1143. // "FIXED" - Endpoints service configuration ID will be fixed to the
  1144. // configuration ID specified by config_id.
  1145. // "MANAGED" - Endpoints service configuration ID will be updated with
  1146. // each rollout.
  1147. RolloutStrategy string `json:"rolloutStrategy,omitempty"`
  1148. // ForceSendFields is a list of field names (e.g. "ConfigId") to
  1149. // unconditionally include in API requests. By default, fields with
  1150. // empty values are omitted from API requests. However, any non-pointer,
  1151. // non-interface field appearing in ForceSendFields will be sent to the
  1152. // server regardless of whether the field is empty or not. This may be
  1153. // used to include empty fields in Patch requests.
  1154. ForceSendFields []string `json:"-"`
  1155. // NullFields is a list of field names (e.g. "ConfigId") to include in
  1156. // API requests with the JSON null value. By default, fields with empty
  1157. // values are omitted from API requests. However, any field with an
  1158. // empty value appearing in NullFields will be sent to the server as
  1159. // null. It is an error if a field in this list has a non-empty value.
  1160. // This may be used to include null fields in Patch requests.
  1161. NullFields []string `json:"-"`
  1162. }
  1163. func (s *EndpointsApiService) MarshalJSON() ([]byte, error) {
  1164. type NoMethod EndpointsApiService
  1165. raw := NoMethod(*s)
  1166. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1167. }
  1168. // Entrypoint: The entrypoint for the application.
  1169. type Entrypoint struct {
  1170. // Shell: The format should be a shell command that can be fed to bash
  1171. // -c.
  1172. Shell string `json:"shell,omitempty"`
  1173. // ForceSendFields is a list of field names (e.g. "Shell") to
  1174. // unconditionally include in API requests. By default, fields with
  1175. // empty values are omitted from API requests. However, any non-pointer,
  1176. // non-interface field appearing in ForceSendFields will be sent to the
  1177. // server regardless of whether the field is empty or not. This may be
  1178. // used to include empty fields in Patch requests.
  1179. ForceSendFields []string `json:"-"`
  1180. // NullFields is a list of field names (e.g. "Shell") to include in API
  1181. // requests with the JSON null value. By default, fields with empty
  1182. // values are omitted from API requests. However, any field with an
  1183. // empty value appearing in NullFields will be sent to the server as
  1184. // null. It is an error if a field in this list has a non-empty value.
  1185. // This may be used to include null fields in Patch requests.
  1186. NullFields []string `json:"-"`
  1187. }
  1188. func (s *Entrypoint) MarshalJSON() ([]byte, error) {
  1189. type NoMethod Entrypoint
  1190. raw := NoMethod(*s)
  1191. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1192. }
  1193. // ErrorHandler: Custom static error page to be served when an error
  1194. // occurs.
  1195. type ErrorHandler struct {
  1196. // ErrorCode: Error condition this handler applies to.
  1197. //
  1198. // Possible values:
  1199. // "ERROR_CODE_UNSPECIFIED" - Not specified. ERROR_CODE_DEFAULT is
  1200. // assumed.
  1201. // "ERROR_CODE_DEFAULT" - All other error types.
  1202. // "ERROR_CODE_OVER_QUOTA" - Application has exceeded a resource
  1203. // quota.
  1204. // "ERROR_CODE_DOS_API_DENIAL" - Client blocked by the application's
  1205. // Denial of Service protection configuration.
  1206. // "ERROR_CODE_TIMEOUT" - Deadline reached before the application
  1207. // responds.
  1208. ErrorCode string `json:"errorCode,omitempty"`
  1209. // MimeType: MIME type of file. Defaults to text/html.
  1210. MimeType string `json:"mimeType,omitempty"`
  1211. // StaticFile: Static file content to be served for this error.
  1212. StaticFile string `json:"staticFile,omitempty"`
  1213. // ForceSendFields is a list of field names (e.g. "ErrorCode") to
  1214. // unconditionally include in API requests. By default, fields with
  1215. // empty values are omitted from API requests. However, any non-pointer,
  1216. // non-interface field appearing in ForceSendFields will be sent to the
  1217. // server regardless of whether the field is empty or not. This may be
  1218. // used to include empty fields in Patch requests.
  1219. ForceSendFields []string `json:"-"`
  1220. // NullFields is a list of field names (e.g. "ErrorCode") to include in
  1221. // API requests with the JSON null value. By default, fields with empty
  1222. // values are omitted from API requests. However, any field with an
  1223. // empty value appearing in NullFields will be sent to the server as
  1224. // null. It is an error if a field in this list has a non-empty value.
  1225. // This may be used to include null fields in Patch requests.
  1226. NullFields []string `json:"-"`
  1227. }
  1228. func (s *ErrorHandler) MarshalJSON() ([]byte, error) {
  1229. type NoMethod ErrorHandler
  1230. raw := NoMethod(*s)
  1231. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1232. }
  1233. // FeatureSettings: The feature specific settings to be used in the
  1234. // application. These define behaviors that are user configurable.
  1235. type FeatureSettings struct {
  1236. // SplitHealthChecks: Boolean value indicating if split health checks
  1237. // should be used instead of the legacy health checks. At an app.yaml
  1238. // level, this means defaulting to 'readiness_check' and
  1239. // 'liveness_check' values instead of 'health_check' ones. Once the
  1240. // legacy 'health_check' behavior is deprecated, and this value is
  1241. // always true, this setting can be removed.
  1242. SplitHealthChecks bool `json:"splitHealthChecks,omitempty"`
  1243. // UseContainerOptimizedOs: If true, use Container-Optimized OS
  1244. // (https://cloud.google.com/container-optimized-os/) base image for
  1245. // VMs, rather than a base Debian image.
  1246. UseContainerOptimizedOs bool `json:"useContainerOptimizedOs,omitempty"`
  1247. // ForceSendFields is a list of field names (e.g. "SplitHealthChecks")
  1248. // to unconditionally include in API requests. By default, fields with
  1249. // empty values are omitted from API requests. However, any non-pointer,
  1250. // non-interface field appearing in ForceSendFields will be sent to the
  1251. // server regardless of whether the field is empty or not. This may be
  1252. // used to include empty fields in Patch requests.
  1253. ForceSendFields []string `json:"-"`
  1254. // NullFields is a list of field names (e.g. "SplitHealthChecks") to
  1255. // include in API requests with the JSON null value. By default, fields
  1256. // with empty values are omitted from API requests. However, any field
  1257. // with an empty value appearing in NullFields will be sent to the
  1258. // server as null. It is an error if a field in this list has a
  1259. // non-empty value. This may be used to include null fields in Patch
  1260. // requests.
  1261. NullFields []string `json:"-"`
  1262. }
  1263. func (s *FeatureSettings) MarshalJSON() ([]byte, error) {
  1264. type NoMethod FeatureSettings
  1265. raw := NoMethod(*s)
  1266. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1267. }
  1268. // FileInfo: Single source file that is part of the version to be
  1269. // deployed. Each source file that is deployed must be specified
  1270. // separately.
  1271. type FileInfo struct {
  1272. // MimeType: The MIME type of the file.Defaults to the value from Google
  1273. // Cloud Storage.
  1274. MimeType string `json:"mimeType,omitempty"`
  1275. // Sha1Sum: The SHA1 hash of the file, in hex.
  1276. Sha1Sum string `json:"sha1Sum,omitempty"`
  1277. // SourceUrl: URL source to use to fetch this file. Must be a URL to a
  1278. // resource in Google Cloud Storage in the form
  1279. // 'http(s)://storage.googleapis.com/<bucket>/<object>'.
  1280. SourceUrl string `json:"sourceUrl,omitempty"`
  1281. // ForceSendFields is a list of field names (e.g. "MimeType") to
  1282. // unconditionally include in API requests. By default, fields with
  1283. // empty values are omitted from API requests. However, any non-pointer,
  1284. // non-interface field appearing in ForceSendFields will be sent to the
  1285. // server regardless of whether the field is empty or not. This may be
  1286. // used to include empty fields in Patch requests.
  1287. ForceSendFields []string `json:"-"`
  1288. // NullFields is a list of field names (e.g. "MimeType") to include in
  1289. // API requests with the JSON null value. By default, fields with empty
  1290. // values are omitted from API requests. However, any field with an
  1291. // empty value appearing in NullFields will be sent to the server as
  1292. // null. It is an error if a field in this list has a non-empty value.
  1293. // This may be used to include null fields in Patch requests.
  1294. NullFields []string `json:"-"`
  1295. }
  1296. func (s *FileInfo) MarshalJSON() ([]byte, error) {
  1297. type NoMethod FileInfo
  1298. raw := NoMethod(*s)
  1299. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1300. }
  1301. // FirewallRule: A single firewall rule that is evaluated against
  1302. // incoming traffic and provides an action to take on matched requests.
  1303. type FirewallRule struct {
  1304. // Action: The action to take on matched requests.
  1305. //
  1306. // Possible values:
  1307. // "UNSPECIFIED_ACTION"
  1308. // "ALLOW" - Matching requests are allowed.
  1309. // "DENY" - Matching requests are denied.
  1310. Action string `json:"action,omitempty"`
  1311. // Description: An optional string description of this rule. This field
  1312. // has a maximum length of 100 characters.
  1313. Description string `json:"description,omitempty"`
  1314. // Priority: A positive integer between 1, Int32.MaxValue-1 that defines
  1315. // the order of rule evaluation. Rules with the lowest priority are
  1316. // evaluated first.A default rule at priority Int32.MaxValue matches all
  1317. // IPv4 and IPv6 traffic when no previous rule matches. Only the action
  1318. // of this rule can be modified by the user.
  1319. Priority int64 `json:"priority,omitempty"`
  1320. // SourceRange: IP address or range, defined using CIDR notation, of
  1321. // requests that this rule applies to. You can use the wildcard
  1322. // character "*" to match all IPs equivalent to "0/0" and "::/0"
  1323. // together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32
  1324. // or 2001:0db8:0000:0042:0000:8a2e:0370:7334.<p>Truncation will be
  1325. // silently performed on addresses which are not properly truncated. For
  1326. // example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24.
  1327. // Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address
  1328. // as 2001:db8::/32.
  1329. SourceRange string `json:"sourceRange,omitempty"`
  1330. // ServerResponse contains the HTTP response code and headers from the
  1331. // server.
  1332. googleapi.ServerResponse `json:"-"`
  1333. // ForceSendFields is a list of field names (e.g. "Action") to
  1334. // unconditionally include in API requests. By default, fields with
  1335. // empty values are omitted from API requests. However, any non-pointer,
  1336. // non-interface field appearing in ForceSendFields will be sent to the
  1337. // server regardless of whether the field is empty or not. This may be
  1338. // used to include empty fields in Patch requests.
  1339. ForceSendFields []string `json:"-"`
  1340. // NullFields is a list of field names (e.g. "Action") to include in API
  1341. // requests with the JSON null value. By default, fields with empty
  1342. // values are omitted from API requests. However, any field with an
  1343. // empty value appearing in NullFields will be sent to the server as
  1344. // null. It is an error if a field in this list has a non-empty value.
  1345. // This may be used to include null fields in Patch requests.
  1346. NullFields []string `json:"-"`
  1347. }
  1348. func (s *FirewallRule) MarshalJSON() ([]byte, error) {
  1349. type NoMethod FirewallRule
  1350. raw := NoMethod(*s)
  1351. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1352. }
  1353. // HealthCheck: Health checking configuration for VM instances.
  1354. // Unhealthy instances are killed and replaced with new instances. Only
  1355. // applicable for instances in App Engine flexible environment.
  1356. type HealthCheck struct {
  1357. // CheckInterval: Interval between health checks.
  1358. CheckInterval string `json:"checkInterval,omitempty"`
  1359. // DisableHealthCheck: Whether to explicitly disable health checks for
  1360. // this instance.
  1361. DisableHealthCheck bool `json:"disableHealthCheck,omitempty"`
  1362. // HealthyThreshold: Number of consecutive successful health checks
  1363. // required before receiving traffic.
  1364. HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
  1365. // Host: Host header to send when performing an HTTP health check.
  1366. // Example: "myapp.appspot.com"
  1367. Host string `json:"host,omitempty"`
  1368. // RestartThreshold: Number of consecutive failed health checks required
  1369. // before an instance is restarted.
  1370. RestartThreshold int64 `json:"restartThreshold,omitempty"`
  1371. // Timeout: Time before the health check is considered failed.
  1372. Timeout string `json:"timeout,omitempty"`
  1373. // UnhealthyThreshold: Number of consecutive failed health checks
  1374. // required before removing traffic.
  1375. UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
  1376. // ForceSendFields is a list of field names (e.g. "CheckInterval") to
  1377. // unconditionally include in API requests. By default, fields with
  1378. // empty values are omitted from API requests. However, any non-pointer,
  1379. // non-interface field appearing in ForceSendFields will be sent to the
  1380. // server regardless of whether the field is empty or not. This may be
  1381. // used to include empty fields in Patch requests.
  1382. ForceSendFields []string `json:"-"`
  1383. // NullFields is a list of field names (e.g. "CheckInterval") to include
  1384. // in API requests with the JSON null value. By default, fields with
  1385. // empty values are omitted from API requests. However, any field with
  1386. // an empty value appearing in NullFields will be sent to the server as
  1387. // null. It is an error if a field in this list has a non-empty value.
  1388. // This may be used to include null fields in Patch requests.
  1389. NullFields []string `json:"-"`
  1390. }
  1391. func (s *HealthCheck) MarshalJSON() ([]byte, error) {
  1392. type NoMethod HealthCheck
  1393. raw := NoMethod(*s)
  1394. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1395. }
  1396. // IdentityAwareProxy: Identity-Aware Proxy
  1397. type IdentityAwareProxy struct {
  1398. // Enabled: Whether the serving infrastructure will authenticate and
  1399. // authorize all incoming requests.If true, the oauth2_client_id and
  1400. // oauth2_client_secret fields must be non-empty.
  1401. Enabled bool `json:"enabled,omitempty"`
  1402. // Oauth2ClientId: OAuth2 client ID to use for the authentication flow.
  1403. Oauth2ClientId string `json:"oauth2ClientId,omitempty"`
  1404. // Oauth2ClientInfo: InputOnly OAuth client info required to generate
  1405. // client id to be used for IAP.
  1406. Oauth2ClientInfo *OAuth2ClientInfo `json:"oauth2ClientInfo,omitempty"`
  1407. // Oauth2ClientSecret: OAuth2 client secret to use for the
  1408. // authentication flow.For security reasons, this value cannot be
  1409. // retrieved via the API. Instead, the SHA-256 hash of the value is
  1410. // returned in the oauth2_client_secret_sha256 field.@InputOnly
  1411. Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"`
  1412. // Oauth2ClientSecretSha256: Hex-encoded SHA-256 hash of the client
  1413. // secret.@OutputOnly
  1414. Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"`
  1415. // ForceSendFields is a list of field names (e.g. "Enabled") to
  1416. // unconditionally include in API requests. By default, fields with
  1417. // empty values are omitted from API requests. However, any non-pointer,
  1418. // non-interface field appearing in ForceSendFields will be sent to the
  1419. // server regardless of whether the field is empty or not. This may be
  1420. // used to include empty fields in Patch requests.
  1421. ForceSendFields []string `json:"-"`
  1422. // NullFields is a list of field names (e.g. "Enabled") to include in
  1423. // API requests with the JSON null value. By default, fields with empty
  1424. // values are omitted from API requests. However, any field with an
  1425. // empty value appearing in NullFields will be sent to the server as
  1426. // null. It is an error if a field in this list has a non-empty value.
  1427. // This may be used to include null fields in Patch requests.
  1428. NullFields []string `json:"-"`
  1429. }
  1430. func (s *IdentityAwareProxy) MarshalJSON() ([]byte, error) {
  1431. type NoMethod IdentityAwareProxy
  1432. raw := NoMethod(*s)
  1433. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1434. }
  1435. // Instance: An Instance resource is the computing unit that App Engine
  1436. // uses to automatically scale an application.
  1437. type Instance struct {
  1438. // AppEngineRelease: App Engine release this instance is running
  1439. // on.@OutputOnly
  1440. AppEngineRelease string `json:"appEngineRelease,omitempty"`
  1441. // Availability: Availability of the instance.@OutputOnly
  1442. //
  1443. // Possible values:
  1444. // "UNSPECIFIED"
  1445. // "RESIDENT"
  1446. // "DYNAMIC"
  1447. Availability string `json:"availability,omitempty"`
  1448. // AverageLatency: Average latency (ms) over the last minute.@OutputOnly
  1449. AverageLatency int64 `json:"averageLatency,omitempty"`
  1450. // Errors: Number of errors since this instance was started.@OutputOnly
  1451. Errors int64 `json:"errors,omitempty"`
  1452. // Id: Relative name of the instance within the version. Example:
  1453. // instance-1.@OutputOnly
  1454. Id string `json:"id,omitempty"`
  1455. // MemoryUsage: Total memory in use (bytes).@OutputOnly
  1456. MemoryUsage int64 `json:"memoryUsage,omitempty,string"`
  1457. // Name: Full path to the Instance resource in the API. Example:
  1458. // apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOn
  1459. // ly
  1460. Name string `json:"name,omitempty"`
  1461. // Qps: Average queries per second (QPS) over the last
  1462. // minute.@OutputOnly
  1463. Qps float64 `json:"qps,omitempty"`
  1464. // Requests: Number of requests since this instance was
  1465. // started.@OutputOnly
  1466. Requests int64 `json:"requests,omitempty"`
  1467. // StartTime: Time that this instance was started.@OutputOnly
  1468. StartTime string `json:"startTime,omitempty"`
  1469. // VmDebugEnabled: Whether this instance is in debug mode. Only
  1470. // applicable for instances in App Engine flexible
  1471. // environment.@OutputOnly
  1472. VmDebugEnabled bool `json:"vmDebugEnabled,omitempty"`
  1473. // VmId: Virtual machine ID of this instance. Only applicable for
  1474. // instances in App Engine flexible environment.@OutputOnly
  1475. VmId string `json:"vmId,omitempty"`
  1476. // VmIp: The IP address of this instance. Only applicable for instances
  1477. // in App Engine flexible environment.@OutputOnly
  1478. VmIp string `json:"vmIp,omitempty"`
  1479. // VmName: Name of the virtual machine where this instance lives. Only
  1480. // applicable for instances in App Engine flexible
  1481. // environment.@OutputOnly
  1482. VmName string `json:"vmName,omitempty"`
  1483. // VmStatus: Status of the virtual machine where this instance lives.
  1484. // Only applicable for instances in App Engine flexible
  1485. // environment.@OutputOnly
  1486. VmStatus string `json:"vmStatus,omitempty"`
  1487. // VmZoneName: Zone where the virtual machine is located. Only
  1488. // applicable for instances in App Engine flexible
  1489. // environment.@OutputOnly
  1490. VmZoneName string `json:"vmZoneName,omitempty"`
  1491. // ServerResponse contains the HTTP response code and headers from the
  1492. // server.
  1493. googleapi.ServerResponse `json:"-"`
  1494. // ForceSendFields is a list of field names (e.g. "AppEngineRelease") to
  1495. // unconditionally include in API requests. By default, fields with
  1496. // empty values are omitted from API requests. However, any non-pointer,
  1497. // non-interface field appearing in ForceSendFields will be sent to the
  1498. // server regardless of whether the field is empty or not. This may be
  1499. // used to include empty fields in Patch requests.
  1500. ForceSendFields []string `json:"-"`
  1501. // NullFields is a list of field names (e.g. "AppEngineRelease") to
  1502. // include in API requests with the JSON null value. By default, fields
  1503. // with empty values are omitted from API requests. However, any field
  1504. // with an empty value appearing in NullFields will be sent to the
  1505. // server as null. It is an error if a field in this list has a
  1506. // non-empty value. This may be used to include null fields in Patch
  1507. // requests.
  1508. NullFields []string `json:"-"`
  1509. }
  1510. func (s *Instance) MarshalJSON() ([]byte, error) {
  1511. type NoMethod Instance
  1512. raw := NoMethod(*s)
  1513. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1514. }
  1515. func (s *Instance) UnmarshalJSON(data []byte) error {
  1516. type NoMethod Instance
  1517. var s1 struct {
  1518. Qps gensupport.JSONFloat64 `json:"qps"`
  1519. *NoMethod
  1520. }
  1521. s1.NoMethod = (*NoMethod)(s)
  1522. if err := json.Unmarshal(data, &s1); err != nil {
  1523. return err
  1524. }
  1525. s.Qps = float64(s1.Qps)
  1526. return nil
  1527. }
  1528. // Library: Third-party Python runtime library that is required by the
  1529. // application.
  1530. type Library struct {
  1531. // Name: Name of the library. Example: "django".
  1532. Name string `json:"name,omitempty"`
  1533. // Version: Version of the library to select, or "latest".
  1534. Version string `json:"version,omitempty"`
  1535. // ForceSendFields is a list of field names (e.g. "Name") to
  1536. // unconditionally include in API requests. By default, fields with
  1537. // empty values are omitted from API requests. However, any non-pointer,
  1538. // non-interface field appearing in ForceSendFields will be sent to the
  1539. // server regardless of whether the field is empty or not. This may be
  1540. // used to include empty fields in Patch requests.
  1541. ForceSendFields []string `json:"-"`
  1542. // NullFields is a list of field names (e.g. "Name") to include in API
  1543. // requests with the JSON null value. By default, fields with empty
  1544. // values are omitted from API requests. However, any field with an
  1545. // empty value appearing in NullFields will be sent to the server as
  1546. // null. It is an error if a field in this list has a non-empty value.
  1547. // This may be used to include null fields in Patch requests.
  1548. NullFields []string `json:"-"`
  1549. }
  1550. func (s *Library) MarshalJSON() ([]byte, error) {
  1551. type NoMethod Library
  1552. raw := NoMethod(*s)
  1553. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1554. }
  1555. // ListAuthorizedCertificatesResponse: Response message for
  1556. // AuthorizedCertificates.ListAuthorizedCertificates.
  1557. type ListAuthorizedCertificatesResponse struct {
  1558. // Certificates: The SSL certificates the user is authorized to
  1559. // administer.
  1560. Certificates []*AuthorizedCertificate `json:"certificates,omitempty"`
  1561. // NextPageToken: Continuation token for fetching the next page of
  1562. // results.
  1563. NextPageToken string `json:"nextPageToken,omitempty"`
  1564. // ServerResponse contains the HTTP response code and headers from the
  1565. // server.
  1566. googleapi.ServerResponse `json:"-"`
  1567. // ForceSendFields is a list of field names (e.g. "Certificates") to
  1568. // unconditionally include in API requests. By default, fields with
  1569. // empty values are omitted from API requests. However, any non-pointer,
  1570. // non-interface field appearing in ForceSendFields will be sent to the
  1571. // server regardless of whether the field is empty or not. This may be
  1572. // used to include empty fields in Patch requests.
  1573. ForceSendFields []string `json:"-"`
  1574. // NullFields is a list of field names (e.g. "Certificates") to include
  1575. // in API requests with the JSON null value. By default, fields with
  1576. // empty values are omitted from API requests. However, any field with
  1577. // an empty value appearing in NullFields will be sent to the server as
  1578. // null. It is an error if a field in this list has a non-empty value.
  1579. // This may be used to include null fields in Patch requests.
  1580. NullFields []string `json:"-"`
  1581. }
  1582. func (s *ListAuthorizedCertificatesResponse) MarshalJSON() ([]byte, error) {
  1583. type NoMethod ListAuthorizedCertificatesResponse
  1584. raw := NoMethod(*s)
  1585. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1586. }
  1587. // ListAuthorizedDomainsResponse: Response message for
  1588. // AuthorizedDomains.ListAuthorizedDomains.
  1589. type ListAuthorizedDomainsResponse struct {
  1590. // Domains: The authorized domains belonging to the user.
  1591. Domains []*AuthorizedDomain `json:"domains,omitempty"`
  1592. // NextPageToken: Continuation token for fetching the next page of
  1593. // results.
  1594. NextPageToken string `json:"nextPageToken,omitempty"`
  1595. // ServerResponse contains the HTTP response code and headers from the
  1596. // server.
  1597. googleapi.ServerResponse `json:"-"`
  1598. // ForceSendFields is a list of field names (e.g. "Domains") to
  1599. // unconditionally include in API requests. By default, fields with
  1600. // empty values are omitted from API requests. However, any non-pointer,
  1601. // non-interface field appearing in ForceSendFields will be sent to the
  1602. // server regardless of whether the field is empty or not. This may be
  1603. // used to include empty fields in Patch requests.
  1604. ForceSendFields []string `json:"-"`
  1605. // NullFields is a list of field names (e.g. "Domains") to include in
  1606. // API requests with the JSON null value. By default, fields with empty
  1607. // values are omitted from API requests. However, any field with an
  1608. // empty value appearing in NullFields will be sent to the server as
  1609. // null. It is an error if a field in this list has a non-empty value.
  1610. // This may be used to include null fields in Patch requests.
  1611. NullFields []string `json:"-"`
  1612. }
  1613. func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) {
  1614. type NoMethod ListAuthorizedDomainsResponse
  1615. raw := NoMethod(*s)
  1616. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1617. }
  1618. // ListDomainMappingsResponse: Response message for
  1619. // DomainMappings.ListDomainMappings.
  1620. type ListDomainMappingsResponse struct {
  1621. // DomainMappings: The domain mappings for the application.
  1622. DomainMappings []*DomainMapping `json:"domainMappings,omitempty"`
  1623. // NextPageToken: Continuation token for fetching the next page of
  1624. // results.
  1625. NextPageToken string `json:"nextPageToken,omitempty"`
  1626. // ServerResponse contains the HTTP response code and headers from the
  1627. // server.
  1628. googleapi.ServerResponse `json:"-"`
  1629. // ForceSendFields is a list of field names (e.g. "DomainMappings") to
  1630. // unconditionally include in API requests. By default, fields with
  1631. // empty values are omitted from API requests. However, any non-pointer,
  1632. // non-interface field appearing in ForceSendFields will be sent to the
  1633. // server regardless of whether the field is empty or not. This may be
  1634. // used to include empty fields in Patch requests.
  1635. ForceSendFields []string `json:"-"`
  1636. // NullFields is a list of field names (e.g. "DomainMappings") to
  1637. // include in API requests with the JSON null value. By default, fields
  1638. // with empty values are omitted from API requests. However, any field
  1639. // with an empty value appearing in NullFields will be sent to the
  1640. // server as null. It is an error if a field in this list has a
  1641. // non-empty value. This may be used to include null fields in Patch
  1642. // requests.
  1643. NullFields []string `json:"-"`
  1644. }
  1645. func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) {
  1646. type NoMethod ListDomainMappingsResponse
  1647. raw := NoMethod(*s)
  1648. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1649. }
  1650. // ListIngressRulesResponse: Response message for
  1651. // Firewall.ListIngressRules.
  1652. type ListIngressRulesResponse struct {
  1653. // IngressRules: The ingress FirewallRules for this application.
  1654. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  1655. // NextPageToken: Continuation token for fetching the next page of
  1656. // results.
  1657. NextPageToken string `json:"nextPageToken,omitempty"`
  1658. // ServerResponse contains the HTTP response code and headers from the
  1659. // server.
  1660. googleapi.ServerResponse `json:"-"`
  1661. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  1662. // unconditionally include in API requests. By default, fields with
  1663. // empty values are omitted from API requests. However, any non-pointer,
  1664. // non-interface field appearing in ForceSendFields will be sent to the
  1665. // server regardless of whether the field is empty or not. This may be
  1666. // used to include empty fields in Patch requests.
  1667. ForceSendFields []string `json:"-"`
  1668. // NullFields is a list of field names (e.g. "IngressRules") to include
  1669. // in API requests with the JSON null value. By default, fields with
  1670. // empty values are omitted from API requests. However, any field with
  1671. // an empty value appearing in NullFields will be sent to the server as
  1672. // null. It is an error if a field in this list has a non-empty value.
  1673. // This may be used to include null fields in Patch requests.
  1674. NullFields []string `json:"-"`
  1675. }
  1676. func (s *ListIngressRulesResponse) MarshalJSON() ([]byte, error) {
  1677. type NoMethod ListIngressRulesResponse
  1678. raw := NoMethod(*s)
  1679. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1680. }
  1681. // ListInstancesResponse: Response message for Instances.ListInstances.
  1682. type ListInstancesResponse struct {
  1683. // Instances: The instances belonging to the requested version.
  1684. Instances []*Instance `json:"instances,omitempty"`
  1685. // NextPageToken: Continuation token for fetching the next page of
  1686. // results.
  1687. NextPageToken string `json:"nextPageToken,omitempty"`
  1688. // ServerResponse contains the HTTP response code and headers from the
  1689. // server.
  1690. googleapi.ServerResponse `json:"-"`
  1691. // ForceSendFields is a list of field names (e.g. "Instances") to
  1692. // unconditionally include in API requests. By default, fields with
  1693. // empty values are omitted from API requests. However, any non-pointer,
  1694. // non-interface field appearing in ForceSendFields will be sent to the
  1695. // server regardless of whether the field is empty or not. This may be
  1696. // used to include empty fields in Patch requests.
  1697. ForceSendFields []string `json:"-"`
  1698. // NullFields is a list of field names (e.g. "Instances") to include in
  1699. // API requests with the JSON null value. By default, fields with empty
  1700. // values are omitted from API requests. However, any field with an
  1701. // empty value appearing in NullFields will be sent to the server as
  1702. // null. It is an error if a field in this list has a non-empty value.
  1703. // This may be used to include null fields in Patch requests.
  1704. NullFields []string `json:"-"`
  1705. }
  1706. func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
  1707. type NoMethod ListInstancesResponse
  1708. raw := NoMethod(*s)
  1709. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1710. }
  1711. // ListLocationsResponse: The response message for
  1712. // Locations.ListLocations.
  1713. type ListLocationsResponse struct {
  1714. // Locations: A list of locations that matches the specified filter in
  1715. // the request.
  1716. Locations []*Location `json:"locations,omitempty"`
  1717. // NextPageToken: The standard List next-page token.
  1718. NextPageToken string `json:"nextPageToken,omitempty"`
  1719. // ServerResponse contains the HTTP response code and headers from the
  1720. // server.
  1721. googleapi.ServerResponse `json:"-"`
  1722. // ForceSendFields is a list of field names (e.g. "Locations") to
  1723. // unconditionally include in API requests. By default, fields with
  1724. // empty values are omitted from API requests. However, any non-pointer,
  1725. // non-interface field appearing in ForceSendFields will be sent to the
  1726. // server regardless of whether the field is empty or not. This may be
  1727. // used to include empty fields in Patch requests.
  1728. ForceSendFields []string `json:"-"`
  1729. // NullFields is a list of field names (e.g. "Locations") to include in
  1730. // API requests with the JSON null value. By default, fields with empty
  1731. // values are omitted from API requests. However, any field with an
  1732. // empty value appearing in NullFields will be sent to the server as
  1733. // null. It is an error if a field in this list has a non-empty value.
  1734. // This may be used to include null fields in Patch requests.
  1735. NullFields []string `json:"-"`
  1736. }
  1737. func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1738. type NoMethod ListLocationsResponse
  1739. raw := NoMethod(*s)
  1740. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1741. }
  1742. // ListOperationsResponse: The response message for
  1743. // Operations.ListOperations.
  1744. type ListOperationsResponse struct {
  1745. // NextPageToken: The standard List next-page token.
  1746. NextPageToken string `json:"nextPageToken,omitempty"`
  1747. // Operations: A list of operations that matches the specified filter in
  1748. // the request.
  1749. Operations []*Operation `json:"operations,omitempty"`
  1750. // ServerResponse contains the HTTP response code and headers from the
  1751. // server.
  1752. googleapi.ServerResponse `json:"-"`
  1753. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1754. // unconditionally include in API requests. By default, fields with
  1755. // empty values are omitted from API requests. However, any non-pointer,
  1756. // non-interface field appearing in ForceSendFields will be sent to the
  1757. // server regardless of whether the field is empty or not. This may be
  1758. // used to include empty fields in Patch requests.
  1759. ForceSendFields []string `json:"-"`
  1760. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1761. // in API requests with the JSON null value. By default, fields with
  1762. // empty values are omitted from API requests. However, any field with
  1763. // an empty value appearing in NullFields will be sent to the server as
  1764. // null. It is an error if a field in this list has a non-empty value.
  1765. // This may be used to include null fields in Patch requests.
  1766. NullFields []string `json:"-"`
  1767. }
  1768. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1769. type NoMethod ListOperationsResponse
  1770. raw := NoMethod(*s)
  1771. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1772. }
  1773. // ListServicesResponse: Response message for Services.ListServices.
  1774. type ListServicesResponse struct {
  1775. // NextPageToken: Continuation token for fetching the next page of
  1776. // results.
  1777. NextPageToken string `json:"nextPageToken,omitempty"`
  1778. // Services: The services belonging to the requested application.
  1779. Services []*Service `json:"services,omitempty"`
  1780. // ServerResponse contains the HTTP response code and headers from the
  1781. // server.
  1782. googleapi.ServerResponse `json:"-"`
  1783. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1784. // unconditionally include in API requests. By default, fields with
  1785. // empty values are omitted from API requests. However, any non-pointer,
  1786. // non-interface field appearing in ForceSendFields will be sent to the
  1787. // server regardless of whether the field is empty or not. This may be
  1788. // used to include empty fields in Patch requests.
  1789. ForceSendFields []string `json:"-"`
  1790. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1791. // in API requests with the JSON null value. By default, fields with
  1792. // empty values are omitted from API requests. However, any field with
  1793. // an empty value appearing in NullFields will be sent to the server as
  1794. // null. It is an error if a field in this list has a non-empty value.
  1795. // This may be used to include null fields in Patch requests.
  1796. NullFields []string `json:"-"`
  1797. }
  1798. func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
  1799. type NoMethod ListServicesResponse
  1800. raw := NoMethod(*s)
  1801. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1802. }
  1803. // ListVersionsResponse: Response message for Versions.ListVersions.
  1804. type ListVersionsResponse struct {
  1805. // NextPageToken: Continuation token for fetching the next page of
  1806. // results.
  1807. NextPageToken string `json:"nextPageToken,omitempty"`
  1808. // Versions: The versions belonging to the requested service.
  1809. Versions []*Version `json:"versions,omitempty"`
  1810. // ServerResponse contains the HTTP response code and headers from the
  1811. // server.
  1812. googleapi.ServerResponse `json:"-"`
  1813. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1814. // unconditionally include in API requests. By default, fields with
  1815. // empty values are omitted from API requests. However, any non-pointer,
  1816. // non-interface field appearing in ForceSendFields will be sent to the
  1817. // server regardless of whether the field is empty or not. This may be
  1818. // used to include empty fields in Patch requests.
  1819. ForceSendFields []string `json:"-"`
  1820. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1821. // in API requests with the JSON null value. By default, fields with
  1822. // empty values are omitted from API requests. However, any field with
  1823. // an empty value appearing in NullFields will be sent to the server as
  1824. // null. It is an error if a field in this list has a non-empty value.
  1825. // This may be used to include null fields in Patch requests.
  1826. NullFields []string `json:"-"`
  1827. }
  1828. func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
  1829. type NoMethod ListVersionsResponse
  1830. raw := NoMethod(*s)
  1831. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1832. }
  1833. // LivenessCheck: Health checking configuration for VM instances.
  1834. // Unhealthy instances are killed and replaced with new instances.
  1835. type LivenessCheck struct {
  1836. // CheckInterval: Interval between health checks.
  1837. CheckInterval string `json:"checkInterval,omitempty"`
  1838. // FailureThreshold: Number of consecutive failed checks required before
  1839. // considering the VM unhealthy.
  1840. FailureThreshold int64 `json:"failureThreshold,omitempty"`
  1841. // Host: Host header to send when performing a HTTP Liveness check.
  1842. // Example: "myapp.appspot.com"
  1843. Host string `json:"host,omitempty"`
  1844. // InitialDelay: The initial delay before starting to execute the
  1845. // checks.
  1846. InitialDelay string `json:"initialDelay,omitempty"`
  1847. // Path: The request path.
  1848. Path string `json:"path,omitempty"`
  1849. // SuccessThreshold: Number of consecutive successful checks required
  1850. // before considering the VM healthy.
  1851. SuccessThreshold int64 `json:"successThreshold,omitempty"`
  1852. // Timeout: Time before the check is considered failed.
  1853. Timeout string `json:"timeout,omitempty"`
  1854. // ForceSendFields is a list of field names (e.g. "CheckInterval") to
  1855. // unconditionally include in API requests. By default, fields with
  1856. // empty values are omitted from API requests. However, any non-pointer,
  1857. // non-interface field appearing in ForceSendFields will be sent to the
  1858. // server regardless of whether the field is empty or not. This may be
  1859. // used to include empty fields in Patch requests.
  1860. ForceSendFields []string `json:"-"`
  1861. // NullFields is a list of field names (e.g. "CheckInterval") to include
  1862. // in API requests with the JSON null value. By default, fields with
  1863. // empty values are omitted from API requests. However, any field with
  1864. // an empty value appearing in NullFields will be sent to the server as
  1865. // null. It is an error if a field in this list has a non-empty value.
  1866. // This may be used to include null fields in Patch requests.
  1867. NullFields []string `json:"-"`
  1868. }
  1869. func (s *LivenessCheck) MarshalJSON() ([]byte, error) {
  1870. type NoMethod LivenessCheck
  1871. raw := NoMethod(*s)
  1872. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1873. }
  1874. // Location: A resource that represents Google Cloud Platform location.
  1875. type Location struct {
  1876. // DisplayName: The friendly name for this location, typically a nearby
  1877. // city name. For example, "Tokyo".
  1878. DisplayName string `json:"displayName,omitempty"`
  1879. // Labels: Cross-service attributes for the location. For
  1880. // example
  1881. // {"cloud.googleapis.com/region": "us-east1"}
  1882. //
  1883. Labels map[string]string `json:"labels,omitempty"`
  1884. // LocationId: The canonical id for this location. For example:
  1885. // "us-east1".
  1886. LocationId string `json:"locationId,omitempty"`
  1887. // Metadata: Service-specific metadata. For example the available
  1888. // capacity at the given location.
  1889. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1890. // Name: Resource name for the location, which may vary between
  1891. // implementations. For example:
  1892. // "projects/example-project/locations/us-east1"
  1893. Name string `json:"name,omitempty"`
  1894. // ServerResponse contains the HTTP response code and headers from the
  1895. // server.
  1896. googleapi.ServerResponse `json:"-"`
  1897. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1898. // unconditionally include in API requests. By default, fields with
  1899. // empty values are omitted from API requests. However, any non-pointer,
  1900. // non-interface field appearing in ForceSendFields will be sent to the
  1901. // server regardless of whether the field is empty or not. This may be
  1902. // used to include empty fields in Patch requests.
  1903. ForceSendFields []string `json:"-"`
  1904. // NullFields is a list of field names (e.g. "DisplayName") to include
  1905. // in API requests with the JSON null value. By default, fields with
  1906. // empty values are omitted from API requests. However, any field with
  1907. // an empty value appearing in NullFields will be sent to the server as
  1908. // null. It is an error if a field in this list has a non-empty value.
  1909. // This may be used to include null fields in Patch requests.
  1910. NullFields []string `json:"-"`
  1911. }
  1912. func (s *Location) MarshalJSON() ([]byte, error) {
  1913. type NoMethod Location
  1914. raw := NoMethod(*s)
  1915. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1916. }
  1917. // LocationMetadata: Metadata for the given
  1918. // google.cloud.location.Location.
  1919. type LocationMetadata struct {
  1920. // FlexibleEnvironmentAvailable: App Engine flexible environment is
  1921. // available in the given location.@OutputOnly
  1922. FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"`
  1923. // StandardEnvironmentAvailable: App Engine standard environment is
  1924. // available in the given location.@OutputOnly
  1925. StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"`
  1926. // ForceSendFields is a list of field names (e.g.
  1927. // "FlexibleEnvironmentAvailable") to unconditionally include in API
  1928. // requests. By default, fields with empty values are omitted from API
  1929. // requests. However, any non-pointer, non-interface field appearing in
  1930. // ForceSendFields will be sent to the server regardless of whether the
  1931. // field is empty or not. This may be used to include empty fields in
  1932. // Patch requests.
  1933. ForceSendFields []string `json:"-"`
  1934. // NullFields is a list of field names (e.g.
  1935. // "FlexibleEnvironmentAvailable") to include in API requests with the
  1936. // JSON null value. By default, fields with empty values are omitted
  1937. // from API requests. However, any field with an empty value appearing
  1938. // in NullFields will be sent to the server as null. It is an error if a
  1939. // field in this list has a non-empty value. This may be used to include
  1940. // null fields in Patch requests.
  1941. NullFields []string `json:"-"`
  1942. }
  1943. func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
  1944. type NoMethod LocationMetadata
  1945. raw := NoMethod(*s)
  1946. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1947. }
  1948. // ManagedCertificate: A certificate managed by App Engine.
  1949. type ManagedCertificate struct {
  1950. // LastRenewalTime: Time at which the certificate was last renewed. The
  1951. // renewal process is fully managed. Certificate renewal will
  1952. // automatically occur before the certificate expires. Renewal errors
  1953. // can be tracked via ManagementStatus.@OutputOnly
  1954. LastRenewalTime string `json:"lastRenewalTime,omitempty"`
  1955. // Status: Status of certificate management. Refers to the most recent
  1956. // certificate acquisition or renewal attempt.@OutputOnly
  1957. //
  1958. // Possible values:
  1959. // "MANAGEMENT_STATUS_UNSPECIFIED"
  1960. // "OK" - Certificate was successfully obtained and inserted into the
  1961. // serving system.
  1962. // "PENDING" - Certificate is under active attempts to acquire or
  1963. // renew.
  1964. // "FAILED_RETRYING_NOT_VISIBLE" - Most recent renewal failed due to
  1965. // an invalid DNS setup and will be retried. Renewal attempts will
  1966. // continue to fail until the certificate domain's DNS configuration is
  1967. // fixed. The last successfully provisioned certificate may still be
  1968. // serving.
  1969. // "FAILED_PERMANENT" - All renewal attempts have been exhausted,
  1970. // likely due to an invalid DNS setup.
  1971. // "FAILED_RETRYING_CAA_FORBIDDEN" - Most recent renewal failed due to
  1972. // an explicit CAA record that does not include the in-use CA, Let's
  1973. // Encrypt. Renewals will continue to fail until the CAA is
  1974. // reconfigured. The last successfully provisioned certificate may still
  1975. // be serving.
  1976. // "FAILED_RETRYING_CAA_CHECKING" - Most recent renewal failed due to
  1977. // a CAA retrieval failure. This means that the domain's DNS provider
  1978. // does not properly handle CAA records, failing requests for CAA
  1979. // records when no CAA records are defined. Renewals will continue to
  1980. // fail until the DNS provider is changed or a CAA record is added for
  1981. // the given domain. The last successfully provisioned certificate may
  1982. // still be serving.
  1983. Status string `json:"status,omitempty"`
  1984. // ForceSendFields is a list of field names (e.g. "LastRenewalTime") to
  1985. // unconditionally include in API requests. By default, fields with
  1986. // empty values are omitted from API requests. However, any non-pointer,
  1987. // non-interface field appearing in ForceSendFields will be sent to the
  1988. // server regardless of whether the field is empty or not. This may be
  1989. // used to include empty fields in Patch requests.
  1990. ForceSendFields []string `json:"-"`
  1991. // NullFields is a list of field names (e.g. "LastRenewalTime") to
  1992. // include in API requests with the JSON null value. By default, fields
  1993. // with empty values are omitted from API requests. However, any field
  1994. // with an empty value appearing in NullFields will be sent to the
  1995. // server as null. It is an error if a field in this list has a
  1996. // non-empty value. This may be used to include null fields in Patch
  1997. // requests.
  1998. NullFields []string `json:"-"`
  1999. }
  2000. func (s *ManagedCertificate) MarshalJSON() ([]byte, error) {
  2001. type NoMethod ManagedCertificate
  2002. raw := NoMethod(*s)
  2003. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2004. }
  2005. // ManualScaling: A service with manual scaling runs continuously,
  2006. // allowing you to perform complex initialization and rely on the state
  2007. // of its memory over time.
  2008. type ManualScaling struct {
  2009. // Instances: Number of instances to assign to the service at the start.
  2010. // This number can later be altered by using the Modules API
  2011. // (https://cloud.google.com/appengine/docs/python/modules/functions)
  2012. // set_num_instances() function.
  2013. Instances int64 `json:"instances,omitempty"`
  2014. // ForceSendFields is a list of field names (e.g. "Instances") to
  2015. // unconditionally include in API requests. By default, fields with
  2016. // empty values are omitted from API requests. However, any non-pointer,
  2017. // non-interface field appearing in ForceSendFields will be sent to the
  2018. // server regardless of whether the field is empty or not. This may be
  2019. // used to include empty fields in Patch requests.
  2020. ForceSendFields []string `json:"-"`
  2021. // NullFields is a list of field names (e.g. "Instances") to include in
  2022. // API requests with the JSON null value. By default, fields with empty
  2023. // values are omitted from API requests. However, any field with an
  2024. // empty value appearing in NullFields will be sent to the server as
  2025. // null. It is an error if a field in this list has a non-empty value.
  2026. // This may be used to include null fields in Patch requests.
  2027. NullFields []string `json:"-"`
  2028. }
  2029. func (s *ManualScaling) MarshalJSON() ([]byte, error) {
  2030. type NoMethod ManualScaling
  2031. raw := NoMethod(*s)
  2032. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2033. }
  2034. // Network: Extra network settings. Only applicable in the App Engine
  2035. // flexible environment.
  2036. type Network struct {
  2037. // ForwardedPorts: List of ports, or port pairs, to forward from the
  2038. // virtual machine to the application container. Only applicable in the
  2039. // App Engine flexible environment.
  2040. ForwardedPorts []string `json:"forwardedPorts,omitempty"`
  2041. // InstanceTag: Tag to apply to the instance during creation. Only
  2042. // applicable in the App Engine flexible environment.
  2043. InstanceTag string `json:"instanceTag,omitempty"`
  2044. // Name: Google Compute Engine network where the virtual machines are
  2045. // created. Specify the short name, not the resource path.Defaults to
  2046. // default.
  2047. Name string `json:"name,omitempty"`
  2048. // SessionAffinity: Enable session affinity. Only applicable in the App
  2049. // Engine flexible environment.
  2050. SessionAffinity bool `json:"sessionAffinity,omitempty"`
  2051. // SubnetworkName: Google Cloud Platform sub-network where the virtual
  2052. // machines are created. Specify the short name, not the resource
  2053. // path.If a subnetwork name is specified, a network name will also be
  2054. // required unless it is for the default network.
  2055. // If the network that the instance is being created in is a Legacy
  2056. // network, then the IP address is allocated from the IPv4Range.
  2057. // If the network that the instance is being created in is an auto
  2058. // Subnet Mode Network, then only network name should be specified (not
  2059. // the subnetwork_name) and the IP address is created from the
  2060. // IPCidrRange of the subnetwork that exists in that zone for that
  2061. // network.
  2062. // If the network that the instance is being created in is a custom
  2063. // Subnet Mode Network, then the subnetwork_name must be specified and
  2064. // the IP address is created from the IPCidrRange of the subnetwork.If
  2065. // specified, the subnetwork must exist in the same region as the App
  2066. // Engine flexible environment application.
  2067. SubnetworkName string `json:"subnetworkName,omitempty"`
  2068. // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to
  2069. // unconditionally include in API requests. By default, fields with
  2070. // empty values are omitted from API requests. However, any non-pointer,
  2071. // non-interface field appearing in ForceSendFields will be sent to the
  2072. // server regardless of whether the field is empty or not. This may be
  2073. // used to include empty fields in Patch requests.
  2074. ForceSendFields []string `json:"-"`
  2075. // NullFields is a list of field names (e.g. "ForwardedPorts") to
  2076. // include in API requests with the JSON null value. By default, fields
  2077. // with empty values are omitted from API requests. However, any field
  2078. // with an empty value appearing in NullFields will be sent to the
  2079. // server as null. It is an error if a field in this list has a
  2080. // non-empty value. This may be used to include null fields in Patch
  2081. // requests.
  2082. NullFields []string `json:"-"`
  2083. }
  2084. func (s *Network) MarshalJSON() ([]byte, error) {
  2085. type NoMethod Network
  2086. raw := NoMethod(*s)
  2087. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2088. }
  2089. // NetworkUtilization: Target scaling by network usage. Only applicable
  2090. // in the App Engine flexible environment.
  2091. type NetworkUtilization struct {
  2092. // TargetReceivedBytesPerSecond: Target bytes received per second.
  2093. TargetReceivedBytesPerSecond int64 `json:"targetReceivedBytesPerSecond,omitempty"`
  2094. // TargetReceivedPacketsPerSecond: Target packets received per second.
  2095. TargetReceivedPacketsPerSecond int64 `json:"targetReceivedPacketsPerSecond,omitempty"`
  2096. // TargetSentBytesPerSecond: Target bytes sent per second.
  2097. TargetSentBytesPerSecond int64 `json:"targetSentBytesPerSecond,omitempty"`
  2098. // TargetSentPacketsPerSecond: Target packets sent per second.
  2099. TargetSentPacketsPerSecond int64 `json:"targetSentPacketsPerSecond,omitempty"`
  2100. // ForceSendFields is a list of field names (e.g.
  2101. // "TargetReceivedBytesPerSecond") to unconditionally include in API
  2102. // requests. By default, fields with empty values are omitted from API
  2103. // requests. However, any non-pointer, non-interface field appearing in
  2104. // ForceSendFields will be sent to the server regardless of whether the
  2105. // field is empty or not. This may be used to include empty fields in
  2106. // Patch requests.
  2107. ForceSendFields []string `json:"-"`
  2108. // NullFields is a list of field names (e.g.
  2109. // "TargetReceivedBytesPerSecond") to include in API requests with the
  2110. // JSON null value. By default, fields with empty values are omitted
  2111. // from API requests. However, any field with an empty value appearing
  2112. // in NullFields will be sent to the server as null. It is an error if a
  2113. // field in this list has a non-empty value. This may be used to include
  2114. // null fields in Patch requests.
  2115. NullFields []string `json:"-"`
  2116. }
  2117. func (s *NetworkUtilization) MarshalJSON() ([]byte, error) {
  2118. type NoMethod NetworkUtilization
  2119. raw := NoMethod(*s)
  2120. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2121. }
  2122. type OAuth2ClientInfo struct {
  2123. // ApplicationName: Application name to be used in OAuth consent screen.
  2124. ApplicationName string `json:"applicationName,omitempty"`
  2125. // ClientName: Nameof the client to be generated. Optional - If not
  2126. // provided, the name will be autogenerated by the backend.
  2127. ClientName string `json:"clientName,omitempty"`
  2128. // DeveloperEmailAddress: Developer's information to be used in OAuth
  2129. // consent screen.
  2130. DeveloperEmailAddress string `json:"developerEmailAddress,omitempty"`
  2131. // ForceSendFields is a list of field names (e.g. "ApplicationName") to
  2132. // unconditionally include in API requests. By default, fields with
  2133. // empty values are omitted from API requests. However, any non-pointer,
  2134. // non-interface field appearing in ForceSendFields will be sent to the
  2135. // server regardless of whether the field is empty or not. This may be
  2136. // used to include empty fields in Patch requests.
  2137. ForceSendFields []string `json:"-"`
  2138. // NullFields is a list of field names (e.g. "ApplicationName") to
  2139. // include in API requests with the JSON null value. By default, fields
  2140. // with empty values are omitted from API requests. However, any field
  2141. // with an empty value appearing in NullFields will be sent to the
  2142. // server as null. It is an error if a field in this list has a
  2143. // non-empty value. This may be used to include null fields in Patch
  2144. // requests.
  2145. NullFields []string `json:"-"`
  2146. }
  2147. func (s *OAuth2ClientInfo) MarshalJSON() ([]byte, error) {
  2148. type NoMethod OAuth2ClientInfo
  2149. raw := NoMethod(*s)
  2150. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2151. }
  2152. // Operation: This resource represents a long-running operation that is
  2153. // the result of a network API call.
  2154. type Operation struct {
  2155. // Done: If the value is false, it means the operation is still in
  2156. // progress. If true, the operation is completed, and either error or
  2157. // response is available.
  2158. Done bool `json:"done,omitempty"`
  2159. // Error: The error result of the operation in case of failure or
  2160. // cancellation.
  2161. Error *Status `json:"error,omitempty"`
  2162. // Metadata: Service-specific metadata associated with the operation. It
  2163. // typically contains progress information and common metadata such as
  2164. // create time. Some services might not provide such metadata. Any
  2165. // method that returns a long-running operation should document the
  2166. // metadata type, if any.
  2167. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2168. // Name: The server-assigned name, which is only unique within the same
  2169. // service that originally returns it. If you use the default HTTP
  2170. // mapping, the name should have the format of
  2171. // operations/some/unique/name.
  2172. Name string `json:"name,omitempty"`
  2173. // Response: The normal response of the operation in case of success. If
  2174. // the original method returns no data on success, such as Delete, the
  2175. // response is google.protobuf.Empty. If the original method is standard
  2176. // Get/Create/Update, the response should be the resource. For other
  2177. // methods, the response should have the type XxxResponse, where Xxx is
  2178. // the original method name. For example, if the original method name is
  2179. // TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
  2180. Response googleapi.RawMessage `json:"response,omitempty"`
  2181. // ServerResponse contains the HTTP response code and headers from the
  2182. // server.
  2183. googleapi.ServerResponse `json:"-"`
  2184. // ForceSendFields is a list of field names (e.g. "Done") to
  2185. // unconditionally include in API requests. By default, fields with
  2186. // empty values are omitted from API requests. However, any non-pointer,
  2187. // non-interface field appearing in ForceSendFields will be sent to the
  2188. // server regardless of whether the field is empty or not. This may be
  2189. // used to include empty fields in Patch requests.
  2190. ForceSendFields []string `json:"-"`
  2191. // NullFields is a list of field names (e.g. "Done") to include in API
  2192. // requests with the JSON null value. By default, fields with empty
  2193. // values are omitted from API requests. However, any field with an
  2194. // empty value appearing in NullFields will be sent to the server as
  2195. // null. It is an error if a field in this list has a non-empty value.
  2196. // This may be used to include null fields in Patch requests.
  2197. NullFields []string `json:"-"`
  2198. }
  2199. func (s *Operation) MarshalJSON() ([]byte, error) {
  2200. type NoMethod Operation
  2201. raw := NoMethod(*s)
  2202. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2203. }
  2204. // OperationMetadataV1: Metadata for the given
  2205. // google.longrunning.Operation.
  2206. type OperationMetadataV1 struct {
  2207. CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"`
  2208. // EndTime: Time that this operation completed.@OutputOnly
  2209. EndTime string `json:"endTime,omitempty"`
  2210. // EphemeralMessage: Ephemeral message that may change every time the
  2211. // operation is polled. @OutputOnly
  2212. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2213. // InsertTime: Time that this operation was created.@OutputOnly
  2214. InsertTime string `json:"insertTime,omitempty"`
  2215. // Method: API method that initiated this operation. Example:
  2216. // google.appengine.v1.Versions.CreateVersion.@OutputOnly
  2217. Method string `json:"method,omitempty"`
  2218. // Target: Name of the resource that this operation is acting on.
  2219. // Example: apps/myapp/services/default.@OutputOnly
  2220. Target string `json:"target,omitempty"`
  2221. // User: User who requested this operation.@OutputOnly
  2222. User string `json:"user,omitempty"`
  2223. // Warning: Durable messages that persist on every operation poll.
  2224. // @OutputOnly
  2225. Warning []string `json:"warning,omitempty"`
  2226. // ForceSendFields is a list of field names (e.g.
  2227. // "CreateVersionMetadata") to unconditionally include in API requests.
  2228. // By default, fields with empty values are omitted from API requests.
  2229. // However, any non-pointer, non-interface field appearing in
  2230. // ForceSendFields will be sent to the server regardless of whether the
  2231. // field is empty or not. This may be used to include empty fields in
  2232. // Patch requests.
  2233. ForceSendFields []string `json:"-"`
  2234. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2235. // include in API requests with the JSON null value. By default, fields
  2236. // with empty values are omitted from API requests. However, any field
  2237. // with an empty value appearing in NullFields will be sent to the
  2238. // server as null. It is an error if a field in this list has a
  2239. // non-empty value. This may be used to include null fields in Patch
  2240. // requests.
  2241. NullFields []string `json:"-"`
  2242. }
  2243. func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) {
  2244. type NoMethod OperationMetadataV1
  2245. raw := NoMethod(*s)
  2246. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2247. }
  2248. // OperationMetadataV1Alpha: Metadata for the given
  2249. // google.longrunning.Operation.
  2250. type OperationMetadataV1Alpha struct {
  2251. CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"`
  2252. // EndTime: Time that this operation completed.@OutputOnly
  2253. EndTime string `json:"endTime,omitempty"`
  2254. // EphemeralMessage: Ephemeral message that may change every time the
  2255. // operation is polled. @OutputOnly
  2256. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2257. // InsertTime: Time that this operation was created.@OutputOnly
  2258. InsertTime string `json:"insertTime,omitempty"`
  2259. // Method: API method that initiated this operation. Example:
  2260. // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly
  2261. Method string `json:"method,omitempty"`
  2262. // Target: Name of the resource that this operation is acting on.
  2263. // Example: apps/myapp/services/default.@OutputOnly
  2264. Target string `json:"target,omitempty"`
  2265. // User: User who requested this operation.@OutputOnly
  2266. User string `json:"user,omitempty"`
  2267. // Warning: Durable messages that persist on every operation poll.
  2268. // @OutputOnly
  2269. Warning []string `json:"warning,omitempty"`
  2270. // ForceSendFields is a list of field names (e.g.
  2271. // "CreateVersionMetadata") to unconditionally include in API requests.
  2272. // By default, fields with empty values are omitted from API requests.
  2273. // However, any non-pointer, non-interface field appearing in
  2274. // ForceSendFields will be sent to the server regardless of whether the
  2275. // field is empty or not. This may be used to include empty fields in
  2276. // Patch requests.
  2277. ForceSendFields []string `json:"-"`
  2278. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2279. // include in API requests with the JSON null value. By default, fields
  2280. // with empty values are omitted from API requests. However, any field
  2281. // with an empty value appearing in NullFields will be sent to the
  2282. // server as null. It is an error if a field in this list has a
  2283. // non-empty value. This may be used to include null fields in Patch
  2284. // requests.
  2285. NullFields []string `json:"-"`
  2286. }
  2287. func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  2288. type NoMethod OperationMetadataV1Alpha
  2289. raw := NoMethod(*s)
  2290. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2291. }
  2292. // OperationMetadataV1Beta: Metadata for the given
  2293. // google.longrunning.Operation.
  2294. type OperationMetadataV1Beta struct {
  2295. CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"`
  2296. // EndTime: Time that this operation completed.@OutputOnly
  2297. EndTime string `json:"endTime,omitempty"`
  2298. // EphemeralMessage: Ephemeral message that may change every time the
  2299. // operation is polled. @OutputOnly
  2300. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2301. // InsertTime: Time that this operation was created.@OutputOnly
  2302. InsertTime string `json:"insertTime,omitempty"`
  2303. // Method: API method that initiated this operation. Example:
  2304. // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly
  2305. Method string `json:"method,omitempty"`
  2306. // Target: Name of the resource that this operation is acting on.
  2307. // Example: apps/myapp/services/default.@OutputOnly
  2308. Target string `json:"target,omitempty"`
  2309. // User: User who requested this operation.@OutputOnly
  2310. User string `json:"user,omitempty"`
  2311. // Warning: Durable messages that persist on every operation poll.
  2312. // @OutputOnly
  2313. Warning []string `json:"warning,omitempty"`
  2314. // ForceSendFields is a list of field names (e.g.
  2315. // "CreateVersionMetadata") to unconditionally include in API requests.
  2316. // By default, fields with empty values are omitted from API requests.
  2317. // However, any non-pointer, non-interface field appearing in
  2318. // ForceSendFields will be sent to the server regardless of whether the
  2319. // field is empty or not. This may be used to include empty fields in
  2320. // Patch requests.
  2321. ForceSendFields []string `json:"-"`
  2322. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2323. // include in API requests with the JSON null value. By default, fields
  2324. // with empty values are omitted from API requests. However, any field
  2325. // with an empty value appearing in NullFields will be sent to the
  2326. // server as null. It is an error if a field in this list has a
  2327. // non-empty value. This may be used to include null fields in Patch
  2328. // requests.
  2329. NullFields []string `json:"-"`
  2330. }
  2331. func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) {
  2332. type NoMethod OperationMetadataV1Beta
  2333. raw := NoMethod(*s)
  2334. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2335. }
  2336. // ReadinessCheck: Readiness checking configuration for VM instances.
  2337. // Unhealthy instances are removed from traffic rotation.
  2338. type ReadinessCheck struct {
  2339. // AppStartTimeout: A maximum time limit on application initialization,
  2340. // measured from moment the application successfully replies to a
  2341. // healthcheck until it is ready to serve traffic.
  2342. AppStartTimeout string `json:"appStartTimeout,omitempty"`
  2343. // CheckInterval: Interval between health checks.
  2344. CheckInterval string `json:"checkInterval,omitempty"`
  2345. // FailureThreshold: Number of consecutive failed checks required before
  2346. // removing traffic.
  2347. FailureThreshold int64 `json:"failureThreshold,omitempty"`
  2348. // Host: Host header to send when performing a HTTP Readiness check.
  2349. // Example: "myapp.appspot.com"
  2350. Host string `json:"host,omitempty"`
  2351. // Path: The request path.
  2352. Path string `json:"path,omitempty"`
  2353. // SuccessThreshold: Number of consecutive successful checks required
  2354. // before receiving traffic.
  2355. SuccessThreshold int64 `json:"successThreshold,omitempty"`
  2356. // Timeout: Time before the check is considered failed.
  2357. Timeout string `json:"timeout,omitempty"`
  2358. // ForceSendFields is a list of field names (e.g. "AppStartTimeout") to
  2359. // unconditionally include in API requests. By default, fields with
  2360. // empty values are omitted from API requests. However, any non-pointer,
  2361. // non-interface field appearing in ForceSendFields will be sent to the
  2362. // server regardless of whether the field is empty or not. This may be
  2363. // used to include empty fields in Patch requests.
  2364. ForceSendFields []string `json:"-"`
  2365. // NullFields is a list of field names (e.g. "AppStartTimeout") to
  2366. // include in API requests with the JSON null value. By default, fields
  2367. // with empty values are omitted from API requests. However, any field
  2368. // with an empty value appearing in NullFields will be sent to the
  2369. // server as null. It is an error if a field in this list has a
  2370. // non-empty value. This may be used to include null fields in Patch
  2371. // requests.
  2372. NullFields []string `json:"-"`
  2373. }
  2374. func (s *ReadinessCheck) MarshalJSON() ([]byte, error) {
  2375. type NoMethod ReadinessCheck
  2376. raw := NoMethod(*s)
  2377. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2378. }
  2379. // RepairApplicationRequest: Request message for
  2380. // 'Applications.RepairApplication'.
  2381. type RepairApplicationRequest struct {
  2382. }
  2383. // RequestUtilization: Target scaling by request utilization. Only
  2384. // applicable in the App Engine flexible environment.
  2385. type RequestUtilization struct {
  2386. // TargetConcurrentRequests: Target number of concurrent requests.
  2387. TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"`
  2388. // TargetRequestCountPerSecond: Target requests per second.
  2389. TargetRequestCountPerSecond int64 `json:"targetRequestCountPerSecond,omitempty"`
  2390. // ForceSendFields is a list of field names (e.g.
  2391. // "TargetConcurrentRequests") to unconditionally include in API
  2392. // requests. By default, fields with empty values are omitted from API
  2393. // requests. However, any non-pointer, non-interface field appearing in
  2394. // ForceSendFields will be sent to the server regardless of whether the
  2395. // field is empty or not. This may be used to include empty fields in
  2396. // Patch requests.
  2397. ForceSendFields []string `json:"-"`
  2398. // NullFields is a list of field names (e.g. "TargetConcurrentRequests")
  2399. // to include in API requests with the JSON null value. By default,
  2400. // fields with empty values are omitted from API requests. However, any
  2401. // field with an empty value appearing in NullFields will be sent to the
  2402. // server as null. It is an error if a field in this list has a
  2403. // non-empty value. This may be used to include null fields in Patch
  2404. // requests.
  2405. NullFields []string `json:"-"`
  2406. }
  2407. func (s *RequestUtilization) MarshalJSON() ([]byte, error) {
  2408. type NoMethod RequestUtilization
  2409. raw := NoMethod(*s)
  2410. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2411. }
  2412. // ResourceRecord: A DNS resource record.
  2413. type ResourceRecord struct {
  2414. // Name: Relative name of the object affected by this record. Only
  2415. // applicable for CNAME records. Example: 'www'.
  2416. Name string `json:"name,omitempty"`
  2417. // Rrdata: Data for this record. Values vary by record type, as defined
  2418. // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).
  2419. Rrdata string `json:"rrdata,omitempty"`
  2420. // Type: Resource record type. Example: AAAA.
  2421. //
  2422. // Possible values:
  2423. // "A" - An A resource record. Data is an IPv4 address.
  2424. // "AAAA" - An AAAA resource record. Data is an IPv6 address.
  2425. // "CNAME" - A CNAME resource record. Data is a domain name to be
  2426. // aliased.
  2427. Type string `json:"type,omitempty"`
  2428. // ForceSendFields is a list of field names (e.g. "Name") to
  2429. // unconditionally include in API requests. By default, fields with
  2430. // empty values are omitted from API requests. However, any non-pointer,
  2431. // non-interface field appearing in ForceSendFields will be sent to the
  2432. // server regardless of whether the field is empty or not. This may be
  2433. // used to include empty fields in Patch requests.
  2434. ForceSendFields []string `json:"-"`
  2435. // NullFields is a list of field names (e.g. "Name") to include in API
  2436. // requests with the JSON null value. By default, fields with empty
  2437. // values are omitted from API requests. However, any field with an
  2438. // empty value appearing in NullFields will be sent to the server as
  2439. // null. It is an error if a field in this list has a non-empty value.
  2440. // This may be used to include null fields in Patch requests.
  2441. NullFields []string `json:"-"`
  2442. }
  2443. func (s *ResourceRecord) MarshalJSON() ([]byte, error) {
  2444. type NoMethod ResourceRecord
  2445. raw := NoMethod(*s)
  2446. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2447. }
  2448. // Resources: Machine resources for a version.
  2449. type Resources struct {
  2450. // Cpu: Number of CPU cores needed.
  2451. Cpu float64 `json:"cpu,omitempty"`
  2452. // DiskGb: Disk size (GB) needed.
  2453. DiskGb float64 `json:"diskGb,omitempty"`
  2454. // MemoryGb: Memory (GB) needed.
  2455. MemoryGb float64 `json:"memoryGb,omitempty"`
  2456. // Volumes: User specified volumes.
  2457. Volumes []*Volume `json:"volumes,omitempty"`
  2458. // ForceSendFields is a list of field names (e.g. "Cpu") to
  2459. // unconditionally include in API requests. By default, fields with
  2460. // empty values are omitted from API requests. However, any non-pointer,
  2461. // non-interface field appearing in ForceSendFields will be sent to the
  2462. // server regardless of whether the field is empty or not. This may be
  2463. // used to include empty fields in Patch requests.
  2464. ForceSendFields []string `json:"-"`
  2465. // NullFields is a list of field names (e.g. "Cpu") to include in API
  2466. // requests with the JSON null value. By default, fields with empty
  2467. // values are omitted from API requests. However, any field with an
  2468. // empty value appearing in NullFields will be sent to the server as
  2469. // null. It is an error if a field in this list has a non-empty value.
  2470. // This may be used to include null fields in Patch requests.
  2471. NullFields []string `json:"-"`
  2472. }
  2473. func (s *Resources) MarshalJSON() ([]byte, error) {
  2474. type NoMethod Resources
  2475. raw := NoMethod(*s)
  2476. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2477. }
  2478. func (s *Resources) UnmarshalJSON(data []byte) error {
  2479. type NoMethod Resources
  2480. var s1 struct {
  2481. Cpu gensupport.JSONFloat64 `json:"cpu"`
  2482. DiskGb gensupport.JSONFloat64 `json:"diskGb"`
  2483. MemoryGb gensupport.JSONFloat64 `json:"memoryGb"`
  2484. *NoMethod
  2485. }
  2486. s1.NoMethod = (*NoMethod)(s)
  2487. if err := json.Unmarshal(data, &s1); err != nil {
  2488. return err
  2489. }
  2490. s.Cpu = float64(s1.Cpu)
  2491. s.DiskGb = float64(s1.DiskGb)
  2492. s.MemoryGb = float64(s1.MemoryGb)
  2493. return nil
  2494. }
  2495. // ScriptHandler: Executes a script to handle the request that matches
  2496. // the URL pattern.
  2497. type ScriptHandler struct {
  2498. // ScriptPath: Path to the script from the application root directory.
  2499. ScriptPath string `json:"scriptPath,omitempty"`
  2500. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  2501. // unconditionally include in API requests. By default, fields with
  2502. // empty values are omitted from API requests. However, any non-pointer,
  2503. // non-interface field appearing in ForceSendFields will be sent to the
  2504. // server regardless of whether the field is empty or not. This may be
  2505. // used to include empty fields in Patch requests.
  2506. ForceSendFields []string `json:"-"`
  2507. // NullFields is a list of field names (e.g. "ScriptPath") to include in
  2508. // API requests with the JSON null value. By default, fields with empty
  2509. // values are omitted from API requests. However, any field with an
  2510. // empty value appearing in NullFields will be sent to the server as
  2511. // null. It is an error if a field in this list has a non-empty value.
  2512. // This may be used to include null fields in Patch requests.
  2513. NullFields []string `json:"-"`
  2514. }
  2515. func (s *ScriptHandler) MarshalJSON() ([]byte, error) {
  2516. type NoMethod ScriptHandler
  2517. raw := NoMethod(*s)
  2518. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2519. }
  2520. // Service: A Service resource is a logical component of an application
  2521. // that can share state and communicate in a secure fashion with other
  2522. // services. For example, an application that handles customer requests
  2523. // might include separate services to handle tasks such as backend data
  2524. // analysis or API requests from mobile devices. Each service has a
  2525. // collection of versions that define a specific set of code used to
  2526. // implement the functionality of that service.
  2527. type Service struct {
  2528. // Id: Relative name of the service within the application. Example:
  2529. // default.@OutputOnly
  2530. Id string `json:"id,omitempty"`
  2531. // Name: Full path to the Service resource in the API. Example:
  2532. // apps/myapp/services/default.@OutputOnly
  2533. Name string `json:"name,omitempty"`
  2534. // Split: Mapping that defines fractional HTTP traffic diversion to
  2535. // different versions within the service.
  2536. Split *TrafficSplit `json:"split,omitempty"`
  2537. // ServerResponse contains the HTTP response code and headers from the
  2538. // server.
  2539. googleapi.ServerResponse `json:"-"`
  2540. // ForceSendFields is a list of field names (e.g. "Id") to
  2541. // unconditionally include in API requests. By default, fields with
  2542. // empty values are omitted from API requests. However, any non-pointer,
  2543. // non-interface field appearing in ForceSendFields will be sent to the
  2544. // server regardless of whether the field is empty or not. This may be
  2545. // used to include empty fields in Patch requests.
  2546. ForceSendFields []string `json:"-"`
  2547. // NullFields is a list of field names (e.g. "Id") to include in API
  2548. // requests with the JSON null value. By default, fields with empty
  2549. // values are omitted from API requests. However, any field with an
  2550. // empty value appearing in NullFields will be sent to the server as
  2551. // null. It is an error if a field in this list has a non-empty value.
  2552. // This may be used to include null fields in Patch requests.
  2553. NullFields []string `json:"-"`
  2554. }
  2555. func (s *Service) MarshalJSON() ([]byte, error) {
  2556. type NoMethod Service
  2557. raw := NoMethod(*s)
  2558. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2559. }
  2560. // SslSettings: SSL configuration for a DomainMapping resource.
  2561. type SslSettings struct {
  2562. // CertificateId: ID of the AuthorizedCertificate resource configuring
  2563. // SSL for the application. Clearing this field will remove SSL
  2564. // support.By default, a managed certificate is automatically created
  2565. // for every domain mapping. To omit SSL support or to configure SSL
  2566. // manually, specify SslManagementType.MANUAL on a CREATE or UPDATE
  2567. // request. You must be authorized to administer the
  2568. // AuthorizedCertificate resource to manually map it to a DomainMapping
  2569. // resource. Example: 12345.
  2570. CertificateId string `json:"certificateId,omitempty"`
  2571. // PendingManagedCertificateId: ID of the managed AuthorizedCertificate
  2572. // resource currently being provisioned, if applicable. Until the new
  2573. // managed certificate has been successfully provisioned, the previous
  2574. // SSL state will be preserved. Once the provisioning process completes,
  2575. // the certificate_id field will reflect the new managed certificate and
  2576. // this field will be left empty. To remove SSL support while there is
  2577. // still a pending managed certificate, clear the certificate_id field
  2578. // with an UpdateDomainMappingRequest.@OutputOnly
  2579. PendingManagedCertificateId string `json:"pendingManagedCertificateId,omitempty"`
  2580. // SslManagementType: SSL management type for this domain. If AUTOMATIC,
  2581. // a managed certificate is automatically provisioned. If MANUAL,
  2582. // certificate_id must be manually specified in order to configure SSL
  2583. // for this domain.
  2584. //
  2585. // Possible values:
  2586. // "AUTOMATIC" - SSL support for this domain is configured
  2587. // automatically. The mapped SSL certificate will be automatically
  2588. // renewed.
  2589. // "MANUAL" - SSL support for this domain is configured manually by
  2590. // the user. Either the domain has no SSL support or a user-obtained SSL
  2591. // certificate has been explictly mapped to this domain.
  2592. SslManagementType string `json:"sslManagementType,omitempty"`
  2593. // ForceSendFields is a list of field names (e.g. "CertificateId") to
  2594. // unconditionally include in API requests. By default, fields with
  2595. // empty values are omitted from API requests. However, any non-pointer,
  2596. // non-interface field appearing in ForceSendFields will be sent to the
  2597. // server regardless of whether the field is empty or not. This may be
  2598. // used to include empty fields in Patch requests.
  2599. ForceSendFields []string `json:"-"`
  2600. // NullFields is a list of field names (e.g. "CertificateId") to include
  2601. // in API requests with the JSON null value. By default, fields with
  2602. // empty values are omitted from API requests. However, any field with
  2603. // an empty value appearing in NullFields will be sent to the server as
  2604. // null. It is an error if a field in this list has a non-empty value.
  2605. // This may be used to include null fields in Patch requests.
  2606. NullFields []string `json:"-"`
  2607. }
  2608. func (s *SslSettings) MarshalJSON() ([]byte, error) {
  2609. type NoMethod SslSettings
  2610. raw := NoMethod(*s)
  2611. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2612. }
  2613. // StandardSchedulerSettings: Scheduler settings for standard
  2614. // environment.
  2615. type StandardSchedulerSettings struct {
  2616. // MaxInstances: Maximum number of instances to run for this version.
  2617. // Set to zero to disable max_instances configuration.
  2618. MaxInstances int64 `json:"maxInstances,omitempty"`
  2619. // MinInstances: Minimum number of instances to run for this version.
  2620. // Set to zero to disable min_instances configuration.
  2621. MinInstances int64 `json:"minInstances,omitempty"`
  2622. // TargetCpuUtilization: Target CPU utilization ratio to maintain when
  2623. // scaling.
  2624. TargetCpuUtilization float64 `json:"targetCpuUtilization,omitempty"`
  2625. // TargetThroughputUtilization: Target throughput utilization ratio to
  2626. // maintain when scaling
  2627. TargetThroughputUtilization float64 `json:"targetThroughputUtilization,omitempty"`
  2628. // ForceSendFields is a list of field names (e.g. "MaxInstances") to
  2629. // unconditionally include in API requests. By default, fields with
  2630. // empty values are omitted from API requests. However, any non-pointer,
  2631. // non-interface field appearing in ForceSendFields will be sent to the
  2632. // server regardless of whether the field is empty or not. This may be
  2633. // used to include empty fields in Patch requests.
  2634. ForceSendFields []string `json:"-"`
  2635. // NullFields is a list of field names (e.g. "MaxInstances") to include
  2636. // in API requests with the JSON null value. By default, fields with
  2637. // empty values are omitted from API requests. However, any field with
  2638. // an empty value appearing in NullFields will be sent to the server as
  2639. // null. It is an error if a field in this list has a non-empty value.
  2640. // This may be used to include null fields in Patch requests.
  2641. NullFields []string `json:"-"`
  2642. }
  2643. func (s *StandardSchedulerSettings) MarshalJSON() ([]byte, error) {
  2644. type NoMethod StandardSchedulerSettings
  2645. raw := NoMethod(*s)
  2646. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2647. }
  2648. func (s *StandardSchedulerSettings) UnmarshalJSON(data []byte) error {
  2649. type NoMethod StandardSchedulerSettings
  2650. var s1 struct {
  2651. TargetCpuUtilization gensupport.JSONFloat64 `json:"targetCpuUtilization"`
  2652. TargetThroughputUtilization gensupport.JSONFloat64 `json:"targetThroughputUtilization"`
  2653. *NoMethod
  2654. }
  2655. s1.NoMethod = (*NoMethod)(s)
  2656. if err := json.Unmarshal(data, &s1); err != nil {
  2657. return err
  2658. }
  2659. s.TargetCpuUtilization = float64(s1.TargetCpuUtilization)
  2660. s.TargetThroughputUtilization = float64(s1.TargetThroughputUtilization)
  2661. return nil
  2662. }
  2663. // StaticFilesHandler: Files served directly to the user for a given
  2664. // URL, such as images, CSS stylesheets, or JavaScript source files.
  2665. // Static file handlers describe which files in the application
  2666. // directory are static files, and which URLs serve them.
  2667. type StaticFilesHandler struct {
  2668. // ApplicationReadable: Whether files should also be uploaded as code
  2669. // data. By default, files declared in static file handlers are uploaded
  2670. // as static data and are only served to end users; they cannot be read
  2671. // by the application. If enabled, uploads are charged against both your
  2672. // code and static data storage resource quotas.
  2673. ApplicationReadable bool `json:"applicationReadable,omitempty"`
  2674. // Expiration: Time a static file served by this handler should be
  2675. // cached by web proxies and browsers.
  2676. Expiration string `json:"expiration,omitempty"`
  2677. // HttpHeaders: HTTP headers to use for all responses from these URLs.
  2678. HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
  2679. // MimeType: MIME type used to serve all files served by this
  2680. // handler.Defaults to file-specific MIME types, which are derived from
  2681. // each file's filename extension.
  2682. MimeType string `json:"mimeType,omitempty"`
  2683. // Path: Path to the static files matched by the URL pattern, from the
  2684. // application root directory. The path can refer to text matched in
  2685. // groupings in the URL pattern.
  2686. Path string `json:"path,omitempty"`
  2687. // RequireMatchingFile: Whether this handler should match the request if
  2688. // the file referenced by the handler does not exist.
  2689. RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
  2690. // UploadPathRegex: Regular expression that matches the file paths for
  2691. // all files that should be referenced by this handler.
  2692. UploadPathRegex string `json:"uploadPathRegex,omitempty"`
  2693. // ForceSendFields is a list of field names (e.g. "ApplicationReadable")
  2694. // to unconditionally include in API requests. By default, fields with
  2695. // empty values are omitted from API requests. However, any non-pointer,
  2696. // non-interface field appearing in ForceSendFields will be sent to the
  2697. // server regardless of whether the field is empty or not. This may be
  2698. // used to include empty fields in Patch requests.
  2699. ForceSendFields []string `json:"-"`
  2700. // NullFields is a list of field names (e.g. "ApplicationReadable") to
  2701. // include in API requests with the JSON null value. By default, fields
  2702. // with empty values are omitted from API requests. However, any field
  2703. // with an empty value appearing in NullFields will be sent to the
  2704. // server as null. It is an error if a field in this list has a
  2705. // non-empty value. This may be used to include null fields in Patch
  2706. // requests.
  2707. NullFields []string `json:"-"`
  2708. }
  2709. func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) {
  2710. type NoMethod StaticFilesHandler
  2711. raw := NoMethod(*s)
  2712. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2713. }
  2714. // Status: The Status type defines a logical error model that is
  2715. // suitable for different programming environments, including REST APIs
  2716. // and RPC APIs. It is used by gRPC (https://github.com/grpc). The error
  2717. // model is designed to be:
  2718. // Simple to use and understand for most users
  2719. // Flexible enough to meet unexpected needsOverviewThe Status message
  2720. // contains three pieces of data: error code, error message, and error
  2721. // details. The error code should be an enum value of google.rpc.Code,
  2722. // but it may accept additional error codes if needed. The error message
  2723. // should be a developer-facing English message that helps developers
  2724. // understand and resolve the error. If a localized user-facing error
  2725. // message is needed, put the localized message in the error details or
  2726. // localize it in the client. The optional error details may contain
  2727. // arbitrary information about the error. There is a predefined set of
  2728. // error detail types in the package google.rpc that can be used for
  2729. // common error conditions.Language mappingThe Status message is the
  2730. // logical representation of the error model, but it is not necessarily
  2731. // the actual wire format. When the Status message is exposed in
  2732. // different client libraries and different wire protocols, it can be
  2733. // mapped differently. For example, it will likely be mapped to some
  2734. // exceptions in Java, but more likely mapped to some error codes in
  2735. // C.Other usesThe error model and the Status message can be used in a
  2736. // variety of environments, either with or without APIs, to provide a
  2737. // consistent developer experience across different environments.Example
  2738. // uses of this error model include:
  2739. // Partial errors. If a service needs to return partial errors to the
  2740. // client, it may embed the Status in the normal response to indicate
  2741. // the partial errors.
  2742. // Workflow errors. A typical workflow has multiple steps. Each step may
  2743. // have a Status message for error reporting.
  2744. // Batch operations. If a client uses batch request and batch response,
  2745. // the Status message should be used directly inside batch response, one
  2746. // for each error sub-response.
  2747. // Asynchronous operations. If an API call embeds asynchronous operation
  2748. // results in its response, the status of those operations should be
  2749. // represented directly using the Status message.
  2750. // Logging. If some API errors are stored in logs, the message Status
  2751. // could be used directly after any stripping needed for
  2752. // security/privacy reasons.
  2753. type Status struct {
  2754. // Code: The status code, which should be an enum value of
  2755. // google.rpc.Code.
  2756. Code int64 `json:"code,omitempty"`
  2757. // Details: A list of messages that carry the error details. There is a
  2758. // common set of message types for APIs to use.
  2759. Details []googleapi.RawMessage `json:"details,omitempty"`
  2760. // Message: A developer-facing error message, which should be in
  2761. // English. Any user-facing error message should be localized and sent
  2762. // in the google.rpc.Status.details field, or localized by the client.
  2763. Message string `json:"message,omitempty"`
  2764. // ForceSendFields is a list of field names (e.g. "Code") to
  2765. // unconditionally include in API requests. By default, fields with
  2766. // empty values are omitted from API requests. However, any non-pointer,
  2767. // non-interface field appearing in ForceSendFields will be sent to the
  2768. // server regardless of whether the field is empty or not. This may be
  2769. // used to include empty fields in Patch requests.
  2770. ForceSendFields []string `json:"-"`
  2771. // NullFields is a list of field names (e.g. "Code") to include in API
  2772. // requests with the JSON null value. By default, fields with empty
  2773. // values are omitted from API requests. However, any field with an
  2774. // empty value appearing in NullFields will be sent to the server as
  2775. // null. It is an error if a field in this list has a non-empty value.
  2776. // This may be used to include null fields in Patch requests.
  2777. NullFields []string `json:"-"`
  2778. }
  2779. func (s *Status) MarshalJSON() ([]byte, error) {
  2780. type NoMethod Status
  2781. raw := NoMethod(*s)
  2782. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2783. }
  2784. // TrafficSplit: Traffic routing configuration for versions within a
  2785. // single service. Traffic splits define how traffic directed to the
  2786. // service is assigned to versions.
  2787. type TrafficSplit struct {
  2788. // Allocations: Mapping from version IDs within the service to
  2789. // fractional (0.000, 1] allocations of traffic for that version. Each
  2790. // version can be specified only once, but some versions in the service
  2791. // may not have any traffic allocation. Services that have traffic
  2792. // allocated cannot be deleted until either the service is deleted or
  2793. // their traffic allocation is removed. Allocations must sum to 1. Up to
  2794. // two decimal place precision is supported for IP-based splits and up
  2795. // to three decimal places is supported for cookie-based splits.
  2796. Allocations map[string]float64 `json:"allocations,omitempty"`
  2797. // ShardBy: Mechanism used to determine which version a request is sent
  2798. // to. The traffic selection algorithm will be stable for either type
  2799. // until allocations are changed.
  2800. //
  2801. // Possible values:
  2802. // "UNSPECIFIED" - Diversion method unspecified.
  2803. // "COOKIE" - Diversion based on a specially named cookie,
  2804. // "GOOGAPPUID." The cookie must be set by the application itself or no
  2805. // diversion will occur.
  2806. // "IP" - Diversion based on applying the modulus operation to a
  2807. // fingerprint of the IP address.
  2808. // "RANDOM" - Diversion based on weighted random assignment. An
  2809. // incoming request is randomly routed to a version in the traffic
  2810. // split, with probability proportional to the version's traffic share.
  2811. ShardBy string `json:"shardBy,omitempty"`
  2812. // ForceSendFields is a list of field names (e.g. "Allocations") to
  2813. // unconditionally include in API requests. By default, fields with
  2814. // empty values are omitted from API requests. However, any non-pointer,
  2815. // non-interface field appearing in ForceSendFields will be sent to the
  2816. // server regardless of whether the field is empty or not. This may be
  2817. // used to include empty fields in Patch requests.
  2818. ForceSendFields []string `json:"-"`
  2819. // NullFields is a list of field names (e.g. "Allocations") to include
  2820. // in API requests with the JSON null value. By default, fields with
  2821. // empty values are omitted from API requests. However, any field with
  2822. // an empty value appearing in NullFields will be sent to the server as
  2823. // null. It is an error if a field in this list has a non-empty value.
  2824. // This may be used to include null fields in Patch requests.
  2825. NullFields []string `json:"-"`
  2826. }
  2827. func (s *TrafficSplit) MarshalJSON() ([]byte, error) {
  2828. type NoMethod TrafficSplit
  2829. raw := NoMethod(*s)
  2830. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2831. }
  2832. // UrlDispatchRule: Rules to match an HTTP request and dispatch that
  2833. // request to a service.
  2834. type UrlDispatchRule struct {
  2835. // Domain: Domain name to match against. The wildcard "*" is supported
  2836. // if specified before a period: "*.".Defaults to matching all domains:
  2837. // "*".
  2838. Domain string `json:"domain,omitempty"`
  2839. // Path: Pathname within the host. Must start with a "/". A single "*"
  2840. // can be included at the end of the path.The sum of the lengths of the
  2841. // domain and path may not exceed 100 characters.
  2842. Path string `json:"path,omitempty"`
  2843. // Service: Resource ID of a service in this application that should
  2844. // serve the matched request. The service must already exist. Example:
  2845. // default.
  2846. Service string `json:"service,omitempty"`
  2847. // ForceSendFields is a list of field names (e.g. "Domain") to
  2848. // unconditionally include in API requests. By default, fields with
  2849. // empty values are omitted from API requests. However, any non-pointer,
  2850. // non-interface field appearing in ForceSendFields will be sent to the
  2851. // server regardless of whether the field is empty or not. This may be
  2852. // used to include empty fields in Patch requests.
  2853. ForceSendFields []string `json:"-"`
  2854. // NullFields is a list of field names (e.g. "Domain") to include in API
  2855. // requests with the JSON null value. By default, fields with empty
  2856. // values are omitted from API requests. However, any field with an
  2857. // empty value appearing in NullFields will be sent to the server as
  2858. // null. It is an error if a field in this list has a non-empty value.
  2859. // This may be used to include null fields in Patch requests.
  2860. NullFields []string `json:"-"`
  2861. }
  2862. func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) {
  2863. type NoMethod UrlDispatchRule
  2864. raw := NoMethod(*s)
  2865. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2866. }
  2867. // UrlMap: URL pattern and description of how the URL should be handled.
  2868. // App Engine can handle URLs by executing application code or by
  2869. // serving static files uploaded with the version, such as images, CSS,
  2870. // or JavaScript.
  2871. type UrlMap struct {
  2872. // ApiEndpoint: Uses API Endpoints to handle requests.
  2873. ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"`
  2874. // AuthFailAction: Action to take when users access resources that
  2875. // require authentication. Defaults to redirect.
  2876. //
  2877. // Possible values:
  2878. // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified.
  2879. // AUTH_FAIL_ACTION_REDIRECT is assumed.
  2880. // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to
  2881. // "accounts.google.com". The user is redirected back to the application
  2882. // URL after signing in or creating an account.
  2883. // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP
  2884. // status code and an error message.
  2885. AuthFailAction string `json:"authFailAction,omitempty"`
  2886. // Login: Level of login required to access this resource. Not supported
  2887. // for Node.js in the App Engine standard environment.
  2888. //
  2889. // Possible values:
  2890. // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed.
  2891. // "LOGIN_OPTIONAL" - Does not require that the user is signed in.
  2892. // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action
  2893. // is taken. In addition, if the user is not an administrator for the
  2894. // application, they are given an error message regardless of
  2895. // auth_fail_action. If the user is an administrator, the handler
  2896. // proceeds.
  2897. // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds
  2898. // normally. Otherwise, the auth_fail_action is taken.
  2899. Login string `json:"login,omitempty"`
  2900. // RedirectHttpResponseCode: 30x code to use when performing redirects
  2901. // for the secure field. Defaults to 302.
  2902. //
  2903. // Possible values:
  2904. // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" - Not specified. 302 is
  2905. // assumed.
  2906. // "REDIRECT_HTTP_RESPONSE_CODE_301" - 301 Moved Permanently code.
  2907. // "REDIRECT_HTTP_RESPONSE_CODE_302" - 302 Moved Temporarily code.
  2908. // "REDIRECT_HTTP_RESPONSE_CODE_303" - 303 See Other code.
  2909. // "REDIRECT_HTTP_RESPONSE_CODE_307" - 307 Temporary Redirect code.
  2910. RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"`
  2911. // Script: Executes a script to handle the requests that match this URL
  2912. // pattern. Only the auto value is supported for Node.js in the App
  2913. // Engine standard environment, for example "script": "auto".
  2914. Script *ScriptHandler `json:"script,omitempty"`
  2915. // SecurityLevel: Security (HTTPS) enforcement for this URL.
  2916. //
  2917. // Possible values:
  2918. // "SECURE_UNSPECIFIED" - Not specified.
  2919. // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that
  2920. // match the handler succeed without redirects. The application can
  2921. // examine the request to determine which protocol was used, and respond
  2922. // accordingly.
  2923. // "SECURE_NEVER" - Requests for a URL that match this handler that
  2924. // use HTTPS are automatically redirected to the HTTP equivalent URL.
  2925. // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that
  2926. // match the handler succeed without redirects. The application can
  2927. // examine the request to determine which protocol was used and respond
  2928. // accordingly.
  2929. // "SECURE_ALWAYS" - Requests for a URL that match this handler that
  2930. // do not use HTTPS are automatically redirected to the HTTPS URL with
  2931. // the same path. Query parameters are reserved for the redirect.
  2932. SecurityLevel string `json:"securityLevel,omitempty"`
  2933. // StaticFiles: Returns the contents of a file, such as an image, as the
  2934. // response.
  2935. StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"`
  2936. // UrlRegex: URL prefix. Uses regular expression syntax, which means
  2937. // regexp special characters must be escaped, but should not contain
  2938. // groupings. All URLs that begin with this prefix are handled by this
  2939. // handler, using the portion of the URL after the prefix as part of the
  2940. // file path.
  2941. UrlRegex string `json:"urlRegex,omitempty"`
  2942. // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to
  2943. // unconditionally include in API requests. By default, fields with
  2944. // empty values are omitted from API requests. However, any non-pointer,
  2945. // non-interface field appearing in ForceSendFields will be sent to the
  2946. // server regardless of whether the field is empty or not. This may be
  2947. // used to include empty fields in Patch requests.
  2948. ForceSendFields []string `json:"-"`
  2949. // NullFields is a list of field names (e.g. "ApiEndpoint") to include
  2950. // in API requests with the JSON null value. By default, fields with
  2951. // empty values are omitted from API requests. However, any field with
  2952. // an empty value appearing in NullFields will be sent to the server as
  2953. // null. It is an error if a field in this list has a non-empty value.
  2954. // This may be used to include null fields in Patch requests.
  2955. NullFields []string `json:"-"`
  2956. }
  2957. func (s *UrlMap) MarshalJSON() ([]byte, error) {
  2958. type NoMethod UrlMap
  2959. raw := NoMethod(*s)
  2960. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2961. }
  2962. // Version: A Version resource is a specific set of source code and
  2963. // configuration files that are deployed into a service.
  2964. type Version struct {
  2965. // ApiConfig: Serving configuration for Google Cloud Endpoints
  2966. // (https://cloud.google.com/appengine/docs/python/endpoints/).Only
  2967. // returned in GET requests if view=FULL is set.
  2968. ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"`
  2969. // AutomaticScaling: Automatic scaling is based on request rate,
  2970. // response latencies, and other application metrics.
  2971. AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"`
  2972. // BasicScaling: A service with basic scaling will create an instance
  2973. // when the application receives a request. The instance will be turned
  2974. // down when the app becomes idle. Basic scaling is ideal for work that
  2975. // is intermittent or driven by user activity.
  2976. BasicScaling *BasicScaling `json:"basicScaling,omitempty"`
  2977. // BetaSettings: Metadata settings that are supplied to this version to
  2978. // enable beta runtime features.
  2979. BetaSettings map[string]string `json:"betaSettings,omitempty"`
  2980. // CreateTime: Time that this version was created.@OutputOnly
  2981. CreateTime string `json:"createTime,omitempty"`
  2982. // CreatedBy: Email address of the user who created this
  2983. // version.@OutputOnly
  2984. CreatedBy string `json:"createdBy,omitempty"`
  2985. // DefaultExpiration: Duration that static files should be cached by web
  2986. // proxies and browsers. Only applicable if the corresponding
  2987. // StaticFilesHandler
  2988. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  2989. // ta/apps.services.versions#StaticFilesHandler) does not specify its
  2990. // own expiration time.Only returned in GET requests if view=FULL is
  2991. // set.
  2992. DefaultExpiration string `json:"defaultExpiration,omitempty"`
  2993. // Deployment: Code and application artifacts that make up this
  2994. // version.Only returned in GET requests if view=FULL is set.
  2995. Deployment *Deployment `json:"deployment,omitempty"`
  2996. // DiskUsageBytes: Total size in bytes of all the files that are
  2997. // included in this version and currently hosted on the App Engine
  2998. // disk.@OutputOnly
  2999. DiskUsageBytes int64 `json:"diskUsageBytes,omitempty,string"`
  3000. // EndpointsApiService: Cloud Endpoints configuration.If
  3001. // endpoints_api_service is set, the Cloud Endpoints Extensible Service
  3002. // Proxy will be provided to serve the API implemented by the app.
  3003. EndpointsApiService *EndpointsApiService `json:"endpointsApiService,omitempty"`
  3004. // Entrypoint: The entrypoint for the application.
  3005. Entrypoint *Entrypoint `json:"entrypoint,omitempty"`
  3006. // Env: App Engine execution environment for this version.Defaults to
  3007. // standard.
  3008. Env string `json:"env,omitempty"`
  3009. // EnvVariables: Environment variables available to the application.Only
  3010. // returned in GET requests if view=FULL is set.
  3011. EnvVariables map[string]string `json:"envVariables,omitempty"`
  3012. // ErrorHandlers: Custom static error pages. Limited to 10KB per
  3013. // page.Only returned in GET requests if view=FULL is set.
  3014. ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"`
  3015. // Handlers: An ordered list of URL-matching patterns that should be
  3016. // applied to incoming requests. The first matching URL handles the
  3017. // request and other request handlers are not attempted.Only returned in
  3018. // GET requests if view=FULL is set.
  3019. Handlers []*UrlMap `json:"handlers,omitempty"`
  3020. // HealthCheck: Configures health checking for instances. Unhealthy
  3021. // instances are stopped and replaced with new instances. Only
  3022. // applicable in the App Engine flexible environment.Only returned in
  3023. // GET requests if view=FULL is set.
  3024. HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
  3025. // Id: Relative name of the version within the service. Example: v1.
  3026. // Version names can contain only lowercase letters, numbers, or
  3027. // hyphens. Reserved names: "default", "latest", and any name with the
  3028. // prefix "ah-".
  3029. Id string `json:"id,omitempty"`
  3030. // InboundServices: Before an application can receive email or XMPP
  3031. // messages, the application must be configured to enable the service.
  3032. //
  3033. // Possible values:
  3034. // "INBOUND_SERVICE_UNSPECIFIED" - Not specified.
  3035. // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail.
  3036. // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive
  3037. // email-bound notifications.
  3038. // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive
  3039. // error stanzas.
  3040. // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive
  3041. // instant messages.
  3042. // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive
  3043. // user subscription POSTs.
  3044. // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive
  3045. // a user's chat presence.
  3046. // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for
  3047. // notifications when a client connects or disconnects from a channel.
  3048. // "INBOUND_SERVICE_WARMUP" - Enables warmup requests.
  3049. InboundServices []string `json:"inboundServices,omitempty"`
  3050. // InstanceClass: Instance class that is used to run this version. Valid
  3051. // values are:
  3052. // AutomaticScaling: F1, F2, F4, F4_1G
  3053. // ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1
  3054. // for AutomaticScaling and B1 for ManualScaling or BasicScaling.
  3055. InstanceClass string `json:"instanceClass,omitempty"`
  3056. // Libraries: Configuration for third-party Python runtime libraries
  3057. // that are required by the application.Only returned in GET requests if
  3058. // view=FULL is set.
  3059. Libraries []*Library `json:"libraries,omitempty"`
  3060. // LivenessCheck: Configures liveness health checking for instances.
  3061. // Unhealthy instances are stopped and replaced with new instancesOnly
  3062. // returned in GET requests if view=FULL is set.
  3063. LivenessCheck *LivenessCheck `json:"livenessCheck,omitempty"`
  3064. // ManualScaling: A service with manual scaling runs continuously,
  3065. // allowing you to perform complex initialization and rely on the state
  3066. // of its memory over time.
  3067. ManualScaling *ManualScaling `json:"manualScaling,omitempty"`
  3068. // Name: Full path to the Version resource in the API. Example:
  3069. // apps/myapp/services/default/versions/v1.@OutputOnly
  3070. Name string `json:"name,omitempty"`
  3071. // Network: Extra network settings. Only applicable in the App Engine
  3072. // flexible environment.
  3073. Network *Network `json:"network,omitempty"`
  3074. // NobuildFilesRegex: Files that match this pattern will not be built
  3075. // into this version. Only applicable for Go runtimes.Only returned in
  3076. // GET requests if view=FULL is set.
  3077. NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"`
  3078. // ReadinessCheck: Configures readiness health checking for instances.
  3079. // Unhealthy instances are not put into the backend traffic
  3080. // rotation.Only returned in GET requests if view=FULL is set.
  3081. ReadinessCheck *ReadinessCheck `json:"readinessCheck,omitempty"`
  3082. // Resources: Machine resources for this version. Only applicable in the
  3083. // App Engine flexible environment.
  3084. Resources *Resources `json:"resources,omitempty"`
  3085. // Runtime: Desired runtime. Example: python27.
  3086. Runtime string `json:"runtime,omitempty"`
  3087. // RuntimeApiVersion: The version of the API in the given runtime
  3088. // environment. Please see the app.yaml reference for valid values at
  3089. // https://cloud.google.com/appengine/docs/standard/<language>/config/appref
  3090. RuntimeApiVersion string `json:"runtimeApiVersion,omitempty"`
  3091. // RuntimeChannel: The channel of the runtime to use. Only available for
  3092. // some runtimes. Defaults to the default channel.
  3093. RuntimeChannel string `json:"runtimeChannel,omitempty"`
  3094. // RuntimeMainExecutablePath: The path or name of the app's main
  3095. // executable.
  3096. RuntimeMainExecutablePath string `json:"runtimeMainExecutablePath,omitempty"`
  3097. // ServingStatus: Current serving status of this version. Only the
  3098. // versions with a SERVING status create instances and can be
  3099. // billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to
  3100. // SERVING.
  3101. //
  3102. // Possible values:
  3103. // "SERVING_STATUS_UNSPECIFIED" - Not specified.
  3104. // "SERVING" - Currently serving. Instances are created according to
  3105. // the scaling settings of the version.
  3106. // "STOPPED" - Disabled. No instances will be created and the scaling
  3107. // settings are ignored until the state of the version changes to
  3108. // SERVING.
  3109. ServingStatus string `json:"servingStatus,omitempty"`
  3110. // Threadsafe: Whether multiple requests can be dispatched to this
  3111. // version at once.
  3112. Threadsafe bool `json:"threadsafe,omitempty"`
  3113. // VersionUrl: Serving URL for this version. Example:
  3114. // "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly
  3115. VersionUrl string `json:"versionUrl,omitempty"`
  3116. // Vm: Whether to deploy this version in a container on a virtual
  3117. // machine.
  3118. Vm bool `json:"vm,omitempty"`
  3119. // VpcAccessConnector: Enables VPC connectivity for standard apps.
  3120. VpcAccessConnector *VpcAccessConnector `json:"vpcAccessConnector,omitempty"`
  3121. // Zones: The Google Compute Engine zones that are supported by this
  3122. // version in the App Engine flexible environment. Deprecated.
  3123. Zones []string `json:"zones,omitempty"`
  3124. // ServerResponse contains the HTTP response code and headers from the
  3125. // server.
  3126. googleapi.ServerResponse `json:"-"`
  3127. // ForceSendFields is a list of field names (e.g. "ApiConfig") to
  3128. // unconditionally include in API requests. By default, fields with
  3129. // empty values are omitted from API requests. However, any non-pointer,
  3130. // non-interface field appearing in ForceSendFields will be sent to the
  3131. // server regardless of whether the field is empty or not. This may be
  3132. // used to include empty fields in Patch requests.
  3133. ForceSendFields []string `json:"-"`
  3134. // NullFields is a list of field names (e.g. "ApiConfig") to include in
  3135. // API requests with the JSON null value. By default, fields with empty
  3136. // values are omitted from API requests. However, any field with an
  3137. // empty value appearing in NullFields will be sent to the server as
  3138. // null. It is an error if a field in this list has a non-empty value.
  3139. // This may be used to include null fields in Patch requests.
  3140. NullFields []string `json:"-"`
  3141. }
  3142. func (s *Version) MarshalJSON() ([]byte, error) {
  3143. type NoMethod Version
  3144. raw := NoMethod(*s)
  3145. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3146. }
  3147. // Volume: Volumes mounted within the app container. Only applicable in
  3148. // the App Engine flexible environment.
  3149. type Volume struct {
  3150. // Name: Unique name for the volume.
  3151. Name string `json:"name,omitempty"`
  3152. // SizeGb: Volume size in gigabytes.
  3153. SizeGb float64 `json:"sizeGb,omitempty"`
  3154. // VolumeType: Underlying volume type, e.g. 'tmpfs'.
  3155. VolumeType string `json:"volumeType,omitempty"`
  3156. // ForceSendFields is a list of field names (e.g. "Name") to
  3157. // unconditionally include in API requests. By default, fields with
  3158. // empty values are omitted from API requests. However, any non-pointer,
  3159. // non-interface field appearing in ForceSendFields will be sent to the
  3160. // server regardless of whether the field is empty or not. This may be
  3161. // used to include empty fields in Patch requests.
  3162. ForceSendFields []string `json:"-"`
  3163. // NullFields is a list of field names (e.g. "Name") to include in API
  3164. // requests with the JSON null value. By default, fields with empty
  3165. // values are omitted from API requests. However, any field with an
  3166. // empty value appearing in NullFields will be sent to the server as
  3167. // null. It is an error if a field in this list has a non-empty value.
  3168. // This may be used to include null fields in Patch requests.
  3169. NullFields []string `json:"-"`
  3170. }
  3171. func (s *Volume) MarshalJSON() ([]byte, error) {
  3172. type NoMethod Volume
  3173. raw := NoMethod(*s)
  3174. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3175. }
  3176. func (s *Volume) UnmarshalJSON(data []byte) error {
  3177. type NoMethod Volume
  3178. var s1 struct {
  3179. SizeGb gensupport.JSONFloat64 `json:"sizeGb"`
  3180. *NoMethod
  3181. }
  3182. s1.NoMethod = (*NoMethod)(s)
  3183. if err := json.Unmarshal(data, &s1); err != nil {
  3184. return err
  3185. }
  3186. s.SizeGb = float64(s1.SizeGb)
  3187. return nil
  3188. }
  3189. // VpcAccessConnector: VPC access connector specification.
  3190. type VpcAccessConnector struct {
  3191. // Name: Full Serverless VPC Access Connector name e.g.
  3192. // /projects/my-project/locations/us-central1/connectors/c1.
  3193. Name string `json:"name,omitempty"`
  3194. // ForceSendFields is a list of field names (e.g. "Name") to
  3195. // unconditionally include in API requests. By default, fields with
  3196. // empty values are omitted from API requests. However, any non-pointer,
  3197. // non-interface field appearing in ForceSendFields will be sent to the
  3198. // server regardless of whether the field is empty or not. This may be
  3199. // used to include empty fields in Patch requests.
  3200. ForceSendFields []string `json:"-"`
  3201. // NullFields is a list of field names (e.g. "Name") to include in API
  3202. // requests with the JSON null value. By default, fields with empty
  3203. // values are omitted from API requests. However, any field with an
  3204. // empty value appearing in NullFields will be sent to the server as
  3205. // null. It is an error if a field in this list has a non-empty value.
  3206. // This may be used to include null fields in Patch requests.
  3207. NullFields []string `json:"-"`
  3208. }
  3209. func (s *VpcAccessConnector) MarshalJSON() ([]byte, error) {
  3210. type NoMethod VpcAccessConnector
  3211. raw := NoMethod(*s)
  3212. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3213. }
  3214. // ZipInfo: The zip file information for a zip deployment.
  3215. type ZipInfo struct {
  3216. // FilesCount: An estimate of the number of files in a zip for a zip
  3217. // deployment. If set, must be greater than or equal to the actual
  3218. // number of files. Used for optimizing performance; if not provided,
  3219. // deployment may be slow.
  3220. FilesCount int64 `json:"filesCount,omitempty"`
  3221. // SourceUrl: URL of the zip file to deploy from. Must be a URL to a
  3222. // resource in Google Cloud Storage in the form
  3223. // 'http(s)://storage.googleapis.com/<bucket>/<object>'.
  3224. SourceUrl string `json:"sourceUrl,omitempty"`
  3225. // ForceSendFields is a list of field names (e.g. "FilesCount") to
  3226. // unconditionally include in API requests. By default, fields with
  3227. // empty values are omitted from API requests. However, any non-pointer,
  3228. // non-interface field appearing in ForceSendFields will be sent to the
  3229. // server regardless of whether the field is empty or not. This may be
  3230. // used to include empty fields in Patch requests.
  3231. ForceSendFields []string `json:"-"`
  3232. // NullFields is a list of field names (e.g. "FilesCount") to include in
  3233. // API requests with the JSON null value. By default, fields with empty
  3234. // values are omitted from API requests. However, any field with an
  3235. // empty value appearing in NullFields will be sent to the server as
  3236. // null. It is an error if a field in this list has a non-empty value.
  3237. // This may be used to include null fields in Patch requests.
  3238. NullFields []string `json:"-"`
  3239. }
  3240. func (s *ZipInfo) MarshalJSON() ([]byte, error) {
  3241. type NoMethod ZipInfo
  3242. raw := NoMethod(*s)
  3243. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3244. }
  3245. // method id "appengine.apps.create":
  3246. type AppsCreateCall struct {
  3247. s *APIService
  3248. application *Application
  3249. urlParams_ gensupport.URLParams
  3250. ctx_ context.Context
  3251. header_ http.Header
  3252. }
  3253. // Create: Creates an App Engine application for a Google Cloud Platform
  3254. // project. Required fields:
  3255. // id - The ID of the target Cloud Platform project.
  3256. // location - The region
  3257. // (https://cloud.google.com/appengine/docs/locations) where you want
  3258. // the App Engine application located.For more information about App
  3259. // Engine applications, see Managing Projects, Applications, and Billing
  3260. // (https://cloud.google.com/appengine/docs/standard/python/console/).
  3261. func (r *AppsService) Create(application *Application) *AppsCreateCall {
  3262. c := &AppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3263. c.application = application
  3264. return c
  3265. }
  3266. // Fields allows partial responses to be retrieved. See
  3267. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3268. // for more information.
  3269. func (c *AppsCreateCall) Fields(s ...googleapi.Field) *AppsCreateCall {
  3270. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3271. return c
  3272. }
  3273. // Context sets the context to be used in this call's Do method. Any
  3274. // pending HTTP request will be aborted if the provided context is
  3275. // canceled.
  3276. func (c *AppsCreateCall) Context(ctx context.Context) *AppsCreateCall {
  3277. c.ctx_ = ctx
  3278. return c
  3279. }
  3280. // Header returns an http.Header that can be modified by the caller to
  3281. // add HTTP headers to the request.
  3282. func (c *AppsCreateCall) Header() http.Header {
  3283. if c.header_ == nil {
  3284. c.header_ = make(http.Header)
  3285. }
  3286. return c.header_
  3287. }
  3288. func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) {
  3289. reqHeaders := make(http.Header)
  3290. for k, v := range c.header_ {
  3291. reqHeaders[k] = v
  3292. }
  3293. reqHeaders.Set("User-Agent", c.s.userAgent())
  3294. var body io.Reader = nil
  3295. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  3296. if err != nil {
  3297. return nil, err
  3298. }
  3299. reqHeaders.Set("Content-Type", "application/json")
  3300. c.urlParams_.Set("alt", alt)
  3301. c.urlParams_.Set("prettyPrint", "false")
  3302. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps")
  3303. urls += "?" + c.urlParams_.Encode()
  3304. req, err := http.NewRequest("POST", urls, body)
  3305. if err != nil {
  3306. return nil, err
  3307. }
  3308. req.Header = reqHeaders
  3309. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3310. }
  3311. // Do executes the "appengine.apps.create" call.
  3312. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3313. // status code is an error. Response headers are in either
  3314. // *Operation.ServerResponse.Header or (if a response was returned at
  3315. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3316. // to check whether the returned error was because
  3317. // http.StatusNotModified was returned.
  3318. func (c *AppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3319. gensupport.SetOptions(c.urlParams_, opts...)
  3320. res, err := c.doRequest("json")
  3321. if res != nil && res.StatusCode == http.StatusNotModified {
  3322. if res.Body != nil {
  3323. res.Body.Close()
  3324. }
  3325. return nil, &googleapi.Error{
  3326. Code: res.StatusCode,
  3327. Header: res.Header,
  3328. }
  3329. }
  3330. if err != nil {
  3331. return nil, err
  3332. }
  3333. defer googleapi.CloseBody(res)
  3334. if err := googleapi.CheckResponse(res); err != nil {
  3335. return nil, err
  3336. }
  3337. ret := &Operation{
  3338. ServerResponse: googleapi.ServerResponse{
  3339. Header: res.Header,
  3340. HTTPStatusCode: res.StatusCode,
  3341. },
  3342. }
  3343. target := &ret
  3344. if err := gensupport.DecodeResponse(target, res); err != nil {
  3345. return nil, err
  3346. }
  3347. return ret, nil
  3348. // {
  3349. // "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/standard/python/console/).",
  3350. // "flatPath": "v1beta/apps",
  3351. // "httpMethod": "POST",
  3352. // "id": "appengine.apps.create",
  3353. // "parameterOrder": [],
  3354. // "parameters": {},
  3355. // "path": "v1beta/apps",
  3356. // "request": {
  3357. // "$ref": "Application"
  3358. // },
  3359. // "response": {
  3360. // "$ref": "Operation"
  3361. // },
  3362. // "scopes": [
  3363. // "https://www.googleapis.com/auth/cloud-platform"
  3364. // ]
  3365. // }
  3366. }
  3367. // method id "appengine.apps.get":
  3368. type AppsGetCall struct {
  3369. s *APIService
  3370. appsId string
  3371. urlParams_ gensupport.URLParams
  3372. ifNoneMatch_ string
  3373. ctx_ context.Context
  3374. header_ http.Header
  3375. }
  3376. // Get: Gets information about an application.
  3377. func (r *AppsService) Get(appsId string) *AppsGetCall {
  3378. c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3379. c.appsId = appsId
  3380. return c
  3381. }
  3382. // Fields allows partial responses to be retrieved. See
  3383. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3384. // for more information.
  3385. func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
  3386. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3387. return c
  3388. }
  3389. // IfNoneMatch sets the optional parameter which makes the operation
  3390. // fail if the object's ETag matches the given value. This is useful for
  3391. // getting updates only after the object has changed since the last
  3392. // request. Use googleapi.IsNotModified to check whether the response
  3393. // error from Do is the result of In-None-Match.
  3394. func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
  3395. c.ifNoneMatch_ = entityTag
  3396. return c
  3397. }
  3398. // Context sets the context to be used in this call's Do method. Any
  3399. // pending HTTP request will be aborted if the provided context is
  3400. // canceled.
  3401. func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
  3402. c.ctx_ = ctx
  3403. return c
  3404. }
  3405. // Header returns an http.Header that can be modified by the caller to
  3406. // add HTTP headers to the request.
  3407. func (c *AppsGetCall) Header() http.Header {
  3408. if c.header_ == nil {
  3409. c.header_ = make(http.Header)
  3410. }
  3411. return c.header_
  3412. }
  3413. func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
  3414. reqHeaders := make(http.Header)
  3415. for k, v := range c.header_ {
  3416. reqHeaders[k] = v
  3417. }
  3418. reqHeaders.Set("User-Agent", c.s.userAgent())
  3419. if c.ifNoneMatch_ != "" {
  3420. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3421. }
  3422. var body io.Reader = nil
  3423. c.urlParams_.Set("alt", alt)
  3424. c.urlParams_.Set("prettyPrint", "false")
  3425. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}")
  3426. urls += "?" + c.urlParams_.Encode()
  3427. req, err := http.NewRequest("GET", urls, body)
  3428. if err != nil {
  3429. return nil, err
  3430. }
  3431. req.Header = reqHeaders
  3432. googleapi.Expand(req.URL, map[string]string{
  3433. "appsId": c.appsId,
  3434. })
  3435. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3436. }
  3437. // Do executes the "appengine.apps.get" call.
  3438. // Exactly one of *Application or error will be non-nil. Any non-2xx
  3439. // status code is an error. Response headers are in either
  3440. // *Application.ServerResponse.Header or (if a response was returned at
  3441. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3442. // to check whether the returned error was because
  3443. // http.StatusNotModified was returned.
  3444. func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
  3445. gensupport.SetOptions(c.urlParams_, opts...)
  3446. res, err := c.doRequest("json")
  3447. if res != nil && res.StatusCode == http.StatusNotModified {
  3448. if res.Body != nil {
  3449. res.Body.Close()
  3450. }
  3451. return nil, &googleapi.Error{
  3452. Code: res.StatusCode,
  3453. Header: res.Header,
  3454. }
  3455. }
  3456. if err != nil {
  3457. return nil, err
  3458. }
  3459. defer googleapi.CloseBody(res)
  3460. if err := googleapi.CheckResponse(res); err != nil {
  3461. return nil, err
  3462. }
  3463. ret := &Application{
  3464. ServerResponse: googleapi.ServerResponse{
  3465. Header: res.Header,
  3466. HTTPStatusCode: res.StatusCode,
  3467. },
  3468. }
  3469. target := &ret
  3470. if err := gensupport.DecodeResponse(target, res); err != nil {
  3471. return nil, err
  3472. }
  3473. return ret, nil
  3474. // {
  3475. // "description": "Gets information about an application.",
  3476. // "flatPath": "v1beta/apps/{appsId}",
  3477. // "httpMethod": "GET",
  3478. // "id": "appengine.apps.get",
  3479. // "parameterOrder": [
  3480. // "appsId"
  3481. // ],
  3482. // "parameters": {
  3483. // "appsId": {
  3484. // "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.",
  3485. // "location": "path",
  3486. // "required": true,
  3487. // "type": "string"
  3488. // }
  3489. // },
  3490. // "path": "v1beta/apps/{appsId}",
  3491. // "response": {
  3492. // "$ref": "Application"
  3493. // },
  3494. // "scopes": [
  3495. // "https://www.googleapis.com/auth/appengine.admin",
  3496. // "https://www.googleapis.com/auth/cloud-platform",
  3497. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3498. // ]
  3499. // }
  3500. }
  3501. // method id "appengine.apps.patch":
  3502. type AppsPatchCall struct {
  3503. s *APIService
  3504. appsId string
  3505. application *Application
  3506. urlParams_ gensupport.URLParams
  3507. ctx_ context.Context
  3508. header_ http.Header
  3509. }
  3510. // Patch: Updates the specified Application resource. You can update the
  3511. // following fields:
  3512. // auth_domain - Google authentication domain for controlling user
  3513. // access to the application.
  3514. // default_cookie_expiration - Cookie expiration policy for the
  3515. // application.
  3516. func (r *AppsService) Patch(appsId string, application *Application) *AppsPatchCall {
  3517. c := &AppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3518. c.appsId = appsId
  3519. c.application = application
  3520. return c
  3521. }
  3522. // UpdateMask sets the optional parameter "updateMask": Standard field
  3523. // mask for the set of fields to be updated.
  3524. func (c *AppsPatchCall) UpdateMask(updateMask string) *AppsPatchCall {
  3525. c.urlParams_.Set("updateMask", updateMask)
  3526. return c
  3527. }
  3528. // Fields allows partial responses to be retrieved. See
  3529. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3530. // for more information.
  3531. func (c *AppsPatchCall) Fields(s ...googleapi.Field) *AppsPatchCall {
  3532. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3533. return c
  3534. }
  3535. // Context sets the context to be used in this call's Do method. Any
  3536. // pending HTTP request will be aborted if the provided context is
  3537. // canceled.
  3538. func (c *AppsPatchCall) Context(ctx context.Context) *AppsPatchCall {
  3539. c.ctx_ = ctx
  3540. return c
  3541. }
  3542. // Header returns an http.Header that can be modified by the caller to
  3543. // add HTTP headers to the request.
  3544. func (c *AppsPatchCall) Header() http.Header {
  3545. if c.header_ == nil {
  3546. c.header_ = make(http.Header)
  3547. }
  3548. return c.header_
  3549. }
  3550. func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) {
  3551. reqHeaders := make(http.Header)
  3552. for k, v := range c.header_ {
  3553. reqHeaders[k] = v
  3554. }
  3555. reqHeaders.Set("User-Agent", c.s.userAgent())
  3556. var body io.Reader = nil
  3557. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  3558. if err != nil {
  3559. return nil, err
  3560. }
  3561. reqHeaders.Set("Content-Type", "application/json")
  3562. c.urlParams_.Set("alt", alt)
  3563. c.urlParams_.Set("prettyPrint", "false")
  3564. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}")
  3565. urls += "?" + c.urlParams_.Encode()
  3566. req, err := http.NewRequest("PATCH", urls, body)
  3567. if err != nil {
  3568. return nil, err
  3569. }
  3570. req.Header = reqHeaders
  3571. googleapi.Expand(req.URL, map[string]string{
  3572. "appsId": c.appsId,
  3573. })
  3574. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3575. }
  3576. // Do executes the "appengine.apps.patch" call.
  3577. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3578. // status code is an error. Response headers are in either
  3579. // *Operation.ServerResponse.Header or (if a response was returned at
  3580. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3581. // to check whether the returned error was because
  3582. // http.StatusNotModified was returned.
  3583. func (c *AppsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3584. gensupport.SetOptions(c.urlParams_, opts...)
  3585. res, err := c.doRequest("json")
  3586. if res != nil && res.StatusCode == http.StatusNotModified {
  3587. if res.Body != nil {
  3588. res.Body.Close()
  3589. }
  3590. return nil, &googleapi.Error{
  3591. Code: res.StatusCode,
  3592. Header: res.Header,
  3593. }
  3594. }
  3595. if err != nil {
  3596. return nil, err
  3597. }
  3598. defer googleapi.CloseBody(res)
  3599. if err := googleapi.CheckResponse(res); err != nil {
  3600. return nil, err
  3601. }
  3602. ret := &Operation{
  3603. ServerResponse: googleapi.ServerResponse{
  3604. Header: res.Header,
  3605. HTTPStatusCode: res.StatusCode,
  3606. },
  3607. }
  3608. target := &ret
  3609. if err := gensupport.DecodeResponse(target, res); err != nil {
  3610. return nil, err
  3611. }
  3612. return ret, nil
  3613. // {
  3614. // "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain - Google authentication domain for controlling user access to the application.\ndefault_cookie_expiration - Cookie expiration policy for the application.",
  3615. // "flatPath": "v1beta/apps/{appsId}",
  3616. // "httpMethod": "PATCH",
  3617. // "id": "appengine.apps.patch",
  3618. // "parameterOrder": [
  3619. // "appsId"
  3620. // ],
  3621. // "parameters": {
  3622. // "appsId": {
  3623. // "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.",
  3624. // "location": "path",
  3625. // "required": true,
  3626. // "type": "string"
  3627. // },
  3628. // "updateMask": {
  3629. // "description": "Standard field mask for the set of fields to be updated.",
  3630. // "format": "google-fieldmask",
  3631. // "location": "query",
  3632. // "type": "string"
  3633. // }
  3634. // },
  3635. // "path": "v1beta/apps/{appsId}",
  3636. // "request": {
  3637. // "$ref": "Application"
  3638. // },
  3639. // "response": {
  3640. // "$ref": "Operation"
  3641. // },
  3642. // "scopes": [
  3643. // "https://www.googleapis.com/auth/cloud-platform"
  3644. // ]
  3645. // }
  3646. }
  3647. // method id "appengine.apps.repair":
  3648. type AppsRepairCall struct {
  3649. s *APIService
  3650. appsId string
  3651. repairapplicationrequest *RepairApplicationRequest
  3652. urlParams_ gensupport.URLParams
  3653. ctx_ context.Context
  3654. header_ http.Header
  3655. }
  3656. // Repair: Recreates the required App Engine features for the specified
  3657. // App Engine application, for example a Cloud Storage bucket or App
  3658. // Engine service account. Use this method if you receive an error
  3659. // message about a missing feature, for example, Error retrieving the
  3660. // App Engine service account.
  3661. func (r *AppsService) Repair(appsId string, repairapplicationrequest *RepairApplicationRequest) *AppsRepairCall {
  3662. c := &AppsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3663. c.appsId = appsId
  3664. c.repairapplicationrequest = repairapplicationrequest
  3665. return c
  3666. }
  3667. // Fields allows partial responses to be retrieved. See
  3668. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3669. // for more information.
  3670. func (c *AppsRepairCall) Fields(s ...googleapi.Field) *AppsRepairCall {
  3671. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3672. return c
  3673. }
  3674. // Context sets the context to be used in this call's Do method. Any
  3675. // pending HTTP request will be aborted if the provided context is
  3676. // canceled.
  3677. func (c *AppsRepairCall) Context(ctx context.Context) *AppsRepairCall {
  3678. c.ctx_ = ctx
  3679. return c
  3680. }
  3681. // Header returns an http.Header that can be modified by the caller to
  3682. // add HTTP headers to the request.
  3683. func (c *AppsRepairCall) Header() http.Header {
  3684. if c.header_ == nil {
  3685. c.header_ = make(http.Header)
  3686. }
  3687. return c.header_
  3688. }
  3689. func (c *AppsRepairCall) doRequest(alt string) (*http.Response, error) {
  3690. reqHeaders := make(http.Header)
  3691. for k, v := range c.header_ {
  3692. reqHeaders[k] = v
  3693. }
  3694. reqHeaders.Set("User-Agent", c.s.userAgent())
  3695. var body io.Reader = nil
  3696. body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairapplicationrequest)
  3697. if err != nil {
  3698. return nil, err
  3699. }
  3700. reqHeaders.Set("Content-Type", "application/json")
  3701. c.urlParams_.Set("alt", alt)
  3702. c.urlParams_.Set("prettyPrint", "false")
  3703. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}:repair")
  3704. urls += "?" + c.urlParams_.Encode()
  3705. req, err := http.NewRequest("POST", urls, body)
  3706. if err != nil {
  3707. return nil, err
  3708. }
  3709. req.Header = reqHeaders
  3710. googleapi.Expand(req.URL, map[string]string{
  3711. "appsId": c.appsId,
  3712. })
  3713. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3714. }
  3715. // Do executes the "appengine.apps.repair" call.
  3716. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3717. // status code is an error. Response headers are in either
  3718. // *Operation.ServerResponse.Header or (if a response was returned at
  3719. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3720. // to check whether the returned error was because
  3721. // http.StatusNotModified was returned.
  3722. func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3723. gensupport.SetOptions(c.urlParams_, opts...)
  3724. res, err := c.doRequest("json")
  3725. if res != nil && res.StatusCode == http.StatusNotModified {
  3726. if res.Body != nil {
  3727. res.Body.Close()
  3728. }
  3729. return nil, &googleapi.Error{
  3730. Code: res.StatusCode,
  3731. Header: res.Header,
  3732. }
  3733. }
  3734. if err != nil {
  3735. return nil, err
  3736. }
  3737. defer googleapi.CloseBody(res)
  3738. if err := googleapi.CheckResponse(res); err != nil {
  3739. return nil, err
  3740. }
  3741. ret := &Operation{
  3742. ServerResponse: googleapi.ServerResponse{
  3743. Header: res.Header,
  3744. HTTPStatusCode: res.StatusCode,
  3745. },
  3746. }
  3747. target := &ret
  3748. if err := gensupport.DecodeResponse(target, res); err != nil {
  3749. return nil, err
  3750. }
  3751. return ret, nil
  3752. // {
  3753. // "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.",
  3754. // "flatPath": "v1beta/apps/{appsId}:repair",
  3755. // "httpMethod": "POST",
  3756. // "id": "appengine.apps.repair",
  3757. // "parameterOrder": [
  3758. // "appsId"
  3759. // ],
  3760. // "parameters": {
  3761. // "appsId": {
  3762. // "description": "Part of `name`. Name of the application to repair. Example: apps/myapp",
  3763. // "location": "path",
  3764. // "required": true,
  3765. // "type": "string"
  3766. // }
  3767. // },
  3768. // "path": "v1beta/apps/{appsId}:repair",
  3769. // "request": {
  3770. // "$ref": "RepairApplicationRequest"
  3771. // },
  3772. // "response": {
  3773. // "$ref": "Operation"
  3774. // },
  3775. // "scopes": [
  3776. // "https://www.googleapis.com/auth/cloud-platform"
  3777. // ]
  3778. // }
  3779. }
  3780. // method id "appengine.apps.authorizedCertificates.create":
  3781. type AppsAuthorizedCertificatesCreateCall struct {
  3782. s *APIService
  3783. appsId string
  3784. authorizedcertificate *AuthorizedCertificate
  3785. urlParams_ gensupport.URLParams
  3786. ctx_ context.Context
  3787. header_ http.Header
  3788. }
  3789. // Create: Uploads the specified SSL certificate.
  3790. func (r *AppsAuthorizedCertificatesService) Create(appsId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesCreateCall {
  3791. c := &AppsAuthorizedCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3792. c.appsId = appsId
  3793. c.authorizedcertificate = authorizedcertificate
  3794. return c
  3795. }
  3796. // Fields allows partial responses to be retrieved. See
  3797. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3798. // for more information.
  3799. func (c *AppsAuthorizedCertificatesCreateCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesCreateCall {
  3800. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3801. return c
  3802. }
  3803. // Context sets the context to be used in this call's Do method. Any
  3804. // pending HTTP request will be aborted if the provided context is
  3805. // canceled.
  3806. func (c *AppsAuthorizedCertificatesCreateCall) Context(ctx context.Context) *AppsAuthorizedCertificatesCreateCall {
  3807. c.ctx_ = ctx
  3808. return c
  3809. }
  3810. // Header returns an http.Header that can be modified by the caller to
  3811. // add HTTP headers to the request.
  3812. func (c *AppsAuthorizedCertificatesCreateCall) Header() http.Header {
  3813. if c.header_ == nil {
  3814. c.header_ = make(http.Header)
  3815. }
  3816. return c.header_
  3817. }
  3818. func (c *AppsAuthorizedCertificatesCreateCall) doRequest(alt string) (*http.Response, error) {
  3819. reqHeaders := make(http.Header)
  3820. for k, v := range c.header_ {
  3821. reqHeaders[k] = v
  3822. }
  3823. reqHeaders.Set("User-Agent", c.s.userAgent())
  3824. var body io.Reader = nil
  3825. body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate)
  3826. if err != nil {
  3827. return nil, err
  3828. }
  3829. reqHeaders.Set("Content-Type", "application/json")
  3830. c.urlParams_.Set("alt", alt)
  3831. c.urlParams_.Set("prettyPrint", "false")
  3832. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates")
  3833. urls += "?" + c.urlParams_.Encode()
  3834. req, err := http.NewRequest("POST", urls, body)
  3835. if err != nil {
  3836. return nil, err
  3837. }
  3838. req.Header = reqHeaders
  3839. googleapi.Expand(req.URL, map[string]string{
  3840. "appsId": c.appsId,
  3841. })
  3842. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3843. }
  3844. // Do executes the "appengine.apps.authorizedCertificates.create" call.
  3845. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  3846. // non-2xx status code is an error. Response headers are in either
  3847. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  3848. // returned at all) in error.(*googleapi.Error).Header. Use
  3849. // googleapi.IsNotModified to check whether the returned error was
  3850. // because http.StatusNotModified was returned.
  3851. func (c *AppsAuthorizedCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  3852. gensupport.SetOptions(c.urlParams_, opts...)
  3853. res, err := c.doRequest("json")
  3854. if res != nil && res.StatusCode == http.StatusNotModified {
  3855. if res.Body != nil {
  3856. res.Body.Close()
  3857. }
  3858. return nil, &googleapi.Error{
  3859. Code: res.StatusCode,
  3860. Header: res.Header,
  3861. }
  3862. }
  3863. if err != nil {
  3864. return nil, err
  3865. }
  3866. defer googleapi.CloseBody(res)
  3867. if err := googleapi.CheckResponse(res); err != nil {
  3868. return nil, err
  3869. }
  3870. ret := &AuthorizedCertificate{
  3871. ServerResponse: googleapi.ServerResponse{
  3872. Header: res.Header,
  3873. HTTPStatusCode: res.StatusCode,
  3874. },
  3875. }
  3876. target := &ret
  3877. if err := gensupport.DecodeResponse(target, res); err != nil {
  3878. return nil, err
  3879. }
  3880. return ret, nil
  3881. // {
  3882. // "description": "Uploads the specified SSL certificate.",
  3883. // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates",
  3884. // "httpMethod": "POST",
  3885. // "id": "appengine.apps.authorizedCertificates.create",
  3886. // "parameterOrder": [
  3887. // "appsId"
  3888. // ],
  3889. // "parameters": {
  3890. // "appsId": {
  3891. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  3892. // "location": "path",
  3893. // "required": true,
  3894. // "type": "string"
  3895. // }
  3896. // },
  3897. // "path": "v1beta/apps/{appsId}/authorizedCertificates",
  3898. // "request": {
  3899. // "$ref": "AuthorizedCertificate"
  3900. // },
  3901. // "response": {
  3902. // "$ref": "AuthorizedCertificate"
  3903. // },
  3904. // "scopes": [
  3905. // "https://www.googleapis.com/auth/cloud-platform"
  3906. // ]
  3907. // }
  3908. }
  3909. // method id "appengine.apps.authorizedCertificates.delete":
  3910. type AppsAuthorizedCertificatesDeleteCall struct {
  3911. s *APIService
  3912. appsId string
  3913. authorizedCertificatesId string
  3914. urlParams_ gensupport.URLParams
  3915. ctx_ context.Context
  3916. header_ http.Header
  3917. }
  3918. // Delete: Deletes the specified SSL certificate.
  3919. func (r *AppsAuthorizedCertificatesService) Delete(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesDeleteCall {
  3920. c := &AppsAuthorizedCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3921. c.appsId = appsId
  3922. c.authorizedCertificatesId = authorizedCertificatesId
  3923. return c
  3924. }
  3925. // Fields allows partial responses to be retrieved. See
  3926. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3927. // for more information.
  3928. func (c *AppsAuthorizedCertificatesDeleteCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesDeleteCall {
  3929. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3930. return c
  3931. }
  3932. // Context sets the context to be used in this call's Do method. Any
  3933. // pending HTTP request will be aborted if the provided context is
  3934. // canceled.
  3935. func (c *AppsAuthorizedCertificatesDeleteCall) Context(ctx context.Context) *AppsAuthorizedCertificatesDeleteCall {
  3936. c.ctx_ = ctx
  3937. return c
  3938. }
  3939. // Header returns an http.Header that can be modified by the caller to
  3940. // add HTTP headers to the request.
  3941. func (c *AppsAuthorizedCertificatesDeleteCall) Header() http.Header {
  3942. if c.header_ == nil {
  3943. c.header_ = make(http.Header)
  3944. }
  3945. return c.header_
  3946. }
  3947. func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3948. reqHeaders := make(http.Header)
  3949. for k, v := range c.header_ {
  3950. reqHeaders[k] = v
  3951. }
  3952. reqHeaders.Set("User-Agent", c.s.userAgent())
  3953. var body io.Reader = nil
  3954. c.urlParams_.Set("alt", alt)
  3955. c.urlParams_.Set("prettyPrint", "false")
  3956. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  3957. urls += "?" + c.urlParams_.Encode()
  3958. req, err := http.NewRequest("DELETE", urls, body)
  3959. if err != nil {
  3960. return nil, err
  3961. }
  3962. req.Header = reqHeaders
  3963. googleapi.Expand(req.URL, map[string]string{
  3964. "appsId": c.appsId,
  3965. "authorizedCertificatesId": c.authorizedCertificatesId,
  3966. })
  3967. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3968. }
  3969. // Do executes the "appengine.apps.authorizedCertificates.delete" call.
  3970. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  3971. // code is an error. Response headers are in either
  3972. // *Empty.ServerResponse.Header or (if a response was returned at all)
  3973. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3974. // check whether the returned error was because http.StatusNotModified
  3975. // was returned.
  3976. func (c *AppsAuthorizedCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3977. gensupport.SetOptions(c.urlParams_, opts...)
  3978. res, err := c.doRequest("json")
  3979. if res != nil && res.StatusCode == http.StatusNotModified {
  3980. if res.Body != nil {
  3981. res.Body.Close()
  3982. }
  3983. return nil, &googleapi.Error{
  3984. Code: res.StatusCode,
  3985. Header: res.Header,
  3986. }
  3987. }
  3988. if err != nil {
  3989. return nil, err
  3990. }
  3991. defer googleapi.CloseBody(res)
  3992. if err := googleapi.CheckResponse(res); err != nil {
  3993. return nil, err
  3994. }
  3995. ret := &Empty{
  3996. ServerResponse: googleapi.ServerResponse{
  3997. Header: res.Header,
  3998. HTTPStatusCode: res.StatusCode,
  3999. },
  4000. }
  4001. target := &ret
  4002. if err := gensupport.DecodeResponse(target, res); err != nil {
  4003. return nil, err
  4004. }
  4005. return ret, nil
  4006. // {
  4007. // "description": "Deletes the specified SSL certificate.",
  4008. // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4009. // "httpMethod": "DELETE",
  4010. // "id": "appengine.apps.authorizedCertificates.delete",
  4011. // "parameterOrder": [
  4012. // "appsId",
  4013. // "authorizedCertificatesId"
  4014. // ],
  4015. // "parameters": {
  4016. // "appsId": {
  4017. // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.",
  4018. // "location": "path",
  4019. // "required": true,
  4020. // "type": "string"
  4021. // },
  4022. // "authorizedCertificatesId": {
  4023. // "description": "Part of `name`. See documentation of `appsId`.",
  4024. // "location": "path",
  4025. // "required": true,
  4026. // "type": "string"
  4027. // }
  4028. // },
  4029. // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4030. // "response": {
  4031. // "$ref": "Empty"
  4032. // },
  4033. // "scopes": [
  4034. // "https://www.googleapis.com/auth/cloud-platform"
  4035. // ]
  4036. // }
  4037. }
  4038. // method id "appengine.apps.authorizedCertificates.get":
  4039. type AppsAuthorizedCertificatesGetCall struct {
  4040. s *APIService
  4041. appsId string
  4042. authorizedCertificatesId string
  4043. urlParams_ gensupport.URLParams
  4044. ifNoneMatch_ string
  4045. ctx_ context.Context
  4046. header_ http.Header
  4047. }
  4048. // Get: Gets the specified SSL certificate.
  4049. func (r *AppsAuthorizedCertificatesService) Get(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesGetCall {
  4050. c := &AppsAuthorizedCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4051. c.appsId = appsId
  4052. c.authorizedCertificatesId = authorizedCertificatesId
  4053. return c
  4054. }
  4055. // View sets the optional parameter "view": Controls the set of fields
  4056. // returned in the GET response.
  4057. //
  4058. // Possible values:
  4059. // "BASIC_CERTIFICATE"
  4060. // "FULL_CERTIFICATE"
  4061. func (c *AppsAuthorizedCertificatesGetCall) View(view string) *AppsAuthorizedCertificatesGetCall {
  4062. c.urlParams_.Set("view", view)
  4063. return c
  4064. }
  4065. // Fields allows partial responses to be retrieved. See
  4066. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4067. // for more information.
  4068. func (c *AppsAuthorizedCertificatesGetCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesGetCall {
  4069. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4070. return c
  4071. }
  4072. // IfNoneMatch sets the optional parameter which makes the operation
  4073. // fail if the object's ETag matches the given value. This is useful for
  4074. // getting updates only after the object has changed since the last
  4075. // request. Use googleapi.IsNotModified to check whether the response
  4076. // error from Do is the result of In-None-Match.
  4077. func (c *AppsAuthorizedCertificatesGetCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesGetCall {
  4078. c.ifNoneMatch_ = entityTag
  4079. return c
  4080. }
  4081. // Context sets the context to be used in this call's Do method. Any
  4082. // pending HTTP request will be aborted if the provided context is
  4083. // canceled.
  4084. func (c *AppsAuthorizedCertificatesGetCall) Context(ctx context.Context) *AppsAuthorizedCertificatesGetCall {
  4085. c.ctx_ = ctx
  4086. return c
  4087. }
  4088. // Header returns an http.Header that can be modified by the caller to
  4089. // add HTTP headers to the request.
  4090. func (c *AppsAuthorizedCertificatesGetCall) Header() http.Header {
  4091. if c.header_ == nil {
  4092. c.header_ = make(http.Header)
  4093. }
  4094. return c.header_
  4095. }
  4096. func (c *AppsAuthorizedCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
  4097. reqHeaders := make(http.Header)
  4098. for k, v := range c.header_ {
  4099. reqHeaders[k] = v
  4100. }
  4101. reqHeaders.Set("User-Agent", c.s.userAgent())
  4102. if c.ifNoneMatch_ != "" {
  4103. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4104. }
  4105. var body io.Reader = nil
  4106. c.urlParams_.Set("alt", alt)
  4107. c.urlParams_.Set("prettyPrint", "false")
  4108. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  4109. urls += "?" + c.urlParams_.Encode()
  4110. req, err := http.NewRequest("GET", urls, body)
  4111. if err != nil {
  4112. return nil, err
  4113. }
  4114. req.Header = reqHeaders
  4115. googleapi.Expand(req.URL, map[string]string{
  4116. "appsId": c.appsId,
  4117. "authorizedCertificatesId": c.authorizedCertificatesId,
  4118. })
  4119. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4120. }
  4121. // Do executes the "appengine.apps.authorizedCertificates.get" call.
  4122. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  4123. // non-2xx status code is an error. Response headers are in either
  4124. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  4125. // returned at all) in error.(*googleapi.Error).Header. Use
  4126. // googleapi.IsNotModified to check whether the returned error was
  4127. // because http.StatusNotModified was returned.
  4128. func (c *AppsAuthorizedCertificatesGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  4129. gensupport.SetOptions(c.urlParams_, opts...)
  4130. res, err := c.doRequest("json")
  4131. if res != nil && res.StatusCode == http.StatusNotModified {
  4132. if res.Body != nil {
  4133. res.Body.Close()
  4134. }
  4135. return nil, &googleapi.Error{
  4136. Code: res.StatusCode,
  4137. Header: res.Header,
  4138. }
  4139. }
  4140. if err != nil {
  4141. return nil, err
  4142. }
  4143. defer googleapi.CloseBody(res)
  4144. if err := googleapi.CheckResponse(res); err != nil {
  4145. return nil, err
  4146. }
  4147. ret := &AuthorizedCertificate{
  4148. ServerResponse: googleapi.ServerResponse{
  4149. Header: res.Header,
  4150. HTTPStatusCode: res.StatusCode,
  4151. },
  4152. }
  4153. target := &ret
  4154. if err := gensupport.DecodeResponse(target, res); err != nil {
  4155. return nil, err
  4156. }
  4157. return ret, nil
  4158. // {
  4159. // "description": "Gets the specified SSL certificate.",
  4160. // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4161. // "httpMethod": "GET",
  4162. // "id": "appengine.apps.authorizedCertificates.get",
  4163. // "parameterOrder": [
  4164. // "appsId",
  4165. // "authorizedCertificatesId"
  4166. // ],
  4167. // "parameters": {
  4168. // "appsId": {
  4169. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.",
  4170. // "location": "path",
  4171. // "required": true,
  4172. // "type": "string"
  4173. // },
  4174. // "authorizedCertificatesId": {
  4175. // "description": "Part of `name`. See documentation of `appsId`.",
  4176. // "location": "path",
  4177. // "required": true,
  4178. // "type": "string"
  4179. // },
  4180. // "view": {
  4181. // "description": "Controls the set of fields returned in the GET response.",
  4182. // "enum": [
  4183. // "BASIC_CERTIFICATE",
  4184. // "FULL_CERTIFICATE"
  4185. // ],
  4186. // "location": "query",
  4187. // "type": "string"
  4188. // }
  4189. // },
  4190. // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4191. // "response": {
  4192. // "$ref": "AuthorizedCertificate"
  4193. // },
  4194. // "scopes": [
  4195. // "https://www.googleapis.com/auth/appengine.admin",
  4196. // "https://www.googleapis.com/auth/cloud-platform",
  4197. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4198. // ]
  4199. // }
  4200. }
  4201. // method id "appengine.apps.authorizedCertificates.list":
  4202. type AppsAuthorizedCertificatesListCall struct {
  4203. s *APIService
  4204. appsId string
  4205. urlParams_ gensupport.URLParams
  4206. ifNoneMatch_ string
  4207. ctx_ context.Context
  4208. header_ http.Header
  4209. }
  4210. // List: Lists all SSL certificates the user is authorized to
  4211. // administer.
  4212. func (r *AppsAuthorizedCertificatesService) List(appsId string) *AppsAuthorizedCertificatesListCall {
  4213. c := &AppsAuthorizedCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4214. c.appsId = appsId
  4215. return c
  4216. }
  4217. // PageSize sets the optional parameter "pageSize": Maximum results to
  4218. // return per page.
  4219. func (c *AppsAuthorizedCertificatesListCall) PageSize(pageSize int64) *AppsAuthorizedCertificatesListCall {
  4220. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4221. return c
  4222. }
  4223. // PageToken sets the optional parameter "pageToken": Continuation token
  4224. // for fetching the next page of results.
  4225. func (c *AppsAuthorizedCertificatesListCall) PageToken(pageToken string) *AppsAuthorizedCertificatesListCall {
  4226. c.urlParams_.Set("pageToken", pageToken)
  4227. return c
  4228. }
  4229. // View sets the optional parameter "view": Controls the set of fields
  4230. // returned in the LIST response.
  4231. //
  4232. // Possible values:
  4233. // "BASIC_CERTIFICATE"
  4234. // "FULL_CERTIFICATE"
  4235. func (c *AppsAuthorizedCertificatesListCall) View(view string) *AppsAuthorizedCertificatesListCall {
  4236. c.urlParams_.Set("view", view)
  4237. return c
  4238. }
  4239. // Fields allows partial responses to be retrieved. See
  4240. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4241. // for more information.
  4242. func (c *AppsAuthorizedCertificatesListCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesListCall {
  4243. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4244. return c
  4245. }
  4246. // IfNoneMatch sets the optional parameter which makes the operation
  4247. // fail if the object's ETag matches the given value. This is useful for
  4248. // getting updates only after the object has changed since the last
  4249. // request. Use googleapi.IsNotModified to check whether the response
  4250. // error from Do is the result of In-None-Match.
  4251. func (c *AppsAuthorizedCertificatesListCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesListCall {
  4252. c.ifNoneMatch_ = entityTag
  4253. return c
  4254. }
  4255. // Context sets the context to be used in this call's Do method. Any
  4256. // pending HTTP request will be aborted if the provided context is
  4257. // canceled.
  4258. func (c *AppsAuthorizedCertificatesListCall) Context(ctx context.Context) *AppsAuthorizedCertificatesListCall {
  4259. c.ctx_ = ctx
  4260. return c
  4261. }
  4262. // Header returns an http.Header that can be modified by the caller to
  4263. // add HTTP headers to the request.
  4264. func (c *AppsAuthorizedCertificatesListCall) Header() http.Header {
  4265. if c.header_ == nil {
  4266. c.header_ = make(http.Header)
  4267. }
  4268. return c.header_
  4269. }
  4270. func (c *AppsAuthorizedCertificatesListCall) doRequest(alt string) (*http.Response, error) {
  4271. reqHeaders := make(http.Header)
  4272. for k, v := range c.header_ {
  4273. reqHeaders[k] = v
  4274. }
  4275. reqHeaders.Set("User-Agent", c.s.userAgent())
  4276. if c.ifNoneMatch_ != "" {
  4277. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4278. }
  4279. var body io.Reader = nil
  4280. c.urlParams_.Set("alt", alt)
  4281. c.urlParams_.Set("prettyPrint", "false")
  4282. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates")
  4283. urls += "?" + c.urlParams_.Encode()
  4284. req, err := http.NewRequest("GET", urls, body)
  4285. if err != nil {
  4286. return nil, err
  4287. }
  4288. req.Header = reqHeaders
  4289. googleapi.Expand(req.URL, map[string]string{
  4290. "appsId": c.appsId,
  4291. })
  4292. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4293. }
  4294. // Do executes the "appengine.apps.authorizedCertificates.list" call.
  4295. // Exactly one of *ListAuthorizedCertificatesResponse or error will be
  4296. // non-nil. Any non-2xx status code is an error. Response headers are in
  4297. // either *ListAuthorizedCertificatesResponse.ServerResponse.Header or
  4298. // (if a response was returned at all) in
  4299. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4300. // whether the returned error was because http.StatusNotModified was
  4301. // returned.
  4302. func (c *AppsAuthorizedCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedCertificatesResponse, error) {
  4303. gensupport.SetOptions(c.urlParams_, opts...)
  4304. res, err := c.doRequest("json")
  4305. if res != nil && res.StatusCode == http.StatusNotModified {
  4306. if res.Body != nil {
  4307. res.Body.Close()
  4308. }
  4309. return nil, &googleapi.Error{
  4310. Code: res.StatusCode,
  4311. Header: res.Header,
  4312. }
  4313. }
  4314. if err != nil {
  4315. return nil, err
  4316. }
  4317. defer googleapi.CloseBody(res)
  4318. if err := googleapi.CheckResponse(res); err != nil {
  4319. return nil, err
  4320. }
  4321. ret := &ListAuthorizedCertificatesResponse{
  4322. ServerResponse: googleapi.ServerResponse{
  4323. Header: res.Header,
  4324. HTTPStatusCode: res.StatusCode,
  4325. },
  4326. }
  4327. target := &ret
  4328. if err := gensupport.DecodeResponse(target, res); err != nil {
  4329. return nil, err
  4330. }
  4331. return ret, nil
  4332. // {
  4333. // "description": "Lists all SSL certificates the user is authorized to administer.",
  4334. // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates",
  4335. // "httpMethod": "GET",
  4336. // "id": "appengine.apps.authorizedCertificates.list",
  4337. // "parameterOrder": [
  4338. // "appsId"
  4339. // ],
  4340. // "parameters": {
  4341. // "appsId": {
  4342. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4343. // "location": "path",
  4344. // "required": true,
  4345. // "type": "string"
  4346. // },
  4347. // "pageSize": {
  4348. // "description": "Maximum results to return per page.",
  4349. // "format": "int32",
  4350. // "location": "query",
  4351. // "type": "integer"
  4352. // },
  4353. // "pageToken": {
  4354. // "description": "Continuation token for fetching the next page of results.",
  4355. // "location": "query",
  4356. // "type": "string"
  4357. // },
  4358. // "view": {
  4359. // "description": "Controls the set of fields returned in the LIST response.",
  4360. // "enum": [
  4361. // "BASIC_CERTIFICATE",
  4362. // "FULL_CERTIFICATE"
  4363. // ],
  4364. // "location": "query",
  4365. // "type": "string"
  4366. // }
  4367. // },
  4368. // "path": "v1beta/apps/{appsId}/authorizedCertificates",
  4369. // "response": {
  4370. // "$ref": "ListAuthorizedCertificatesResponse"
  4371. // },
  4372. // "scopes": [
  4373. // "https://www.googleapis.com/auth/appengine.admin",
  4374. // "https://www.googleapis.com/auth/cloud-platform",
  4375. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4376. // ]
  4377. // }
  4378. }
  4379. // Pages invokes f for each page of results.
  4380. // A non-nil error returned from f will halt the iteration.
  4381. // The provided context supersedes any context provided to the Context method.
  4382. func (c *AppsAuthorizedCertificatesListCall) Pages(ctx context.Context, f func(*ListAuthorizedCertificatesResponse) error) error {
  4383. c.ctx_ = ctx
  4384. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4385. for {
  4386. x, err := c.Do()
  4387. if err != nil {
  4388. return err
  4389. }
  4390. if err := f(x); err != nil {
  4391. return err
  4392. }
  4393. if x.NextPageToken == "" {
  4394. return nil
  4395. }
  4396. c.PageToken(x.NextPageToken)
  4397. }
  4398. }
  4399. // method id "appengine.apps.authorizedCertificates.patch":
  4400. type AppsAuthorizedCertificatesPatchCall struct {
  4401. s *APIService
  4402. appsId string
  4403. authorizedCertificatesId string
  4404. authorizedcertificate *AuthorizedCertificate
  4405. urlParams_ gensupport.URLParams
  4406. ctx_ context.Context
  4407. header_ http.Header
  4408. }
  4409. // Patch: Updates the specified SSL certificate. To renew a certificate
  4410. // and maintain its existing domain mappings, update certificate_data
  4411. // with a new certificate. The new certificate must be applicable to the
  4412. // same domains as the original certificate. The certificate
  4413. // display_name may also be updated.
  4414. func (r *AppsAuthorizedCertificatesService) Patch(appsId string, authorizedCertificatesId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesPatchCall {
  4415. c := &AppsAuthorizedCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4416. c.appsId = appsId
  4417. c.authorizedCertificatesId = authorizedCertificatesId
  4418. c.authorizedcertificate = authorizedcertificate
  4419. return c
  4420. }
  4421. // UpdateMask sets the optional parameter "updateMask": Standard field
  4422. // mask for the set of fields to be updated. Updates are only supported
  4423. // on the certificate_raw_data and display_name fields.
  4424. func (c *AppsAuthorizedCertificatesPatchCall) UpdateMask(updateMask string) *AppsAuthorizedCertificatesPatchCall {
  4425. c.urlParams_.Set("updateMask", updateMask)
  4426. return c
  4427. }
  4428. // Fields allows partial responses to be retrieved. See
  4429. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4430. // for more information.
  4431. func (c *AppsAuthorizedCertificatesPatchCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesPatchCall {
  4432. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4433. return c
  4434. }
  4435. // Context sets the context to be used in this call's Do method. Any
  4436. // pending HTTP request will be aborted if the provided context is
  4437. // canceled.
  4438. func (c *AppsAuthorizedCertificatesPatchCall) Context(ctx context.Context) *AppsAuthorizedCertificatesPatchCall {
  4439. c.ctx_ = ctx
  4440. return c
  4441. }
  4442. // Header returns an http.Header that can be modified by the caller to
  4443. // add HTTP headers to the request.
  4444. func (c *AppsAuthorizedCertificatesPatchCall) Header() http.Header {
  4445. if c.header_ == nil {
  4446. c.header_ = make(http.Header)
  4447. }
  4448. return c.header_
  4449. }
  4450. func (c *AppsAuthorizedCertificatesPatchCall) doRequest(alt string) (*http.Response, error) {
  4451. reqHeaders := make(http.Header)
  4452. for k, v := range c.header_ {
  4453. reqHeaders[k] = v
  4454. }
  4455. reqHeaders.Set("User-Agent", c.s.userAgent())
  4456. var body io.Reader = nil
  4457. body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate)
  4458. if err != nil {
  4459. return nil, err
  4460. }
  4461. reqHeaders.Set("Content-Type", "application/json")
  4462. c.urlParams_.Set("alt", alt)
  4463. c.urlParams_.Set("prettyPrint", "false")
  4464. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  4465. urls += "?" + c.urlParams_.Encode()
  4466. req, err := http.NewRequest("PATCH", urls, body)
  4467. if err != nil {
  4468. return nil, err
  4469. }
  4470. req.Header = reqHeaders
  4471. googleapi.Expand(req.URL, map[string]string{
  4472. "appsId": c.appsId,
  4473. "authorizedCertificatesId": c.authorizedCertificatesId,
  4474. })
  4475. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4476. }
  4477. // Do executes the "appengine.apps.authorizedCertificates.patch" call.
  4478. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  4479. // non-2xx status code is an error. Response headers are in either
  4480. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  4481. // returned at all) in error.(*googleapi.Error).Header. Use
  4482. // googleapi.IsNotModified to check whether the returned error was
  4483. // because http.StatusNotModified was returned.
  4484. func (c *AppsAuthorizedCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  4485. gensupport.SetOptions(c.urlParams_, opts...)
  4486. res, err := c.doRequest("json")
  4487. if res != nil && res.StatusCode == http.StatusNotModified {
  4488. if res.Body != nil {
  4489. res.Body.Close()
  4490. }
  4491. return nil, &googleapi.Error{
  4492. Code: res.StatusCode,
  4493. Header: res.Header,
  4494. }
  4495. }
  4496. if err != nil {
  4497. return nil, err
  4498. }
  4499. defer googleapi.CloseBody(res)
  4500. if err := googleapi.CheckResponse(res); err != nil {
  4501. return nil, err
  4502. }
  4503. ret := &AuthorizedCertificate{
  4504. ServerResponse: googleapi.ServerResponse{
  4505. Header: res.Header,
  4506. HTTPStatusCode: res.StatusCode,
  4507. },
  4508. }
  4509. target := &ret
  4510. if err := gensupport.DecodeResponse(target, res); err != nil {
  4511. return nil, err
  4512. }
  4513. return ret, nil
  4514. // {
  4515. // "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.",
  4516. // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4517. // "httpMethod": "PATCH",
  4518. // "id": "appengine.apps.authorizedCertificates.patch",
  4519. // "parameterOrder": [
  4520. // "appsId",
  4521. // "authorizedCertificatesId"
  4522. // ],
  4523. // "parameters": {
  4524. // "appsId": {
  4525. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.",
  4526. // "location": "path",
  4527. // "required": true,
  4528. // "type": "string"
  4529. // },
  4530. // "authorizedCertificatesId": {
  4531. // "description": "Part of `name`. See documentation of `appsId`.",
  4532. // "location": "path",
  4533. // "required": true,
  4534. // "type": "string"
  4535. // },
  4536. // "updateMask": {
  4537. // "description": "Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.",
  4538. // "format": "google-fieldmask",
  4539. // "location": "query",
  4540. // "type": "string"
  4541. // }
  4542. // },
  4543. // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4544. // "request": {
  4545. // "$ref": "AuthorizedCertificate"
  4546. // },
  4547. // "response": {
  4548. // "$ref": "AuthorizedCertificate"
  4549. // },
  4550. // "scopes": [
  4551. // "https://www.googleapis.com/auth/cloud-platform"
  4552. // ]
  4553. // }
  4554. }
  4555. // method id "appengine.apps.authorizedDomains.list":
  4556. type AppsAuthorizedDomainsListCall struct {
  4557. s *APIService
  4558. appsId string
  4559. urlParams_ gensupport.URLParams
  4560. ifNoneMatch_ string
  4561. ctx_ context.Context
  4562. header_ http.Header
  4563. }
  4564. // List: Lists all domains the user is authorized to administer.
  4565. func (r *AppsAuthorizedDomainsService) List(appsId string) *AppsAuthorizedDomainsListCall {
  4566. c := &AppsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4567. c.appsId = appsId
  4568. return c
  4569. }
  4570. // PageSize sets the optional parameter "pageSize": Maximum results to
  4571. // return per page.
  4572. func (c *AppsAuthorizedDomainsListCall) PageSize(pageSize int64) *AppsAuthorizedDomainsListCall {
  4573. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4574. return c
  4575. }
  4576. // PageToken sets the optional parameter "pageToken": Continuation token
  4577. // for fetching the next page of results.
  4578. func (c *AppsAuthorizedDomainsListCall) PageToken(pageToken string) *AppsAuthorizedDomainsListCall {
  4579. c.urlParams_.Set("pageToken", pageToken)
  4580. return c
  4581. }
  4582. // Fields allows partial responses to be retrieved. See
  4583. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4584. // for more information.
  4585. func (c *AppsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *AppsAuthorizedDomainsListCall {
  4586. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4587. return c
  4588. }
  4589. // IfNoneMatch sets the optional parameter which makes the operation
  4590. // fail if the object's ETag matches the given value. This is useful for
  4591. // getting updates only after the object has changed since the last
  4592. // request. Use googleapi.IsNotModified to check whether the response
  4593. // error from Do is the result of In-None-Match.
  4594. func (c *AppsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *AppsAuthorizedDomainsListCall {
  4595. c.ifNoneMatch_ = entityTag
  4596. return c
  4597. }
  4598. // Context sets the context to be used in this call's Do method. Any
  4599. // pending HTTP request will be aborted if the provided context is
  4600. // canceled.
  4601. func (c *AppsAuthorizedDomainsListCall) Context(ctx context.Context) *AppsAuthorizedDomainsListCall {
  4602. c.ctx_ = ctx
  4603. return c
  4604. }
  4605. // Header returns an http.Header that can be modified by the caller to
  4606. // add HTTP headers to the request.
  4607. func (c *AppsAuthorizedDomainsListCall) Header() http.Header {
  4608. if c.header_ == nil {
  4609. c.header_ = make(http.Header)
  4610. }
  4611. return c.header_
  4612. }
  4613. func (c *AppsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) {
  4614. reqHeaders := make(http.Header)
  4615. for k, v := range c.header_ {
  4616. reqHeaders[k] = v
  4617. }
  4618. reqHeaders.Set("User-Agent", c.s.userAgent())
  4619. if c.ifNoneMatch_ != "" {
  4620. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4621. }
  4622. var body io.Reader = nil
  4623. c.urlParams_.Set("alt", alt)
  4624. c.urlParams_.Set("prettyPrint", "false")
  4625. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedDomains")
  4626. urls += "?" + c.urlParams_.Encode()
  4627. req, err := http.NewRequest("GET", urls, body)
  4628. if err != nil {
  4629. return nil, err
  4630. }
  4631. req.Header = reqHeaders
  4632. googleapi.Expand(req.URL, map[string]string{
  4633. "appsId": c.appsId,
  4634. })
  4635. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4636. }
  4637. // Do executes the "appengine.apps.authorizedDomains.list" call.
  4638. // Exactly one of *ListAuthorizedDomainsResponse or error will be
  4639. // non-nil. Any non-2xx status code is an error. Response headers are in
  4640. // either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a
  4641. // response was returned at all) in error.(*googleapi.Error).Header. Use
  4642. // googleapi.IsNotModified to check whether the returned error was
  4643. // because http.StatusNotModified was returned.
  4644. func (c *AppsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) {
  4645. gensupport.SetOptions(c.urlParams_, opts...)
  4646. res, err := c.doRequest("json")
  4647. if res != nil && res.StatusCode == http.StatusNotModified {
  4648. if res.Body != nil {
  4649. res.Body.Close()
  4650. }
  4651. return nil, &googleapi.Error{
  4652. Code: res.StatusCode,
  4653. Header: res.Header,
  4654. }
  4655. }
  4656. if err != nil {
  4657. return nil, err
  4658. }
  4659. defer googleapi.CloseBody(res)
  4660. if err := googleapi.CheckResponse(res); err != nil {
  4661. return nil, err
  4662. }
  4663. ret := &ListAuthorizedDomainsResponse{
  4664. ServerResponse: googleapi.ServerResponse{
  4665. Header: res.Header,
  4666. HTTPStatusCode: res.StatusCode,
  4667. },
  4668. }
  4669. target := &ret
  4670. if err := gensupport.DecodeResponse(target, res); err != nil {
  4671. return nil, err
  4672. }
  4673. return ret, nil
  4674. // {
  4675. // "description": "Lists all domains the user is authorized to administer.",
  4676. // "flatPath": "v1beta/apps/{appsId}/authorizedDomains",
  4677. // "httpMethod": "GET",
  4678. // "id": "appengine.apps.authorizedDomains.list",
  4679. // "parameterOrder": [
  4680. // "appsId"
  4681. // ],
  4682. // "parameters": {
  4683. // "appsId": {
  4684. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4685. // "location": "path",
  4686. // "required": true,
  4687. // "type": "string"
  4688. // },
  4689. // "pageSize": {
  4690. // "description": "Maximum results to return per page.",
  4691. // "format": "int32",
  4692. // "location": "query",
  4693. // "type": "integer"
  4694. // },
  4695. // "pageToken": {
  4696. // "description": "Continuation token for fetching the next page of results.",
  4697. // "location": "query",
  4698. // "type": "string"
  4699. // }
  4700. // },
  4701. // "path": "v1beta/apps/{appsId}/authorizedDomains",
  4702. // "response": {
  4703. // "$ref": "ListAuthorizedDomainsResponse"
  4704. // },
  4705. // "scopes": [
  4706. // "https://www.googleapis.com/auth/appengine.admin",
  4707. // "https://www.googleapis.com/auth/cloud-platform",
  4708. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4709. // ]
  4710. // }
  4711. }
  4712. // Pages invokes f for each page of results.
  4713. // A non-nil error returned from f will halt the iteration.
  4714. // The provided context supersedes any context provided to the Context method.
  4715. func (c *AppsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error {
  4716. c.ctx_ = ctx
  4717. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4718. for {
  4719. x, err := c.Do()
  4720. if err != nil {
  4721. return err
  4722. }
  4723. if err := f(x); err != nil {
  4724. return err
  4725. }
  4726. if x.NextPageToken == "" {
  4727. return nil
  4728. }
  4729. c.PageToken(x.NextPageToken)
  4730. }
  4731. }
  4732. // method id "appengine.apps.domainMappings.create":
  4733. type AppsDomainMappingsCreateCall struct {
  4734. s *APIService
  4735. appsId string
  4736. domainmapping *DomainMapping
  4737. urlParams_ gensupport.URLParams
  4738. ctx_ context.Context
  4739. header_ http.Header
  4740. }
  4741. // Create: Maps a domain to an application. A user must be authorized to
  4742. // administer a domain in order to map it to an application. For a list
  4743. // of available authorized domains, see
  4744. // AuthorizedDomains.ListAuthorizedDomains.
  4745. func (r *AppsDomainMappingsService) Create(appsId string, domainmapping *DomainMapping) *AppsDomainMappingsCreateCall {
  4746. c := &AppsDomainMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4747. c.appsId = appsId
  4748. c.domainmapping = domainmapping
  4749. return c
  4750. }
  4751. // OverrideStrategy sets the optional parameter "overrideStrategy":
  4752. // Whether the domain creation should override any existing mappings for
  4753. // this domain. By default, overrides are rejected.
  4754. //
  4755. // Possible values:
  4756. // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY"
  4757. // "STRICT"
  4758. // "OVERRIDE"
  4759. func (c *AppsDomainMappingsCreateCall) OverrideStrategy(overrideStrategy string) *AppsDomainMappingsCreateCall {
  4760. c.urlParams_.Set("overrideStrategy", overrideStrategy)
  4761. return c
  4762. }
  4763. // Fields allows partial responses to be retrieved. See
  4764. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4765. // for more information.
  4766. func (c *AppsDomainMappingsCreateCall) Fields(s ...googleapi.Field) *AppsDomainMappingsCreateCall {
  4767. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4768. return c
  4769. }
  4770. // Context sets the context to be used in this call's Do method. Any
  4771. // pending HTTP request will be aborted if the provided context is
  4772. // canceled.
  4773. func (c *AppsDomainMappingsCreateCall) Context(ctx context.Context) *AppsDomainMappingsCreateCall {
  4774. c.ctx_ = ctx
  4775. return c
  4776. }
  4777. // Header returns an http.Header that can be modified by the caller to
  4778. // add HTTP headers to the request.
  4779. func (c *AppsDomainMappingsCreateCall) Header() http.Header {
  4780. if c.header_ == nil {
  4781. c.header_ = make(http.Header)
  4782. }
  4783. return c.header_
  4784. }
  4785. func (c *AppsDomainMappingsCreateCall) doRequest(alt string) (*http.Response, error) {
  4786. reqHeaders := make(http.Header)
  4787. for k, v := range c.header_ {
  4788. reqHeaders[k] = v
  4789. }
  4790. reqHeaders.Set("User-Agent", c.s.userAgent())
  4791. var body io.Reader = nil
  4792. body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping)
  4793. if err != nil {
  4794. return nil, err
  4795. }
  4796. reqHeaders.Set("Content-Type", "application/json")
  4797. c.urlParams_.Set("alt", alt)
  4798. c.urlParams_.Set("prettyPrint", "false")
  4799. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings")
  4800. urls += "?" + c.urlParams_.Encode()
  4801. req, err := http.NewRequest("POST", urls, body)
  4802. if err != nil {
  4803. return nil, err
  4804. }
  4805. req.Header = reqHeaders
  4806. googleapi.Expand(req.URL, map[string]string{
  4807. "appsId": c.appsId,
  4808. })
  4809. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4810. }
  4811. // Do executes the "appengine.apps.domainMappings.create" call.
  4812. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4813. // status code is an error. Response headers are in either
  4814. // *Operation.ServerResponse.Header or (if a response was returned at
  4815. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4816. // to check whether the returned error was because
  4817. // http.StatusNotModified was returned.
  4818. func (c *AppsDomainMappingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4819. gensupport.SetOptions(c.urlParams_, opts...)
  4820. res, err := c.doRequest("json")
  4821. if res != nil && res.StatusCode == http.StatusNotModified {
  4822. if res.Body != nil {
  4823. res.Body.Close()
  4824. }
  4825. return nil, &googleapi.Error{
  4826. Code: res.StatusCode,
  4827. Header: res.Header,
  4828. }
  4829. }
  4830. if err != nil {
  4831. return nil, err
  4832. }
  4833. defer googleapi.CloseBody(res)
  4834. if err := googleapi.CheckResponse(res); err != nil {
  4835. return nil, err
  4836. }
  4837. ret := &Operation{
  4838. ServerResponse: googleapi.ServerResponse{
  4839. Header: res.Header,
  4840. HTTPStatusCode: res.StatusCode,
  4841. },
  4842. }
  4843. target := &ret
  4844. if err := gensupport.DecodeResponse(target, res); err != nil {
  4845. return nil, err
  4846. }
  4847. return ret, nil
  4848. // {
  4849. // "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.",
  4850. // "flatPath": "v1beta/apps/{appsId}/domainMappings",
  4851. // "httpMethod": "POST",
  4852. // "id": "appengine.apps.domainMappings.create",
  4853. // "parameterOrder": [
  4854. // "appsId"
  4855. // ],
  4856. // "parameters": {
  4857. // "appsId": {
  4858. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4859. // "location": "path",
  4860. // "required": true,
  4861. // "type": "string"
  4862. // },
  4863. // "overrideStrategy": {
  4864. // "description": "Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.",
  4865. // "enum": [
  4866. // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY",
  4867. // "STRICT",
  4868. // "OVERRIDE"
  4869. // ],
  4870. // "location": "query",
  4871. // "type": "string"
  4872. // }
  4873. // },
  4874. // "path": "v1beta/apps/{appsId}/domainMappings",
  4875. // "request": {
  4876. // "$ref": "DomainMapping"
  4877. // },
  4878. // "response": {
  4879. // "$ref": "Operation"
  4880. // },
  4881. // "scopes": [
  4882. // "https://www.googleapis.com/auth/cloud-platform"
  4883. // ]
  4884. // }
  4885. }
  4886. // method id "appengine.apps.domainMappings.delete":
  4887. type AppsDomainMappingsDeleteCall struct {
  4888. s *APIService
  4889. appsId string
  4890. domainMappingsId string
  4891. urlParams_ gensupport.URLParams
  4892. ctx_ context.Context
  4893. header_ http.Header
  4894. }
  4895. // Delete: Deletes the specified domain mapping. A user must be
  4896. // authorized to administer the associated domain in order to delete a
  4897. // DomainMapping resource.
  4898. func (r *AppsDomainMappingsService) Delete(appsId string, domainMappingsId string) *AppsDomainMappingsDeleteCall {
  4899. c := &AppsDomainMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4900. c.appsId = appsId
  4901. c.domainMappingsId = domainMappingsId
  4902. return c
  4903. }
  4904. // Fields allows partial responses to be retrieved. See
  4905. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4906. // for more information.
  4907. func (c *AppsDomainMappingsDeleteCall) Fields(s ...googleapi.Field) *AppsDomainMappingsDeleteCall {
  4908. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4909. return c
  4910. }
  4911. // Context sets the context to be used in this call's Do method. Any
  4912. // pending HTTP request will be aborted if the provided context is
  4913. // canceled.
  4914. func (c *AppsDomainMappingsDeleteCall) Context(ctx context.Context) *AppsDomainMappingsDeleteCall {
  4915. c.ctx_ = ctx
  4916. return c
  4917. }
  4918. // Header returns an http.Header that can be modified by the caller to
  4919. // add HTTP headers to the request.
  4920. func (c *AppsDomainMappingsDeleteCall) Header() http.Header {
  4921. if c.header_ == nil {
  4922. c.header_ = make(http.Header)
  4923. }
  4924. return c.header_
  4925. }
  4926. func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4927. reqHeaders := make(http.Header)
  4928. for k, v := range c.header_ {
  4929. reqHeaders[k] = v
  4930. }
  4931. reqHeaders.Set("User-Agent", c.s.userAgent())
  4932. var body io.Reader = nil
  4933. c.urlParams_.Set("alt", alt)
  4934. c.urlParams_.Set("prettyPrint", "false")
  4935. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}")
  4936. urls += "?" + c.urlParams_.Encode()
  4937. req, err := http.NewRequest("DELETE", urls, body)
  4938. if err != nil {
  4939. return nil, err
  4940. }
  4941. req.Header = reqHeaders
  4942. googleapi.Expand(req.URL, map[string]string{
  4943. "appsId": c.appsId,
  4944. "domainMappingsId": c.domainMappingsId,
  4945. })
  4946. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4947. }
  4948. // Do executes the "appengine.apps.domainMappings.delete" call.
  4949. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4950. // status code is an error. Response headers are in either
  4951. // *Operation.ServerResponse.Header or (if a response was returned at
  4952. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4953. // to check whether the returned error was because
  4954. // http.StatusNotModified was returned.
  4955. func (c *AppsDomainMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4956. gensupport.SetOptions(c.urlParams_, opts...)
  4957. res, err := c.doRequest("json")
  4958. if res != nil && res.StatusCode == http.StatusNotModified {
  4959. if res.Body != nil {
  4960. res.Body.Close()
  4961. }
  4962. return nil, &googleapi.Error{
  4963. Code: res.StatusCode,
  4964. Header: res.Header,
  4965. }
  4966. }
  4967. if err != nil {
  4968. return nil, err
  4969. }
  4970. defer googleapi.CloseBody(res)
  4971. if err := googleapi.CheckResponse(res); err != nil {
  4972. return nil, err
  4973. }
  4974. ret := &Operation{
  4975. ServerResponse: googleapi.ServerResponse{
  4976. Header: res.Header,
  4977. HTTPStatusCode: res.StatusCode,
  4978. },
  4979. }
  4980. target := &ret
  4981. if err := gensupport.DecodeResponse(target, res); err != nil {
  4982. return nil, err
  4983. }
  4984. return ret, nil
  4985. // {
  4986. // "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.",
  4987. // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  4988. // "httpMethod": "DELETE",
  4989. // "id": "appengine.apps.domainMappings.delete",
  4990. // "parameterOrder": [
  4991. // "appsId",
  4992. // "domainMappingsId"
  4993. // ],
  4994. // "parameters": {
  4995. // "appsId": {
  4996. // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.",
  4997. // "location": "path",
  4998. // "required": true,
  4999. // "type": "string"
  5000. // },
  5001. // "domainMappingsId": {
  5002. // "description": "Part of `name`. See documentation of `appsId`.",
  5003. // "location": "path",
  5004. // "required": true,
  5005. // "type": "string"
  5006. // }
  5007. // },
  5008. // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  5009. // "response": {
  5010. // "$ref": "Operation"
  5011. // },
  5012. // "scopes": [
  5013. // "https://www.googleapis.com/auth/cloud-platform"
  5014. // ]
  5015. // }
  5016. }
  5017. // method id "appengine.apps.domainMappings.get":
  5018. type AppsDomainMappingsGetCall struct {
  5019. s *APIService
  5020. appsId string
  5021. domainMappingsId string
  5022. urlParams_ gensupport.URLParams
  5023. ifNoneMatch_ string
  5024. ctx_ context.Context
  5025. header_ http.Header
  5026. }
  5027. // Get: Gets the specified domain mapping.
  5028. func (r *AppsDomainMappingsService) Get(appsId string, domainMappingsId string) *AppsDomainMappingsGetCall {
  5029. c := &AppsDomainMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5030. c.appsId = appsId
  5031. c.domainMappingsId = domainMappingsId
  5032. return c
  5033. }
  5034. // Fields allows partial responses to be retrieved. See
  5035. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5036. // for more information.
  5037. func (c *AppsDomainMappingsGetCall) Fields(s ...googleapi.Field) *AppsDomainMappingsGetCall {
  5038. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5039. return c
  5040. }
  5041. // IfNoneMatch sets the optional parameter which makes the operation
  5042. // fail if the object's ETag matches the given value. This is useful for
  5043. // getting updates only after the object has changed since the last
  5044. // request. Use googleapi.IsNotModified to check whether the response
  5045. // error from Do is the result of In-None-Match.
  5046. func (c *AppsDomainMappingsGetCall) IfNoneMatch(entityTag string) *AppsDomainMappingsGetCall {
  5047. c.ifNoneMatch_ = entityTag
  5048. return c
  5049. }
  5050. // Context sets the context to be used in this call's Do method. Any
  5051. // pending HTTP request will be aborted if the provided context is
  5052. // canceled.
  5053. func (c *AppsDomainMappingsGetCall) Context(ctx context.Context) *AppsDomainMappingsGetCall {
  5054. c.ctx_ = ctx
  5055. return c
  5056. }
  5057. // Header returns an http.Header that can be modified by the caller to
  5058. // add HTTP headers to the request.
  5059. func (c *AppsDomainMappingsGetCall) Header() http.Header {
  5060. if c.header_ == nil {
  5061. c.header_ = make(http.Header)
  5062. }
  5063. return c.header_
  5064. }
  5065. func (c *AppsDomainMappingsGetCall) doRequest(alt string) (*http.Response, error) {
  5066. reqHeaders := make(http.Header)
  5067. for k, v := range c.header_ {
  5068. reqHeaders[k] = v
  5069. }
  5070. reqHeaders.Set("User-Agent", c.s.userAgent())
  5071. if c.ifNoneMatch_ != "" {
  5072. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5073. }
  5074. var body io.Reader = nil
  5075. c.urlParams_.Set("alt", alt)
  5076. c.urlParams_.Set("prettyPrint", "false")
  5077. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}")
  5078. urls += "?" + c.urlParams_.Encode()
  5079. req, err := http.NewRequest("GET", urls, body)
  5080. if err != nil {
  5081. return nil, err
  5082. }
  5083. req.Header = reqHeaders
  5084. googleapi.Expand(req.URL, map[string]string{
  5085. "appsId": c.appsId,
  5086. "domainMappingsId": c.domainMappingsId,
  5087. })
  5088. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5089. }
  5090. // Do executes the "appengine.apps.domainMappings.get" call.
  5091. // Exactly one of *DomainMapping or error will be non-nil. Any non-2xx
  5092. // status code is an error. Response headers are in either
  5093. // *DomainMapping.ServerResponse.Header or (if a response was returned
  5094. // at all) in error.(*googleapi.Error).Header. Use
  5095. // googleapi.IsNotModified to check whether the returned error was
  5096. // because http.StatusNotModified was returned.
  5097. func (c *AppsDomainMappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) {
  5098. gensupport.SetOptions(c.urlParams_, opts...)
  5099. res, err := c.doRequest("json")
  5100. if res != nil && res.StatusCode == http.StatusNotModified {
  5101. if res.Body != nil {
  5102. res.Body.Close()
  5103. }
  5104. return nil, &googleapi.Error{
  5105. Code: res.StatusCode,
  5106. Header: res.Header,
  5107. }
  5108. }
  5109. if err != nil {
  5110. return nil, err
  5111. }
  5112. defer googleapi.CloseBody(res)
  5113. if err := googleapi.CheckResponse(res); err != nil {
  5114. return nil, err
  5115. }
  5116. ret := &DomainMapping{
  5117. ServerResponse: googleapi.ServerResponse{
  5118. Header: res.Header,
  5119. HTTPStatusCode: res.StatusCode,
  5120. },
  5121. }
  5122. target := &ret
  5123. if err := gensupport.DecodeResponse(target, res); err != nil {
  5124. return nil, err
  5125. }
  5126. return ret, nil
  5127. // {
  5128. // "description": "Gets the specified domain mapping.",
  5129. // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  5130. // "httpMethod": "GET",
  5131. // "id": "appengine.apps.domainMappings.get",
  5132. // "parameterOrder": [
  5133. // "appsId",
  5134. // "domainMappingsId"
  5135. // ],
  5136. // "parameters": {
  5137. // "appsId": {
  5138. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.",
  5139. // "location": "path",
  5140. // "required": true,
  5141. // "type": "string"
  5142. // },
  5143. // "domainMappingsId": {
  5144. // "description": "Part of `name`. See documentation of `appsId`.",
  5145. // "location": "path",
  5146. // "required": true,
  5147. // "type": "string"
  5148. // }
  5149. // },
  5150. // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  5151. // "response": {
  5152. // "$ref": "DomainMapping"
  5153. // },
  5154. // "scopes": [
  5155. // "https://www.googleapis.com/auth/appengine.admin",
  5156. // "https://www.googleapis.com/auth/cloud-platform",
  5157. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5158. // ]
  5159. // }
  5160. }
  5161. // method id "appengine.apps.domainMappings.list":
  5162. type AppsDomainMappingsListCall struct {
  5163. s *APIService
  5164. appsId string
  5165. urlParams_ gensupport.URLParams
  5166. ifNoneMatch_ string
  5167. ctx_ context.Context
  5168. header_ http.Header
  5169. }
  5170. // List: Lists the domain mappings on an application.
  5171. func (r *AppsDomainMappingsService) List(appsId string) *AppsDomainMappingsListCall {
  5172. c := &AppsDomainMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5173. c.appsId = appsId
  5174. return c
  5175. }
  5176. // PageSize sets the optional parameter "pageSize": Maximum results to
  5177. // return per page.
  5178. func (c *AppsDomainMappingsListCall) PageSize(pageSize int64) *AppsDomainMappingsListCall {
  5179. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5180. return c
  5181. }
  5182. // PageToken sets the optional parameter "pageToken": Continuation token
  5183. // for fetching the next page of results.
  5184. func (c *AppsDomainMappingsListCall) PageToken(pageToken string) *AppsDomainMappingsListCall {
  5185. c.urlParams_.Set("pageToken", pageToken)
  5186. return c
  5187. }
  5188. // Fields allows partial responses to be retrieved. See
  5189. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5190. // for more information.
  5191. func (c *AppsDomainMappingsListCall) Fields(s ...googleapi.Field) *AppsDomainMappingsListCall {
  5192. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5193. return c
  5194. }
  5195. // IfNoneMatch sets the optional parameter which makes the operation
  5196. // fail if the object's ETag matches the given value. This is useful for
  5197. // getting updates only after the object has changed since the last
  5198. // request. Use googleapi.IsNotModified to check whether the response
  5199. // error from Do is the result of In-None-Match.
  5200. func (c *AppsDomainMappingsListCall) IfNoneMatch(entityTag string) *AppsDomainMappingsListCall {
  5201. c.ifNoneMatch_ = entityTag
  5202. return c
  5203. }
  5204. // Context sets the context to be used in this call's Do method. Any
  5205. // pending HTTP request will be aborted if the provided context is
  5206. // canceled.
  5207. func (c *AppsDomainMappingsListCall) Context(ctx context.Context) *AppsDomainMappingsListCall {
  5208. c.ctx_ = ctx
  5209. return c
  5210. }
  5211. // Header returns an http.Header that can be modified by the caller to
  5212. // add HTTP headers to the request.
  5213. func (c *AppsDomainMappingsListCall) Header() http.Header {
  5214. if c.header_ == nil {
  5215. c.header_ = make(http.Header)
  5216. }
  5217. return c.header_
  5218. }
  5219. func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, error) {
  5220. reqHeaders := make(http.Header)
  5221. for k, v := range c.header_ {
  5222. reqHeaders[k] = v
  5223. }
  5224. reqHeaders.Set("User-Agent", c.s.userAgent())
  5225. if c.ifNoneMatch_ != "" {
  5226. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5227. }
  5228. var body io.Reader = nil
  5229. c.urlParams_.Set("alt", alt)
  5230. c.urlParams_.Set("prettyPrint", "false")
  5231. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings")
  5232. urls += "?" + c.urlParams_.Encode()
  5233. req, err := http.NewRequest("GET", urls, body)
  5234. if err != nil {
  5235. return nil, err
  5236. }
  5237. req.Header = reqHeaders
  5238. googleapi.Expand(req.URL, map[string]string{
  5239. "appsId": c.appsId,
  5240. })
  5241. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5242. }
  5243. // Do executes the "appengine.apps.domainMappings.list" call.
  5244. // Exactly one of *ListDomainMappingsResponse or error will be non-nil.
  5245. // Any non-2xx status code is an error. Response headers are in either
  5246. // *ListDomainMappingsResponse.ServerResponse.Header or (if a response
  5247. // was returned at all) in error.(*googleapi.Error).Header. Use
  5248. // googleapi.IsNotModified to check whether the returned error was
  5249. // because http.StatusNotModified was returned.
  5250. func (c *AppsDomainMappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) {
  5251. gensupport.SetOptions(c.urlParams_, opts...)
  5252. res, err := c.doRequest("json")
  5253. if res != nil && res.StatusCode == http.StatusNotModified {
  5254. if res.Body != nil {
  5255. res.Body.Close()
  5256. }
  5257. return nil, &googleapi.Error{
  5258. Code: res.StatusCode,
  5259. Header: res.Header,
  5260. }
  5261. }
  5262. if err != nil {
  5263. return nil, err
  5264. }
  5265. defer googleapi.CloseBody(res)
  5266. if err := googleapi.CheckResponse(res); err != nil {
  5267. return nil, err
  5268. }
  5269. ret := &ListDomainMappingsResponse{
  5270. ServerResponse: googleapi.ServerResponse{
  5271. Header: res.Header,
  5272. HTTPStatusCode: res.StatusCode,
  5273. },
  5274. }
  5275. target := &ret
  5276. if err := gensupport.DecodeResponse(target, res); err != nil {
  5277. return nil, err
  5278. }
  5279. return ret, nil
  5280. // {
  5281. // "description": "Lists the domain mappings on an application.",
  5282. // "flatPath": "v1beta/apps/{appsId}/domainMappings",
  5283. // "httpMethod": "GET",
  5284. // "id": "appengine.apps.domainMappings.list",
  5285. // "parameterOrder": [
  5286. // "appsId"
  5287. // ],
  5288. // "parameters": {
  5289. // "appsId": {
  5290. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  5291. // "location": "path",
  5292. // "required": true,
  5293. // "type": "string"
  5294. // },
  5295. // "pageSize": {
  5296. // "description": "Maximum results to return per page.",
  5297. // "format": "int32",
  5298. // "location": "query",
  5299. // "type": "integer"
  5300. // },
  5301. // "pageToken": {
  5302. // "description": "Continuation token for fetching the next page of results.",
  5303. // "location": "query",
  5304. // "type": "string"
  5305. // }
  5306. // },
  5307. // "path": "v1beta/apps/{appsId}/domainMappings",
  5308. // "response": {
  5309. // "$ref": "ListDomainMappingsResponse"
  5310. // },
  5311. // "scopes": [
  5312. // "https://www.googleapis.com/auth/appengine.admin",
  5313. // "https://www.googleapis.com/auth/cloud-platform",
  5314. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5315. // ]
  5316. // }
  5317. }
  5318. // Pages invokes f for each page of results.
  5319. // A non-nil error returned from f will halt the iteration.
  5320. // The provided context supersedes any context provided to the Context method.
  5321. func (c *AppsDomainMappingsListCall) Pages(ctx context.Context, f func(*ListDomainMappingsResponse) error) error {
  5322. c.ctx_ = ctx
  5323. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5324. for {
  5325. x, err := c.Do()
  5326. if err != nil {
  5327. return err
  5328. }
  5329. if err := f(x); err != nil {
  5330. return err
  5331. }
  5332. if x.NextPageToken == "" {
  5333. return nil
  5334. }
  5335. c.PageToken(x.NextPageToken)
  5336. }
  5337. }
  5338. // method id "appengine.apps.domainMappings.patch":
  5339. type AppsDomainMappingsPatchCall struct {
  5340. s *APIService
  5341. appsId string
  5342. domainMappingsId string
  5343. domainmapping *DomainMapping
  5344. urlParams_ gensupport.URLParams
  5345. ctx_ context.Context
  5346. header_ http.Header
  5347. }
  5348. // Patch: Updates the specified domain mapping. To map an SSL
  5349. // certificate to a domain mapping, update certificate_id to point to an
  5350. // AuthorizedCertificate resource. A user must be authorized to
  5351. // administer the associated domain in order to update a DomainMapping
  5352. // resource.
  5353. func (r *AppsDomainMappingsService) Patch(appsId string, domainMappingsId string, domainmapping *DomainMapping) *AppsDomainMappingsPatchCall {
  5354. c := &AppsDomainMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5355. c.appsId = appsId
  5356. c.domainMappingsId = domainMappingsId
  5357. c.domainmapping = domainmapping
  5358. return c
  5359. }
  5360. // UpdateMask sets the optional parameter "updateMask": Standard field
  5361. // mask for the set of fields to be updated.
  5362. func (c *AppsDomainMappingsPatchCall) UpdateMask(updateMask string) *AppsDomainMappingsPatchCall {
  5363. c.urlParams_.Set("updateMask", updateMask)
  5364. return c
  5365. }
  5366. // Fields allows partial responses to be retrieved. See
  5367. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5368. // for more information.
  5369. func (c *AppsDomainMappingsPatchCall) Fields(s ...googleapi.Field) *AppsDomainMappingsPatchCall {
  5370. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5371. return c
  5372. }
  5373. // Context sets the context to be used in this call's Do method. Any
  5374. // pending HTTP request will be aborted if the provided context is
  5375. // canceled.
  5376. func (c *AppsDomainMappingsPatchCall) Context(ctx context.Context) *AppsDomainMappingsPatchCall {
  5377. c.ctx_ = ctx
  5378. return c
  5379. }
  5380. // Header returns an http.Header that can be modified by the caller to
  5381. // add HTTP headers to the request.
  5382. func (c *AppsDomainMappingsPatchCall) Header() http.Header {
  5383. if c.header_ == nil {
  5384. c.header_ = make(http.Header)
  5385. }
  5386. return c.header_
  5387. }
  5388. func (c *AppsDomainMappingsPatchCall) doRequest(alt string) (*http.Response, error) {
  5389. reqHeaders := make(http.Header)
  5390. for k, v := range c.header_ {
  5391. reqHeaders[k] = v
  5392. }
  5393. reqHeaders.Set("User-Agent", c.s.userAgent())
  5394. var body io.Reader = nil
  5395. body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping)
  5396. if err != nil {
  5397. return nil, err
  5398. }
  5399. reqHeaders.Set("Content-Type", "application/json")
  5400. c.urlParams_.Set("alt", alt)
  5401. c.urlParams_.Set("prettyPrint", "false")
  5402. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}")
  5403. urls += "?" + c.urlParams_.Encode()
  5404. req, err := http.NewRequest("PATCH", urls, body)
  5405. if err != nil {
  5406. return nil, err
  5407. }
  5408. req.Header = reqHeaders
  5409. googleapi.Expand(req.URL, map[string]string{
  5410. "appsId": c.appsId,
  5411. "domainMappingsId": c.domainMappingsId,
  5412. })
  5413. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5414. }
  5415. // Do executes the "appengine.apps.domainMappings.patch" call.
  5416. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5417. // status code is an error. Response headers are in either
  5418. // *Operation.ServerResponse.Header or (if a response was returned at
  5419. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5420. // to check whether the returned error was because
  5421. // http.StatusNotModified was returned.
  5422. func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5423. gensupport.SetOptions(c.urlParams_, opts...)
  5424. res, err := c.doRequest("json")
  5425. if res != nil && res.StatusCode == http.StatusNotModified {
  5426. if res.Body != nil {
  5427. res.Body.Close()
  5428. }
  5429. return nil, &googleapi.Error{
  5430. Code: res.StatusCode,
  5431. Header: res.Header,
  5432. }
  5433. }
  5434. if err != nil {
  5435. return nil, err
  5436. }
  5437. defer googleapi.CloseBody(res)
  5438. if err := googleapi.CheckResponse(res); err != nil {
  5439. return nil, err
  5440. }
  5441. ret := &Operation{
  5442. ServerResponse: googleapi.ServerResponse{
  5443. Header: res.Header,
  5444. HTTPStatusCode: res.StatusCode,
  5445. },
  5446. }
  5447. target := &ret
  5448. if err := gensupport.DecodeResponse(target, res); err != nil {
  5449. return nil, err
  5450. }
  5451. return ret, nil
  5452. // {
  5453. // "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.",
  5454. // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  5455. // "httpMethod": "PATCH",
  5456. // "id": "appengine.apps.domainMappings.patch",
  5457. // "parameterOrder": [
  5458. // "appsId",
  5459. // "domainMappingsId"
  5460. // ],
  5461. // "parameters": {
  5462. // "appsId": {
  5463. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.",
  5464. // "location": "path",
  5465. // "required": true,
  5466. // "type": "string"
  5467. // },
  5468. // "domainMappingsId": {
  5469. // "description": "Part of `name`. See documentation of `appsId`.",
  5470. // "location": "path",
  5471. // "required": true,
  5472. // "type": "string"
  5473. // },
  5474. // "updateMask": {
  5475. // "description": "Standard field mask for the set of fields to be updated.",
  5476. // "format": "google-fieldmask",
  5477. // "location": "query",
  5478. // "type": "string"
  5479. // }
  5480. // },
  5481. // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  5482. // "request": {
  5483. // "$ref": "DomainMapping"
  5484. // },
  5485. // "response": {
  5486. // "$ref": "Operation"
  5487. // },
  5488. // "scopes": [
  5489. // "https://www.googleapis.com/auth/cloud-platform"
  5490. // ]
  5491. // }
  5492. }
  5493. // method id "appengine.apps.firewall.ingressRules.batchUpdate":
  5494. type AppsFirewallIngressRulesBatchUpdateCall struct {
  5495. s *APIService
  5496. appsId string
  5497. batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest
  5498. urlParams_ gensupport.URLParams
  5499. ctx_ context.Context
  5500. header_ http.Header
  5501. }
  5502. // BatchUpdate: Replaces the entire firewall ruleset in one bulk
  5503. // operation. This overrides and replaces the rules of an existing
  5504. // firewall with the new rules.If the final rule does not match traffic
  5505. // with the '*' wildcard IP range, then an "allow all" rule is
  5506. // explicitly added to the end of the list.
  5507. func (r *AppsFirewallIngressRulesService) BatchUpdate(appsId string, batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest) *AppsFirewallIngressRulesBatchUpdateCall {
  5508. c := &AppsFirewallIngressRulesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5509. c.appsId = appsId
  5510. c.batchupdateingressrulesrequest = batchupdateingressrulesrequest
  5511. return c
  5512. }
  5513. // Fields allows partial responses to be retrieved. See
  5514. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5515. // for more information.
  5516. func (c *AppsFirewallIngressRulesBatchUpdateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesBatchUpdateCall {
  5517. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5518. return c
  5519. }
  5520. // Context sets the context to be used in this call's Do method. Any
  5521. // pending HTTP request will be aborted if the provided context is
  5522. // canceled.
  5523. func (c *AppsFirewallIngressRulesBatchUpdateCall) Context(ctx context.Context) *AppsFirewallIngressRulesBatchUpdateCall {
  5524. c.ctx_ = ctx
  5525. return c
  5526. }
  5527. // Header returns an http.Header that can be modified by the caller to
  5528. // add HTTP headers to the request.
  5529. func (c *AppsFirewallIngressRulesBatchUpdateCall) Header() http.Header {
  5530. if c.header_ == nil {
  5531. c.header_ = make(http.Header)
  5532. }
  5533. return c.header_
  5534. }
  5535. func (c *AppsFirewallIngressRulesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  5536. reqHeaders := make(http.Header)
  5537. for k, v := range c.header_ {
  5538. reqHeaders[k] = v
  5539. }
  5540. reqHeaders.Set("User-Agent", c.s.userAgent())
  5541. var body io.Reader = nil
  5542. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdateingressrulesrequest)
  5543. if err != nil {
  5544. return nil, err
  5545. }
  5546. reqHeaders.Set("Content-Type", "application/json")
  5547. c.urlParams_.Set("alt", alt)
  5548. c.urlParams_.Set("prettyPrint", "false")
  5549. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate")
  5550. urls += "?" + c.urlParams_.Encode()
  5551. req, err := http.NewRequest("POST", urls, body)
  5552. if err != nil {
  5553. return nil, err
  5554. }
  5555. req.Header = reqHeaders
  5556. googleapi.Expand(req.URL, map[string]string{
  5557. "appsId": c.appsId,
  5558. })
  5559. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5560. }
  5561. // Do executes the "appengine.apps.firewall.ingressRules.batchUpdate" call.
  5562. // Exactly one of *BatchUpdateIngressRulesResponse or error will be
  5563. // non-nil. Any non-2xx status code is an error. Response headers are in
  5564. // either *BatchUpdateIngressRulesResponse.ServerResponse.Header or (if
  5565. // a response was returned at all) in error.(*googleapi.Error).Header.
  5566. // Use googleapi.IsNotModified to check whether the returned error was
  5567. // because http.StatusNotModified was returned.
  5568. func (c *AppsFirewallIngressRulesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateIngressRulesResponse, error) {
  5569. gensupport.SetOptions(c.urlParams_, opts...)
  5570. res, err := c.doRequest("json")
  5571. if res != nil && res.StatusCode == http.StatusNotModified {
  5572. if res.Body != nil {
  5573. res.Body.Close()
  5574. }
  5575. return nil, &googleapi.Error{
  5576. Code: res.StatusCode,
  5577. Header: res.Header,
  5578. }
  5579. }
  5580. if err != nil {
  5581. return nil, err
  5582. }
  5583. defer googleapi.CloseBody(res)
  5584. if err := googleapi.CheckResponse(res); err != nil {
  5585. return nil, err
  5586. }
  5587. ret := &BatchUpdateIngressRulesResponse{
  5588. ServerResponse: googleapi.ServerResponse{
  5589. Header: res.Header,
  5590. HTTPStatusCode: res.StatusCode,
  5591. },
  5592. }
  5593. target := &ret
  5594. if err := gensupport.DecodeResponse(target, res); err != nil {
  5595. return nil, err
  5596. }
  5597. return ret, nil
  5598. // {
  5599. // "description": "Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an \"allow all\" rule is explicitly added to the end of the list.",
  5600. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate",
  5601. // "httpMethod": "POST",
  5602. // "id": "appengine.apps.firewall.ingressRules.batchUpdate",
  5603. // "parameterOrder": [
  5604. // "appsId"
  5605. // ],
  5606. // "parameters": {
  5607. // "appsId": {
  5608. // "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.",
  5609. // "location": "path",
  5610. // "required": true,
  5611. // "type": "string"
  5612. // }
  5613. // },
  5614. // "path": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate",
  5615. // "request": {
  5616. // "$ref": "BatchUpdateIngressRulesRequest"
  5617. // },
  5618. // "response": {
  5619. // "$ref": "BatchUpdateIngressRulesResponse"
  5620. // },
  5621. // "scopes": [
  5622. // "https://www.googleapis.com/auth/cloud-platform"
  5623. // ]
  5624. // }
  5625. }
  5626. // method id "appengine.apps.firewall.ingressRules.create":
  5627. type AppsFirewallIngressRulesCreateCall struct {
  5628. s *APIService
  5629. appsId string
  5630. firewallrule *FirewallRule
  5631. urlParams_ gensupport.URLParams
  5632. ctx_ context.Context
  5633. header_ http.Header
  5634. }
  5635. // Create: Creates a firewall rule for the application.
  5636. func (r *AppsFirewallIngressRulesService) Create(appsId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesCreateCall {
  5637. c := &AppsFirewallIngressRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5638. c.appsId = appsId
  5639. c.firewallrule = firewallrule
  5640. return c
  5641. }
  5642. // Fields allows partial responses to be retrieved. See
  5643. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5644. // for more information.
  5645. func (c *AppsFirewallIngressRulesCreateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesCreateCall {
  5646. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5647. return c
  5648. }
  5649. // Context sets the context to be used in this call's Do method. Any
  5650. // pending HTTP request will be aborted if the provided context is
  5651. // canceled.
  5652. func (c *AppsFirewallIngressRulesCreateCall) Context(ctx context.Context) *AppsFirewallIngressRulesCreateCall {
  5653. c.ctx_ = ctx
  5654. return c
  5655. }
  5656. // Header returns an http.Header that can be modified by the caller to
  5657. // add HTTP headers to the request.
  5658. func (c *AppsFirewallIngressRulesCreateCall) Header() http.Header {
  5659. if c.header_ == nil {
  5660. c.header_ = make(http.Header)
  5661. }
  5662. return c.header_
  5663. }
  5664. func (c *AppsFirewallIngressRulesCreateCall) doRequest(alt string) (*http.Response, error) {
  5665. reqHeaders := make(http.Header)
  5666. for k, v := range c.header_ {
  5667. reqHeaders[k] = v
  5668. }
  5669. reqHeaders.Set("User-Agent", c.s.userAgent())
  5670. var body io.Reader = nil
  5671. body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule)
  5672. if err != nil {
  5673. return nil, err
  5674. }
  5675. reqHeaders.Set("Content-Type", "application/json")
  5676. c.urlParams_.Set("alt", alt)
  5677. c.urlParams_.Set("prettyPrint", "false")
  5678. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules")
  5679. urls += "?" + c.urlParams_.Encode()
  5680. req, err := http.NewRequest("POST", urls, body)
  5681. if err != nil {
  5682. return nil, err
  5683. }
  5684. req.Header = reqHeaders
  5685. googleapi.Expand(req.URL, map[string]string{
  5686. "appsId": c.appsId,
  5687. })
  5688. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5689. }
  5690. // Do executes the "appengine.apps.firewall.ingressRules.create" call.
  5691. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  5692. // status code is an error. Response headers are in either
  5693. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  5694. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5695. // to check whether the returned error was because
  5696. // http.StatusNotModified was returned.
  5697. func (c *AppsFirewallIngressRulesCreateCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  5698. gensupport.SetOptions(c.urlParams_, opts...)
  5699. res, err := c.doRequest("json")
  5700. if res != nil && res.StatusCode == http.StatusNotModified {
  5701. if res.Body != nil {
  5702. res.Body.Close()
  5703. }
  5704. return nil, &googleapi.Error{
  5705. Code: res.StatusCode,
  5706. Header: res.Header,
  5707. }
  5708. }
  5709. if err != nil {
  5710. return nil, err
  5711. }
  5712. defer googleapi.CloseBody(res)
  5713. if err := googleapi.CheckResponse(res); err != nil {
  5714. return nil, err
  5715. }
  5716. ret := &FirewallRule{
  5717. ServerResponse: googleapi.ServerResponse{
  5718. Header: res.Header,
  5719. HTTPStatusCode: res.StatusCode,
  5720. },
  5721. }
  5722. target := &ret
  5723. if err := gensupport.DecodeResponse(target, res); err != nil {
  5724. return nil, err
  5725. }
  5726. return ret, nil
  5727. // {
  5728. // "description": "Creates a firewall rule for the application.",
  5729. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules",
  5730. // "httpMethod": "POST",
  5731. // "id": "appengine.apps.firewall.ingressRules.create",
  5732. // "parameterOrder": [
  5733. // "appsId"
  5734. // ],
  5735. // "parameters": {
  5736. // "appsId": {
  5737. // "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.",
  5738. // "location": "path",
  5739. // "required": true,
  5740. // "type": "string"
  5741. // }
  5742. // },
  5743. // "path": "v1beta/apps/{appsId}/firewall/ingressRules",
  5744. // "request": {
  5745. // "$ref": "FirewallRule"
  5746. // },
  5747. // "response": {
  5748. // "$ref": "FirewallRule"
  5749. // },
  5750. // "scopes": [
  5751. // "https://www.googleapis.com/auth/cloud-platform"
  5752. // ]
  5753. // }
  5754. }
  5755. // method id "appengine.apps.firewall.ingressRules.delete":
  5756. type AppsFirewallIngressRulesDeleteCall struct {
  5757. s *APIService
  5758. appsId string
  5759. ingressRulesId string
  5760. urlParams_ gensupport.URLParams
  5761. ctx_ context.Context
  5762. header_ http.Header
  5763. }
  5764. // Delete: Deletes the specified firewall rule.
  5765. func (r *AppsFirewallIngressRulesService) Delete(appsId string, ingressRulesId string) *AppsFirewallIngressRulesDeleteCall {
  5766. c := &AppsFirewallIngressRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5767. c.appsId = appsId
  5768. c.ingressRulesId = ingressRulesId
  5769. return c
  5770. }
  5771. // Fields allows partial responses to be retrieved. See
  5772. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5773. // for more information.
  5774. func (c *AppsFirewallIngressRulesDeleteCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesDeleteCall {
  5775. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5776. return c
  5777. }
  5778. // Context sets the context to be used in this call's Do method. Any
  5779. // pending HTTP request will be aborted if the provided context is
  5780. // canceled.
  5781. func (c *AppsFirewallIngressRulesDeleteCall) Context(ctx context.Context) *AppsFirewallIngressRulesDeleteCall {
  5782. c.ctx_ = ctx
  5783. return c
  5784. }
  5785. // Header returns an http.Header that can be modified by the caller to
  5786. // add HTTP headers to the request.
  5787. func (c *AppsFirewallIngressRulesDeleteCall) Header() http.Header {
  5788. if c.header_ == nil {
  5789. c.header_ = make(http.Header)
  5790. }
  5791. return c.header_
  5792. }
  5793. func (c *AppsFirewallIngressRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5794. reqHeaders := make(http.Header)
  5795. for k, v := range c.header_ {
  5796. reqHeaders[k] = v
  5797. }
  5798. reqHeaders.Set("User-Agent", c.s.userAgent())
  5799. var body io.Reader = nil
  5800. c.urlParams_.Set("alt", alt)
  5801. c.urlParams_.Set("prettyPrint", "false")
  5802. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  5803. urls += "?" + c.urlParams_.Encode()
  5804. req, err := http.NewRequest("DELETE", urls, body)
  5805. if err != nil {
  5806. return nil, err
  5807. }
  5808. req.Header = reqHeaders
  5809. googleapi.Expand(req.URL, map[string]string{
  5810. "appsId": c.appsId,
  5811. "ingressRulesId": c.ingressRulesId,
  5812. })
  5813. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5814. }
  5815. // Do executes the "appengine.apps.firewall.ingressRules.delete" call.
  5816. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5817. // code is an error. Response headers are in either
  5818. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5819. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5820. // check whether the returned error was because http.StatusNotModified
  5821. // was returned.
  5822. func (c *AppsFirewallIngressRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5823. gensupport.SetOptions(c.urlParams_, opts...)
  5824. res, err := c.doRequest("json")
  5825. if res != nil && res.StatusCode == http.StatusNotModified {
  5826. if res.Body != nil {
  5827. res.Body.Close()
  5828. }
  5829. return nil, &googleapi.Error{
  5830. Code: res.StatusCode,
  5831. Header: res.Header,
  5832. }
  5833. }
  5834. if err != nil {
  5835. return nil, err
  5836. }
  5837. defer googleapi.CloseBody(res)
  5838. if err := googleapi.CheckResponse(res); err != nil {
  5839. return nil, err
  5840. }
  5841. ret := &Empty{
  5842. ServerResponse: googleapi.ServerResponse{
  5843. Header: res.Header,
  5844. HTTPStatusCode: res.StatusCode,
  5845. },
  5846. }
  5847. target := &ret
  5848. if err := gensupport.DecodeResponse(target, res); err != nil {
  5849. return nil, err
  5850. }
  5851. return ret, nil
  5852. // {
  5853. // "description": "Deletes the specified firewall rule.",
  5854. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5855. // "httpMethod": "DELETE",
  5856. // "id": "appengine.apps.firewall.ingressRules.delete",
  5857. // "parameterOrder": [
  5858. // "appsId",
  5859. // "ingressRulesId"
  5860. // ],
  5861. // "parameters": {
  5862. // "appsId": {
  5863. // "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.",
  5864. // "location": "path",
  5865. // "required": true,
  5866. // "type": "string"
  5867. // },
  5868. // "ingressRulesId": {
  5869. // "description": "Part of `name`. See documentation of `appsId`.",
  5870. // "location": "path",
  5871. // "required": true,
  5872. // "type": "string"
  5873. // }
  5874. // },
  5875. // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5876. // "response": {
  5877. // "$ref": "Empty"
  5878. // },
  5879. // "scopes": [
  5880. // "https://www.googleapis.com/auth/cloud-platform"
  5881. // ]
  5882. // }
  5883. }
  5884. // method id "appengine.apps.firewall.ingressRules.get":
  5885. type AppsFirewallIngressRulesGetCall struct {
  5886. s *APIService
  5887. appsId string
  5888. ingressRulesId string
  5889. urlParams_ gensupport.URLParams
  5890. ifNoneMatch_ string
  5891. ctx_ context.Context
  5892. header_ http.Header
  5893. }
  5894. // Get: Gets the specified firewall rule.
  5895. func (r *AppsFirewallIngressRulesService) Get(appsId string, ingressRulesId string) *AppsFirewallIngressRulesGetCall {
  5896. c := &AppsFirewallIngressRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5897. c.appsId = appsId
  5898. c.ingressRulesId = ingressRulesId
  5899. return c
  5900. }
  5901. // Fields allows partial responses to be retrieved. See
  5902. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5903. // for more information.
  5904. func (c *AppsFirewallIngressRulesGetCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesGetCall {
  5905. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5906. return c
  5907. }
  5908. // IfNoneMatch sets the optional parameter which makes the operation
  5909. // fail if the object's ETag matches the given value. This is useful for
  5910. // getting updates only after the object has changed since the last
  5911. // request. Use googleapi.IsNotModified to check whether the response
  5912. // error from Do is the result of In-None-Match.
  5913. func (c *AppsFirewallIngressRulesGetCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesGetCall {
  5914. c.ifNoneMatch_ = entityTag
  5915. return c
  5916. }
  5917. // Context sets the context to be used in this call's Do method. Any
  5918. // pending HTTP request will be aborted if the provided context is
  5919. // canceled.
  5920. func (c *AppsFirewallIngressRulesGetCall) Context(ctx context.Context) *AppsFirewallIngressRulesGetCall {
  5921. c.ctx_ = ctx
  5922. return c
  5923. }
  5924. // Header returns an http.Header that can be modified by the caller to
  5925. // add HTTP headers to the request.
  5926. func (c *AppsFirewallIngressRulesGetCall) Header() http.Header {
  5927. if c.header_ == nil {
  5928. c.header_ = make(http.Header)
  5929. }
  5930. return c.header_
  5931. }
  5932. func (c *AppsFirewallIngressRulesGetCall) doRequest(alt string) (*http.Response, error) {
  5933. reqHeaders := make(http.Header)
  5934. for k, v := range c.header_ {
  5935. reqHeaders[k] = v
  5936. }
  5937. reqHeaders.Set("User-Agent", c.s.userAgent())
  5938. if c.ifNoneMatch_ != "" {
  5939. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5940. }
  5941. var body io.Reader = nil
  5942. c.urlParams_.Set("alt", alt)
  5943. c.urlParams_.Set("prettyPrint", "false")
  5944. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  5945. urls += "?" + c.urlParams_.Encode()
  5946. req, err := http.NewRequest("GET", urls, body)
  5947. if err != nil {
  5948. return nil, err
  5949. }
  5950. req.Header = reqHeaders
  5951. googleapi.Expand(req.URL, map[string]string{
  5952. "appsId": c.appsId,
  5953. "ingressRulesId": c.ingressRulesId,
  5954. })
  5955. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5956. }
  5957. // Do executes the "appengine.apps.firewall.ingressRules.get" call.
  5958. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  5959. // status code is an error. Response headers are in either
  5960. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  5961. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5962. // to check whether the returned error was because
  5963. // http.StatusNotModified was returned.
  5964. func (c *AppsFirewallIngressRulesGetCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  5965. gensupport.SetOptions(c.urlParams_, opts...)
  5966. res, err := c.doRequest("json")
  5967. if res != nil && res.StatusCode == http.StatusNotModified {
  5968. if res.Body != nil {
  5969. res.Body.Close()
  5970. }
  5971. return nil, &googleapi.Error{
  5972. Code: res.StatusCode,
  5973. Header: res.Header,
  5974. }
  5975. }
  5976. if err != nil {
  5977. return nil, err
  5978. }
  5979. defer googleapi.CloseBody(res)
  5980. if err := googleapi.CheckResponse(res); err != nil {
  5981. return nil, err
  5982. }
  5983. ret := &FirewallRule{
  5984. ServerResponse: googleapi.ServerResponse{
  5985. Header: res.Header,
  5986. HTTPStatusCode: res.StatusCode,
  5987. },
  5988. }
  5989. target := &ret
  5990. if err := gensupport.DecodeResponse(target, res); err != nil {
  5991. return nil, err
  5992. }
  5993. return ret, nil
  5994. // {
  5995. // "description": "Gets the specified firewall rule.",
  5996. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5997. // "httpMethod": "GET",
  5998. // "id": "appengine.apps.firewall.ingressRules.get",
  5999. // "parameterOrder": [
  6000. // "appsId",
  6001. // "ingressRulesId"
  6002. // ],
  6003. // "parameters": {
  6004. // "appsId": {
  6005. // "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.",
  6006. // "location": "path",
  6007. // "required": true,
  6008. // "type": "string"
  6009. // },
  6010. // "ingressRulesId": {
  6011. // "description": "Part of `name`. See documentation of `appsId`.",
  6012. // "location": "path",
  6013. // "required": true,
  6014. // "type": "string"
  6015. // }
  6016. // },
  6017. // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  6018. // "response": {
  6019. // "$ref": "FirewallRule"
  6020. // },
  6021. // "scopes": [
  6022. // "https://www.googleapis.com/auth/appengine.admin",
  6023. // "https://www.googleapis.com/auth/cloud-platform",
  6024. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6025. // ]
  6026. // }
  6027. }
  6028. // method id "appengine.apps.firewall.ingressRules.list":
  6029. type AppsFirewallIngressRulesListCall struct {
  6030. s *APIService
  6031. appsId string
  6032. urlParams_ gensupport.URLParams
  6033. ifNoneMatch_ string
  6034. ctx_ context.Context
  6035. header_ http.Header
  6036. }
  6037. // List: Lists the firewall rules of an application.
  6038. func (r *AppsFirewallIngressRulesService) List(appsId string) *AppsFirewallIngressRulesListCall {
  6039. c := &AppsFirewallIngressRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6040. c.appsId = appsId
  6041. return c
  6042. }
  6043. // MatchingAddress sets the optional parameter "matchingAddress": A
  6044. // valid IP Address. If set, only rules matching this address will be
  6045. // returned. The first returned rule will be the rule that fires on
  6046. // requests from this IP.
  6047. func (c *AppsFirewallIngressRulesListCall) MatchingAddress(matchingAddress string) *AppsFirewallIngressRulesListCall {
  6048. c.urlParams_.Set("matchingAddress", matchingAddress)
  6049. return c
  6050. }
  6051. // PageSize sets the optional parameter "pageSize": Maximum results to
  6052. // return per page.
  6053. func (c *AppsFirewallIngressRulesListCall) PageSize(pageSize int64) *AppsFirewallIngressRulesListCall {
  6054. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6055. return c
  6056. }
  6057. // PageToken sets the optional parameter "pageToken": Continuation token
  6058. // for fetching the next page of results.
  6059. func (c *AppsFirewallIngressRulesListCall) PageToken(pageToken string) *AppsFirewallIngressRulesListCall {
  6060. c.urlParams_.Set("pageToken", pageToken)
  6061. return c
  6062. }
  6063. // Fields allows partial responses to be retrieved. See
  6064. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6065. // for more information.
  6066. func (c *AppsFirewallIngressRulesListCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesListCall {
  6067. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6068. return c
  6069. }
  6070. // IfNoneMatch sets the optional parameter which makes the operation
  6071. // fail if the object's ETag matches the given value. This is useful for
  6072. // getting updates only after the object has changed since the last
  6073. // request. Use googleapi.IsNotModified to check whether the response
  6074. // error from Do is the result of In-None-Match.
  6075. func (c *AppsFirewallIngressRulesListCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesListCall {
  6076. c.ifNoneMatch_ = entityTag
  6077. return c
  6078. }
  6079. // Context sets the context to be used in this call's Do method. Any
  6080. // pending HTTP request will be aborted if the provided context is
  6081. // canceled.
  6082. func (c *AppsFirewallIngressRulesListCall) Context(ctx context.Context) *AppsFirewallIngressRulesListCall {
  6083. c.ctx_ = ctx
  6084. return c
  6085. }
  6086. // Header returns an http.Header that can be modified by the caller to
  6087. // add HTTP headers to the request.
  6088. func (c *AppsFirewallIngressRulesListCall) Header() http.Header {
  6089. if c.header_ == nil {
  6090. c.header_ = make(http.Header)
  6091. }
  6092. return c.header_
  6093. }
  6094. func (c *AppsFirewallIngressRulesListCall) doRequest(alt string) (*http.Response, error) {
  6095. reqHeaders := make(http.Header)
  6096. for k, v := range c.header_ {
  6097. reqHeaders[k] = v
  6098. }
  6099. reqHeaders.Set("User-Agent", c.s.userAgent())
  6100. if c.ifNoneMatch_ != "" {
  6101. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6102. }
  6103. var body io.Reader = nil
  6104. c.urlParams_.Set("alt", alt)
  6105. c.urlParams_.Set("prettyPrint", "false")
  6106. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules")
  6107. urls += "?" + c.urlParams_.Encode()
  6108. req, err := http.NewRequest("GET", urls, body)
  6109. if err != nil {
  6110. return nil, err
  6111. }
  6112. req.Header = reqHeaders
  6113. googleapi.Expand(req.URL, map[string]string{
  6114. "appsId": c.appsId,
  6115. })
  6116. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6117. }
  6118. // Do executes the "appengine.apps.firewall.ingressRules.list" call.
  6119. // Exactly one of *ListIngressRulesResponse or error will be non-nil.
  6120. // Any non-2xx status code is an error. Response headers are in either
  6121. // *ListIngressRulesResponse.ServerResponse.Header or (if a response was
  6122. // returned at all) in error.(*googleapi.Error).Header. Use
  6123. // googleapi.IsNotModified to check whether the returned error was
  6124. // because http.StatusNotModified was returned.
  6125. func (c *AppsFirewallIngressRulesListCall) Do(opts ...googleapi.CallOption) (*ListIngressRulesResponse, error) {
  6126. gensupport.SetOptions(c.urlParams_, opts...)
  6127. res, err := c.doRequest("json")
  6128. if res != nil && res.StatusCode == http.StatusNotModified {
  6129. if res.Body != nil {
  6130. res.Body.Close()
  6131. }
  6132. return nil, &googleapi.Error{
  6133. Code: res.StatusCode,
  6134. Header: res.Header,
  6135. }
  6136. }
  6137. if err != nil {
  6138. return nil, err
  6139. }
  6140. defer googleapi.CloseBody(res)
  6141. if err := googleapi.CheckResponse(res); err != nil {
  6142. return nil, err
  6143. }
  6144. ret := &ListIngressRulesResponse{
  6145. ServerResponse: googleapi.ServerResponse{
  6146. Header: res.Header,
  6147. HTTPStatusCode: res.StatusCode,
  6148. },
  6149. }
  6150. target := &ret
  6151. if err := gensupport.DecodeResponse(target, res); err != nil {
  6152. return nil, err
  6153. }
  6154. return ret, nil
  6155. // {
  6156. // "description": "Lists the firewall rules of an application.",
  6157. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules",
  6158. // "httpMethod": "GET",
  6159. // "id": "appengine.apps.firewall.ingressRules.list",
  6160. // "parameterOrder": [
  6161. // "appsId"
  6162. // ],
  6163. // "parameters": {
  6164. // "appsId": {
  6165. // "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.",
  6166. // "location": "path",
  6167. // "required": true,
  6168. // "type": "string"
  6169. // },
  6170. // "matchingAddress": {
  6171. // "description": "A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.",
  6172. // "location": "query",
  6173. // "type": "string"
  6174. // },
  6175. // "pageSize": {
  6176. // "description": "Maximum results to return per page.",
  6177. // "format": "int32",
  6178. // "location": "query",
  6179. // "type": "integer"
  6180. // },
  6181. // "pageToken": {
  6182. // "description": "Continuation token for fetching the next page of results.",
  6183. // "location": "query",
  6184. // "type": "string"
  6185. // }
  6186. // },
  6187. // "path": "v1beta/apps/{appsId}/firewall/ingressRules",
  6188. // "response": {
  6189. // "$ref": "ListIngressRulesResponse"
  6190. // },
  6191. // "scopes": [
  6192. // "https://www.googleapis.com/auth/appengine.admin",
  6193. // "https://www.googleapis.com/auth/cloud-platform",
  6194. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6195. // ]
  6196. // }
  6197. }
  6198. // Pages invokes f for each page of results.
  6199. // A non-nil error returned from f will halt the iteration.
  6200. // The provided context supersedes any context provided to the Context method.
  6201. func (c *AppsFirewallIngressRulesListCall) Pages(ctx context.Context, f func(*ListIngressRulesResponse) error) error {
  6202. c.ctx_ = ctx
  6203. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6204. for {
  6205. x, err := c.Do()
  6206. if err != nil {
  6207. return err
  6208. }
  6209. if err := f(x); err != nil {
  6210. return err
  6211. }
  6212. if x.NextPageToken == "" {
  6213. return nil
  6214. }
  6215. c.PageToken(x.NextPageToken)
  6216. }
  6217. }
  6218. // method id "appengine.apps.firewall.ingressRules.patch":
  6219. type AppsFirewallIngressRulesPatchCall struct {
  6220. s *APIService
  6221. appsId string
  6222. ingressRulesId string
  6223. firewallrule *FirewallRule
  6224. urlParams_ gensupport.URLParams
  6225. ctx_ context.Context
  6226. header_ http.Header
  6227. }
  6228. // Patch: Updates the specified firewall rule.
  6229. func (r *AppsFirewallIngressRulesService) Patch(appsId string, ingressRulesId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesPatchCall {
  6230. c := &AppsFirewallIngressRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6231. c.appsId = appsId
  6232. c.ingressRulesId = ingressRulesId
  6233. c.firewallrule = firewallrule
  6234. return c
  6235. }
  6236. // UpdateMask sets the optional parameter "updateMask": Standard field
  6237. // mask for the set of fields to be updated.
  6238. func (c *AppsFirewallIngressRulesPatchCall) UpdateMask(updateMask string) *AppsFirewallIngressRulesPatchCall {
  6239. c.urlParams_.Set("updateMask", updateMask)
  6240. return c
  6241. }
  6242. // Fields allows partial responses to be retrieved. See
  6243. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6244. // for more information.
  6245. func (c *AppsFirewallIngressRulesPatchCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesPatchCall {
  6246. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6247. return c
  6248. }
  6249. // Context sets the context to be used in this call's Do method. Any
  6250. // pending HTTP request will be aborted if the provided context is
  6251. // canceled.
  6252. func (c *AppsFirewallIngressRulesPatchCall) Context(ctx context.Context) *AppsFirewallIngressRulesPatchCall {
  6253. c.ctx_ = ctx
  6254. return c
  6255. }
  6256. // Header returns an http.Header that can be modified by the caller to
  6257. // add HTTP headers to the request.
  6258. func (c *AppsFirewallIngressRulesPatchCall) Header() http.Header {
  6259. if c.header_ == nil {
  6260. c.header_ = make(http.Header)
  6261. }
  6262. return c.header_
  6263. }
  6264. func (c *AppsFirewallIngressRulesPatchCall) doRequest(alt string) (*http.Response, error) {
  6265. reqHeaders := make(http.Header)
  6266. for k, v := range c.header_ {
  6267. reqHeaders[k] = v
  6268. }
  6269. reqHeaders.Set("User-Agent", c.s.userAgent())
  6270. var body io.Reader = nil
  6271. body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule)
  6272. if err != nil {
  6273. return nil, err
  6274. }
  6275. reqHeaders.Set("Content-Type", "application/json")
  6276. c.urlParams_.Set("alt", alt)
  6277. c.urlParams_.Set("prettyPrint", "false")
  6278. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  6279. urls += "?" + c.urlParams_.Encode()
  6280. req, err := http.NewRequest("PATCH", urls, body)
  6281. if err != nil {
  6282. return nil, err
  6283. }
  6284. req.Header = reqHeaders
  6285. googleapi.Expand(req.URL, map[string]string{
  6286. "appsId": c.appsId,
  6287. "ingressRulesId": c.ingressRulesId,
  6288. })
  6289. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6290. }
  6291. // Do executes the "appengine.apps.firewall.ingressRules.patch" call.
  6292. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  6293. // status code is an error. Response headers are in either
  6294. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  6295. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6296. // to check whether the returned error was because
  6297. // http.StatusNotModified was returned.
  6298. func (c *AppsFirewallIngressRulesPatchCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  6299. gensupport.SetOptions(c.urlParams_, opts...)
  6300. res, err := c.doRequest("json")
  6301. if res != nil && res.StatusCode == http.StatusNotModified {
  6302. if res.Body != nil {
  6303. res.Body.Close()
  6304. }
  6305. return nil, &googleapi.Error{
  6306. Code: res.StatusCode,
  6307. Header: res.Header,
  6308. }
  6309. }
  6310. if err != nil {
  6311. return nil, err
  6312. }
  6313. defer googleapi.CloseBody(res)
  6314. if err := googleapi.CheckResponse(res); err != nil {
  6315. return nil, err
  6316. }
  6317. ret := &FirewallRule{
  6318. ServerResponse: googleapi.ServerResponse{
  6319. Header: res.Header,
  6320. HTTPStatusCode: res.StatusCode,
  6321. },
  6322. }
  6323. target := &ret
  6324. if err := gensupport.DecodeResponse(target, res); err != nil {
  6325. return nil, err
  6326. }
  6327. return ret, nil
  6328. // {
  6329. // "description": "Updates the specified firewall rule.",
  6330. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  6331. // "httpMethod": "PATCH",
  6332. // "id": "appengine.apps.firewall.ingressRules.patch",
  6333. // "parameterOrder": [
  6334. // "appsId",
  6335. // "ingressRulesId"
  6336. // ],
  6337. // "parameters": {
  6338. // "appsId": {
  6339. // "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.",
  6340. // "location": "path",
  6341. // "required": true,
  6342. // "type": "string"
  6343. // },
  6344. // "ingressRulesId": {
  6345. // "description": "Part of `name`. See documentation of `appsId`.",
  6346. // "location": "path",
  6347. // "required": true,
  6348. // "type": "string"
  6349. // },
  6350. // "updateMask": {
  6351. // "description": "Standard field mask for the set of fields to be updated.",
  6352. // "format": "google-fieldmask",
  6353. // "location": "query",
  6354. // "type": "string"
  6355. // }
  6356. // },
  6357. // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  6358. // "request": {
  6359. // "$ref": "FirewallRule"
  6360. // },
  6361. // "response": {
  6362. // "$ref": "FirewallRule"
  6363. // },
  6364. // "scopes": [
  6365. // "https://www.googleapis.com/auth/cloud-platform"
  6366. // ]
  6367. // }
  6368. }
  6369. // method id "appengine.apps.locations.get":
  6370. type AppsLocationsGetCall struct {
  6371. s *APIService
  6372. appsId string
  6373. locationsId string
  6374. urlParams_ gensupport.URLParams
  6375. ifNoneMatch_ string
  6376. ctx_ context.Context
  6377. header_ http.Header
  6378. }
  6379. // Get: Gets information about a location.
  6380. func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall {
  6381. c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6382. c.appsId = appsId
  6383. c.locationsId = locationsId
  6384. return c
  6385. }
  6386. // Fields allows partial responses to be retrieved. See
  6387. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6388. // for more information.
  6389. func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall {
  6390. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6391. return c
  6392. }
  6393. // IfNoneMatch sets the optional parameter which makes the operation
  6394. // fail if the object's ETag matches the given value. This is useful for
  6395. // getting updates only after the object has changed since the last
  6396. // request. Use googleapi.IsNotModified to check whether the response
  6397. // error from Do is the result of In-None-Match.
  6398. func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall {
  6399. c.ifNoneMatch_ = entityTag
  6400. return c
  6401. }
  6402. // Context sets the context to be used in this call's Do method. Any
  6403. // pending HTTP request will be aborted if the provided context is
  6404. // canceled.
  6405. func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall {
  6406. c.ctx_ = ctx
  6407. return c
  6408. }
  6409. // Header returns an http.Header that can be modified by the caller to
  6410. // add HTTP headers to the request.
  6411. func (c *AppsLocationsGetCall) Header() http.Header {
  6412. if c.header_ == nil {
  6413. c.header_ = make(http.Header)
  6414. }
  6415. return c.header_
  6416. }
  6417. func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  6418. reqHeaders := make(http.Header)
  6419. for k, v := range c.header_ {
  6420. reqHeaders[k] = v
  6421. }
  6422. reqHeaders.Set("User-Agent", c.s.userAgent())
  6423. if c.ifNoneMatch_ != "" {
  6424. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6425. }
  6426. var body io.Reader = nil
  6427. c.urlParams_.Set("alt", alt)
  6428. c.urlParams_.Set("prettyPrint", "false")
  6429. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/locations/{locationsId}")
  6430. urls += "?" + c.urlParams_.Encode()
  6431. req, err := http.NewRequest("GET", urls, body)
  6432. if err != nil {
  6433. return nil, err
  6434. }
  6435. req.Header = reqHeaders
  6436. googleapi.Expand(req.URL, map[string]string{
  6437. "appsId": c.appsId,
  6438. "locationsId": c.locationsId,
  6439. })
  6440. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6441. }
  6442. // Do executes the "appengine.apps.locations.get" call.
  6443. // Exactly one of *Location or error will be non-nil. Any non-2xx status
  6444. // code is an error. Response headers are in either
  6445. // *Location.ServerResponse.Header or (if a response was returned at
  6446. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6447. // to check whether the returned error was because
  6448. // http.StatusNotModified was returned.
  6449. func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  6450. gensupport.SetOptions(c.urlParams_, opts...)
  6451. res, err := c.doRequest("json")
  6452. if res != nil && res.StatusCode == http.StatusNotModified {
  6453. if res.Body != nil {
  6454. res.Body.Close()
  6455. }
  6456. return nil, &googleapi.Error{
  6457. Code: res.StatusCode,
  6458. Header: res.Header,
  6459. }
  6460. }
  6461. if err != nil {
  6462. return nil, err
  6463. }
  6464. defer googleapi.CloseBody(res)
  6465. if err := googleapi.CheckResponse(res); err != nil {
  6466. return nil, err
  6467. }
  6468. ret := &Location{
  6469. ServerResponse: googleapi.ServerResponse{
  6470. Header: res.Header,
  6471. HTTPStatusCode: res.StatusCode,
  6472. },
  6473. }
  6474. target := &ret
  6475. if err := gensupport.DecodeResponse(target, res); err != nil {
  6476. return nil, err
  6477. }
  6478. return ret, nil
  6479. // {
  6480. // "description": "Gets information about a location.",
  6481. // "flatPath": "v1beta/apps/{appsId}/locations/{locationsId}",
  6482. // "httpMethod": "GET",
  6483. // "id": "appengine.apps.locations.get",
  6484. // "parameterOrder": [
  6485. // "appsId",
  6486. // "locationsId"
  6487. // ],
  6488. // "parameters": {
  6489. // "appsId": {
  6490. // "description": "Part of `name`. Resource name for the location.",
  6491. // "location": "path",
  6492. // "required": true,
  6493. // "type": "string"
  6494. // },
  6495. // "locationsId": {
  6496. // "description": "Part of `name`. See documentation of `appsId`.",
  6497. // "location": "path",
  6498. // "required": true,
  6499. // "type": "string"
  6500. // }
  6501. // },
  6502. // "path": "v1beta/apps/{appsId}/locations/{locationsId}",
  6503. // "response": {
  6504. // "$ref": "Location"
  6505. // },
  6506. // "scopes": [
  6507. // "https://www.googleapis.com/auth/appengine.admin",
  6508. // "https://www.googleapis.com/auth/cloud-platform",
  6509. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6510. // ]
  6511. // }
  6512. }
  6513. // method id "appengine.apps.locations.list":
  6514. type AppsLocationsListCall struct {
  6515. s *APIService
  6516. appsId string
  6517. urlParams_ gensupport.URLParams
  6518. ifNoneMatch_ string
  6519. ctx_ context.Context
  6520. header_ http.Header
  6521. }
  6522. // List: Lists information about the supported locations for this
  6523. // service.
  6524. func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall {
  6525. c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6526. c.appsId = appsId
  6527. return c
  6528. }
  6529. // Filter sets the optional parameter "filter": The standard list
  6530. // filter.
  6531. func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall {
  6532. c.urlParams_.Set("filter", filter)
  6533. return c
  6534. }
  6535. // PageSize sets the optional parameter "pageSize": The standard list
  6536. // page size.
  6537. func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall {
  6538. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6539. return c
  6540. }
  6541. // PageToken sets the optional parameter "pageToken": The standard list
  6542. // page token.
  6543. func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall {
  6544. c.urlParams_.Set("pageToken", pageToken)
  6545. return c
  6546. }
  6547. // Fields allows partial responses to be retrieved. See
  6548. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6549. // for more information.
  6550. func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall {
  6551. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6552. return c
  6553. }
  6554. // IfNoneMatch sets the optional parameter which makes the operation
  6555. // fail if the object's ETag matches the given value. This is useful for
  6556. // getting updates only after the object has changed since the last
  6557. // request. Use googleapi.IsNotModified to check whether the response
  6558. // error from Do is the result of In-None-Match.
  6559. func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall {
  6560. c.ifNoneMatch_ = entityTag
  6561. return c
  6562. }
  6563. // Context sets the context to be used in this call's Do method. Any
  6564. // pending HTTP request will be aborted if the provided context is
  6565. // canceled.
  6566. func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall {
  6567. c.ctx_ = ctx
  6568. return c
  6569. }
  6570. // Header returns an http.Header that can be modified by the caller to
  6571. // add HTTP headers to the request.
  6572. func (c *AppsLocationsListCall) Header() http.Header {
  6573. if c.header_ == nil {
  6574. c.header_ = make(http.Header)
  6575. }
  6576. return c.header_
  6577. }
  6578. func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  6579. reqHeaders := make(http.Header)
  6580. for k, v := range c.header_ {
  6581. reqHeaders[k] = v
  6582. }
  6583. reqHeaders.Set("User-Agent", c.s.userAgent())
  6584. if c.ifNoneMatch_ != "" {
  6585. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6586. }
  6587. var body io.Reader = nil
  6588. c.urlParams_.Set("alt", alt)
  6589. c.urlParams_.Set("prettyPrint", "false")
  6590. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/locations")
  6591. urls += "?" + c.urlParams_.Encode()
  6592. req, err := http.NewRequest("GET", urls, body)
  6593. if err != nil {
  6594. return nil, err
  6595. }
  6596. req.Header = reqHeaders
  6597. googleapi.Expand(req.URL, map[string]string{
  6598. "appsId": c.appsId,
  6599. })
  6600. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6601. }
  6602. // Do executes the "appengine.apps.locations.list" call.
  6603. // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  6604. // non-2xx status code is an error. Response headers are in either
  6605. // *ListLocationsResponse.ServerResponse.Header or (if a response was
  6606. // returned at all) in error.(*googleapi.Error).Header. Use
  6607. // googleapi.IsNotModified to check whether the returned error was
  6608. // because http.StatusNotModified was returned.
  6609. func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  6610. gensupport.SetOptions(c.urlParams_, opts...)
  6611. res, err := c.doRequest("json")
  6612. if res != nil && res.StatusCode == http.StatusNotModified {
  6613. if res.Body != nil {
  6614. res.Body.Close()
  6615. }
  6616. return nil, &googleapi.Error{
  6617. Code: res.StatusCode,
  6618. Header: res.Header,
  6619. }
  6620. }
  6621. if err != nil {
  6622. return nil, err
  6623. }
  6624. defer googleapi.CloseBody(res)
  6625. if err := googleapi.CheckResponse(res); err != nil {
  6626. return nil, err
  6627. }
  6628. ret := &ListLocationsResponse{
  6629. ServerResponse: googleapi.ServerResponse{
  6630. Header: res.Header,
  6631. HTTPStatusCode: res.StatusCode,
  6632. },
  6633. }
  6634. target := &ret
  6635. if err := gensupport.DecodeResponse(target, res); err != nil {
  6636. return nil, err
  6637. }
  6638. return ret, nil
  6639. // {
  6640. // "description": "Lists information about the supported locations for this service.",
  6641. // "flatPath": "v1beta/apps/{appsId}/locations",
  6642. // "httpMethod": "GET",
  6643. // "id": "appengine.apps.locations.list",
  6644. // "parameterOrder": [
  6645. // "appsId"
  6646. // ],
  6647. // "parameters": {
  6648. // "appsId": {
  6649. // "description": "Part of `name`. The resource that owns the locations collection, if applicable.",
  6650. // "location": "path",
  6651. // "required": true,
  6652. // "type": "string"
  6653. // },
  6654. // "filter": {
  6655. // "description": "The standard list filter.",
  6656. // "location": "query",
  6657. // "type": "string"
  6658. // },
  6659. // "pageSize": {
  6660. // "description": "The standard list page size.",
  6661. // "format": "int32",
  6662. // "location": "query",
  6663. // "type": "integer"
  6664. // },
  6665. // "pageToken": {
  6666. // "description": "The standard list page token.",
  6667. // "location": "query",
  6668. // "type": "string"
  6669. // }
  6670. // },
  6671. // "path": "v1beta/apps/{appsId}/locations",
  6672. // "response": {
  6673. // "$ref": "ListLocationsResponse"
  6674. // },
  6675. // "scopes": [
  6676. // "https://www.googleapis.com/auth/appengine.admin",
  6677. // "https://www.googleapis.com/auth/cloud-platform",
  6678. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6679. // ]
  6680. // }
  6681. }
  6682. // Pages invokes f for each page of results.
  6683. // A non-nil error returned from f will halt the iteration.
  6684. // The provided context supersedes any context provided to the Context method.
  6685. func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  6686. c.ctx_ = ctx
  6687. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6688. for {
  6689. x, err := c.Do()
  6690. if err != nil {
  6691. return err
  6692. }
  6693. if err := f(x); err != nil {
  6694. return err
  6695. }
  6696. if x.NextPageToken == "" {
  6697. return nil
  6698. }
  6699. c.PageToken(x.NextPageToken)
  6700. }
  6701. }
  6702. // method id "appengine.apps.operations.get":
  6703. type AppsOperationsGetCall struct {
  6704. s *APIService
  6705. appsId string
  6706. operationsId string
  6707. urlParams_ gensupport.URLParams
  6708. ifNoneMatch_ string
  6709. ctx_ context.Context
  6710. header_ http.Header
  6711. }
  6712. // Get: Gets the latest state of a long-running operation. Clients can
  6713. // use this method to poll the operation result at intervals as
  6714. // recommended by the API service.
  6715. func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall {
  6716. c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6717. c.appsId = appsId
  6718. c.operationsId = operationsId
  6719. return c
  6720. }
  6721. // Fields allows partial responses to be retrieved. See
  6722. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6723. // for more information.
  6724. func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall {
  6725. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6726. return c
  6727. }
  6728. // IfNoneMatch sets the optional parameter which makes the operation
  6729. // fail if the object's ETag matches the given value. This is useful for
  6730. // getting updates only after the object has changed since the last
  6731. // request. Use googleapi.IsNotModified to check whether the response
  6732. // error from Do is the result of In-None-Match.
  6733. func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall {
  6734. c.ifNoneMatch_ = entityTag
  6735. return c
  6736. }
  6737. // Context sets the context to be used in this call's Do method. Any
  6738. // pending HTTP request will be aborted if the provided context is
  6739. // canceled.
  6740. func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall {
  6741. c.ctx_ = ctx
  6742. return c
  6743. }
  6744. // Header returns an http.Header that can be modified by the caller to
  6745. // add HTTP headers to the request.
  6746. func (c *AppsOperationsGetCall) Header() http.Header {
  6747. if c.header_ == nil {
  6748. c.header_ = make(http.Header)
  6749. }
  6750. return c.header_
  6751. }
  6752. func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  6753. reqHeaders := make(http.Header)
  6754. for k, v := range c.header_ {
  6755. reqHeaders[k] = v
  6756. }
  6757. reqHeaders.Set("User-Agent", c.s.userAgent())
  6758. if c.ifNoneMatch_ != "" {
  6759. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6760. }
  6761. var body io.Reader = nil
  6762. c.urlParams_.Set("alt", alt)
  6763. c.urlParams_.Set("prettyPrint", "false")
  6764. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/operations/{operationsId}")
  6765. urls += "?" + c.urlParams_.Encode()
  6766. req, err := http.NewRequest("GET", urls, body)
  6767. if err != nil {
  6768. return nil, err
  6769. }
  6770. req.Header = reqHeaders
  6771. googleapi.Expand(req.URL, map[string]string{
  6772. "appsId": c.appsId,
  6773. "operationsId": c.operationsId,
  6774. })
  6775. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6776. }
  6777. // Do executes the "appengine.apps.operations.get" call.
  6778. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6779. // status code is an error. Response headers are in either
  6780. // *Operation.ServerResponse.Header or (if a response was returned at
  6781. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6782. // to check whether the returned error was because
  6783. // http.StatusNotModified was returned.
  6784. func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6785. gensupport.SetOptions(c.urlParams_, opts...)
  6786. res, err := c.doRequest("json")
  6787. if res != nil && res.StatusCode == http.StatusNotModified {
  6788. if res.Body != nil {
  6789. res.Body.Close()
  6790. }
  6791. return nil, &googleapi.Error{
  6792. Code: res.StatusCode,
  6793. Header: res.Header,
  6794. }
  6795. }
  6796. if err != nil {
  6797. return nil, err
  6798. }
  6799. defer googleapi.CloseBody(res)
  6800. if err := googleapi.CheckResponse(res); err != nil {
  6801. return nil, err
  6802. }
  6803. ret := &Operation{
  6804. ServerResponse: googleapi.ServerResponse{
  6805. Header: res.Header,
  6806. HTTPStatusCode: res.StatusCode,
  6807. },
  6808. }
  6809. target := &ret
  6810. if err := gensupport.DecodeResponse(target, res); err != nil {
  6811. return nil, err
  6812. }
  6813. return ret, nil
  6814. // {
  6815. // "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.",
  6816. // "flatPath": "v1beta/apps/{appsId}/operations/{operationsId}",
  6817. // "httpMethod": "GET",
  6818. // "id": "appengine.apps.operations.get",
  6819. // "parameterOrder": [
  6820. // "appsId",
  6821. // "operationsId"
  6822. // ],
  6823. // "parameters": {
  6824. // "appsId": {
  6825. // "description": "Part of `name`. The name of the operation resource.",
  6826. // "location": "path",
  6827. // "required": true,
  6828. // "type": "string"
  6829. // },
  6830. // "operationsId": {
  6831. // "description": "Part of `name`. See documentation of `appsId`.",
  6832. // "location": "path",
  6833. // "required": true,
  6834. // "type": "string"
  6835. // }
  6836. // },
  6837. // "path": "v1beta/apps/{appsId}/operations/{operationsId}",
  6838. // "response": {
  6839. // "$ref": "Operation"
  6840. // },
  6841. // "scopes": [
  6842. // "https://www.googleapis.com/auth/appengine.admin",
  6843. // "https://www.googleapis.com/auth/cloud-platform",
  6844. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6845. // ]
  6846. // }
  6847. }
  6848. // method id "appengine.apps.operations.list":
  6849. type AppsOperationsListCall struct {
  6850. s *APIService
  6851. appsId string
  6852. urlParams_ gensupport.URLParams
  6853. ifNoneMatch_ string
  6854. ctx_ context.Context
  6855. header_ http.Header
  6856. }
  6857. // List: Lists operations that match the specified filter in the
  6858. // request. If the server doesn't support this method, it returns
  6859. // UNIMPLEMENTED.NOTE: the name binding allows API services to override
  6860. // the binding to use different resource name schemes, such as
  6861. // users/*/operations. To override the binding, API services can add a
  6862. // binding such as "/v1/{name=users/*}/operations" to their service
  6863. // configuration. For backwards compatibility, the default name includes
  6864. // the operations collection id, however overriding users must ensure
  6865. // the name binding is the parent resource, without the operations
  6866. // collection id.
  6867. func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall {
  6868. c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6869. c.appsId = appsId
  6870. return c
  6871. }
  6872. // Filter sets the optional parameter "filter": The standard list
  6873. // filter.
  6874. func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall {
  6875. c.urlParams_.Set("filter", filter)
  6876. return c
  6877. }
  6878. // PageSize sets the optional parameter "pageSize": The standard list
  6879. // page size.
  6880. func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall {
  6881. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6882. return c
  6883. }
  6884. // PageToken sets the optional parameter "pageToken": The standard list
  6885. // page token.
  6886. func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall {
  6887. c.urlParams_.Set("pageToken", pageToken)
  6888. return c
  6889. }
  6890. // Fields allows partial responses to be retrieved. See
  6891. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6892. // for more information.
  6893. func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall {
  6894. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6895. return c
  6896. }
  6897. // IfNoneMatch sets the optional parameter which makes the operation
  6898. // fail if the object's ETag matches the given value. This is useful for
  6899. // getting updates only after the object has changed since the last
  6900. // request. Use googleapi.IsNotModified to check whether the response
  6901. // error from Do is the result of In-None-Match.
  6902. func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall {
  6903. c.ifNoneMatch_ = entityTag
  6904. return c
  6905. }
  6906. // Context sets the context to be used in this call's Do method. Any
  6907. // pending HTTP request will be aborted if the provided context is
  6908. // canceled.
  6909. func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall {
  6910. c.ctx_ = ctx
  6911. return c
  6912. }
  6913. // Header returns an http.Header that can be modified by the caller to
  6914. // add HTTP headers to the request.
  6915. func (c *AppsOperationsListCall) Header() http.Header {
  6916. if c.header_ == nil {
  6917. c.header_ = make(http.Header)
  6918. }
  6919. return c.header_
  6920. }
  6921. func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  6922. reqHeaders := make(http.Header)
  6923. for k, v := range c.header_ {
  6924. reqHeaders[k] = v
  6925. }
  6926. reqHeaders.Set("User-Agent", c.s.userAgent())
  6927. if c.ifNoneMatch_ != "" {
  6928. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6929. }
  6930. var body io.Reader = nil
  6931. c.urlParams_.Set("alt", alt)
  6932. c.urlParams_.Set("prettyPrint", "false")
  6933. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/operations")
  6934. urls += "?" + c.urlParams_.Encode()
  6935. req, err := http.NewRequest("GET", urls, body)
  6936. if err != nil {
  6937. return nil, err
  6938. }
  6939. req.Header = reqHeaders
  6940. googleapi.Expand(req.URL, map[string]string{
  6941. "appsId": c.appsId,
  6942. })
  6943. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6944. }
  6945. // Do executes the "appengine.apps.operations.list" call.
  6946. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  6947. // non-2xx status code is an error. Response headers are in either
  6948. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  6949. // returned at all) in error.(*googleapi.Error).Header. Use
  6950. // googleapi.IsNotModified to check whether the returned error was
  6951. // because http.StatusNotModified was returned.
  6952. func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  6953. gensupport.SetOptions(c.urlParams_, opts...)
  6954. res, err := c.doRequest("json")
  6955. if res != nil && res.StatusCode == http.StatusNotModified {
  6956. if res.Body != nil {
  6957. res.Body.Close()
  6958. }
  6959. return nil, &googleapi.Error{
  6960. Code: res.StatusCode,
  6961. Header: res.Header,
  6962. }
  6963. }
  6964. if err != nil {
  6965. return nil, err
  6966. }
  6967. defer googleapi.CloseBody(res)
  6968. if err := googleapi.CheckResponse(res); err != nil {
  6969. return nil, err
  6970. }
  6971. ret := &ListOperationsResponse{
  6972. ServerResponse: googleapi.ServerResponse{
  6973. Header: res.Header,
  6974. HTTPStatusCode: res.StatusCode,
  6975. },
  6976. }
  6977. target := &ret
  6978. if err := gensupport.DecodeResponse(target, res); err != nil {
  6979. return nil, err
  6980. }
  6981. return ret, nil
  6982. // {
  6983. // "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.",
  6984. // "flatPath": "v1beta/apps/{appsId}/operations",
  6985. // "httpMethod": "GET",
  6986. // "id": "appengine.apps.operations.list",
  6987. // "parameterOrder": [
  6988. // "appsId"
  6989. // ],
  6990. // "parameters": {
  6991. // "appsId": {
  6992. // "description": "Part of `name`. The name of the operation's parent resource.",
  6993. // "location": "path",
  6994. // "required": true,
  6995. // "type": "string"
  6996. // },
  6997. // "filter": {
  6998. // "description": "The standard list filter.",
  6999. // "location": "query",
  7000. // "type": "string"
  7001. // },
  7002. // "pageSize": {
  7003. // "description": "The standard list page size.",
  7004. // "format": "int32",
  7005. // "location": "query",
  7006. // "type": "integer"
  7007. // },
  7008. // "pageToken": {
  7009. // "description": "The standard list page token.",
  7010. // "location": "query",
  7011. // "type": "string"
  7012. // }
  7013. // },
  7014. // "path": "v1beta/apps/{appsId}/operations",
  7015. // "response": {
  7016. // "$ref": "ListOperationsResponse"
  7017. // },
  7018. // "scopes": [
  7019. // "https://www.googleapis.com/auth/appengine.admin",
  7020. // "https://www.googleapis.com/auth/cloud-platform",
  7021. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7022. // ]
  7023. // }
  7024. }
  7025. // Pages invokes f for each page of results.
  7026. // A non-nil error returned from f will halt the iteration.
  7027. // The provided context supersedes any context provided to the Context method.
  7028. func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  7029. c.ctx_ = ctx
  7030. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7031. for {
  7032. x, err := c.Do()
  7033. if err != nil {
  7034. return err
  7035. }
  7036. if err := f(x); err != nil {
  7037. return err
  7038. }
  7039. if x.NextPageToken == "" {
  7040. return nil
  7041. }
  7042. c.PageToken(x.NextPageToken)
  7043. }
  7044. }
  7045. // method id "appengine.apps.services.delete":
  7046. type AppsServicesDeleteCall struct {
  7047. s *APIService
  7048. appsId string
  7049. servicesId string
  7050. urlParams_ gensupport.URLParams
  7051. ctx_ context.Context
  7052. header_ http.Header
  7053. }
  7054. // Delete: Deletes the specified service and all enclosed versions.
  7055. func (r *AppsServicesService) Delete(appsId string, servicesId string) *AppsServicesDeleteCall {
  7056. c := &AppsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7057. c.appsId = appsId
  7058. c.servicesId = servicesId
  7059. return c
  7060. }
  7061. // Fields allows partial responses to be retrieved. See
  7062. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7063. // for more information.
  7064. func (c *AppsServicesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesDeleteCall {
  7065. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7066. return c
  7067. }
  7068. // Context sets the context to be used in this call's Do method. Any
  7069. // pending HTTP request will be aborted if the provided context is
  7070. // canceled.
  7071. func (c *AppsServicesDeleteCall) Context(ctx context.Context) *AppsServicesDeleteCall {
  7072. c.ctx_ = ctx
  7073. return c
  7074. }
  7075. // Header returns an http.Header that can be modified by the caller to
  7076. // add HTTP headers to the request.
  7077. func (c *AppsServicesDeleteCall) Header() http.Header {
  7078. if c.header_ == nil {
  7079. c.header_ = make(http.Header)
  7080. }
  7081. return c.header_
  7082. }
  7083. func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7084. reqHeaders := make(http.Header)
  7085. for k, v := range c.header_ {
  7086. reqHeaders[k] = v
  7087. }
  7088. reqHeaders.Set("User-Agent", c.s.userAgent())
  7089. var body io.Reader = nil
  7090. c.urlParams_.Set("alt", alt)
  7091. c.urlParams_.Set("prettyPrint", "false")
  7092. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}")
  7093. urls += "?" + c.urlParams_.Encode()
  7094. req, err := http.NewRequest("DELETE", urls, body)
  7095. if err != nil {
  7096. return nil, err
  7097. }
  7098. req.Header = reqHeaders
  7099. googleapi.Expand(req.URL, map[string]string{
  7100. "appsId": c.appsId,
  7101. "servicesId": c.servicesId,
  7102. })
  7103. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7104. }
  7105. // Do executes the "appengine.apps.services.delete" call.
  7106. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7107. // status code is an error. Response headers are in either
  7108. // *Operation.ServerResponse.Header or (if a response was returned at
  7109. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7110. // to check whether the returned error was because
  7111. // http.StatusNotModified was returned.
  7112. func (c *AppsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7113. gensupport.SetOptions(c.urlParams_, opts...)
  7114. res, err := c.doRequest("json")
  7115. if res != nil && res.StatusCode == http.StatusNotModified {
  7116. if res.Body != nil {
  7117. res.Body.Close()
  7118. }
  7119. return nil, &googleapi.Error{
  7120. Code: res.StatusCode,
  7121. Header: res.Header,
  7122. }
  7123. }
  7124. if err != nil {
  7125. return nil, err
  7126. }
  7127. defer googleapi.CloseBody(res)
  7128. if err := googleapi.CheckResponse(res); err != nil {
  7129. return nil, err
  7130. }
  7131. ret := &Operation{
  7132. ServerResponse: googleapi.ServerResponse{
  7133. Header: res.Header,
  7134. HTTPStatusCode: res.StatusCode,
  7135. },
  7136. }
  7137. target := &ret
  7138. if err := gensupport.DecodeResponse(target, res); err != nil {
  7139. return nil, err
  7140. }
  7141. return ret, nil
  7142. // {
  7143. // "description": "Deletes the specified service and all enclosed versions.",
  7144. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}",
  7145. // "httpMethod": "DELETE",
  7146. // "id": "appengine.apps.services.delete",
  7147. // "parameterOrder": [
  7148. // "appsId",
  7149. // "servicesId"
  7150. // ],
  7151. // "parameters": {
  7152. // "appsId": {
  7153. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  7154. // "location": "path",
  7155. // "required": true,
  7156. // "type": "string"
  7157. // },
  7158. // "servicesId": {
  7159. // "description": "Part of `name`. See documentation of `appsId`.",
  7160. // "location": "path",
  7161. // "required": true,
  7162. // "type": "string"
  7163. // }
  7164. // },
  7165. // "path": "v1beta/apps/{appsId}/services/{servicesId}",
  7166. // "response": {
  7167. // "$ref": "Operation"
  7168. // },
  7169. // "scopes": [
  7170. // "https://www.googleapis.com/auth/cloud-platform"
  7171. // ]
  7172. // }
  7173. }
  7174. // method id "appengine.apps.services.get":
  7175. type AppsServicesGetCall struct {
  7176. s *APIService
  7177. appsId string
  7178. servicesId string
  7179. urlParams_ gensupport.URLParams
  7180. ifNoneMatch_ string
  7181. ctx_ context.Context
  7182. header_ http.Header
  7183. }
  7184. // Get: Gets the current configuration of the specified service.
  7185. func (r *AppsServicesService) Get(appsId string, servicesId string) *AppsServicesGetCall {
  7186. c := &AppsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7187. c.appsId = appsId
  7188. c.servicesId = servicesId
  7189. return c
  7190. }
  7191. // Fields allows partial responses to be retrieved. See
  7192. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7193. // for more information.
  7194. func (c *AppsServicesGetCall) Fields(s ...googleapi.Field) *AppsServicesGetCall {
  7195. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7196. return c
  7197. }
  7198. // IfNoneMatch sets the optional parameter which makes the operation
  7199. // fail if the object's ETag matches the given value. This is useful for
  7200. // getting updates only after the object has changed since the last
  7201. // request. Use googleapi.IsNotModified to check whether the response
  7202. // error from Do is the result of In-None-Match.
  7203. func (c *AppsServicesGetCall) IfNoneMatch(entityTag string) *AppsServicesGetCall {
  7204. c.ifNoneMatch_ = entityTag
  7205. return c
  7206. }
  7207. // Context sets the context to be used in this call's Do method. Any
  7208. // pending HTTP request will be aborted if the provided context is
  7209. // canceled.
  7210. func (c *AppsServicesGetCall) Context(ctx context.Context) *AppsServicesGetCall {
  7211. c.ctx_ = ctx
  7212. return c
  7213. }
  7214. // Header returns an http.Header that can be modified by the caller to
  7215. // add HTTP headers to the request.
  7216. func (c *AppsServicesGetCall) Header() http.Header {
  7217. if c.header_ == nil {
  7218. c.header_ = make(http.Header)
  7219. }
  7220. return c.header_
  7221. }
  7222. func (c *AppsServicesGetCall) doRequest(alt string) (*http.Response, error) {
  7223. reqHeaders := make(http.Header)
  7224. for k, v := range c.header_ {
  7225. reqHeaders[k] = v
  7226. }
  7227. reqHeaders.Set("User-Agent", c.s.userAgent())
  7228. if c.ifNoneMatch_ != "" {
  7229. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7230. }
  7231. var body io.Reader = nil
  7232. c.urlParams_.Set("alt", alt)
  7233. c.urlParams_.Set("prettyPrint", "false")
  7234. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}")
  7235. urls += "?" + c.urlParams_.Encode()
  7236. req, err := http.NewRequest("GET", urls, body)
  7237. if err != nil {
  7238. return nil, err
  7239. }
  7240. req.Header = reqHeaders
  7241. googleapi.Expand(req.URL, map[string]string{
  7242. "appsId": c.appsId,
  7243. "servicesId": c.servicesId,
  7244. })
  7245. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7246. }
  7247. // Do executes the "appengine.apps.services.get" call.
  7248. // Exactly one of *Service or error will be non-nil. Any non-2xx status
  7249. // code is an error. Response headers are in either
  7250. // *Service.ServerResponse.Header or (if a response was returned at all)
  7251. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7252. // check whether the returned error was because http.StatusNotModified
  7253. // was returned.
  7254. func (c *AppsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
  7255. gensupport.SetOptions(c.urlParams_, opts...)
  7256. res, err := c.doRequest("json")
  7257. if res != nil && res.StatusCode == http.StatusNotModified {
  7258. if res.Body != nil {
  7259. res.Body.Close()
  7260. }
  7261. return nil, &googleapi.Error{
  7262. Code: res.StatusCode,
  7263. Header: res.Header,
  7264. }
  7265. }
  7266. if err != nil {
  7267. return nil, err
  7268. }
  7269. defer googleapi.CloseBody(res)
  7270. if err := googleapi.CheckResponse(res); err != nil {
  7271. return nil, err
  7272. }
  7273. ret := &Service{
  7274. ServerResponse: googleapi.ServerResponse{
  7275. Header: res.Header,
  7276. HTTPStatusCode: res.StatusCode,
  7277. },
  7278. }
  7279. target := &ret
  7280. if err := gensupport.DecodeResponse(target, res); err != nil {
  7281. return nil, err
  7282. }
  7283. return ret, nil
  7284. // {
  7285. // "description": "Gets the current configuration of the specified service.",
  7286. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}",
  7287. // "httpMethod": "GET",
  7288. // "id": "appengine.apps.services.get",
  7289. // "parameterOrder": [
  7290. // "appsId",
  7291. // "servicesId"
  7292. // ],
  7293. // "parameters": {
  7294. // "appsId": {
  7295. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  7296. // "location": "path",
  7297. // "required": true,
  7298. // "type": "string"
  7299. // },
  7300. // "servicesId": {
  7301. // "description": "Part of `name`. See documentation of `appsId`.",
  7302. // "location": "path",
  7303. // "required": true,
  7304. // "type": "string"
  7305. // }
  7306. // },
  7307. // "path": "v1beta/apps/{appsId}/services/{servicesId}",
  7308. // "response": {
  7309. // "$ref": "Service"
  7310. // },
  7311. // "scopes": [
  7312. // "https://www.googleapis.com/auth/appengine.admin",
  7313. // "https://www.googleapis.com/auth/cloud-platform",
  7314. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7315. // ]
  7316. // }
  7317. }
  7318. // method id "appengine.apps.services.list":
  7319. type AppsServicesListCall struct {
  7320. s *APIService
  7321. appsId string
  7322. urlParams_ gensupport.URLParams
  7323. ifNoneMatch_ string
  7324. ctx_ context.Context
  7325. header_ http.Header
  7326. }
  7327. // List: Lists all the services in the application.
  7328. func (r *AppsServicesService) List(appsId string) *AppsServicesListCall {
  7329. c := &AppsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7330. c.appsId = appsId
  7331. return c
  7332. }
  7333. // PageSize sets the optional parameter "pageSize": Maximum results to
  7334. // return per page.
  7335. func (c *AppsServicesListCall) PageSize(pageSize int64) *AppsServicesListCall {
  7336. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7337. return c
  7338. }
  7339. // PageToken sets the optional parameter "pageToken": Continuation token
  7340. // for fetching the next page of results.
  7341. func (c *AppsServicesListCall) PageToken(pageToken string) *AppsServicesListCall {
  7342. c.urlParams_.Set("pageToken", pageToken)
  7343. return c
  7344. }
  7345. // Fields allows partial responses to be retrieved. See
  7346. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7347. // for more information.
  7348. func (c *AppsServicesListCall) Fields(s ...googleapi.Field) *AppsServicesListCall {
  7349. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7350. return c
  7351. }
  7352. // IfNoneMatch sets the optional parameter which makes the operation
  7353. // fail if the object's ETag matches the given value. This is useful for
  7354. // getting updates only after the object has changed since the last
  7355. // request. Use googleapi.IsNotModified to check whether the response
  7356. // error from Do is the result of In-None-Match.
  7357. func (c *AppsServicesListCall) IfNoneMatch(entityTag string) *AppsServicesListCall {
  7358. c.ifNoneMatch_ = entityTag
  7359. return c
  7360. }
  7361. // Context sets the context to be used in this call's Do method. Any
  7362. // pending HTTP request will be aborted if the provided context is
  7363. // canceled.
  7364. func (c *AppsServicesListCall) Context(ctx context.Context) *AppsServicesListCall {
  7365. c.ctx_ = ctx
  7366. return c
  7367. }
  7368. // Header returns an http.Header that can be modified by the caller to
  7369. // add HTTP headers to the request.
  7370. func (c *AppsServicesListCall) Header() http.Header {
  7371. if c.header_ == nil {
  7372. c.header_ = make(http.Header)
  7373. }
  7374. return c.header_
  7375. }
  7376. func (c *AppsServicesListCall) doRequest(alt string) (*http.Response, error) {
  7377. reqHeaders := make(http.Header)
  7378. for k, v := range c.header_ {
  7379. reqHeaders[k] = v
  7380. }
  7381. reqHeaders.Set("User-Agent", c.s.userAgent())
  7382. if c.ifNoneMatch_ != "" {
  7383. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7384. }
  7385. var body io.Reader = nil
  7386. c.urlParams_.Set("alt", alt)
  7387. c.urlParams_.Set("prettyPrint", "false")
  7388. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services")
  7389. urls += "?" + c.urlParams_.Encode()
  7390. req, err := http.NewRequest("GET", urls, body)
  7391. if err != nil {
  7392. return nil, err
  7393. }
  7394. req.Header = reqHeaders
  7395. googleapi.Expand(req.URL, map[string]string{
  7396. "appsId": c.appsId,
  7397. })
  7398. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7399. }
  7400. // Do executes the "appengine.apps.services.list" call.
  7401. // Exactly one of *ListServicesResponse or error will be non-nil. Any
  7402. // non-2xx status code is an error. Response headers are in either
  7403. // *ListServicesResponse.ServerResponse.Header or (if a response was
  7404. // returned at all) in error.(*googleapi.Error).Header. Use
  7405. // googleapi.IsNotModified to check whether the returned error was
  7406. // because http.StatusNotModified was returned.
  7407. func (c *AppsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
  7408. gensupport.SetOptions(c.urlParams_, opts...)
  7409. res, err := c.doRequest("json")
  7410. if res != nil && res.StatusCode == http.StatusNotModified {
  7411. if res.Body != nil {
  7412. res.Body.Close()
  7413. }
  7414. return nil, &googleapi.Error{
  7415. Code: res.StatusCode,
  7416. Header: res.Header,
  7417. }
  7418. }
  7419. if err != nil {
  7420. return nil, err
  7421. }
  7422. defer googleapi.CloseBody(res)
  7423. if err := googleapi.CheckResponse(res); err != nil {
  7424. return nil, err
  7425. }
  7426. ret := &ListServicesResponse{
  7427. ServerResponse: googleapi.ServerResponse{
  7428. Header: res.Header,
  7429. HTTPStatusCode: res.StatusCode,
  7430. },
  7431. }
  7432. target := &ret
  7433. if err := gensupport.DecodeResponse(target, res); err != nil {
  7434. return nil, err
  7435. }
  7436. return ret, nil
  7437. // {
  7438. // "description": "Lists all the services in the application.",
  7439. // "flatPath": "v1beta/apps/{appsId}/services",
  7440. // "httpMethod": "GET",
  7441. // "id": "appengine.apps.services.list",
  7442. // "parameterOrder": [
  7443. // "appsId"
  7444. // ],
  7445. // "parameters": {
  7446. // "appsId": {
  7447. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  7448. // "location": "path",
  7449. // "required": true,
  7450. // "type": "string"
  7451. // },
  7452. // "pageSize": {
  7453. // "description": "Maximum results to return per page.",
  7454. // "format": "int32",
  7455. // "location": "query",
  7456. // "type": "integer"
  7457. // },
  7458. // "pageToken": {
  7459. // "description": "Continuation token for fetching the next page of results.",
  7460. // "location": "query",
  7461. // "type": "string"
  7462. // }
  7463. // },
  7464. // "path": "v1beta/apps/{appsId}/services",
  7465. // "response": {
  7466. // "$ref": "ListServicesResponse"
  7467. // },
  7468. // "scopes": [
  7469. // "https://www.googleapis.com/auth/appengine.admin",
  7470. // "https://www.googleapis.com/auth/cloud-platform",
  7471. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7472. // ]
  7473. // }
  7474. }
  7475. // Pages invokes f for each page of results.
  7476. // A non-nil error returned from f will halt the iteration.
  7477. // The provided context supersedes any context provided to the Context method.
  7478. func (c *AppsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
  7479. c.ctx_ = ctx
  7480. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7481. for {
  7482. x, err := c.Do()
  7483. if err != nil {
  7484. return err
  7485. }
  7486. if err := f(x); err != nil {
  7487. return err
  7488. }
  7489. if x.NextPageToken == "" {
  7490. return nil
  7491. }
  7492. c.PageToken(x.NextPageToken)
  7493. }
  7494. }
  7495. // method id "appengine.apps.services.patch":
  7496. type AppsServicesPatchCall struct {
  7497. s *APIService
  7498. appsId string
  7499. servicesId string
  7500. service *Service
  7501. urlParams_ gensupport.URLParams
  7502. ctx_ context.Context
  7503. header_ http.Header
  7504. }
  7505. // Patch: Updates the configuration of the specified service.
  7506. func (r *AppsServicesService) Patch(appsId string, servicesId string, service *Service) *AppsServicesPatchCall {
  7507. c := &AppsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7508. c.appsId = appsId
  7509. c.servicesId = servicesId
  7510. c.service = service
  7511. return c
  7512. }
  7513. // MigrateTraffic sets the optional parameter "migrateTraffic": Set to
  7514. // true to gradually shift traffic to one or more versions that you
  7515. // specify. By default, traffic is shifted immediately. For gradual
  7516. // traffic migration, the target versions must be located within
  7517. // instances that are configured for both warmup requests
  7518. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  7519. // ta/apps.services.versions#InboundServiceType) and automatic scaling
  7520. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  7521. // ta/apps.services.versions#AutomaticScaling). You must specify the
  7522. // shardBy
  7523. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  7524. // ta/apps.services#ShardBy) field in the Service resource. Gradual
  7525. // traffic migration is not supported in the App Engine flexible
  7526. // environment. For examples, see Migrating and Splitting Traffic
  7527. // (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting
  7528. // -traffic).
  7529. func (c *AppsServicesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsServicesPatchCall {
  7530. c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic))
  7531. return c
  7532. }
  7533. // UpdateMask sets the optional parameter "updateMask": Standard field
  7534. // mask for the set of fields to be updated.
  7535. func (c *AppsServicesPatchCall) UpdateMask(updateMask string) *AppsServicesPatchCall {
  7536. c.urlParams_.Set("updateMask", updateMask)
  7537. return c
  7538. }
  7539. // Fields allows partial responses to be retrieved. See
  7540. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7541. // for more information.
  7542. func (c *AppsServicesPatchCall) Fields(s ...googleapi.Field) *AppsServicesPatchCall {
  7543. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7544. return c
  7545. }
  7546. // Context sets the context to be used in this call's Do method. Any
  7547. // pending HTTP request will be aborted if the provided context is
  7548. // canceled.
  7549. func (c *AppsServicesPatchCall) Context(ctx context.Context) *AppsServicesPatchCall {
  7550. c.ctx_ = ctx
  7551. return c
  7552. }
  7553. // Header returns an http.Header that can be modified by the caller to
  7554. // add HTTP headers to the request.
  7555. func (c *AppsServicesPatchCall) Header() http.Header {
  7556. if c.header_ == nil {
  7557. c.header_ = make(http.Header)
  7558. }
  7559. return c.header_
  7560. }
  7561. func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
  7562. reqHeaders := make(http.Header)
  7563. for k, v := range c.header_ {
  7564. reqHeaders[k] = v
  7565. }
  7566. reqHeaders.Set("User-Agent", c.s.userAgent())
  7567. var body io.Reader = nil
  7568. body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
  7569. if err != nil {
  7570. return nil, err
  7571. }
  7572. reqHeaders.Set("Content-Type", "application/json")
  7573. c.urlParams_.Set("alt", alt)
  7574. c.urlParams_.Set("prettyPrint", "false")
  7575. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}")
  7576. urls += "?" + c.urlParams_.Encode()
  7577. req, err := http.NewRequest("PATCH", urls, body)
  7578. if err != nil {
  7579. return nil, err
  7580. }
  7581. req.Header = reqHeaders
  7582. googleapi.Expand(req.URL, map[string]string{
  7583. "appsId": c.appsId,
  7584. "servicesId": c.servicesId,
  7585. })
  7586. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7587. }
  7588. // Do executes the "appengine.apps.services.patch" call.
  7589. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7590. // status code is an error. Response headers are in either
  7591. // *Operation.ServerResponse.Header or (if a response was returned at
  7592. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7593. // to check whether the returned error was because
  7594. // http.StatusNotModified was returned.
  7595. func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7596. gensupport.SetOptions(c.urlParams_, opts...)
  7597. res, err := c.doRequest("json")
  7598. if res != nil && res.StatusCode == http.StatusNotModified {
  7599. if res.Body != nil {
  7600. res.Body.Close()
  7601. }
  7602. return nil, &googleapi.Error{
  7603. Code: res.StatusCode,
  7604. Header: res.Header,
  7605. }
  7606. }
  7607. if err != nil {
  7608. return nil, err
  7609. }
  7610. defer googleapi.CloseBody(res)
  7611. if err := googleapi.CheckResponse(res); err != nil {
  7612. return nil, err
  7613. }
  7614. ret := &Operation{
  7615. ServerResponse: googleapi.ServerResponse{
  7616. Header: res.Header,
  7617. HTTPStatusCode: res.StatusCode,
  7618. },
  7619. }
  7620. target := &ret
  7621. if err := gensupport.DecodeResponse(target, res); err != nil {
  7622. return nil, err
  7623. }
  7624. return ret, nil
  7625. // {
  7626. // "description": "Updates the configuration of the specified service.",
  7627. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}",
  7628. // "httpMethod": "PATCH",
  7629. // "id": "appengine.apps.services.patch",
  7630. // "parameterOrder": [
  7631. // "appsId",
  7632. // "servicesId"
  7633. // ],
  7634. // "parameters": {
  7635. // "appsId": {
  7636. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.",
  7637. // "location": "path",
  7638. // "required": true,
  7639. // "type": "string"
  7640. // },
  7641. // "migrateTraffic": {
  7642. // "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/v1beta/apps.services.versions#InboundServiceType) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#AutomaticScaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/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).",
  7643. // "location": "query",
  7644. // "type": "boolean"
  7645. // },
  7646. // "servicesId": {
  7647. // "description": "Part of `name`. See documentation of `appsId`.",
  7648. // "location": "path",
  7649. // "required": true,
  7650. // "type": "string"
  7651. // },
  7652. // "updateMask": {
  7653. // "description": "Standard field mask for the set of fields to be updated.",
  7654. // "format": "google-fieldmask",
  7655. // "location": "query",
  7656. // "type": "string"
  7657. // }
  7658. // },
  7659. // "path": "v1beta/apps/{appsId}/services/{servicesId}",
  7660. // "request": {
  7661. // "$ref": "Service"
  7662. // },
  7663. // "response": {
  7664. // "$ref": "Operation"
  7665. // },
  7666. // "scopes": [
  7667. // "https://www.googleapis.com/auth/cloud-platform"
  7668. // ]
  7669. // }
  7670. }
  7671. // method id "appengine.apps.services.versions.create":
  7672. type AppsServicesVersionsCreateCall struct {
  7673. s *APIService
  7674. appsId string
  7675. servicesId string
  7676. version *Version
  7677. urlParams_ gensupport.URLParams
  7678. ctx_ context.Context
  7679. header_ http.Header
  7680. }
  7681. // Create: Deploys code and resource files to a new version.
  7682. func (r *AppsServicesVersionsService) Create(appsId string, servicesId string, version *Version) *AppsServicesVersionsCreateCall {
  7683. c := &AppsServicesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7684. c.appsId = appsId
  7685. c.servicesId = servicesId
  7686. c.version = version
  7687. return c
  7688. }
  7689. // Fields allows partial responses to be retrieved. See
  7690. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7691. // for more information.
  7692. func (c *AppsServicesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsServicesVersionsCreateCall {
  7693. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7694. return c
  7695. }
  7696. // Context sets the context to be used in this call's Do method. Any
  7697. // pending HTTP request will be aborted if the provided context is
  7698. // canceled.
  7699. func (c *AppsServicesVersionsCreateCall) Context(ctx context.Context) *AppsServicesVersionsCreateCall {
  7700. c.ctx_ = ctx
  7701. return c
  7702. }
  7703. // Header returns an http.Header that can be modified by the caller to
  7704. // add HTTP headers to the request.
  7705. func (c *AppsServicesVersionsCreateCall) Header() http.Header {
  7706. if c.header_ == nil {
  7707. c.header_ = make(http.Header)
  7708. }
  7709. return c.header_
  7710. }
  7711. func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  7712. reqHeaders := make(http.Header)
  7713. for k, v := range c.header_ {
  7714. reqHeaders[k] = v
  7715. }
  7716. reqHeaders.Set("User-Agent", c.s.userAgent())
  7717. var body io.Reader = nil
  7718. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  7719. if err != nil {
  7720. return nil, err
  7721. }
  7722. reqHeaders.Set("Content-Type", "application/json")
  7723. c.urlParams_.Set("alt", alt)
  7724. c.urlParams_.Set("prettyPrint", "false")
  7725. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions")
  7726. urls += "?" + c.urlParams_.Encode()
  7727. req, err := http.NewRequest("POST", urls, body)
  7728. if err != nil {
  7729. return nil, err
  7730. }
  7731. req.Header = reqHeaders
  7732. googleapi.Expand(req.URL, map[string]string{
  7733. "appsId": c.appsId,
  7734. "servicesId": c.servicesId,
  7735. })
  7736. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7737. }
  7738. // Do executes the "appengine.apps.services.versions.create" call.
  7739. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7740. // status code is an error. Response headers are in either
  7741. // *Operation.ServerResponse.Header or (if a response was returned at
  7742. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7743. // to check whether the returned error was because
  7744. // http.StatusNotModified was returned.
  7745. func (c *AppsServicesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7746. gensupport.SetOptions(c.urlParams_, opts...)
  7747. res, err := c.doRequest("json")
  7748. if res != nil && res.StatusCode == http.StatusNotModified {
  7749. if res.Body != nil {
  7750. res.Body.Close()
  7751. }
  7752. return nil, &googleapi.Error{
  7753. Code: res.StatusCode,
  7754. Header: res.Header,
  7755. }
  7756. }
  7757. if err != nil {
  7758. return nil, err
  7759. }
  7760. defer googleapi.CloseBody(res)
  7761. if err := googleapi.CheckResponse(res); err != nil {
  7762. return nil, err
  7763. }
  7764. ret := &Operation{
  7765. ServerResponse: googleapi.ServerResponse{
  7766. Header: res.Header,
  7767. HTTPStatusCode: res.StatusCode,
  7768. },
  7769. }
  7770. target := &ret
  7771. if err := gensupport.DecodeResponse(target, res); err != nil {
  7772. return nil, err
  7773. }
  7774. return ret, nil
  7775. // {
  7776. // "description": "Deploys code and resource files to a new version.",
  7777. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions",
  7778. // "httpMethod": "POST",
  7779. // "id": "appengine.apps.services.versions.create",
  7780. // "parameterOrder": [
  7781. // "appsId",
  7782. // "servicesId"
  7783. // ],
  7784. // "parameters": {
  7785. // "appsId": {
  7786. // "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.",
  7787. // "location": "path",
  7788. // "required": true,
  7789. // "type": "string"
  7790. // },
  7791. // "servicesId": {
  7792. // "description": "Part of `parent`. See documentation of `appsId`.",
  7793. // "location": "path",
  7794. // "required": true,
  7795. // "type": "string"
  7796. // }
  7797. // },
  7798. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions",
  7799. // "request": {
  7800. // "$ref": "Version"
  7801. // },
  7802. // "response": {
  7803. // "$ref": "Operation"
  7804. // },
  7805. // "scopes": [
  7806. // "https://www.googleapis.com/auth/cloud-platform"
  7807. // ]
  7808. // }
  7809. }
  7810. // method id "appengine.apps.services.versions.delete":
  7811. type AppsServicesVersionsDeleteCall struct {
  7812. s *APIService
  7813. appsId string
  7814. servicesId string
  7815. versionsId string
  7816. urlParams_ gensupport.URLParams
  7817. ctx_ context.Context
  7818. header_ http.Header
  7819. }
  7820. // Delete: Deletes an existing Version resource.
  7821. func (r *AppsServicesVersionsService) Delete(appsId string, servicesId string, versionsId string) *AppsServicesVersionsDeleteCall {
  7822. c := &AppsServicesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7823. c.appsId = appsId
  7824. c.servicesId = servicesId
  7825. c.versionsId = versionsId
  7826. return c
  7827. }
  7828. // Fields allows partial responses to be retrieved. See
  7829. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7830. // for more information.
  7831. func (c *AppsServicesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsDeleteCall {
  7832. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7833. return c
  7834. }
  7835. // Context sets the context to be used in this call's Do method. Any
  7836. // pending HTTP request will be aborted if the provided context is
  7837. // canceled.
  7838. func (c *AppsServicesVersionsDeleteCall) Context(ctx context.Context) *AppsServicesVersionsDeleteCall {
  7839. c.ctx_ = ctx
  7840. return c
  7841. }
  7842. // Header returns an http.Header that can be modified by the caller to
  7843. // add HTTP headers to the request.
  7844. func (c *AppsServicesVersionsDeleteCall) Header() http.Header {
  7845. if c.header_ == nil {
  7846. c.header_ = make(http.Header)
  7847. }
  7848. return c.header_
  7849. }
  7850. func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7851. reqHeaders := make(http.Header)
  7852. for k, v := range c.header_ {
  7853. reqHeaders[k] = v
  7854. }
  7855. reqHeaders.Set("User-Agent", c.s.userAgent())
  7856. var body io.Reader = nil
  7857. c.urlParams_.Set("alt", alt)
  7858. c.urlParams_.Set("prettyPrint", "false")
  7859. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  7860. urls += "?" + c.urlParams_.Encode()
  7861. req, err := http.NewRequest("DELETE", urls, body)
  7862. if err != nil {
  7863. return nil, err
  7864. }
  7865. req.Header = reqHeaders
  7866. googleapi.Expand(req.URL, map[string]string{
  7867. "appsId": c.appsId,
  7868. "servicesId": c.servicesId,
  7869. "versionsId": c.versionsId,
  7870. })
  7871. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7872. }
  7873. // Do executes the "appengine.apps.services.versions.delete" call.
  7874. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7875. // status code is an error. Response headers are in either
  7876. // *Operation.ServerResponse.Header or (if a response was returned at
  7877. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7878. // to check whether the returned error was because
  7879. // http.StatusNotModified was returned.
  7880. func (c *AppsServicesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7881. gensupport.SetOptions(c.urlParams_, opts...)
  7882. res, err := c.doRequest("json")
  7883. if res != nil && res.StatusCode == http.StatusNotModified {
  7884. if res.Body != nil {
  7885. res.Body.Close()
  7886. }
  7887. return nil, &googleapi.Error{
  7888. Code: res.StatusCode,
  7889. Header: res.Header,
  7890. }
  7891. }
  7892. if err != nil {
  7893. return nil, err
  7894. }
  7895. defer googleapi.CloseBody(res)
  7896. if err := googleapi.CheckResponse(res); err != nil {
  7897. return nil, err
  7898. }
  7899. ret := &Operation{
  7900. ServerResponse: googleapi.ServerResponse{
  7901. Header: res.Header,
  7902. HTTPStatusCode: res.StatusCode,
  7903. },
  7904. }
  7905. target := &ret
  7906. if err := gensupport.DecodeResponse(target, res); err != nil {
  7907. return nil, err
  7908. }
  7909. return ret, nil
  7910. // {
  7911. // "description": "Deletes an existing Version resource.",
  7912. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7913. // "httpMethod": "DELETE",
  7914. // "id": "appengine.apps.services.versions.delete",
  7915. // "parameterOrder": [
  7916. // "appsId",
  7917. // "servicesId",
  7918. // "versionsId"
  7919. // ],
  7920. // "parameters": {
  7921. // "appsId": {
  7922. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  7923. // "location": "path",
  7924. // "required": true,
  7925. // "type": "string"
  7926. // },
  7927. // "servicesId": {
  7928. // "description": "Part of `name`. See documentation of `appsId`.",
  7929. // "location": "path",
  7930. // "required": true,
  7931. // "type": "string"
  7932. // },
  7933. // "versionsId": {
  7934. // "description": "Part of `name`. See documentation of `appsId`.",
  7935. // "location": "path",
  7936. // "required": true,
  7937. // "type": "string"
  7938. // }
  7939. // },
  7940. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7941. // "response": {
  7942. // "$ref": "Operation"
  7943. // },
  7944. // "scopes": [
  7945. // "https://www.googleapis.com/auth/cloud-platform"
  7946. // ]
  7947. // }
  7948. }
  7949. // method id "appengine.apps.services.versions.get":
  7950. type AppsServicesVersionsGetCall struct {
  7951. s *APIService
  7952. appsId string
  7953. servicesId string
  7954. versionsId string
  7955. urlParams_ gensupport.URLParams
  7956. ifNoneMatch_ string
  7957. ctx_ context.Context
  7958. header_ http.Header
  7959. }
  7960. // Get: Gets the specified Version resource. By default, only a
  7961. // BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get
  7962. // the full resource.
  7963. func (r *AppsServicesVersionsService) Get(appsId string, servicesId string, versionsId string) *AppsServicesVersionsGetCall {
  7964. c := &AppsServicesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7965. c.appsId = appsId
  7966. c.servicesId = servicesId
  7967. c.versionsId = versionsId
  7968. return c
  7969. }
  7970. // View sets the optional parameter "view": Controls the set of fields
  7971. // returned in the Get response.
  7972. //
  7973. // Possible values:
  7974. // "BASIC"
  7975. // "FULL"
  7976. func (c *AppsServicesVersionsGetCall) View(view string) *AppsServicesVersionsGetCall {
  7977. c.urlParams_.Set("view", view)
  7978. return c
  7979. }
  7980. // Fields allows partial responses to be retrieved. See
  7981. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7982. // for more information.
  7983. func (c *AppsServicesVersionsGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsGetCall {
  7984. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7985. return c
  7986. }
  7987. // IfNoneMatch sets the optional parameter which makes the operation
  7988. // fail if the object's ETag matches the given value. This is useful for
  7989. // getting updates only after the object has changed since the last
  7990. // request. Use googleapi.IsNotModified to check whether the response
  7991. // error from Do is the result of In-None-Match.
  7992. func (c *AppsServicesVersionsGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsGetCall {
  7993. c.ifNoneMatch_ = entityTag
  7994. return c
  7995. }
  7996. // Context sets the context to be used in this call's Do method. Any
  7997. // pending HTTP request will be aborted if the provided context is
  7998. // canceled.
  7999. func (c *AppsServicesVersionsGetCall) Context(ctx context.Context) *AppsServicesVersionsGetCall {
  8000. c.ctx_ = ctx
  8001. return c
  8002. }
  8003. // Header returns an http.Header that can be modified by the caller to
  8004. // add HTTP headers to the request.
  8005. func (c *AppsServicesVersionsGetCall) Header() http.Header {
  8006. if c.header_ == nil {
  8007. c.header_ = make(http.Header)
  8008. }
  8009. return c.header_
  8010. }
  8011. func (c *AppsServicesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  8012. reqHeaders := make(http.Header)
  8013. for k, v := range c.header_ {
  8014. reqHeaders[k] = v
  8015. }
  8016. reqHeaders.Set("User-Agent", c.s.userAgent())
  8017. if c.ifNoneMatch_ != "" {
  8018. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8019. }
  8020. var body io.Reader = nil
  8021. c.urlParams_.Set("alt", alt)
  8022. c.urlParams_.Set("prettyPrint", "false")
  8023. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  8024. urls += "?" + c.urlParams_.Encode()
  8025. req, err := http.NewRequest("GET", urls, body)
  8026. if err != nil {
  8027. return nil, err
  8028. }
  8029. req.Header = reqHeaders
  8030. googleapi.Expand(req.URL, map[string]string{
  8031. "appsId": c.appsId,
  8032. "servicesId": c.servicesId,
  8033. "versionsId": c.versionsId,
  8034. })
  8035. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8036. }
  8037. // Do executes the "appengine.apps.services.versions.get" call.
  8038. // Exactly one of *Version or error will be non-nil. Any non-2xx status
  8039. // code is an error. Response headers are in either
  8040. // *Version.ServerResponse.Header or (if a response was returned at all)
  8041. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8042. // check whether the returned error was because http.StatusNotModified
  8043. // was returned.
  8044. func (c *AppsServicesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  8045. gensupport.SetOptions(c.urlParams_, opts...)
  8046. res, err := c.doRequest("json")
  8047. if res != nil && res.StatusCode == http.StatusNotModified {
  8048. if res.Body != nil {
  8049. res.Body.Close()
  8050. }
  8051. return nil, &googleapi.Error{
  8052. Code: res.StatusCode,
  8053. Header: res.Header,
  8054. }
  8055. }
  8056. if err != nil {
  8057. return nil, err
  8058. }
  8059. defer googleapi.CloseBody(res)
  8060. if err := googleapi.CheckResponse(res); err != nil {
  8061. return nil, err
  8062. }
  8063. ret := &Version{
  8064. ServerResponse: googleapi.ServerResponse{
  8065. Header: res.Header,
  8066. HTTPStatusCode: res.StatusCode,
  8067. },
  8068. }
  8069. target := &ret
  8070. if err := gensupport.DecodeResponse(target, res); err != nil {
  8071. return nil, err
  8072. }
  8073. return ret, nil
  8074. // {
  8075. // "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.",
  8076. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  8077. // "httpMethod": "GET",
  8078. // "id": "appengine.apps.services.versions.get",
  8079. // "parameterOrder": [
  8080. // "appsId",
  8081. // "servicesId",
  8082. // "versionsId"
  8083. // ],
  8084. // "parameters": {
  8085. // "appsId": {
  8086. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  8087. // "location": "path",
  8088. // "required": true,
  8089. // "type": "string"
  8090. // },
  8091. // "servicesId": {
  8092. // "description": "Part of `name`. See documentation of `appsId`.",
  8093. // "location": "path",
  8094. // "required": true,
  8095. // "type": "string"
  8096. // },
  8097. // "versionsId": {
  8098. // "description": "Part of `name`. See documentation of `appsId`.",
  8099. // "location": "path",
  8100. // "required": true,
  8101. // "type": "string"
  8102. // },
  8103. // "view": {
  8104. // "description": "Controls the set of fields returned in the Get response.",
  8105. // "enum": [
  8106. // "BASIC",
  8107. // "FULL"
  8108. // ],
  8109. // "location": "query",
  8110. // "type": "string"
  8111. // }
  8112. // },
  8113. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  8114. // "response": {
  8115. // "$ref": "Version"
  8116. // },
  8117. // "scopes": [
  8118. // "https://www.googleapis.com/auth/appengine.admin",
  8119. // "https://www.googleapis.com/auth/cloud-platform",
  8120. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  8121. // ]
  8122. // }
  8123. }
  8124. // method id "appengine.apps.services.versions.list":
  8125. type AppsServicesVersionsListCall struct {
  8126. s *APIService
  8127. appsId string
  8128. servicesId string
  8129. urlParams_ gensupport.URLParams
  8130. ifNoneMatch_ string
  8131. ctx_ context.Context
  8132. header_ http.Header
  8133. }
  8134. // List: Lists the versions of a service.
  8135. func (r *AppsServicesVersionsService) List(appsId string, servicesId string) *AppsServicesVersionsListCall {
  8136. c := &AppsServicesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8137. c.appsId = appsId
  8138. c.servicesId = servicesId
  8139. return c
  8140. }
  8141. // PageSize sets the optional parameter "pageSize": Maximum results to
  8142. // return per page.
  8143. func (c *AppsServicesVersionsListCall) PageSize(pageSize int64) *AppsServicesVersionsListCall {
  8144. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8145. return c
  8146. }
  8147. // PageToken sets the optional parameter "pageToken": Continuation token
  8148. // for fetching the next page of results.
  8149. func (c *AppsServicesVersionsListCall) PageToken(pageToken string) *AppsServicesVersionsListCall {
  8150. c.urlParams_.Set("pageToken", pageToken)
  8151. return c
  8152. }
  8153. // View sets the optional parameter "view": Controls the set of fields
  8154. // returned in the List response.
  8155. //
  8156. // Possible values:
  8157. // "BASIC"
  8158. // "FULL"
  8159. func (c *AppsServicesVersionsListCall) View(view string) *AppsServicesVersionsListCall {
  8160. c.urlParams_.Set("view", view)
  8161. return c
  8162. }
  8163. // Fields allows partial responses to be retrieved. See
  8164. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8165. // for more information.
  8166. func (c *AppsServicesVersionsListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsListCall {
  8167. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8168. return c
  8169. }
  8170. // IfNoneMatch sets the optional parameter which makes the operation
  8171. // fail if the object's ETag matches the given value. This is useful for
  8172. // getting updates only after the object has changed since the last
  8173. // request. Use googleapi.IsNotModified to check whether the response
  8174. // error from Do is the result of In-None-Match.
  8175. func (c *AppsServicesVersionsListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsListCall {
  8176. c.ifNoneMatch_ = entityTag
  8177. return c
  8178. }
  8179. // Context sets the context to be used in this call's Do method. Any
  8180. // pending HTTP request will be aborted if the provided context is
  8181. // canceled.
  8182. func (c *AppsServicesVersionsListCall) Context(ctx context.Context) *AppsServicesVersionsListCall {
  8183. c.ctx_ = ctx
  8184. return c
  8185. }
  8186. // Header returns an http.Header that can be modified by the caller to
  8187. // add HTTP headers to the request.
  8188. func (c *AppsServicesVersionsListCall) Header() http.Header {
  8189. if c.header_ == nil {
  8190. c.header_ = make(http.Header)
  8191. }
  8192. return c.header_
  8193. }
  8194. func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  8195. reqHeaders := make(http.Header)
  8196. for k, v := range c.header_ {
  8197. reqHeaders[k] = v
  8198. }
  8199. reqHeaders.Set("User-Agent", c.s.userAgent())
  8200. if c.ifNoneMatch_ != "" {
  8201. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8202. }
  8203. var body io.Reader = nil
  8204. c.urlParams_.Set("alt", alt)
  8205. c.urlParams_.Set("prettyPrint", "false")
  8206. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions")
  8207. urls += "?" + c.urlParams_.Encode()
  8208. req, err := http.NewRequest("GET", urls, body)
  8209. if err != nil {
  8210. return nil, err
  8211. }
  8212. req.Header = reqHeaders
  8213. googleapi.Expand(req.URL, map[string]string{
  8214. "appsId": c.appsId,
  8215. "servicesId": c.servicesId,
  8216. })
  8217. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8218. }
  8219. // Do executes the "appengine.apps.services.versions.list" call.
  8220. // Exactly one of *ListVersionsResponse or error will be non-nil. Any
  8221. // non-2xx status code is an error. Response headers are in either
  8222. // *ListVersionsResponse.ServerResponse.Header or (if a response was
  8223. // returned at all) in error.(*googleapi.Error).Header. Use
  8224. // googleapi.IsNotModified to check whether the returned error was
  8225. // because http.StatusNotModified was returned.
  8226. func (c *AppsServicesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  8227. gensupport.SetOptions(c.urlParams_, opts...)
  8228. res, err := c.doRequest("json")
  8229. if res != nil && res.StatusCode == http.StatusNotModified {
  8230. if res.Body != nil {
  8231. res.Body.Close()
  8232. }
  8233. return nil, &googleapi.Error{
  8234. Code: res.StatusCode,
  8235. Header: res.Header,
  8236. }
  8237. }
  8238. if err != nil {
  8239. return nil, err
  8240. }
  8241. defer googleapi.CloseBody(res)
  8242. if err := googleapi.CheckResponse(res); err != nil {
  8243. return nil, err
  8244. }
  8245. ret := &ListVersionsResponse{
  8246. ServerResponse: googleapi.ServerResponse{
  8247. Header: res.Header,
  8248. HTTPStatusCode: res.StatusCode,
  8249. },
  8250. }
  8251. target := &ret
  8252. if err := gensupport.DecodeResponse(target, res); err != nil {
  8253. return nil, err
  8254. }
  8255. return ret, nil
  8256. // {
  8257. // "description": "Lists the versions of a service.",
  8258. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions",
  8259. // "httpMethod": "GET",
  8260. // "id": "appengine.apps.services.versions.list",
  8261. // "parameterOrder": [
  8262. // "appsId",
  8263. // "servicesId"
  8264. // ],
  8265. // "parameters": {
  8266. // "appsId": {
  8267. // "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.",
  8268. // "location": "path",
  8269. // "required": true,
  8270. // "type": "string"
  8271. // },
  8272. // "pageSize": {
  8273. // "description": "Maximum results to return per page.",
  8274. // "format": "int32",
  8275. // "location": "query",
  8276. // "type": "integer"
  8277. // },
  8278. // "pageToken": {
  8279. // "description": "Continuation token for fetching the next page of results.",
  8280. // "location": "query",
  8281. // "type": "string"
  8282. // },
  8283. // "servicesId": {
  8284. // "description": "Part of `parent`. See documentation of `appsId`.",
  8285. // "location": "path",
  8286. // "required": true,
  8287. // "type": "string"
  8288. // },
  8289. // "view": {
  8290. // "description": "Controls the set of fields returned in the List response.",
  8291. // "enum": [
  8292. // "BASIC",
  8293. // "FULL"
  8294. // ],
  8295. // "location": "query",
  8296. // "type": "string"
  8297. // }
  8298. // },
  8299. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions",
  8300. // "response": {
  8301. // "$ref": "ListVersionsResponse"
  8302. // },
  8303. // "scopes": [
  8304. // "https://www.googleapis.com/auth/appengine.admin",
  8305. // "https://www.googleapis.com/auth/cloud-platform",
  8306. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  8307. // ]
  8308. // }
  8309. }
  8310. // Pages invokes f for each page of results.
  8311. // A non-nil error returned from f will halt the iteration.
  8312. // The provided context supersedes any context provided to the Context method.
  8313. func (c *AppsServicesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  8314. c.ctx_ = ctx
  8315. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8316. for {
  8317. x, err := c.Do()
  8318. if err != nil {
  8319. return err
  8320. }
  8321. if err := f(x); err != nil {
  8322. return err
  8323. }
  8324. if x.NextPageToken == "" {
  8325. return nil
  8326. }
  8327. c.PageToken(x.NextPageToken)
  8328. }
  8329. }
  8330. // method id "appengine.apps.services.versions.patch":
  8331. type AppsServicesVersionsPatchCall struct {
  8332. s *APIService
  8333. appsId string
  8334. servicesId string
  8335. versionsId string
  8336. version *Version
  8337. urlParams_ gensupport.URLParams
  8338. ctx_ context.Context
  8339. header_ http.Header
  8340. }
  8341. // Patch: Updates the specified Version resource. You can specify the
  8342. // following fields depending on the App Engine environment and type of
  8343. // scaling that the version resource uses:Standard
  8344. // environment
  8345. // instance_class
  8346. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8347. // ta/apps.services.versions#Version.FIELDS.instance_class)automatic
  8348. // scaling in the standard
  8349. // environment:
  8350. // automatic_scaling.min_idle_instances
  8351. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8352. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8353. // automatic_
  8354. // scaling.max_idle_instances
  8355. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8356. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8357. // automaticS
  8358. // caling.standard_scheduler_settings.max_instances
  8359. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8360. // ta/apps.services.versions#StandardSchedulerSettings)
  8361. // automaticScaling.
  8362. // standard_scheduler_settings.min_instances
  8363. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8364. // ta/apps.services.versions#StandardSchedulerSettings)
  8365. // automaticScaling.
  8366. // standard_scheduler_settings.target_cpu_utilization
  8367. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8368. // ta/apps.services.versions#StandardSchedulerSettings)
  8369. // automaticScaling.
  8370. // standard_scheduler_settings.target_throughput_utilization
  8371. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8372. // ta/apps.services.versions#StandardSchedulerSettings)basic scaling or
  8373. // manual scaling in the standard environment:
  8374. // serving_status
  8375. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8376. // ta/apps.services.versions#Version.FIELDS.serving_status)Flexible
  8377. // environment
  8378. // serving_status
  8379. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8380. // ta/apps.services.versions#Version.FIELDS.serving_status)automatic
  8381. // scaling in the flexible
  8382. // environment:
  8383. // automatic_scaling.min_total_instances
  8384. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8385. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8386. // automatic_
  8387. // scaling.max_total_instances
  8388. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8389. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8390. // automatic_
  8391. // scaling.cool_down_period_sec
  8392. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8393. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8394. // automatic_
  8395. // scaling.cpu_utilization.target_utilization
  8396. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8397. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8398. func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall {
  8399. c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8400. c.appsId = appsId
  8401. c.servicesId = servicesId
  8402. c.versionsId = versionsId
  8403. c.version = version
  8404. return c
  8405. }
  8406. // UpdateMask sets the optional parameter "updateMask": Standard field
  8407. // mask for the set of fields to be updated.
  8408. func (c *AppsServicesVersionsPatchCall) UpdateMask(updateMask string) *AppsServicesVersionsPatchCall {
  8409. c.urlParams_.Set("updateMask", updateMask)
  8410. return c
  8411. }
  8412. // Fields allows partial responses to be retrieved. See
  8413. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8414. // for more information.
  8415. func (c *AppsServicesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsServicesVersionsPatchCall {
  8416. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8417. return c
  8418. }
  8419. // Context sets the context to be used in this call's Do method. Any
  8420. // pending HTTP request will be aborted if the provided context is
  8421. // canceled.
  8422. func (c *AppsServicesVersionsPatchCall) Context(ctx context.Context) *AppsServicesVersionsPatchCall {
  8423. c.ctx_ = ctx
  8424. return c
  8425. }
  8426. // Header returns an http.Header that can be modified by the caller to
  8427. // add HTTP headers to the request.
  8428. func (c *AppsServicesVersionsPatchCall) Header() http.Header {
  8429. if c.header_ == nil {
  8430. c.header_ = make(http.Header)
  8431. }
  8432. return c.header_
  8433. }
  8434. func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
  8435. reqHeaders := make(http.Header)
  8436. for k, v := range c.header_ {
  8437. reqHeaders[k] = v
  8438. }
  8439. reqHeaders.Set("User-Agent", c.s.userAgent())
  8440. var body io.Reader = nil
  8441. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  8442. if err != nil {
  8443. return nil, err
  8444. }
  8445. reqHeaders.Set("Content-Type", "application/json")
  8446. c.urlParams_.Set("alt", alt)
  8447. c.urlParams_.Set("prettyPrint", "false")
  8448. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  8449. urls += "?" + c.urlParams_.Encode()
  8450. req, err := http.NewRequest("PATCH", urls, body)
  8451. if err != nil {
  8452. return nil, err
  8453. }
  8454. req.Header = reqHeaders
  8455. googleapi.Expand(req.URL, map[string]string{
  8456. "appsId": c.appsId,
  8457. "servicesId": c.servicesId,
  8458. "versionsId": c.versionsId,
  8459. })
  8460. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8461. }
  8462. // Do executes the "appengine.apps.services.versions.patch" call.
  8463. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8464. // status code is an error. Response headers are in either
  8465. // *Operation.ServerResponse.Header or (if a response was returned at
  8466. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8467. // to check whether the returned error was because
  8468. // http.StatusNotModified was returned.
  8469. func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8470. gensupport.SetOptions(c.urlParams_, opts...)
  8471. res, err := c.doRequest("json")
  8472. if res != nil && res.StatusCode == http.StatusNotModified {
  8473. if res.Body != nil {
  8474. res.Body.Close()
  8475. }
  8476. return nil, &googleapi.Error{
  8477. Code: res.StatusCode,
  8478. Header: res.Header,
  8479. }
  8480. }
  8481. if err != nil {
  8482. return nil, err
  8483. }
  8484. defer googleapi.CloseBody(res)
  8485. if err := googleapi.CheckResponse(res); err != nil {
  8486. return nil, err
  8487. }
  8488. ret := &Operation{
  8489. ServerResponse: googleapi.ServerResponse{
  8490. Header: res.Header,
  8491. HTTPStatusCode: res.StatusCode,
  8492. },
  8493. }
  8494. target := &ret
  8495. if err := gensupport.DecodeResponse(target, res); err != nil {
  8496. return nil, err
  8497. }
  8498. return ret, nil
  8499. // {
  8500. // "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:Standard environment\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.instance_class)automatic scaling in the standard environment:\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomaticScaling.standard_scheduler_settings.max_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.min_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.target_cpu_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.target_throughput_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)basic scaling or manual scaling in the standard environment:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status)Flexible environment\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status)automatic scaling in the flexible environment:\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)",
  8501. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  8502. // "httpMethod": "PATCH",
  8503. // "id": "appengine.apps.services.versions.patch",
  8504. // "parameterOrder": [
  8505. // "appsId",
  8506. // "servicesId",
  8507. // "versionsId"
  8508. // ],
  8509. // "parameters": {
  8510. // "appsId": {
  8511. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.",
  8512. // "location": "path",
  8513. // "required": true,
  8514. // "type": "string"
  8515. // },
  8516. // "servicesId": {
  8517. // "description": "Part of `name`. See documentation of `appsId`.",
  8518. // "location": "path",
  8519. // "required": true,
  8520. // "type": "string"
  8521. // },
  8522. // "updateMask": {
  8523. // "description": "Standard field mask for the set of fields to be updated.",
  8524. // "format": "google-fieldmask",
  8525. // "location": "query",
  8526. // "type": "string"
  8527. // },
  8528. // "versionsId": {
  8529. // "description": "Part of `name`. See documentation of `appsId`.",
  8530. // "location": "path",
  8531. // "required": true,
  8532. // "type": "string"
  8533. // }
  8534. // },
  8535. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  8536. // "request": {
  8537. // "$ref": "Version"
  8538. // },
  8539. // "response": {
  8540. // "$ref": "Operation"
  8541. // },
  8542. // "scopes": [
  8543. // "https://www.googleapis.com/auth/cloud-platform"
  8544. // ]
  8545. // }
  8546. }
  8547. // method id "appengine.apps.services.versions.instances.debug":
  8548. type AppsServicesVersionsInstancesDebugCall struct {
  8549. s *APIService
  8550. appsId string
  8551. servicesId string
  8552. versionsId string
  8553. instancesId string
  8554. debuginstancerequest *DebugInstanceRequest
  8555. urlParams_ gensupport.URLParams
  8556. ctx_ context.Context
  8557. header_ http.Header
  8558. }
  8559. // Debug: Enables debugging on a VM instance. This allows you to use the
  8560. // SSH command to connect to the virtual machine where the instance
  8561. // lives. While in "debug mode", the instance continues to serve live
  8562. // traffic. You should delete the instance when you are done debugging
  8563. // and then allow the system to take over and determine if another
  8564. // instance should be started.Only applicable for instances in App
  8565. // Engine flexible environment.
  8566. func (r *AppsServicesVersionsInstancesService) Debug(appsId string, servicesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsServicesVersionsInstancesDebugCall {
  8567. c := &AppsServicesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8568. c.appsId = appsId
  8569. c.servicesId = servicesId
  8570. c.versionsId = versionsId
  8571. c.instancesId = instancesId
  8572. c.debuginstancerequest = debuginstancerequest
  8573. return c
  8574. }
  8575. // Fields allows partial responses to be retrieved. See
  8576. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8577. // for more information.
  8578. func (c *AppsServicesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDebugCall {
  8579. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8580. return c
  8581. }
  8582. // Context sets the context to be used in this call's Do method. Any
  8583. // pending HTTP request will be aborted if the provided context is
  8584. // canceled.
  8585. func (c *AppsServicesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDebugCall {
  8586. c.ctx_ = ctx
  8587. return c
  8588. }
  8589. // Header returns an http.Header that can be modified by the caller to
  8590. // add HTTP headers to the request.
  8591. func (c *AppsServicesVersionsInstancesDebugCall) Header() http.Header {
  8592. if c.header_ == nil {
  8593. c.header_ = make(http.Header)
  8594. }
  8595. return c.header_
  8596. }
  8597. func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) {
  8598. reqHeaders := make(http.Header)
  8599. for k, v := range c.header_ {
  8600. reqHeaders[k] = v
  8601. }
  8602. reqHeaders.Set("User-Agent", c.s.userAgent())
  8603. var body io.Reader = nil
  8604. body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest)
  8605. if err != nil {
  8606. return nil, err
  8607. }
  8608. reqHeaders.Set("Content-Type", "application/json")
  8609. c.urlParams_.Set("alt", alt)
  8610. c.urlParams_.Set("prettyPrint", "false")
  8611. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug")
  8612. urls += "?" + c.urlParams_.Encode()
  8613. req, err := http.NewRequest("POST", urls, body)
  8614. if err != nil {
  8615. return nil, err
  8616. }
  8617. req.Header = reqHeaders
  8618. googleapi.Expand(req.URL, map[string]string{
  8619. "appsId": c.appsId,
  8620. "servicesId": c.servicesId,
  8621. "versionsId": c.versionsId,
  8622. "instancesId": c.instancesId,
  8623. })
  8624. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8625. }
  8626. // Do executes the "appengine.apps.services.versions.instances.debug" call.
  8627. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8628. // status code is an error. Response headers are in either
  8629. // *Operation.ServerResponse.Header or (if a response was returned at
  8630. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8631. // to check whether the returned error was because
  8632. // http.StatusNotModified was returned.
  8633. func (c *AppsServicesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8634. gensupport.SetOptions(c.urlParams_, opts...)
  8635. res, err := c.doRequest("json")
  8636. if res != nil && res.StatusCode == http.StatusNotModified {
  8637. if res.Body != nil {
  8638. res.Body.Close()
  8639. }
  8640. return nil, &googleapi.Error{
  8641. Code: res.StatusCode,
  8642. Header: res.Header,
  8643. }
  8644. }
  8645. if err != nil {
  8646. return nil, err
  8647. }
  8648. defer googleapi.CloseBody(res)
  8649. if err := googleapi.CheckResponse(res); err != nil {
  8650. return nil, err
  8651. }
  8652. ret := &Operation{
  8653. ServerResponse: googleapi.ServerResponse{
  8654. Header: res.Header,
  8655. HTTPStatusCode: res.StatusCode,
  8656. },
  8657. }
  8658. target := &ret
  8659. if err := gensupport.DecodeResponse(target, res); err != nil {
  8660. return nil, err
  8661. }
  8662. return ret, nil
  8663. // {
  8664. // "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.",
  8665. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
  8666. // "httpMethod": "POST",
  8667. // "id": "appengine.apps.services.versions.instances.debug",
  8668. // "parameterOrder": [
  8669. // "appsId",
  8670. // "servicesId",
  8671. // "versionsId",
  8672. // "instancesId"
  8673. // ],
  8674. // "parameters": {
  8675. // "appsId": {
  8676. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8677. // "location": "path",
  8678. // "required": true,
  8679. // "type": "string"
  8680. // },
  8681. // "instancesId": {
  8682. // "description": "Part of `name`. See documentation of `appsId`.",
  8683. // "location": "path",
  8684. // "required": true,
  8685. // "type": "string"
  8686. // },
  8687. // "servicesId": {
  8688. // "description": "Part of `name`. See documentation of `appsId`.",
  8689. // "location": "path",
  8690. // "required": true,
  8691. // "type": "string"
  8692. // },
  8693. // "versionsId": {
  8694. // "description": "Part of `name`. See documentation of `appsId`.",
  8695. // "location": "path",
  8696. // "required": true,
  8697. // "type": "string"
  8698. // }
  8699. // },
  8700. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
  8701. // "request": {
  8702. // "$ref": "DebugInstanceRequest"
  8703. // },
  8704. // "response": {
  8705. // "$ref": "Operation"
  8706. // },
  8707. // "scopes": [
  8708. // "https://www.googleapis.com/auth/cloud-platform"
  8709. // ]
  8710. // }
  8711. }
  8712. // method id "appengine.apps.services.versions.instances.delete":
  8713. type AppsServicesVersionsInstancesDeleteCall struct {
  8714. s *APIService
  8715. appsId string
  8716. servicesId string
  8717. versionsId string
  8718. instancesId string
  8719. urlParams_ gensupport.URLParams
  8720. ctx_ context.Context
  8721. header_ http.Header
  8722. }
  8723. // Delete: Stops a running instance.
  8724. func (r *AppsServicesVersionsInstancesService) Delete(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesDeleteCall {
  8725. c := &AppsServicesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8726. c.appsId = appsId
  8727. c.servicesId = servicesId
  8728. c.versionsId = versionsId
  8729. c.instancesId = instancesId
  8730. return c
  8731. }
  8732. // Fields allows partial responses to be retrieved. See
  8733. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8734. // for more information.
  8735. func (c *AppsServicesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDeleteCall {
  8736. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8737. return c
  8738. }
  8739. // Context sets the context to be used in this call's Do method. Any
  8740. // pending HTTP request will be aborted if the provided context is
  8741. // canceled.
  8742. func (c *AppsServicesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDeleteCall {
  8743. c.ctx_ = ctx
  8744. return c
  8745. }
  8746. // Header returns an http.Header that can be modified by the caller to
  8747. // add HTTP headers to the request.
  8748. func (c *AppsServicesVersionsInstancesDeleteCall) Header() http.Header {
  8749. if c.header_ == nil {
  8750. c.header_ = make(http.Header)
  8751. }
  8752. return c.header_
  8753. }
  8754. func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  8755. reqHeaders := make(http.Header)
  8756. for k, v := range c.header_ {
  8757. reqHeaders[k] = v
  8758. }
  8759. reqHeaders.Set("User-Agent", c.s.userAgent())
  8760. var body io.Reader = nil
  8761. c.urlParams_.Set("alt", alt)
  8762. c.urlParams_.Set("prettyPrint", "false")
  8763. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
  8764. urls += "?" + c.urlParams_.Encode()
  8765. req, err := http.NewRequest("DELETE", urls, body)
  8766. if err != nil {
  8767. return nil, err
  8768. }
  8769. req.Header = reqHeaders
  8770. googleapi.Expand(req.URL, map[string]string{
  8771. "appsId": c.appsId,
  8772. "servicesId": c.servicesId,
  8773. "versionsId": c.versionsId,
  8774. "instancesId": c.instancesId,
  8775. })
  8776. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8777. }
  8778. // Do executes the "appengine.apps.services.versions.instances.delete" call.
  8779. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8780. // status code is an error. Response headers are in either
  8781. // *Operation.ServerResponse.Header or (if a response was returned at
  8782. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8783. // to check whether the returned error was because
  8784. // http.StatusNotModified was returned.
  8785. func (c *AppsServicesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8786. gensupport.SetOptions(c.urlParams_, opts...)
  8787. res, err := c.doRequest("json")
  8788. if res != nil && res.StatusCode == http.StatusNotModified {
  8789. if res.Body != nil {
  8790. res.Body.Close()
  8791. }
  8792. return nil, &googleapi.Error{
  8793. Code: res.StatusCode,
  8794. Header: res.Header,
  8795. }
  8796. }
  8797. if err != nil {
  8798. return nil, err
  8799. }
  8800. defer googleapi.CloseBody(res)
  8801. if err := googleapi.CheckResponse(res); err != nil {
  8802. return nil, err
  8803. }
  8804. ret := &Operation{
  8805. ServerResponse: googleapi.ServerResponse{
  8806. Header: res.Header,
  8807. HTTPStatusCode: res.StatusCode,
  8808. },
  8809. }
  8810. target := &ret
  8811. if err := gensupport.DecodeResponse(target, res); err != nil {
  8812. return nil, err
  8813. }
  8814. return ret, nil
  8815. // {
  8816. // "description": "Stops a running instance.",
  8817. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8818. // "httpMethod": "DELETE",
  8819. // "id": "appengine.apps.services.versions.instances.delete",
  8820. // "parameterOrder": [
  8821. // "appsId",
  8822. // "servicesId",
  8823. // "versionsId",
  8824. // "instancesId"
  8825. // ],
  8826. // "parameters": {
  8827. // "appsId": {
  8828. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8829. // "location": "path",
  8830. // "required": true,
  8831. // "type": "string"
  8832. // },
  8833. // "instancesId": {
  8834. // "description": "Part of `name`. See documentation of `appsId`.",
  8835. // "location": "path",
  8836. // "required": true,
  8837. // "type": "string"
  8838. // },
  8839. // "servicesId": {
  8840. // "description": "Part of `name`. See documentation of `appsId`.",
  8841. // "location": "path",
  8842. // "required": true,
  8843. // "type": "string"
  8844. // },
  8845. // "versionsId": {
  8846. // "description": "Part of `name`. See documentation of `appsId`.",
  8847. // "location": "path",
  8848. // "required": true,
  8849. // "type": "string"
  8850. // }
  8851. // },
  8852. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8853. // "response": {
  8854. // "$ref": "Operation"
  8855. // },
  8856. // "scopes": [
  8857. // "https://www.googleapis.com/auth/cloud-platform"
  8858. // ]
  8859. // }
  8860. }
  8861. // method id "appengine.apps.services.versions.instances.get":
  8862. type AppsServicesVersionsInstancesGetCall struct {
  8863. s *APIService
  8864. appsId string
  8865. servicesId string
  8866. versionsId string
  8867. instancesId string
  8868. urlParams_ gensupport.URLParams
  8869. ifNoneMatch_ string
  8870. ctx_ context.Context
  8871. header_ http.Header
  8872. }
  8873. // Get: Gets instance information.
  8874. func (r *AppsServicesVersionsInstancesService) Get(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesGetCall {
  8875. c := &AppsServicesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8876. c.appsId = appsId
  8877. c.servicesId = servicesId
  8878. c.versionsId = versionsId
  8879. c.instancesId = instancesId
  8880. return c
  8881. }
  8882. // Fields allows partial responses to be retrieved. See
  8883. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8884. // for more information.
  8885. func (c *AppsServicesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesGetCall {
  8886. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8887. return c
  8888. }
  8889. // IfNoneMatch sets the optional parameter which makes the operation
  8890. // fail if the object's ETag matches the given value. This is useful for
  8891. // getting updates only after the object has changed since the last
  8892. // request. Use googleapi.IsNotModified to check whether the response
  8893. // error from Do is the result of In-None-Match.
  8894. func (c *AppsServicesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesGetCall {
  8895. c.ifNoneMatch_ = entityTag
  8896. return c
  8897. }
  8898. // Context sets the context to be used in this call's Do method. Any
  8899. // pending HTTP request will be aborted if the provided context is
  8900. // canceled.
  8901. func (c *AppsServicesVersionsInstancesGetCall) Context(ctx context.Context) *AppsServicesVersionsInstancesGetCall {
  8902. c.ctx_ = ctx
  8903. return c
  8904. }
  8905. // Header returns an http.Header that can be modified by the caller to
  8906. // add HTTP headers to the request.
  8907. func (c *AppsServicesVersionsInstancesGetCall) Header() http.Header {
  8908. if c.header_ == nil {
  8909. c.header_ = make(http.Header)
  8910. }
  8911. return c.header_
  8912. }
  8913. func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  8914. reqHeaders := make(http.Header)
  8915. for k, v := range c.header_ {
  8916. reqHeaders[k] = v
  8917. }
  8918. reqHeaders.Set("User-Agent", c.s.userAgent())
  8919. if c.ifNoneMatch_ != "" {
  8920. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8921. }
  8922. var body io.Reader = nil
  8923. c.urlParams_.Set("alt", alt)
  8924. c.urlParams_.Set("prettyPrint", "false")
  8925. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
  8926. urls += "?" + c.urlParams_.Encode()
  8927. req, err := http.NewRequest("GET", urls, body)
  8928. if err != nil {
  8929. return nil, err
  8930. }
  8931. req.Header = reqHeaders
  8932. googleapi.Expand(req.URL, map[string]string{
  8933. "appsId": c.appsId,
  8934. "servicesId": c.servicesId,
  8935. "versionsId": c.versionsId,
  8936. "instancesId": c.instancesId,
  8937. })
  8938. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8939. }
  8940. // Do executes the "appengine.apps.services.versions.instances.get" call.
  8941. // Exactly one of *Instance or error will be non-nil. Any non-2xx status
  8942. // code is an error. Response headers are in either
  8943. // *Instance.ServerResponse.Header or (if a response was returned at
  8944. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8945. // to check whether the returned error was because
  8946. // http.StatusNotModified was returned.
  8947. func (c *AppsServicesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  8948. gensupport.SetOptions(c.urlParams_, opts...)
  8949. res, err := c.doRequest("json")
  8950. if res != nil && res.StatusCode == http.StatusNotModified {
  8951. if res.Body != nil {
  8952. res.Body.Close()
  8953. }
  8954. return nil, &googleapi.Error{
  8955. Code: res.StatusCode,
  8956. Header: res.Header,
  8957. }
  8958. }
  8959. if err != nil {
  8960. return nil, err
  8961. }
  8962. defer googleapi.CloseBody(res)
  8963. if err := googleapi.CheckResponse(res); err != nil {
  8964. return nil, err
  8965. }
  8966. ret := &Instance{
  8967. ServerResponse: googleapi.ServerResponse{
  8968. Header: res.Header,
  8969. HTTPStatusCode: res.StatusCode,
  8970. },
  8971. }
  8972. target := &ret
  8973. if err := gensupport.DecodeResponse(target, res); err != nil {
  8974. return nil, err
  8975. }
  8976. return ret, nil
  8977. // {
  8978. // "description": "Gets instance information.",
  8979. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8980. // "httpMethod": "GET",
  8981. // "id": "appengine.apps.services.versions.instances.get",
  8982. // "parameterOrder": [
  8983. // "appsId",
  8984. // "servicesId",
  8985. // "versionsId",
  8986. // "instancesId"
  8987. // ],
  8988. // "parameters": {
  8989. // "appsId": {
  8990. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8991. // "location": "path",
  8992. // "required": true,
  8993. // "type": "string"
  8994. // },
  8995. // "instancesId": {
  8996. // "description": "Part of `name`. See documentation of `appsId`.",
  8997. // "location": "path",
  8998. // "required": true,
  8999. // "type": "string"
  9000. // },
  9001. // "servicesId": {
  9002. // "description": "Part of `name`. See documentation of `appsId`.",
  9003. // "location": "path",
  9004. // "required": true,
  9005. // "type": "string"
  9006. // },
  9007. // "versionsId": {
  9008. // "description": "Part of `name`. See documentation of `appsId`.",
  9009. // "location": "path",
  9010. // "required": true,
  9011. // "type": "string"
  9012. // }
  9013. // },
  9014. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  9015. // "response": {
  9016. // "$ref": "Instance"
  9017. // },
  9018. // "scopes": [
  9019. // "https://www.googleapis.com/auth/appengine.admin",
  9020. // "https://www.googleapis.com/auth/cloud-platform",
  9021. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  9022. // ]
  9023. // }
  9024. }
  9025. // method id "appengine.apps.services.versions.instances.list":
  9026. type AppsServicesVersionsInstancesListCall struct {
  9027. s *APIService
  9028. appsId string
  9029. servicesId string
  9030. versionsId string
  9031. urlParams_ gensupport.URLParams
  9032. ifNoneMatch_ string
  9033. ctx_ context.Context
  9034. header_ http.Header
  9035. }
  9036. // List: Lists the instances of a version.Tip: To aggregate details
  9037. // about instances over time, see the Stackdriver Monitoring API
  9038. // (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeS
  9039. // eries/list).
  9040. func (r *AppsServicesVersionsInstancesService) List(appsId string, servicesId string, versionsId string) *AppsServicesVersionsInstancesListCall {
  9041. c := &AppsServicesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9042. c.appsId = appsId
  9043. c.servicesId = servicesId
  9044. c.versionsId = versionsId
  9045. return c
  9046. }
  9047. // PageSize sets the optional parameter "pageSize": Maximum results to
  9048. // return per page.
  9049. func (c *AppsServicesVersionsInstancesListCall) PageSize(pageSize int64) *AppsServicesVersionsInstancesListCall {
  9050. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9051. return c
  9052. }
  9053. // PageToken sets the optional parameter "pageToken": Continuation token
  9054. // for fetching the next page of results.
  9055. func (c *AppsServicesVersionsInstancesListCall) PageToken(pageToken string) *AppsServicesVersionsInstancesListCall {
  9056. c.urlParams_.Set("pageToken", pageToken)
  9057. return c
  9058. }
  9059. // Fields allows partial responses to be retrieved. See
  9060. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9061. // for more information.
  9062. func (c *AppsServicesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesListCall {
  9063. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9064. return c
  9065. }
  9066. // IfNoneMatch sets the optional parameter which makes the operation
  9067. // fail if the object's ETag matches the given value. This is useful for
  9068. // getting updates only after the object has changed since the last
  9069. // request. Use googleapi.IsNotModified to check whether the response
  9070. // error from Do is the result of In-None-Match.
  9071. func (c *AppsServicesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesListCall {
  9072. c.ifNoneMatch_ = entityTag
  9073. return c
  9074. }
  9075. // Context sets the context to be used in this call's Do method. Any
  9076. // pending HTTP request will be aborted if the provided context is
  9077. // canceled.
  9078. func (c *AppsServicesVersionsInstancesListCall) Context(ctx context.Context) *AppsServicesVersionsInstancesListCall {
  9079. c.ctx_ = ctx
  9080. return c
  9081. }
  9082. // Header returns an http.Header that can be modified by the caller to
  9083. // add HTTP headers to the request.
  9084. func (c *AppsServicesVersionsInstancesListCall) Header() http.Header {
  9085. if c.header_ == nil {
  9086. c.header_ = make(http.Header)
  9087. }
  9088. return c.header_
  9089. }
  9090. func (c *AppsServicesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  9091. reqHeaders := make(http.Header)
  9092. for k, v := range c.header_ {
  9093. reqHeaders[k] = v
  9094. }
  9095. reqHeaders.Set("User-Agent", c.s.userAgent())
  9096. if c.ifNoneMatch_ != "" {
  9097. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9098. }
  9099. var body io.Reader = nil
  9100. c.urlParams_.Set("alt", alt)
  9101. c.urlParams_.Set("prettyPrint", "false")
  9102. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances")
  9103. urls += "?" + c.urlParams_.Encode()
  9104. req, err := http.NewRequest("GET", urls, body)
  9105. if err != nil {
  9106. return nil, err
  9107. }
  9108. req.Header = reqHeaders
  9109. googleapi.Expand(req.URL, map[string]string{
  9110. "appsId": c.appsId,
  9111. "servicesId": c.servicesId,
  9112. "versionsId": c.versionsId,
  9113. })
  9114. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9115. }
  9116. // Do executes the "appengine.apps.services.versions.instances.list" call.
  9117. // Exactly one of *ListInstancesResponse or error will be non-nil. Any
  9118. // non-2xx status code is an error. Response headers are in either
  9119. // *ListInstancesResponse.ServerResponse.Header or (if a response was
  9120. // returned at all) in error.(*googleapi.Error).Header. Use
  9121. // googleapi.IsNotModified to check whether the returned error was
  9122. // because http.StatusNotModified was returned.
  9123. func (c *AppsServicesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  9124. gensupport.SetOptions(c.urlParams_, opts...)
  9125. res, err := c.doRequest("json")
  9126. if res != nil && res.StatusCode == http.StatusNotModified {
  9127. if res.Body != nil {
  9128. res.Body.Close()
  9129. }
  9130. return nil, &googleapi.Error{
  9131. Code: res.StatusCode,
  9132. Header: res.Header,
  9133. }
  9134. }
  9135. if err != nil {
  9136. return nil, err
  9137. }
  9138. defer googleapi.CloseBody(res)
  9139. if err := googleapi.CheckResponse(res); err != nil {
  9140. return nil, err
  9141. }
  9142. ret := &ListInstancesResponse{
  9143. ServerResponse: googleapi.ServerResponse{
  9144. Header: res.Header,
  9145. HTTPStatusCode: res.StatusCode,
  9146. },
  9147. }
  9148. target := &ret
  9149. if err := gensupport.DecodeResponse(target, res); err != nil {
  9150. return nil, err
  9151. }
  9152. return ret, nil
  9153. // {
  9154. // "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).",
  9155. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
  9156. // "httpMethod": "GET",
  9157. // "id": "appengine.apps.services.versions.instances.list",
  9158. // "parameterOrder": [
  9159. // "appsId",
  9160. // "servicesId",
  9161. // "versionsId"
  9162. // ],
  9163. // "parameters": {
  9164. // "appsId": {
  9165. // "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.",
  9166. // "location": "path",
  9167. // "required": true,
  9168. // "type": "string"
  9169. // },
  9170. // "pageSize": {
  9171. // "description": "Maximum results to return per page.",
  9172. // "format": "int32",
  9173. // "location": "query",
  9174. // "type": "integer"
  9175. // },
  9176. // "pageToken": {
  9177. // "description": "Continuation token for fetching the next page of results.",
  9178. // "location": "query",
  9179. // "type": "string"
  9180. // },
  9181. // "servicesId": {
  9182. // "description": "Part of `parent`. See documentation of `appsId`.",
  9183. // "location": "path",
  9184. // "required": true,
  9185. // "type": "string"
  9186. // },
  9187. // "versionsId": {
  9188. // "description": "Part of `parent`. See documentation of `appsId`.",
  9189. // "location": "path",
  9190. // "required": true,
  9191. // "type": "string"
  9192. // }
  9193. // },
  9194. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
  9195. // "response": {
  9196. // "$ref": "ListInstancesResponse"
  9197. // },
  9198. // "scopes": [
  9199. // "https://www.googleapis.com/auth/appengine.admin",
  9200. // "https://www.googleapis.com/auth/cloud-platform",
  9201. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  9202. // ]
  9203. // }
  9204. }
  9205. // Pages invokes f for each page of results.
  9206. // A non-nil error returned from f will halt the iteration.
  9207. // The provided context supersedes any context provided to the Context method.
  9208. func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  9209. c.ctx_ = ctx
  9210. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9211. for {
  9212. x, err := c.Do()
  9213. if err != nil {
  9214. return err
  9215. }
  9216. if err := f(x); err != nil {
  9217. return err
  9218. }
  9219. if x.NextPageToken == "" {
  9220. return nil
  9221. }
  9222. c.PageToken(x.NextPageToken)
  9223. }
  9224. }