您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

10029 行
366 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/v1"
  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/v1"
  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:v1"
  71. const apiName = "appengine"
  72. const apiVersion = "v1"
  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. // DiskUtilization: Target scaling by disk usage.
  516. DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"`
  517. // MaxConcurrentRequests: Number of concurrent requests an automatic
  518. // scaling instance can accept before the scheduler spawns a new
  519. // instance.Defaults to a runtime-specific value.
  520. MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"`
  521. // MaxIdleInstances: Maximum number of idle instances that should be
  522. // maintained for this version.
  523. MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"`
  524. // MaxPendingLatency: Maximum amount of time that a request should wait
  525. // in the pending queue before starting a new instance to handle it.
  526. MaxPendingLatency string `json:"maxPendingLatency,omitempty"`
  527. // MaxTotalInstances: Maximum number of instances that should be started
  528. // to handle requests for this version.
  529. MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"`
  530. // MinIdleInstances: Minimum number of idle instances that should be
  531. // maintained for this version. Only applicable for the default version
  532. // of a service.
  533. MinIdleInstances int64 `json:"minIdleInstances,omitempty"`
  534. // MinPendingLatency: Minimum amount of time a request should wait in
  535. // the pending queue before starting a new instance to handle it.
  536. MinPendingLatency string `json:"minPendingLatency,omitempty"`
  537. // MinTotalInstances: Minimum number of running instances that should be
  538. // maintained for this version.
  539. MinTotalInstances int64 `json:"minTotalInstances,omitempty"`
  540. // NetworkUtilization: Target scaling by network usage.
  541. NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"`
  542. // RequestUtilization: Target scaling by request utilization.
  543. RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"`
  544. // StandardSchedulerSettings: Scheduler settings for standard
  545. // environment.
  546. StandardSchedulerSettings *StandardSchedulerSettings `json:"standardSchedulerSettings,omitempty"`
  547. // ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to
  548. // unconditionally include in API requests. By default, fields with
  549. // empty values are omitted from API requests. However, any non-pointer,
  550. // non-interface field appearing in ForceSendFields will be sent to the
  551. // server regardless of whether the field is empty or not. This may be
  552. // used to include empty fields in Patch requests.
  553. ForceSendFields []string `json:"-"`
  554. // NullFields is a list of field names (e.g. "CoolDownPeriod") to
  555. // include in API requests with the JSON null value. By default, fields
  556. // with empty values are omitted from API requests. However, any field
  557. // with an empty value appearing in NullFields will be sent to the
  558. // server as null. It is an error if a field in this list has a
  559. // non-empty value. This may be used to include null fields in Patch
  560. // requests.
  561. NullFields []string `json:"-"`
  562. }
  563. func (s *AutomaticScaling) MarshalJSON() ([]byte, error) {
  564. type NoMethod AutomaticScaling
  565. raw := NoMethod(*s)
  566. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  567. }
  568. // BasicScaling: A service with basic scaling will create an instance
  569. // when the application receives a request. The instance will be turned
  570. // down when the app becomes idle. Basic scaling is ideal for work that
  571. // is intermittent or driven by user activity.
  572. type BasicScaling struct {
  573. // IdleTimeout: Duration of time after the last request that an instance
  574. // must wait before the instance is shut down.
  575. IdleTimeout string `json:"idleTimeout,omitempty"`
  576. // MaxInstances: Maximum number of instances to create for this version.
  577. MaxInstances int64 `json:"maxInstances,omitempty"`
  578. // ForceSendFields is a list of field names (e.g. "IdleTimeout") to
  579. // unconditionally include in API requests. By default, fields with
  580. // empty values are omitted from API requests. However, any non-pointer,
  581. // non-interface field appearing in ForceSendFields will be sent to the
  582. // server regardless of whether the field is empty or not. This may be
  583. // used to include empty fields in Patch requests.
  584. ForceSendFields []string `json:"-"`
  585. // NullFields is a list of field names (e.g. "IdleTimeout") to include
  586. // in API requests with the JSON null value. By default, fields with
  587. // empty values are omitted from API requests. However, any field with
  588. // an empty value appearing in NullFields will be sent to the server as
  589. // null. It is an error if a field in this list has a non-empty value.
  590. // This may be used to include null fields in Patch requests.
  591. NullFields []string `json:"-"`
  592. }
  593. func (s *BasicScaling) MarshalJSON() ([]byte, error) {
  594. type NoMethod BasicScaling
  595. raw := NoMethod(*s)
  596. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  597. }
  598. // BatchUpdateIngressRulesRequest: Request message for
  599. // Firewall.BatchUpdateIngressRules.
  600. type BatchUpdateIngressRulesRequest struct {
  601. // IngressRules: A list of FirewallRules to replace the existing set.
  602. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  603. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  604. // unconditionally include in API requests. By default, fields with
  605. // empty values are omitted from API requests. However, any non-pointer,
  606. // non-interface field appearing in ForceSendFields will be sent to the
  607. // server regardless of whether the field is empty or not. This may be
  608. // used to include empty fields in Patch requests.
  609. ForceSendFields []string `json:"-"`
  610. // NullFields is a list of field names (e.g. "IngressRules") to include
  611. // in API requests with the JSON null value. By default, fields with
  612. // empty values are omitted from API requests. However, any field with
  613. // an empty value appearing in NullFields will be sent to the server as
  614. // null. It is an error if a field in this list has a non-empty value.
  615. // This may be used to include null fields in Patch requests.
  616. NullFields []string `json:"-"`
  617. }
  618. func (s *BatchUpdateIngressRulesRequest) MarshalJSON() ([]byte, error) {
  619. type NoMethod BatchUpdateIngressRulesRequest
  620. raw := NoMethod(*s)
  621. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  622. }
  623. // BatchUpdateIngressRulesResponse: Response message for
  624. // Firewall.UpdateAllIngressRules.
  625. type BatchUpdateIngressRulesResponse struct {
  626. // IngressRules: The full list of ingress FirewallRules for this
  627. // application.
  628. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  629. // ServerResponse contains the HTTP response code and headers from the
  630. // server.
  631. googleapi.ServerResponse `json:"-"`
  632. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  633. // unconditionally include in API requests. By default, fields with
  634. // empty values are omitted from API requests. However, any non-pointer,
  635. // non-interface field appearing in ForceSendFields will be sent to the
  636. // server regardless of whether the field is empty or not. This may be
  637. // used to include empty fields in Patch requests.
  638. ForceSendFields []string `json:"-"`
  639. // NullFields is a list of field names (e.g. "IngressRules") to include
  640. // in API requests with the JSON null value. By default, fields with
  641. // empty values are omitted from API requests. However, any field with
  642. // an empty value appearing in NullFields will be sent to the server as
  643. // null. It is an error if a field in this list has a non-empty value.
  644. // This may be used to include null fields in Patch requests.
  645. NullFields []string `json:"-"`
  646. }
  647. func (s *BatchUpdateIngressRulesResponse) MarshalJSON() ([]byte, error) {
  648. type NoMethod BatchUpdateIngressRulesResponse
  649. raw := NoMethod(*s)
  650. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  651. }
  652. // CertificateRawData: An SSL certificate obtained from a certificate
  653. // authority.
  654. type CertificateRawData struct {
  655. // PrivateKey: Unencrypted PEM encoded RSA private key. This field is
  656. // set once on certificate creation and then encrypted. The key size
  657. // must be 2048 bits or fewer. Must include the header and footer.
  658. // Example: <pre> -----BEGIN RSA PRIVATE KEY-----
  659. // <unencrypted_key_value> -----END RSA PRIVATE KEY----- </pre>
  660. // @InputOnly
  661. PrivateKey string `json:"privateKey,omitempty"`
  662. // PublicCertificate: PEM encoded x.509 public key certificate. This
  663. // field is set once on certificate creation. Must include the header
  664. // and footer. Example: <pre> -----BEGIN CERTIFICATE-----
  665. // <certificate_value> -----END CERTIFICATE----- </pre>
  666. PublicCertificate string `json:"publicCertificate,omitempty"`
  667. // ForceSendFields is a list of field names (e.g. "PrivateKey") to
  668. // unconditionally include in API requests. By default, fields with
  669. // empty values are omitted from API requests. However, any non-pointer,
  670. // non-interface field appearing in ForceSendFields will be sent to the
  671. // server regardless of whether the field is empty or not. This may be
  672. // used to include empty fields in Patch requests.
  673. ForceSendFields []string `json:"-"`
  674. // NullFields is a list of field names (e.g. "PrivateKey") to include in
  675. // API requests with the JSON null value. By default, fields with empty
  676. // values are omitted from API requests. However, any field with an
  677. // empty value appearing in NullFields will be sent to the server as
  678. // null. It is an error if a field in this list has a non-empty value.
  679. // This may be used to include null fields in Patch requests.
  680. NullFields []string `json:"-"`
  681. }
  682. func (s *CertificateRawData) MarshalJSON() ([]byte, error) {
  683. type NoMethod CertificateRawData
  684. raw := NoMethod(*s)
  685. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  686. }
  687. // CloudBuildOptions: Options for the build operations performed as a
  688. // part of the version deployment. Only applicable for App Engine
  689. // flexible environment when creating a version using source code
  690. // directly.
  691. type CloudBuildOptions struct {
  692. // AppYamlPath: Path to the yaml file used in deployment, used to
  693. // determine runtime configuration details.Required for flexible
  694. // environment builds.See
  695. // https://cloud.google.com/appengine/docs/standard/python/config/appref
  696. // for more details.
  697. AppYamlPath string `json:"appYamlPath,omitempty"`
  698. // CloudBuildTimeout: The Cloud Build timeout used as part of any
  699. // dependent builds performed by version creation. Defaults to 10
  700. // minutes.
  701. CloudBuildTimeout string `json:"cloudBuildTimeout,omitempty"`
  702. // ForceSendFields is a list of field names (e.g. "AppYamlPath") to
  703. // unconditionally include in API requests. By default, fields with
  704. // empty values are omitted from API requests. However, any non-pointer,
  705. // non-interface field appearing in ForceSendFields will be sent to the
  706. // server regardless of whether the field is empty or not. This may be
  707. // used to include empty fields in Patch requests.
  708. ForceSendFields []string `json:"-"`
  709. // NullFields is a list of field names (e.g. "AppYamlPath") to include
  710. // in API requests with the JSON null value. By default, fields with
  711. // empty values are omitted from API requests. However, any field with
  712. // an empty value appearing in NullFields will be sent to the server as
  713. // null. It is an error if a field in this list has a non-empty value.
  714. // This may be used to include null fields in Patch requests.
  715. NullFields []string `json:"-"`
  716. }
  717. func (s *CloudBuildOptions) MarshalJSON() ([]byte, error) {
  718. type NoMethod CloudBuildOptions
  719. raw := NoMethod(*s)
  720. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  721. }
  722. // ContainerInfo: Docker image that is used to create a container and
  723. // start a VM instance for the version that you deploy. Only applicable
  724. // for instances running in the App Engine flexible environment.
  725. type ContainerInfo struct {
  726. // Image: URI to the hosted container image in Google Container
  727. // Registry. The URI must be fully qualified and include a tag or
  728. // digest. Examples: "gcr.io/my-project/image:tag" or
  729. // "gcr.io/my-project/image@digest"
  730. Image string `json:"image,omitempty"`
  731. // ForceSendFields is a list of field names (e.g. "Image") to
  732. // unconditionally include in API requests. By default, fields with
  733. // empty values are omitted from API requests. However, any non-pointer,
  734. // non-interface field appearing in ForceSendFields will be sent to the
  735. // server regardless of whether the field is empty or not. This may be
  736. // used to include empty fields in Patch requests.
  737. ForceSendFields []string `json:"-"`
  738. // NullFields is a list of field names (e.g. "Image") to include in API
  739. // requests with the JSON null value. By default, fields with empty
  740. // values are omitted from API requests. However, any field with an
  741. // empty value appearing in NullFields will be sent to the server as
  742. // null. It is an error if a field in this list has a non-empty value.
  743. // This may be used to include null fields in Patch requests.
  744. NullFields []string `json:"-"`
  745. }
  746. func (s *ContainerInfo) MarshalJSON() ([]byte, error) {
  747. type NoMethod ContainerInfo
  748. raw := NoMethod(*s)
  749. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  750. }
  751. // CpuUtilization: Target scaling by CPU usage.
  752. type CpuUtilization struct {
  753. // AggregationWindowLength: Period of time over which CPU utilization is
  754. // calculated.
  755. AggregationWindowLength string `json:"aggregationWindowLength,omitempty"`
  756. // TargetUtilization: Target CPU utilization ratio to maintain when
  757. // scaling. Must be between 0 and 1.
  758. TargetUtilization float64 `json:"targetUtilization,omitempty"`
  759. // ForceSendFields is a list of field names (e.g.
  760. // "AggregationWindowLength") to unconditionally include in API
  761. // requests. By default, fields with empty values are omitted from API
  762. // requests. However, any non-pointer, non-interface field appearing in
  763. // ForceSendFields will be sent to the server regardless of whether the
  764. // field is empty or not. This may be used to include empty fields in
  765. // Patch requests.
  766. ForceSendFields []string `json:"-"`
  767. // NullFields is a list of field names (e.g. "AggregationWindowLength")
  768. // to include in API requests with the JSON null value. By default,
  769. // fields with empty values are omitted from API requests. However, any
  770. // field with an empty value appearing in NullFields will be sent to the
  771. // server as null. It is an error if a field in this list has a
  772. // non-empty value. This may be used to include null fields in Patch
  773. // requests.
  774. NullFields []string `json:"-"`
  775. }
  776. func (s *CpuUtilization) MarshalJSON() ([]byte, error) {
  777. type NoMethod CpuUtilization
  778. raw := NoMethod(*s)
  779. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  780. }
  781. func (s *CpuUtilization) UnmarshalJSON(data []byte) error {
  782. type NoMethod CpuUtilization
  783. var s1 struct {
  784. TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"`
  785. *NoMethod
  786. }
  787. s1.NoMethod = (*NoMethod)(s)
  788. if err := json.Unmarshal(data, &s1); err != nil {
  789. return err
  790. }
  791. s.TargetUtilization = float64(s1.TargetUtilization)
  792. return nil
  793. }
  794. // CreateVersionMetadataV1: Metadata for the given
  795. // google.longrunning.Operation during a
  796. // google.appengine.v1.CreateVersionRequest.
  797. type CreateVersionMetadataV1 struct {
  798. // CloudBuildId: The Cloud Build ID if one was created as part of the
  799. // version create. @OutputOnly
  800. CloudBuildId string `json:"cloudBuildId,omitempty"`
  801. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  802. // unconditionally include in API requests. By default, fields with
  803. // empty values are omitted from API requests. However, any non-pointer,
  804. // non-interface field appearing in ForceSendFields will be sent to the
  805. // server regardless of whether the field is empty or not. This may be
  806. // used to include empty fields in Patch requests.
  807. ForceSendFields []string `json:"-"`
  808. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  809. // in API requests with the JSON null value. By default, fields with
  810. // empty values are omitted from API requests. However, any field with
  811. // an empty value appearing in NullFields will be sent to the server as
  812. // null. It is an error if a field in this list has a non-empty value.
  813. // This may be used to include null fields in Patch requests.
  814. NullFields []string `json:"-"`
  815. }
  816. func (s *CreateVersionMetadataV1) MarshalJSON() ([]byte, error) {
  817. type NoMethod CreateVersionMetadataV1
  818. raw := NoMethod(*s)
  819. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  820. }
  821. // CreateVersionMetadataV1Alpha: Metadata for the given
  822. // google.longrunning.Operation during a
  823. // google.appengine.v1alpha.CreateVersionRequest.
  824. type CreateVersionMetadataV1Alpha 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 *CreateVersionMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  844. type NoMethod CreateVersionMetadataV1Alpha
  845. raw := NoMethod(*s)
  846. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  847. }
  848. // CreateVersionMetadataV1Beta: Metadata for the given
  849. // google.longrunning.Operation during a
  850. // google.appengine.v1beta.CreateVersionRequest.
  851. type CreateVersionMetadataV1Beta 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 *CreateVersionMetadataV1Beta) MarshalJSON() ([]byte, error) {
  871. type NoMethod CreateVersionMetadataV1Beta
  872. raw := NoMethod(*s)
  873. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  874. }
  875. // DebugInstanceRequest: Request message for Instances.DebugInstance.
  876. type DebugInstanceRequest struct {
  877. // SshKey: Public SSH key to add to the instance.
  878. // Examples:
  879. // [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]
  880. // [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh
  881. // {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more
  882. // information, see Adding and Removing SSH Keys
  883. // (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-k
  884. // eys).
  885. SshKey string `json:"sshKey,omitempty"`
  886. // ForceSendFields is a list of field names (e.g. "SshKey") to
  887. // unconditionally include in API requests. By default, fields with
  888. // empty values are omitted from API requests. However, any non-pointer,
  889. // non-interface field appearing in ForceSendFields will be sent to the
  890. // server regardless of whether the field is empty or not. This may be
  891. // used to include empty fields in Patch requests.
  892. ForceSendFields []string `json:"-"`
  893. // NullFields is a list of field names (e.g. "SshKey") to include in API
  894. // requests with the JSON null value. By default, fields with empty
  895. // values are omitted from API requests. However, any field with an
  896. // empty value appearing in NullFields will be sent to the server as
  897. // null. It is an error if a field in this list has a non-empty value.
  898. // This may be used to include null fields in Patch requests.
  899. NullFields []string `json:"-"`
  900. }
  901. func (s *DebugInstanceRequest) MarshalJSON() ([]byte, error) {
  902. type NoMethod DebugInstanceRequest
  903. raw := NoMethod(*s)
  904. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  905. }
  906. // Deployment: Code and application artifacts used to deploy a version
  907. // to App Engine.
  908. type Deployment struct {
  909. // CloudBuildOptions: Options for any Google Cloud Build builds created
  910. // as a part of this deployment.These options will only be used if a new
  911. // build is created, such as when deploying to the App Engine flexible
  912. // environment using files or zip.
  913. CloudBuildOptions *CloudBuildOptions `json:"cloudBuildOptions,omitempty"`
  914. // Container: The Docker image for the container that runs the version.
  915. // Only applicable for instances running in the App Engine flexible
  916. // environment.
  917. Container *ContainerInfo `json:"container,omitempty"`
  918. // Files: Manifest of the files stored in Google Cloud Storage that are
  919. // included as part of this version. All files must be readable using
  920. // the credentials supplied with this call.
  921. Files map[string]FileInfo `json:"files,omitempty"`
  922. // Zip: The zip file for this deployment, if this is a zip deployment.
  923. Zip *ZipInfo `json:"zip,omitempty"`
  924. // ForceSendFields is a list of field names (e.g. "CloudBuildOptions")
  925. // to unconditionally include in API requests. By default, fields with
  926. // empty values are omitted from API requests. However, any non-pointer,
  927. // non-interface field appearing in ForceSendFields will be sent to the
  928. // server regardless of whether the field is empty or not. This may be
  929. // used to include empty fields in Patch requests.
  930. ForceSendFields []string `json:"-"`
  931. // NullFields is a list of field names (e.g. "CloudBuildOptions") to
  932. // include in API requests with the JSON null value. By default, fields
  933. // with empty values are omitted from API requests. However, any field
  934. // with an empty value appearing in NullFields will be sent to the
  935. // server as null. It is an error if a field in this list has a
  936. // non-empty value. This may be used to include null fields in Patch
  937. // requests.
  938. NullFields []string `json:"-"`
  939. }
  940. func (s *Deployment) MarshalJSON() ([]byte, error) {
  941. type NoMethod Deployment
  942. raw := NoMethod(*s)
  943. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  944. }
  945. // DiskUtilization: Target scaling by disk usage. Only applicable in the
  946. // App Engine flexible environment.
  947. type DiskUtilization struct {
  948. // TargetReadBytesPerSecond: Target bytes read per second.
  949. TargetReadBytesPerSecond int64 `json:"targetReadBytesPerSecond,omitempty"`
  950. // TargetReadOpsPerSecond: Target ops read per seconds.
  951. TargetReadOpsPerSecond int64 `json:"targetReadOpsPerSecond,omitempty"`
  952. // TargetWriteBytesPerSecond: Target bytes written per second.
  953. TargetWriteBytesPerSecond int64 `json:"targetWriteBytesPerSecond,omitempty"`
  954. // TargetWriteOpsPerSecond: Target ops written per second.
  955. TargetWriteOpsPerSecond int64 `json:"targetWriteOpsPerSecond,omitempty"`
  956. // ForceSendFields is a list of field names (e.g.
  957. // "TargetReadBytesPerSecond") to unconditionally include in API
  958. // requests. By default, fields with empty values are omitted from API
  959. // requests. However, any non-pointer, non-interface field appearing in
  960. // ForceSendFields will be sent to the server regardless of whether the
  961. // field is empty or not. This may be used to include empty fields in
  962. // Patch requests.
  963. ForceSendFields []string `json:"-"`
  964. // NullFields is a list of field names (e.g. "TargetReadBytesPerSecond")
  965. // to include in API requests with the JSON null value. By default,
  966. // fields with empty values are omitted from API requests. However, any
  967. // field with an empty value appearing in NullFields will be sent to the
  968. // server as null. It is an error if a field in this list has a
  969. // non-empty value. This may be used to include null fields in Patch
  970. // requests.
  971. NullFields []string `json:"-"`
  972. }
  973. func (s *DiskUtilization) MarshalJSON() ([]byte, error) {
  974. type NoMethod DiskUtilization
  975. raw := NoMethod(*s)
  976. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  977. }
  978. // DomainMapping: A domain serving an App Engine application.
  979. type DomainMapping struct {
  980. // Id: Relative name of the domain serving the application. Example:
  981. // example.com.
  982. Id string `json:"id,omitempty"`
  983. // Name: Full path to the DomainMapping resource in the API. Example:
  984. // apps/myapp/domainMapping/example.com.@OutputOnly
  985. Name string `json:"name,omitempty"`
  986. // ResourceRecords: The resource records required to configure this
  987. // domain mapping. These records must be added to the domain's DNS
  988. // configuration in order to serve the application via this domain
  989. // mapping.@OutputOnly
  990. ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"`
  991. // SslSettings: SSL configuration for this domain. If unconfigured, this
  992. // domain will not serve with SSL.
  993. SslSettings *SslSettings `json:"sslSettings,omitempty"`
  994. // ServerResponse contains the HTTP response code and headers from the
  995. // server.
  996. googleapi.ServerResponse `json:"-"`
  997. // ForceSendFields is a list of field names (e.g. "Id") to
  998. // unconditionally include in API requests. By default, fields with
  999. // empty values are omitted from API requests. However, any non-pointer,
  1000. // non-interface field appearing in ForceSendFields will be sent to the
  1001. // server regardless of whether the field is empty or not. This may be
  1002. // used to include empty fields in Patch requests.
  1003. ForceSendFields []string `json:"-"`
  1004. // NullFields is a list of field names (e.g. "Id") to include in API
  1005. // requests with the JSON null value. By default, fields with empty
  1006. // values are omitted from API requests. However, any field with an
  1007. // empty value appearing in NullFields will be sent to the server as
  1008. // null. It is an error if a field in this list has a non-empty value.
  1009. // This may be used to include null fields in Patch requests.
  1010. NullFields []string `json:"-"`
  1011. }
  1012. func (s *DomainMapping) MarshalJSON() ([]byte, error) {
  1013. type NoMethod DomainMapping
  1014. raw := NoMethod(*s)
  1015. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1016. }
  1017. // Empty: A generic empty message that you can re-use to avoid defining
  1018. // duplicated empty messages in your APIs. A typical example is to use
  1019. // it as the request or the response type of an API method. For
  1020. // instance:
  1021. // service Foo {
  1022. // rpc Bar(google.protobuf.Empty) returns
  1023. // (google.protobuf.Empty);
  1024. // }
  1025. // The JSON representation for Empty is empty JSON object {}.
  1026. type Empty struct {
  1027. // ServerResponse contains the HTTP response code and headers from the
  1028. // server.
  1029. googleapi.ServerResponse `json:"-"`
  1030. }
  1031. // EndpointsApiService: Cloud Endpoints
  1032. // (https://cloud.google.com/endpoints) configuration. The Endpoints API
  1033. // Service provides tooling for serving Open API and gRPC endpoints via
  1034. // an NGINX proxy. Only valid for App Engine Flexible environment
  1035. // deployments.The fields here refer to the name and configuration ID of
  1036. // a "service" resource in the Service Management API
  1037. // (https://cloud.google.com/service-management/overview).
  1038. type EndpointsApiService struct {
  1039. // ConfigId: Endpoints service configuration ID as specified by the
  1040. // Service Management API. For example "2016-09-19r1".By default, the
  1041. // rollout strategy for Endpoints is RolloutStrategy.FIXED. This means
  1042. // that Endpoints starts up with a particular configuration ID. When a
  1043. // new configuration is rolled out, Endpoints must be given the new
  1044. // configuration ID. The config_id field is used to give the
  1045. // configuration ID and is required in this case.Endpoints also has a
  1046. // rollout strategy called RolloutStrategy.MANAGED. When using this,
  1047. // Endpoints fetches the latest configuration and does not need the
  1048. // configuration ID. In this case, config_id must be omitted.
  1049. ConfigId string `json:"configId,omitempty"`
  1050. // DisableTraceSampling: Enable or disable trace sampling. By default,
  1051. // this is set to false for enabled.
  1052. DisableTraceSampling bool `json:"disableTraceSampling,omitempty"`
  1053. // Name: Endpoints service name which is the name of the "service"
  1054. // resource in the Service Management API. For example
  1055. // "myapi.endpoints.myproject.cloud.goog"
  1056. Name string `json:"name,omitempty"`
  1057. // RolloutStrategy: Endpoints rollout strategy. If FIXED, config_id must
  1058. // be specified. If MANAGED, config_id must be omitted.
  1059. //
  1060. // Possible values:
  1061. // "UNSPECIFIED_ROLLOUT_STRATEGY" - Not specified. Defaults to FIXED.
  1062. // "FIXED" - Endpoints service configuration ID will be fixed to the
  1063. // configuration ID specified by config_id.
  1064. // "MANAGED" - Endpoints service configuration ID will be updated with
  1065. // each rollout.
  1066. RolloutStrategy string `json:"rolloutStrategy,omitempty"`
  1067. // ForceSendFields is a list of field names (e.g. "ConfigId") to
  1068. // unconditionally include in API requests. By default, fields with
  1069. // empty values are omitted from API requests. However, any non-pointer,
  1070. // non-interface field appearing in ForceSendFields will be sent to the
  1071. // server regardless of whether the field is empty or not. This may be
  1072. // used to include empty fields in Patch requests.
  1073. ForceSendFields []string `json:"-"`
  1074. // NullFields is a list of field names (e.g. "ConfigId") to include in
  1075. // API requests with the JSON null value. By default, fields with empty
  1076. // values are omitted from API requests. However, any field with an
  1077. // empty value appearing in NullFields will be sent to the server as
  1078. // null. It is an error if a field in this list has a non-empty value.
  1079. // This may be used to include null fields in Patch requests.
  1080. NullFields []string `json:"-"`
  1081. }
  1082. func (s *EndpointsApiService) MarshalJSON() ([]byte, error) {
  1083. type NoMethod EndpointsApiService
  1084. raw := NoMethod(*s)
  1085. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1086. }
  1087. // Entrypoint: The entrypoint for the application.
  1088. type Entrypoint struct {
  1089. // Shell: The format should be a shell command that can be fed to bash
  1090. // -c.
  1091. Shell string `json:"shell,omitempty"`
  1092. // ForceSendFields is a list of field names (e.g. "Shell") to
  1093. // unconditionally include in API requests. By default, fields with
  1094. // empty values are omitted from API requests. However, any non-pointer,
  1095. // non-interface field appearing in ForceSendFields will be sent to the
  1096. // server regardless of whether the field is empty or not. This may be
  1097. // used to include empty fields in Patch requests.
  1098. ForceSendFields []string `json:"-"`
  1099. // NullFields is a list of field names (e.g. "Shell") to include in API
  1100. // requests with the JSON null value. By default, fields with empty
  1101. // values are omitted from API requests. However, any field with an
  1102. // empty value appearing in NullFields will be sent to the server as
  1103. // null. It is an error if a field in this list has a non-empty value.
  1104. // This may be used to include null fields in Patch requests.
  1105. NullFields []string `json:"-"`
  1106. }
  1107. func (s *Entrypoint) MarshalJSON() ([]byte, error) {
  1108. type NoMethod Entrypoint
  1109. raw := NoMethod(*s)
  1110. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1111. }
  1112. // ErrorHandler: Custom static error page to be served when an error
  1113. // occurs.
  1114. type ErrorHandler struct {
  1115. // ErrorCode: Error condition this handler applies to.
  1116. //
  1117. // Possible values:
  1118. // "ERROR_CODE_UNSPECIFIED" - Not specified. ERROR_CODE_DEFAULT is
  1119. // assumed.
  1120. // "ERROR_CODE_DEFAULT" - All other error types.
  1121. // "ERROR_CODE_OVER_QUOTA" - Application has exceeded a resource
  1122. // quota.
  1123. // "ERROR_CODE_DOS_API_DENIAL" - Client blocked by the application's
  1124. // Denial of Service protection configuration.
  1125. // "ERROR_CODE_TIMEOUT" - Deadline reached before the application
  1126. // responds.
  1127. ErrorCode string `json:"errorCode,omitempty"`
  1128. // MimeType: MIME type of file. Defaults to text/html.
  1129. MimeType string `json:"mimeType,omitempty"`
  1130. // StaticFile: Static file content to be served for this error.
  1131. StaticFile string `json:"staticFile,omitempty"`
  1132. // ForceSendFields is a list of field names (e.g. "ErrorCode") to
  1133. // unconditionally include in API requests. By default, fields with
  1134. // empty values are omitted from API requests. However, any non-pointer,
  1135. // non-interface field appearing in ForceSendFields will be sent to the
  1136. // server regardless of whether the field is empty or not. This may be
  1137. // used to include empty fields in Patch requests.
  1138. ForceSendFields []string `json:"-"`
  1139. // NullFields is a list of field names (e.g. "ErrorCode") to include in
  1140. // API requests with the JSON null value. By default, fields with empty
  1141. // values are omitted from API requests. However, any field with an
  1142. // empty value appearing in NullFields will be sent to the server as
  1143. // null. It is an error if a field in this list has a non-empty value.
  1144. // This may be used to include null fields in Patch requests.
  1145. NullFields []string `json:"-"`
  1146. }
  1147. func (s *ErrorHandler) MarshalJSON() ([]byte, error) {
  1148. type NoMethod ErrorHandler
  1149. raw := NoMethod(*s)
  1150. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1151. }
  1152. // FeatureSettings: The feature specific settings to be used in the
  1153. // application. These define behaviors that are user configurable.
  1154. type FeatureSettings struct {
  1155. // SplitHealthChecks: Boolean value indicating if split health checks
  1156. // should be used instead of the legacy health checks. At an app.yaml
  1157. // level, this means defaulting to 'readiness_check' and
  1158. // 'liveness_check' values instead of 'health_check' ones. Once the
  1159. // legacy 'health_check' behavior is deprecated, and this value is
  1160. // always true, this setting can be removed.
  1161. SplitHealthChecks bool `json:"splitHealthChecks,omitempty"`
  1162. // ForceSendFields is a list of field names (e.g. "SplitHealthChecks")
  1163. // to unconditionally include in API requests. By default, fields with
  1164. // empty values are omitted from API requests. However, any non-pointer,
  1165. // non-interface field appearing in ForceSendFields will be sent to the
  1166. // server regardless of whether the field is empty or not. This may be
  1167. // used to include empty fields in Patch requests.
  1168. ForceSendFields []string `json:"-"`
  1169. // NullFields is a list of field names (e.g. "SplitHealthChecks") to
  1170. // include in API requests with the JSON null value. By default, fields
  1171. // with empty values are omitted from API requests. However, any field
  1172. // with an empty value appearing in NullFields will be sent to the
  1173. // server as null. It is an error if a field in this list has a
  1174. // non-empty value. This may be used to include null fields in Patch
  1175. // requests.
  1176. NullFields []string `json:"-"`
  1177. }
  1178. func (s *FeatureSettings) MarshalJSON() ([]byte, error) {
  1179. type NoMethod FeatureSettings
  1180. raw := NoMethod(*s)
  1181. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1182. }
  1183. // FileInfo: Single source file that is part of the version to be
  1184. // deployed. Each source file that is deployed must be specified
  1185. // separately.
  1186. type FileInfo struct {
  1187. // MimeType: The MIME type of the file.Defaults to the value from Google
  1188. // Cloud Storage.
  1189. MimeType string `json:"mimeType,omitempty"`
  1190. // Sha1Sum: The SHA1 hash of the file, in hex.
  1191. Sha1Sum string `json:"sha1Sum,omitempty"`
  1192. // SourceUrl: URL source to use to fetch this file. Must be a URL to a
  1193. // resource in Google Cloud Storage in the form
  1194. // 'http(s)://storage.googleapis.com/<bucket>/<object>'.
  1195. SourceUrl string `json:"sourceUrl,omitempty"`
  1196. // ForceSendFields is a list of field names (e.g. "MimeType") to
  1197. // unconditionally include in API requests. By default, fields with
  1198. // empty values are omitted from API requests. However, any non-pointer,
  1199. // non-interface field appearing in ForceSendFields will be sent to the
  1200. // server regardless of whether the field is empty or not. This may be
  1201. // used to include empty fields in Patch requests.
  1202. ForceSendFields []string `json:"-"`
  1203. // NullFields is a list of field names (e.g. "MimeType") to include in
  1204. // API requests with the JSON null value. By default, fields with empty
  1205. // values are omitted from API requests. However, any field with an
  1206. // empty value appearing in NullFields will be sent to the server as
  1207. // null. It is an error if a field in this list has a non-empty value.
  1208. // This may be used to include null fields in Patch requests.
  1209. NullFields []string `json:"-"`
  1210. }
  1211. func (s *FileInfo) MarshalJSON() ([]byte, error) {
  1212. type NoMethod FileInfo
  1213. raw := NoMethod(*s)
  1214. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1215. }
  1216. // FirewallRule: A single firewall rule that is evaluated against
  1217. // incoming traffic and provides an action to take on matched requests.
  1218. type FirewallRule struct {
  1219. // Action: The action to take on matched requests.
  1220. //
  1221. // Possible values:
  1222. // "UNSPECIFIED_ACTION"
  1223. // "ALLOW" - Matching requests are allowed.
  1224. // "DENY" - Matching requests are denied.
  1225. Action string `json:"action,omitempty"`
  1226. // Description: An optional string description of this rule. This field
  1227. // has a maximum length of 100 characters.
  1228. Description string `json:"description,omitempty"`
  1229. // Priority: A positive integer between 1, Int32.MaxValue-1 that defines
  1230. // the order of rule evaluation. Rules with the lowest priority are
  1231. // evaluated first.A default rule at priority Int32.MaxValue matches all
  1232. // IPv4 and IPv6 traffic when no previous rule matches. Only the action
  1233. // of this rule can be modified by the user.
  1234. Priority int64 `json:"priority,omitempty"`
  1235. // SourceRange: IP address or range, defined using CIDR notation, of
  1236. // requests that this rule applies to. You can use the wildcard
  1237. // character "*" to match all IPs equivalent to "0/0" and "::/0"
  1238. // together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32
  1239. // or 2001:0db8:0000:0042:0000:8a2e:0370:7334.<p>Truncation will be
  1240. // silently performed on addresses which are not properly truncated. For
  1241. // example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24.
  1242. // Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address
  1243. // as 2001:db8::/32.
  1244. SourceRange string `json:"sourceRange,omitempty"`
  1245. // ServerResponse contains the HTTP response code and headers from the
  1246. // server.
  1247. googleapi.ServerResponse `json:"-"`
  1248. // ForceSendFields is a list of field names (e.g. "Action") to
  1249. // unconditionally include in API requests. By default, fields with
  1250. // empty values are omitted from API requests. However, any non-pointer,
  1251. // non-interface field appearing in ForceSendFields will be sent to the
  1252. // server regardless of whether the field is empty or not. This may be
  1253. // used to include empty fields in Patch requests.
  1254. ForceSendFields []string `json:"-"`
  1255. // NullFields is a list of field names (e.g. "Action") to include in API
  1256. // requests with the JSON null value. By default, fields with empty
  1257. // values are omitted from API requests. However, any field with an
  1258. // empty value appearing in NullFields will be sent to the server as
  1259. // null. It is an error if a field in this list has a non-empty value.
  1260. // This may be used to include null fields in Patch requests.
  1261. NullFields []string `json:"-"`
  1262. }
  1263. func (s *FirewallRule) MarshalJSON() ([]byte, error) {
  1264. type NoMethod FirewallRule
  1265. raw := NoMethod(*s)
  1266. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1267. }
  1268. // HealthCheck: Health checking configuration for VM instances.
  1269. // Unhealthy instances are killed and replaced with new instances. Only
  1270. // applicable for instances in App Engine flexible environment.
  1271. type HealthCheck struct {
  1272. // CheckInterval: Interval between health checks.
  1273. CheckInterval string `json:"checkInterval,omitempty"`
  1274. // DisableHealthCheck: Whether to explicitly disable health checks for
  1275. // this instance.
  1276. DisableHealthCheck bool `json:"disableHealthCheck,omitempty"`
  1277. // HealthyThreshold: Number of consecutive successful health checks
  1278. // required before receiving traffic.
  1279. HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
  1280. // Host: Host header to send when performing an HTTP health check.
  1281. // Example: "myapp.appspot.com"
  1282. Host string `json:"host,omitempty"`
  1283. // RestartThreshold: Number of consecutive failed health checks required
  1284. // before an instance is restarted.
  1285. RestartThreshold int64 `json:"restartThreshold,omitempty"`
  1286. // Timeout: Time before the health check is considered failed.
  1287. Timeout string `json:"timeout,omitempty"`
  1288. // UnhealthyThreshold: Number of consecutive failed health checks
  1289. // required before removing traffic.
  1290. UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
  1291. // ForceSendFields is a list of field names (e.g. "CheckInterval") to
  1292. // unconditionally include in API requests. By default, fields with
  1293. // empty values are omitted from API requests. However, any non-pointer,
  1294. // non-interface field appearing in ForceSendFields will be sent to the
  1295. // server regardless of whether the field is empty or not. This may be
  1296. // used to include empty fields in Patch requests.
  1297. ForceSendFields []string `json:"-"`
  1298. // NullFields is a list of field names (e.g. "CheckInterval") to include
  1299. // in API requests with the JSON null value. By default, fields with
  1300. // empty values are omitted from API requests. However, any field with
  1301. // an empty value appearing in NullFields will be sent to the server as
  1302. // null. It is an error if a field in this list has a non-empty value.
  1303. // This may be used to include null fields in Patch requests.
  1304. NullFields []string `json:"-"`
  1305. }
  1306. func (s *HealthCheck) MarshalJSON() ([]byte, error) {
  1307. type NoMethod HealthCheck
  1308. raw := NoMethod(*s)
  1309. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1310. }
  1311. // IdentityAwareProxy: Identity-Aware Proxy
  1312. type IdentityAwareProxy struct {
  1313. // Enabled: Whether the serving infrastructure will authenticate and
  1314. // authorize all incoming requests.If true, the oauth2_client_id and
  1315. // oauth2_client_secret fields must be non-empty.
  1316. Enabled bool `json:"enabled,omitempty"`
  1317. // Oauth2ClientId: OAuth2 client ID to use for the authentication flow.
  1318. Oauth2ClientId string `json:"oauth2ClientId,omitempty"`
  1319. // Oauth2ClientSecret: OAuth2 client secret to use for the
  1320. // authentication flow.For security reasons, this value cannot be
  1321. // retrieved via the API. Instead, the SHA-256 hash of the value is
  1322. // returned in the oauth2_client_secret_sha256 field.@InputOnly
  1323. Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"`
  1324. // Oauth2ClientSecretSha256: Hex-encoded SHA-256 hash of the client
  1325. // secret.@OutputOnly
  1326. Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"`
  1327. // ForceSendFields is a list of field names (e.g. "Enabled") to
  1328. // unconditionally include in API requests. By default, fields with
  1329. // empty values are omitted from API requests. However, any non-pointer,
  1330. // non-interface field appearing in ForceSendFields will be sent to the
  1331. // server regardless of whether the field is empty or not. This may be
  1332. // used to include empty fields in Patch requests.
  1333. ForceSendFields []string `json:"-"`
  1334. // NullFields is a list of field names (e.g. "Enabled") to include in
  1335. // API requests with the JSON null value. By default, fields with empty
  1336. // values are omitted from API requests. However, any field with an
  1337. // empty value appearing in NullFields will be sent to the server as
  1338. // null. It is an error if a field in this list has a non-empty value.
  1339. // This may be used to include null fields in Patch requests.
  1340. NullFields []string `json:"-"`
  1341. }
  1342. func (s *IdentityAwareProxy) MarshalJSON() ([]byte, error) {
  1343. type NoMethod IdentityAwareProxy
  1344. raw := NoMethod(*s)
  1345. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1346. }
  1347. // Instance: An Instance resource is the computing unit that App Engine
  1348. // uses to automatically scale an application.
  1349. type Instance struct {
  1350. // AppEngineRelease: App Engine release this instance is running
  1351. // on.@OutputOnly
  1352. AppEngineRelease string `json:"appEngineRelease,omitempty"`
  1353. // Availability: Availability of the instance.@OutputOnly
  1354. //
  1355. // Possible values:
  1356. // "UNSPECIFIED"
  1357. // "RESIDENT"
  1358. // "DYNAMIC"
  1359. Availability string `json:"availability,omitempty"`
  1360. // AverageLatency: Average latency (ms) over the last minute.@OutputOnly
  1361. AverageLatency int64 `json:"averageLatency,omitempty"`
  1362. // Errors: Number of errors since this instance was started.@OutputOnly
  1363. Errors int64 `json:"errors,omitempty"`
  1364. // Id: Relative name of the instance within the version. Example:
  1365. // instance-1.@OutputOnly
  1366. Id string `json:"id,omitempty"`
  1367. // MemoryUsage: Total memory in use (bytes).@OutputOnly
  1368. MemoryUsage int64 `json:"memoryUsage,omitempty,string"`
  1369. // Name: Full path to the Instance resource in the API. Example:
  1370. // apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOn
  1371. // ly
  1372. Name string `json:"name,omitempty"`
  1373. // Qps: Average queries per second (QPS) over the last
  1374. // minute.@OutputOnly
  1375. Qps float64 `json:"qps,omitempty"`
  1376. // Requests: Number of requests since this instance was
  1377. // started.@OutputOnly
  1378. Requests int64 `json:"requests,omitempty"`
  1379. // StartTime: Time that this instance was started.@OutputOnly
  1380. StartTime string `json:"startTime,omitempty"`
  1381. // VmDebugEnabled: Whether this instance is in debug mode. Only
  1382. // applicable for instances in App Engine flexible
  1383. // environment.@OutputOnly
  1384. VmDebugEnabled bool `json:"vmDebugEnabled,omitempty"`
  1385. // VmId: Virtual machine ID of this instance. Only applicable for
  1386. // instances in App Engine flexible environment.@OutputOnly
  1387. VmId string `json:"vmId,omitempty"`
  1388. // VmIp: The IP address of this instance. Only applicable for instances
  1389. // in App Engine flexible environment.@OutputOnly
  1390. VmIp string `json:"vmIp,omitempty"`
  1391. // VmName: Name of the virtual machine where this instance lives. Only
  1392. // applicable for instances in App Engine flexible
  1393. // environment.@OutputOnly
  1394. VmName string `json:"vmName,omitempty"`
  1395. // VmStatus: Status of the virtual machine where this instance lives.
  1396. // Only applicable for instances in App Engine flexible
  1397. // environment.@OutputOnly
  1398. VmStatus string `json:"vmStatus,omitempty"`
  1399. // VmZoneName: Zone where the virtual machine is located. Only
  1400. // applicable for instances in App Engine flexible
  1401. // environment.@OutputOnly
  1402. VmZoneName string `json:"vmZoneName,omitempty"`
  1403. // ServerResponse contains the HTTP response code and headers from the
  1404. // server.
  1405. googleapi.ServerResponse `json:"-"`
  1406. // ForceSendFields is a list of field names (e.g. "AppEngineRelease") to
  1407. // unconditionally include in API requests. By default, fields with
  1408. // empty values are omitted from API requests. However, any non-pointer,
  1409. // non-interface field appearing in ForceSendFields will be sent to the
  1410. // server regardless of whether the field is empty or not. This may be
  1411. // used to include empty fields in Patch requests.
  1412. ForceSendFields []string `json:"-"`
  1413. // NullFields is a list of field names (e.g. "AppEngineRelease") to
  1414. // include in API requests with the JSON null value. By default, fields
  1415. // with empty values are omitted from API requests. However, any field
  1416. // with an empty value appearing in NullFields will be sent to the
  1417. // server as null. It is an error if a field in this list has a
  1418. // non-empty value. This may be used to include null fields in Patch
  1419. // requests.
  1420. NullFields []string `json:"-"`
  1421. }
  1422. func (s *Instance) MarshalJSON() ([]byte, error) {
  1423. type NoMethod Instance
  1424. raw := NoMethod(*s)
  1425. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1426. }
  1427. func (s *Instance) UnmarshalJSON(data []byte) error {
  1428. type NoMethod Instance
  1429. var s1 struct {
  1430. Qps gensupport.JSONFloat64 `json:"qps"`
  1431. *NoMethod
  1432. }
  1433. s1.NoMethod = (*NoMethod)(s)
  1434. if err := json.Unmarshal(data, &s1); err != nil {
  1435. return err
  1436. }
  1437. s.Qps = float64(s1.Qps)
  1438. return nil
  1439. }
  1440. // Library: Third-party Python runtime library that is required by the
  1441. // application.
  1442. type Library struct {
  1443. // Name: Name of the library. Example: "django".
  1444. Name string `json:"name,omitempty"`
  1445. // Version: Version of the library to select, or "latest".
  1446. Version string `json:"version,omitempty"`
  1447. // ForceSendFields is a list of field names (e.g. "Name") to
  1448. // unconditionally include in API requests. By default, fields with
  1449. // empty values are omitted from API requests. However, any non-pointer,
  1450. // non-interface field appearing in ForceSendFields will be sent to the
  1451. // server regardless of whether the field is empty or not. This may be
  1452. // used to include empty fields in Patch requests.
  1453. ForceSendFields []string `json:"-"`
  1454. // NullFields is a list of field names (e.g. "Name") to include in API
  1455. // requests with the JSON null value. By default, fields with empty
  1456. // values are omitted from API requests. However, any field with an
  1457. // empty value appearing in NullFields will be sent to the server as
  1458. // null. It is an error if a field in this list has a non-empty value.
  1459. // This may be used to include null fields in Patch requests.
  1460. NullFields []string `json:"-"`
  1461. }
  1462. func (s *Library) MarshalJSON() ([]byte, error) {
  1463. type NoMethod Library
  1464. raw := NoMethod(*s)
  1465. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1466. }
  1467. // ListAuthorizedCertificatesResponse: Response message for
  1468. // AuthorizedCertificates.ListAuthorizedCertificates.
  1469. type ListAuthorizedCertificatesResponse struct {
  1470. // Certificates: The SSL certificates the user is authorized to
  1471. // administer.
  1472. Certificates []*AuthorizedCertificate `json:"certificates,omitempty"`
  1473. // NextPageToken: Continuation token for fetching the next page of
  1474. // results.
  1475. NextPageToken string `json:"nextPageToken,omitempty"`
  1476. // ServerResponse contains the HTTP response code and headers from the
  1477. // server.
  1478. googleapi.ServerResponse `json:"-"`
  1479. // ForceSendFields is a list of field names (e.g. "Certificates") to
  1480. // unconditionally include in API requests. By default, fields with
  1481. // empty values are omitted from API requests. However, any non-pointer,
  1482. // non-interface field appearing in ForceSendFields will be sent to the
  1483. // server regardless of whether the field is empty or not. This may be
  1484. // used to include empty fields in Patch requests.
  1485. ForceSendFields []string `json:"-"`
  1486. // NullFields is a list of field names (e.g. "Certificates") to include
  1487. // in API requests with the JSON null value. By default, fields with
  1488. // empty values are omitted from API requests. However, any field with
  1489. // an empty value appearing in NullFields will be sent to the server as
  1490. // null. It is an error if a field in this list has a non-empty value.
  1491. // This may be used to include null fields in Patch requests.
  1492. NullFields []string `json:"-"`
  1493. }
  1494. func (s *ListAuthorizedCertificatesResponse) MarshalJSON() ([]byte, error) {
  1495. type NoMethod ListAuthorizedCertificatesResponse
  1496. raw := NoMethod(*s)
  1497. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1498. }
  1499. // ListAuthorizedDomainsResponse: Response message for
  1500. // AuthorizedDomains.ListAuthorizedDomains.
  1501. type ListAuthorizedDomainsResponse struct {
  1502. // Domains: The authorized domains belonging to the user.
  1503. Domains []*AuthorizedDomain `json:"domains,omitempty"`
  1504. // NextPageToken: Continuation token for fetching the next page of
  1505. // results.
  1506. NextPageToken string `json:"nextPageToken,omitempty"`
  1507. // ServerResponse contains the HTTP response code and headers from the
  1508. // server.
  1509. googleapi.ServerResponse `json:"-"`
  1510. // ForceSendFields is a list of field names (e.g. "Domains") to
  1511. // unconditionally include in API requests. By default, fields with
  1512. // empty values are omitted from API requests. However, any non-pointer,
  1513. // non-interface field appearing in ForceSendFields will be sent to the
  1514. // server regardless of whether the field is empty or not. This may be
  1515. // used to include empty fields in Patch requests.
  1516. ForceSendFields []string `json:"-"`
  1517. // NullFields is a list of field names (e.g. "Domains") to include in
  1518. // API requests with the JSON null value. By default, fields with empty
  1519. // values are omitted from API requests. However, any field with an
  1520. // empty value appearing in NullFields will be sent to the server as
  1521. // null. It is an error if a field in this list has a non-empty value.
  1522. // This may be used to include null fields in Patch requests.
  1523. NullFields []string `json:"-"`
  1524. }
  1525. func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) {
  1526. type NoMethod ListAuthorizedDomainsResponse
  1527. raw := NoMethod(*s)
  1528. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1529. }
  1530. // ListDomainMappingsResponse: Response message for
  1531. // DomainMappings.ListDomainMappings.
  1532. type ListDomainMappingsResponse struct {
  1533. // DomainMappings: The domain mappings for the application.
  1534. DomainMappings []*DomainMapping `json:"domainMappings,omitempty"`
  1535. // NextPageToken: Continuation token for fetching the next page of
  1536. // results.
  1537. NextPageToken string `json:"nextPageToken,omitempty"`
  1538. // ServerResponse contains the HTTP response code and headers from the
  1539. // server.
  1540. googleapi.ServerResponse `json:"-"`
  1541. // ForceSendFields is a list of field names (e.g. "DomainMappings") to
  1542. // unconditionally include in API requests. By default, fields with
  1543. // empty values are omitted from API requests. However, any non-pointer,
  1544. // non-interface field appearing in ForceSendFields will be sent to the
  1545. // server regardless of whether the field is empty or not. This may be
  1546. // used to include empty fields in Patch requests.
  1547. ForceSendFields []string `json:"-"`
  1548. // NullFields is a list of field names (e.g. "DomainMappings") to
  1549. // include in API requests with the JSON null value. By default, fields
  1550. // with empty values are omitted from API requests. However, any field
  1551. // with an empty value appearing in NullFields will be sent to the
  1552. // server as null. It is an error if a field in this list has a
  1553. // non-empty value. This may be used to include null fields in Patch
  1554. // requests.
  1555. NullFields []string `json:"-"`
  1556. }
  1557. func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) {
  1558. type NoMethod ListDomainMappingsResponse
  1559. raw := NoMethod(*s)
  1560. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1561. }
  1562. // ListIngressRulesResponse: Response message for
  1563. // Firewall.ListIngressRules.
  1564. type ListIngressRulesResponse struct {
  1565. // IngressRules: The ingress FirewallRules for this application.
  1566. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  1567. // NextPageToken: Continuation token for fetching the next page of
  1568. // results.
  1569. NextPageToken string `json:"nextPageToken,omitempty"`
  1570. // ServerResponse contains the HTTP response code and headers from the
  1571. // server.
  1572. googleapi.ServerResponse `json:"-"`
  1573. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  1574. // unconditionally include in API requests. By default, fields with
  1575. // empty values are omitted from API requests. However, any non-pointer,
  1576. // non-interface field appearing in ForceSendFields will be sent to the
  1577. // server regardless of whether the field is empty or not. This may be
  1578. // used to include empty fields in Patch requests.
  1579. ForceSendFields []string `json:"-"`
  1580. // NullFields is a list of field names (e.g. "IngressRules") to include
  1581. // in API requests with the JSON null value. By default, fields with
  1582. // empty values are omitted from API requests. However, any field with
  1583. // an empty value appearing in NullFields will be sent to the server as
  1584. // null. It is an error if a field in this list has a non-empty value.
  1585. // This may be used to include null fields in Patch requests.
  1586. NullFields []string `json:"-"`
  1587. }
  1588. func (s *ListIngressRulesResponse) MarshalJSON() ([]byte, error) {
  1589. type NoMethod ListIngressRulesResponse
  1590. raw := NoMethod(*s)
  1591. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1592. }
  1593. // ListInstancesResponse: Response message for Instances.ListInstances.
  1594. type ListInstancesResponse struct {
  1595. // Instances: The instances belonging to the requested version.
  1596. Instances []*Instance `json:"instances,omitempty"`
  1597. // NextPageToken: Continuation token for fetching the next page of
  1598. // results.
  1599. NextPageToken string `json:"nextPageToken,omitempty"`
  1600. // ServerResponse contains the HTTP response code and headers from the
  1601. // server.
  1602. googleapi.ServerResponse `json:"-"`
  1603. // ForceSendFields is a list of field names (e.g. "Instances") to
  1604. // unconditionally include in API requests. By default, fields with
  1605. // empty values are omitted from API requests. However, any non-pointer,
  1606. // non-interface field appearing in ForceSendFields will be sent to the
  1607. // server regardless of whether the field is empty or not. This may be
  1608. // used to include empty fields in Patch requests.
  1609. ForceSendFields []string `json:"-"`
  1610. // NullFields is a list of field names (e.g. "Instances") to include in
  1611. // API requests with the JSON null value. By default, fields with empty
  1612. // values are omitted from API requests. However, any field with an
  1613. // empty value appearing in NullFields will be sent to the server as
  1614. // null. It is an error if a field in this list has a non-empty value.
  1615. // This may be used to include null fields in Patch requests.
  1616. NullFields []string `json:"-"`
  1617. }
  1618. func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
  1619. type NoMethod ListInstancesResponse
  1620. raw := NoMethod(*s)
  1621. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1622. }
  1623. // ListLocationsResponse: The response message for
  1624. // Locations.ListLocations.
  1625. type ListLocationsResponse struct {
  1626. // Locations: A list of locations that matches the specified filter in
  1627. // the request.
  1628. Locations []*Location `json:"locations,omitempty"`
  1629. // NextPageToken: The standard List next-page token.
  1630. NextPageToken string `json:"nextPageToken,omitempty"`
  1631. // ServerResponse contains the HTTP response code and headers from the
  1632. // server.
  1633. googleapi.ServerResponse `json:"-"`
  1634. // ForceSendFields is a list of field names (e.g. "Locations") to
  1635. // unconditionally include in API requests. By default, fields with
  1636. // empty values are omitted from API requests. However, any non-pointer,
  1637. // non-interface field appearing in ForceSendFields will be sent to the
  1638. // server regardless of whether the field is empty or not. This may be
  1639. // used to include empty fields in Patch requests.
  1640. ForceSendFields []string `json:"-"`
  1641. // NullFields is a list of field names (e.g. "Locations") to include in
  1642. // API requests with the JSON null value. By default, fields with empty
  1643. // values are omitted from API requests. However, any field with an
  1644. // empty value appearing in NullFields will be sent to the server as
  1645. // null. It is an error if a field in this list has a non-empty value.
  1646. // This may be used to include null fields in Patch requests.
  1647. NullFields []string `json:"-"`
  1648. }
  1649. func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1650. type NoMethod ListLocationsResponse
  1651. raw := NoMethod(*s)
  1652. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1653. }
  1654. // ListOperationsResponse: The response message for
  1655. // Operations.ListOperations.
  1656. type ListOperationsResponse struct {
  1657. // NextPageToken: The standard List next-page token.
  1658. NextPageToken string `json:"nextPageToken,omitempty"`
  1659. // Operations: A list of operations that matches the specified filter in
  1660. // the request.
  1661. Operations []*Operation `json:"operations,omitempty"`
  1662. // ServerResponse contains the HTTP response code and headers from the
  1663. // server.
  1664. googleapi.ServerResponse `json:"-"`
  1665. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1666. // unconditionally include in API requests. By default, fields with
  1667. // empty values are omitted from API requests. However, any non-pointer,
  1668. // non-interface field appearing in ForceSendFields will be sent to the
  1669. // server regardless of whether the field is empty or not. This may be
  1670. // used to include empty fields in Patch requests.
  1671. ForceSendFields []string `json:"-"`
  1672. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1673. // in API requests with the JSON null value. By default, fields with
  1674. // empty values are omitted from API requests. However, any field with
  1675. // an empty value appearing in NullFields will be sent to the server as
  1676. // null. It is an error if a field in this list has a non-empty value.
  1677. // This may be used to include null fields in Patch requests.
  1678. NullFields []string `json:"-"`
  1679. }
  1680. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1681. type NoMethod ListOperationsResponse
  1682. raw := NoMethod(*s)
  1683. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1684. }
  1685. // ListServicesResponse: Response message for Services.ListServices.
  1686. type ListServicesResponse struct {
  1687. // NextPageToken: Continuation token for fetching the next page of
  1688. // results.
  1689. NextPageToken string `json:"nextPageToken,omitempty"`
  1690. // Services: The services belonging to the requested application.
  1691. Services []*Service `json:"services,omitempty"`
  1692. // ServerResponse contains the HTTP response code and headers from the
  1693. // server.
  1694. googleapi.ServerResponse `json:"-"`
  1695. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1696. // unconditionally include in API requests. By default, fields with
  1697. // empty values are omitted from API requests. However, any non-pointer,
  1698. // non-interface field appearing in ForceSendFields will be sent to the
  1699. // server regardless of whether the field is empty or not. This may be
  1700. // used to include empty fields in Patch requests.
  1701. ForceSendFields []string `json:"-"`
  1702. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1703. // in API requests with the JSON null value. By default, fields with
  1704. // empty values are omitted from API requests. However, any field with
  1705. // an empty value appearing in NullFields will be sent to the server as
  1706. // null. It is an error if a field in this list has a non-empty value.
  1707. // This may be used to include null fields in Patch requests.
  1708. NullFields []string `json:"-"`
  1709. }
  1710. func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
  1711. type NoMethod ListServicesResponse
  1712. raw := NoMethod(*s)
  1713. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1714. }
  1715. // ListVersionsResponse: Response message for Versions.ListVersions.
  1716. type ListVersionsResponse struct {
  1717. // NextPageToken: Continuation token for fetching the next page of
  1718. // results.
  1719. NextPageToken string `json:"nextPageToken,omitempty"`
  1720. // Versions: The versions belonging to the requested service.
  1721. Versions []*Version `json:"versions,omitempty"`
  1722. // ServerResponse contains the HTTP response code and headers from the
  1723. // server.
  1724. googleapi.ServerResponse `json:"-"`
  1725. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1726. // unconditionally include in API requests. By default, fields with
  1727. // empty values are omitted from API requests. However, any non-pointer,
  1728. // non-interface field appearing in ForceSendFields will be sent to the
  1729. // server regardless of whether the field is empty or not. This may be
  1730. // used to include empty fields in Patch requests.
  1731. ForceSendFields []string `json:"-"`
  1732. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1733. // in API requests with the JSON null value. By default, fields with
  1734. // empty values are omitted from API requests. However, any field with
  1735. // an empty value appearing in NullFields will be sent to the server as
  1736. // null. It is an error if a field in this list has a non-empty value.
  1737. // This may be used to include null fields in Patch requests.
  1738. NullFields []string `json:"-"`
  1739. }
  1740. func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
  1741. type NoMethod ListVersionsResponse
  1742. raw := NoMethod(*s)
  1743. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1744. }
  1745. // LivenessCheck: Health checking configuration for VM instances.
  1746. // Unhealthy instances are killed and replaced with new instances.
  1747. type LivenessCheck struct {
  1748. // CheckInterval: Interval between health checks.
  1749. CheckInterval string `json:"checkInterval,omitempty"`
  1750. // FailureThreshold: Number of consecutive failed checks required before
  1751. // considering the VM unhealthy.
  1752. FailureThreshold int64 `json:"failureThreshold,omitempty"`
  1753. // Host: Host header to send when performing a HTTP Liveness check.
  1754. // Example: "myapp.appspot.com"
  1755. Host string `json:"host,omitempty"`
  1756. // InitialDelay: The initial delay before starting to execute the
  1757. // checks.
  1758. InitialDelay string `json:"initialDelay,omitempty"`
  1759. // Path: The request path.
  1760. Path string `json:"path,omitempty"`
  1761. // SuccessThreshold: Number of consecutive successful checks required
  1762. // before considering the VM healthy.
  1763. SuccessThreshold int64 `json:"successThreshold,omitempty"`
  1764. // Timeout: Time before the check is considered failed.
  1765. Timeout string `json:"timeout,omitempty"`
  1766. // ForceSendFields is a list of field names (e.g. "CheckInterval") to
  1767. // unconditionally include in API requests. By default, fields with
  1768. // empty values are omitted from API requests. However, any non-pointer,
  1769. // non-interface field appearing in ForceSendFields will be sent to the
  1770. // server regardless of whether the field is empty or not. This may be
  1771. // used to include empty fields in Patch requests.
  1772. ForceSendFields []string `json:"-"`
  1773. // NullFields is a list of field names (e.g. "CheckInterval") to include
  1774. // in API requests with the JSON null value. By default, fields with
  1775. // empty values are omitted from API requests. However, any field with
  1776. // an empty value appearing in NullFields will be sent to the server as
  1777. // null. It is an error if a field in this list has a non-empty value.
  1778. // This may be used to include null fields in Patch requests.
  1779. NullFields []string `json:"-"`
  1780. }
  1781. func (s *LivenessCheck) MarshalJSON() ([]byte, error) {
  1782. type NoMethod LivenessCheck
  1783. raw := NoMethod(*s)
  1784. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1785. }
  1786. // Location: A resource that represents Google Cloud Platform location.
  1787. type Location struct {
  1788. // DisplayName: The friendly name for this location, typically a nearby
  1789. // city name. For example, "Tokyo".
  1790. DisplayName string `json:"displayName,omitempty"`
  1791. // Labels: Cross-service attributes for the location. For
  1792. // example
  1793. // {"cloud.googleapis.com/region": "us-east1"}
  1794. //
  1795. Labels map[string]string `json:"labels,omitempty"`
  1796. // LocationId: The canonical id for this location. For example:
  1797. // "us-east1".
  1798. LocationId string `json:"locationId,omitempty"`
  1799. // Metadata: Service-specific metadata. For example the available
  1800. // capacity at the given location.
  1801. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1802. // Name: Resource name for the location, which may vary between
  1803. // implementations. For example:
  1804. // "projects/example-project/locations/us-east1"
  1805. Name string `json:"name,omitempty"`
  1806. // ServerResponse contains the HTTP response code and headers from the
  1807. // server.
  1808. googleapi.ServerResponse `json:"-"`
  1809. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1810. // unconditionally include in API requests. By default, fields with
  1811. // empty values are omitted from API requests. However, any non-pointer,
  1812. // non-interface field appearing in ForceSendFields will be sent to the
  1813. // server regardless of whether the field is empty or not. This may be
  1814. // used to include empty fields in Patch requests.
  1815. ForceSendFields []string `json:"-"`
  1816. // NullFields is a list of field names (e.g. "DisplayName") to include
  1817. // in API requests with the JSON null value. By default, fields with
  1818. // empty values are omitted from API requests. However, any field with
  1819. // an empty value appearing in NullFields will be sent to the server as
  1820. // null. It is an error if a field in this list has a non-empty value.
  1821. // This may be used to include null fields in Patch requests.
  1822. NullFields []string `json:"-"`
  1823. }
  1824. func (s *Location) MarshalJSON() ([]byte, error) {
  1825. type NoMethod Location
  1826. raw := NoMethod(*s)
  1827. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1828. }
  1829. // LocationMetadata: Metadata for the given
  1830. // google.cloud.location.Location.
  1831. type LocationMetadata struct {
  1832. // FlexibleEnvironmentAvailable: App Engine flexible environment is
  1833. // available in the given location.@OutputOnly
  1834. FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"`
  1835. // StandardEnvironmentAvailable: App Engine standard environment is
  1836. // available in the given location.@OutputOnly
  1837. StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"`
  1838. // ForceSendFields is a list of field names (e.g.
  1839. // "FlexibleEnvironmentAvailable") to unconditionally include in API
  1840. // requests. By default, fields with empty values are omitted from API
  1841. // requests. However, any non-pointer, non-interface field appearing in
  1842. // ForceSendFields will be sent to the server regardless of whether the
  1843. // field is empty or not. This may be used to include empty fields in
  1844. // Patch requests.
  1845. ForceSendFields []string `json:"-"`
  1846. // NullFields is a list of field names (e.g.
  1847. // "FlexibleEnvironmentAvailable") to include in API requests with the
  1848. // JSON null value. By default, fields with empty values are omitted
  1849. // from API requests. However, any field with an empty value appearing
  1850. // in NullFields will be sent to the server as null. It is an error if a
  1851. // field in this list has a non-empty value. This may be used to include
  1852. // null fields in Patch requests.
  1853. NullFields []string `json:"-"`
  1854. }
  1855. func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
  1856. type NoMethod LocationMetadata
  1857. raw := NoMethod(*s)
  1858. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1859. }
  1860. // ManagedCertificate: A certificate managed by App Engine.
  1861. type ManagedCertificate struct {
  1862. // LastRenewalTime: Time at which the certificate was last renewed. The
  1863. // renewal process is fully managed. Certificate renewal will
  1864. // automatically occur before the certificate expires. Renewal errors
  1865. // can be tracked via ManagementStatus.@OutputOnly
  1866. LastRenewalTime string `json:"lastRenewalTime,omitempty"`
  1867. // Status: Status of certificate management. Refers to the most recent
  1868. // certificate acquisition or renewal attempt.@OutputOnly
  1869. //
  1870. // Possible values:
  1871. // "MANAGEMENT_STATUS_UNSPECIFIED"
  1872. // "OK" - Certificate was successfully obtained and inserted into the
  1873. // serving system.
  1874. // "PENDING" - Certificate is under active attempts to acquire or
  1875. // renew.
  1876. // "FAILED_RETRYING_NOT_VISIBLE" - Most recent renewal failed due to
  1877. // an invalid DNS setup and will be retried. Renewal attempts will
  1878. // continue to fail until the certificate domain's DNS configuration is
  1879. // fixed. The last successfully provisioned certificate may still be
  1880. // serving.
  1881. // "FAILED_PERMANENT" - All renewal attempts have been exhausted,
  1882. // likely due to an invalid DNS setup.
  1883. // "FAILED_RETRYING_CAA_FORBIDDEN" - Most recent renewal failed due to
  1884. // an explicit CAA record that does not include the in-use CA, Let's
  1885. // Encrypt. Renewals will continue to fail until the CAA is
  1886. // reconfigured. The last successfully provisioned certificate may still
  1887. // be serving.
  1888. // "FAILED_RETRYING_CAA_CHECKING" - Most recent renewal failed due to
  1889. // a CAA retrieval failure. This means that the domain's DNS provider
  1890. // does not properly handle CAA records, failing requests for CAA
  1891. // records when no CAA records are defined. Renewals will continue to
  1892. // fail until the DNS provider is changed or a CAA record is added for
  1893. // the given domain. The last successfully provisioned certificate may
  1894. // still be serving.
  1895. Status string `json:"status,omitempty"`
  1896. // ForceSendFields is a list of field names (e.g. "LastRenewalTime") to
  1897. // unconditionally include in API requests. By default, fields with
  1898. // empty values are omitted from API requests. However, any non-pointer,
  1899. // non-interface field appearing in ForceSendFields will be sent to the
  1900. // server regardless of whether the field is empty or not. This may be
  1901. // used to include empty fields in Patch requests.
  1902. ForceSendFields []string `json:"-"`
  1903. // NullFields is a list of field names (e.g. "LastRenewalTime") to
  1904. // include in API requests with the JSON null value. By default, fields
  1905. // with empty values are omitted from API requests. However, any field
  1906. // with an empty value appearing in NullFields will be sent to the
  1907. // server as null. It is an error if a field in this list has a
  1908. // non-empty value. This may be used to include null fields in Patch
  1909. // requests.
  1910. NullFields []string `json:"-"`
  1911. }
  1912. func (s *ManagedCertificate) MarshalJSON() ([]byte, error) {
  1913. type NoMethod ManagedCertificate
  1914. raw := NoMethod(*s)
  1915. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1916. }
  1917. // ManualScaling: A service with manual scaling runs continuously,
  1918. // allowing you to perform complex initialization and rely on the state
  1919. // of its memory over time.
  1920. type ManualScaling struct {
  1921. // Instances: Number of instances to assign to the service at the start.
  1922. // This number can later be altered by using the Modules API
  1923. // (https://cloud.google.com/appengine/docs/python/modules/functions)
  1924. // set_num_instances() function.
  1925. Instances int64 `json:"instances,omitempty"`
  1926. // ForceSendFields is a list of field names (e.g. "Instances") to
  1927. // unconditionally include in API requests. By default, fields with
  1928. // empty values are omitted from API requests. However, any non-pointer,
  1929. // non-interface field appearing in ForceSendFields will be sent to the
  1930. // server regardless of whether the field is empty or not. This may be
  1931. // used to include empty fields in Patch requests.
  1932. ForceSendFields []string `json:"-"`
  1933. // NullFields is a list of field names (e.g. "Instances") to include in
  1934. // API requests with the JSON null value. By default, fields with empty
  1935. // values are omitted from API requests. However, any field with an
  1936. // empty value appearing in NullFields will be sent to the server as
  1937. // null. It is an error if a field in this list has a non-empty value.
  1938. // This may be used to include null fields in Patch requests.
  1939. NullFields []string `json:"-"`
  1940. }
  1941. func (s *ManualScaling) MarshalJSON() ([]byte, error) {
  1942. type NoMethod ManualScaling
  1943. raw := NoMethod(*s)
  1944. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1945. }
  1946. // Network: Extra network settings. Only applicable in the App Engine
  1947. // flexible environment.
  1948. type Network struct {
  1949. // ForwardedPorts: List of ports, or port pairs, to forward from the
  1950. // virtual machine to the application container. Only applicable in the
  1951. // App Engine flexible environment.
  1952. ForwardedPorts []string `json:"forwardedPorts,omitempty"`
  1953. // InstanceTag: Tag to apply to the instance during creation. Only
  1954. // applicable in the App Engine flexible environment.
  1955. InstanceTag string `json:"instanceTag,omitempty"`
  1956. // Name: Google Compute Engine network where the virtual machines are
  1957. // created. Specify the short name, not the resource path.Defaults to
  1958. // default.
  1959. Name string `json:"name,omitempty"`
  1960. // SessionAffinity: Enable session affinity. Only applicable in the App
  1961. // Engine flexible environment.
  1962. SessionAffinity bool `json:"sessionAffinity,omitempty"`
  1963. // SubnetworkName: Google Cloud Platform sub-network where the virtual
  1964. // machines are created. Specify the short name, not the resource
  1965. // path.If a subnetwork name is specified, a network name will also be
  1966. // required unless it is for the default network.
  1967. // If the network that the instance is being created in is a Legacy
  1968. // network, then the IP address is allocated from the IPv4Range.
  1969. // If the network that the instance is being created in is an auto
  1970. // Subnet Mode Network, then only network name should be specified (not
  1971. // the subnetwork_name) and the IP address is created from the
  1972. // IPCidrRange of the subnetwork that exists in that zone for that
  1973. // network.
  1974. // If the network that the instance is being created in is a custom
  1975. // Subnet Mode Network, then the subnetwork_name must be specified and
  1976. // the IP address is created from the IPCidrRange of the subnetwork.If
  1977. // specified, the subnetwork must exist in the same region as the App
  1978. // Engine flexible environment application.
  1979. SubnetworkName string `json:"subnetworkName,omitempty"`
  1980. // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to
  1981. // unconditionally include in API requests. By default, fields with
  1982. // empty values are omitted from API requests. However, any non-pointer,
  1983. // non-interface field appearing in ForceSendFields will be sent to the
  1984. // server regardless of whether the field is empty or not. This may be
  1985. // used to include empty fields in Patch requests.
  1986. ForceSendFields []string `json:"-"`
  1987. // NullFields is a list of field names (e.g. "ForwardedPorts") to
  1988. // include in API requests with the JSON null value. By default, fields
  1989. // with empty values are omitted from API requests. However, any field
  1990. // with an empty value appearing in NullFields will be sent to the
  1991. // server as null. It is an error if a field in this list has a
  1992. // non-empty value. This may be used to include null fields in Patch
  1993. // requests.
  1994. NullFields []string `json:"-"`
  1995. }
  1996. func (s *Network) MarshalJSON() ([]byte, error) {
  1997. type NoMethod Network
  1998. raw := NoMethod(*s)
  1999. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2000. }
  2001. // NetworkUtilization: Target scaling by network usage. Only applicable
  2002. // in the App Engine flexible environment.
  2003. type NetworkUtilization struct {
  2004. // TargetReceivedBytesPerSecond: Target bytes received per second.
  2005. TargetReceivedBytesPerSecond int64 `json:"targetReceivedBytesPerSecond,omitempty"`
  2006. // TargetReceivedPacketsPerSecond: Target packets received per second.
  2007. TargetReceivedPacketsPerSecond int64 `json:"targetReceivedPacketsPerSecond,omitempty"`
  2008. // TargetSentBytesPerSecond: Target bytes sent per second.
  2009. TargetSentBytesPerSecond int64 `json:"targetSentBytesPerSecond,omitempty"`
  2010. // TargetSentPacketsPerSecond: Target packets sent per second.
  2011. TargetSentPacketsPerSecond int64 `json:"targetSentPacketsPerSecond,omitempty"`
  2012. // ForceSendFields is a list of field names (e.g.
  2013. // "TargetReceivedBytesPerSecond") to unconditionally include in API
  2014. // requests. By default, fields with empty values are omitted from API
  2015. // requests. However, any non-pointer, non-interface field appearing in
  2016. // ForceSendFields will be sent to the server regardless of whether the
  2017. // field is empty or not. This may be used to include empty fields in
  2018. // Patch requests.
  2019. ForceSendFields []string `json:"-"`
  2020. // NullFields is a list of field names (e.g.
  2021. // "TargetReceivedBytesPerSecond") to include in API requests with the
  2022. // JSON null value. By default, fields with empty values are omitted
  2023. // from API requests. However, any field with an empty value appearing
  2024. // in NullFields will be sent to the server as null. It is an error if a
  2025. // field in this list has a non-empty value. This may be used to include
  2026. // null fields in Patch requests.
  2027. NullFields []string `json:"-"`
  2028. }
  2029. func (s *NetworkUtilization) MarshalJSON() ([]byte, error) {
  2030. type NoMethod NetworkUtilization
  2031. raw := NoMethod(*s)
  2032. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2033. }
  2034. // Operation: This resource represents a long-running operation that is
  2035. // the result of a network API call.
  2036. type Operation struct {
  2037. // Done: If the value is false, it means the operation is still in
  2038. // progress. If true, the operation is completed, and either error or
  2039. // response is available.
  2040. Done bool `json:"done,omitempty"`
  2041. // Error: The error result of the operation in case of failure or
  2042. // cancellation.
  2043. Error *Status `json:"error,omitempty"`
  2044. // Metadata: Service-specific metadata associated with the operation. It
  2045. // typically contains progress information and common metadata such as
  2046. // create time. Some services might not provide such metadata. Any
  2047. // method that returns a long-running operation should document the
  2048. // metadata type, if any.
  2049. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2050. // Name: The server-assigned name, which is only unique within the same
  2051. // service that originally returns it. If you use the default HTTP
  2052. // mapping, the name should have the format of
  2053. // operations/some/unique/name.
  2054. Name string `json:"name,omitempty"`
  2055. // Response: The normal response of the operation in case of success. If
  2056. // the original method returns no data on success, such as Delete, the
  2057. // response is google.protobuf.Empty. If the original method is standard
  2058. // Get/Create/Update, the response should be the resource. For other
  2059. // methods, the response should have the type XxxResponse, where Xxx is
  2060. // the original method name. For example, if the original method name is
  2061. // TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
  2062. Response googleapi.RawMessage `json:"response,omitempty"`
  2063. // ServerResponse contains the HTTP response code and headers from the
  2064. // server.
  2065. googleapi.ServerResponse `json:"-"`
  2066. // ForceSendFields is a list of field names (e.g. "Done") to
  2067. // unconditionally include in API requests. By default, fields with
  2068. // empty values are omitted from API requests. However, any non-pointer,
  2069. // non-interface field appearing in ForceSendFields will be sent to the
  2070. // server regardless of whether the field is empty or not. This may be
  2071. // used to include empty fields in Patch requests.
  2072. ForceSendFields []string `json:"-"`
  2073. // NullFields is a list of field names (e.g. "Done") to include in API
  2074. // requests with the JSON null value. By default, fields with empty
  2075. // values are omitted from API requests. However, any field with an
  2076. // empty value appearing in NullFields will be sent to the server as
  2077. // null. It is an error if a field in this list has a non-empty value.
  2078. // This may be used to include null fields in Patch requests.
  2079. NullFields []string `json:"-"`
  2080. }
  2081. func (s *Operation) MarshalJSON() ([]byte, error) {
  2082. type NoMethod Operation
  2083. raw := NoMethod(*s)
  2084. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2085. }
  2086. // OperationMetadataV1: Metadata for the given
  2087. // google.longrunning.Operation.
  2088. type OperationMetadataV1 struct {
  2089. CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"`
  2090. // EndTime: Time that this operation completed.@OutputOnly
  2091. EndTime string `json:"endTime,omitempty"`
  2092. // EphemeralMessage: Ephemeral message that may change every time the
  2093. // operation is polled. @OutputOnly
  2094. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2095. // InsertTime: Time that this operation was created.@OutputOnly
  2096. InsertTime string `json:"insertTime,omitempty"`
  2097. // Method: API method that initiated this operation. Example:
  2098. // google.appengine.v1.Versions.CreateVersion.@OutputOnly
  2099. Method string `json:"method,omitempty"`
  2100. // Target: Name of the resource that this operation is acting on.
  2101. // Example: apps/myapp/services/default.@OutputOnly
  2102. Target string `json:"target,omitempty"`
  2103. // User: User who requested this operation.@OutputOnly
  2104. User string `json:"user,omitempty"`
  2105. // Warning: Durable messages that persist on every operation poll.
  2106. // @OutputOnly
  2107. Warning []string `json:"warning,omitempty"`
  2108. // ForceSendFields is a list of field names (e.g.
  2109. // "CreateVersionMetadata") to unconditionally include in API requests.
  2110. // By default, fields with empty values are omitted from API requests.
  2111. // However, any non-pointer, non-interface field appearing in
  2112. // ForceSendFields will be sent to the server regardless of whether the
  2113. // field is empty or not. This may be used to include empty fields in
  2114. // Patch requests.
  2115. ForceSendFields []string `json:"-"`
  2116. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2117. // include in API requests with the JSON null value. By default, fields
  2118. // with empty values are omitted from API requests. However, any field
  2119. // with an empty value appearing in NullFields will be sent to the
  2120. // server as null. It is an error if a field in this list has a
  2121. // non-empty value. This may be used to include null fields in Patch
  2122. // requests.
  2123. NullFields []string `json:"-"`
  2124. }
  2125. func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) {
  2126. type NoMethod OperationMetadataV1
  2127. raw := NoMethod(*s)
  2128. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2129. }
  2130. // OperationMetadataV1Alpha: Metadata for the given
  2131. // google.longrunning.Operation.
  2132. type OperationMetadataV1Alpha struct {
  2133. CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"`
  2134. // EndTime: Time that this operation completed.@OutputOnly
  2135. EndTime string `json:"endTime,omitempty"`
  2136. // EphemeralMessage: Ephemeral message that may change every time the
  2137. // operation is polled. @OutputOnly
  2138. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2139. // InsertTime: Time that this operation was created.@OutputOnly
  2140. InsertTime string `json:"insertTime,omitempty"`
  2141. // Method: API method that initiated this operation. Example:
  2142. // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly
  2143. Method string `json:"method,omitempty"`
  2144. // Target: Name of the resource that this operation is acting on.
  2145. // Example: apps/myapp/services/default.@OutputOnly
  2146. Target string `json:"target,omitempty"`
  2147. // User: User who requested this operation.@OutputOnly
  2148. User string `json:"user,omitempty"`
  2149. // Warning: Durable messages that persist on every operation poll.
  2150. // @OutputOnly
  2151. Warning []string `json:"warning,omitempty"`
  2152. // ForceSendFields is a list of field names (e.g.
  2153. // "CreateVersionMetadata") to unconditionally include in API requests.
  2154. // By default, fields with empty values are omitted from API requests.
  2155. // However, any non-pointer, non-interface field appearing in
  2156. // ForceSendFields will be sent to the server regardless of whether the
  2157. // field is empty or not. This may be used to include empty fields in
  2158. // Patch requests.
  2159. ForceSendFields []string `json:"-"`
  2160. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2161. // include in API requests with the JSON null value. By default, fields
  2162. // with empty values are omitted from API requests. However, any field
  2163. // with an empty value appearing in NullFields will be sent to the
  2164. // server as null. It is an error if a field in this list has a
  2165. // non-empty value. This may be used to include null fields in Patch
  2166. // requests.
  2167. NullFields []string `json:"-"`
  2168. }
  2169. func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  2170. type NoMethod OperationMetadataV1Alpha
  2171. raw := NoMethod(*s)
  2172. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2173. }
  2174. // OperationMetadataV1Beta: Metadata for the given
  2175. // google.longrunning.Operation.
  2176. type OperationMetadataV1Beta struct {
  2177. CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"`
  2178. // EndTime: Time that this operation completed.@OutputOnly
  2179. EndTime string `json:"endTime,omitempty"`
  2180. // EphemeralMessage: Ephemeral message that may change every time the
  2181. // operation is polled. @OutputOnly
  2182. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2183. // InsertTime: Time that this operation was created.@OutputOnly
  2184. InsertTime string `json:"insertTime,omitempty"`
  2185. // Method: API method that initiated this operation. Example:
  2186. // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly
  2187. Method string `json:"method,omitempty"`
  2188. // Target: Name of the resource that this operation is acting on.
  2189. // Example: apps/myapp/services/default.@OutputOnly
  2190. Target string `json:"target,omitempty"`
  2191. // User: User who requested this operation.@OutputOnly
  2192. User string `json:"user,omitempty"`
  2193. // Warning: Durable messages that persist on every operation poll.
  2194. // @OutputOnly
  2195. Warning []string `json:"warning,omitempty"`
  2196. // ForceSendFields is a list of field names (e.g.
  2197. // "CreateVersionMetadata") to unconditionally include in API requests.
  2198. // By default, fields with empty values are omitted from API requests.
  2199. // However, any non-pointer, non-interface field appearing in
  2200. // ForceSendFields will be sent to the server regardless of whether the
  2201. // field is empty or not. This may be used to include empty fields in
  2202. // Patch requests.
  2203. ForceSendFields []string `json:"-"`
  2204. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2205. // include in API requests with the JSON null value. By default, fields
  2206. // with empty values are omitted from API requests. However, any field
  2207. // with an empty value appearing in NullFields will be sent to the
  2208. // server as null. It is an error if a field in this list has a
  2209. // non-empty value. This may be used to include null fields in Patch
  2210. // requests.
  2211. NullFields []string `json:"-"`
  2212. }
  2213. func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) {
  2214. type NoMethod OperationMetadataV1Beta
  2215. raw := NoMethod(*s)
  2216. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2217. }
  2218. // ReadinessCheck: Readiness checking configuration for VM instances.
  2219. // Unhealthy instances are removed from traffic rotation.
  2220. type ReadinessCheck struct {
  2221. // AppStartTimeout: A maximum time limit on application initialization,
  2222. // measured from moment the application successfully replies to a
  2223. // healthcheck until it is ready to serve traffic.
  2224. AppStartTimeout string `json:"appStartTimeout,omitempty"`
  2225. // CheckInterval: Interval between health checks.
  2226. CheckInterval string `json:"checkInterval,omitempty"`
  2227. // FailureThreshold: Number of consecutive failed checks required before
  2228. // removing traffic.
  2229. FailureThreshold int64 `json:"failureThreshold,omitempty"`
  2230. // Host: Host header to send when performing a HTTP Readiness check.
  2231. // Example: "myapp.appspot.com"
  2232. Host string `json:"host,omitempty"`
  2233. // Path: The request path.
  2234. Path string `json:"path,omitempty"`
  2235. // SuccessThreshold: Number of consecutive successful checks required
  2236. // before receiving traffic.
  2237. SuccessThreshold int64 `json:"successThreshold,omitempty"`
  2238. // Timeout: Time before the check is considered failed.
  2239. Timeout string `json:"timeout,omitempty"`
  2240. // ForceSendFields is a list of field names (e.g. "AppStartTimeout") to
  2241. // unconditionally include in API requests. By default, fields with
  2242. // empty values are omitted from API requests. However, any non-pointer,
  2243. // non-interface field appearing in ForceSendFields will be sent to the
  2244. // server regardless of whether the field is empty or not. This may be
  2245. // used to include empty fields in Patch requests.
  2246. ForceSendFields []string `json:"-"`
  2247. // NullFields is a list of field names (e.g. "AppStartTimeout") to
  2248. // include in API requests with the JSON null value. By default, fields
  2249. // with empty values are omitted from API requests. However, any field
  2250. // with an empty value appearing in NullFields will be sent to the
  2251. // server as null. It is an error if a field in this list has a
  2252. // non-empty value. This may be used to include null fields in Patch
  2253. // requests.
  2254. NullFields []string `json:"-"`
  2255. }
  2256. func (s *ReadinessCheck) MarshalJSON() ([]byte, error) {
  2257. type NoMethod ReadinessCheck
  2258. raw := NoMethod(*s)
  2259. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2260. }
  2261. // RepairApplicationRequest: Request message for
  2262. // 'Applications.RepairApplication'.
  2263. type RepairApplicationRequest struct {
  2264. }
  2265. // RequestUtilization: Target scaling by request utilization. Only
  2266. // applicable in the App Engine flexible environment.
  2267. type RequestUtilization struct {
  2268. // TargetConcurrentRequests: Target number of concurrent requests.
  2269. TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"`
  2270. // TargetRequestCountPerSecond: Target requests per second.
  2271. TargetRequestCountPerSecond int64 `json:"targetRequestCountPerSecond,omitempty"`
  2272. // ForceSendFields is a list of field names (e.g.
  2273. // "TargetConcurrentRequests") to unconditionally include in API
  2274. // requests. By default, fields with empty values are omitted from API
  2275. // requests. However, any non-pointer, non-interface field appearing in
  2276. // ForceSendFields will be sent to the server regardless of whether the
  2277. // field is empty or not. This may be used to include empty fields in
  2278. // Patch requests.
  2279. ForceSendFields []string `json:"-"`
  2280. // NullFields is a list of field names (e.g. "TargetConcurrentRequests")
  2281. // to include in API requests with the JSON null value. By default,
  2282. // fields with empty values are omitted from API requests. However, any
  2283. // field with an empty value appearing in NullFields will be sent to the
  2284. // server as null. It is an error if a field in this list has a
  2285. // non-empty value. This may be used to include null fields in Patch
  2286. // requests.
  2287. NullFields []string `json:"-"`
  2288. }
  2289. func (s *RequestUtilization) MarshalJSON() ([]byte, error) {
  2290. type NoMethod RequestUtilization
  2291. raw := NoMethod(*s)
  2292. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2293. }
  2294. // ResourceRecord: A DNS resource record.
  2295. type ResourceRecord struct {
  2296. // Name: Relative name of the object affected by this record. Only
  2297. // applicable for CNAME records. Example: 'www'.
  2298. Name string `json:"name,omitempty"`
  2299. // Rrdata: Data for this record. Values vary by record type, as defined
  2300. // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).
  2301. Rrdata string `json:"rrdata,omitempty"`
  2302. // Type: Resource record type. Example: AAAA.
  2303. //
  2304. // Possible values:
  2305. // "RECORD_TYPE_UNSPECIFIED" - An unknown resource record.
  2306. // "A" - An A resource record. Data is an IPv4 address.
  2307. // "AAAA" - An AAAA resource record. Data is an IPv6 address.
  2308. // "CNAME" - A CNAME resource record. Data is a domain name to be
  2309. // aliased.
  2310. Type string `json:"type,omitempty"`
  2311. // ForceSendFields is a list of field names (e.g. "Name") to
  2312. // unconditionally include in API requests. By default, fields with
  2313. // empty values are omitted from API requests. However, any non-pointer,
  2314. // non-interface field appearing in ForceSendFields will be sent to the
  2315. // server regardless of whether the field is empty or not. This may be
  2316. // used to include empty fields in Patch requests.
  2317. ForceSendFields []string `json:"-"`
  2318. // NullFields is a list of field names (e.g. "Name") to include in API
  2319. // requests with the JSON null value. By default, fields with empty
  2320. // values are omitted from API requests. However, any field with an
  2321. // empty value appearing in NullFields will be sent to the server as
  2322. // null. It is an error if a field in this list has a non-empty value.
  2323. // This may be used to include null fields in Patch requests.
  2324. NullFields []string `json:"-"`
  2325. }
  2326. func (s *ResourceRecord) MarshalJSON() ([]byte, error) {
  2327. type NoMethod ResourceRecord
  2328. raw := NoMethod(*s)
  2329. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2330. }
  2331. // Resources: Machine resources for a version.
  2332. type Resources struct {
  2333. // Cpu: Number of CPU cores needed.
  2334. Cpu float64 `json:"cpu,omitempty"`
  2335. // DiskGb: Disk size (GB) needed.
  2336. DiskGb float64 `json:"diskGb,omitempty"`
  2337. // MemoryGb: Memory (GB) needed.
  2338. MemoryGb float64 `json:"memoryGb,omitempty"`
  2339. // Volumes: User specified volumes.
  2340. Volumes []*Volume `json:"volumes,omitempty"`
  2341. // ForceSendFields is a list of field names (e.g. "Cpu") to
  2342. // unconditionally include in API requests. By default, fields with
  2343. // empty values are omitted from API requests. However, any non-pointer,
  2344. // non-interface field appearing in ForceSendFields will be sent to the
  2345. // server regardless of whether the field is empty or not. This may be
  2346. // used to include empty fields in Patch requests.
  2347. ForceSendFields []string `json:"-"`
  2348. // NullFields is a list of field names (e.g. "Cpu") to include in API
  2349. // requests with the JSON null value. By default, fields with empty
  2350. // values are omitted from API requests. However, any field with an
  2351. // empty value appearing in NullFields will be sent to the server as
  2352. // null. It is an error if a field in this list has a non-empty value.
  2353. // This may be used to include null fields in Patch requests.
  2354. NullFields []string `json:"-"`
  2355. }
  2356. func (s *Resources) MarshalJSON() ([]byte, error) {
  2357. type NoMethod Resources
  2358. raw := NoMethod(*s)
  2359. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2360. }
  2361. func (s *Resources) UnmarshalJSON(data []byte) error {
  2362. type NoMethod Resources
  2363. var s1 struct {
  2364. Cpu gensupport.JSONFloat64 `json:"cpu"`
  2365. DiskGb gensupport.JSONFloat64 `json:"diskGb"`
  2366. MemoryGb gensupport.JSONFloat64 `json:"memoryGb"`
  2367. *NoMethod
  2368. }
  2369. s1.NoMethod = (*NoMethod)(s)
  2370. if err := json.Unmarshal(data, &s1); err != nil {
  2371. return err
  2372. }
  2373. s.Cpu = float64(s1.Cpu)
  2374. s.DiskGb = float64(s1.DiskGb)
  2375. s.MemoryGb = float64(s1.MemoryGb)
  2376. return nil
  2377. }
  2378. // ScriptHandler: Executes a script to handle the request that matches
  2379. // the URL pattern.
  2380. type ScriptHandler struct {
  2381. // ScriptPath: Path to the script from the application root directory.
  2382. ScriptPath string `json:"scriptPath,omitempty"`
  2383. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  2384. // unconditionally include in API requests. By default, fields with
  2385. // empty values are omitted from API requests. However, any non-pointer,
  2386. // non-interface field appearing in ForceSendFields will be sent to the
  2387. // server regardless of whether the field is empty or not. This may be
  2388. // used to include empty fields in Patch requests.
  2389. ForceSendFields []string `json:"-"`
  2390. // NullFields is a list of field names (e.g. "ScriptPath") to include in
  2391. // API requests with the JSON null value. By default, fields with empty
  2392. // values are omitted from API requests. However, any field with an
  2393. // empty value appearing in NullFields will be sent to the server as
  2394. // null. It is an error if a field in this list has a non-empty value.
  2395. // This may be used to include null fields in Patch requests.
  2396. NullFields []string `json:"-"`
  2397. }
  2398. func (s *ScriptHandler) MarshalJSON() ([]byte, error) {
  2399. type NoMethod ScriptHandler
  2400. raw := NoMethod(*s)
  2401. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2402. }
  2403. // Service: A Service resource is a logical component of an application
  2404. // that can share state and communicate in a secure fashion with other
  2405. // services. For example, an application that handles customer requests
  2406. // might include separate services to handle tasks such as backend data
  2407. // analysis or API requests from mobile devices. Each service has a
  2408. // collection of versions that define a specific set of code used to
  2409. // implement the functionality of that service.
  2410. type Service struct {
  2411. // Id: Relative name of the service within the application. Example:
  2412. // default.@OutputOnly
  2413. Id string `json:"id,omitempty"`
  2414. // Name: Full path to the Service resource in the API. Example:
  2415. // apps/myapp/services/default.@OutputOnly
  2416. Name string `json:"name,omitempty"`
  2417. // Split: Mapping that defines fractional HTTP traffic diversion to
  2418. // different versions within the service.
  2419. Split *TrafficSplit `json:"split,omitempty"`
  2420. // ServerResponse contains the HTTP response code and headers from the
  2421. // server.
  2422. googleapi.ServerResponse `json:"-"`
  2423. // ForceSendFields is a list of field names (e.g. "Id") to
  2424. // unconditionally include in API requests. By default, fields with
  2425. // empty values are omitted from API requests. However, any non-pointer,
  2426. // non-interface field appearing in ForceSendFields will be sent to the
  2427. // server regardless of whether the field is empty or not. This may be
  2428. // used to include empty fields in Patch requests.
  2429. ForceSendFields []string `json:"-"`
  2430. // NullFields is a list of field names (e.g. "Id") to include in API
  2431. // requests with the JSON null value. By default, fields with empty
  2432. // values are omitted from API requests. However, any field with an
  2433. // empty value appearing in NullFields will be sent to the server as
  2434. // null. It is an error if a field in this list has a non-empty value.
  2435. // This may be used to include null fields in Patch requests.
  2436. NullFields []string `json:"-"`
  2437. }
  2438. func (s *Service) MarshalJSON() ([]byte, error) {
  2439. type NoMethod Service
  2440. raw := NoMethod(*s)
  2441. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2442. }
  2443. // SslSettings: SSL configuration for a DomainMapping resource.
  2444. type SslSettings struct {
  2445. // CertificateId: ID of the AuthorizedCertificate resource configuring
  2446. // SSL for the application. Clearing this field will remove SSL
  2447. // support.By default, a managed certificate is automatically created
  2448. // for every domain mapping. To omit SSL support or to configure SSL
  2449. // manually, specify SslManagementType.MANUAL on a CREATE or UPDATE
  2450. // request. You must be authorized to administer the
  2451. // AuthorizedCertificate resource to manually map it to a DomainMapping
  2452. // resource. Example: 12345.
  2453. CertificateId string `json:"certificateId,omitempty"`
  2454. // PendingManagedCertificateId: ID of the managed AuthorizedCertificate
  2455. // resource currently being provisioned, if applicable. Until the new
  2456. // managed certificate has been successfully provisioned, the previous
  2457. // SSL state will be preserved. Once the provisioning process completes,
  2458. // the certificate_id field will reflect the new managed certificate and
  2459. // this field will be left empty. To remove SSL support while there is
  2460. // still a pending managed certificate, clear the certificate_id field
  2461. // with an UpdateDomainMappingRequest.@OutputOnly
  2462. PendingManagedCertificateId string `json:"pendingManagedCertificateId,omitempty"`
  2463. // SslManagementType: SSL management type for this domain. If AUTOMATIC,
  2464. // a managed certificate is automatically provisioned. If MANUAL,
  2465. // certificate_id must be manually specified in order to configure SSL
  2466. // for this domain.
  2467. //
  2468. // Possible values:
  2469. // "SSL_MANAGEMENT_TYPE_UNSPECIFIED" - Defaults to AUTOMATIC.
  2470. // "AUTOMATIC" - SSL support for this domain is configured
  2471. // automatically. The mapped SSL certificate will be automatically
  2472. // renewed.
  2473. // "MANUAL" - SSL support for this domain is configured manually by
  2474. // the user. Either the domain has no SSL support or a user-obtained SSL
  2475. // certificate has been explictly mapped to this domain.
  2476. SslManagementType string `json:"sslManagementType,omitempty"`
  2477. // ForceSendFields is a list of field names (e.g. "CertificateId") to
  2478. // unconditionally include in API requests. By default, fields with
  2479. // empty values are omitted from API requests. However, any non-pointer,
  2480. // non-interface field appearing in ForceSendFields will be sent to the
  2481. // server regardless of whether the field is empty or not. This may be
  2482. // used to include empty fields in Patch requests.
  2483. ForceSendFields []string `json:"-"`
  2484. // NullFields is a list of field names (e.g. "CertificateId") to include
  2485. // in API requests with the JSON null value. By default, fields with
  2486. // empty values are omitted from API requests. However, any field with
  2487. // an empty value appearing in NullFields will be sent to the server as
  2488. // null. It is an error if a field in this list has a non-empty value.
  2489. // This may be used to include null fields in Patch requests.
  2490. NullFields []string `json:"-"`
  2491. }
  2492. func (s *SslSettings) MarshalJSON() ([]byte, error) {
  2493. type NoMethod SslSettings
  2494. raw := NoMethod(*s)
  2495. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2496. }
  2497. // StandardSchedulerSettings: Scheduler settings for standard
  2498. // environment.
  2499. type StandardSchedulerSettings struct {
  2500. // MaxInstances: Maximum number of instances to run for this version.
  2501. // Set to zero to disable max_instances configuration.
  2502. MaxInstances int64 `json:"maxInstances,omitempty"`
  2503. // MinInstances: Minimum number of instances to run for this version.
  2504. // Set to zero to disable min_instances configuration.
  2505. MinInstances int64 `json:"minInstances,omitempty"`
  2506. // TargetCpuUtilization: Target CPU utilization ratio to maintain when
  2507. // scaling.
  2508. TargetCpuUtilization float64 `json:"targetCpuUtilization,omitempty"`
  2509. // TargetThroughputUtilization: Target throughput utilization ratio to
  2510. // maintain when scaling
  2511. TargetThroughputUtilization float64 `json:"targetThroughputUtilization,omitempty"`
  2512. // ForceSendFields is a list of field names (e.g. "MaxInstances") to
  2513. // unconditionally include in API requests. By default, fields with
  2514. // empty values are omitted from API requests. However, any non-pointer,
  2515. // non-interface field appearing in ForceSendFields will be sent to the
  2516. // server regardless of whether the field is empty or not. This may be
  2517. // used to include empty fields in Patch requests.
  2518. ForceSendFields []string `json:"-"`
  2519. // NullFields is a list of field names (e.g. "MaxInstances") to include
  2520. // in API requests with the JSON null value. By default, fields with
  2521. // empty values are omitted from API requests. However, any field with
  2522. // an empty value appearing in NullFields will be sent to the server as
  2523. // null. It is an error if a field in this list has a non-empty value.
  2524. // This may be used to include null fields in Patch requests.
  2525. NullFields []string `json:"-"`
  2526. }
  2527. func (s *StandardSchedulerSettings) MarshalJSON() ([]byte, error) {
  2528. type NoMethod StandardSchedulerSettings
  2529. raw := NoMethod(*s)
  2530. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2531. }
  2532. func (s *StandardSchedulerSettings) UnmarshalJSON(data []byte) error {
  2533. type NoMethod StandardSchedulerSettings
  2534. var s1 struct {
  2535. TargetCpuUtilization gensupport.JSONFloat64 `json:"targetCpuUtilization"`
  2536. TargetThroughputUtilization gensupport.JSONFloat64 `json:"targetThroughputUtilization"`
  2537. *NoMethod
  2538. }
  2539. s1.NoMethod = (*NoMethod)(s)
  2540. if err := json.Unmarshal(data, &s1); err != nil {
  2541. return err
  2542. }
  2543. s.TargetCpuUtilization = float64(s1.TargetCpuUtilization)
  2544. s.TargetThroughputUtilization = float64(s1.TargetThroughputUtilization)
  2545. return nil
  2546. }
  2547. // StaticFilesHandler: Files served directly to the user for a given
  2548. // URL, such as images, CSS stylesheets, or JavaScript source files.
  2549. // Static file handlers describe which files in the application
  2550. // directory are static files, and which URLs serve them.
  2551. type StaticFilesHandler struct {
  2552. // ApplicationReadable: Whether files should also be uploaded as code
  2553. // data. By default, files declared in static file handlers are uploaded
  2554. // as static data and are only served to end users; they cannot be read
  2555. // by the application. If enabled, uploads are charged against both your
  2556. // code and static data storage resource quotas.
  2557. ApplicationReadable bool `json:"applicationReadable,omitempty"`
  2558. // Expiration: Time a static file served by this handler should be
  2559. // cached by web proxies and browsers.
  2560. Expiration string `json:"expiration,omitempty"`
  2561. // HttpHeaders: HTTP headers to use for all responses from these URLs.
  2562. HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
  2563. // MimeType: MIME type used to serve all files served by this
  2564. // handler.Defaults to file-specific MIME types, which are derived from
  2565. // each file's filename extension.
  2566. MimeType string `json:"mimeType,omitempty"`
  2567. // Path: Path to the static files matched by the URL pattern, from the
  2568. // application root directory. The path can refer to text matched in
  2569. // groupings in the URL pattern.
  2570. Path string `json:"path,omitempty"`
  2571. // RequireMatchingFile: Whether this handler should match the request if
  2572. // the file referenced by the handler does not exist.
  2573. RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
  2574. // UploadPathRegex: Regular expression that matches the file paths for
  2575. // all files that should be referenced by this handler.
  2576. UploadPathRegex string `json:"uploadPathRegex,omitempty"`
  2577. // ForceSendFields is a list of field names (e.g. "ApplicationReadable")
  2578. // to unconditionally include in API requests. By default, fields with
  2579. // empty values are omitted from API requests. However, any non-pointer,
  2580. // non-interface field appearing in ForceSendFields will be sent to the
  2581. // server regardless of whether the field is empty or not. This may be
  2582. // used to include empty fields in Patch requests.
  2583. ForceSendFields []string `json:"-"`
  2584. // NullFields is a list of field names (e.g. "ApplicationReadable") to
  2585. // include in API requests with the JSON null value. By default, fields
  2586. // with empty values are omitted from API requests. However, any field
  2587. // with an empty value appearing in NullFields will be sent to the
  2588. // server as null. It is an error if a field in this list has a
  2589. // non-empty value. This may be used to include null fields in Patch
  2590. // requests.
  2591. NullFields []string `json:"-"`
  2592. }
  2593. func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) {
  2594. type NoMethod StaticFilesHandler
  2595. raw := NoMethod(*s)
  2596. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2597. }
  2598. // Status: The Status type defines a logical error model that is
  2599. // suitable for different programming environments, including REST APIs
  2600. // and RPC APIs. It is used by gRPC (https://github.com/grpc). The error
  2601. // model is designed to be:
  2602. // Simple to use and understand for most users
  2603. // Flexible enough to meet unexpected needsOverviewThe Status message
  2604. // contains three pieces of data: error code, error message, and error
  2605. // details. The error code should be an enum value of google.rpc.Code,
  2606. // but it may accept additional error codes if needed. The error message
  2607. // should be a developer-facing English message that helps developers
  2608. // understand and resolve the error. If a localized user-facing error
  2609. // message is needed, put the localized message in the error details or
  2610. // localize it in the client. The optional error details may contain
  2611. // arbitrary information about the error. There is a predefined set of
  2612. // error detail types in the package google.rpc that can be used for
  2613. // common error conditions.Language mappingThe Status message is the
  2614. // logical representation of the error model, but it is not necessarily
  2615. // the actual wire format. When the Status message is exposed in
  2616. // different client libraries and different wire protocols, it can be
  2617. // mapped differently. For example, it will likely be mapped to some
  2618. // exceptions in Java, but more likely mapped to some error codes in
  2619. // C.Other usesThe error model and the Status message can be used in a
  2620. // variety of environments, either with or without APIs, to provide a
  2621. // consistent developer experience across different environments.Example
  2622. // uses of this error model include:
  2623. // Partial errors. If a service needs to return partial errors to the
  2624. // client, it may embed the Status in the normal response to indicate
  2625. // the partial errors.
  2626. // Workflow errors. A typical workflow has multiple steps. Each step may
  2627. // have a Status message for error reporting.
  2628. // Batch operations. If a client uses batch request and batch response,
  2629. // the Status message should be used directly inside batch response, one
  2630. // for each error sub-response.
  2631. // Asynchronous operations. If an API call embeds asynchronous operation
  2632. // results in its response, the status of those operations should be
  2633. // represented directly using the Status message.
  2634. // Logging. If some API errors are stored in logs, the message Status
  2635. // could be used directly after any stripping needed for
  2636. // security/privacy reasons.
  2637. type Status struct {
  2638. // Code: The status code, which should be an enum value of
  2639. // google.rpc.Code.
  2640. Code int64 `json:"code,omitempty"`
  2641. // Details: A list of messages that carry the error details. There is a
  2642. // common set of message types for APIs to use.
  2643. Details []googleapi.RawMessage `json:"details,omitempty"`
  2644. // Message: A developer-facing error message, which should be in
  2645. // English. Any user-facing error message should be localized and sent
  2646. // in the google.rpc.Status.details field, or localized by the client.
  2647. Message string `json:"message,omitempty"`
  2648. // ForceSendFields is a list of field names (e.g. "Code") to
  2649. // unconditionally include in API requests. By default, fields with
  2650. // empty values are omitted from API requests. However, any non-pointer,
  2651. // non-interface field appearing in ForceSendFields will be sent to the
  2652. // server regardless of whether the field is empty or not. This may be
  2653. // used to include empty fields in Patch requests.
  2654. ForceSendFields []string `json:"-"`
  2655. // NullFields is a list of field names (e.g. "Code") to include in API
  2656. // requests with the JSON null value. By default, fields with empty
  2657. // values are omitted from API requests. However, any field with an
  2658. // empty value appearing in NullFields will be sent to the server as
  2659. // null. It is an error if a field in this list has a non-empty value.
  2660. // This may be used to include null fields in Patch requests.
  2661. NullFields []string `json:"-"`
  2662. }
  2663. func (s *Status) MarshalJSON() ([]byte, error) {
  2664. type NoMethod Status
  2665. raw := NoMethod(*s)
  2666. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2667. }
  2668. // TrafficSplit: Traffic routing configuration for versions within a
  2669. // single service. Traffic splits define how traffic directed to the
  2670. // service is assigned to versions.
  2671. type TrafficSplit struct {
  2672. // Allocations: Mapping from version IDs within the service to
  2673. // fractional (0.000, 1] allocations of traffic for that version. Each
  2674. // version can be specified only once, but some versions in the service
  2675. // may not have any traffic allocation. Services that have traffic
  2676. // allocated cannot be deleted until either the service is deleted or
  2677. // their traffic allocation is removed. Allocations must sum to 1. Up to
  2678. // two decimal place precision is supported for IP-based splits and up
  2679. // to three decimal places is supported for cookie-based splits.
  2680. Allocations map[string]float64 `json:"allocations,omitempty"`
  2681. // ShardBy: Mechanism used to determine which version a request is sent
  2682. // to. The traffic selection algorithm will be stable for either type
  2683. // until allocations are changed.
  2684. //
  2685. // Possible values:
  2686. // "UNSPECIFIED" - Diversion method unspecified.
  2687. // "COOKIE" - Diversion based on a specially named cookie,
  2688. // "GOOGAPPUID." The cookie must be set by the application itself or no
  2689. // diversion will occur.
  2690. // "IP" - Diversion based on applying the modulus operation to a
  2691. // fingerprint of the IP address.
  2692. // "RANDOM" - Diversion based on weighted random assignment. An
  2693. // incoming request is randomly routed to a version in the traffic
  2694. // split, with probability proportional to the version's traffic share.
  2695. ShardBy string `json:"shardBy,omitempty"`
  2696. // ForceSendFields is a list of field names (e.g. "Allocations") to
  2697. // unconditionally include in API requests. By default, fields with
  2698. // empty values are omitted from API requests. However, any non-pointer,
  2699. // non-interface field appearing in ForceSendFields will be sent to the
  2700. // server regardless of whether the field is empty or not. This may be
  2701. // used to include empty fields in Patch requests.
  2702. ForceSendFields []string `json:"-"`
  2703. // NullFields is a list of field names (e.g. "Allocations") to include
  2704. // in API requests with the JSON null value. By default, fields with
  2705. // empty values are omitted from API requests. However, any field with
  2706. // an empty value appearing in NullFields will be sent to the server as
  2707. // null. It is an error if a field in this list has a non-empty value.
  2708. // This may be used to include null fields in Patch requests.
  2709. NullFields []string `json:"-"`
  2710. }
  2711. func (s *TrafficSplit) MarshalJSON() ([]byte, error) {
  2712. type NoMethod TrafficSplit
  2713. raw := NoMethod(*s)
  2714. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2715. }
  2716. // UrlDispatchRule: Rules to match an HTTP request and dispatch that
  2717. // request to a service.
  2718. type UrlDispatchRule struct {
  2719. // Domain: Domain name to match against. The wildcard "*" is supported
  2720. // if specified before a period: "*.".Defaults to matching all domains:
  2721. // "*".
  2722. Domain string `json:"domain,omitempty"`
  2723. // Path: Pathname within the host. Must start with a "/". A single "*"
  2724. // can be included at the end of the path.The sum of the lengths of the
  2725. // domain and path may not exceed 100 characters.
  2726. Path string `json:"path,omitempty"`
  2727. // Service: Resource ID of a service in this application that should
  2728. // serve the matched request. The service must already exist. Example:
  2729. // default.
  2730. Service string `json:"service,omitempty"`
  2731. // ForceSendFields is a list of field names (e.g. "Domain") to
  2732. // unconditionally include in API requests. By default, fields with
  2733. // empty values are omitted from API requests. However, any non-pointer,
  2734. // non-interface field appearing in ForceSendFields will be sent to the
  2735. // server regardless of whether the field is empty or not. This may be
  2736. // used to include empty fields in Patch requests.
  2737. ForceSendFields []string `json:"-"`
  2738. // NullFields is a list of field names (e.g. "Domain") to include in API
  2739. // requests with the JSON null value. By default, fields with empty
  2740. // values are omitted from API requests. However, any field with an
  2741. // empty value appearing in NullFields will be sent to the server as
  2742. // null. It is an error if a field in this list has a non-empty value.
  2743. // This may be used to include null fields in Patch requests.
  2744. NullFields []string `json:"-"`
  2745. }
  2746. func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) {
  2747. type NoMethod UrlDispatchRule
  2748. raw := NoMethod(*s)
  2749. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2750. }
  2751. // UrlMap: URL pattern and description of how the URL should be handled.
  2752. // App Engine can handle URLs by executing application code or by
  2753. // serving static files uploaded with the version, such as images, CSS,
  2754. // or JavaScript.
  2755. type UrlMap struct {
  2756. // ApiEndpoint: Uses API Endpoints to handle requests.
  2757. ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"`
  2758. // AuthFailAction: Action to take when users access resources that
  2759. // require authentication. Defaults to redirect.
  2760. //
  2761. // Possible values:
  2762. // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified.
  2763. // AUTH_FAIL_ACTION_REDIRECT is assumed.
  2764. // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to
  2765. // "accounts.google.com". The user is redirected back to the application
  2766. // URL after signing in or creating an account.
  2767. // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP
  2768. // status code and an error message.
  2769. AuthFailAction string `json:"authFailAction,omitempty"`
  2770. // Login: Level of login required to access this resource. Not supported
  2771. // for Node.js in the App Engine standard environment.
  2772. //
  2773. // Possible values:
  2774. // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed.
  2775. // "LOGIN_OPTIONAL" - Does not require that the user is signed in.
  2776. // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action
  2777. // is taken. In addition, if the user is not an administrator for the
  2778. // application, they are given an error message regardless of
  2779. // auth_fail_action. If the user is an administrator, the handler
  2780. // proceeds.
  2781. // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds
  2782. // normally. Otherwise, the auth_fail_action is taken.
  2783. Login string `json:"login,omitempty"`
  2784. // RedirectHttpResponseCode: 30x code to use when performing redirects
  2785. // for the secure field. Defaults to 302.
  2786. //
  2787. // Possible values:
  2788. // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" - Not specified. 302 is
  2789. // assumed.
  2790. // "REDIRECT_HTTP_RESPONSE_CODE_301" - 301 Moved Permanently code.
  2791. // "REDIRECT_HTTP_RESPONSE_CODE_302" - 302 Moved Temporarily code.
  2792. // "REDIRECT_HTTP_RESPONSE_CODE_303" - 303 See Other code.
  2793. // "REDIRECT_HTTP_RESPONSE_CODE_307" - 307 Temporary Redirect code.
  2794. RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"`
  2795. // Script: Executes a script to handle the requests that match this URL
  2796. // pattern. Only the auto value is supported for Node.js in the App
  2797. // Engine standard environment, for example "script": "auto".
  2798. Script *ScriptHandler `json:"script,omitempty"`
  2799. // SecurityLevel: Security (HTTPS) enforcement for this URL.
  2800. //
  2801. // Possible values:
  2802. // "SECURE_UNSPECIFIED" - Not specified.
  2803. // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that
  2804. // match the handler succeed without redirects. The application can
  2805. // examine the request to determine which protocol was used, and respond
  2806. // accordingly.
  2807. // "SECURE_NEVER" - Requests for a URL that match this handler that
  2808. // use HTTPS are automatically redirected to the HTTP equivalent URL.
  2809. // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that
  2810. // match the handler succeed without redirects. The application can
  2811. // examine the request to determine which protocol was used and respond
  2812. // accordingly.
  2813. // "SECURE_ALWAYS" - Requests for a URL that match this handler that
  2814. // do not use HTTPS are automatically redirected to the HTTPS URL with
  2815. // the same path. Query parameters are reserved for the redirect.
  2816. SecurityLevel string `json:"securityLevel,omitempty"`
  2817. // StaticFiles: Returns the contents of a file, such as an image, as the
  2818. // response.
  2819. StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"`
  2820. // UrlRegex: URL prefix. Uses regular expression syntax, which means
  2821. // regexp special characters must be escaped, but should not contain
  2822. // groupings. All URLs that begin with this prefix are handled by this
  2823. // handler, using the portion of the URL after the prefix as part of the
  2824. // file path.
  2825. UrlRegex string `json:"urlRegex,omitempty"`
  2826. // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to
  2827. // unconditionally include in API requests. By default, fields with
  2828. // empty values are omitted from API requests. However, any non-pointer,
  2829. // non-interface field appearing in ForceSendFields will be sent to the
  2830. // server regardless of whether the field is empty or not. This may be
  2831. // used to include empty fields in Patch requests.
  2832. ForceSendFields []string `json:"-"`
  2833. // NullFields is a list of field names (e.g. "ApiEndpoint") to include
  2834. // in API requests with the JSON null value. By default, fields with
  2835. // empty values are omitted from API requests. However, any field with
  2836. // an empty value appearing in NullFields will be sent to the server as
  2837. // null. It is an error if a field in this list has a non-empty value.
  2838. // This may be used to include null fields in Patch requests.
  2839. NullFields []string `json:"-"`
  2840. }
  2841. func (s *UrlMap) MarshalJSON() ([]byte, error) {
  2842. type NoMethod UrlMap
  2843. raw := NoMethod(*s)
  2844. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2845. }
  2846. // Version: A Version resource is a specific set of source code and
  2847. // configuration files that are deployed into a service.
  2848. type Version struct {
  2849. // ApiConfig: Serving configuration for Google Cloud Endpoints
  2850. // (https://cloud.google.com/appengine/docs/python/endpoints/).Only
  2851. // returned in GET requests if view=FULL is set.
  2852. ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"`
  2853. // AutomaticScaling: Automatic scaling is based on request rate,
  2854. // response latencies, and other application metrics.
  2855. AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"`
  2856. // BasicScaling: A service with basic scaling will create an instance
  2857. // when the application receives a request. The instance will be turned
  2858. // down when the app becomes idle. Basic scaling is ideal for work that
  2859. // is intermittent or driven by user activity.
  2860. BasicScaling *BasicScaling `json:"basicScaling,omitempty"`
  2861. // BetaSettings: Metadata settings that are supplied to this version to
  2862. // enable beta runtime features.
  2863. BetaSettings map[string]string `json:"betaSettings,omitempty"`
  2864. // CreateTime: Time that this version was created.@OutputOnly
  2865. CreateTime string `json:"createTime,omitempty"`
  2866. // CreatedBy: Email address of the user who created this
  2867. // version.@OutputOnly
  2868. CreatedBy string `json:"createdBy,omitempty"`
  2869. // DefaultExpiration: Duration that static files should be cached by web
  2870. // proxies and browsers. Only applicable if the corresponding
  2871. // StaticFilesHandler
  2872. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  2873. // pps.services.versions#StaticFilesHandler) does not specify its own
  2874. // expiration time.Only returned in GET requests if view=FULL is set.
  2875. DefaultExpiration string `json:"defaultExpiration,omitempty"`
  2876. // Deployment: Code and application artifacts that make up this
  2877. // version.Only returned in GET requests if view=FULL is set.
  2878. Deployment *Deployment `json:"deployment,omitempty"`
  2879. // DiskUsageBytes: Total size in bytes of all the files that are
  2880. // included in this version and currently hosted on the App Engine
  2881. // disk.@OutputOnly
  2882. DiskUsageBytes int64 `json:"diskUsageBytes,omitempty,string"`
  2883. // EndpointsApiService: Cloud Endpoints configuration.If
  2884. // endpoints_api_service is set, the Cloud Endpoints Extensible Service
  2885. // Proxy will be provided to serve the API implemented by the app.
  2886. EndpointsApiService *EndpointsApiService `json:"endpointsApiService,omitempty"`
  2887. // Entrypoint: The entrypoint for the application.
  2888. Entrypoint *Entrypoint `json:"entrypoint,omitempty"`
  2889. // Env: App Engine execution environment for this version.Defaults to
  2890. // standard.
  2891. Env string `json:"env,omitempty"`
  2892. // EnvVariables: Environment variables available to the application.Only
  2893. // returned in GET requests if view=FULL is set.
  2894. EnvVariables map[string]string `json:"envVariables,omitempty"`
  2895. // ErrorHandlers: Custom static error pages. Limited to 10KB per
  2896. // page.Only returned in GET requests if view=FULL is set.
  2897. ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"`
  2898. // Handlers: An ordered list of URL-matching patterns that should be
  2899. // applied to incoming requests. The first matching URL handles the
  2900. // request and other request handlers are not attempted.Only returned in
  2901. // GET requests if view=FULL is set.
  2902. Handlers []*UrlMap `json:"handlers,omitempty"`
  2903. // HealthCheck: Configures health checking for instances. Unhealthy
  2904. // instances are stopped and replaced with new instances. Only
  2905. // applicable in the App Engine flexible environment.Only returned in
  2906. // GET requests if view=FULL is set.
  2907. HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
  2908. // Id: Relative name of the version within the service. Example: v1.
  2909. // Version names can contain only lowercase letters, numbers, or
  2910. // hyphens. Reserved names: "default", "latest", and any name with the
  2911. // prefix "ah-".
  2912. Id string `json:"id,omitempty"`
  2913. // InboundServices: Before an application can receive email or XMPP
  2914. // messages, the application must be configured to enable the service.
  2915. //
  2916. // Possible values:
  2917. // "INBOUND_SERVICE_UNSPECIFIED" - Not specified.
  2918. // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail.
  2919. // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive
  2920. // email-bound notifications.
  2921. // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive
  2922. // error stanzas.
  2923. // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive
  2924. // instant messages.
  2925. // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive
  2926. // user subscription POSTs.
  2927. // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive
  2928. // a user's chat presence.
  2929. // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for
  2930. // notifications when a client connects or disconnects from a channel.
  2931. // "INBOUND_SERVICE_WARMUP" - Enables warmup requests.
  2932. InboundServices []string `json:"inboundServices,omitempty"`
  2933. // InstanceClass: Instance class that is used to run this version. Valid
  2934. // values are:
  2935. // AutomaticScaling: F1, F2, F4, F4_1G
  2936. // ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1
  2937. // for AutomaticScaling and B1 for ManualScaling or BasicScaling.
  2938. InstanceClass string `json:"instanceClass,omitempty"`
  2939. // Libraries: Configuration for third-party Python runtime libraries
  2940. // that are required by the application.Only returned in GET requests if
  2941. // view=FULL is set.
  2942. Libraries []*Library `json:"libraries,omitempty"`
  2943. // LivenessCheck: Configures liveness health checking for instances.
  2944. // Unhealthy instances are stopped and replaced with new instancesOnly
  2945. // returned in GET requests if view=FULL is set.
  2946. LivenessCheck *LivenessCheck `json:"livenessCheck,omitempty"`
  2947. // ManualScaling: A service with manual scaling runs continuously,
  2948. // allowing you to perform complex initialization and rely on the state
  2949. // of its memory over time.
  2950. ManualScaling *ManualScaling `json:"manualScaling,omitempty"`
  2951. // Name: Full path to the Version resource in the API. Example:
  2952. // apps/myapp/services/default/versions/v1.@OutputOnly
  2953. Name string `json:"name,omitempty"`
  2954. // Network: Extra network settings. Only applicable in the App Engine
  2955. // flexible environment.
  2956. Network *Network `json:"network,omitempty"`
  2957. // NobuildFilesRegex: Files that match this pattern will not be built
  2958. // into this version. Only applicable for Go runtimes.Only returned in
  2959. // GET requests if view=FULL is set.
  2960. NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"`
  2961. // ReadinessCheck: Configures readiness health checking for instances.
  2962. // Unhealthy instances are not put into the backend traffic
  2963. // rotation.Only returned in GET requests if view=FULL is set.
  2964. ReadinessCheck *ReadinessCheck `json:"readinessCheck,omitempty"`
  2965. // Resources: Machine resources for this version. Only applicable in the
  2966. // App Engine flexible environment.
  2967. Resources *Resources `json:"resources,omitempty"`
  2968. // Runtime: Desired runtime. Example: python27.
  2969. Runtime string `json:"runtime,omitempty"`
  2970. // RuntimeApiVersion: The version of the API in the given runtime
  2971. // environment. Please see the app.yaml reference for valid values at
  2972. // https://cloud.google.com/appengine/docs/standard/<language>/config/appref
  2973. RuntimeApiVersion string `json:"runtimeApiVersion,omitempty"`
  2974. // RuntimeChannel: The channel of the runtime to use. Only available for
  2975. // some runtimes. Defaults to the default channel.
  2976. RuntimeChannel string `json:"runtimeChannel,omitempty"`
  2977. // RuntimeMainExecutablePath: The path or name of the app's main
  2978. // executable.
  2979. RuntimeMainExecutablePath string `json:"runtimeMainExecutablePath,omitempty"`
  2980. // ServingStatus: Current serving status of this version. Only the
  2981. // versions with a SERVING status create instances and can be
  2982. // billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to
  2983. // SERVING.
  2984. //
  2985. // Possible values:
  2986. // "SERVING_STATUS_UNSPECIFIED" - Not specified.
  2987. // "SERVING" - Currently serving. Instances are created according to
  2988. // the scaling settings of the version.
  2989. // "STOPPED" - Disabled. No instances will be created and the scaling
  2990. // settings are ignored until the state of the version changes to
  2991. // SERVING.
  2992. ServingStatus string `json:"servingStatus,omitempty"`
  2993. // Threadsafe: Whether multiple requests can be dispatched to this
  2994. // version at once.
  2995. Threadsafe bool `json:"threadsafe,omitempty"`
  2996. // VersionUrl: Serving URL for this version. Example:
  2997. // "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly
  2998. VersionUrl string `json:"versionUrl,omitempty"`
  2999. // Vm: Whether to deploy this version in a container on a virtual
  3000. // machine.
  3001. Vm bool `json:"vm,omitempty"`
  3002. // Zones: The Google Compute Engine zones that are supported by this
  3003. // version in the App Engine flexible environment. Deprecated.
  3004. Zones []string `json:"zones,omitempty"`
  3005. // ServerResponse contains the HTTP response code and headers from the
  3006. // server.
  3007. googleapi.ServerResponse `json:"-"`
  3008. // ForceSendFields is a list of field names (e.g. "ApiConfig") to
  3009. // unconditionally include in API requests. By default, fields with
  3010. // empty values are omitted from API requests. However, any non-pointer,
  3011. // non-interface field appearing in ForceSendFields will be sent to the
  3012. // server regardless of whether the field is empty or not. This may be
  3013. // used to include empty fields in Patch requests.
  3014. ForceSendFields []string `json:"-"`
  3015. // NullFields is a list of field names (e.g. "ApiConfig") to include in
  3016. // API requests with the JSON null value. By default, fields with empty
  3017. // values are omitted from API requests. However, any field with an
  3018. // empty value appearing in NullFields will be sent to the server as
  3019. // null. It is an error if a field in this list has a non-empty value.
  3020. // This may be used to include null fields in Patch requests.
  3021. NullFields []string `json:"-"`
  3022. }
  3023. func (s *Version) MarshalJSON() ([]byte, error) {
  3024. type NoMethod Version
  3025. raw := NoMethod(*s)
  3026. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3027. }
  3028. // Volume: Volumes mounted within the app container. Only applicable in
  3029. // the App Engine flexible environment.
  3030. type Volume struct {
  3031. // Name: Unique name for the volume.
  3032. Name string `json:"name,omitempty"`
  3033. // SizeGb: Volume size in gigabytes.
  3034. SizeGb float64 `json:"sizeGb,omitempty"`
  3035. // VolumeType: Underlying volume type, e.g. 'tmpfs'.
  3036. VolumeType string `json:"volumeType,omitempty"`
  3037. // ForceSendFields is a list of field names (e.g. "Name") to
  3038. // unconditionally include in API requests. By default, fields with
  3039. // empty values are omitted from API requests. However, any non-pointer,
  3040. // non-interface field appearing in ForceSendFields will be sent to the
  3041. // server regardless of whether the field is empty or not. This may be
  3042. // used to include empty fields in Patch requests.
  3043. ForceSendFields []string `json:"-"`
  3044. // NullFields is a list of field names (e.g. "Name") to include in API
  3045. // requests with the JSON null value. By default, fields with empty
  3046. // values are omitted from API requests. However, any field with an
  3047. // empty value appearing in NullFields will be sent to the server as
  3048. // null. It is an error if a field in this list has a non-empty value.
  3049. // This may be used to include null fields in Patch requests.
  3050. NullFields []string `json:"-"`
  3051. }
  3052. func (s *Volume) MarshalJSON() ([]byte, error) {
  3053. type NoMethod Volume
  3054. raw := NoMethod(*s)
  3055. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3056. }
  3057. func (s *Volume) UnmarshalJSON(data []byte) error {
  3058. type NoMethod Volume
  3059. var s1 struct {
  3060. SizeGb gensupport.JSONFloat64 `json:"sizeGb"`
  3061. *NoMethod
  3062. }
  3063. s1.NoMethod = (*NoMethod)(s)
  3064. if err := json.Unmarshal(data, &s1); err != nil {
  3065. return err
  3066. }
  3067. s.SizeGb = float64(s1.SizeGb)
  3068. return nil
  3069. }
  3070. // ZipInfo: The zip file information for a zip deployment.
  3071. type ZipInfo struct {
  3072. // FilesCount: An estimate of the number of files in a zip for a zip
  3073. // deployment. If set, must be greater than or equal to the actual
  3074. // number of files. Used for optimizing performance; if not provided,
  3075. // deployment may be slow.
  3076. FilesCount int64 `json:"filesCount,omitempty"`
  3077. // SourceUrl: URL of the zip file to deploy from. Must be a URL to a
  3078. // resource in Google Cloud Storage in the form
  3079. // 'http(s)://storage.googleapis.com/<bucket>/<object>'.
  3080. SourceUrl string `json:"sourceUrl,omitempty"`
  3081. // ForceSendFields is a list of field names (e.g. "FilesCount") to
  3082. // unconditionally include in API requests. By default, fields with
  3083. // empty values are omitted from API requests. However, any non-pointer,
  3084. // non-interface field appearing in ForceSendFields will be sent to the
  3085. // server regardless of whether the field is empty or not. This may be
  3086. // used to include empty fields in Patch requests.
  3087. ForceSendFields []string `json:"-"`
  3088. // NullFields is a list of field names (e.g. "FilesCount") to include in
  3089. // API requests with the JSON null value. By default, fields with empty
  3090. // values are omitted from API requests. However, any field with an
  3091. // empty value appearing in NullFields will be sent to the server as
  3092. // null. It is an error if a field in this list has a non-empty value.
  3093. // This may be used to include null fields in Patch requests.
  3094. NullFields []string `json:"-"`
  3095. }
  3096. func (s *ZipInfo) MarshalJSON() ([]byte, error) {
  3097. type NoMethod ZipInfo
  3098. raw := NoMethod(*s)
  3099. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3100. }
  3101. // method id "appengine.apps.create":
  3102. type AppsCreateCall struct {
  3103. s *APIService
  3104. application *Application
  3105. urlParams_ gensupport.URLParams
  3106. ctx_ context.Context
  3107. header_ http.Header
  3108. }
  3109. // Create: Creates an App Engine application for a Google Cloud Platform
  3110. // project. Required fields:
  3111. // id - The ID of the target Cloud Platform project.
  3112. // location - The region
  3113. // (https://cloud.google.com/appengine/docs/locations) where you want
  3114. // the App Engine application located.For more information about App
  3115. // Engine applications, see Managing Projects, Applications, and Billing
  3116. // (https://cloud.google.com/appengine/docs/standard/python/console/).
  3117. func (r *AppsService) Create(application *Application) *AppsCreateCall {
  3118. c := &AppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3119. c.application = application
  3120. return c
  3121. }
  3122. // Fields allows partial responses to be retrieved. See
  3123. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3124. // for more information.
  3125. func (c *AppsCreateCall) Fields(s ...googleapi.Field) *AppsCreateCall {
  3126. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3127. return c
  3128. }
  3129. // Context sets the context to be used in this call's Do method. Any
  3130. // pending HTTP request will be aborted if the provided context is
  3131. // canceled.
  3132. func (c *AppsCreateCall) Context(ctx context.Context) *AppsCreateCall {
  3133. c.ctx_ = ctx
  3134. return c
  3135. }
  3136. // Header returns an http.Header that can be modified by the caller to
  3137. // add HTTP headers to the request.
  3138. func (c *AppsCreateCall) Header() http.Header {
  3139. if c.header_ == nil {
  3140. c.header_ = make(http.Header)
  3141. }
  3142. return c.header_
  3143. }
  3144. func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) {
  3145. reqHeaders := make(http.Header)
  3146. for k, v := range c.header_ {
  3147. reqHeaders[k] = v
  3148. }
  3149. reqHeaders.Set("User-Agent", c.s.userAgent())
  3150. var body io.Reader = nil
  3151. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  3152. if err != nil {
  3153. return nil, err
  3154. }
  3155. reqHeaders.Set("Content-Type", "application/json")
  3156. c.urlParams_.Set("alt", alt)
  3157. c.urlParams_.Set("prettyPrint", "false")
  3158. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps")
  3159. urls += "?" + c.urlParams_.Encode()
  3160. req, err := http.NewRequest("POST", urls, body)
  3161. if err != nil {
  3162. return nil, err
  3163. }
  3164. req.Header = reqHeaders
  3165. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3166. }
  3167. // Do executes the "appengine.apps.create" call.
  3168. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3169. // status code is an error. Response headers are in either
  3170. // *Operation.ServerResponse.Header or (if a response was returned at
  3171. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3172. // to check whether the returned error was because
  3173. // http.StatusNotModified was returned.
  3174. func (c *AppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3175. gensupport.SetOptions(c.urlParams_, opts...)
  3176. res, err := c.doRequest("json")
  3177. if res != nil && res.StatusCode == http.StatusNotModified {
  3178. if res.Body != nil {
  3179. res.Body.Close()
  3180. }
  3181. return nil, &googleapi.Error{
  3182. Code: res.StatusCode,
  3183. Header: res.Header,
  3184. }
  3185. }
  3186. if err != nil {
  3187. return nil, err
  3188. }
  3189. defer googleapi.CloseBody(res)
  3190. if err := googleapi.CheckResponse(res); err != nil {
  3191. return nil, err
  3192. }
  3193. ret := &Operation{
  3194. ServerResponse: googleapi.ServerResponse{
  3195. Header: res.Header,
  3196. HTTPStatusCode: res.StatusCode,
  3197. },
  3198. }
  3199. target := &ret
  3200. if err := gensupport.DecodeResponse(target, res); err != nil {
  3201. return nil, err
  3202. }
  3203. return ret, nil
  3204. // {
  3205. // "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/).",
  3206. // "flatPath": "v1/apps",
  3207. // "httpMethod": "POST",
  3208. // "id": "appengine.apps.create",
  3209. // "parameterOrder": [],
  3210. // "parameters": {},
  3211. // "path": "v1/apps",
  3212. // "request": {
  3213. // "$ref": "Application"
  3214. // },
  3215. // "response": {
  3216. // "$ref": "Operation"
  3217. // },
  3218. // "scopes": [
  3219. // "https://www.googleapis.com/auth/cloud-platform"
  3220. // ]
  3221. // }
  3222. }
  3223. // method id "appengine.apps.get":
  3224. type AppsGetCall struct {
  3225. s *APIService
  3226. appsId string
  3227. urlParams_ gensupport.URLParams
  3228. ifNoneMatch_ string
  3229. ctx_ context.Context
  3230. header_ http.Header
  3231. }
  3232. // Get: Gets information about an application.
  3233. func (r *AppsService) Get(appsId string) *AppsGetCall {
  3234. c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3235. c.appsId = appsId
  3236. return c
  3237. }
  3238. // Fields allows partial responses to be retrieved. See
  3239. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3240. // for more information.
  3241. func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
  3242. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3243. return c
  3244. }
  3245. // IfNoneMatch sets the optional parameter which makes the operation
  3246. // fail if the object's ETag matches the given value. This is useful for
  3247. // getting updates only after the object has changed since the last
  3248. // request. Use googleapi.IsNotModified to check whether the response
  3249. // error from Do is the result of In-None-Match.
  3250. func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
  3251. c.ifNoneMatch_ = entityTag
  3252. return c
  3253. }
  3254. // Context sets the context to be used in this call's Do method. Any
  3255. // pending HTTP request will be aborted if the provided context is
  3256. // canceled.
  3257. func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
  3258. c.ctx_ = ctx
  3259. return c
  3260. }
  3261. // Header returns an http.Header that can be modified by the caller to
  3262. // add HTTP headers to the request.
  3263. func (c *AppsGetCall) Header() http.Header {
  3264. if c.header_ == nil {
  3265. c.header_ = make(http.Header)
  3266. }
  3267. return c.header_
  3268. }
  3269. func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
  3270. reqHeaders := make(http.Header)
  3271. for k, v := range c.header_ {
  3272. reqHeaders[k] = v
  3273. }
  3274. reqHeaders.Set("User-Agent", c.s.userAgent())
  3275. if c.ifNoneMatch_ != "" {
  3276. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3277. }
  3278. var body io.Reader = nil
  3279. c.urlParams_.Set("alt", alt)
  3280. c.urlParams_.Set("prettyPrint", "false")
  3281. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}")
  3282. urls += "?" + c.urlParams_.Encode()
  3283. req, err := http.NewRequest("GET", urls, body)
  3284. if err != nil {
  3285. return nil, err
  3286. }
  3287. req.Header = reqHeaders
  3288. googleapi.Expand(req.URL, map[string]string{
  3289. "appsId": c.appsId,
  3290. })
  3291. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3292. }
  3293. // Do executes the "appengine.apps.get" call.
  3294. // Exactly one of *Application or error will be non-nil. Any non-2xx
  3295. // status code is an error. Response headers are in either
  3296. // *Application.ServerResponse.Header or (if a response was returned at
  3297. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3298. // to check whether the returned error was because
  3299. // http.StatusNotModified was returned.
  3300. func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
  3301. gensupport.SetOptions(c.urlParams_, opts...)
  3302. res, err := c.doRequest("json")
  3303. if res != nil && res.StatusCode == http.StatusNotModified {
  3304. if res.Body != nil {
  3305. res.Body.Close()
  3306. }
  3307. return nil, &googleapi.Error{
  3308. Code: res.StatusCode,
  3309. Header: res.Header,
  3310. }
  3311. }
  3312. if err != nil {
  3313. return nil, err
  3314. }
  3315. defer googleapi.CloseBody(res)
  3316. if err := googleapi.CheckResponse(res); err != nil {
  3317. return nil, err
  3318. }
  3319. ret := &Application{
  3320. ServerResponse: googleapi.ServerResponse{
  3321. Header: res.Header,
  3322. HTTPStatusCode: res.StatusCode,
  3323. },
  3324. }
  3325. target := &ret
  3326. if err := gensupport.DecodeResponse(target, res); err != nil {
  3327. return nil, err
  3328. }
  3329. return ret, nil
  3330. // {
  3331. // "description": "Gets information about an application.",
  3332. // "flatPath": "v1/apps/{appsId}",
  3333. // "httpMethod": "GET",
  3334. // "id": "appengine.apps.get",
  3335. // "parameterOrder": [
  3336. // "appsId"
  3337. // ],
  3338. // "parameters": {
  3339. // "appsId": {
  3340. // "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.",
  3341. // "location": "path",
  3342. // "required": true,
  3343. // "type": "string"
  3344. // }
  3345. // },
  3346. // "path": "v1/apps/{appsId}",
  3347. // "response": {
  3348. // "$ref": "Application"
  3349. // },
  3350. // "scopes": [
  3351. // "https://www.googleapis.com/auth/appengine.admin",
  3352. // "https://www.googleapis.com/auth/cloud-platform",
  3353. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3354. // ]
  3355. // }
  3356. }
  3357. // method id "appengine.apps.patch":
  3358. type AppsPatchCall struct {
  3359. s *APIService
  3360. appsId string
  3361. application *Application
  3362. urlParams_ gensupport.URLParams
  3363. ctx_ context.Context
  3364. header_ http.Header
  3365. }
  3366. // Patch: Updates the specified Application resource. You can update the
  3367. // following fields:
  3368. // auth_domain - Google authentication domain for controlling user
  3369. // access to the application.
  3370. // default_cookie_expiration - Cookie expiration policy for the
  3371. // application.
  3372. func (r *AppsService) Patch(appsId string, application *Application) *AppsPatchCall {
  3373. c := &AppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3374. c.appsId = appsId
  3375. c.application = application
  3376. return c
  3377. }
  3378. // UpdateMask sets the optional parameter "updateMask": Standard field
  3379. // mask for the set of fields to be updated.
  3380. func (c *AppsPatchCall) UpdateMask(updateMask string) *AppsPatchCall {
  3381. c.urlParams_.Set("updateMask", updateMask)
  3382. return c
  3383. }
  3384. // Fields allows partial responses to be retrieved. See
  3385. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3386. // for more information.
  3387. func (c *AppsPatchCall) Fields(s ...googleapi.Field) *AppsPatchCall {
  3388. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3389. return c
  3390. }
  3391. // Context sets the context to be used in this call's Do method. Any
  3392. // pending HTTP request will be aborted if the provided context is
  3393. // canceled.
  3394. func (c *AppsPatchCall) Context(ctx context.Context) *AppsPatchCall {
  3395. c.ctx_ = ctx
  3396. return c
  3397. }
  3398. // Header returns an http.Header that can be modified by the caller to
  3399. // add HTTP headers to the request.
  3400. func (c *AppsPatchCall) Header() http.Header {
  3401. if c.header_ == nil {
  3402. c.header_ = make(http.Header)
  3403. }
  3404. return c.header_
  3405. }
  3406. func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) {
  3407. reqHeaders := make(http.Header)
  3408. for k, v := range c.header_ {
  3409. reqHeaders[k] = v
  3410. }
  3411. reqHeaders.Set("User-Agent", c.s.userAgent())
  3412. var body io.Reader = nil
  3413. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  3414. if err != nil {
  3415. return nil, err
  3416. }
  3417. reqHeaders.Set("Content-Type", "application/json")
  3418. c.urlParams_.Set("alt", alt)
  3419. c.urlParams_.Set("prettyPrint", "false")
  3420. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}")
  3421. urls += "?" + c.urlParams_.Encode()
  3422. req, err := http.NewRequest("PATCH", urls, body)
  3423. if err != nil {
  3424. return nil, err
  3425. }
  3426. req.Header = reqHeaders
  3427. googleapi.Expand(req.URL, map[string]string{
  3428. "appsId": c.appsId,
  3429. })
  3430. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3431. }
  3432. // Do executes the "appengine.apps.patch" call.
  3433. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3434. // status code is an error. Response headers are in either
  3435. // *Operation.ServerResponse.Header or (if a response was returned at
  3436. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3437. // to check whether the returned error was because
  3438. // http.StatusNotModified was returned.
  3439. func (c *AppsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3440. gensupport.SetOptions(c.urlParams_, opts...)
  3441. res, err := c.doRequest("json")
  3442. if res != nil && res.StatusCode == http.StatusNotModified {
  3443. if res.Body != nil {
  3444. res.Body.Close()
  3445. }
  3446. return nil, &googleapi.Error{
  3447. Code: res.StatusCode,
  3448. Header: res.Header,
  3449. }
  3450. }
  3451. if err != nil {
  3452. return nil, err
  3453. }
  3454. defer googleapi.CloseBody(res)
  3455. if err := googleapi.CheckResponse(res); err != nil {
  3456. return nil, err
  3457. }
  3458. ret := &Operation{
  3459. ServerResponse: googleapi.ServerResponse{
  3460. Header: res.Header,
  3461. HTTPStatusCode: res.StatusCode,
  3462. },
  3463. }
  3464. target := &ret
  3465. if err := gensupport.DecodeResponse(target, res); err != nil {
  3466. return nil, err
  3467. }
  3468. return ret, nil
  3469. // {
  3470. // "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.",
  3471. // "flatPath": "v1/apps/{appsId}",
  3472. // "httpMethod": "PATCH",
  3473. // "id": "appengine.apps.patch",
  3474. // "parameterOrder": [
  3475. // "appsId"
  3476. // ],
  3477. // "parameters": {
  3478. // "appsId": {
  3479. // "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.",
  3480. // "location": "path",
  3481. // "required": true,
  3482. // "type": "string"
  3483. // },
  3484. // "updateMask": {
  3485. // "description": "Standard field mask for the set of fields to be updated.",
  3486. // "format": "google-fieldmask",
  3487. // "location": "query",
  3488. // "type": "string"
  3489. // }
  3490. // },
  3491. // "path": "v1/apps/{appsId}",
  3492. // "request": {
  3493. // "$ref": "Application"
  3494. // },
  3495. // "response": {
  3496. // "$ref": "Operation"
  3497. // },
  3498. // "scopes": [
  3499. // "https://www.googleapis.com/auth/cloud-platform"
  3500. // ]
  3501. // }
  3502. }
  3503. // method id "appengine.apps.repair":
  3504. type AppsRepairCall struct {
  3505. s *APIService
  3506. appsId string
  3507. repairapplicationrequest *RepairApplicationRequest
  3508. urlParams_ gensupport.URLParams
  3509. ctx_ context.Context
  3510. header_ http.Header
  3511. }
  3512. // Repair: Recreates the required App Engine features for the specified
  3513. // App Engine application, for example a Cloud Storage bucket or App
  3514. // Engine service account. Use this method if you receive an error
  3515. // message about a missing feature, for example, Error retrieving the
  3516. // App Engine service account.
  3517. func (r *AppsService) Repair(appsId string, repairapplicationrequest *RepairApplicationRequest) *AppsRepairCall {
  3518. c := &AppsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3519. c.appsId = appsId
  3520. c.repairapplicationrequest = repairapplicationrequest
  3521. return c
  3522. }
  3523. // Fields allows partial responses to be retrieved. See
  3524. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3525. // for more information.
  3526. func (c *AppsRepairCall) Fields(s ...googleapi.Field) *AppsRepairCall {
  3527. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3528. return c
  3529. }
  3530. // Context sets the context to be used in this call's Do method. Any
  3531. // pending HTTP request will be aborted if the provided context is
  3532. // canceled.
  3533. func (c *AppsRepairCall) Context(ctx context.Context) *AppsRepairCall {
  3534. c.ctx_ = ctx
  3535. return c
  3536. }
  3537. // Header returns an http.Header that can be modified by the caller to
  3538. // add HTTP headers to the request.
  3539. func (c *AppsRepairCall) Header() http.Header {
  3540. if c.header_ == nil {
  3541. c.header_ = make(http.Header)
  3542. }
  3543. return c.header_
  3544. }
  3545. func (c *AppsRepairCall) doRequest(alt string) (*http.Response, error) {
  3546. reqHeaders := make(http.Header)
  3547. for k, v := range c.header_ {
  3548. reqHeaders[k] = v
  3549. }
  3550. reqHeaders.Set("User-Agent", c.s.userAgent())
  3551. var body io.Reader = nil
  3552. body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairapplicationrequest)
  3553. if err != nil {
  3554. return nil, err
  3555. }
  3556. reqHeaders.Set("Content-Type", "application/json")
  3557. c.urlParams_.Set("alt", alt)
  3558. c.urlParams_.Set("prettyPrint", "false")
  3559. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}:repair")
  3560. urls += "?" + c.urlParams_.Encode()
  3561. req, err := http.NewRequest("POST", urls, body)
  3562. if err != nil {
  3563. return nil, err
  3564. }
  3565. req.Header = reqHeaders
  3566. googleapi.Expand(req.URL, map[string]string{
  3567. "appsId": c.appsId,
  3568. })
  3569. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3570. }
  3571. // Do executes the "appengine.apps.repair" call.
  3572. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3573. // status code is an error. Response headers are in either
  3574. // *Operation.ServerResponse.Header or (if a response was returned at
  3575. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3576. // to check whether the returned error was because
  3577. // http.StatusNotModified was returned.
  3578. func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3579. gensupport.SetOptions(c.urlParams_, opts...)
  3580. res, err := c.doRequest("json")
  3581. if res != nil && res.StatusCode == http.StatusNotModified {
  3582. if res.Body != nil {
  3583. res.Body.Close()
  3584. }
  3585. return nil, &googleapi.Error{
  3586. Code: res.StatusCode,
  3587. Header: res.Header,
  3588. }
  3589. }
  3590. if err != nil {
  3591. return nil, err
  3592. }
  3593. defer googleapi.CloseBody(res)
  3594. if err := googleapi.CheckResponse(res); err != nil {
  3595. return nil, err
  3596. }
  3597. ret := &Operation{
  3598. ServerResponse: googleapi.ServerResponse{
  3599. Header: res.Header,
  3600. HTTPStatusCode: res.StatusCode,
  3601. },
  3602. }
  3603. target := &ret
  3604. if err := gensupport.DecodeResponse(target, res); err != nil {
  3605. return nil, err
  3606. }
  3607. return ret, nil
  3608. // {
  3609. // "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.",
  3610. // "flatPath": "v1/apps/{appsId}:repair",
  3611. // "httpMethod": "POST",
  3612. // "id": "appengine.apps.repair",
  3613. // "parameterOrder": [
  3614. // "appsId"
  3615. // ],
  3616. // "parameters": {
  3617. // "appsId": {
  3618. // "description": "Part of `name`. Name of the application to repair. Example: apps/myapp",
  3619. // "location": "path",
  3620. // "required": true,
  3621. // "type": "string"
  3622. // }
  3623. // },
  3624. // "path": "v1/apps/{appsId}:repair",
  3625. // "request": {
  3626. // "$ref": "RepairApplicationRequest"
  3627. // },
  3628. // "response": {
  3629. // "$ref": "Operation"
  3630. // },
  3631. // "scopes": [
  3632. // "https://www.googleapis.com/auth/cloud-platform"
  3633. // ]
  3634. // }
  3635. }
  3636. // method id "appengine.apps.authorizedCertificates.create":
  3637. type AppsAuthorizedCertificatesCreateCall struct {
  3638. s *APIService
  3639. appsId string
  3640. authorizedcertificate *AuthorizedCertificate
  3641. urlParams_ gensupport.URLParams
  3642. ctx_ context.Context
  3643. header_ http.Header
  3644. }
  3645. // Create: Uploads the specified SSL certificate.
  3646. func (r *AppsAuthorizedCertificatesService) Create(appsId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesCreateCall {
  3647. c := &AppsAuthorizedCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3648. c.appsId = appsId
  3649. c.authorizedcertificate = authorizedcertificate
  3650. return c
  3651. }
  3652. // Fields allows partial responses to be retrieved. See
  3653. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3654. // for more information.
  3655. func (c *AppsAuthorizedCertificatesCreateCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesCreateCall {
  3656. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3657. return c
  3658. }
  3659. // Context sets the context to be used in this call's Do method. Any
  3660. // pending HTTP request will be aborted if the provided context is
  3661. // canceled.
  3662. func (c *AppsAuthorizedCertificatesCreateCall) Context(ctx context.Context) *AppsAuthorizedCertificatesCreateCall {
  3663. c.ctx_ = ctx
  3664. return c
  3665. }
  3666. // Header returns an http.Header that can be modified by the caller to
  3667. // add HTTP headers to the request.
  3668. func (c *AppsAuthorizedCertificatesCreateCall) Header() http.Header {
  3669. if c.header_ == nil {
  3670. c.header_ = make(http.Header)
  3671. }
  3672. return c.header_
  3673. }
  3674. func (c *AppsAuthorizedCertificatesCreateCall) doRequest(alt string) (*http.Response, error) {
  3675. reqHeaders := make(http.Header)
  3676. for k, v := range c.header_ {
  3677. reqHeaders[k] = v
  3678. }
  3679. reqHeaders.Set("User-Agent", c.s.userAgent())
  3680. var body io.Reader = nil
  3681. body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate)
  3682. if err != nil {
  3683. return nil, err
  3684. }
  3685. reqHeaders.Set("Content-Type", "application/json")
  3686. c.urlParams_.Set("alt", alt)
  3687. c.urlParams_.Set("prettyPrint", "false")
  3688. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates")
  3689. urls += "?" + c.urlParams_.Encode()
  3690. req, err := http.NewRequest("POST", urls, body)
  3691. if err != nil {
  3692. return nil, err
  3693. }
  3694. req.Header = reqHeaders
  3695. googleapi.Expand(req.URL, map[string]string{
  3696. "appsId": c.appsId,
  3697. })
  3698. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3699. }
  3700. // Do executes the "appengine.apps.authorizedCertificates.create" call.
  3701. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  3702. // non-2xx status code is an error. Response headers are in either
  3703. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  3704. // returned at all) in error.(*googleapi.Error).Header. Use
  3705. // googleapi.IsNotModified to check whether the returned error was
  3706. // because http.StatusNotModified was returned.
  3707. func (c *AppsAuthorizedCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  3708. gensupport.SetOptions(c.urlParams_, opts...)
  3709. res, err := c.doRequest("json")
  3710. if res != nil && res.StatusCode == http.StatusNotModified {
  3711. if res.Body != nil {
  3712. res.Body.Close()
  3713. }
  3714. return nil, &googleapi.Error{
  3715. Code: res.StatusCode,
  3716. Header: res.Header,
  3717. }
  3718. }
  3719. if err != nil {
  3720. return nil, err
  3721. }
  3722. defer googleapi.CloseBody(res)
  3723. if err := googleapi.CheckResponse(res); err != nil {
  3724. return nil, err
  3725. }
  3726. ret := &AuthorizedCertificate{
  3727. ServerResponse: googleapi.ServerResponse{
  3728. Header: res.Header,
  3729. HTTPStatusCode: res.StatusCode,
  3730. },
  3731. }
  3732. target := &ret
  3733. if err := gensupport.DecodeResponse(target, res); err != nil {
  3734. return nil, err
  3735. }
  3736. return ret, nil
  3737. // {
  3738. // "description": "Uploads the specified SSL certificate.",
  3739. // "flatPath": "v1/apps/{appsId}/authorizedCertificates",
  3740. // "httpMethod": "POST",
  3741. // "id": "appengine.apps.authorizedCertificates.create",
  3742. // "parameterOrder": [
  3743. // "appsId"
  3744. // ],
  3745. // "parameters": {
  3746. // "appsId": {
  3747. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  3748. // "location": "path",
  3749. // "required": true,
  3750. // "type": "string"
  3751. // }
  3752. // },
  3753. // "path": "v1/apps/{appsId}/authorizedCertificates",
  3754. // "request": {
  3755. // "$ref": "AuthorizedCertificate"
  3756. // },
  3757. // "response": {
  3758. // "$ref": "AuthorizedCertificate"
  3759. // },
  3760. // "scopes": [
  3761. // "https://www.googleapis.com/auth/cloud-platform"
  3762. // ]
  3763. // }
  3764. }
  3765. // method id "appengine.apps.authorizedCertificates.delete":
  3766. type AppsAuthorizedCertificatesDeleteCall struct {
  3767. s *APIService
  3768. appsId string
  3769. authorizedCertificatesId string
  3770. urlParams_ gensupport.URLParams
  3771. ctx_ context.Context
  3772. header_ http.Header
  3773. }
  3774. // Delete: Deletes the specified SSL certificate.
  3775. func (r *AppsAuthorizedCertificatesService) Delete(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesDeleteCall {
  3776. c := &AppsAuthorizedCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3777. c.appsId = appsId
  3778. c.authorizedCertificatesId = authorizedCertificatesId
  3779. return c
  3780. }
  3781. // Fields allows partial responses to be retrieved. See
  3782. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3783. // for more information.
  3784. func (c *AppsAuthorizedCertificatesDeleteCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesDeleteCall {
  3785. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3786. return c
  3787. }
  3788. // Context sets the context to be used in this call's Do method. Any
  3789. // pending HTTP request will be aborted if the provided context is
  3790. // canceled.
  3791. func (c *AppsAuthorizedCertificatesDeleteCall) Context(ctx context.Context) *AppsAuthorizedCertificatesDeleteCall {
  3792. c.ctx_ = ctx
  3793. return c
  3794. }
  3795. // Header returns an http.Header that can be modified by the caller to
  3796. // add HTTP headers to the request.
  3797. func (c *AppsAuthorizedCertificatesDeleteCall) Header() http.Header {
  3798. if c.header_ == nil {
  3799. c.header_ = make(http.Header)
  3800. }
  3801. return c.header_
  3802. }
  3803. func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3804. reqHeaders := make(http.Header)
  3805. for k, v := range c.header_ {
  3806. reqHeaders[k] = v
  3807. }
  3808. reqHeaders.Set("User-Agent", c.s.userAgent())
  3809. var body io.Reader = nil
  3810. c.urlParams_.Set("alt", alt)
  3811. c.urlParams_.Set("prettyPrint", "false")
  3812. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  3813. urls += "?" + c.urlParams_.Encode()
  3814. req, err := http.NewRequest("DELETE", urls, body)
  3815. if err != nil {
  3816. return nil, err
  3817. }
  3818. req.Header = reqHeaders
  3819. googleapi.Expand(req.URL, map[string]string{
  3820. "appsId": c.appsId,
  3821. "authorizedCertificatesId": c.authorizedCertificatesId,
  3822. })
  3823. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3824. }
  3825. // Do executes the "appengine.apps.authorizedCertificates.delete" call.
  3826. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  3827. // code is an error. Response headers are in either
  3828. // *Empty.ServerResponse.Header or (if a response was returned at all)
  3829. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3830. // check whether the returned error was because http.StatusNotModified
  3831. // was returned.
  3832. func (c *AppsAuthorizedCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3833. gensupport.SetOptions(c.urlParams_, opts...)
  3834. res, err := c.doRequest("json")
  3835. if res != nil && res.StatusCode == http.StatusNotModified {
  3836. if res.Body != nil {
  3837. res.Body.Close()
  3838. }
  3839. return nil, &googleapi.Error{
  3840. Code: res.StatusCode,
  3841. Header: res.Header,
  3842. }
  3843. }
  3844. if err != nil {
  3845. return nil, err
  3846. }
  3847. defer googleapi.CloseBody(res)
  3848. if err := googleapi.CheckResponse(res); err != nil {
  3849. return nil, err
  3850. }
  3851. ret := &Empty{
  3852. ServerResponse: googleapi.ServerResponse{
  3853. Header: res.Header,
  3854. HTTPStatusCode: res.StatusCode,
  3855. },
  3856. }
  3857. target := &ret
  3858. if err := gensupport.DecodeResponse(target, res); err != nil {
  3859. return nil, err
  3860. }
  3861. return ret, nil
  3862. // {
  3863. // "description": "Deletes the specified SSL certificate.",
  3864. // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  3865. // "httpMethod": "DELETE",
  3866. // "id": "appengine.apps.authorizedCertificates.delete",
  3867. // "parameterOrder": [
  3868. // "appsId",
  3869. // "authorizedCertificatesId"
  3870. // ],
  3871. // "parameters": {
  3872. // "appsId": {
  3873. // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.",
  3874. // "location": "path",
  3875. // "required": true,
  3876. // "type": "string"
  3877. // },
  3878. // "authorizedCertificatesId": {
  3879. // "description": "Part of `name`. See documentation of `appsId`.",
  3880. // "location": "path",
  3881. // "required": true,
  3882. // "type": "string"
  3883. // }
  3884. // },
  3885. // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  3886. // "response": {
  3887. // "$ref": "Empty"
  3888. // },
  3889. // "scopes": [
  3890. // "https://www.googleapis.com/auth/cloud-platform"
  3891. // ]
  3892. // }
  3893. }
  3894. // method id "appengine.apps.authorizedCertificates.get":
  3895. type AppsAuthorizedCertificatesGetCall struct {
  3896. s *APIService
  3897. appsId string
  3898. authorizedCertificatesId string
  3899. urlParams_ gensupport.URLParams
  3900. ifNoneMatch_ string
  3901. ctx_ context.Context
  3902. header_ http.Header
  3903. }
  3904. // Get: Gets the specified SSL certificate.
  3905. func (r *AppsAuthorizedCertificatesService) Get(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesGetCall {
  3906. c := &AppsAuthorizedCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3907. c.appsId = appsId
  3908. c.authorizedCertificatesId = authorizedCertificatesId
  3909. return c
  3910. }
  3911. // View sets the optional parameter "view": Controls the set of fields
  3912. // returned in the GET response.
  3913. //
  3914. // Possible values:
  3915. // "BASIC_CERTIFICATE"
  3916. // "FULL_CERTIFICATE"
  3917. func (c *AppsAuthorizedCertificatesGetCall) View(view string) *AppsAuthorizedCertificatesGetCall {
  3918. c.urlParams_.Set("view", view)
  3919. return c
  3920. }
  3921. // Fields allows partial responses to be retrieved. See
  3922. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3923. // for more information.
  3924. func (c *AppsAuthorizedCertificatesGetCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesGetCall {
  3925. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3926. return c
  3927. }
  3928. // IfNoneMatch sets the optional parameter which makes the operation
  3929. // fail if the object's ETag matches the given value. This is useful for
  3930. // getting updates only after the object has changed since the last
  3931. // request. Use googleapi.IsNotModified to check whether the response
  3932. // error from Do is the result of In-None-Match.
  3933. func (c *AppsAuthorizedCertificatesGetCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesGetCall {
  3934. c.ifNoneMatch_ = entityTag
  3935. return c
  3936. }
  3937. // Context sets the context to be used in this call's Do method. Any
  3938. // pending HTTP request will be aborted if the provided context is
  3939. // canceled.
  3940. func (c *AppsAuthorizedCertificatesGetCall) Context(ctx context.Context) *AppsAuthorizedCertificatesGetCall {
  3941. c.ctx_ = ctx
  3942. return c
  3943. }
  3944. // Header returns an http.Header that can be modified by the caller to
  3945. // add HTTP headers to the request.
  3946. func (c *AppsAuthorizedCertificatesGetCall) Header() http.Header {
  3947. if c.header_ == nil {
  3948. c.header_ = make(http.Header)
  3949. }
  3950. return c.header_
  3951. }
  3952. func (c *AppsAuthorizedCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
  3953. reqHeaders := make(http.Header)
  3954. for k, v := range c.header_ {
  3955. reqHeaders[k] = v
  3956. }
  3957. reqHeaders.Set("User-Agent", c.s.userAgent())
  3958. if c.ifNoneMatch_ != "" {
  3959. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3960. }
  3961. var body io.Reader = nil
  3962. c.urlParams_.Set("alt", alt)
  3963. c.urlParams_.Set("prettyPrint", "false")
  3964. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  3965. urls += "?" + c.urlParams_.Encode()
  3966. req, err := http.NewRequest("GET", urls, body)
  3967. if err != nil {
  3968. return nil, err
  3969. }
  3970. req.Header = reqHeaders
  3971. googleapi.Expand(req.URL, map[string]string{
  3972. "appsId": c.appsId,
  3973. "authorizedCertificatesId": c.authorizedCertificatesId,
  3974. })
  3975. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3976. }
  3977. // Do executes the "appengine.apps.authorizedCertificates.get" call.
  3978. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  3979. // non-2xx status code is an error. Response headers are in either
  3980. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  3981. // returned at all) in error.(*googleapi.Error).Header. Use
  3982. // googleapi.IsNotModified to check whether the returned error was
  3983. // because http.StatusNotModified was returned.
  3984. func (c *AppsAuthorizedCertificatesGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  3985. gensupport.SetOptions(c.urlParams_, opts...)
  3986. res, err := c.doRequest("json")
  3987. if res != nil && res.StatusCode == http.StatusNotModified {
  3988. if res.Body != nil {
  3989. res.Body.Close()
  3990. }
  3991. return nil, &googleapi.Error{
  3992. Code: res.StatusCode,
  3993. Header: res.Header,
  3994. }
  3995. }
  3996. if err != nil {
  3997. return nil, err
  3998. }
  3999. defer googleapi.CloseBody(res)
  4000. if err := googleapi.CheckResponse(res); err != nil {
  4001. return nil, err
  4002. }
  4003. ret := &AuthorizedCertificate{
  4004. ServerResponse: googleapi.ServerResponse{
  4005. Header: res.Header,
  4006. HTTPStatusCode: res.StatusCode,
  4007. },
  4008. }
  4009. target := &ret
  4010. if err := gensupport.DecodeResponse(target, res); err != nil {
  4011. return nil, err
  4012. }
  4013. return ret, nil
  4014. // {
  4015. // "description": "Gets the specified SSL certificate.",
  4016. // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4017. // "httpMethod": "GET",
  4018. // "id": "appengine.apps.authorizedCertificates.get",
  4019. // "parameterOrder": [
  4020. // "appsId",
  4021. // "authorizedCertificatesId"
  4022. // ],
  4023. // "parameters": {
  4024. // "appsId": {
  4025. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.",
  4026. // "location": "path",
  4027. // "required": true,
  4028. // "type": "string"
  4029. // },
  4030. // "authorizedCertificatesId": {
  4031. // "description": "Part of `name`. See documentation of `appsId`.",
  4032. // "location": "path",
  4033. // "required": true,
  4034. // "type": "string"
  4035. // },
  4036. // "view": {
  4037. // "description": "Controls the set of fields returned in the GET response.",
  4038. // "enum": [
  4039. // "BASIC_CERTIFICATE",
  4040. // "FULL_CERTIFICATE"
  4041. // ],
  4042. // "location": "query",
  4043. // "type": "string"
  4044. // }
  4045. // },
  4046. // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4047. // "response": {
  4048. // "$ref": "AuthorizedCertificate"
  4049. // },
  4050. // "scopes": [
  4051. // "https://www.googleapis.com/auth/appengine.admin",
  4052. // "https://www.googleapis.com/auth/cloud-platform",
  4053. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4054. // ]
  4055. // }
  4056. }
  4057. // method id "appengine.apps.authorizedCertificates.list":
  4058. type AppsAuthorizedCertificatesListCall struct {
  4059. s *APIService
  4060. appsId string
  4061. urlParams_ gensupport.URLParams
  4062. ifNoneMatch_ string
  4063. ctx_ context.Context
  4064. header_ http.Header
  4065. }
  4066. // List: Lists all SSL certificates the user is authorized to
  4067. // administer.
  4068. func (r *AppsAuthorizedCertificatesService) List(appsId string) *AppsAuthorizedCertificatesListCall {
  4069. c := &AppsAuthorizedCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4070. c.appsId = appsId
  4071. return c
  4072. }
  4073. // PageSize sets the optional parameter "pageSize": Maximum results to
  4074. // return per page.
  4075. func (c *AppsAuthorizedCertificatesListCall) PageSize(pageSize int64) *AppsAuthorizedCertificatesListCall {
  4076. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4077. return c
  4078. }
  4079. // PageToken sets the optional parameter "pageToken": Continuation token
  4080. // for fetching the next page of results.
  4081. func (c *AppsAuthorizedCertificatesListCall) PageToken(pageToken string) *AppsAuthorizedCertificatesListCall {
  4082. c.urlParams_.Set("pageToken", pageToken)
  4083. return c
  4084. }
  4085. // View sets the optional parameter "view": Controls the set of fields
  4086. // returned in the LIST response.
  4087. //
  4088. // Possible values:
  4089. // "BASIC_CERTIFICATE"
  4090. // "FULL_CERTIFICATE"
  4091. func (c *AppsAuthorizedCertificatesListCall) View(view string) *AppsAuthorizedCertificatesListCall {
  4092. c.urlParams_.Set("view", view)
  4093. return c
  4094. }
  4095. // Fields allows partial responses to be retrieved. See
  4096. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4097. // for more information.
  4098. func (c *AppsAuthorizedCertificatesListCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesListCall {
  4099. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4100. return c
  4101. }
  4102. // IfNoneMatch sets the optional parameter which makes the operation
  4103. // fail if the object's ETag matches the given value. This is useful for
  4104. // getting updates only after the object has changed since the last
  4105. // request. Use googleapi.IsNotModified to check whether the response
  4106. // error from Do is the result of In-None-Match.
  4107. func (c *AppsAuthorizedCertificatesListCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesListCall {
  4108. c.ifNoneMatch_ = entityTag
  4109. return c
  4110. }
  4111. // Context sets the context to be used in this call's Do method. Any
  4112. // pending HTTP request will be aborted if the provided context is
  4113. // canceled.
  4114. func (c *AppsAuthorizedCertificatesListCall) Context(ctx context.Context) *AppsAuthorizedCertificatesListCall {
  4115. c.ctx_ = ctx
  4116. return c
  4117. }
  4118. // Header returns an http.Header that can be modified by the caller to
  4119. // add HTTP headers to the request.
  4120. func (c *AppsAuthorizedCertificatesListCall) Header() http.Header {
  4121. if c.header_ == nil {
  4122. c.header_ = make(http.Header)
  4123. }
  4124. return c.header_
  4125. }
  4126. func (c *AppsAuthorizedCertificatesListCall) doRequest(alt string) (*http.Response, error) {
  4127. reqHeaders := make(http.Header)
  4128. for k, v := range c.header_ {
  4129. reqHeaders[k] = v
  4130. }
  4131. reqHeaders.Set("User-Agent", c.s.userAgent())
  4132. if c.ifNoneMatch_ != "" {
  4133. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4134. }
  4135. var body io.Reader = nil
  4136. c.urlParams_.Set("alt", alt)
  4137. c.urlParams_.Set("prettyPrint", "false")
  4138. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates")
  4139. urls += "?" + c.urlParams_.Encode()
  4140. req, err := http.NewRequest("GET", urls, body)
  4141. if err != nil {
  4142. return nil, err
  4143. }
  4144. req.Header = reqHeaders
  4145. googleapi.Expand(req.URL, map[string]string{
  4146. "appsId": c.appsId,
  4147. })
  4148. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4149. }
  4150. // Do executes the "appengine.apps.authorizedCertificates.list" call.
  4151. // Exactly one of *ListAuthorizedCertificatesResponse or error will be
  4152. // non-nil. Any non-2xx status code is an error. Response headers are in
  4153. // either *ListAuthorizedCertificatesResponse.ServerResponse.Header or
  4154. // (if a response was returned at all) in
  4155. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4156. // whether the returned error was because http.StatusNotModified was
  4157. // returned.
  4158. func (c *AppsAuthorizedCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedCertificatesResponse, error) {
  4159. gensupport.SetOptions(c.urlParams_, opts...)
  4160. res, err := c.doRequest("json")
  4161. if res != nil && res.StatusCode == http.StatusNotModified {
  4162. if res.Body != nil {
  4163. res.Body.Close()
  4164. }
  4165. return nil, &googleapi.Error{
  4166. Code: res.StatusCode,
  4167. Header: res.Header,
  4168. }
  4169. }
  4170. if err != nil {
  4171. return nil, err
  4172. }
  4173. defer googleapi.CloseBody(res)
  4174. if err := googleapi.CheckResponse(res); err != nil {
  4175. return nil, err
  4176. }
  4177. ret := &ListAuthorizedCertificatesResponse{
  4178. ServerResponse: googleapi.ServerResponse{
  4179. Header: res.Header,
  4180. HTTPStatusCode: res.StatusCode,
  4181. },
  4182. }
  4183. target := &ret
  4184. if err := gensupport.DecodeResponse(target, res); err != nil {
  4185. return nil, err
  4186. }
  4187. return ret, nil
  4188. // {
  4189. // "description": "Lists all SSL certificates the user is authorized to administer.",
  4190. // "flatPath": "v1/apps/{appsId}/authorizedCertificates",
  4191. // "httpMethod": "GET",
  4192. // "id": "appengine.apps.authorizedCertificates.list",
  4193. // "parameterOrder": [
  4194. // "appsId"
  4195. // ],
  4196. // "parameters": {
  4197. // "appsId": {
  4198. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4199. // "location": "path",
  4200. // "required": true,
  4201. // "type": "string"
  4202. // },
  4203. // "pageSize": {
  4204. // "description": "Maximum results to return per page.",
  4205. // "format": "int32",
  4206. // "location": "query",
  4207. // "type": "integer"
  4208. // },
  4209. // "pageToken": {
  4210. // "description": "Continuation token for fetching the next page of results.",
  4211. // "location": "query",
  4212. // "type": "string"
  4213. // },
  4214. // "view": {
  4215. // "description": "Controls the set of fields returned in the LIST response.",
  4216. // "enum": [
  4217. // "BASIC_CERTIFICATE",
  4218. // "FULL_CERTIFICATE"
  4219. // ],
  4220. // "location": "query",
  4221. // "type": "string"
  4222. // }
  4223. // },
  4224. // "path": "v1/apps/{appsId}/authorizedCertificates",
  4225. // "response": {
  4226. // "$ref": "ListAuthorizedCertificatesResponse"
  4227. // },
  4228. // "scopes": [
  4229. // "https://www.googleapis.com/auth/appengine.admin",
  4230. // "https://www.googleapis.com/auth/cloud-platform",
  4231. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4232. // ]
  4233. // }
  4234. }
  4235. // Pages invokes f for each page of results.
  4236. // A non-nil error returned from f will halt the iteration.
  4237. // The provided context supersedes any context provided to the Context method.
  4238. func (c *AppsAuthorizedCertificatesListCall) Pages(ctx context.Context, f func(*ListAuthorizedCertificatesResponse) error) error {
  4239. c.ctx_ = ctx
  4240. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4241. for {
  4242. x, err := c.Do()
  4243. if err != nil {
  4244. return err
  4245. }
  4246. if err := f(x); err != nil {
  4247. return err
  4248. }
  4249. if x.NextPageToken == "" {
  4250. return nil
  4251. }
  4252. c.PageToken(x.NextPageToken)
  4253. }
  4254. }
  4255. // method id "appengine.apps.authorizedCertificates.patch":
  4256. type AppsAuthorizedCertificatesPatchCall struct {
  4257. s *APIService
  4258. appsId string
  4259. authorizedCertificatesId string
  4260. authorizedcertificate *AuthorizedCertificate
  4261. urlParams_ gensupport.URLParams
  4262. ctx_ context.Context
  4263. header_ http.Header
  4264. }
  4265. // Patch: Updates the specified SSL certificate. To renew a certificate
  4266. // and maintain its existing domain mappings, update certificate_data
  4267. // with a new certificate. The new certificate must be applicable to the
  4268. // same domains as the original certificate. The certificate
  4269. // display_name may also be updated.
  4270. func (r *AppsAuthorizedCertificatesService) Patch(appsId string, authorizedCertificatesId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesPatchCall {
  4271. c := &AppsAuthorizedCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4272. c.appsId = appsId
  4273. c.authorizedCertificatesId = authorizedCertificatesId
  4274. c.authorizedcertificate = authorizedcertificate
  4275. return c
  4276. }
  4277. // UpdateMask sets the optional parameter "updateMask": Standard field
  4278. // mask for the set of fields to be updated. Updates are only supported
  4279. // on the certificate_raw_data and display_name fields.
  4280. func (c *AppsAuthorizedCertificatesPatchCall) UpdateMask(updateMask string) *AppsAuthorizedCertificatesPatchCall {
  4281. c.urlParams_.Set("updateMask", updateMask)
  4282. return c
  4283. }
  4284. // Fields allows partial responses to be retrieved. See
  4285. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4286. // for more information.
  4287. func (c *AppsAuthorizedCertificatesPatchCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesPatchCall {
  4288. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4289. return c
  4290. }
  4291. // Context sets the context to be used in this call's Do method. Any
  4292. // pending HTTP request will be aborted if the provided context is
  4293. // canceled.
  4294. func (c *AppsAuthorizedCertificatesPatchCall) Context(ctx context.Context) *AppsAuthorizedCertificatesPatchCall {
  4295. c.ctx_ = ctx
  4296. return c
  4297. }
  4298. // Header returns an http.Header that can be modified by the caller to
  4299. // add HTTP headers to the request.
  4300. func (c *AppsAuthorizedCertificatesPatchCall) Header() http.Header {
  4301. if c.header_ == nil {
  4302. c.header_ = make(http.Header)
  4303. }
  4304. return c.header_
  4305. }
  4306. func (c *AppsAuthorizedCertificatesPatchCall) doRequest(alt string) (*http.Response, error) {
  4307. reqHeaders := make(http.Header)
  4308. for k, v := range c.header_ {
  4309. reqHeaders[k] = v
  4310. }
  4311. reqHeaders.Set("User-Agent", c.s.userAgent())
  4312. var body io.Reader = nil
  4313. body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate)
  4314. if err != nil {
  4315. return nil, err
  4316. }
  4317. reqHeaders.Set("Content-Type", "application/json")
  4318. c.urlParams_.Set("alt", alt)
  4319. c.urlParams_.Set("prettyPrint", "false")
  4320. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  4321. urls += "?" + c.urlParams_.Encode()
  4322. req, err := http.NewRequest("PATCH", urls, body)
  4323. if err != nil {
  4324. return nil, err
  4325. }
  4326. req.Header = reqHeaders
  4327. googleapi.Expand(req.URL, map[string]string{
  4328. "appsId": c.appsId,
  4329. "authorizedCertificatesId": c.authorizedCertificatesId,
  4330. })
  4331. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4332. }
  4333. // Do executes the "appengine.apps.authorizedCertificates.patch" call.
  4334. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  4335. // non-2xx status code is an error. Response headers are in either
  4336. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  4337. // returned at all) in error.(*googleapi.Error).Header. Use
  4338. // googleapi.IsNotModified to check whether the returned error was
  4339. // because http.StatusNotModified was returned.
  4340. func (c *AppsAuthorizedCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  4341. gensupport.SetOptions(c.urlParams_, opts...)
  4342. res, err := c.doRequest("json")
  4343. if res != nil && res.StatusCode == http.StatusNotModified {
  4344. if res.Body != nil {
  4345. res.Body.Close()
  4346. }
  4347. return nil, &googleapi.Error{
  4348. Code: res.StatusCode,
  4349. Header: res.Header,
  4350. }
  4351. }
  4352. if err != nil {
  4353. return nil, err
  4354. }
  4355. defer googleapi.CloseBody(res)
  4356. if err := googleapi.CheckResponse(res); err != nil {
  4357. return nil, err
  4358. }
  4359. ret := &AuthorizedCertificate{
  4360. ServerResponse: googleapi.ServerResponse{
  4361. Header: res.Header,
  4362. HTTPStatusCode: res.StatusCode,
  4363. },
  4364. }
  4365. target := &ret
  4366. if err := gensupport.DecodeResponse(target, res); err != nil {
  4367. return nil, err
  4368. }
  4369. return ret, nil
  4370. // {
  4371. // "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.",
  4372. // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4373. // "httpMethod": "PATCH",
  4374. // "id": "appengine.apps.authorizedCertificates.patch",
  4375. // "parameterOrder": [
  4376. // "appsId",
  4377. // "authorizedCertificatesId"
  4378. // ],
  4379. // "parameters": {
  4380. // "appsId": {
  4381. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.",
  4382. // "location": "path",
  4383. // "required": true,
  4384. // "type": "string"
  4385. // },
  4386. // "authorizedCertificatesId": {
  4387. // "description": "Part of `name`. See documentation of `appsId`.",
  4388. // "location": "path",
  4389. // "required": true,
  4390. // "type": "string"
  4391. // },
  4392. // "updateMask": {
  4393. // "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.",
  4394. // "format": "google-fieldmask",
  4395. // "location": "query",
  4396. // "type": "string"
  4397. // }
  4398. // },
  4399. // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4400. // "request": {
  4401. // "$ref": "AuthorizedCertificate"
  4402. // },
  4403. // "response": {
  4404. // "$ref": "AuthorizedCertificate"
  4405. // },
  4406. // "scopes": [
  4407. // "https://www.googleapis.com/auth/cloud-platform"
  4408. // ]
  4409. // }
  4410. }
  4411. // method id "appengine.apps.authorizedDomains.list":
  4412. type AppsAuthorizedDomainsListCall struct {
  4413. s *APIService
  4414. appsId string
  4415. urlParams_ gensupport.URLParams
  4416. ifNoneMatch_ string
  4417. ctx_ context.Context
  4418. header_ http.Header
  4419. }
  4420. // List: Lists all domains the user is authorized to administer.
  4421. func (r *AppsAuthorizedDomainsService) List(appsId string) *AppsAuthorizedDomainsListCall {
  4422. c := &AppsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4423. c.appsId = appsId
  4424. return c
  4425. }
  4426. // PageSize sets the optional parameter "pageSize": Maximum results to
  4427. // return per page.
  4428. func (c *AppsAuthorizedDomainsListCall) PageSize(pageSize int64) *AppsAuthorizedDomainsListCall {
  4429. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4430. return c
  4431. }
  4432. // PageToken sets the optional parameter "pageToken": Continuation token
  4433. // for fetching the next page of results.
  4434. func (c *AppsAuthorizedDomainsListCall) PageToken(pageToken string) *AppsAuthorizedDomainsListCall {
  4435. c.urlParams_.Set("pageToken", pageToken)
  4436. return c
  4437. }
  4438. // Fields allows partial responses to be retrieved. See
  4439. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4440. // for more information.
  4441. func (c *AppsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *AppsAuthorizedDomainsListCall {
  4442. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4443. return c
  4444. }
  4445. // IfNoneMatch sets the optional parameter which makes the operation
  4446. // fail if the object's ETag matches the given value. This is useful for
  4447. // getting updates only after the object has changed since the last
  4448. // request. Use googleapi.IsNotModified to check whether the response
  4449. // error from Do is the result of In-None-Match.
  4450. func (c *AppsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *AppsAuthorizedDomainsListCall {
  4451. c.ifNoneMatch_ = entityTag
  4452. return c
  4453. }
  4454. // Context sets the context to be used in this call's Do method. Any
  4455. // pending HTTP request will be aborted if the provided context is
  4456. // canceled.
  4457. func (c *AppsAuthorizedDomainsListCall) Context(ctx context.Context) *AppsAuthorizedDomainsListCall {
  4458. c.ctx_ = ctx
  4459. return c
  4460. }
  4461. // Header returns an http.Header that can be modified by the caller to
  4462. // add HTTP headers to the request.
  4463. func (c *AppsAuthorizedDomainsListCall) Header() http.Header {
  4464. if c.header_ == nil {
  4465. c.header_ = make(http.Header)
  4466. }
  4467. return c.header_
  4468. }
  4469. func (c *AppsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) {
  4470. reqHeaders := make(http.Header)
  4471. for k, v := range c.header_ {
  4472. reqHeaders[k] = v
  4473. }
  4474. reqHeaders.Set("User-Agent", c.s.userAgent())
  4475. if c.ifNoneMatch_ != "" {
  4476. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4477. }
  4478. var body io.Reader = nil
  4479. c.urlParams_.Set("alt", alt)
  4480. c.urlParams_.Set("prettyPrint", "false")
  4481. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedDomains")
  4482. urls += "?" + c.urlParams_.Encode()
  4483. req, err := http.NewRequest("GET", urls, body)
  4484. if err != nil {
  4485. return nil, err
  4486. }
  4487. req.Header = reqHeaders
  4488. googleapi.Expand(req.URL, map[string]string{
  4489. "appsId": c.appsId,
  4490. })
  4491. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4492. }
  4493. // Do executes the "appengine.apps.authorizedDomains.list" call.
  4494. // Exactly one of *ListAuthorizedDomainsResponse or error will be
  4495. // non-nil. Any non-2xx status code is an error. Response headers are in
  4496. // either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a
  4497. // response was returned at all) in error.(*googleapi.Error).Header. Use
  4498. // googleapi.IsNotModified to check whether the returned error was
  4499. // because http.StatusNotModified was returned.
  4500. func (c *AppsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) {
  4501. gensupport.SetOptions(c.urlParams_, opts...)
  4502. res, err := c.doRequest("json")
  4503. if res != nil && res.StatusCode == http.StatusNotModified {
  4504. if res.Body != nil {
  4505. res.Body.Close()
  4506. }
  4507. return nil, &googleapi.Error{
  4508. Code: res.StatusCode,
  4509. Header: res.Header,
  4510. }
  4511. }
  4512. if err != nil {
  4513. return nil, err
  4514. }
  4515. defer googleapi.CloseBody(res)
  4516. if err := googleapi.CheckResponse(res); err != nil {
  4517. return nil, err
  4518. }
  4519. ret := &ListAuthorizedDomainsResponse{
  4520. ServerResponse: googleapi.ServerResponse{
  4521. Header: res.Header,
  4522. HTTPStatusCode: res.StatusCode,
  4523. },
  4524. }
  4525. target := &ret
  4526. if err := gensupport.DecodeResponse(target, res); err != nil {
  4527. return nil, err
  4528. }
  4529. return ret, nil
  4530. // {
  4531. // "description": "Lists all domains the user is authorized to administer.",
  4532. // "flatPath": "v1/apps/{appsId}/authorizedDomains",
  4533. // "httpMethod": "GET",
  4534. // "id": "appengine.apps.authorizedDomains.list",
  4535. // "parameterOrder": [
  4536. // "appsId"
  4537. // ],
  4538. // "parameters": {
  4539. // "appsId": {
  4540. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4541. // "location": "path",
  4542. // "required": true,
  4543. // "type": "string"
  4544. // },
  4545. // "pageSize": {
  4546. // "description": "Maximum results to return per page.",
  4547. // "format": "int32",
  4548. // "location": "query",
  4549. // "type": "integer"
  4550. // },
  4551. // "pageToken": {
  4552. // "description": "Continuation token for fetching the next page of results.",
  4553. // "location": "query",
  4554. // "type": "string"
  4555. // }
  4556. // },
  4557. // "path": "v1/apps/{appsId}/authorizedDomains",
  4558. // "response": {
  4559. // "$ref": "ListAuthorizedDomainsResponse"
  4560. // },
  4561. // "scopes": [
  4562. // "https://www.googleapis.com/auth/appengine.admin",
  4563. // "https://www.googleapis.com/auth/cloud-platform",
  4564. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4565. // ]
  4566. // }
  4567. }
  4568. // Pages invokes f for each page of results.
  4569. // A non-nil error returned from f will halt the iteration.
  4570. // The provided context supersedes any context provided to the Context method.
  4571. func (c *AppsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error {
  4572. c.ctx_ = ctx
  4573. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4574. for {
  4575. x, err := c.Do()
  4576. if err != nil {
  4577. return err
  4578. }
  4579. if err := f(x); err != nil {
  4580. return err
  4581. }
  4582. if x.NextPageToken == "" {
  4583. return nil
  4584. }
  4585. c.PageToken(x.NextPageToken)
  4586. }
  4587. }
  4588. // method id "appengine.apps.domainMappings.create":
  4589. type AppsDomainMappingsCreateCall struct {
  4590. s *APIService
  4591. appsId string
  4592. domainmapping *DomainMapping
  4593. urlParams_ gensupport.URLParams
  4594. ctx_ context.Context
  4595. header_ http.Header
  4596. }
  4597. // Create: Maps a domain to an application. A user must be authorized to
  4598. // administer a domain in order to map it to an application. For a list
  4599. // of available authorized domains, see
  4600. // AuthorizedDomains.ListAuthorizedDomains.
  4601. func (r *AppsDomainMappingsService) Create(appsId string, domainmapping *DomainMapping) *AppsDomainMappingsCreateCall {
  4602. c := &AppsDomainMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4603. c.appsId = appsId
  4604. c.domainmapping = domainmapping
  4605. return c
  4606. }
  4607. // OverrideStrategy sets the optional parameter "overrideStrategy":
  4608. // Whether the domain creation should override any existing mappings for
  4609. // this domain. By default, overrides are rejected.
  4610. //
  4611. // Possible values:
  4612. // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY"
  4613. // "STRICT"
  4614. // "OVERRIDE"
  4615. func (c *AppsDomainMappingsCreateCall) OverrideStrategy(overrideStrategy string) *AppsDomainMappingsCreateCall {
  4616. c.urlParams_.Set("overrideStrategy", overrideStrategy)
  4617. return c
  4618. }
  4619. // Fields allows partial responses to be retrieved. See
  4620. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4621. // for more information.
  4622. func (c *AppsDomainMappingsCreateCall) Fields(s ...googleapi.Field) *AppsDomainMappingsCreateCall {
  4623. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4624. return c
  4625. }
  4626. // Context sets the context to be used in this call's Do method. Any
  4627. // pending HTTP request will be aborted if the provided context is
  4628. // canceled.
  4629. func (c *AppsDomainMappingsCreateCall) Context(ctx context.Context) *AppsDomainMappingsCreateCall {
  4630. c.ctx_ = ctx
  4631. return c
  4632. }
  4633. // Header returns an http.Header that can be modified by the caller to
  4634. // add HTTP headers to the request.
  4635. func (c *AppsDomainMappingsCreateCall) Header() http.Header {
  4636. if c.header_ == nil {
  4637. c.header_ = make(http.Header)
  4638. }
  4639. return c.header_
  4640. }
  4641. func (c *AppsDomainMappingsCreateCall) doRequest(alt string) (*http.Response, error) {
  4642. reqHeaders := make(http.Header)
  4643. for k, v := range c.header_ {
  4644. reqHeaders[k] = v
  4645. }
  4646. reqHeaders.Set("User-Agent", c.s.userAgent())
  4647. var body io.Reader = nil
  4648. body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping)
  4649. if err != nil {
  4650. return nil, err
  4651. }
  4652. reqHeaders.Set("Content-Type", "application/json")
  4653. c.urlParams_.Set("alt", alt)
  4654. c.urlParams_.Set("prettyPrint", "false")
  4655. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings")
  4656. urls += "?" + c.urlParams_.Encode()
  4657. req, err := http.NewRequest("POST", urls, body)
  4658. if err != nil {
  4659. return nil, err
  4660. }
  4661. req.Header = reqHeaders
  4662. googleapi.Expand(req.URL, map[string]string{
  4663. "appsId": c.appsId,
  4664. })
  4665. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4666. }
  4667. // Do executes the "appengine.apps.domainMappings.create" call.
  4668. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4669. // status code is an error. Response headers are in either
  4670. // *Operation.ServerResponse.Header or (if a response was returned at
  4671. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4672. // to check whether the returned error was because
  4673. // http.StatusNotModified was returned.
  4674. func (c *AppsDomainMappingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4675. gensupport.SetOptions(c.urlParams_, opts...)
  4676. res, err := c.doRequest("json")
  4677. if res != nil && res.StatusCode == http.StatusNotModified {
  4678. if res.Body != nil {
  4679. res.Body.Close()
  4680. }
  4681. return nil, &googleapi.Error{
  4682. Code: res.StatusCode,
  4683. Header: res.Header,
  4684. }
  4685. }
  4686. if err != nil {
  4687. return nil, err
  4688. }
  4689. defer googleapi.CloseBody(res)
  4690. if err := googleapi.CheckResponse(res); err != nil {
  4691. return nil, err
  4692. }
  4693. ret := &Operation{
  4694. ServerResponse: googleapi.ServerResponse{
  4695. Header: res.Header,
  4696. HTTPStatusCode: res.StatusCode,
  4697. },
  4698. }
  4699. target := &ret
  4700. if err := gensupport.DecodeResponse(target, res); err != nil {
  4701. return nil, err
  4702. }
  4703. return ret, nil
  4704. // {
  4705. // "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.",
  4706. // "flatPath": "v1/apps/{appsId}/domainMappings",
  4707. // "httpMethod": "POST",
  4708. // "id": "appengine.apps.domainMappings.create",
  4709. // "parameterOrder": [
  4710. // "appsId"
  4711. // ],
  4712. // "parameters": {
  4713. // "appsId": {
  4714. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4715. // "location": "path",
  4716. // "required": true,
  4717. // "type": "string"
  4718. // },
  4719. // "overrideStrategy": {
  4720. // "description": "Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.",
  4721. // "enum": [
  4722. // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY",
  4723. // "STRICT",
  4724. // "OVERRIDE"
  4725. // ],
  4726. // "location": "query",
  4727. // "type": "string"
  4728. // }
  4729. // },
  4730. // "path": "v1/apps/{appsId}/domainMappings",
  4731. // "request": {
  4732. // "$ref": "DomainMapping"
  4733. // },
  4734. // "response": {
  4735. // "$ref": "Operation"
  4736. // },
  4737. // "scopes": [
  4738. // "https://www.googleapis.com/auth/cloud-platform"
  4739. // ]
  4740. // }
  4741. }
  4742. // method id "appengine.apps.domainMappings.delete":
  4743. type AppsDomainMappingsDeleteCall struct {
  4744. s *APIService
  4745. appsId string
  4746. domainMappingsId string
  4747. urlParams_ gensupport.URLParams
  4748. ctx_ context.Context
  4749. header_ http.Header
  4750. }
  4751. // Delete: Deletes the specified domain mapping. A user must be
  4752. // authorized to administer the associated domain in order to delete a
  4753. // DomainMapping resource.
  4754. func (r *AppsDomainMappingsService) Delete(appsId string, domainMappingsId string) *AppsDomainMappingsDeleteCall {
  4755. c := &AppsDomainMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4756. c.appsId = appsId
  4757. c.domainMappingsId = domainMappingsId
  4758. return c
  4759. }
  4760. // Fields allows partial responses to be retrieved. See
  4761. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4762. // for more information.
  4763. func (c *AppsDomainMappingsDeleteCall) Fields(s ...googleapi.Field) *AppsDomainMappingsDeleteCall {
  4764. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4765. return c
  4766. }
  4767. // Context sets the context to be used in this call's Do method. Any
  4768. // pending HTTP request will be aborted if the provided context is
  4769. // canceled.
  4770. func (c *AppsDomainMappingsDeleteCall) Context(ctx context.Context) *AppsDomainMappingsDeleteCall {
  4771. c.ctx_ = ctx
  4772. return c
  4773. }
  4774. // Header returns an http.Header that can be modified by the caller to
  4775. // add HTTP headers to the request.
  4776. func (c *AppsDomainMappingsDeleteCall) Header() http.Header {
  4777. if c.header_ == nil {
  4778. c.header_ = make(http.Header)
  4779. }
  4780. return c.header_
  4781. }
  4782. func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4783. reqHeaders := make(http.Header)
  4784. for k, v := range c.header_ {
  4785. reqHeaders[k] = v
  4786. }
  4787. reqHeaders.Set("User-Agent", c.s.userAgent())
  4788. var body io.Reader = nil
  4789. c.urlParams_.Set("alt", alt)
  4790. c.urlParams_.Set("prettyPrint", "false")
  4791. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}")
  4792. urls += "?" + c.urlParams_.Encode()
  4793. req, err := http.NewRequest("DELETE", urls, body)
  4794. if err != nil {
  4795. return nil, err
  4796. }
  4797. req.Header = reqHeaders
  4798. googleapi.Expand(req.URL, map[string]string{
  4799. "appsId": c.appsId,
  4800. "domainMappingsId": c.domainMappingsId,
  4801. })
  4802. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4803. }
  4804. // Do executes the "appengine.apps.domainMappings.delete" call.
  4805. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4806. // status code is an error. Response headers are in either
  4807. // *Operation.ServerResponse.Header or (if a response was returned at
  4808. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4809. // to check whether the returned error was because
  4810. // http.StatusNotModified was returned.
  4811. func (c *AppsDomainMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4812. gensupport.SetOptions(c.urlParams_, opts...)
  4813. res, err := c.doRequest("json")
  4814. if res != nil && res.StatusCode == http.StatusNotModified {
  4815. if res.Body != nil {
  4816. res.Body.Close()
  4817. }
  4818. return nil, &googleapi.Error{
  4819. Code: res.StatusCode,
  4820. Header: res.Header,
  4821. }
  4822. }
  4823. if err != nil {
  4824. return nil, err
  4825. }
  4826. defer googleapi.CloseBody(res)
  4827. if err := googleapi.CheckResponse(res); err != nil {
  4828. return nil, err
  4829. }
  4830. ret := &Operation{
  4831. ServerResponse: googleapi.ServerResponse{
  4832. Header: res.Header,
  4833. HTTPStatusCode: res.StatusCode,
  4834. },
  4835. }
  4836. target := &ret
  4837. if err := gensupport.DecodeResponse(target, res); err != nil {
  4838. return nil, err
  4839. }
  4840. return ret, nil
  4841. // {
  4842. // "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.",
  4843. // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  4844. // "httpMethod": "DELETE",
  4845. // "id": "appengine.apps.domainMappings.delete",
  4846. // "parameterOrder": [
  4847. // "appsId",
  4848. // "domainMappingsId"
  4849. // ],
  4850. // "parameters": {
  4851. // "appsId": {
  4852. // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.",
  4853. // "location": "path",
  4854. // "required": true,
  4855. // "type": "string"
  4856. // },
  4857. // "domainMappingsId": {
  4858. // "description": "Part of `name`. See documentation of `appsId`.",
  4859. // "location": "path",
  4860. // "required": true,
  4861. // "type": "string"
  4862. // }
  4863. // },
  4864. // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  4865. // "response": {
  4866. // "$ref": "Operation"
  4867. // },
  4868. // "scopes": [
  4869. // "https://www.googleapis.com/auth/cloud-platform"
  4870. // ]
  4871. // }
  4872. }
  4873. // method id "appengine.apps.domainMappings.get":
  4874. type AppsDomainMappingsGetCall struct {
  4875. s *APIService
  4876. appsId string
  4877. domainMappingsId string
  4878. urlParams_ gensupport.URLParams
  4879. ifNoneMatch_ string
  4880. ctx_ context.Context
  4881. header_ http.Header
  4882. }
  4883. // Get: Gets the specified domain mapping.
  4884. func (r *AppsDomainMappingsService) Get(appsId string, domainMappingsId string) *AppsDomainMappingsGetCall {
  4885. c := &AppsDomainMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4886. c.appsId = appsId
  4887. c.domainMappingsId = domainMappingsId
  4888. return c
  4889. }
  4890. // Fields allows partial responses to be retrieved. See
  4891. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4892. // for more information.
  4893. func (c *AppsDomainMappingsGetCall) Fields(s ...googleapi.Field) *AppsDomainMappingsGetCall {
  4894. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4895. return c
  4896. }
  4897. // IfNoneMatch sets the optional parameter which makes the operation
  4898. // fail if the object's ETag matches the given value. This is useful for
  4899. // getting updates only after the object has changed since the last
  4900. // request. Use googleapi.IsNotModified to check whether the response
  4901. // error from Do is the result of In-None-Match.
  4902. func (c *AppsDomainMappingsGetCall) IfNoneMatch(entityTag string) *AppsDomainMappingsGetCall {
  4903. c.ifNoneMatch_ = entityTag
  4904. return c
  4905. }
  4906. // Context sets the context to be used in this call's Do method. Any
  4907. // pending HTTP request will be aborted if the provided context is
  4908. // canceled.
  4909. func (c *AppsDomainMappingsGetCall) Context(ctx context.Context) *AppsDomainMappingsGetCall {
  4910. c.ctx_ = ctx
  4911. return c
  4912. }
  4913. // Header returns an http.Header that can be modified by the caller to
  4914. // add HTTP headers to the request.
  4915. func (c *AppsDomainMappingsGetCall) Header() http.Header {
  4916. if c.header_ == nil {
  4917. c.header_ = make(http.Header)
  4918. }
  4919. return c.header_
  4920. }
  4921. func (c *AppsDomainMappingsGetCall) doRequest(alt string) (*http.Response, error) {
  4922. reqHeaders := make(http.Header)
  4923. for k, v := range c.header_ {
  4924. reqHeaders[k] = v
  4925. }
  4926. reqHeaders.Set("User-Agent", c.s.userAgent())
  4927. if c.ifNoneMatch_ != "" {
  4928. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4929. }
  4930. var body io.Reader = nil
  4931. c.urlParams_.Set("alt", alt)
  4932. c.urlParams_.Set("prettyPrint", "false")
  4933. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}")
  4934. urls += "?" + c.urlParams_.Encode()
  4935. req, err := http.NewRequest("GET", urls, body)
  4936. if err != nil {
  4937. return nil, err
  4938. }
  4939. req.Header = reqHeaders
  4940. googleapi.Expand(req.URL, map[string]string{
  4941. "appsId": c.appsId,
  4942. "domainMappingsId": c.domainMappingsId,
  4943. })
  4944. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4945. }
  4946. // Do executes the "appengine.apps.domainMappings.get" call.
  4947. // Exactly one of *DomainMapping or error will be non-nil. Any non-2xx
  4948. // status code is an error. Response headers are in either
  4949. // *DomainMapping.ServerResponse.Header or (if a response was returned
  4950. // at all) in error.(*googleapi.Error).Header. Use
  4951. // googleapi.IsNotModified to check whether the returned error was
  4952. // because http.StatusNotModified was returned.
  4953. func (c *AppsDomainMappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) {
  4954. gensupport.SetOptions(c.urlParams_, opts...)
  4955. res, err := c.doRequest("json")
  4956. if res != nil && res.StatusCode == http.StatusNotModified {
  4957. if res.Body != nil {
  4958. res.Body.Close()
  4959. }
  4960. return nil, &googleapi.Error{
  4961. Code: res.StatusCode,
  4962. Header: res.Header,
  4963. }
  4964. }
  4965. if err != nil {
  4966. return nil, err
  4967. }
  4968. defer googleapi.CloseBody(res)
  4969. if err := googleapi.CheckResponse(res); err != nil {
  4970. return nil, err
  4971. }
  4972. ret := &DomainMapping{
  4973. ServerResponse: googleapi.ServerResponse{
  4974. Header: res.Header,
  4975. HTTPStatusCode: res.StatusCode,
  4976. },
  4977. }
  4978. target := &ret
  4979. if err := gensupport.DecodeResponse(target, res); err != nil {
  4980. return nil, err
  4981. }
  4982. return ret, nil
  4983. // {
  4984. // "description": "Gets the specified domain mapping.",
  4985. // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  4986. // "httpMethod": "GET",
  4987. // "id": "appengine.apps.domainMappings.get",
  4988. // "parameterOrder": [
  4989. // "appsId",
  4990. // "domainMappingsId"
  4991. // ],
  4992. // "parameters": {
  4993. // "appsId": {
  4994. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.",
  4995. // "location": "path",
  4996. // "required": true,
  4997. // "type": "string"
  4998. // },
  4999. // "domainMappingsId": {
  5000. // "description": "Part of `name`. See documentation of `appsId`.",
  5001. // "location": "path",
  5002. // "required": true,
  5003. // "type": "string"
  5004. // }
  5005. // },
  5006. // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  5007. // "response": {
  5008. // "$ref": "DomainMapping"
  5009. // },
  5010. // "scopes": [
  5011. // "https://www.googleapis.com/auth/appengine.admin",
  5012. // "https://www.googleapis.com/auth/cloud-platform",
  5013. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5014. // ]
  5015. // }
  5016. }
  5017. // method id "appengine.apps.domainMappings.list":
  5018. type AppsDomainMappingsListCall struct {
  5019. s *APIService
  5020. appsId string
  5021. urlParams_ gensupport.URLParams
  5022. ifNoneMatch_ string
  5023. ctx_ context.Context
  5024. header_ http.Header
  5025. }
  5026. // List: Lists the domain mappings on an application.
  5027. func (r *AppsDomainMappingsService) List(appsId string) *AppsDomainMappingsListCall {
  5028. c := &AppsDomainMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5029. c.appsId = appsId
  5030. return c
  5031. }
  5032. // PageSize sets the optional parameter "pageSize": Maximum results to
  5033. // return per page.
  5034. func (c *AppsDomainMappingsListCall) PageSize(pageSize int64) *AppsDomainMappingsListCall {
  5035. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5036. return c
  5037. }
  5038. // PageToken sets the optional parameter "pageToken": Continuation token
  5039. // for fetching the next page of results.
  5040. func (c *AppsDomainMappingsListCall) PageToken(pageToken string) *AppsDomainMappingsListCall {
  5041. c.urlParams_.Set("pageToken", pageToken)
  5042. return c
  5043. }
  5044. // Fields allows partial responses to be retrieved. See
  5045. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5046. // for more information.
  5047. func (c *AppsDomainMappingsListCall) Fields(s ...googleapi.Field) *AppsDomainMappingsListCall {
  5048. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5049. return c
  5050. }
  5051. // IfNoneMatch sets the optional parameter which makes the operation
  5052. // fail if the object's ETag matches the given value. This is useful for
  5053. // getting updates only after the object has changed since the last
  5054. // request. Use googleapi.IsNotModified to check whether the response
  5055. // error from Do is the result of In-None-Match.
  5056. func (c *AppsDomainMappingsListCall) IfNoneMatch(entityTag string) *AppsDomainMappingsListCall {
  5057. c.ifNoneMatch_ = entityTag
  5058. return c
  5059. }
  5060. // Context sets the context to be used in this call's Do method. Any
  5061. // pending HTTP request will be aborted if the provided context is
  5062. // canceled.
  5063. func (c *AppsDomainMappingsListCall) Context(ctx context.Context) *AppsDomainMappingsListCall {
  5064. c.ctx_ = ctx
  5065. return c
  5066. }
  5067. // Header returns an http.Header that can be modified by the caller to
  5068. // add HTTP headers to the request.
  5069. func (c *AppsDomainMappingsListCall) Header() http.Header {
  5070. if c.header_ == nil {
  5071. c.header_ = make(http.Header)
  5072. }
  5073. return c.header_
  5074. }
  5075. func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, error) {
  5076. reqHeaders := make(http.Header)
  5077. for k, v := range c.header_ {
  5078. reqHeaders[k] = v
  5079. }
  5080. reqHeaders.Set("User-Agent", c.s.userAgent())
  5081. if c.ifNoneMatch_ != "" {
  5082. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5083. }
  5084. var body io.Reader = nil
  5085. c.urlParams_.Set("alt", alt)
  5086. c.urlParams_.Set("prettyPrint", "false")
  5087. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings")
  5088. urls += "?" + c.urlParams_.Encode()
  5089. req, err := http.NewRequest("GET", urls, body)
  5090. if err != nil {
  5091. return nil, err
  5092. }
  5093. req.Header = reqHeaders
  5094. googleapi.Expand(req.URL, map[string]string{
  5095. "appsId": c.appsId,
  5096. })
  5097. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5098. }
  5099. // Do executes the "appengine.apps.domainMappings.list" call.
  5100. // Exactly one of *ListDomainMappingsResponse or error will be non-nil.
  5101. // Any non-2xx status code is an error. Response headers are in either
  5102. // *ListDomainMappingsResponse.ServerResponse.Header or (if a response
  5103. // was returned at all) in error.(*googleapi.Error).Header. Use
  5104. // googleapi.IsNotModified to check whether the returned error was
  5105. // because http.StatusNotModified was returned.
  5106. func (c *AppsDomainMappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) {
  5107. gensupport.SetOptions(c.urlParams_, opts...)
  5108. res, err := c.doRequest("json")
  5109. if res != nil && res.StatusCode == http.StatusNotModified {
  5110. if res.Body != nil {
  5111. res.Body.Close()
  5112. }
  5113. return nil, &googleapi.Error{
  5114. Code: res.StatusCode,
  5115. Header: res.Header,
  5116. }
  5117. }
  5118. if err != nil {
  5119. return nil, err
  5120. }
  5121. defer googleapi.CloseBody(res)
  5122. if err := googleapi.CheckResponse(res); err != nil {
  5123. return nil, err
  5124. }
  5125. ret := &ListDomainMappingsResponse{
  5126. ServerResponse: googleapi.ServerResponse{
  5127. Header: res.Header,
  5128. HTTPStatusCode: res.StatusCode,
  5129. },
  5130. }
  5131. target := &ret
  5132. if err := gensupport.DecodeResponse(target, res); err != nil {
  5133. return nil, err
  5134. }
  5135. return ret, nil
  5136. // {
  5137. // "description": "Lists the domain mappings on an application.",
  5138. // "flatPath": "v1/apps/{appsId}/domainMappings",
  5139. // "httpMethod": "GET",
  5140. // "id": "appengine.apps.domainMappings.list",
  5141. // "parameterOrder": [
  5142. // "appsId"
  5143. // ],
  5144. // "parameters": {
  5145. // "appsId": {
  5146. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  5147. // "location": "path",
  5148. // "required": true,
  5149. // "type": "string"
  5150. // },
  5151. // "pageSize": {
  5152. // "description": "Maximum results to return per page.",
  5153. // "format": "int32",
  5154. // "location": "query",
  5155. // "type": "integer"
  5156. // },
  5157. // "pageToken": {
  5158. // "description": "Continuation token for fetching the next page of results.",
  5159. // "location": "query",
  5160. // "type": "string"
  5161. // }
  5162. // },
  5163. // "path": "v1/apps/{appsId}/domainMappings",
  5164. // "response": {
  5165. // "$ref": "ListDomainMappingsResponse"
  5166. // },
  5167. // "scopes": [
  5168. // "https://www.googleapis.com/auth/appengine.admin",
  5169. // "https://www.googleapis.com/auth/cloud-platform",
  5170. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5171. // ]
  5172. // }
  5173. }
  5174. // Pages invokes f for each page of results.
  5175. // A non-nil error returned from f will halt the iteration.
  5176. // The provided context supersedes any context provided to the Context method.
  5177. func (c *AppsDomainMappingsListCall) Pages(ctx context.Context, f func(*ListDomainMappingsResponse) error) error {
  5178. c.ctx_ = ctx
  5179. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5180. for {
  5181. x, err := c.Do()
  5182. if err != nil {
  5183. return err
  5184. }
  5185. if err := f(x); err != nil {
  5186. return err
  5187. }
  5188. if x.NextPageToken == "" {
  5189. return nil
  5190. }
  5191. c.PageToken(x.NextPageToken)
  5192. }
  5193. }
  5194. // method id "appengine.apps.domainMappings.patch":
  5195. type AppsDomainMappingsPatchCall struct {
  5196. s *APIService
  5197. appsId string
  5198. domainMappingsId string
  5199. domainmapping *DomainMapping
  5200. urlParams_ gensupport.URLParams
  5201. ctx_ context.Context
  5202. header_ http.Header
  5203. }
  5204. // Patch: Updates the specified domain mapping. To map an SSL
  5205. // certificate to a domain mapping, update certificate_id to point to an
  5206. // AuthorizedCertificate resource. A user must be authorized to
  5207. // administer the associated domain in order to update a DomainMapping
  5208. // resource.
  5209. func (r *AppsDomainMappingsService) Patch(appsId string, domainMappingsId string, domainmapping *DomainMapping) *AppsDomainMappingsPatchCall {
  5210. c := &AppsDomainMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5211. c.appsId = appsId
  5212. c.domainMappingsId = domainMappingsId
  5213. c.domainmapping = domainmapping
  5214. return c
  5215. }
  5216. // UpdateMask sets the optional parameter "updateMask": Standard field
  5217. // mask for the set of fields to be updated.
  5218. func (c *AppsDomainMappingsPatchCall) UpdateMask(updateMask string) *AppsDomainMappingsPatchCall {
  5219. c.urlParams_.Set("updateMask", updateMask)
  5220. return c
  5221. }
  5222. // Fields allows partial responses to be retrieved. See
  5223. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5224. // for more information.
  5225. func (c *AppsDomainMappingsPatchCall) Fields(s ...googleapi.Field) *AppsDomainMappingsPatchCall {
  5226. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5227. return c
  5228. }
  5229. // Context sets the context to be used in this call's Do method. Any
  5230. // pending HTTP request will be aborted if the provided context is
  5231. // canceled.
  5232. func (c *AppsDomainMappingsPatchCall) Context(ctx context.Context) *AppsDomainMappingsPatchCall {
  5233. c.ctx_ = ctx
  5234. return c
  5235. }
  5236. // Header returns an http.Header that can be modified by the caller to
  5237. // add HTTP headers to the request.
  5238. func (c *AppsDomainMappingsPatchCall) Header() http.Header {
  5239. if c.header_ == nil {
  5240. c.header_ = make(http.Header)
  5241. }
  5242. return c.header_
  5243. }
  5244. func (c *AppsDomainMappingsPatchCall) doRequest(alt string) (*http.Response, error) {
  5245. reqHeaders := make(http.Header)
  5246. for k, v := range c.header_ {
  5247. reqHeaders[k] = v
  5248. }
  5249. reqHeaders.Set("User-Agent", c.s.userAgent())
  5250. var body io.Reader = nil
  5251. body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping)
  5252. if err != nil {
  5253. return nil, err
  5254. }
  5255. reqHeaders.Set("Content-Type", "application/json")
  5256. c.urlParams_.Set("alt", alt)
  5257. c.urlParams_.Set("prettyPrint", "false")
  5258. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}")
  5259. urls += "?" + c.urlParams_.Encode()
  5260. req, err := http.NewRequest("PATCH", urls, body)
  5261. if err != nil {
  5262. return nil, err
  5263. }
  5264. req.Header = reqHeaders
  5265. googleapi.Expand(req.URL, map[string]string{
  5266. "appsId": c.appsId,
  5267. "domainMappingsId": c.domainMappingsId,
  5268. })
  5269. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5270. }
  5271. // Do executes the "appengine.apps.domainMappings.patch" call.
  5272. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5273. // status code is an error. Response headers are in either
  5274. // *Operation.ServerResponse.Header or (if a response was returned at
  5275. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5276. // to check whether the returned error was because
  5277. // http.StatusNotModified was returned.
  5278. func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5279. gensupport.SetOptions(c.urlParams_, opts...)
  5280. res, err := c.doRequest("json")
  5281. if res != nil && res.StatusCode == http.StatusNotModified {
  5282. if res.Body != nil {
  5283. res.Body.Close()
  5284. }
  5285. return nil, &googleapi.Error{
  5286. Code: res.StatusCode,
  5287. Header: res.Header,
  5288. }
  5289. }
  5290. if err != nil {
  5291. return nil, err
  5292. }
  5293. defer googleapi.CloseBody(res)
  5294. if err := googleapi.CheckResponse(res); err != nil {
  5295. return nil, err
  5296. }
  5297. ret := &Operation{
  5298. ServerResponse: googleapi.ServerResponse{
  5299. Header: res.Header,
  5300. HTTPStatusCode: res.StatusCode,
  5301. },
  5302. }
  5303. target := &ret
  5304. if err := gensupport.DecodeResponse(target, res); err != nil {
  5305. return nil, err
  5306. }
  5307. return ret, nil
  5308. // {
  5309. // "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.",
  5310. // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  5311. // "httpMethod": "PATCH",
  5312. // "id": "appengine.apps.domainMappings.patch",
  5313. // "parameterOrder": [
  5314. // "appsId",
  5315. // "domainMappingsId"
  5316. // ],
  5317. // "parameters": {
  5318. // "appsId": {
  5319. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.",
  5320. // "location": "path",
  5321. // "required": true,
  5322. // "type": "string"
  5323. // },
  5324. // "domainMappingsId": {
  5325. // "description": "Part of `name`. See documentation of `appsId`.",
  5326. // "location": "path",
  5327. // "required": true,
  5328. // "type": "string"
  5329. // },
  5330. // "updateMask": {
  5331. // "description": "Standard field mask for the set of fields to be updated.",
  5332. // "format": "google-fieldmask",
  5333. // "location": "query",
  5334. // "type": "string"
  5335. // }
  5336. // },
  5337. // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}",
  5338. // "request": {
  5339. // "$ref": "DomainMapping"
  5340. // },
  5341. // "response": {
  5342. // "$ref": "Operation"
  5343. // },
  5344. // "scopes": [
  5345. // "https://www.googleapis.com/auth/cloud-platform"
  5346. // ]
  5347. // }
  5348. }
  5349. // method id "appengine.apps.firewall.ingressRules.batchUpdate":
  5350. type AppsFirewallIngressRulesBatchUpdateCall struct {
  5351. s *APIService
  5352. appsId string
  5353. batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest
  5354. urlParams_ gensupport.URLParams
  5355. ctx_ context.Context
  5356. header_ http.Header
  5357. }
  5358. // BatchUpdate: Replaces the entire firewall ruleset in one bulk
  5359. // operation. This overrides and replaces the rules of an existing
  5360. // firewall with the new rules.If the final rule does not match traffic
  5361. // with the '*' wildcard IP range, then an "allow all" rule is
  5362. // explicitly added to the end of the list.
  5363. func (r *AppsFirewallIngressRulesService) BatchUpdate(appsId string, batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest) *AppsFirewallIngressRulesBatchUpdateCall {
  5364. c := &AppsFirewallIngressRulesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5365. c.appsId = appsId
  5366. c.batchupdateingressrulesrequest = batchupdateingressrulesrequest
  5367. return c
  5368. }
  5369. // Fields allows partial responses to be retrieved. See
  5370. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5371. // for more information.
  5372. func (c *AppsFirewallIngressRulesBatchUpdateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesBatchUpdateCall {
  5373. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5374. return c
  5375. }
  5376. // Context sets the context to be used in this call's Do method. Any
  5377. // pending HTTP request will be aborted if the provided context is
  5378. // canceled.
  5379. func (c *AppsFirewallIngressRulesBatchUpdateCall) Context(ctx context.Context) *AppsFirewallIngressRulesBatchUpdateCall {
  5380. c.ctx_ = ctx
  5381. return c
  5382. }
  5383. // Header returns an http.Header that can be modified by the caller to
  5384. // add HTTP headers to the request.
  5385. func (c *AppsFirewallIngressRulesBatchUpdateCall) Header() http.Header {
  5386. if c.header_ == nil {
  5387. c.header_ = make(http.Header)
  5388. }
  5389. return c.header_
  5390. }
  5391. func (c *AppsFirewallIngressRulesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  5392. reqHeaders := make(http.Header)
  5393. for k, v := range c.header_ {
  5394. reqHeaders[k] = v
  5395. }
  5396. reqHeaders.Set("User-Agent", c.s.userAgent())
  5397. var body io.Reader = nil
  5398. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdateingressrulesrequest)
  5399. if err != nil {
  5400. return nil, err
  5401. }
  5402. reqHeaders.Set("Content-Type", "application/json")
  5403. c.urlParams_.Set("alt", alt)
  5404. c.urlParams_.Set("prettyPrint", "false")
  5405. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules:batchUpdate")
  5406. urls += "?" + c.urlParams_.Encode()
  5407. req, err := http.NewRequest("POST", urls, body)
  5408. if err != nil {
  5409. return nil, err
  5410. }
  5411. req.Header = reqHeaders
  5412. googleapi.Expand(req.URL, map[string]string{
  5413. "appsId": c.appsId,
  5414. })
  5415. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5416. }
  5417. // Do executes the "appengine.apps.firewall.ingressRules.batchUpdate" call.
  5418. // Exactly one of *BatchUpdateIngressRulesResponse or error will be
  5419. // non-nil. Any non-2xx status code is an error. Response headers are in
  5420. // either *BatchUpdateIngressRulesResponse.ServerResponse.Header or (if
  5421. // a response was returned at all) in error.(*googleapi.Error).Header.
  5422. // Use googleapi.IsNotModified to check whether the returned error was
  5423. // because http.StatusNotModified was returned.
  5424. func (c *AppsFirewallIngressRulesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateIngressRulesResponse, error) {
  5425. gensupport.SetOptions(c.urlParams_, opts...)
  5426. res, err := c.doRequest("json")
  5427. if res != nil && res.StatusCode == http.StatusNotModified {
  5428. if res.Body != nil {
  5429. res.Body.Close()
  5430. }
  5431. return nil, &googleapi.Error{
  5432. Code: res.StatusCode,
  5433. Header: res.Header,
  5434. }
  5435. }
  5436. if err != nil {
  5437. return nil, err
  5438. }
  5439. defer googleapi.CloseBody(res)
  5440. if err := googleapi.CheckResponse(res); err != nil {
  5441. return nil, err
  5442. }
  5443. ret := &BatchUpdateIngressRulesResponse{
  5444. ServerResponse: googleapi.ServerResponse{
  5445. Header: res.Header,
  5446. HTTPStatusCode: res.StatusCode,
  5447. },
  5448. }
  5449. target := &ret
  5450. if err := gensupport.DecodeResponse(target, res); err != nil {
  5451. return nil, err
  5452. }
  5453. return ret, nil
  5454. // {
  5455. // "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.",
  5456. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate",
  5457. // "httpMethod": "POST",
  5458. // "id": "appengine.apps.firewall.ingressRules.batchUpdate",
  5459. // "parameterOrder": [
  5460. // "appsId"
  5461. // ],
  5462. // "parameters": {
  5463. // "appsId": {
  5464. // "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.",
  5465. // "location": "path",
  5466. // "required": true,
  5467. // "type": "string"
  5468. // }
  5469. // },
  5470. // "path": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate",
  5471. // "request": {
  5472. // "$ref": "BatchUpdateIngressRulesRequest"
  5473. // },
  5474. // "response": {
  5475. // "$ref": "BatchUpdateIngressRulesResponse"
  5476. // },
  5477. // "scopes": [
  5478. // "https://www.googleapis.com/auth/cloud-platform"
  5479. // ]
  5480. // }
  5481. }
  5482. // method id "appengine.apps.firewall.ingressRules.create":
  5483. type AppsFirewallIngressRulesCreateCall struct {
  5484. s *APIService
  5485. appsId string
  5486. firewallrule *FirewallRule
  5487. urlParams_ gensupport.URLParams
  5488. ctx_ context.Context
  5489. header_ http.Header
  5490. }
  5491. // Create: Creates a firewall rule for the application.
  5492. func (r *AppsFirewallIngressRulesService) Create(appsId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesCreateCall {
  5493. c := &AppsFirewallIngressRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5494. c.appsId = appsId
  5495. c.firewallrule = firewallrule
  5496. return c
  5497. }
  5498. // Fields allows partial responses to be retrieved. See
  5499. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5500. // for more information.
  5501. func (c *AppsFirewallIngressRulesCreateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesCreateCall {
  5502. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5503. return c
  5504. }
  5505. // Context sets the context to be used in this call's Do method. Any
  5506. // pending HTTP request will be aborted if the provided context is
  5507. // canceled.
  5508. func (c *AppsFirewallIngressRulesCreateCall) Context(ctx context.Context) *AppsFirewallIngressRulesCreateCall {
  5509. c.ctx_ = ctx
  5510. return c
  5511. }
  5512. // Header returns an http.Header that can be modified by the caller to
  5513. // add HTTP headers to the request.
  5514. func (c *AppsFirewallIngressRulesCreateCall) Header() http.Header {
  5515. if c.header_ == nil {
  5516. c.header_ = make(http.Header)
  5517. }
  5518. return c.header_
  5519. }
  5520. func (c *AppsFirewallIngressRulesCreateCall) doRequest(alt string) (*http.Response, error) {
  5521. reqHeaders := make(http.Header)
  5522. for k, v := range c.header_ {
  5523. reqHeaders[k] = v
  5524. }
  5525. reqHeaders.Set("User-Agent", c.s.userAgent())
  5526. var body io.Reader = nil
  5527. body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule)
  5528. if err != nil {
  5529. return nil, err
  5530. }
  5531. reqHeaders.Set("Content-Type", "application/json")
  5532. c.urlParams_.Set("alt", alt)
  5533. c.urlParams_.Set("prettyPrint", "false")
  5534. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules")
  5535. urls += "?" + c.urlParams_.Encode()
  5536. req, err := http.NewRequest("POST", urls, body)
  5537. if err != nil {
  5538. return nil, err
  5539. }
  5540. req.Header = reqHeaders
  5541. googleapi.Expand(req.URL, map[string]string{
  5542. "appsId": c.appsId,
  5543. })
  5544. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5545. }
  5546. // Do executes the "appengine.apps.firewall.ingressRules.create" call.
  5547. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  5548. // status code is an error. Response headers are in either
  5549. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  5550. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5551. // to check whether the returned error was because
  5552. // http.StatusNotModified was returned.
  5553. func (c *AppsFirewallIngressRulesCreateCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  5554. gensupport.SetOptions(c.urlParams_, opts...)
  5555. res, err := c.doRequest("json")
  5556. if res != nil && res.StatusCode == http.StatusNotModified {
  5557. if res.Body != nil {
  5558. res.Body.Close()
  5559. }
  5560. return nil, &googleapi.Error{
  5561. Code: res.StatusCode,
  5562. Header: res.Header,
  5563. }
  5564. }
  5565. if err != nil {
  5566. return nil, err
  5567. }
  5568. defer googleapi.CloseBody(res)
  5569. if err := googleapi.CheckResponse(res); err != nil {
  5570. return nil, err
  5571. }
  5572. ret := &FirewallRule{
  5573. ServerResponse: googleapi.ServerResponse{
  5574. Header: res.Header,
  5575. HTTPStatusCode: res.StatusCode,
  5576. },
  5577. }
  5578. target := &ret
  5579. if err := gensupport.DecodeResponse(target, res); err != nil {
  5580. return nil, err
  5581. }
  5582. return ret, nil
  5583. // {
  5584. // "description": "Creates a firewall rule for the application.",
  5585. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules",
  5586. // "httpMethod": "POST",
  5587. // "id": "appengine.apps.firewall.ingressRules.create",
  5588. // "parameterOrder": [
  5589. // "appsId"
  5590. // ],
  5591. // "parameters": {
  5592. // "appsId": {
  5593. // "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.",
  5594. // "location": "path",
  5595. // "required": true,
  5596. // "type": "string"
  5597. // }
  5598. // },
  5599. // "path": "v1/apps/{appsId}/firewall/ingressRules",
  5600. // "request": {
  5601. // "$ref": "FirewallRule"
  5602. // },
  5603. // "response": {
  5604. // "$ref": "FirewallRule"
  5605. // },
  5606. // "scopes": [
  5607. // "https://www.googleapis.com/auth/cloud-platform"
  5608. // ]
  5609. // }
  5610. }
  5611. // method id "appengine.apps.firewall.ingressRules.delete":
  5612. type AppsFirewallIngressRulesDeleteCall struct {
  5613. s *APIService
  5614. appsId string
  5615. ingressRulesId string
  5616. urlParams_ gensupport.URLParams
  5617. ctx_ context.Context
  5618. header_ http.Header
  5619. }
  5620. // Delete: Deletes the specified firewall rule.
  5621. func (r *AppsFirewallIngressRulesService) Delete(appsId string, ingressRulesId string) *AppsFirewallIngressRulesDeleteCall {
  5622. c := &AppsFirewallIngressRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5623. c.appsId = appsId
  5624. c.ingressRulesId = ingressRulesId
  5625. return c
  5626. }
  5627. // Fields allows partial responses to be retrieved. See
  5628. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5629. // for more information.
  5630. func (c *AppsFirewallIngressRulesDeleteCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesDeleteCall {
  5631. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5632. return c
  5633. }
  5634. // Context sets the context to be used in this call's Do method. Any
  5635. // pending HTTP request will be aborted if the provided context is
  5636. // canceled.
  5637. func (c *AppsFirewallIngressRulesDeleteCall) Context(ctx context.Context) *AppsFirewallIngressRulesDeleteCall {
  5638. c.ctx_ = ctx
  5639. return c
  5640. }
  5641. // Header returns an http.Header that can be modified by the caller to
  5642. // add HTTP headers to the request.
  5643. func (c *AppsFirewallIngressRulesDeleteCall) Header() http.Header {
  5644. if c.header_ == nil {
  5645. c.header_ = make(http.Header)
  5646. }
  5647. return c.header_
  5648. }
  5649. func (c *AppsFirewallIngressRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5650. reqHeaders := make(http.Header)
  5651. for k, v := range c.header_ {
  5652. reqHeaders[k] = v
  5653. }
  5654. reqHeaders.Set("User-Agent", c.s.userAgent())
  5655. var body io.Reader = nil
  5656. c.urlParams_.Set("alt", alt)
  5657. c.urlParams_.Set("prettyPrint", "false")
  5658. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  5659. urls += "?" + c.urlParams_.Encode()
  5660. req, err := http.NewRequest("DELETE", urls, body)
  5661. if err != nil {
  5662. return nil, err
  5663. }
  5664. req.Header = reqHeaders
  5665. googleapi.Expand(req.URL, map[string]string{
  5666. "appsId": c.appsId,
  5667. "ingressRulesId": c.ingressRulesId,
  5668. })
  5669. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5670. }
  5671. // Do executes the "appengine.apps.firewall.ingressRules.delete" call.
  5672. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5673. // code is an error. Response headers are in either
  5674. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5675. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5676. // check whether the returned error was because http.StatusNotModified
  5677. // was returned.
  5678. func (c *AppsFirewallIngressRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5679. gensupport.SetOptions(c.urlParams_, opts...)
  5680. res, err := c.doRequest("json")
  5681. if res != nil && res.StatusCode == http.StatusNotModified {
  5682. if res.Body != nil {
  5683. res.Body.Close()
  5684. }
  5685. return nil, &googleapi.Error{
  5686. Code: res.StatusCode,
  5687. Header: res.Header,
  5688. }
  5689. }
  5690. if err != nil {
  5691. return nil, err
  5692. }
  5693. defer googleapi.CloseBody(res)
  5694. if err := googleapi.CheckResponse(res); err != nil {
  5695. return nil, err
  5696. }
  5697. ret := &Empty{
  5698. ServerResponse: googleapi.ServerResponse{
  5699. Header: res.Header,
  5700. HTTPStatusCode: res.StatusCode,
  5701. },
  5702. }
  5703. target := &ret
  5704. if err := gensupport.DecodeResponse(target, res); err != nil {
  5705. return nil, err
  5706. }
  5707. return ret, nil
  5708. // {
  5709. // "description": "Deletes the specified firewall rule.",
  5710. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5711. // "httpMethod": "DELETE",
  5712. // "id": "appengine.apps.firewall.ingressRules.delete",
  5713. // "parameterOrder": [
  5714. // "appsId",
  5715. // "ingressRulesId"
  5716. // ],
  5717. // "parameters": {
  5718. // "appsId": {
  5719. // "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.",
  5720. // "location": "path",
  5721. // "required": true,
  5722. // "type": "string"
  5723. // },
  5724. // "ingressRulesId": {
  5725. // "description": "Part of `name`. See documentation of `appsId`.",
  5726. // "location": "path",
  5727. // "required": true,
  5728. // "type": "string"
  5729. // }
  5730. // },
  5731. // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5732. // "response": {
  5733. // "$ref": "Empty"
  5734. // },
  5735. // "scopes": [
  5736. // "https://www.googleapis.com/auth/cloud-platform"
  5737. // ]
  5738. // }
  5739. }
  5740. // method id "appengine.apps.firewall.ingressRules.get":
  5741. type AppsFirewallIngressRulesGetCall struct {
  5742. s *APIService
  5743. appsId string
  5744. ingressRulesId string
  5745. urlParams_ gensupport.URLParams
  5746. ifNoneMatch_ string
  5747. ctx_ context.Context
  5748. header_ http.Header
  5749. }
  5750. // Get: Gets the specified firewall rule.
  5751. func (r *AppsFirewallIngressRulesService) Get(appsId string, ingressRulesId string) *AppsFirewallIngressRulesGetCall {
  5752. c := &AppsFirewallIngressRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5753. c.appsId = appsId
  5754. c.ingressRulesId = ingressRulesId
  5755. return c
  5756. }
  5757. // Fields allows partial responses to be retrieved. See
  5758. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5759. // for more information.
  5760. func (c *AppsFirewallIngressRulesGetCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesGetCall {
  5761. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5762. return c
  5763. }
  5764. // IfNoneMatch sets the optional parameter which makes the operation
  5765. // fail if the object's ETag matches the given value. This is useful for
  5766. // getting updates only after the object has changed since the last
  5767. // request. Use googleapi.IsNotModified to check whether the response
  5768. // error from Do is the result of In-None-Match.
  5769. func (c *AppsFirewallIngressRulesGetCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesGetCall {
  5770. c.ifNoneMatch_ = entityTag
  5771. return c
  5772. }
  5773. // Context sets the context to be used in this call's Do method. Any
  5774. // pending HTTP request will be aborted if the provided context is
  5775. // canceled.
  5776. func (c *AppsFirewallIngressRulesGetCall) Context(ctx context.Context) *AppsFirewallIngressRulesGetCall {
  5777. c.ctx_ = ctx
  5778. return c
  5779. }
  5780. // Header returns an http.Header that can be modified by the caller to
  5781. // add HTTP headers to the request.
  5782. func (c *AppsFirewallIngressRulesGetCall) Header() http.Header {
  5783. if c.header_ == nil {
  5784. c.header_ = make(http.Header)
  5785. }
  5786. return c.header_
  5787. }
  5788. func (c *AppsFirewallIngressRulesGetCall) doRequest(alt string) (*http.Response, error) {
  5789. reqHeaders := make(http.Header)
  5790. for k, v := range c.header_ {
  5791. reqHeaders[k] = v
  5792. }
  5793. reqHeaders.Set("User-Agent", c.s.userAgent())
  5794. if c.ifNoneMatch_ != "" {
  5795. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5796. }
  5797. var body io.Reader = nil
  5798. c.urlParams_.Set("alt", alt)
  5799. c.urlParams_.Set("prettyPrint", "false")
  5800. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  5801. urls += "?" + c.urlParams_.Encode()
  5802. req, err := http.NewRequest("GET", urls, body)
  5803. if err != nil {
  5804. return nil, err
  5805. }
  5806. req.Header = reqHeaders
  5807. googleapi.Expand(req.URL, map[string]string{
  5808. "appsId": c.appsId,
  5809. "ingressRulesId": c.ingressRulesId,
  5810. })
  5811. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5812. }
  5813. // Do executes the "appengine.apps.firewall.ingressRules.get" call.
  5814. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  5815. // status code is an error. Response headers are in either
  5816. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  5817. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5818. // to check whether the returned error was because
  5819. // http.StatusNotModified was returned.
  5820. func (c *AppsFirewallIngressRulesGetCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  5821. gensupport.SetOptions(c.urlParams_, opts...)
  5822. res, err := c.doRequest("json")
  5823. if res != nil && res.StatusCode == http.StatusNotModified {
  5824. if res.Body != nil {
  5825. res.Body.Close()
  5826. }
  5827. return nil, &googleapi.Error{
  5828. Code: res.StatusCode,
  5829. Header: res.Header,
  5830. }
  5831. }
  5832. if err != nil {
  5833. return nil, err
  5834. }
  5835. defer googleapi.CloseBody(res)
  5836. if err := googleapi.CheckResponse(res); err != nil {
  5837. return nil, err
  5838. }
  5839. ret := &FirewallRule{
  5840. ServerResponse: googleapi.ServerResponse{
  5841. Header: res.Header,
  5842. HTTPStatusCode: res.StatusCode,
  5843. },
  5844. }
  5845. target := &ret
  5846. if err := gensupport.DecodeResponse(target, res); err != nil {
  5847. return nil, err
  5848. }
  5849. return ret, nil
  5850. // {
  5851. // "description": "Gets the specified firewall rule.",
  5852. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5853. // "httpMethod": "GET",
  5854. // "id": "appengine.apps.firewall.ingressRules.get",
  5855. // "parameterOrder": [
  5856. // "appsId",
  5857. // "ingressRulesId"
  5858. // ],
  5859. // "parameters": {
  5860. // "appsId": {
  5861. // "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.",
  5862. // "location": "path",
  5863. // "required": true,
  5864. // "type": "string"
  5865. // },
  5866. // "ingressRulesId": {
  5867. // "description": "Part of `name`. See documentation of `appsId`.",
  5868. // "location": "path",
  5869. // "required": true,
  5870. // "type": "string"
  5871. // }
  5872. // },
  5873. // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5874. // "response": {
  5875. // "$ref": "FirewallRule"
  5876. // },
  5877. // "scopes": [
  5878. // "https://www.googleapis.com/auth/appengine.admin",
  5879. // "https://www.googleapis.com/auth/cloud-platform",
  5880. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5881. // ]
  5882. // }
  5883. }
  5884. // method id "appengine.apps.firewall.ingressRules.list":
  5885. type AppsFirewallIngressRulesListCall struct {
  5886. s *APIService
  5887. appsId string
  5888. urlParams_ gensupport.URLParams
  5889. ifNoneMatch_ string
  5890. ctx_ context.Context
  5891. header_ http.Header
  5892. }
  5893. // List: Lists the firewall rules of an application.
  5894. func (r *AppsFirewallIngressRulesService) List(appsId string) *AppsFirewallIngressRulesListCall {
  5895. c := &AppsFirewallIngressRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5896. c.appsId = appsId
  5897. return c
  5898. }
  5899. // MatchingAddress sets the optional parameter "matchingAddress": A
  5900. // valid IP Address. If set, only rules matching this address will be
  5901. // returned. The first returned rule will be the rule that fires on
  5902. // requests from this IP.
  5903. func (c *AppsFirewallIngressRulesListCall) MatchingAddress(matchingAddress string) *AppsFirewallIngressRulesListCall {
  5904. c.urlParams_.Set("matchingAddress", matchingAddress)
  5905. return c
  5906. }
  5907. // PageSize sets the optional parameter "pageSize": Maximum results to
  5908. // return per page.
  5909. func (c *AppsFirewallIngressRulesListCall) PageSize(pageSize int64) *AppsFirewallIngressRulesListCall {
  5910. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5911. return c
  5912. }
  5913. // PageToken sets the optional parameter "pageToken": Continuation token
  5914. // for fetching the next page of results.
  5915. func (c *AppsFirewallIngressRulesListCall) PageToken(pageToken string) *AppsFirewallIngressRulesListCall {
  5916. c.urlParams_.Set("pageToken", pageToken)
  5917. return c
  5918. }
  5919. // Fields allows partial responses to be retrieved. See
  5920. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5921. // for more information.
  5922. func (c *AppsFirewallIngressRulesListCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesListCall {
  5923. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5924. return c
  5925. }
  5926. // IfNoneMatch sets the optional parameter which makes the operation
  5927. // fail if the object's ETag matches the given value. This is useful for
  5928. // getting updates only after the object has changed since the last
  5929. // request. Use googleapi.IsNotModified to check whether the response
  5930. // error from Do is the result of In-None-Match.
  5931. func (c *AppsFirewallIngressRulesListCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesListCall {
  5932. c.ifNoneMatch_ = entityTag
  5933. return c
  5934. }
  5935. // Context sets the context to be used in this call's Do method. Any
  5936. // pending HTTP request will be aborted if the provided context is
  5937. // canceled.
  5938. func (c *AppsFirewallIngressRulesListCall) Context(ctx context.Context) *AppsFirewallIngressRulesListCall {
  5939. c.ctx_ = ctx
  5940. return c
  5941. }
  5942. // Header returns an http.Header that can be modified by the caller to
  5943. // add HTTP headers to the request.
  5944. func (c *AppsFirewallIngressRulesListCall) Header() http.Header {
  5945. if c.header_ == nil {
  5946. c.header_ = make(http.Header)
  5947. }
  5948. return c.header_
  5949. }
  5950. func (c *AppsFirewallIngressRulesListCall) doRequest(alt string) (*http.Response, error) {
  5951. reqHeaders := make(http.Header)
  5952. for k, v := range c.header_ {
  5953. reqHeaders[k] = v
  5954. }
  5955. reqHeaders.Set("User-Agent", c.s.userAgent())
  5956. if c.ifNoneMatch_ != "" {
  5957. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5958. }
  5959. var body io.Reader = nil
  5960. c.urlParams_.Set("alt", alt)
  5961. c.urlParams_.Set("prettyPrint", "false")
  5962. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules")
  5963. urls += "?" + c.urlParams_.Encode()
  5964. req, err := http.NewRequest("GET", urls, body)
  5965. if err != nil {
  5966. return nil, err
  5967. }
  5968. req.Header = reqHeaders
  5969. googleapi.Expand(req.URL, map[string]string{
  5970. "appsId": c.appsId,
  5971. })
  5972. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5973. }
  5974. // Do executes the "appengine.apps.firewall.ingressRules.list" call.
  5975. // Exactly one of *ListIngressRulesResponse or error will be non-nil.
  5976. // Any non-2xx status code is an error. Response headers are in either
  5977. // *ListIngressRulesResponse.ServerResponse.Header or (if a response was
  5978. // returned at all) in error.(*googleapi.Error).Header. Use
  5979. // googleapi.IsNotModified to check whether the returned error was
  5980. // because http.StatusNotModified was returned.
  5981. func (c *AppsFirewallIngressRulesListCall) Do(opts ...googleapi.CallOption) (*ListIngressRulesResponse, error) {
  5982. gensupport.SetOptions(c.urlParams_, opts...)
  5983. res, err := c.doRequest("json")
  5984. if res != nil && res.StatusCode == http.StatusNotModified {
  5985. if res.Body != nil {
  5986. res.Body.Close()
  5987. }
  5988. return nil, &googleapi.Error{
  5989. Code: res.StatusCode,
  5990. Header: res.Header,
  5991. }
  5992. }
  5993. if err != nil {
  5994. return nil, err
  5995. }
  5996. defer googleapi.CloseBody(res)
  5997. if err := googleapi.CheckResponse(res); err != nil {
  5998. return nil, err
  5999. }
  6000. ret := &ListIngressRulesResponse{
  6001. ServerResponse: googleapi.ServerResponse{
  6002. Header: res.Header,
  6003. HTTPStatusCode: res.StatusCode,
  6004. },
  6005. }
  6006. target := &ret
  6007. if err := gensupport.DecodeResponse(target, res); err != nil {
  6008. return nil, err
  6009. }
  6010. return ret, nil
  6011. // {
  6012. // "description": "Lists the firewall rules of an application.",
  6013. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules",
  6014. // "httpMethod": "GET",
  6015. // "id": "appengine.apps.firewall.ingressRules.list",
  6016. // "parameterOrder": [
  6017. // "appsId"
  6018. // ],
  6019. // "parameters": {
  6020. // "appsId": {
  6021. // "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.",
  6022. // "location": "path",
  6023. // "required": true,
  6024. // "type": "string"
  6025. // },
  6026. // "matchingAddress": {
  6027. // "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.",
  6028. // "location": "query",
  6029. // "type": "string"
  6030. // },
  6031. // "pageSize": {
  6032. // "description": "Maximum results to return per page.",
  6033. // "format": "int32",
  6034. // "location": "query",
  6035. // "type": "integer"
  6036. // },
  6037. // "pageToken": {
  6038. // "description": "Continuation token for fetching the next page of results.",
  6039. // "location": "query",
  6040. // "type": "string"
  6041. // }
  6042. // },
  6043. // "path": "v1/apps/{appsId}/firewall/ingressRules",
  6044. // "response": {
  6045. // "$ref": "ListIngressRulesResponse"
  6046. // },
  6047. // "scopes": [
  6048. // "https://www.googleapis.com/auth/appengine.admin",
  6049. // "https://www.googleapis.com/auth/cloud-platform",
  6050. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6051. // ]
  6052. // }
  6053. }
  6054. // Pages invokes f for each page of results.
  6055. // A non-nil error returned from f will halt the iteration.
  6056. // The provided context supersedes any context provided to the Context method.
  6057. func (c *AppsFirewallIngressRulesListCall) Pages(ctx context.Context, f func(*ListIngressRulesResponse) error) error {
  6058. c.ctx_ = ctx
  6059. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6060. for {
  6061. x, err := c.Do()
  6062. if err != nil {
  6063. return err
  6064. }
  6065. if err := f(x); err != nil {
  6066. return err
  6067. }
  6068. if x.NextPageToken == "" {
  6069. return nil
  6070. }
  6071. c.PageToken(x.NextPageToken)
  6072. }
  6073. }
  6074. // method id "appengine.apps.firewall.ingressRules.patch":
  6075. type AppsFirewallIngressRulesPatchCall struct {
  6076. s *APIService
  6077. appsId string
  6078. ingressRulesId string
  6079. firewallrule *FirewallRule
  6080. urlParams_ gensupport.URLParams
  6081. ctx_ context.Context
  6082. header_ http.Header
  6083. }
  6084. // Patch: Updates the specified firewall rule.
  6085. func (r *AppsFirewallIngressRulesService) Patch(appsId string, ingressRulesId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesPatchCall {
  6086. c := &AppsFirewallIngressRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6087. c.appsId = appsId
  6088. c.ingressRulesId = ingressRulesId
  6089. c.firewallrule = firewallrule
  6090. return c
  6091. }
  6092. // UpdateMask sets the optional parameter "updateMask": Standard field
  6093. // mask for the set of fields to be updated.
  6094. func (c *AppsFirewallIngressRulesPatchCall) UpdateMask(updateMask string) *AppsFirewallIngressRulesPatchCall {
  6095. c.urlParams_.Set("updateMask", updateMask)
  6096. return c
  6097. }
  6098. // Fields allows partial responses to be retrieved. See
  6099. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6100. // for more information.
  6101. func (c *AppsFirewallIngressRulesPatchCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesPatchCall {
  6102. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6103. return c
  6104. }
  6105. // Context sets the context to be used in this call's Do method. Any
  6106. // pending HTTP request will be aborted if the provided context is
  6107. // canceled.
  6108. func (c *AppsFirewallIngressRulesPatchCall) Context(ctx context.Context) *AppsFirewallIngressRulesPatchCall {
  6109. c.ctx_ = ctx
  6110. return c
  6111. }
  6112. // Header returns an http.Header that can be modified by the caller to
  6113. // add HTTP headers to the request.
  6114. func (c *AppsFirewallIngressRulesPatchCall) Header() http.Header {
  6115. if c.header_ == nil {
  6116. c.header_ = make(http.Header)
  6117. }
  6118. return c.header_
  6119. }
  6120. func (c *AppsFirewallIngressRulesPatchCall) doRequest(alt string) (*http.Response, error) {
  6121. reqHeaders := make(http.Header)
  6122. for k, v := range c.header_ {
  6123. reqHeaders[k] = v
  6124. }
  6125. reqHeaders.Set("User-Agent", c.s.userAgent())
  6126. var body io.Reader = nil
  6127. body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule)
  6128. if err != nil {
  6129. return nil, err
  6130. }
  6131. reqHeaders.Set("Content-Type", "application/json")
  6132. c.urlParams_.Set("alt", alt)
  6133. c.urlParams_.Set("prettyPrint", "false")
  6134. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  6135. urls += "?" + c.urlParams_.Encode()
  6136. req, err := http.NewRequest("PATCH", urls, body)
  6137. if err != nil {
  6138. return nil, err
  6139. }
  6140. req.Header = reqHeaders
  6141. googleapi.Expand(req.URL, map[string]string{
  6142. "appsId": c.appsId,
  6143. "ingressRulesId": c.ingressRulesId,
  6144. })
  6145. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6146. }
  6147. // Do executes the "appengine.apps.firewall.ingressRules.patch" call.
  6148. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  6149. // status code is an error. Response headers are in either
  6150. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  6151. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6152. // to check whether the returned error was because
  6153. // http.StatusNotModified was returned.
  6154. func (c *AppsFirewallIngressRulesPatchCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  6155. gensupport.SetOptions(c.urlParams_, opts...)
  6156. res, err := c.doRequest("json")
  6157. if res != nil && res.StatusCode == http.StatusNotModified {
  6158. if res.Body != nil {
  6159. res.Body.Close()
  6160. }
  6161. return nil, &googleapi.Error{
  6162. Code: res.StatusCode,
  6163. Header: res.Header,
  6164. }
  6165. }
  6166. if err != nil {
  6167. return nil, err
  6168. }
  6169. defer googleapi.CloseBody(res)
  6170. if err := googleapi.CheckResponse(res); err != nil {
  6171. return nil, err
  6172. }
  6173. ret := &FirewallRule{
  6174. ServerResponse: googleapi.ServerResponse{
  6175. Header: res.Header,
  6176. HTTPStatusCode: res.StatusCode,
  6177. },
  6178. }
  6179. target := &ret
  6180. if err := gensupport.DecodeResponse(target, res); err != nil {
  6181. return nil, err
  6182. }
  6183. return ret, nil
  6184. // {
  6185. // "description": "Updates the specified firewall rule.",
  6186. // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  6187. // "httpMethod": "PATCH",
  6188. // "id": "appengine.apps.firewall.ingressRules.patch",
  6189. // "parameterOrder": [
  6190. // "appsId",
  6191. // "ingressRulesId"
  6192. // ],
  6193. // "parameters": {
  6194. // "appsId": {
  6195. // "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.",
  6196. // "location": "path",
  6197. // "required": true,
  6198. // "type": "string"
  6199. // },
  6200. // "ingressRulesId": {
  6201. // "description": "Part of `name`. See documentation of `appsId`.",
  6202. // "location": "path",
  6203. // "required": true,
  6204. // "type": "string"
  6205. // },
  6206. // "updateMask": {
  6207. // "description": "Standard field mask for the set of fields to be updated.",
  6208. // "format": "google-fieldmask",
  6209. // "location": "query",
  6210. // "type": "string"
  6211. // }
  6212. // },
  6213. // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  6214. // "request": {
  6215. // "$ref": "FirewallRule"
  6216. // },
  6217. // "response": {
  6218. // "$ref": "FirewallRule"
  6219. // },
  6220. // "scopes": [
  6221. // "https://www.googleapis.com/auth/cloud-platform"
  6222. // ]
  6223. // }
  6224. }
  6225. // method id "appengine.apps.locations.get":
  6226. type AppsLocationsGetCall struct {
  6227. s *APIService
  6228. appsId string
  6229. locationsId string
  6230. urlParams_ gensupport.URLParams
  6231. ifNoneMatch_ string
  6232. ctx_ context.Context
  6233. header_ http.Header
  6234. }
  6235. // Get: Gets information about a location.
  6236. func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall {
  6237. c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6238. c.appsId = appsId
  6239. c.locationsId = locationsId
  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 *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall {
  6246. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6247. return c
  6248. }
  6249. // IfNoneMatch sets the optional parameter which makes the operation
  6250. // fail if the object's ETag matches the given value. This is useful for
  6251. // getting updates only after the object has changed since the last
  6252. // request. Use googleapi.IsNotModified to check whether the response
  6253. // error from Do is the result of In-None-Match.
  6254. func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall {
  6255. c.ifNoneMatch_ = entityTag
  6256. return c
  6257. }
  6258. // Context sets the context to be used in this call's Do method. Any
  6259. // pending HTTP request will be aborted if the provided context is
  6260. // canceled.
  6261. func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall {
  6262. c.ctx_ = ctx
  6263. return c
  6264. }
  6265. // Header returns an http.Header that can be modified by the caller to
  6266. // add HTTP headers to the request.
  6267. func (c *AppsLocationsGetCall) Header() http.Header {
  6268. if c.header_ == nil {
  6269. c.header_ = make(http.Header)
  6270. }
  6271. return c.header_
  6272. }
  6273. func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  6274. reqHeaders := make(http.Header)
  6275. for k, v := range c.header_ {
  6276. reqHeaders[k] = v
  6277. }
  6278. reqHeaders.Set("User-Agent", c.s.userAgent())
  6279. if c.ifNoneMatch_ != "" {
  6280. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6281. }
  6282. var body io.Reader = nil
  6283. c.urlParams_.Set("alt", alt)
  6284. c.urlParams_.Set("prettyPrint", "false")
  6285. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/locations/{locationsId}")
  6286. urls += "?" + c.urlParams_.Encode()
  6287. req, err := http.NewRequest("GET", urls, body)
  6288. if err != nil {
  6289. return nil, err
  6290. }
  6291. req.Header = reqHeaders
  6292. googleapi.Expand(req.URL, map[string]string{
  6293. "appsId": c.appsId,
  6294. "locationsId": c.locationsId,
  6295. })
  6296. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6297. }
  6298. // Do executes the "appengine.apps.locations.get" call.
  6299. // Exactly one of *Location or error will be non-nil. Any non-2xx status
  6300. // code is an error. Response headers are in either
  6301. // *Location.ServerResponse.Header or (if a response was returned at
  6302. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6303. // to check whether the returned error was because
  6304. // http.StatusNotModified was returned.
  6305. func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  6306. gensupport.SetOptions(c.urlParams_, opts...)
  6307. res, err := c.doRequest("json")
  6308. if res != nil && res.StatusCode == http.StatusNotModified {
  6309. if res.Body != nil {
  6310. res.Body.Close()
  6311. }
  6312. return nil, &googleapi.Error{
  6313. Code: res.StatusCode,
  6314. Header: res.Header,
  6315. }
  6316. }
  6317. if err != nil {
  6318. return nil, err
  6319. }
  6320. defer googleapi.CloseBody(res)
  6321. if err := googleapi.CheckResponse(res); err != nil {
  6322. return nil, err
  6323. }
  6324. ret := &Location{
  6325. ServerResponse: googleapi.ServerResponse{
  6326. Header: res.Header,
  6327. HTTPStatusCode: res.StatusCode,
  6328. },
  6329. }
  6330. target := &ret
  6331. if err := gensupport.DecodeResponse(target, res); err != nil {
  6332. return nil, err
  6333. }
  6334. return ret, nil
  6335. // {
  6336. // "description": "Gets information about a location.",
  6337. // "flatPath": "v1/apps/{appsId}/locations/{locationsId}",
  6338. // "httpMethod": "GET",
  6339. // "id": "appengine.apps.locations.get",
  6340. // "parameterOrder": [
  6341. // "appsId",
  6342. // "locationsId"
  6343. // ],
  6344. // "parameters": {
  6345. // "appsId": {
  6346. // "description": "Part of `name`. Resource name for the location.",
  6347. // "location": "path",
  6348. // "required": true,
  6349. // "type": "string"
  6350. // },
  6351. // "locationsId": {
  6352. // "description": "Part of `name`. See documentation of `appsId`.",
  6353. // "location": "path",
  6354. // "required": true,
  6355. // "type": "string"
  6356. // }
  6357. // },
  6358. // "path": "v1/apps/{appsId}/locations/{locationsId}",
  6359. // "response": {
  6360. // "$ref": "Location"
  6361. // },
  6362. // "scopes": [
  6363. // "https://www.googleapis.com/auth/appengine.admin",
  6364. // "https://www.googleapis.com/auth/cloud-platform",
  6365. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6366. // ]
  6367. // }
  6368. }
  6369. // method id "appengine.apps.locations.list":
  6370. type AppsLocationsListCall struct {
  6371. s *APIService
  6372. appsId string
  6373. urlParams_ gensupport.URLParams
  6374. ifNoneMatch_ string
  6375. ctx_ context.Context
  6376. header_ http.Header
  6377. }
  6378. // List: Lists information about the supported locations for this
  6379. // service.
  6380. func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall {
  6381. c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6382. c.appsId = appsId
  6383. return c
  6384. }
  6385. // Filter sets the optional parameter "filter": The standard list
  6386. // filter.
  6387. func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall {
  6388. c.urlParams_.Set("filter", filter)
  6389. return c
  6390. }
  6391. // PageSize sets the optional parameter "pageSize": The standard list
  6392. // page size.
  6393. func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall {
  6394. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6395. return c
  6396. }
  6397. // PageToken sets the optional parameter "pageToken": The standard list
  6398. // page token.
  6399. func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall {
  6400. c.urlParams_.Set("pageToken", pageToken)
  6401. return c
  6402. }
  6403. // Fields allows partial responses to be retrieved. See
  6404. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6405. // for more information.
  6406. func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall {
  6407. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6408. return c
  6409. }
  6410. // IfNoneMatch sets the optional parameter which makes the operation
  6411. // fail if the object's ETag matches the given value. This is useful for
  6412. // getting updates only after the object has changed since the last
  6413. // request. Use googleapi.IsNotModified to check whether the response
  6414. // error from Do is the result of In-None-Match.
  6415. func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall {
  6416. c.ifNoneMatch_ = entityTag
  6417. return c
  6418. }
  6419. // Context sets the context to be used in this call's Do method. Any
  6420. // pending HTTP request will be aborted if the provided context is
  6421. // canceled.
  6422. func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall {
  6423. c.ctx_ = ctx
  6424. return c
  6425. }
  6426. // Header returns an http.Header that can be modified by the caller to
  6427. // add HTTP headers to the request.
  6428. func (c *AppsLocationsListCall) Header() http.Header {
  6429. if c.header_ == nil {
  6430. c.header_ = make(http.Header)
  6431. }
  6432. return c.header_
  6433. }
  6434. func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  6435. reqHeaders := make(http.Header)
  6436. for k, v := range c.header_ {
  6437. reqHeaders[k] = v
  6438. }
  6439. reqHeaders.Set("User-Agent", c.s.userAgent())
  6440. if c.ifNoneMatch_ != "" {
  6441. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6442. }
  6443. var body io.Reader = nil
  6444. c.urlParams_.Set("alt", alt)
  6445. c.urlParams_.Set("prettyPrint", "false")
  6446. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/locations")
  6447. urls += "?" + c.urlParams_.Encode()
  6448. req, err := http.NewRequest("GET", urls, body)
  6449. if err != nil {
  6450. return nil, err
  6451. }
  6452. req.Header = reqHeaders
  6453. googleapi.Expand(req.URL, map[string]string{
  6454. "appsId": c.appsId,
  6455. })
  6456. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6457. }
  6458. // Do executes the "appengine.apps.locations.list" call.
  6459. // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  6460. // non-2xx status code is an error. Response headers are in either
  6461. // *ListLocationsResponse.ServerResponse.Header or (if a response was
  6462. // returned at all) in error.(*googleapi.Error).Header. Use
  6463. // googleapi.IsNotModified to check whether the returned error was
  6464. // because http.StatusNotModified was returned.
  6465. func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  6466. gensupport.SetOptions(c.urlParams_, opts...)
  6467. res, err := c.doRequest("json")
  6468. if res != nil && res.StatusCode == http.StatusNotModified {
  6469. if res.Body != nil {
  6470. res.Body.Close()
  6471. }
  6472. return nil, &googleapi.Error{
  6473. Code: res.StatusCode,
  6474. Header: res.Header,
  6475. }
  6476. }
  6477. if err != nil {
  6478. return nil, err
  6479. }
  6480. defer googleapi.CloseBody(res)
  6481. if err := googleapi.CheckResponse(res); err != nil {
  6482. return nil, err
  6483. }
  6484. ret := &ListLocationsResponse{
  6485. ServerResponse: googleapi.ServerResponse{
  6486. Header: res.Header,
  6487. HTTPStatusCode: res.StatusCode,
  6488. },
  6489. }
  6490. target := &ret
  6491. if err := gensupport.DecodeResponse(target, res); err != nil {
  6492. return nil, err
  6493. }
  6494. return ret, nil
  6495. // {
  6496. // "description": "Lists information about the supported locations for this service.",
  6497. // "flatPath": "v1/apps/{appsId}/locations",
  6498. // "httpMethod": "GET",
  6499. // "id": "appengine.apps.locations.list",
  6500. // "parameterOrder": [
  6501. // "appsId"
  6502. // ],
  6503. // "parameters": {
  6504. // "appsId": {
  6505. // "description": "Part of `name`. The resource that owns the locations collection, if applicable.",
  6506. // "location": "path",
  6507. // "required": true,
  6508. // "type": "string"
  6509. // },
  6510. // "filter": {
  6511. // "description": "The standard list filter.",
  6512. // "location": "query",
  6513. // "type": "string"
  6514. // },
  6515. // "pageSize": {
  6516. // "description": "The standard list page size.",
  6517. // "format": "int32",
  6518. // "location": "query",
  6519. // "type": "integer"
  6520. // },
  6521. // "pageToken": {
  6522. // "description": "The standard list page token.",
  6523. // "location": "query",
  6524. // "type": "string"
  6525. // }
  6526. // },
  6527. // "path": "v1/apps/{appsId}/locations",
  6528. // "response": {
  6529. // "$ref": "ListLocationsResponse"
  6530. // },
  6531. // "scopes": [
  6532. // "https://www.googleapis.com/auth/appengine.admin",
  6533. // "https://www.googleapis.com/auth/cloud-platform",
  6534. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6535. // ]
  6536. // }
  6537. }
  6538. // Pages invokes f for each page of results.
  6539. // A non-nil error returned from f will halt the iteration.
  6540. // The provided context supersedes any context provided to the Context method.
  6541. func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  6542. c.ctx_ = ctx
  6543. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6544. for {
  6545. x, err := c.Do()
  6546. if err != nil {
  6547. return err
  6548. }
  6549. if err := f(x); err != nil {
  6550. return err
  6551. }
  6552. if x.NextPageToken == "" {
  6553. return nil
  6554. }
  6555. c.PageToken(x.NextPageToken)
  6556. }
  6557. }
  6558. // method id "appengine.apps.operations.get":
  6559. type AppsOperationsGetCall struct {
  6560. s *APIService
  6561. appsId string
  6562. operationsId string
  6563. urlParams_ gensupport.URLParams
  6564. ifNoneMatch_ string
  6565. ctx_ context.Context
  6566. header_ http.Header
  6567. }
  6568. // Get: Gets the latest state of a long-running operation. Clients can
  6569. // use this method to poll the operation result at intervals as
  6570. // recommended by the API service.
  6571. func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall {
  6572. c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6573. c.appsId = appsId
  6574. c.operationsId = operationsId
  6575. return c
  6576. }
  6577. // Fields allows partial responses to be retrieved. See
  6578. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6579. // for more information.
  6580. func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall {
  6581. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6582. return c
  6583. }
  6584. // IfNoneMatch sets the optional parameter which makes the operation
  6585. // fail if the object's ETag matches the given value. This is useful for
  6586. // getting updates only after the object has changed since the last
  6587. // request. Use googleapi.IsNotModified to check whether the response
  6588. // error from Do is the result of In-None-Match.
  6589. func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall {
  6590. c.ifNoneMatch_ = entityTag
  6591. return c
  6592. }
  6593. // Context sets the context to be used in this call's Do method. Any
  6594. // pending HTTP request will be aborted if the provided context is
  6595. // canceled.
  6596. func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall {
  6597. c.ctx_ = ctx
  6598. return c
  6599. }
  6600. // Header returns an http.Header that can be modified by the caller to
  6601. // add HTTP headers to the request.
  6602. func (c *AppsOperationsGetCall) Header() http.Header {
  6603. if c.header_ == nil {
  6604. c.header_ = make(http.Header)
  6605. }
  6606. return c.header_
  6607. }
  6608. func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  6609. reqHeaders := make(http.Header)
  6610. for k, v := range c.header_ {
  6611. reqHeaders[k] = v
  6612. }
  6613. reqHeaders.Set("User-Agent", c.s.userAgent())
  6614. if c.ifNoneMatch_ != "" {
  6615. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6616. }
  6617. var body io.Reader = nil
  6618. c.urlParams_.Set("alt", alt)
  6619. c.urlParams_.Set("prettyPrint", "false")
  6620. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/operations/{operationsId}")
  6621. urls += "?" + c.urlParams_.Encode()
  6622. req, err := http.NewRequest("GET", urls, body)
  6623. if err != nil {
  6624. return nil, err
  6625. }
  6626. req.Header = reqHeaders
  6627. googleapi.Expand(req.URL, map[string]string{
  6628. "appsId": c.appsId,
  6629. "operationsId": c.operationsId,
  6630. })
  6631. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6632. }
  6633. // Do executes the "appengine.apps.operations.get" call.
  6634. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6635. // status code is an error. Response headers are in either
  6636. // *Operation.ServerResponse.Header or (if a response was returned at
  6637. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6638. // to check whether the returned error was because
  6639. // http.StatusNotModified was returned.
  6640. func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6641. gensupport.SetOptions(c.urlParams_, opts...)
  6642. res, err := c.doRequest("json")
  6643. if res != nil && res.StatusCode == http.StatusNotModified {
  6644. if res.Body != nil {
  6645. res.Body.Close()
  6646. }
  6647. return nil, &googleapi.Error{
  6648. Code: res.StatusCode,
  6649. Header: res.Header,
  6650. }
  6651. }
  6652. if err != nil {
  6653. return nil, err
  6654. }
  6655. defer googleapi.CloseBody(res)
  6656. if err := googleapi.CheckResponse(res); err != nil {
  6657. return nil, err
  6658. }
  6659. ret := &Operation{
  6660. ServerResponse: googleapi.ServerResponse{
  6661. Header: res.Header,
  6662. HTTPStatusCode: res.StatusCode,
  6663. },
  6664. }
  6665. target := &ret
  6666. if err := gensupport.DecodeResponse(target, res); err != nil {
  6667. return nil, err
  6668. }
  6669. return ret, nil
  6670. // {
  6671. // "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.",
  6672. // "flatPath": "v1/apps/{appsId}/operations/{operationsId}",
  6673. // "httpMethod": "GET",
  6674. // "id": "appengine.apps.operations.get",
  6675. // "parameterOrder": [
  6676. // "appsId",
  6677. // "operationsId"
  6678. // ],
  6679. // "parameters": {
  6680. // "appsId": {
  6681. // "description": "Part of `name`. The name of the operation resource.",
  6682. // "location": "path",
  6683. // "required": true,
  6684. // "type": "string"
  6685. // },
  6686. // "operationsId": {
  6687. // "description": "Part of `name`. See documentation of `appsId`.",
  6688. // "location": "path",
  6689. // "required": true,
  6690. // "type": "string"
  6691. // }
  6692. // },
  6693. // "path": "v1/apps/{appsId}/operations/{operationsId}",
  6694. // "response": {
  6695. // "$ref": "Operation"
  6696. // },
  6697. // "scopes": [
  6698. // "https://www.googleapis.com/auth/appengine.admin",
  6699. // "https://www.googleapis.com/auth/cloud-platform",
  6700. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6701. // ]
  6702. // }
  6703. }
  6704. // method id "appengine.apps.operations.list":
  6705. type AppsOperationsListCall struct {
  6706. s *APIService
  6707. appsId string
  6708. urlParams_ gensupport.URLParams
  6709. ifNoneMatch_ string
  6710. ctx_ context.Context
  6711. header_ http.Header
  6712. }
  6713. // List: Lists operations that match the specified filter in the
  6714. // request. If the server doesn't support this method, it returns
  6715. // UNIMPLEMENTED.NOTE: the name binding allows API services to override
  6716. // the binding to use different resource name schemes, such as
  6717. // users/*/operations. To override the binding, API services can add a
  6718. // binding such as "/v1/{name=users/*}/operations" to their service
  6719. // configuration. For backwards compatibility, the default name includes
  6720. // the operations collection id, however overriding users must ensure
  6721. // the name binding is the parent resource, without the operations
  6722. // collection id.
  6723. func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall {
  6724. c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6725. c.appsId = appsId
  6726. return c
  6727. }
  6728. // Filter sets the optional parameter "filter": The standard list
  6729. // filter.
  6730. func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall {
  6731. c.urlParams_.Set("filter", filter)
  6732. return c
  6733. }
  6734. // PageSize sets the optional parameter "pageSize": The standard list
  6735. // page size.
  6736. func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall {
  6737. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6738. return c
  6739. }
  6740. // PageToken sets the optional parameter "pageToken": The standard list
  6741. // page token.
  6742. func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall {
  6743. c.urlParams_.Set("pageToken", pageToken)
  6744. return c
  6745. }
  6746. // Fields allows partial responses to be retrieved. See
  6747. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6748. // for more information.
  6749. func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall {
  6750. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6751. return c
  6752. }
  6753. // IfNoneMatch sets the optional parameter which makes the operation
  6754. // fail if the object's ETag matches the given value. This is useful for
  6755. // getting updates only after the object has changed since the last
  6756. // request. Use googleapi.IsNotModified to check whether the response
  6757. // error from Do is the result of In-None-Match.
  6758. func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall {
  6759. c.ifNoneMatch_ = entityTag
  6760. return c
  6761. }
  6762. // Context sets the context to be used in this call's Do method. Any
  6763. // pending HTTP request will be aborted if the provided context is
  6764. // canceled.
  6765. func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall {
  6766. c.ctx_ = ctx
  6767. return c
  6768. }
  6769. // Header returns an http.Header that can be modified by the caller to
  6770. // add HTTP headers to the request.
  6771. func (c *AppsOperationsListCall) Header() http.Header {
  6772. if c.header_ == nil {
  6773. c.header_ = make(http.Header)
  6774. }
  6775. return c.header_
  6776. }
  6777. func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  6778. reqHeaders := make(http.Header)
  6779. for k, v := range c.header_ {
  6780. reqHeaders[k] = v
  6781. }
  6782. reqHeaders.Set("User-Agent", c.s.userAgent())
  6783. if c.ifNoneMatch_ != "" {
  6784. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6785. }
  6786. var body io.Reader = nil
  6787. c.urlParams_.Set("alt", alt)
  6788. c.urlParams_.Set("prettyPrint", "false")
  6789. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/operations")
  6790. urls += "?" + c.urlParams_.Encode()
  6791. req, err := http.NewRequest("GET", urls, body)
  6792. if err != nil {
  6793. return nil, err
  6794. }
  6795. req.Header = reqHeaders
  6796. googleapi.Expand(req.URL, map[string]string{
  6797. "appsId": c.appsId,
  6798. })
  6799. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6800. }
  6801. // Do executes the "appengine.apps.operations.list" call.
  6802. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  6803. // non-2xx status code is an error. Response headers are in either
  6804. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  6805. // returned at all) in error.(*googleapi.Error).Header. Use
  6806. // googleapi.IsNotModified to check whether the returned error was
  6807. // because http.StatusNotModified was returned.
  6808. func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  6809. gensupport.SetOptions(c.urlParams_, opts...)
  6810. res, err := c.doRequest("json")
  6811. if res != nil && res.StatusCode == http.StatusNotModified {
  6812. if res.Body != nil {
  6813. res.Body.Close()
  6814. }
  6815. return nil, &googleapi.Error{
  6816. Code: res.StatusCode,
  6817. Header: res.Header,
  6818. }
  6819. }
  6820. if err != nil {
  6821. return nil, err
  6822. }
  6823. defer googleapi.CloseBody(res)
  6824. if err := googleapi.CheckResponse(res); err != nil {
  6825. return nil, err
  6826. }
  6827. ret := &ListOperationsResponse{
  6828. ServerResponse: googleapi.ServerResponse{
  6829. Header: res.Header,
  6830. HTTPStatusCode: res.StatusCode,
  6831. },
  6832. }
  6833. target := &ret
  6834. if err := gensupport.DecodeResponse(target, res); err != nil {
  6835. return nil, err
  6836. }
  6837. return ret, nil
  6838. // {
  6839. // "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.",
  6840. // "flatPath": "v1/apps/{appsId}/operations",
  6841. // "httpMethod": "GET",
  6842. // "id": "appengine.apps.operations.list",
  6843. // "parameterOrder": [
  6844. // "appsId"
  6845. // ],
  6846. // "parameters": {
  6847. // "appsId": {
  6848. // "description": "Part of `name`. The name of the operation's parent resource.",
  6849. // "location": "path",
  6850. // "required": true,
  6851. // "type": "string"
  6852. // },
  6853. // "filter": {
  6854. // "description": "The standard list filter.",
  6855. // "location": "query",
  6856. // "type": "string"
  6857. // },
  6858. // "pageSize": {
  6859. // "description": "The standard list page size.",
  6860. // "format": "int32",
  6861. // "location": "query",
  6862. // "type": "integer"
  6863. // },
  6864. // "pageToken": {
  6865. // "description": "The standard list page token.",
  6866. // "location": "query",
  6867. // "type": "string"
  6868. // }
  6869. // },
  6870. // "path": "v1/apps/{appsId}/operations",
  6871. // "response": {
  6872. // "$ref": "ListOperationsResponse"
  6873. // },
  6874. // "scopes": [
  6875. // "https://www.googleapis.com/auth/appengine.admin",
  6876. // "https://www.googleapis.com/auth/cloud-platform",
  6877. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6878. // ]
  6879. // }
  6880. }
  6881. // Pages invokes f for each page of results.
  6882. // A non-nil error returned from f will halt the iteration.
  6883. // The provided context supersedes any context provided to the Context method.
  6884. func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  6885. c.ctx_ = ctx
  6886. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6887. for {
  6888. x, err := c.Do()
  6889. if err != nil {
  6890. return err
  6891. }
  6892. if err := f(x); err != nil {
  6893. return err
  6894. }
  6895. if x.NextPageToken == "" {
  6896. return nil
  6897. }
  6898. c.PageToken(x.NextPageToken)
  6899. }
  6900. }
  6901. // method id "appengine.apps.services.delete":
  6902. type AppsServicesDeleteCall struct {
  6903. s *APIService
  6904. appsId string
  6905. servicesId string
  6906. urlParams_ gensupport.URLParams
  6907. ctx_ context.Context
  6908. header_ http.Header
  6909. }
  6910. // Delete: Deletes the specified service and all enclosed versions.
  6911. func (r *AppsServicesService) Delete(appsId string, servicesId string) *AppsServicesDeleteCall {
  6912. c := &AppsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6913. c.appsId = appsId
  6914. c.servicesId = servicesId
  6915. return c
  6916. }
  6917. // Fields allows partial responses to be retrieved. See
  6918. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6919. // for more information.
  6920. func (c *AppsServicesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesDeleteCall {
  6921. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6922. return c
  6923. }
  6924. // Context sets the context to be used in this call's Do method. Any
  6925. // pending HTTP request will be aborted if the provided context is
  6926. // canceled.
  6927. func (c *AppsServicesDeleteCall) Context(ctx context.Context) *AppsServicesDeleteCall {
  6928. c.ctx_ = ctx
  6929. return c
  6930. }
  6931. // Header returns an http.Header that can be modified by the caller to
  6932. // add HTTP headers to the request.
  6933. func (c *AppsServicesDeleteCall) Header() http.Header {
  6934. if c.header_ == nil {
  6935. c.header_ = make(http.Header)
  6936. }
  6937. return c.header_
  6938. }
  6939. func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6940. reqHeaders := make(http.Header)
  6941. for k, v := range c.header_ {
  6942. reqHeaders[k] = v
  6943. }
  6944. reqHeaders.Set("User-Agent", c.s.userAgent())
  6945. var body io.Reader = nil
  6946. c.urlParams_.Set("alt", alt)
  6947. c.urlParams_.Set("prettyPrint", "false")
  6948. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}")
  6949. urls += "?" + c.urlParams_.Encode()
  6950. req, err := http.NewRequest("DELETE", urls, body)
  6951. if err != nil {
  6952. return nil, err
  6953. }
  6954. req.Header = reqHeaders
  6955. googleapi.Expand(req.URL, map[string]string{
  6956. "appsId": c.appsId,
  6957. "servicesId": c.servicesId,
  6958. })
  6959. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6960. }
  6961. // Do executes the "appengine.apps.services.delete" call.
  6962. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6963. // status code is an error. Response headers are in either
  6964. // *Operation.ServerResponse.Header or (if a response was returned at
  6965. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6966. // to check whether the returned error was because
  6967. // http.StatusNotModified was returned.
  6968. func (c *AppsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6969. gensupport.SetOptions(c.urlParams_, opts...)
  6970. res, err := c.doRequest("json")
  6971. if res != nil && res.StatusCode == http.StatusNotModified {
  6972. if res.Body != nil {
  6973. res.Body.Close()
  6974. }
  6975. return nil, &googleapi.Error{
  6976. Code: res.StatusCode,
  6977. Header: res.Header,
  6978. }
  6979. }
  6980. if err != nil {
  6981. return nil, err
  6982. }
  6983. defer googleapi.CloseBody(res)
  6984. if err := googleapi.CheckResponse(res); err != nil {
  6985. return nil, err
  6986. }
  6987. ret := &Operation{
  6988. ServerResponse: googleapi.ServerResponse{
  6989. Header: res.Header,
  6990. HTTPStatusCode: res.StatusCode,
  6991. },
  6992. }
  6993. target := &ret
  6994. if err := gensupport.DecodeResponse(target, res); err != nil {
  6995. return nil, err
  6996. }
  6997. return ret, nil
  6998. // {
  6999. // "description": "Deletes the specified service and all enclosed versions.",
  7000. // "flatPath": "v1/apps/{appsId}/services/{servicesId}",
  7001. // "httpMethod": "DELETE",
  7002. // "id": "appengine.apps.services.delete",
  7003. // "parameterOrder": [
  7004. // "appsId",
  7005. // "servicesId"
  7006. // ],
  7007. // "parameters": {
  7008. // "appsId": {
  7009. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  7010. // "location": "path",
  7011. // "required": true,
  7012. // "type": "string"
  7013. // },
  7014. // "servicesId": {
  7015. // "description": "Part of `name`. See documentation of `appsId`.",
  7016. // "location": "path",
  7017. // "required": true,
  7018. // "type": "string"
  7019. // }
  7020. // },
  7021. // "path": "v1/apps/{appsId}/services/{servicesId}",
  7022. // "response": {
  7023. // "$ref": "Operation"
  7024. // },
  7025. // "scopes": [
  7026. // "https://www.googleapis.com/auth/cloud-platform"
  7027. // ]
  7028. // }
  7029. }
  7030. // method id "appengine.apps.services.get":
  7031. type AppsServicesGetCall struct {
  7032. s *APIService
  7033. appsId string
  7034. servicesId string
  7035. urlParams_ gensupport.URLParams
  7036. ifNoneMatch_ string
  7037. ctx_ context.Context
  7038. header_ http.Header
  7039. }
  7040. // Get: Gets the current configuration of the specified service.
  7041. func (r *AppsServicesService) Get(appsId string, servicesId string) *AppsServicesGetCall {
  7042. c := &AppsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7043. c.appsId = appsId
  7044. c.servicesId = servicesId
  7045. return c
  7046. }
  7047. // Fields allows partial responses to be retrieved. See
  7048. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7049. // for more information.
  7050. func (c *AppsServicesGetCall) Fields(s ...googleapi.Field) *AppsServicesGetCall {
  7051. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7052. return c
  7053. }
  7054. // IfNoneMatch sets the optional parameter which makes the operation
  7055. // fail if the object's ETag matches the given value. This is useful for
  7056. // getting updates only after the object has changed since the last
  7057. // request. Use googleapi.IsNotModified to check whether the response
  7058. // error from Do is the result of In-None-Match.
  7059. func (c *AppsServicesGetCall) IfNoneMatch(entityTag string) *AppsServicesGetCall {
  7060. c.ifNoneMatch_ = entityTag
  7061. return c
  7062. }
  7063. // Context sets the context to be used in this call's Do method. Any
  7064. // pending HTTP request will be aborted if the provided context is
  7065. // canceled.
  7066. func (c *AppsServicesGetCall) Context(ctx context.Context) *AppsServicesGetCall {
  7067. c.ctx_ = ctx
  7068. return c
  7069. }
  7070. // Header returns an http.Header that can be modified by the caller to
  7071. // add HTTP headers to the request.
  7072. func (c *AppsServicesGetCall) Header() http.Header {
  7073. if c.header_ == nil {
  7074. c.header_ = make(http.Header)
  7075. }
  7076. return c.header_
  7077. }
  7078. func (c *AppsServicesGetCall) doRequest(alt string) (*http.Response, error) {
  7079. reqHeaders := make(http.Header)
  7080. for k, v := range c.header_ {
  7081. reqHeaders[k] = v
  7082. }
  7083. reqHeaders.Set("User-Agent", c.s.userAgent())
  7084. if c.ifNoneMatch_ != "" {
  7085. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7086. }
  7087. var body io.Reader = nil
  7088. c.urlParams_.Set("alt", alt)
  7089. c.urlParams_.Set("prettyPrint", "false")
  7090. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}")
  7091. urls += "?" + c.urlParams_.Encode()
  7092. req, err := http.NewRequest("GET", urls, body)
  7093. if err != nil {
  7094. return nil, err
  7095. }
  7096. req.Header = reqHeaders
  7097. googleapi.Expand(req.URL, map[string]string{
  7098. "appsId": c.appsId,
  7099. "servicesId": c.servicesId,
  7100. })
  7101. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7102. }
  7103. // Do executes the "appengine.apps.services.get" call.
  7104. // Exactly one of *Service or error will be non-nil. Any non-2xx status
  7105. // code is an error. Response headers are in either
  7106. // *Service.ServerResponse.Header or (if a response was returned at all)
  7107. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7108. // check whether the returned error was because http.StatusNotModified
  7109. // was returned.
  7110. func (c *AppsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
  7111. gensupport.SetOptions(c.urlParams_, opts...)
  7112. res, err := c.doRequest("json")
  7113. if res != nil && res.StatusCode == http.StatusNotModified {
  7114. if res.Body != nil {
  7115. res.Body.Close()
  7116. }
  7117. return nil, &googleapi.Error{
  7118. Code: res.StatusCode,
  7119. Header: res.Header,
  7120. }
  7121. }
  7122. if err != nil {
  7123. return nil, err
  7124. }
  7125. defer googleapi.CloseBody(res)
  7126. if err := googleapi.CheckResponse(res); err != nil {
  7127. return nil, err
  7128. }
  7129. ret := &Service{
  7130. ServerResponse: googleapi.ServerResponse{
  7131. Header: res.Header,
  7132. HTTPStatusCode: res.StatusCode,
  7133. },
  7134. }
  7135. target := &ret
  7136. if err := gensupport.DecodeResponse(target, res); err != nil {
  7137. return nil, err
  7138. }
  7139. return ret, nil
  7140. // {
  7141. // "description": "Gets the current configuration of the specified service.",
  7142. // "flatPath": "v1/apps/{appsId}/services/{servicesId}",
  7143. // "httpMethod": "GET",
  7144. // "id": "appengine.apps.services.get",
  7145. // "parameterOrder": [
  7146. // "appsId",
  7147. // "servicesId"
  7148. // ],
  7149. // "parameters": {
  7150. // "appsId": {
  7151. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  7152. // "location": "path",
  7153. // "required": true,
  7154. // "type": "string"
  7155. // },
  7156. // "servicesId": {
  7157. // "description": "Part of `name`. See documentation of `appsId`.",
  7158. // "location": "path",
  7159. // "required": true,
  7160. // "type": "string"
  7161. // }
  7162. // },
  7163. // "path": "v1/apps/{appsId}/services/{servicesId}",
  7164. // "response": {
  7165. // "$ref": "Service"
  7166. // },
  7167. // "scopes": [
  7168. // "https://www.googleapis.com/auth/appengine.admin",
  7169. // "https://www.googleapis.com/auth/cloud-platform",
  7170. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7171. // ]
  7172. // }
  7173. }
  7174. // method id "appengine.apps.services.list":
  7175. type AppsServicesListCall struct {
  7176. s *APIService
  7177. appsId string
  7178. urlParams_ gensupport.URLParams
  7179. ifNoneMatch_ string
  7180. ctx_ context.Context
  7181. header_ http.Header
  7182. }
  7183. // List: Lists all the services in the application.
  7184. func (r *AppsServicesService) List(appsId string) *AppsServicesListCall {
  7185. c := &AppsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7186. c.appsId = appsId
  7187. return c
  7188. }
  7189. // PageSize sets the optional parameter "pageSize": Maximum results to
  7190. // return per page.
  7191. func (c *AppsServicesListCall) PageSize(pageSize int64) *AppsServicesListCall {
  7192. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7193. return c
  7194. }
  7195. // PageToken sets the optional parameter "pageToken": Continuation token
  7196. // for fetching the next page of results.
  7197. func (c *AppsServicesListCall) PageToken(pageToken string) *AppsServicesListCall {
  7198. c.urlParams_.Set("pageToken", pageToken)
  7199. return c
  7200. }
  7201. // Fields allows partial responses to be retrieved. See
  7202. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7203. // for more information.
  7204. func (c *AppsServicesListCall) Fields(s ...googleapi.Field) *AppsServicesListCall {
  7205. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7206. return c
  7207. }
  7208. // IfNoneMatch sets the optional parameter which makes the operation
  7209. // fail if the object's ETag matches the given value. This is useful for
  7210. // getting updates only after the object has changed since the last
  7211. // request. Use googleapi.IsNotModified to check whether the response
  7212. // error from Do is the result of In-None-Match.
  7213. func (c *AppsServicesListCall) IfNoneMatch(entityTag string) *AppsServicesListCall {
  7214. c.ifNoneMatch_ = entityTag
  7215. return c
  7216. }
  7217. // Context sets the context to be used in this call's Do method. Any
  7218. // pending HTTP request will be aborted if the provided context is
  7219. // canceled.
  7220. func (c *AppsServicesListCall) Context(ctx context.Context) *AppsServicesListCall {
  7221. c.ctx_ = ctx
  7222. return c
  7223. }
  7224. // Header returns an http.Header that can be modified by the caller to
  7225. // add HTTP headers to the request.
  7226. func (c *AppsServicesListCall) Header() http.Header {
  7227. if c.header_ == nil {
  7228. c.header_ = make(http.Header)
  7229. }
  7230. return c.header_
  7231. }
  7232. func (c *AppsServicesListCall) doRequest(alt string) (*http.Response, error) {
  7233. reqHeaders := make(http.Header)
  7234. for k, v := range c.header_ {
  7235. reqHeaders[k] = v
  7236. }
  7237. reqHeaders.Set("User-Agent", c.s.userAgent())
  7238. if c.ifNoneMatch_ != "" {
  7239. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7240. }
  7241. var body io.Reader = nil
  7242. c.urlParams_.Set("alt", alt)
  7243. c.urlParams_.Set("prettyPrint", "false")
  7244. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services")
  7245. urls += "?" + c.urlParams_.Encode()
  7246. req, err := http.NewRequest("GET", urls, body)
  7247. if err != nil {
  7248. return nil, err
  7249. }
  7250. req.Header = reqHeaders
  7251. googleapi.Expand(req.URL, map[string]string{
  7252. "appsId": c.appsId,
  7253. })
  7254. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7255. }
  7256. // Do executes the "appengine.apps.services.list" call.
  7257. // Exactly one of *ListServicesResponse or error will be non-nil. Any
  7258. // non-2xx status code is an error. Response headers are in either
  7259. // *ListServicesResponse.ServerResponse.Header or (if a response was
  7260. // returned at all) in error.(*googleapi.Error).Header. Use
  7261. // googleapi.IsNotModified to check whether the returned error was
  7262. // because http.StatusNotModified was returned.
  7263. func (c *AppsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
  7264. gensupport.SetOptions(c.urlParams_, opts...)
  7265. res, err := c.doRequest("json")
  7266. if res != nil && res.StatusCode == http.StatusNotModified {
  7267. if res.Body != nil {
  7268. res.Body.Close()
  7269. }
  7270. return nil, &googleapi.Error{
  7271. Code: res.StatusCode,
  7272. Header: res.Header,
  7273. }
  7274. }
  7275. if err != nil {
  7276. return nil, err
  7277. }
  7278. defer googleapi.CloseBody(res)
  7279. if err := googleapi.CheckResponse(res); err != nil {
  7280. return nil, err
  7281. }
  7282. ret := &ListServicesResponse{
  7283. ServerResponse: googleapi.ServerResponse{
  7284. Header: res.Header,
  7285. HTTPStatusCode: res.StatusCode,
  7286. },
  7287. }
  7288. target := &ret
  7289. if err := gensupport.DecodeResponse(target, res); err != nil {
  7290. return nil, err
  7291. }
  7292. return ret, nil
  7293. // {
  7294. // "description": "Lists all the services in the application.",
  7295. // "flatPath": "v1/apps/{appsId}/services",
  7296. // "httpMethod": "GET",
  7297. // "id": "appengine.apps.services.list",
  7298. // "parameterOrder": [
  7299. // "appsId"
  7300. // ],
  7301. // "parameters": {
  7302. // "appsId": {
  7303. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  7304. // "location": "path",
  7305. // "required": true,
  7306. // "type": "string"
  7307. // },
  7308. // "pageSize": {
  7309. // "description": "Maximum results to return per page.",
  7310. // "format": "int32",
  7311. // "location": "query",
  7312. // "type": "integer"
  7313. // },
  7314. // "pageToken": {
  7315. // "description": "Continuation token for fetching the next page of results.",
  7316. // "location": "query",
  7317. // "type": "string"
  7318. // }
  7319. // },
  7320. // "path": "v1/apps/{appsId}/services",
  7321. // "response": {
  7322. // "$ref": "ListServicesResponse"
  7323. // },
  7324. // "scopes": [
  7325. // "https://www.googleapis.com/auth/appengine.admin",
  7326. // "https://www.googleapis.com/auth/cloud-platform",
  7327. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7328. // ]
  7329. // }
  7330. }
  7331. // Pages invokes f for each page of results.
  7332. // A non-nil error returned from f will halt the iteration.
  7333. // The provided context supersedes any context provided to the Context method.
  7334. func (c *AppsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
  7335. c.ctx_ = ctx
  7336. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7337. for {
  7338. x, err := c.Do()
  7339. if err != nil {
  7340. return err
  7341. }
  7342. if err := f(x); err != nil {
  7343. return err
  7344. }
  7345. if x.NextPageToken == "" {
  7346. return nil
  7347. }
  7348. c.PageToken(x.NextPageToken)
  7349. }
  7350. }
  7351. // method id "appengine.apps.services.patch":
  7352. type AppsServicesPatchCall struct {
  7353. s *APIService
  7354. appsId string
  7355. servicesId string
  7356. service *Service
  7357. urlParams_ gensupport.URLParams
  7358. ctx_ context.Context
  7359. header_ http.Header
  7360. }
  7361. // Patch: Updates the configuration of the specified service.
  7362. func (r *AppsServicesService) Patch(appsId string, servicesId string, service *Service) *AppsServicesPatchCall {
  7363. c := &AppsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7364. c.appsId = appsId
  7365. c.servicesId = servicesId
  7366. c.service = service
  7367. return c
  7368. }
  7369. // MigrateTraffic sets the optional parameter "migrateTraffic": Set to
  7370. // true to gradually shift traffic to one or more versions that you
  7371. // specify. By default, traffic is shifted immediately. For gradual
  7372. // traffic migration, the target versions must be located within
  7373. // instances that are configured for both warmup requests
  7374. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  7375. // pps.services.versions#InboundServiceType) and automatic scaling
  7376. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  7377. // pps.services.versions#AutomaticScaling). You must specify the shardBy
  7378. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  7379. // pps.services#ShardBy) field in the Service resource. Gradual traffic
  7380. // migration is not supported in the App Engine flexible environment.
  7381. // For examples, see Migrating and Splitting Traffic
  7382. // (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting
  7383. // -traffic).
  7384. func (c *AppsServicesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsServicesPatchCall {
  7385. c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic))
  7386. return c
  7387. }
  7388. // UpdateMask sets the optional parameter "updateMask": Standard field
  7389. // mask for the set of fields to be updated.
  7390. func (c *AppsServicesPatchCall) UpdateMask(updateMask string) *AppsServicesPatchCall {
  7391. c.urlParams_.Set("updateMask", updateMask)
  7392. return c
  7393. }
  7394. // Fields allows partial responses to be retrieved. See
  7395. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7396. // for more information.
  7397. func (c *AppsServicesPatchCall) Fields(s ...googleapi.Field) *AppsServicesPatchCall {
  7398. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7399. return c
  7400. }
  7401. // Context sets the context to be used in this call's Do method. Any
  7402. // pending HTTP request will be aborted if the provided context is
  7403. // canceled.
  7404. func (c *AppsServicesPatchCall) Context(ctx context.Context) *AppsServicesPatchCall {
  7405. c.ctx_ = ctx
  7406. return c
  7407. }
  7408. // Header returns an http.Header that can be modified by the caller to
  7409. // add HTTP headers to the request.
  7410. func (c *AppsServicesPatchCall) Header() http.Header {
  7411. if c.header_ == nil {
  7412. c.header_ = make(http.Header)
  7413. }
  7414. return c.header_
  7415. }
  7416. func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
  7417. reqHeaders := make(http.Header)
  7418. for k, v := range c.header_ {
  7419. reqHeaders[k] = v
  7420. }
  7421. reqHeaders.Set("User-Agent", c.s.userAgent())
  7422. var body io.Reader = nil
  7423. body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
  7424. if err != nil {
  7425. return nil, err
  7426. }
  7427. reqHeaders.Set("Content-Type", "application/json")
  7428. c.urlParams_.Set("alt", alt)
  7429. c.urlParams_.Set("prettyPrint", "false")
  7430. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}")
  7431. urls += "?" + c.urlParams_.Encode()
  7432. req, err := http.NewRequest("PATCH", urls, body)
  7433. if err != nil {
  7434. return nil, err
  7435. }
  7436. req.Header = reqHeaders
  7437. googleapi.Expand(req.URL, map[string]string{
  7438. "appsId": c.appsId,
  7439. "servicesId": c.servicesId,
  7440. })
  7441. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7442. }
  7443. // Do executes the "appengine.apps.services.patch" call.
  7444. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7445. // status code is an error. Response headers are in either
  7446. // *Operation.ServerResponse.Header or (if a response was returned at
  7447. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7448. // to check whether the returned error was because
  7449. // http.StatusNotModified was returned.
  7450. func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7451. gensupport.SetOptions(c.urlParams_, opts...)
  7452. res, err := c.doRequest("json")
  7453. if res != nil && res.StatusCode == http.StatusNotModified {
  7454. if res.Body != nil {
  7455. res.Body.Close()
  7456. }
  7457. return nil, &googleapi.Error{
  7458. Code: res.StatusCode,
  7459. Header: res.Header,
  7460. }
  7461. }
  7462. if err != nil {
  7463. return nil, err
  7464. }
  7465. defer googleapi.CloseBody(res)
  7466. if err := googleapi.CheckResponse(res); err != nil {
  7467. return nil, err
  7468. }
  7469. ret := &Operation{
  7470. ServerResponse: googleapi.ServerResponse{
  7471. Header: res.Header,
  7472. HTTPStatusCode: res.StatusCode,
  7473. },
  7474. }
  7475. target := &ret
  7476. if err := gensupport.DecodeResponse(target, res); err != nil {
  7477. return nil, err
  7478. }
  7479. return ret, nil
  7480. // {
  7481. // "description": "Updates the configuration of the specified service.",
  7482. // "flatPath": "v1/apps/{appsId}/services/{servicesId}",
  7483. // "httpMethod": "PATCH",
  7484. // "id": "appengine.apps.services.patch",
  7485. // "parameterOrder": [
  7486. // "appsId",
  7487. // "servicesId"
  7488. // ],
  7489. // "parameters": {
  7490. // "appsId": {
  7491. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.",
  7492. // "location": "path",
  7493. // "required": true,
  7494. // "type": "string"
  7495. // },
  7496. // "migrateTraffic": {
  7497. // "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/v1/apps.services.versions#InboundServiceType) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/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).",
  7498. // "location": "query",
  7499. // "type": "boolean"
  7500. // },
  7501. // "servicesId": {
  7502. // "description": "Part of `name`. See documentation of `appsId`.",
  7503. // "location": "path",
  7504. // "required": true,
  7505. // "type": "string"
  7506. // },
  7507. // "updateMask": {
  7508. // "description": "Standard field mask for the set of fields to be updated.",
  7509. // "format": "google-fieldmask",
  7510. // "location": "query",
  7511. // "type": "string"
  7512. // }
  7513. // },
  7514. // "path": "v1/apps/{appsId}/services/{servicesId}",
  7515. // "request": {
  7516. // "$ref": "Service"
  7517. // },
  7518. // "response": {
  7519. // "$ref": "Operation"
  7520. // },
  7521. // "scopes": [
  7522. // "https://www.googleapis.com/auth/cloud-platform"
  7523. // ]
  7524. // }
  7525. }
  7526. // method id "appengine.apps.services.versions.create":
  7527. type AppsServicesVersionsCreateCall struct {
  7528. s *APIService
  7529. appsId string
  7530. servicesId string
  7531. version *Version
  7532. urlParams_ gensupport.URLParams
  7533. ctx_ context.Context
  7534. header_ http.Header
  7535. }
  7536. // Create: Deploys code and resource files to a new version.
  7537. func (r *AppsServicesVersionsService) Create(appsId string, servicesId string, version *Version) *AppsServicesVersionsCreateCall {
  7538. c := &AppsServicesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7539. c.appsId = appsId
  7540. c.servicesId = servicesId
  7541. c.version = version
  7542. return c
  7543. }
  7544. // Fields allows partial responses to be retrieved. See
  7545. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7546. // for more information.
  7547. func (c *AppsServicesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsServicesVersionsCreateCall {
  7548. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7549. return c
  7550. }
  7551. // Context sets the context to be used in this call's Do method. Any
  7552. // pending HTTP request will be aborted if the provided context is
  7553. // canceled.
  7554. func (c *AppsServicesVersionsCreateCall) Context(ctx context.Context) *AppsServicesVersionsCreateCall {
  7555. c.ctx_ = ctx
  7556. return c
  7557. }
  7558. // Header returns an http.Header that can be modified by the caller to
  7559. // add HTTP headers to the request.
  7560. func (c *AppsServicesVersionsCreateCall) Header() http.Header {
  7561. if c.header_ == nil {
  7562. c.header_ = make(http.Header)
  7563. }
  7564. return c.header_
  7565. }
  7566. func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  7567. reqHeaders := make(http.Header)
  7568. for k, v := range c.header_ {
  7569. reqHeaders[k] = v
  7570. }
  7571. reqHeaders.Set("User-Agent", c.s.userAgent())
  7572. var body io.Reader = nil
  7573. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  7574. if err != nil {
  7575. return nil, err
  7576. }
  7577. reqHeaders.Set("Content-Type", "application/json")
  7578. c.urlParams_.Set("alt", alt)
  7579. c.urlParams_.Set("prettyPrint", "false")
  7580. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions")
  7581. urls += "?" + c.urlParams_.Encode()
  7582. req, err := http.NewRequest("POST", urls, body)
  7583. if err != nil {
  7584. return nil, err
  7585. }
  7586. req.Header = reqHeaders
  7587. googleapi.Expand(req.URL, map[string]string{
  7588. "appsId": c.appsId,
  7589. "servicesId": c.servicesId,
  7590. })
  7591. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7592. }
  7593. // Do executes the "appengine.apps.services.versions.create" call.
  7594. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7595. // status code is an error. Response headers are in either
  7596. // *Operation.ServerResponse.Header or (if a response was returned at
  7597. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7598. // to check whether the returned error was because
  7599. // http.StatusNotModified was returned.
  7600. func (c *AppsServicesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7601. gensupport.SetOptions(c.urlParams_, opts...)
  7602. res, err := c.doRequest("json")
  7603. if res != nil && res.StatusCode == http.StatusNotModified {
  7604. if res.Body != nil {
  7605. res.Body.Close()
  7606. }
  7607. return nil, &googleapi.Error{
  7608. Code: res.StatusCode,
  7609. Header: res.Header,
  7610. }
  7611. }
  7612. if err != nil {
  7613. return nil, err
  7614. }
  7615. defer googleapi.CloseBody(res)
  7616. if err := googleapi.CheckResponse(res); err != nil {
  7617. return nil, err
  7618. }
  7619. ret := &Operation{
  7620. ServerResponse: googleapi.ServerResponse{
  7621. Header: res.Header,
  7622. HTTPStatusCode: res.StatusCode,
  7623. },
  7624. }
  7625. target := &ret
  7626. if err := gensupport.DecodeResponse(target, res); err != nil {
  7627. return nil, err
  7628. }
  7629. return ret, nil
  7630. // {
  7631. // "description": "Deploys code and resource files to a new version.",
  7632. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions",
  7633. // "httpMethod": "POST",
  7634. // "id": "appengine.apps.services.versions.create",
  7635. // "parameterOrder": [
  7636. // "appsId",
  7637. // "servicesId"
  7638. // ],
  7639. // "parameters": {
  7640. // "appsId": {
  7641. // "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.",
  7642. // "location": "path",
  7643. // "required": true,
  7644. // "type": "string"
  7645. // },
  7646. // "servicesId": {
  7647. // "description": "Part of `parent`. See documentation of `appsId`.",
  7648. // "location": "path",
  7649. // "required": true,
  7650. // "type": "string"
  7651. // }
  7652. // },
  7653. // "path": "v1/apps/{appsId}/services/{servicesId}/versions",
  7654. // "request": {
  7655. // "$ref": "Version"
  7656. // },
  7657. // "response": {
  7658. // "$ref": "Operation"
  7659. // },
  7660. // "scopes": [
  7661. // "https://www.googleapis.com/auth/cloud-platform"
  7662. // ]
  7663. // }
  7664. }
  7665. // method id "appengine.apps.services.versions.delete":
  7666. type AppsServicesVersionsDeleteCall struct {
  7667. s *APIService
  7668. appsId string
  7669. servicesId string
  7670. versionsId string
  7671. urlParams_ gensupport.URLParams
  7672. ctx_ context.Context
  7673. header_ http.Header
  7674. }
  7675. // Delete: Deletes an existing Version resource.
  7676. func (r *AppsServicesVersionsService) Delete(appsId string, servicesId string, versionsId string) *AppsServicesVersionsDeleteCall {
  7677. c := &AppsServicesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7678. c.appsId = appsId
  7679. c.servicesId = servicesId
  7680. c.versionsId = versionsId
  7681. return c
  7682. }
  7683. // Fields allows partial responses to be retrieved. See
  7684. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7685. // for more information.
  7686. func (c *AppsServicesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsDeleteCall {
  7687. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7688. return c
  7689. }
  7690. // Context sets the context to be used in this call's Do method. Any
  7691. // pending HTTP request will be aborted if the provided context is
  7692. // canceled.
  7693. func (c *AppsServicesVersionsDeleteCall) Context(ctx context.Context) *AppsServicesVersionsDeleteCall {
  7694. c.ctx_ = ctx
  7695. return c
  7696. }
  7697. // Header returns an http.Header that can be modified by the caller to
  7698. // add HTTP headers to the request.
  7699. func (c *AppsServicesVersionsDeleteCall) Header() http.Header {
  7700. if c.header_ == nil {
  7701. c.header_ = make(http.Header)
  7702. }
  7703. return c.header_
  7704. }
  7705. func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7706. reqHeaders := make(http.Header)
  7707. for k, v := range c.header_ {
  7708. reqHeaders[k] = v
  7709. }
  7710. reqHeaders.Set("User-Agent", c.s.userAgent())
  7711. var body io.Reader = nil
  7712. c.urlParams_.Set("alt", alt)
  7713. c.urlParams_.Set("prettyPrint", "false")
  7714. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  7715. urls += "?" + c.urlParams_.Encode()
  7716. req, err := http.NewRequest("DELETE", urls, body)
  7717. if err != nil {
  7718. return nil, err
  7719. }
  7720. req.Header = reqHeaders
  7721. googleapi.Expand(req.URL, map[string]string{
  7722. "appsId": c.appsId,
  7723. "servicesId": c.servicesId,
  7724. "versionsId": c.versionsId,
  7725. })
  7726. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7727. }
  7728. // Do executes the "appengine.apps.services.versions.delete" call.
  7729. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7730. // status code is an error. Response headers are in either
  7731. // *Operation.ServerResponse.Header or (if a response was returned at
  7732. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7733. // to check whether the returned error was because
  7734. // http.StatusNotModified was returned.
  7735. func (c *AppsServicesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7736. gensupport.SetOptions(c.urlParams_, opts...)
  7737. res, err := c.doRequest("json")
  7738. if res != nil && res.StatusCode == http.StatusNotModified {
  7739. if res.Body != nil {
  7740. res.Body.Close()
  7741. }
  7742. return nil, &googleapi.Error{
  7743. Code: res.StatusCode,
  7744. Header: res.Header,
  7745. }
  7746. }
  7747. if err != nil {
  7748. return nil, err
  7749. }
  7750. defer googleapi.CloseBody(res)
  7751. if err := googleapi.CheckResponse(res); err != nil {
  7752. return nil, err
  7753. }
  7754. ret := &Operation{
  7755. ServerResponse: googleapi.ServerResponse{
  7756. Header: res.Header,
  7757. HTTPStatusCode: res.StatusCode,
  7758. },
  7759. }
  7760. target := &ret
  7761. if err := gensupport.DecodeResponse(target, res); err != nil {
  7762. return nil, err
  7763. }
  7764. return ret, nil
  7765. // {
  7766. // "description": "Deletes an existing Version resource.",
  7767. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7768. // "httpMethod": "DELETE",
  7769. // "id": "appengine.apps.services.versions.delete",
  7770. // "parameterOrder": [
  7771. // "appsId",
  7772. // "servicesId",
  7773. // "versionsId"
  7774. // ],
  7775. // "parameters": {
  7776. // "appsId": {
  7777. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  7778. // "location": "path",
  7779. // "required": true,
  7780. // "type": "string"
  7781. // },
  7782. // "servicesId": {
  7783. // "description": "Part of `name`. See documentation of `appsId`.",
  7784. // "location": "path",
  7785. // "required": true,
  7786. // "type": "string"
  7787. // },
  7788. // "versionsId": {
  7789. // "description": "Part of `name`. See documentation of `appsId`.",
  7790. // "location": "path",
  7791. // "required": true,
  7792. // "type": "string"
  7793. // }
  7794. // },
  7795. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7796. // "response": {
  7797. // "$ref": "Operation"
  7798. // },
  7799. // "scopes": [
  7800. // "https://www.googleapis.com/auth/cloud-platform"
  7801. // ]
  7802. // }
  7803. }
  7804. // method id "appengine.apps.services.versions.get":
  7805. type AppsServicesVersionsGetCall struct {
  7806. s *APIService
  7807. appsId string
  7808. servicesId string
  7809. versionsId string
  7810. urlParams_ gensupport.URLParams
  7811. ifNoneMatch_ string
  7812. ctx_ context.Context
  7813. header_ http.Header
  7814. }
  7815. // Get: Gets the specified Version resource. By default, only a
  7816. // BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get
  7817. // the full resource.
  7818. func (r *AppsServicesVersionsService) Get(appsId string, servicesId string, versionsId string) *AppsServicesVersionsGetCall {
  7819. c := &AppsServicesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7820. c.appsId = appsId
  7821. c.servicesId = servicesId
  7822. c.versionsId = versionsId
  7823. return c
  7824. }
  7825. // View sets the optional parameter "view": Controls the set of fields
  7826. // returned in the Get response.
  7827. //
  7828. // Possible values:
  7829. // "BASIC"
  7830. // "FULL"
  7831. func (c *AppsServicesVersionsGetCall) View(view string) *AppsServicesVersionsGetCall {
  7832. c.urlParams_.Set("view", view)
  7833. return c
  7834. }
  7835. // Fields allows partial responses to be retrieved. See
  7836. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7837. // for more information.
  7838. func (c *AppsServicesVersionsGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsGetCall {
  7839. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7840. return c
  7841. }
  7842. // IfNoneMatch sets the optional parameter which makes the operation
  7843. // fail if the object's ETag matches the given value. This is useful for
  7844. // getting updates only after the object has changed since the last
  7845. // request. Use googleapi.IsNotModified to check whether the response
  7846. // error from Do is the result of In-None-Match.
  7847. func (c *AppsServicesVersionsGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsGetCall {
  7848. c.ifNoneMatch_ = entityTag
  7849. return c
  7850. }
  7851. // Context sets the context to be used in this call's Do method. Any
  7852. // pending HTTP request will be aborted if the provided context is
  7853. // canceled.
  7854. func (c *AppsServicesVersionsGetCall) Context(ctx context.Context) *AppsServicesVersionsGetCall {
  7855. c.ctx_ = ctx
  7856. return c
  7857. }
  7858. // Header returns an http.Header that can be modified by the caller to
  7859. // add HTTP headers to the request.
  7860. func (c *AppsServicesVersionsGetCall) Header() http.Header {
  7861. if c.header_ == nil {
  7862. c.header_ = make(http.Header)
  7863. }
  7864. return c.header_
  7865. }
  7866. func (c *AppsServicesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  7867. reqHeaders := make(http.Header)
  7868. for k, v := range c.header_ {
  7869. reqHeaders[k] = v
  7870. }
  7871. reqHeaders.Set("User-Agent", c.s.userAgent())
  7872. if c.ifNoneMatch_ != "" {
  7873. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7874. }
  7875. var body io.Reader = nil
  7876. c.urlParams_.Set("alt", alt)
  7877. c.urlParams_.Set("prettyPrint", "false")
  7878. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  7879. urls += "?" + c.urlParams_.Encode()
  7880. req, err := http.NewRequest("GET", urls, body)
  7881. if err != nil {
  7882. return nil, err
  7883. }
  7884. req.Header = reqHeaders
  7885. googleapi.Expand(req.URL, map[string]string{
  7886. "appsId": c.appsId,
  7887. "servicesId": c.servicesId,
  7888. "versionsId": c.versionsId,
  7889. })
  7890. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7891. }
  7892. // Do executes the "appengine.apps.services.versions.get" call.
  7893. // Exactly one of *Version or error will be non-nil. Any non-2xx status
  7894. // code is an error. Response headers are in either
  7895. // *Version.ServerResponse.Header or (if a response was returned at all)
  7896. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7897. // check whether the returned error was because http.StatusNotModified
  7898. // was returned.
  7899. func (c *AppsServicesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  7900. gensupport.SetOptions(c.urlParams_, opts...)
  7901. res, err := c.doRequest("json")
  7902. if res != nil && res.StatusCode == http.StatusNotModified {
  7903. if res.Body != nil {
  7904. res.Body.Close()
  7905. }
  7906. return nil, &googleapi.Error{
  7907. Code: res.StatusCode,
  7908. Header: res.Header,
  7909. }
  7910. }
  7911. if err != nil {
  7912. return nil, err
  7913. }
  7914. defer googleapi.CloseBody(res)
  7915. if err := googleapi.CheckResponse(res); err != nil {
  7916. return nil, err
  7917. }
  7918. ret := &Version{
  7919. ServerResponse: googleapi.ServerResponse{
  7920. Header: res.Header,
  7921. HTTPStatusCode: res.StatusCode,
  7922. },
  7923. }
  7924. target := &ret
  7925. if err := gensupport.DecodeResponse(target, res); err != nil {
  7926. return nil, err
  7927. }
  7928. return ret, nil
  7929. // {
  7930. // "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.",
  7931. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7932. // "httpMethod": "GET",
  7933. // "id": "appengine.apps.services.versions.get",
  7934. // "parameterOrder": [
  7935. // "appsId",
  7936. // "servicesId",
  7937. // "versionsId"
  7938. // ],
  7939. // "parameters": {
  7940. // "appsId": {
  7941. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  7942. // "location": "path",
  7943. // "required": true,
  7944. // "type": "string"
  7945. // },
  7946. // "servicesId": {
  7947. // "description": "Part of `name`. See documentation of `appsId`.",
  7948. // "location": "path",
  7949. // "required": true,
  7950. // "type": "string"
  7951. // },
  7952. // "versionsId": {
  7953. // "description": "Part of `name`. See documentation of `appsId`.",
  7954. // "location": "path",
  7955. // "required": true,
  7956. // "type": "string"
  7957. // },
  7958. // "view": {
  7959. // "description": "Controls the set of fields returned in the Get response.",
  7960. // "enum": [
  7961. // "BASIC",
  7962. // "FULL"
  7963. // ],
  7964. // "location": "query",
  7965. // "type": "string"
  7966. // }
  7967. // },
  7968. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7969. // "response": {
  7970. // "$ref": "Version"
  7971. // },
  7972. // "scopes": [
  7973. // "https://www.googleapis.com/auth/appengine.admin",
  7974. // "https://www.googleapis.com/auth/cloud-platform",
  7975. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7976. // ]
  7977. // }
  7978. }
  7979. // method id "appengine.apps.services.versions.list":
  7980. type AppsServicesVersionsListCall struct {
  7981. s *APIService
  7982. appsId string
  7983. servicesId string
  7984. urlParams_ gensupport.URLParams
  7985. ifNoneMatch_ string
  7986. ctx_ context.Context
  7987. header_ http.Header
  7988. }
  7989. // List: Lists the versions of a service.
  7990. func (r *AppsServicesVersionsService) List(appsId string, servicesId string) *AppsServicesVersionsListCall {
  7991. c := &AppsServicesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7992. c.appsId = appsId
  7993. c.servicesId = servicesId
  7994. return c
  7995. }
  7996. // PageSize sets the optional parameter "pageSize": Maximum results to
  7997. // return per page.
  7998. func (c *AppsServicesVersionsListCall) PageSize(pageSize int64) *AppsServicesVersionsListCall {
  7999. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8000. return c
  8001. }
  8002. // PageToken sets the optional parameter "pageToken": Continuation token
  8003. // for fetching the next page of results.
  8004. func (c *AppsServicesVersionsListCall) PageToken(pageToken string) *AppsServicesVersionsListCall {
  8005. c.urlParams_.Set("pageToken", pageToken)
  8006. return c
  8007. }
  8008. // View sets the optional parameter "view": Controls the set of fields
  8009. // returned in the List response.
  8010. //
  8011. // Possible values:
  8012. // "BASIC"
  8013. // "FULL"
  8014. func (c *AppsServicesVersionsListCall) View(view string) *AppsServicesVersionsListCall {
  8015. c.urlParams_.Set("view", view)
  8016. return c
  8017. }
  8018. // Fields allows partial responses to be retrieved. See
  8019. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8020. // for more information.
  8021. func (c *AppsServicesVersionsListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsListCall {
  8022. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8023. return c
  8024. }
  8025. // IfNoneMatch sets the optional parameter which makes the operation
  8026. // fail if the object's ETag matches the given value. This is useful for
  8027. // getting updates only after the object has changed since the last
  8028. // request. Use googleapi.IsNotModified to check whether the response
  8029. // error from Do is the result of In-None-Match.
  8030. func (c *AppsServicesVersionsListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsListCall {
  8031. c.ifNoneMatch_ = entityTag
  8032. return c
  8033. }
  8034. // Context sets the context to be used in this call's Do method. Any
  8035. // pending HTTP request will be aborted if the provided context is
  8036. // canceled.
  8037. func (c *AppsServicesVersionsListCall) Context(ctx context.Context) *AppsServicesVersionsListCall {
  8038. c.ctx_ = ctx
  8039. return c
  8040. }
  8041. // Header returns an http.Header that can be modified by the caller to
  8042. // add HTTP headers to the request.
  8043. func (c *AppsServicesVersionsListCall) Header() http.Header {
  8044. if c.header_ == nil {
  8045. c.header_ = make(http.Header)
  8046. }
  8047. return c.header_
  8048. }
  8049. func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  8050. reqHeaders := make(http.Header)
  8051. for k, v := range c.header_ {
  8052. reqHeaders[k] = v
  8053. }
  8054. reqHeaders.Set("User-Agent", c.s.userAgent())
  8055. if c.ifNoneMatch_ != "" {
  8056. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8057. }
  8058. var body io.Reader = nil
  8059. c.urlParams_.Set("alt", alt)
  8060. c.urlParams_.Set("prettyPrint", "false")
  8061. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions")
  8062. urls += "?" + c.urlParams_.Encode()
  8063. req, err := http.NewRequest("GET", urls, body)
  8064. if err != nil {
  8065. return nil, err
  8066. }
  8067. req.Header = reqHeaders
  8068. googleapi.Expand(req.URL, map[string]string{
  8069. "appsId": c.appsId,
  8070. "servicesId": c.servicesId,
  8071. })
  8072. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8073. }
  8074. // Do executes the "appengine.apps.services.versions.list" call.
  8075. // Exactly one of *ListVersionsResponse or error will be non-nil. Any
  8076. // non-2xx status code is an error. Response headers are in either
  8077. // *ListVersionsResponse.ServerResponse.Header or (if a response was
  8078. // returned at all) in error.(*googleapi.Error).Header. Use
  8079. // googleapi.IsNotModified to check whether the returned error was
  8080. // because http.StatusNotModified was returned.
  8081. func (c *AppsServicesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  8082. gensupport.SetOptions(c.urlParams_, opts...)
  8083. res, err := c.doRequest("json")
  8084. if res != nil && res.StatusCode == http.StatusNotModified {
  8085. if res.Body != nil {
  8086. res.Body.Close()
  8087. }
  8088. return nil, &googleapi.Error{
  8089. Code: res.StatusCode,
  8090. Header: res.Header,
  8091. }
  8092. }
  8093. if err != nil {
  8094. return nil, err
  8095. }
  8096. defer googleapi.CloseBody(res)
  8097. if err := googleapi.CheckResponse(res); err != nil {
  8098. return nil, err
  8099. }
  8100. ret := &ListVersionsResponse{
  8101. ServerResponse: googleapi.ServerResponse{
  8102. Header: res.Header,
  8103. HTTPStatusCode: res.StatusCode,
  8104. },
  8105. }
  8106. target := &ret
  8107. if err := gensupport.DecodeResponse(target, res); err != nil {
  8108. return nil, err
  8109. }
  8110. return ret, nil
  8111. // {
  8112. // "description": "Lists the versions of a service.",
  8113. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions",
  8114. // "httpMethod": "GET",
  8115. // "id": "appengine.apps.services.versions.list",
  8116. // "parameterOrder": [
  8117. // "appsId",
  8118. // "servicesId"
  8119. // ],
  8120. // "parameters": {
  8121. // "appsId": {
  8122. // "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.",
  8123. // "location": "path",
  8124. // "required": true,
  8125. // "type": "string"
  8126. // },
  8127. // "pageSize": {
  8128. // "description": "Maximum results to return per page.",
  8129. // "format": "int32",
  8130. // "location": "query",
  8131. // "type": "integer"
  8132. // },
  8133. // "pageToken": {
  8134. // "description": "Continuation token for fetching the next page of results.",
  8135. // "location": "query",
  8136. // "type": "string"
  8137. // },
  8138. // "servicesId": {
  8139. // "description": "Part of `parent`. See documentation of `appsId`.",
  8140. // "location": "path",
  8141. // "required": true,
  8142. // "type": "string"
  8143. // },
  8144. // "view": {
  8145. // "description": "Controls the set of fields returned in the List response.",
  8146. // "enum": [
  8147. // "BASIC",
  8148. // "FULL"
  8149. // ],
  8150. // "location": "query",
  8151. // "type": "string"
  8152. // }
  8153. // },
  8154. // "path": "v1/apps/{appsId}/services/{servicesId}/versions",
  8155. // "response": {
  8156. // "$ref": "ListVersionsResponse"
  8157. // },
  8158. // "scopes": [
  8159. // "https://www.googleapis.com/auth/appengine.admin",
  8160. // "https://www.googleapis.com/auth/cloud-platform",
  8161. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  8162. // ]
  8163. // }
  8164. }
  8165. // Pages invokes f for each page of results.
  8166. // A non-nil error returned from f will halt the iteration.
  8167. // The provided context supersedes any context provided to the Context method.
  8168. func (c *AppsServicesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  8169. c.ctx_ = ctx
  8170. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8171. for {
  8172. x, err := c.Do()
  8173. if err != nil {
  8174. return err
  8175. }
  8176. if err := f(x); err != nil {
  8177. return err
  8178. }
  8179. if x.NextPageToken == "" {
  8180. return nil
  8181. }
  8182. c.PageToken(x.NextPageToken)
  8183. }
  8184. }
  8185. // method id "appengine.apps.services.versions.patch":
  8186. type AppsServicesVersionsPatchCall struct {
  8187. s *APIService
  8188. appsId string
  8189. servicesId string
  8190. versionsId string
  8191. version *Version
  8192. urlParams_ gensupport.URLParams
  8193. ctx_ context.Context
  8194. header_ http.Header
  8195. }
  8196. // Patch: Updates the specified Version resource. You can specify the
  8197. // following fields depending on the App Engine environment and type of
  8198. // scaling that the version resource uses:Standard
  8199. // environment
  8200. // instance_class
  8201. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8202. // pps.services.versions#Version.FIELDS.instance_class)automatic scaling
  8203. // in the standard environment:
  8204. // automatic_scaling.min_idle_instances
  8205. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8206. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8207. // automatic_scal
  8208. // ing.max_idle_instances
  8209. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8210. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8211. // automaticScali
  8212. // ng.standard_scheduler_settings.max_instances
  8213. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8214. // pps.services.versions#StandardSchedulerSettings)
  8215. // automaticScaling.stan
  8216. // dard_scheduler_settings.min_instances
  8217. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8218. // pps.services.versions#StandardSchedulerSettings)
  8219. // automaticScaling.stan
  8220. // dard_scheduler_settings.target_cpu_utilization
  8221. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8222. // pps.services.versions#StandardSchedulerSettings)
  8223. // automaticScaling.stan
  8224. // dard_scheduler_settings.target_throughput_utilization
  8225. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8226. // pps.services.versions#StandardSchedulerSettings)basic scaling or
  8227. // manual scaling in the standard environment:
  8228. // serving_status
  8229. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8230. // pps.services.versions#Version.FIELDS.serving_status)Flexible
  8231. // environment
  8232. // serving_status
  8233. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8234. // pps.services.versions#Version.FIELDS.serving_status)automatic scaling
  8235. // in the flexible environment:
  8236. // automatic_scaling.min_total_instances
  8237. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8238. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8239. // automatic_scal
  8240. // ing.max_total_instances
  8241. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8242. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8243. // automatic_scal
  8244. // ing.cool_down_period_sec
  8245. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8246. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8247. // automatic_scal
  8248. // ing.cpu_utilization.target_utilization
  8249. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a
  8250. // pps.services.versions#Version.FIELDS.automatic_scaling)
  8251. func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall {
  8252. c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8253. c.appsId = appsId
  8254. c.servicesId = servicesId
  8255. c.versionsId = versionsId
  8256. c.version = version
  8257. return c
  8258. }
  8259. // UpdateMask sets the optional parameter "updateMask": Standard field
  8260. // mask for the set of fields to be updated.
  8261. func (c *AppsServicesVersionsPatchCall) UpdateMask(updateMask string) *AppsServicesVersionsPatchCall {
  8262. c.urlParams_.Set("updateMask", updateMask)
  8263. return c
  8264. }
  8265. // Fields allows partial responses to be retrieved. See
  8266. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8267. // for more information.
  8268. func (c *AppsServicesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsServicesVersionsPatchCall {
  8269. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8270. return c
  8271. }
  8272. // Context sets the context to be used in this call's Do method. Any
  8273. // pending HTTP request will be aborted if the provided context is
  8274. // canceled.
  8275. func (c *AppsServicesVersionsPatchCall) Context(ctx context.Context) *AppsServicesVersionsPatchCall {
  8276. c.ctx_ = ctx
  8277. return c
  8278. }
  8279. // Header returns an http.Header that can be modified by the caller to
  8280. // add HTTP headers to the request.
  8281. func (c *AppsServicesVersionsPatchCall) Header() http.Header {
  8282. if c.header_ == nil {
  8283. c.header_ = make(http.Header)
  8284. }
  8285. return c.header_
  8286. }
  8287. func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
  8288. reqHeaders := make(http.Header)
  8289. for k, v := range c.header_ {
  8290. reqHeaders[k] = v
  8291. }
  8292. reqHeaders.Set("User-Agent", c.s.userAgent())
  8293. var body io.Reader = nil
  8294. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  8295. if err != nil {
  8296. return nil, err
  8297. }
  8298. reqHeaders.Set("Content-Type", "application/json")
  8299. c.urlParams_.Set("alt", alt)
  8300. c.urlParams_.Set("prettyPrint", "false")
  8301. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  8302. urls += "?" + c.urlParams_.Encode()
  8303. req, err := http.NewRequest("PATCH", urls, body)
  8304. if err != nil {
  8305. return nil, err
  8306. }
  8307. req.Header = reqHeaders
  8308. googleapi.Expand(req.URL, map[string]string{
  8309. "appsId": c.appsId,
  8310. "servicesId": c.servicesId,
  8311. "versionsId": c.versionsId,
  8312. })
  8313. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8314. }
  8315. // Do executes the "appengine.apps.services.versions.patch" call.
  8316. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8317. // status code is an error. Response headers are in either
  8318. // *Operation.ServerResponse.Header or (if a response was returned at
  8319. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8320. // to check whether the returned error was because
  8321. // http.StatusNotModified was returned.
  8322. func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8323. gensupport.SetOptions(c.urlParams_, opts...)
  8324. res, err := c.doRequest("json")
  8325. if res != nil && res.StatusCode == http.StatusNotModified {
  8326. if res.Body != nil {
  8327. res.Body.Close()
  8328. }
  8329. return nil, &googleapi.Error{
  8330. Code: res.StatusCode,
  8331. Header: res.Header,
  8332. }
  8333. }
  8334. if err != nil {
  8335. return nil, err
  8336. }
  8337. defer googleapi.CloseBody(res)
  8338. if err := googleapi.CheckResponse(res); err != nil {
  8339. return nil, err
  8340. }
  8341. ret := &Operation{
  8342. ServerResponse: googleapi.ServerResponse{
  8343. Header: res.Header,
  8344. HTTPStatusCode: res.StatusCode,
  8345. },
  8346. }
  8347. target := &ret
  8348. if err := gensupport.DecodeResponse(target, res); err != nil {
  8349. return nil, err
  8350. }
  8351. return ret, nil
  8352. // {
  8353. // "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/v1/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/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomaticScaling.standard_scheduler_settings.max_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.min_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.target_cpu_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.target_throughput_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/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/v1/apps.services.versions#Version.FIELDS.serving_status)Flexible environment\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/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/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)",
  8354. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  8355. // "httpMethod": "PATCH",
  8356. // "id": "appengine.apps.services.versions.patch",
  8357. // "parameterOrder": [
  8358. // "appsId",
  8359. // "servicesId",
  8360. // "versionsId"
  8361. // ],
  8362. // "parameters": {
  8363. // "appsId": {
  8364. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.",
  8365. // "location": "path",
  8366. // "required": true,
  8367. // "type": "string"
  8368. // },
  8369. // "servicesId": {
  8370. // "description": "Part of `name`. See documentation of `appsId`.",
  8371. // "location": "path",
  8372. // "required": true,
  8373. // "type": "string"
  8374. // },
  8375. // "updateMask": {
  8376. // "description": "Standard field mask for the set of fields to be updated.",
  8377. // "format": "google-fieldmask",
  8378. // "location": "query",
  8379. // "type": "string"
  8380. // },
  8381. // "versionsId": {
  8382. // "description": "Part of `name`. See documentation of `appsId`.",
  8383. // "location": "path",
  8384. // "required": true,
  8385. // "type": "string"
  8386. // }
  8387. // },
  8388. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  8389. // "request": {
  8390. // "$ref": "Version"
  8391. // },
  8392. // "response": {
  8393. // "$ref": "Operation"
  8394. // },
  8395. // "scopes": [
  8396. // "https://www.googleapis.com/auth/cloud-platform"
  8397. // ]
  8398. // }
  8399. }
  8400. // method id "appengine.apps.services.versions.instances.debug":
  8401. type AppsServicesVersionsInstancesDebugCall struct {
  8402. s *APIService
  8403. appsId string
  8404. servicesId string
  8405. versionsId string
  8406. instancesId string
  8407. debuginstancerequest *DebugInstanceRequest
  8408. urlParams_ gensupport.URLParams
  8409. ctx_ context.Context
  8410. header_ http.Header
  8411. }
  8412. // Debug: Enables debugging on a VM instance. This allows you to use the
  8413. // SSH command to connect to the virtual machine where the instance
  8414. // lives. While in "debug mode", the instance continues to serve live
  8415. // traffic. You should delete the instance when you are done debugging
  8416. // and then allow the system to take over and determine if another
  8417. // instance should be started.Only applicable for instances in App
  8418. // Engine flexible environment.
  8419. func (r *AppsServicesVersionsInstancesService) Debug(appsId string, servicesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsServicesVersionsInstancesDebugCall {
  8420. c := &AppsServicesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8421. c.appsId = appsId
  8422. c.servicesId = servicesId
  8423. c.versionsId = versionsId
  8424. c.instancesId = instancesId
  8425. c.debuginstancerequest = debuginstancerequest
  8426. return c
  8427. }
  8428. // Fields allows partial responses to be retrieved. See
  8429. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8430. // for more information.
  8431. func (c *AppsServicesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDebugCall {
  8432. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8433. return c
  8434. }
  8435. // Context sets the context to be used in this call's Do method. Any
  8436. // pending HTTP request will be aborted if the provided context is
  8437. // canceled.
  8438. func (c *AppsServicesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDebugCall {
  8439. c.ctx_ = ctx
  8440. return c
  8441. }
  8442. // Header returns an http.Header that can be modified by the caller to
  8443. // add HTTP headers to the request.
  8444. func (c *AppsServicesVersionsInstancesDebugCall) Header() http.Header {
  8445. if c.header_ == nil {
  8446. c.header_ = make(http.Header)
  8447. }
  8448. return c.header_
  8449. }
  8450. func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) {
  8451. reqHeaders := make(http.Header)
  8452. for k, v := range c.header_ {
  8453. reqHeaders[k] = v
  8454. }
  8455. reqHeaders.Set("User-Agent", c.s.userAgent())
  8456. var body io.Reader = nil
  8457. body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest)
  8458. if err != nil {
  8459. return nil, err
  8460. }
  8461. reqHeaders.Set("Content-Type", "application/json")
  8462. c.urlParams_.Set("alt", alt)
  8463. c.urlParams_.Set("prettyPrint", "false")
  8464. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug")
  8465. urls += "?" + c.urlParams_.Encode()
  8466. req, err := http.NewRequest("POST", urls, body)
  8467. if err != nil {
  8468. return nil, err
  8469. }
  8470. req.Header = reqHeaders
  8471. googleapi.Expand(req.URL, map[string]string{
  8472. "appsId": c.appsId,
  8473. "servicesId": c.servicesId,
  8474. "versionsId": c.versionsId,
  8475. "instancesId": c.instancesId,
  8476. })
  8477. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8478. }
  8479. // Do executes the "appengine.apps.services.versions.instances.debug" call.
  8480. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8481. // status code is an error. Response headers are in either
  8482. // *Operation.ServerResponse.Header or (if a response was returned at
  8483. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8484. // to check whether the returned error was because
  8485. // http.StatusNotModified was returned.
  8486. func (c *AppsServicesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8487. gensupport.SetOptions(c.urlParams_, opts...)
  8488. res, err := c.doRequest("json")
  8489. if res != nil && res.StatusCode == http.StatusNotModified {
  8490. if res.Body != nil {
  8491. res.Body.Close()
  8492. }
  8493. return nil, &googleapi.Error{
  8494. Code: res.StatusCode,
  8495. Header: res.Header,
  8496. }
  8497. }
  8498. if err != nil {
  8499. return nil, err
  8500. }
  8501. defer googleapi.CloseBody(res)
  8502. if err := googleapi.CheckResponse(res); err != nil {
  8503. return nil, err
  8504. }
  8505. ret := &Operation{
  8506. ServerResponse: googleapi.ServerResponse{
  8507. Header: res.Header,
  8508. HTTPStatusCode: res.StatusCode,
  8509. },
  8510. }
  8511. target := &ret
  8512. if err := gensupport.DecodeResponse(target, res); err != nil {
  8513. return nil, err
  8514. }
  8515. return ret, nil
  8516. // {
  8517. // "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.",
  8518. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
  8519. // "httpMethod": "POST",
  8520. // "id": "appengine.apps.services.versions.instances.debug",
  8521. // "parameterOrder": [
  8522. // "appsId",
  8523. // "servicesId",
  8524. // "versionsId",
  8525. // "instancesId"
  8526. // ],
  8527. // "parameters": {
  8528. // "appsId": {
  8529. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8530. // "location": "path",
  8531. // "required": true,
  8532. // "type": "string"
  8533. // },
  8534. // "instancesId": {
  8535. // "description": "Part of `name`. See documentation of `appsId`.",
  8536. // "location": "path",
  8537. // "required": true,
  8538. // "type": "string"
  8539. // },
  8540. // "servicesId": {
  8541. // "description": "Part of `name`. See documentation of `appsId`.",
  8542. // "location": "path",
  8543. // "required": true,
  8544. // "type": "string"
  8545. // },
  8546. // "versionsId": {
  8547. // "description": "Part of `name`. See documentation of `appsId`.",
  8548. // "location": "path",
  8549. // "required": true,
  8550. // "type": "string"
  8551. // }
  8552. // },
  8553. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
  8554. // "request": {
  8555. // "$ref": "DebugInstanceRequest"
  8556. // },
  8557. // "response": {
  8558. // "$ref": "Operation"
  8559. // },
  8560. // "scopes": [
  8561. // "https://www.googleapis.com/auth/cloud-platform"
  8562. // ]
  8563. // }
  8564. }
  8565. // method id "appengine.apps.services.versions.instances.delete":
  8566. type AppsServicesVersionsInstancesDeleteCall struct {
  8567. s *APIService
  8568. appsId string
  8569. servicesId string
  8570. versionsId string
  8571. instancesId string
  8572. urlParams_ gensupport.URLParams
  8573. ctx_ context.Context
  8574. header_ http.Header
  8575. }
  8576. // Delete: Stops a running instance.
  8577. func (r *AppsServicesVersionsInstancesService) Delete(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesDeleteCall {
  8578. c := &AppsServicesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8579. c.appsId = appsId
  8580. c.servicesId = servicesId
  8581. c.versionsId = versionsId
  8582. c.instancesId = instancesId
  8583. return c
  8584. }
  8585. // Fields allows partial responses to be retrieved. See
  8586. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8587. // for more information.
  8588. func (c *AppsServicesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDeleteCall {
  8589. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8590. return c
  8591. }
  8592. // Context sets the context to be used in this call's Do method. Any
  8593. // pending HTTP request will be aborted if the provided context is
  8594. // canceled.
  8595. func (c *AppsServicesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDeleteCall {
  8596. c.ctx_ = ctx
  8597. return c
  8598. }
  8599. // Header returns an http.Header that can be modified by the caller to
  8600. // add HTTP headers to the request.
  8601. func (c *AppsServicesVersionsInstancesDeleteCall) Header() http.Header {
  8602. if c.header_ == nil {
  8603. c.header_ = make(http.Header)
  8604. }
  8605. return c.header_
  8606. }
  8607. func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  8608. reqHeaders := make(http.Header)
  8609. for k, v := range c.header_ {
  8610. reqHeaders[k] = v
  8611. }
  8612. reqHeaders.Set("User-Agent", c.s.userAgent())
  8613. var body io.Reader = nil
  8614. c.urlParams_.Set("alt", alt)
  8615. c.urlParams_.Set("prettyPrint", "false")
  8616. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
  8617. urls += "?" + c.urlParams_.Encode()
  8618. req, err := http.NewRequest("DELETE", urls, body)
  8619. if err != nil {
  8620. return nil, err
  8621. }
  8622. req.Header = reqHeaders
  8623. googleapi.Expand(req.URL, map[string]string{
  8624. "appsId": c.appsId,
  8625. "servicesId": c.servicesId,
  8626. "versionsId": c.versionsId,
  8627. "instancesId": c.instancesId,
  8628. })
  8629. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8630. }
  8631. // Do executes the "appengine.apps.services.versions.instances.delete" call.
  8632. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8633. // status code is an error. Response headers are in either
  8634. // *Operation.ServerResponse.Header or (if a response was returned at
  8635. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8636. // to check whether the returned error was because
  8637. // http.StatusNotModified was returned.
  8638. func (c *AppsServicesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8639. gensupport.SetOptions(c.urlParams_, opts...)
  8640. res, err := c.doRequest("json")
  8641. if res != nil && res.StatusCode == http.StatusNotModified {
  8642. if res.Body != nil {
  8643. res.Body.Close()
  8644. }
  8645. return nil, &googleapi.Error{
  8646. Code: res.StatusCode,
  8647. Header: res.Header,
  8648. }
  8649. }
  8650. if err != nil {
  8651. return nil, err
  8652. }
  8653. defer googleapi.CloseBody(res)
  8654. if err := googleapi.CheckResponse(res); err != nil {
  8655. return nil, err
  8656. }
  8657. ret := &Operation{
  8658. ServerResponse: googleapi.ServerResponse{
  8659. Header: res.Header,
  8660. HTTPStatusCode: res.StatusCode,
  8661. },
  8662. }
  8663. target := &ret
  8664. if err := gensupport.DecodeResponse(target, res); err != nil {
  8665. return nil, err
  8666. }
  8667. return ret, nil
  8668. // {
  8669. // "description": "Stops a running instance.",
  8670. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8671. // "httpMethod": "DELETE",
  8672. // "id": "appengine.apps.services.versions.instances.delete",
  8673. // "parameterOrder": [
  8674. // "appsId",
  8675. // "servicesId",
  8676. // "versionsId",
  8677. // "instancesId"
  8678. // ],
  8679. // "parameters": {
  8680. // "appsId": {
  8681. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8682. // "location": "path",
  8683. // "required": true,
  8684. // "type": "string"
  8685. // },
  8686. // "instancesId": {
  8687. // "description": "Part of `name`. See documentation of `appsId`.",
  8688. // "location": "path",
  8689. // "required": true,
  8690. // "type": "string"
  8691. // },
  8692. // "servicesId": {
  8693. // "description": "Part of `name`. See documentation of `appsId`.",
  8694. // "location": "path",
  8695. // "required": true,
  8696. // "type": "string"
  8697. // },
  8698. // "versionsId": {
  8699. // "description": "Part of `name`. See documentation of `appsId`.",
  8700. // "location": "path",
  8701. // "required": true,
  8702. // "type": "string"
  8703. // }
  8704. // },
  8705. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8706. // "response": {
  8707. // "$ref": "Operation"
  8708. // },
  8709. // "scopes": [
  8710. // "https://www.googleapis.com/auth/cloud-platform"
  8711. // ]
  8712. // }
  8713. }
  8714. // method id "appengine.apps.services.versions.instances.get":
  8715. type AppsServicesVersionsInstancesGetCall struct {
  8716. s *APIService
  8717. appsId string
  8718. servicesId string
  8719. versionsId string
  8720. instancesId string
  8721. urlParams_ gensupport.URLParams
  8722. ifNoneMatch_ string
  8723. ctx_ context.Context
  8724. header_ http.Header
  8725. }
  8726. // Get: Gets instance information.
  8727. func (r *AppsServicesVersionsInstancesService) Get(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesGetCall {
  8728. c := &AppsServicesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8729. c.appsId = appsId
  8730. c.servicesId = servicesId
  8731. c.versionsId = versionsId
  8732. c.instancesId = instancesId
  8733. return c
  8734. }
  8735. // Fields allows partial responses to be retrieved. See
  8736. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8737. // for more information.
  8738. func (c *AppsServicesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesGetCall {
  8739. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8740. return c
  8741. }
  8742. // IfNoneMatch sets the optional parameter which makes the operation
  8743. // fail if the object's ETag matches the given value. This is useful for
  8744. // getting updates only after the object has changed since the last
  8745. // request. Use googleapi.IsNotModified to check whether the response
  8746. // error from Do is the result of In-None-Match.
  8747. func (c *AppsServicesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesGetCall {
  8748. c.ifNoneMatch_ = entityTag
  8749. return c
  8750. }
  8751. // Context sets the context to be used in this call's Do method. Any
  8752. // pending HTTP request will be aborted if the provided context is
  8753. // canceled.
  8754. func (c *AppsServicesVersionsInstancesGetCall) Context(ctx context.Context) *AppsServicesVersionsInstancesGetCall {
  8755. c.ctx_ = ctx
  8756. return c
  8757. }
  8758. // Header returns an http.Header that can be modified by the caller to
  8759. // add HTTP headers to the request.
  8760. func (c *AppsServicesVersionsInstancesGetCall) Header() http.Header {
  8761. if c.header_ == nil {
  8762. c.header_ = make(http.Header)
  8763. }
  8764. return c.header_
  8765. }
  8766. func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  8767. reqHeaders := make(http.Header)
  8768. for k, v := range c.header_ {
  8769. reqHeaders[k] = v
  8770. }
  8771. reqHeaders.Set("User-Agent", c.s.userAgent())
  8772. if c.ifNoneMatch_ != "" {
  8773. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8774. }
  8775. var body io.Reader = nil
  8776. c.urlParams_.Set("alt", alt)
  8777. c.urlParams_.Set("prettyPrint", "false")
  8778. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
  8779. urls += "?" + c.urlParams_.Encode()
  8780. req, err := http.NewRequest("GET", urls, body)
  8781. if err != nil {
  8782. return nil, err
  8783. }
  8784. req.Header = reqHeaders
  8785. googleapi.Expand(req.URL, map[string]string{
  8786. "appsId": c.appsId,
  8787. "servicesId": c.servicesId,
  8788. "versionsId": c.versionsId,
  8789. "instancesId": c.instancesId,
  8790. })
  8791. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8792. }
  8793. // Do executes the "appengine.apps.services.versions.instances.get" call.
  8794. // Exactly one of *Instance or error will be non-nil. Any non-2xx status
  8795. // code is an error. Response headers are in either
  8796. // *Instance.ServerResponse.Header or (if a response was returned at
  8797. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8798. // to check whether the returned error was because
  8799. // http.StatusNotModified was returned.
  8800. func (c *AppsServicesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  8801. gensupport.SetOptions(c.urlParams_, opts...)
  8802. res, err := c.doRequest("json")
  8803. if res != nil && res.StatusCode == http.StatusNotModified {
  8804. if res.Body != nil {
  8805. res.Body.Close()
  8806. }
  8807. return nil, &googleapi.Error{
  8808. Code: res.StatusCode,
  8809. Header: res.Header,
  8810. }
  8811. }
  8812. if err != nil {
  8813. return nil, err
  8814. }
  8815. defer googleapi.CloseBody(res)
  8816. if err := googleapi.CheckResponse(res); err != nil {
  8817. return nil, err
  8818. }
  8819. ret := &Instance{
  8820. ServerResponse: googleapi.ServerResponse{
  8821. Header: res.Header,
  8822. HTTPStatusCode: res.StatusCode,
  8823. },
  8824. }
  8825. target := &ret
  8826. if err := gensupport.DecodeResponse(target, res); err != nil {
  8827. return nil, err
  8828. }
  8829. return ret, nil
  8830. // {
  8831. // "description": "Gets instance information.",
  8832. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8833. // "httpMethod": "GET",
  8834. // "id": "appengine.apps.services.versions.instances.get",
  8835. // "parameterOrder": [
  8836. // "appsId",
  8837. // "servicesId",
  8838. // "versionsId",
  8839. // "instancesId"
  8840. // ],
  8841. // "parameters": {
  8842. // "appsId": {
  8843. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8844. // "location": "path",
  8845. // "required": true,
  8846. // "type": "string"
  8847. // },
  8848. // "instancesId": {
  8849. // "description": "Part of `name`. See documentation of `appsId`.",
  8850. // "location": "path",
  8851. // "required": true,
  8852. // "type": "string"
  8853. // },
  8854. // "servicesId": {
  8855. // "description": "Part of `name`. See documentation of `appsId`.",
  8856. // "location": "path",
  8857. // "required": true,
  8858. // "type": "string"
  8859. // },
  8860. // "versionsId": {
  8861. // "description": "Part of `name`. See documentation of `appsId`.",
  8862. // "location": "path",
  8863. // "required": true,
  8864. // "type": "string"
  8865. // }
  8866. // },
  8867. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8868. // "response": {
  8869. // "$ref": "Instance"
  8870. // },
  8871. // "scopes": [
  8872. // "https://www.googleapis.com/auth/appengine.admin",
  8873. // "https://www.googleapis.com/auth/cloud-platform",
  8874. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  8875. // ]
  8876. // }
  8877. }
  8878. // method id "appengine.apps.services.versions.instances.list":
  8879. type AppsServicesVersionsInstancesListCall struct {
  8880. s *APIService
  8881. appsId string
  8882. servicesId string
  8883. versionsId string
  8884. urlParams_ gensupport.URLParams
  8885. ifNoneMatch_ string
  8886. ctx_ context.Context
  8887. header_ http.Header
  8888. }
  8889. // List: Lists the instances of a version.Tip: To aggregate details
  8890. // about instances over time, see the Stackdriver Monitoring API
  8891. // (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeS
  8892. // eries/list).
  8893. func (r *AppsServicesVersionsInstancesService) List(appsId string, servicesId string, versionsId string) *AppsServicesVersionsInstancesListCall {
  8894. c := &AppsServicesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8895. c.appsId = appsId
  8896. c.servicesId = servicesId
  8897. c.versionsId = versionsId
  8898. return c
  8899. }
  8900. // PageSize sets the optional parameter "pageSize": Maximum results to
  8901. // return per page.
  8902. func (c *AppsServicesVersionsInstancesListCall) PageSize(pageSize int64) *AppsServicesVersionsInstancesListCall {
  8903. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8904. return c
  8905. }
  8906. // PageToken sets the optional parameter "pageToken": Continuation token
  8907. // for fetching the next page of results.
  8908. func (c *AppsServicesVersionsInstancesListCall) PageToken(pageToken string) *AppsServicesVersionsInstancesListCall {
  8909. c.urlParams_.Set("pageToken", pageToken)
  8910. return c
  8911. }
  8912. // Fields allows partial responses to be retrieved. See
  8913. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8914. // for more information.
  8915. func (c *AppsServicesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesListCall {
  8916. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8917. return c
  8918. }
  8919. // IfNoneMatch sets the optional parameter which makes the operation
  8920. // fail if the object's ETag matches the given value. This is useful for
  8921. // getting updates only after the object has changed since the last
  8922. // request. Use googleapi.IsNotModified to check whether the response
  8923. // error from Do is the result of In-None-Match.
  8924. func (c *AppsServicesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesListCall {
  8925. c.ifNoneMatch_ = entityTag
  8926. return c
  8927. }
  8928. // Context sets the context to be used in this call's Do method. Any
  8929. // pending HTTP request will be aborted if the provided context is
  8930. // canceled.
  8931. func (c *AppsServicesVersionsInstancesListCall) Context(ctx context.Context) *AppsServicesVersionsInstancesListCall {
  8932. c.ctx_ = ctx
  8933. return c
  8934. }
  8935. // Header returns an http.Header that can be modified by the caller to
  8936. // add HTTP headers to the request.
  8937. func (c *AppsServicesVersionsInstancesListCall) Header() http.Header {
  8938. if c.header_ == nil {
  8939. c.header_ = make(http.Header)
  8940. }
  8941. return c.header_
  8942. }
  8943. func (c *AppsServicesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  8944. reqHeaders := make(http.Header)
  8945. for k, v := range c.header_ {
  8946. reqHeaders[k] = v
  8947. }
  8948. reqHeaders.Set("User-Agent", c.s.userAgent())
  8949. if c.ifNoneMatch_ != "" {
  8950. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8951. }
  8952. var body io.Reader = nil
  8953. c.urlParams_.Set("alt", alt)
  8954. c.urlParams_.Set("prettyPrint", "false")
  8955. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances")
  8956. urls += "?" + c.urlParams_.Encode()
  8957. req, err := http.NewRequest("GET", urls, body)
  8958. if err != nil {
  8959. return nil, err
  8960. }
  8961. req.Header = reqHeaders
  8962. googleapi.Expand(req.URL, map[string]string{
  8963. "appsId": c.appsId,
  8964. "servicesId": c.servicesId,
  8965. "versionsId": c.versionsId,
  8966. })
  8967. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8968. }
  8969. // Do executes the "appengine.apps.services.versions.instances.list" call.
  8970. // Exactly one of *ListInstancesResponse or error will be non-nil. Any
  8971. // non-2xx status code is an error. Response headers are in either
  8972. // *ListInstancesResponse.ServerResponse.Header or (if a response was
  8973. // returned at all) in error.(*googleapi.Error).Header. Use
  8974. // googleapi.IsNotModified to check whether the returned error was
  8975. // because http.StatusNotModified was returned.
  8976. func (c *AppsServicesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  8977. gensupport.SetOptions(c.urlParams_, opts...)
  8978. res, err := c.doRequest("json")
  8979. if res != nil && res.StatusCode == http.StatusNotModified {
  8980. if res.Body != nil {
  8981. res.Body.Close()
  8982. }
  8983. return nil, &googleapi.Error{
  8984. Code: res.StatusCode,
  8985. Header: res.Header,
  8986. }
  8987. }
  8988. if err != nil {
  8989. return nil, err
  8990. }
  8991. defer googleapi.CloseBody(res)
  8992. if err := googleapi.CheckResponse(res); err != nil {
  8993. return nil, err
  8994. }
  8995. ret := &ListInstancesResponse{
  8996. ServerResponse: googleapi.ServerResponse{
  8997. Header: res.Header,
  8998. HTTPStatusCode: res.StatusCode,
  8999. },
  9000. }
  9001. target := &ret
  9002. if err := gensupport.DecodeResponse(target, res); err != nil {
  9003. return nil, err
  9004. }
  9005. return ret, nil
  9006. // {
  9007. // "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).",
  9008. // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
  9009. // "httpMethod": "GET",
  9010. // "id": "appengine.apps.services.versions.instances.list",
  9011. // "parameterOrder": [
  9012. // "appsId",
  9013. // "servicesId",
  9014. // "versionsId"
  9015. // ],
  9016. // "parameters": {
  9017. // "appsId": {
  9018. // "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.",
  9019. // "location": "path",
  9020. // "required": true,
  9021. // "type": "string"
  9022. // },
  9023. // "pageSize": {
  9024. // "description": "Maximum results to return per page.",
  9025. // "format": "int32",
  9026. // "location": "query",
  9027. // "type": "integer"
  9028. // },
  9029. // "pageToken": {
  9030. // "description": "Continuation token for fetching the next page of results.",
  9031. // "location": "query",
  9032. // "type": "string"
  9033. // },
  9034. // "servicesId": {
  9035. // "description": "Part of `parent`. See documentation of `appsId`.",
  9036. // "location": "path",
  9037. // "required": true,
  9038. // "type": "string"
  9039. // },
  9040. // "versionsId": {
  9041. // "description": "Part of `parent`. See documentation of `appsId`.",
  9042. // "location": "path",
  9043. // "required": true,
  9044. // "type": "string"
  9045. // }
  9046. // },
  9047. // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
  9048. // "response": {
  9049. // "$ref": "ListInstancesResponse"
  9050. // },
  9051. // "scopes": [
  9052. // "https://www.googleapis.com/auth/appengine.admin",
  9053. // "https://www.googleapis.com/auth/cloud-platform",
  9054. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  9055. // ]
  9056. // }
  9057. }
  9058. // Pages invokes f for each page of results.
  9059. // A non-nil error returned from f will halt the iteration.
  9060. // The provided context supersedes any context provided to the Context method.
  9061. func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  9062. c.ctx_ = ctx
  9063. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9064. for {
  9065. x, err := c.Do()
  9066. if err != nil {
  9067. return err
  9068. }
  9069. if err := f(x); err != nil {
  9070. return err
  9071. }
  9072. if x.NextPageToken == "" {
  9073. return nil
  9074. }
  9075. c.PageToken(x.NextPageToken)
  9076. }
  9077. }