Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

9968 linhas
367 KiB

  1. // Package appengine provides access to the App Engine Admin API.
  2. //
  3. // See https://cloud.google.com/appengine/docs/admin-api/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/appengine/v1beta"
  8. // ...
  9. // appengineService, err := appengine.New(oauthHttpClient)
  10. package appengine // import "google.golang.org/api/appengine/v1beta"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "appengine:v1beta"
  41. const apiName = "appengine"
  42. const apiVersion = "v1beta"
  43. const basePath = "https://appengine.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your applications deployed on Google App Engine
  47. AppengineAdminScope = "https://www.googleapis.com/auth/appengine.admin"
  48. // View and manage your data across Google Cloud Platform services
  49. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  50. // View your data across Google Cloud Platform services
  51. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  52. )
  53. func New(client *http.Client) (*APIService, error) {
  54. if client == nil {
  55. return nil, errors.New("client is nil")
  56. }
  57. s := &APIService{client: client, BasePath: basePath}
  58. s.Apps = NewAppsService(s)
  59. return s, nil
  60. }
  61. type APIService struct {
  62. client *http.Client
  63. BasePath string // API endpoint base URL
  64. UserAgent string // optional additional User-Agent fragment
  65. Apps *AppsService
  66. }
  67. func (s *APIService) userAgent() string {
  68. if s.UserAgent == "" {
  69. return googleapi.UserAgent
  70. }
  71. return googleapi.UserAgent + " " + s.UserAgent
  72. }
  73. func NewAppsService(s *APIService) *AppsService {
  74. rs := &AppsService{s: s}
  75. rs.AuthorizedCertificates = NewAppsAuthorizedCertificatesService(s)
  76. rs.AuthorizedDomains = NewAppsAuthorizedDomainsService(s)
  77. rs.DomainMappings = NewAppsDomainMappingsService(s)
  78. rs.Firewall = NewAppsFirewallService(s)
  79. rs.Locations = NewAppsLocationsService(s)
  80. rs.Operations = NewAppsOperationsService(s)
  81. rs.Services = NewAppsServicesService(s)
  82. return rs
  83. }
  84. type AppsService struct {
  85. s *APIService
  86. AuthorizedCertificates *AppsAuthorizedCertificatesService
  87. AuthorizedDomains *AppsAuthorizedDomainsService
  88. DomainMappings *AppsDomainMappingsService
  89. Firewall *AppsFirewallService
  90. Locations *AppsLocationsService
  91. Operations *AppsOperationsService
  92. Services *AppsServicesService
  93. }
  94. func NewAppsAuthorizedCertificatesService(s *APIService) *AppsAuthorizedCertificatesService {
  95. rs := &AppsAuthorizedCertificatesService{s: s}
  96. return rs
  97. }
  98. type AppsAuthorizedCertificatesService struct {
  99. s *APIService
  100. }
  101. func NewAppsAuthorizedDomainsService(s *APIService) *AppsAuthorizedDomainsService {
  102. rs := &AppsAuthorizedDomainsService{s: s}
  103. return rs
  104. }
  105. type AppsAuthorizedDomainsService struct {
  106. s *APIService
  107. }
  108. func NewAppsDomainMappingsService(s *APIService) *AppsDomainMappingsService {
  109. rs := &AppsDomainMappingsService{s: s}
  110. return rs
  111. }
  112. type AppsDomainMappingsService struct {
  113. s *APIService
  114. }
  115. func NewAppsFirewallService(s *APIService) *AppsFirewallService {
  116. rs := &AppsFirewallService{s: s}
  117. rs.IngressRules = NewAppsFirewallIngressRulesService(s)
  118. return rs
  119. }
  120. type AppsFirewallService struct {
  121. s *APIService
  122. IngressRules *AppsFirewallIngressRulesService
  123. }
  124. func NewAppsFirewallIngressRulesService(s *APIService) *AppsFirewallIngressRulesService {
  125. rs := &AppsFirewallIngressRulesService{s: s}
  126. return rs
  127. }
  128. type AppsFirewallIngressRulesService struct {
  129. s *APIService
  130. }
  131. func NewAppsLocationsService(s *APIService) *AppsLocationsService {
  132. rs := &AppsLocationsService{s: s}
  133. return rs
  134. }
  135. type AppsLocationsService struct {
  136. s *APIService
  137. }
  138. func NewAppsOperationsService(s *APIService) *AppsOperationsService {
  139. rs := &AppsOperationsService{s: s}
  140. return rs
  141. }
  142. type AppsOperationsService struct {
  143. s *APIService
  144. }
  145. func NewAppsServicesService(s *APIService) *AppsServicesService {
  146. rs := &AppsServicesService{s: s}
  147. rs.Versions = NewAppsServicesVersionsService(s)
  148. return rs
  149. }
  150. type AppsServicesService struct {
  151. s *APIService
  152. Versions *AppsServicesVersionsService
  153. }
  154. func NewAppsServicesVersionsService(s *APIService) *AppsServicesVersionsService {
  155. rs := &AppsServicesVersionsService{s: s}
  156. rs.Instances = NewAppsServicesVersionsInstancesService(s)
  157. return rs
  158. }
  159. type AppsServicesVersionsService struct {
  160. s *APIService
  161. Instances *AppsServicesVersionsInstancesService
  162. }
  163. func NewAppsServicesVersionsInstancesService(s *APIService) *AppsServicesVersionsInstancesService {
  164. rs := &AppsServicesVersionsInstancesService{s: s}
  165. return rs
  166. }
  167. type AppsServicesVersionsInstancesService struct {
  168. s *APIService
  169. }
  170. // ApiConfigHandler: Google Cloud Endpoints
  171. // (https://cloud.google.com/appengine/docs/python/endpoints/)
  172. // configuration for API handlers.
  173. type ApiConfigHandler struct {
  174. // AuthFailAction: Action to take when users access resources that
  175. // require authentication. Defaults to redirect.
  176. //
  177. // Possible values:
  178. // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified.
  179. // AUTH_FAIL_ACTION_REDIRECT is assumed.
  180. // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to
  181. // "accounts.google.com". The user is redirected back to the application
  182. // URL after signing in or creating an account.
  183. // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP
  184. // status code and an error message.
  185. AuthFailAction string `json:"authFailAction,omitempty"`
  186. // Login: Level of login required to access this resource. Defaults to
  187. // optional.
  188. //
  189. // Possible values:
  190. // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed.
  191. // "LOGIN_OPTIONAL" - Does not require that the user is signed in.
  192. // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action
  193. // is taken. In addition, if the user is not an administrator for the
  194. // application, they are given an error message regardless of
  195. // auth_fail_action. If the user is an administrator, the handler
  196. // proceeds.
  197. // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds
  198. // normally. Otherwise, the auth_fail_action is taken.
  199. Login string `json:"login,omitempty"`
  200. // Script: Path to the script from the application root directory.
  201. Script string `json:"script,omitempty"`
  202. // SecurityLevel: Security (HTTPS) enforcement for this URL.
  203. //
  204. // Possible values:
  205. // "SECURE_UNSPECIFIED" - Not specified.
  206. // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that
  207. // match the handler succeed without redirects. The application can
  208. // examine the request to determine which protocol was used, and respond
  209. // accordingly.
  210. // "SECURE_NEVER" - Requests for a URL that match this handler that
  211. // use HTTPS are automatically redirected to the HTTP equivalent URL.
  212. // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that
  213. // match the handler succeed without redirects. The application can
  214. // examine the request to determine which protocol was used and respond
  215. // accordingly.
  216. // "SECURE_ALWAYS" - Requests for a URL that match this handler that
  217. // do not use HTTPS are automatically redirected to the HTTPS URL with
  218. // the same path. Query parameters are reserved for the redirect.
  219. SecurityLevel string `json:"securityLevel,omitempty"`
  220. // Url: URL to serve the endpoint at.
  221. Url string `json:"url,omitempty"`
  222. // ForceSendFields is a list of field names (e.g. "AuthFailAction") to
  223. // unconditionally include in API requests. By default, fields with
  224. // empty values are omitted from API requests. However, any non-pointer,
  225. // non-interface field appearing in ForceSendFields will be sent to the
  226. // server regardless of whether the field is empty or not. This may be
  227. // used to include empty fields in Patch requests.
  228. ForceSendFields []string `json:"-"`
  229. // NullFields is a list of field names (e.g. "AuthFailAction") to
  230. // include in API requests with the JSON null value. By default, fields
  231. // with empty values are omitted from API requests. However, any field
  232. // with an empty value appearing in NullFields will be sent to the
  233. // server as null. It is an error if a field in this list has a
  234. // non-empty value. This may be used to include null fields in Patch
  235. // requests.
  236. NullFields []string `json:"-"`
  237. }
  238. func (s *ApiConfigHandler) MarshalJSON() ([]byte, error) {
  239. type NoMethod ApiConfigHandler
  240. raw := NoMethod(*s)
  241. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  242. }
  243. // ApiEndpointHandler: Uses Google Cloud Endpoints to handle requests.
  244. type ApiEndpointHandler struct {
  245. // ScriptPath: Path to the script from the application root directory.
  246. ScriptPath string `json:"scriptPath,omitempty"`
  247. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  248. // unconditionally include in API requests. By default, fields with
  249. // empty values are omitted from API requests. However, any non-pointer,
  250. // non-interface field appearing in ForceSendFields will be sent to the
  251. // server regardless of whether the field is empty or not. This may be
  252. // used to include empty fields in Patch requests.
  253. ForceSendFields []string `json:"-"`
  254. // NullFields is a list of field names (e.g. "ScriptPath") to include in
  255. // API requests with the JSON null value. By default, fields with empty
  256. // values are omitted from API requests. However, any field with an
  257. // empty value appearing in NullFields will be sent to the server as
  258. // null. It is an error if a field in this list has a non-empty value.
  259. // This may be used to include null fields in Patch requests.
  260. NullFields []string `json:"-"`
  261. }
  262. func (s *ApiEndpointHandler) MarshalJSON() ([]byte, error) {
  263. type NoMethod ApiEndpointHandler
  264. raw := NoMethod(*s)
  265. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  266. }
  267. // Application: An Application resource contains the top-level
  268. // configuration of an App Engine application.
  269. type Application struct {
  270. // AuthDomain: Google Apps authentication domain that controls which
  271. // users can access this application.Defaults to open access for any
  272. // Google Account.
  273. AuthDomain string `json:"authDomain,omitempty"`
  274. // CodeBucket: Google Cloud Storage bucket that can be used for storing
  275. // files associated with this application. This bucket is associated
  276. // with the application and can be used by the gcloud deployment
  277. // commands.@OutputOnly
  278. CodeBucket string `json:"codeBucket,omitempty"`
  279. // DefaultBucket: Google Cloud Storage bucket that can be used by this
  280. // application to store content.@OutputOnly
  281. DefaultBucket string `json:"defaultBucket,omitempty"`
  282. // DefaultCookieExpiration: Cookie expiration policy for this
  283. // application.
  284. DefaultCookieExpiration string `json:"defaultCookieExpiration,omitempty"`
  285. // DefaultHostname: Hostname used to reach this application, as resolved
  286. // by App Engine.@OutputOnly
  287. DefaultHostname string `json:"defaultHostname,omitempty"`
  288. // DispatchRules: HTTP path dispatch rules for requests to the
  289. // application that do not explicitly target a service or version. Rules
  290. // are order-dependent. Up to 20 dispatch rules can be
  291. // supported.@OutputOnly
  292. DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"`
  293. // FeatureSettings: The feature specific settings to be used in the
  294. // application.
  295. FeatureSettings *FeatureSettings `json:"featureSettings,omitempty"`
  296. // GcrDomain: The Google Container Registry domain used for storing
  297. // managed build docker images for this application.
  298. GcrDomain string `json:"gcrDomain,omitempty"`
  299. Iap *IdentityAwareProxy `json:"iap,omitempty"`
  300. // Id: Identifier of the Application resource. This identifier is
  301. // equivalent to the project ID of the Google Cloud Platform project
  302. // where you want to deploy your application. Example: myapp.
  303. Id string `json:"id,omitempty"`
  304. // LocationId: Location from which this application runs. Application
  305. // instances run out of the data centers in the specified location,
  306. // which is also where all of the application's end user content is
  307. // stored.Defaults to us-central.View the list of supported locations
  308. // (https://cloud.google.com/appengine/docs/locations).
  309. LocationId string `json:"locationId,omitempty"`
  310. // Name: Full path to the Application resource in the API. Example:
  311. // apps/myapp.@OutputOnly
  312. Name string `json:"name,omitempty"`
  313. // ServingStatus: Serving status of this application.
  314. //
  315. // Possible values:
  316. // "UNSPECIFIED" - Serving status is unspecified.
  317. // "SERVING" - Application is serving.
  318. // "USER_DISABLED" - Application has been disabled by the user.
  319. // "SYSTEM_DISABLED" - Application has been disabled by the system.
  320. ServingStatus string `json:"servingStatus,omitempty"`
  321. // ServerResponse contains the HTTP response code and headers from the
  322. // server.
  323. googleapi.ServerResponse `json:"-"`
  324. // ForceSendFields is a list of field names (e.g. "AuthDomain") to
  325. // unconditionally include in API requests. By default, fields with
  326. // empty values are omitted from API requests. However, any non-pointer,
  327. // non-interface field appearing in ForceSendFields will be sent to the
  328. // server regardless of whether the field is empty or not. This may be
  329. // used to include empty fields in Patch requests.
  330. ForceSendFields []string `json:"-"`
  331. // NullFields is a list of field names (e.g. "AuthDomain") to include in
  332. // API requests with the JSON null value. By default, fields with empty
  333. // values are omitted from API requests. However, any field with an
  334. // empty value appearing in NullFields will be sent to the server as
  335. // null. It is an error if a field in this list has a non-empty value.
  336. // This may be used to include null fields in Patch requests.
  337. NullFields []string `json:"-"`
  338. }
  339. func (s *Application) MarshalJSON() ([]byte, error) {
  340. type NoMethod Application
  341. raw := NoMethod(*s)
  342. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  343. }
  344. // AuthorizedCertificate: An SSL certificate that a user has been
  345. // authorized to administer. A user is authorized to administer any
  346. // certificate that applies to one of their authorized domains.
  347. type AuthorizedCertificate struct {
  348. // CertificateRawData: The SSL certificate serving the
  349. // AuthorizedCertificate resource. This must be obtained independently
  350. // from a certificate authority.
  351. CertificateRawData *CertificateRawData `json:"certificateRawData,omitempty"`
  352. // DisplayName: The user-specified display name of the certificate. This
  353. // is not guaranteed to be unique. Example: My Certificate.
  354. DisplayName string `json:"displayName,omitempty"`
  355. // DomainMappingsCount: Aggregate count of the domain mappings with this
  356. // certificate mapped. This count includes domain mappings on
  357. // applications for which the user does not have VIEWER permissions.Only
  358. // returned by GET or LIST requests when specifically requested by the
  359. // view=FULL_CERTIFICATE option.@OutputOnly
  360. DomainMappingsCount int64 `json:"domainMappingsCount,omitempty"`
  361. // DomainNames: Topmost applicable domains of this certificate. This
  362. // certificate applies to these domains and their subdomains. Example:
  363. // example.com.@OutputOnly
  364. DomainNames []string `json:"domainNames,omitempty"`
  365. // ExpireTime: The time when this certificate expires. To update the
  366. // renewal time on this certificate, upload an SSL certificate with a
  367. // different expiration time using
  368. // AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly
  369. ExpireTime string `json:"expireTime,omitempty"`
  370. // Id: Relative name of the certificate. This is a unique value
  371. // autogenerated on AuthorizedCertificate resource creation. Example:
  372. // 12345.@OutputOnly
  373. Id string `json:"id,omitempty"`
  374. // ManagedCertificate: Only applicable if this certificate is managed by
  375. // App Engine. Managed certificates are tied to the lifecycle of a
  376. // DomainMapping and cannot be updated or deleted via the
  377. // AuthorizedCertificates API. If this certificate is manually
  378. // administered by the user, this field will be empty.@OutputOnly
  379. ManagedCertificate *ManagedCertificate `json:"managedCertificate,omitempty"`
  380. // Name: Full path to the AuthorizedCertificate resource in the API.
  381. // Example: apps/myapp/authorizedCertificates/12345.@OutputOnly
  382. Name string `json:"name,omitempty"`
  383. // VisibleDomainMappings: The full paths to user visible Domain Mapping
  384. // resources that have this certificate mapped. Example:
  385. // apps/myapp/domainMappings/example.com.This may not represent the full
  386. // list of mapped domain mappings if the user does not have VIEWER
  387. // permissions on all of the applications that have this certificate
  388. // mapped. See domain_mappings_count for a complete count.Only returned
  389. // by GET or LIST requests when specifically requested by the
  390. // view=FULL_CERTIFICATE option.@OutputOnly
  391. VisibleDomainMappings []string `json:"visibleDomainMappings,omitempty"`
  392. // ServerResponse contains the HTTP response code and headers from the
  393. // server.
  394. googleapi.ServerResponse `json:"-"`
  395. // ForceSendFields is a list of field names (e.g. "CertificateRawData")
  396. // to unconditionally include in API requests. By default, fields with
  397. // empty values are omitted from API requests. However, any non-pointer,
  398. // non-interface field appearing in ForceSendFields will be sent to the
  399. // server regardless of whether the field is empty or not. This may be
  400. // used to include empty fields in Patch requests.
  401. ForceSendFields []string `json:"-"`
  402. // NullFields is a list of field names (e.g. "CertificateRawData") to
  403. // include in API requests with the JSON null value. By default, fields
  404. // with empty values are omitted from API requests. However, any field
  405. // with an empty value appearing in NullFields will be sent to the
  406. // server as null. It is an error if a field in this list has a
  407. // non-empty value. This may be used to include null fields in Patch
  408. // requests.
  409. NullFields []string `json:"-"`
  410. }
  411. func (s *AuthorizedCertificate) MarshalJSON() ([]byte, error) {
  412. type NoMethod AuthorizedCertificate
  413. raw := NoMethod(*s)
  414. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  415. }
  416. // AuthorizedDomain: A domain that a user has been authorized to
  417. // administer. To authorize use of a domain, verify ownership via
  418. // Webmaster Central
  419. // (https://www.google.com/webmasters/verification/home).
  420. type AuthorizedDomain struct {
  421. // Id: Fully qualified domain name of the domain authorized for use.
  422. // Example: example.com.
  423. Id string `json:"id,omitempty"`
  424. // Name: Full path to the AuthorizedDomain resource in the API. Example:
  425. // apps/myapp/authorizedDomains/example.com.@OutputOnly
  426. Name string `json:"name,omitempty"`
  427. // ForceSendFields is a list of field names (e.g. "Id") to
  428. // unconditionally include in API requests. By default, fields with
  429. // empty values are omitted from API requests. However, any non-pointer,
  430. // non-interface field appearing in ForceSendFields will be sent to the
  431. // server regardless of whether the field is empty or not. This may be
  432. // used to include empty fields in Patch requests.
  433. ForceSendFields []string `json:"-"`
  434. // NullFields is a list of field names (e.g. "Id") to include in API
  435. // requests with the JSON null value. By default, fields with empty
  436. // values are omitted from API requests. However, any field with an
  437. // empty value appearing in NullFields will be sent to the server as
  438. // null. It is an error if a field in this list has a non-empty value.
  439. // This may be used to include null fields in Patch requests.
  440. NullFields []string `json:"-"`
  441. }
  442. func (s *AuthorizedDomain) MarshalJSON() ([]byte, error) {
  443. type NoMethod AuthorizedDomain
  444. raw := NoMethod(*s)
  445. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  446. }
  447. // AutomaticScaling: Automatic scaling is based on request rate,
  448. // response latencies, and other application metrics.
  449. type AutomaticScaling struct {
  450. // CoolDownPeriod: Amount of time that the Autoscaler
  451. // (https://cloud.google.com/compute/docs/autoscaler/) should wait
  452. // between changes to the number of virtual machines. Only applicable in
  453. // the App Engine flexible environment.
  454. CoolDownPeriod string `json:"coolDownPeriod,omitempty"`
  455. // CpuUtilization: Target scaling by CPU usage.
  456. CpuUtilization *CpuUtilization `json:"cpuUtilization,omitempty"`
  457. // CustomMetrics: Target scaling by user-provided metrics.
  458. CustomMetrics []*CustomMetric `json:"customMetrics,omitempty"`
  459. // DiskUtilization: Target scaling by disk usage.
  460. DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"`
  461. // MaxConcurrentRequests: Number of concurrent requests an automatic
  462. // scaling instance can accept before the scheduler spawns a new
  463. // instance.Defaults to a runtime-specific value.
  464. MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"`
  465. // MaxIdleInstances: Maximum number of idle instances that should be
  466. // maintained for this version.
  467. MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"`
  468. // MaxPendingLatency: Maximum amount of time that a request should wait
  469. // in the pending queue before starting a new instance to handle it.
  470. MaxPendingLatency string `json:"maxPendingLatency,omitempty"`
  471. // MaxTotalInstances: Maximum number of instances that should be started
  472. // to handle requests for this version.
  473. MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"`
  474. // MinIdleInstances: Minimum number of idle instances that should be
  475. // maintained for this version. Only applicable for the default version
  476. // of a service.
  477. MinIdleInstances int64 `json:"minIdleInstances,omitempty"`
  478. // MinPendingLatency: Minimum amount of time a request should wait in
  479. // the pending queue before starting a new instance to handle it.
  480. MinPendingLatency string `json:"minPendingLatency,omitempty"`
  481. // MinTotalInstances: Minimum number of running instances that should be
  482. // maintained for this version.
  483. MinTotalInstances int64 `json:"minTotalInstances,omitempty"`
  484. // NetworkUtilization: Target scaling by network usage.
  485. NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"`
  486. // RequestUtilization: Target scaling by request utilization.
  487. RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"`
  488. // StandardSchedulerSettings: Scheduler settings for standard
  489. // environment.
  490. StandardSchedulerSettings *StandardSchedulerSettings `json:"standardSchedulerSettings,omitempty"`
  491. // ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to
  492. // unconditionally include in API requests. By default, fields with
  493. // empty values are omitted from API requests. However, any non-pointer,
  494. // non-interface field appearing in ForceSendFields will be sent to the
  495. // server regardless of whether the field is empty or not. This may be
  496. // used to include empty fields in Patch requests.
  497. ForceSendFields []string `json:"-"`
  498. // NullFields is a list of field names (e.g. "CoolDownPeriod") to
  499. // include in API requests with the JSON null value. By default, fields
  500. // with empty values are omitted from API requests. However, any field
  501. // with an empty value appearing in NullFields will be sent to the
  502. // server as null. It is an error if a field in this list has a
  503. // non-empty value. This may be used to include null fields in Patch
  504. // requests.
  505. NullFields []string `json:"-"`
  506. }
  507. func (s *AutomaticScaling) MarshalJSON() ([]byte, error) {
  508. type NoMethod AutomaticScaling
  509. raw := NoMethod(*s)
  510. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  511. }
  512. // BasicScaling: A service with basic scaling will create an instance
  513. // when the application receives a request. The instance will be turned
  514. // down when the app becomes idle. Basic scaling is ideal for work that
  515. // is intermittent or driven by user activity.
  516. type BasicScaling struct {
  517. // IdleTimeout: Duration of time after the last request that an instance
  518. // must wait before the instance is shut down.
  519. IdleTimeout string `json:"idleTimeout,omitempty"`
  520. // MaxInstances: Maximum number of instances to create for this version.
  521. MaxInstances int64 `json:"maxInstances,omitempty"`
  522. // ForceSendFields is a list of field names (e.g. "IdleTimeout") to
  523. // unconditionally include in API requests. By default, fields with
  524. // empty values are omitted from API requests. However, any non-pointer,
  525. // non-interface field appearing in ForceSendFields will be sent to the
  526. // server regardless of whether the field is empty or not. This may be
  527. // used to include empty fields in Patch requests.
  528. ForceSendFields []string `json:"-"`
  529. // NullFields is a list of field names (e.g. "IdleTimeout") to include
  530. // in API requests with the JSON null value. By default, fields with
  531. // empty values are omitted from API requests. However, any field with
  532. // an empty value appearing in NullFields will be sent to the server as
  533. // null. It is an error if a field in this list has a non-empty value.
  534. // This may be used to include null fields in Patch requests.
  535. NullFields []string `json:"-"`
  536. }
  537. func (s *BasicScaling) MarshalJSON() ([]byte, error) {
  538. type NoMethod BasicScaling
  539. raw := NoMethod(*s)
  540. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  541. }
  542. // BatchUpdateIngressRulesRequest: Request message for
  543. // Firewall.BatchUpdateIngressRules.
  544. type BatchUpdateIngressRulesRequest struct {
  545. // IngressRules: A list of FirewallRules to replace the existing set.
  546. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  547. // ForceSendFields is a list of field names (e.g. "IngressRules") 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. "IngressRules") to include
  555. // in API requests with the JSON null value. By default, fields with
  556. // empty values are omitted from API requests. However, any field with
  557. // an empty value appearing in NullFields will be sent to the server as
  558. // null. It is an error if a field in this list has a non-empty value.
  559. // This may be used to include null fields in Patch requests.
  560. NullFields []string `json:"-"`
  561. }
  562. func (s *BatchUpdateIngressRulesRequest) MarshalJSON() ([]byte, error) {
  563. type NoMethod BatchUpdateIngressRulesRequest
  564. raw := NoMethod(*s)
  565. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  566. }
  567. // BatchUpdateIngressRulesResponse: Response message for
  568. // Firewall.UpdateAllIngressRules.
  569. type BatchUpdateIngressRulesResponse struct {
  570. // IngressRules: The full list of ingress FirewallRules for this
  571. // application.
  572. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  573. // ServerResponse contains the HTTP response code and headers from the
  574. // server.
  575. googleapi.ServerResponse `json:"-"`
  576. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  577. // unconditionally include in API requests. By default, fields with
  578. // empty values are omitted from API requests. However, any non-pointer,
  579. // non-interface field appearing in ForceSendFields will be sent to the
  580. // server regardless of whether the field is empty or not. This may be
  581. // used to include empty fields in Patch requests.
  582. ForceSendFields []string `json:"-"`
  583. // NullFields is a list of field names (e.g. "IngressRules") to include
  584. // in API requests with the JSON null value. By default, fields with
  585. // empty values are omitted from API requests. However, any field with
  586. // an empty value appearing in NullFields will be sent to the server as
  587. // null. It is an error if a field in this list has a non-empty value.
  588. // This may be used to include null fields in Patch requests.
  589. NullFields []string `json:"-"`
  590. }
  591. func (s *BatchUpdateIngressRulesResponse) MarshalJSON() ([]byte, error) {
  592. type NoMethod BatchUpdateIngressRulesResponse
  593. raw := NoMethod(*s)
  594. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  595. }
  596. // BuildInfo: Google Cloud Container Builder build information.
  597. type BuildInfo struct {
  598. // CloudBuildId: The Google Cloud Container Builder build id. Example:
  599. // "f966068f-08b2-42c8-bdfe-74137dff2bf9"
  600. CloudBuildId string `json:"cloudBuildId,omitempty"`
  601. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  602. // unconditionally include in API requests. By default, fields with
  603. // empty values are omitted from API requests. However, any non-pointer,
  604. // non-interface field appearing in ForceSendFields will be sent to the
  605. // server regardless of whether the field is empty or not. This may be
  606. // used to include empty fields in Patch requests.
  607. ForceSendFields []string `json:"-"`
  608. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  609. // in API requests with the JSON null value. By default, fields with
  610. // empty values are omitted from API requests. However, any field with
  611. // an empty value appearing in NullFields will be sent to the server as
  612. // null. It is an error if a field in this list has a non-empty value.
  613. // This may be used to include null fields in Patch requests.
  614. NullFields []string `json:"-"`
  615. }
  616. func (s *BuildInfo) MarshalJSON() ([]byte, error) {
  617. type NoMethod BuildInfo
  618. raw := NoMethod(*s)
  619. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  620. }
  621. // CertificateRawData: An SSL certificate obtained from a certificate
  622. // authority.
  623. type CertificateRawData struct {
  624. // PrivateKey: Unencrypted PEM encoded RSA private key. This field is
  625. // set once on certificate creation and then encrypted. The key size
  626. // must be 2048 bits or fewer. Must include the header and footer.
  627. // Example: <pre> -----BEGIN RSA PRIVATE KEY-----
  628. // <unencrypted_key_value> -----END RSA PRIVATE KEY----- </pre>
  629. // @InputOnly
  630. PrivateKey string `json:"privateKey,omitempty"`
  631. // PublicCertificate: PEM encoded x.509 public key certificate. This
  632. // field is set once on certificate creation. Must include the header
  633. // and footer. Example: <pre> -----BEGIN CERTIFICATE-----
  634. // <certificate_value> -----END CERTIFICATE----- </pre>
  635. PublicCertificate string `json:"publicCertificate,omitempty"`
  636. // ForceSendFields is a list of field names (e.g. "PrivateKey") to
  637. // unconditionally include in API requests. By default, fields with
  638. // empty values are omitted from API requests. However, any non-pointer,
  639. // non-interface field appearing in ForceSendFields will be sent to the
  640. // server regardless of whether the field is empty or not. This may be
  641. // used to include empty fields in Patch requests.
  642. ForceSendFields []string `json:"-"`
  643. // NullFields is a list of field names (e.g. "PrivateKey") to include in
  644. // API requests with the JSON null value. By default, fields with empty
  645. // values are omitted from API requests. However, any field with an
  646. // empty value appearing in NullFields will be sent to the server as
  647. // null. It is an error if a field in this list has a non-empty value.
  648. // This may be used to include null fields in Patch requests.
  649. NullFields []string `json:"-"`
  650. }
  651. func (s *CertificateRawData) MarshalJSON() ([]byte, error) {
  652. type NoMethod CertificateRawData
  653. raw := NoMethod(*s)
  654. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  655. }
  656. // CloudBuildOptions: Options for the build operations performed as a
  657. // part of the version deployment. Only applicable for App Engine
  658. // flexible environment when creating a version using source code
  659. // directly.
  660. type CloudBuildOptions struct {
  661. // AppYamlPath: Path to the yaml file used in deployment, used to
  662. // determine runtime configuration details.Required for flexible
  663. // environment builds.See
  664. // https://cloud.google.com/appengine/docs/standard/python/config/appref
  665. // for more details.
  666. AppYamlPath string `json:"appYamlPath,omitempty"`
  667. // CloudBuildTimeout: The Cloud Build timeout used as part of any
  668. // dependent builds performed by version creation. Defaults to 10
  669. // minutes.
  670. CloudBuildTimeout string `json:"cloudBuildTimeout,omitempty"`
  671. // ForceSendFields is a list of field names (e.g. "AppYamlPath") to
  672. // unconditionally include in API requests. By default, fields with
  673. // empty values are omitted from API requests. However, any non-pointer,
  674. // non-interface field appearing in ForceSendFields will be sent to the
  675. // server regardless of whether the field is empty or not. This may be
  676. // used to include empty fields in Patch requests.
  677. ForceSendFields []string `json:"-"`
  678. // NullFields is a list of field names (e.g. "AppYamlPath") to include
  679. // in API requests with the JSON null value. By default, fields with
  680. // empty values are omitted from API requests. However, any field with
  681. // an empty value appearing in NullFields will be sent to the server as
  682. // null. It is an error if a field in this list has a non-empty value.
  683. // This may be used to include null fields in Patch requests.
  684. NullFields []string `json:"-"`
  685. }
  686. func (s *CloudBuildOptions) MarshalJSON() ([]byte, error) {
  687. type NoMethod CloudBuildOptions
  688. raw := NoMethod(*s)
  689. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  690. }
  691. // ContainerInfo: Docker image that is used to create a container and
  692. // start a VM instance for the version that you deploy. Only applicable
  693. // for instances running in the App Engine flexible environment.
  694. type ContainerInfo struct {
  695. // Image: URI to the hosted container image in Google Container
  696. // Registry. The URI must be fully qualified and include a tag or
  697. // digest. Examples: "gcr.io/my-project/image:tag" or
  698. // "gcr.io/my-project/image@digest"
  699. Image string `json:"image,omitempty"`
  700. // ForceSendFields is a list of field names (e.g. "Image") to
  701. // unconditionally include in API requests. By default, fields with
  702. // empty values are omitted from API requests. However, any non-pointer,
  703. // non-interface field appearing in ForceSendFields will be sent to the
  704. // server regardless of whether the field is empty or not. This may be
  705. // used to include empty fields in Patch requests.
  706. ForceSendFields []string `json:"-"`
  707. // NullFields is a list of field names (e.g. "Image") to include in API
  708. // requests with the JSON null value. By default, fields with empty
  709. // values are omitted from API requests. However, any field with an
  710. // empty value appearing in NullFields will be sent to the server as
  711. // null. It is an error if a field in this list has a non-empty value.
  712. // This may be used to include null fields in Patch requests.
  713. NullFields []string `json:"-"`
  714. }
  715. func (s *ContainerInfo) MarshalJSON() ([]byte, error) {
  716. type NoMethod ContainerInfo
  717. raw := NoMethod(*s)
  718. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  719. }
  720. // CpuUtilization: Target scaling by CPU usage.
  721. type CpuUtilization struct {
  722. // AggregationWindowLength: Period of time over which CPU utilization is
  723. // calculated.
  724. AggregationWindowLength string `json:"aggregationWindowLength,omitempty"`
  725. // TargetUtilization: Target CPU utilization ratio to maintain when
  726. // scaling. Must be between 0 and 1.
  727. TargetUtilization float64 `json:"targetUtilization,omitempty"`
  728. // ForceSendFields is a list of field names (e.g.
  729. // "AggregationWindowLength") to unconditionally include in API
  730. // requests. By default, fields with empty values are omitted from API
  731. // requests. However, any non-pointer, non-interface field appearing in
  732. // ForceSendFields will be sent to the server regardless of whether the
  733. // field is empty or not. This may be used to include empty fields in
  734. // Patch requests.
  735. ForceSendFields []string `json:"-"`
  736. // NullFields is a list of field names (e.g. "AggregationWindowLength")
  737. // to include in API requests with the JSON null value. By default,
  738. // fields with empty values are omitted from API requests. However, any
  739. // field with an empty value appearing in NullFields will be sent to the
  740. // server as null. It is an error if a field in this list has a
  741. // non-empty value. This may be used to include null fields in Patch
  742. // requests.
  743. NullFields []string `json:"-"`
  744. }
  745. func (s *CpuUtilization) MarshalJSON() ([]byte, error) {
  746. type NoMethod CpuUtilization
  747. raw := NoMethod(*s)
  748. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  749. }
  750. func (s *CpuUtilization) UnmarshalJSON(data []byte) error {
  751. type NoMethod CpuUtilization
  752. var s1 struct {
  753. TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"`
  754. *NoMethod
  755. }
  756. s1.NoMethod = (*NoMethod)(s)
  757. if err := json.Unmarshal(data, &s1); err != nil {
  758. return err
  759. }
  760. s.TargetUtilization = float64(s1.TargetUtilization)
  761. return nil
  762. }
  763. // CreateVersionMetadataV1: Metadata for the given
  764. // google.longrunning.Operation during a
  765. // google.appengine.v1.CreateVersionRequest.
  766. type CreateVersionMetadataV1 struct {
  767. // CloudBuildId: The Cloud Build ID if one was created as part of the
  768. // version create. @OutputOnly
  769. CloudBuildId string `json:"cloudBuildId,omitempty"`
  770. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  771. // unconditionally include in API requests. By default, fields with
  772. // empty values are omitted from API requests. However, any non-pointer,
  773. // non-interface field appearing in ForceSendFields will be sent to the
  774. // server regardless of whether the field is empty or not. This may be
  775. // used to include empty fields in Patch requests.
  776. ForceSendFields []string `json:"-"`
  777. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  778. // in API requests with the JSON null value. By default, fields with
  779. // empty values are omitted from API requests. However, any field with
  780. // an empty value appearing in NullFields will be sent to the server as
  781. // null. It is an error if a field in this list has a non-empty value.
  782. // This may be used to include null fields in Patch requests.
  783. NullFields []string `json:"-"`
  784. }
  785. func (s *CreateVersionMetadataV1) MarshalJSON() ([]byte, error) {
  786. type NoMethod CreateVersionMetadataV1
  787. raw := NoMethod(*s)
  788. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  789. }
  790. // CreateVersionMetadataV1Alpha: Metadata for the given
  791. // google.longrunning.Operation during a
  792. // google.appengine.v1alpha.CreateVersionRequest.
  793. type CreateVersionMetadataV1Alpha struct {
  794. // CloudBuildId: The Cloud Build ID if one was created as part of the
  795. // version create. @OutputOnly
  796. CloudBuildId string `json:"cloudBuildId,omitempty"`
  797. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  798. // unconditionally include in API requests. By default, fields with
  799. // empty values are omitted from API requests. However, any non-pointer,
  800. // non-interface field appearing in ForceSendFields will be sent to the
  801. // server regardless of whether the field is empty or not. This may be
  802. // used to include empty fields in Patch requests.
  803. ForceSendFields []string `json:"-"`
  804. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  805. // in API requests with the JSON null value. By default, fields with
  806. // empty values are omitted from API requests. However, any field with
  807. // an empty value appearing in NullFields will be sent to the server as
  808. // null. It is an error if a field in this list has a non-empty value.
  809. // This may be used to include null fields in Patch requests.
  810. NullFields []string `json:"-"`
  811. }
  812. func (s *CreateVersionMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  813. type NoMethod CreateVersionMetadataV1Alpha
  814. raw := NoMethod(*s)
  815. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  816. }
  817. // CreateVersionMetadataV1Beta: Metadata for the given
  818. // google.longrunning.Operation during a
  819. // google.appengine.v1beta.CreateVersionRequest.
  820. type CreateVersionMetadataV1Beta struct {
  821. // CloudBuildId: The Cloud Build ID if one was created as part of the
  822. // version create. @OutputOnly
  823. CloudBuildId string `json:"cloudBuildId,omitempty"`
  824. // ForceSendFields is a list of field names (e.g. "CloudBuildId") to
  825. // unconditionally include in API requests. By default, fields with
  826. // empty values are omitted from API requests. However, any non-pointer,
  827. // non-interface field appearing in ForceSendFields will be sent to the
  828. // server regardless of whether the field is empty or not. This may be
  829. // used to include empty fields in Patch requests.
  830. ForceSendFields []string `json:"-"`
  831. // NullFields is a list of field names (e.g. "CloudBuildId") to include
  832. // in API requests with the JSON null value. By default, fields with
  833. // empty values are omitted from API requests. However, any field with
  834. // an empty value appearing in NullFields will be sent to the server as
  835. // null. It is an error if a field in this list has a non-empty value.
  836. // This may be used to include null fields in Patch requests.
  837. NullFields []string `json:"-"`
  838. }
  839. func (s *CreateVersionMetadataV1Beta) MarshalJSON() ([]byte, error) {
  840. type NoMethod CreateVersionMetadataV1Beta
  841. raw := NoMethod(*s)
  842. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  843. }
  844. // CustomMetric: Allows autoscaling based on Stackdriver metrics.
  845. type CustomMetric struct {
  846. // Filter: Allows filtering on the metric's fields.
  847. Filter string `json:"filter,omitempty"`
  848. // MetricName: The name of the metric.
  849. MetricName string `json:"metricName,omitempty"`
  850. // SingleInstanceAssignment: May be used instead of target_utilization
  851. // when an instance can handle a specific amount of work/resources and
  852. // the metric value is equal to the current amount of work remaining.
  853. // The autoscaler will try to keep the number of instances equal to the
  854. // metric value divided by single_instance_assignment.
  855. SingleInstanceAssignment float64 `json:"singleInstanceAssignment,omitempty"`
  856. // TargetType: The type of the metric. Must be a string representing a
  857. // Stackdriver metric type e.g. GAGUE, DELTA_PER_SECOND, etc.
  858. TargetType string `json:"targetType,omitempty"`
  859. // TargetUtilization: The target value for the metric.
  860. TargetUtilization float64 `json:"targetUtilization,omitempty"`
  861. // ForceSendFields is a list of field names (e.g. "Filter") to
  862. // unconditionally include in API requests. By default, fields with
  863. // empty values are omitted from API requests. However, any non-pointer,
  864. // non-interface field appearing in ForceSendFields will be sent to the
  865. // server regardless of whether the field is empty or not. This may be
  866. // used to include empty fields in Patch requests.
  867. ForceSendFields []string `json:"-"`
  868. // NullFields is a list of field names (e.g. "Filter") to include in API
  869. // requests with the JSON null value. By default, fields with empty
  870. // values are omitted from API requests. However, any field with an
  871. // empty value appearing in NullFields will be sent to the server as
  872. // null. It is an error if a field in this list has a non-empty value.
  873. // This may be used to include null fields in Patch requests.
  874. NullFields []string `json:"-"`
  875. }
  876. func (s *CustomMetric) MarshalJSON() ([]byte, error) {
  877. type NoMethod CustomMetric
  878. raw := NoMethod(*s)
  879. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  880. }
  881. func (s *CustomMetric) UnmarshalJSON(data []byte) error {
  882. type NoMethod CustomMetric
  883. var s1 struct {
  884. SingleInstanceAssignment gensupport.JSONFloat64 `json:"singleInstanceAssignment"`
  885. TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"`
  886. *NoMethod
  887. }
  888. s1.NoMethod = (*NoMethod)(s)
  889. if err := json.Unmarshal(data, &s1); err != nil {
  890. return err
  891. }
  892. s.SingleInstanceAssignment = float64(s1.SingleInstanceAssignment)
  893. s.TargetUtilization = float64(s1.TargetUtilization)
  894. return nil
  895. }
  896. // DebugInstanceRequest: Request message for Instances.DebugInstance.
  897. type DebugInstanceRequest struct {
  898. // SshKey: Public SSH key to add to the instance.
  899. // Examples:
  900. // [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]
  901. // [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh
  902. // {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more
  903. // information, see Adding and Removing SSH Keys
  904. // (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-k
  905. // eys).
  906. SshKey string `json:"sshKey,omitempty"`
  907. // ForceSendFields is a list of field names (e.g. "SshKey") to
  908. // unconditionally include in API requests. By default, fields with
  909. // empty values are omitted from API requests. However, any non-pointer,
  910. // non-interface field appearing in ForceSendFields will be sent to the
  911. // server regardless of whether the field is empty or not. This may be
  912. // used to include empty fields in Patch requests.
  913. ForceSendFields []string `json:"-"`
  914. // NullFields is a list of field names (e.g. "SshKey") to include in API
  915. // requests with the JSON null value. By default, fields with empty
  916. // values are omitted from API requests. However, any field with an
  917. // empty value appearing in NullFields will be sent to the server as
  918. // null. It is an error if a field in this list has a non-empty value.
  919. // This may be used to include null fields in Patch requests.
  920. NullFields []string `json:"-"`
  921. }
  922. func (s *DebugInstanceRequest) MarshalJSON() ([]byte, error) {
  923. type NoMethod DebugInstanceRequest
  924. raw := NoMethod(*s)
  925. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  926. }
  927. // Deployment: Code and application artifacts used to deploy a version
  928. // to App Engine.
  929. type Deployment struct {
  930. // Build: Google Cloud Container Builder build information. Only
  931. // applicable for instances running in the App Engine flexible
  932. // environment.
  933. Build *BuildInfo `json:"build,omitempty"`
  934. // CloudBuildOptions: Options for any Google Cloud Container Builder
  935. // builds created as a part of this deployment.Note that this is
  936. // orthogonal to the build parameter, where the deployment depends on an
  937. // already existing cloud build. These options will only be used if a
  938. // new build is created, such as when deploying to the App Engine
  939. // flexible environment using files or zip.
  940. CloudBuildOptions *CloudBuildOptions `json:"cloudBuildOptions,omitempty"`
  941. // Container: The Docker image for the container that runs the version.
  942. // Only applicable for instances running in the App Engine flexible
  943. // environment.
  944. Container *ContainerInfo `json:"container,omitempty"`
  945. // Files: Manifest of the files stored in Google Cloud Storage that are
  946. // included as part of this version. All files must be readable using
  947. // the credentials supplied with this call.
  948. Files map[string]FileInfo `json:"files,omitempty"`
  949. // Zip: The zip file for this deployment, if this is a zip deployment.
  950. Zip *ZipInfo `json:"zip,omitempty"`
  951. // ForceSendFields is a list of field names (e.g. "Build") to
  952. // unconditionally include in API requests. By default, fields with
  953. // empty values are omitted from API requests. However, any non-pointer,
  954. // non-interface field appearing in ForceSendFields will be sent to the
  955. // server regardless of whether the field is empty or not. This may be
  956. // used to include empty fields in Patch requests.
  957. ForceSendFields []string `json:"-"`
  958. // NullFields is a list of field names (e.g. "Build") to include in API
  959. // requests with the JSON null value. By default, fields with empty
  960. // values are omitted from API requests. However, any field with an
  961. // empty value appearing in NullFields will be sent to the server as
  962. // null. It is an error if a field in this list has a non-empty value.
  963. // This may be used to include null fields in Patch requests.
  964. NullFields []string `json:"-"`
  965. }
  966. func (s *Deployment) MarshalJSON() ([]byte, error) {
  967. type NoMethod Deployment
  968. raw := NoMethod(*s)
  969. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  970. }
  971. // DiskUtilization: Target scaling by disk usage. Only applicable in the
  972. // App Engine flexible environment.
  973. type DiskUtilization struct {
  974. // TargetReadBytesPerSecond: Target bytes read per second.
  975. TargetReadBytesPerSecond int64 `json:"targetReadBytesPerSecond,omitempty"`
  976. // TargetReadOpsPerSecond: Target ops read per seconds.
  977. TargetReadOpsPerSecond int64 `json:"targetReadOpsPerSecond,omitempty"`
  978. // TargetWriteBytesPerSecond: Target bytes written per second.
  979. TargetWriteBytesPerSecond int64 `json:"targetWriteBytesPerSecond,omitempty"`
  980. // TargetWriteOpsPerSecond: Target ops written per second.
  981. TargetWriteOpsPerSecond int64 `json:"targetWriteOpsPerSecond,omitempty"`
  982. // ForceSendFields is a list of field names (e.g.
  983. // "TargetReadBytesPerSecond") to unconditionally include in API
  984. // requests. By default, fields with empty values are omitted from API
  985. // requests. However, any non-pointer, non-interface field appearing in
  986. // ForceSendFields will be sent to the server regardless of whether the
  987. // field is empty or not. This may be used to include empty fields in
  988. // Patch requests.
  989. ForceSendFields []string `json:"-"`
  990. // NullFields is a list of field names (e.g. "TargetReadBytesPerSecond")
  991. // to include in API requests with the JSON null value. By default,
  992. // fields with empty values are omitted from API requests. However, any
  993. // field with an empty value appearing in NullFields will be sent to the
  994. // server as null. It is an error if a field in this list has a
  995. // non-empty value. This may be used to include null fields in Patch
  996. // requests.
  997. NullFields []string `json:"-"`
  998. }
  999. func (s *DiskUtilization) MarshalJSON() ([]byte, error) {
  1000. type NoMethod DiskUtilization
  1001. raw := NoMethod(*s)
  1002. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1003. }
  1004. // DomainMapping: A domain serving an App Engine application.
  1005. type DomainMapping struct {
  1006. // Id: Relative name of the domain serving the application. Example:
  1007. // example.com.
  1008. Id string `json:"id,omitempty"`
  1009. // Name: Full path to the DomainMapping resource in the API. Example:
  1010. // apps/myapp/domainMapping/example.com.@OutputOnly
  1011. Name string `json:"name,omitempty"`
  1012. // ResourceRecords: The resource records required to configure this
  1013. // domain mapping. These records must be added to the domain's DNS
  1014. // configuration in order to serve the application via this domain
  1015. // mapping.@OutputOnly
  1016. ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"`
  1017. // SslSettings: SSL configuration for this domain. If unconfigured, this
  1018. // domain will not serve with SSL.
  1019. SslSettings *SslSettings `json:"sslSettings,omitempty"`
  1020. // ServerResponse contains the HTTP response code and headers from the
  1021. // server.
  1022. googleapi.ServerResponse `json:"-"`
  1023. // ForceSendFields is a list of field names (e.g. "Id") to
  1024. // unconditionally include in API requests. By default, fields with
  1025. // empty values are omitted from API requests. However, any non-pointer,
  1026. // non-interface field appearing in ForceSendFields will be sent to the
  1027. // server regardless of whether the field is empty or not. This may be
  1028. // used to include empty fields in Patch requests.
  1029. ForceSendFields []string `json:"-"`
  1030. // NullFields is a list of field names (e.g. "Id") to include in API
  1031. // requests with the JSON null value. By default, fields with empty
  1032. // values are omitted from API requests. However, any field with an
  1033. // empty value appearing in NullFields will be sent to the server as
  1034. // null. It is an error if a field in this list has a non-empty value.
  1035. // This may be used to include null fields in Patch requests.
  1036. NullFields []string `json:"-"`
  1037. }
  1038. func (s *DomainMapping) MarshalJSON() ([]byte, error) {
  1039. type NoMethod DomainMapping
  1040. raw := NoMethod(*s)
  1041. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1042. }
  1043. // Empty: A generic empty message that you can re-use to avoid defining
  1044. // duplicated empty messages in your APIs. A typical example is to use
  1045. // it as the request or the response type of an API method. For
  1046. // instance:
  1047. // service Foo {
  1048. // rpc Bar(google.protobuf.Empty) returns
  1049. // (google.protobuf.Empty);
  1050. // }
  1051. // The JSON representation for Empty is empty JSON object {}.
  1052. type Empty struct {
  1053. // ServerResponse contains the HTTP response code and headers from the
  1054. // server.
  1055. googleapi.ServerResponse `json:"-"`
  1056. }
  1057. // EndpointsApiService: Cloud Endpoints
  1058. // (https://cloud.google.com/endpoints) configuration. The Endpoints API
  1059. // Service provides tooling for serving Open API and gRPC endpoints via
  1060. // an NGINX proxy. Only valid for App Engine Flexible environment
  1061. // deployments.The fields here refer to the name and configuration ID of
  1062. // a "service" resource in the Service Management API
  1063. // (https://cloud.google.com/service-management/overview).
  1064. type EndpointsApiService struct {
  1065. // ConfigId: Endpoints service configuration ID as specified by the
  1066. // Service Management API. For example "2016-09-19r1".By default, the
  1067. // rollout strategy for Endpoints is RolloutStrategy.FIXED. This means
  1068. // that Endpoints starts up with a particular configuration ID. When a
  1069. // new configuration is rolled out, Endpoints must be given the new
  1070. // configuration ID. The config_id field is used to give the
  1071. // configuration ID and is required in this case.Endpoints also has a
  1072. // rollout strategy called RolloutStrategy.MANAGED. When using this,
  1073. // Endpoints fetches the latest configuration and does not need to be
  1074. // told the configuration ID. In this case, config_id must be omitted.
  1075. ConfigId string `json:"configId,omitempty"`
  1076. // Name: Endpoints service name which is the name of the "service"
  1077. // resource in the Service Management API. For example
  1078. // "myapi.endpoints.myproject.cloud.goog"
  1079. Name string `json:"name,omitempty"`
  1080. // RolloutStrategy: Endpoints rollout strategy. If FIXED, config_id must
  1081. // be specified. If MANAGED, config_id must be omitted.
  1082. //
  1083. // Possible values:
  1084. // "UNSPECIFIED_ROLLOUT_STRATEGY" - Not specified. Defaults to FIXED.
  1085. // "FIXED" - Endpoints service configuration ID will be fixed to the
  1086. // configuration ID specified by config_id.
  1087. // "MANAGED" - Endpoints service configuration ID will be updated with
  1088. // each rollout.
  1089. RolloutStrategy string `json:"rolloutStrategy,omitempty"`
  1090. // ForceSendFields is a list of field names (e.g. "ConfigId") to
  1091. // unconditionally include in API requests. By default, fields with
  1092. // empty values are omitted from API requests. However, any non-pointer,
  1093. // non-interface field appearing in ForceSendFields will be sent to the
  1094. // server regardless of whether the field is empty or not. This may be
  1095. // used to include empty fields in Patch requests.
  1096. ForceSendFields []string `json:"-"`
  1097. // NullFields is a list of field names (e.g. "ConfigId") to include in
  1098. // API requests with the JSON null value. By default, fields with empty
  1099. // values are omitted from API requests. However, any field with an
  1100. // empty value appearing in NullFields will be sent to the server as
  1101. // null. It is an error if a field in this list has a non-empty value.
  1102. // This may be used to include null fields in Patch requests.
  1103. NullFields []string `json:"-"`
  1104. }
  1105. func (s *EndpointsApiService) MarshalJSON() ([]byte, error) {
  1106. type NoMethod EndpointsApiService
  1107. raw := NoMethod(*s)
  1108. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1109. }
  1110. // ErrorHandler: Custom static error page to be served when an error
  1111. // occurs.
  1112. type ErrorHandler struct {
  1113. // ErrorCode: Error condition this handler applies to.
  1114. //
  1115. // Possible values:
  1116. // "ERROR_CODE_UNSPECIFIED" - Not specified. ERROR_CODE_DEFAULT is
  1117. // assumed.
  1118. // "ERROR_CODE_DEFAULT" - All other error types.
  1119. // "ERROR_CODE_OVER_QUOTA" - Application has exceeded a resource
  1120. // quota.
  1121. // "ERROR_CODE_DOS_API_DENIAL" - Client blocked by the application's
  1122. // Denial of Service protection configuration.
  1123. // "ERROR_CODE_TIMEOUT" - Deadline reached before the application
  1124. // responds.
  1125. ErrorCode string `json:"errorCode,omitempty"`
  1126. // MimeType: MIME type of file. Defaults to text/html.
  1127. MimeType string `json:"mimeType,omitempty"`
  1128. // StaticFile: Static file content to be served for this error.
  1129. StaticFile string `json:"staticFile,omitempty"`
  1130. // ForceSendFields is a list of field names (e.g. "ErrorCode") to
  1131. // unconditionally include in API requests. By default, fields with
  1132. // empty values are omitted from API requests. However, any non-pointer,
  1133. // non-interface field appearing in ForceSendFields will be sent to the
  1134. // server regardless of whether the field is empty or not. This may be
  1135. // used to include empty fields in Patch requests.
  1136. ForceSendFields []string `json:"-"`
  1137. // NullFields is a list of field names (e.g. "ErrorCode") to include in
  1138. // API requests with the JSON null value. By default, fields with empty
  1139. // values are omitted from API requests. However, any field with an
  1140. // empty value appearing in NullFields will be sent to the server as
  1141. // null. It is an error if a field in this list has a non-empty value.
  1142. // This may be used to include null fields in Patch requests.
  1143. NullFields []string `json:"-"`
  1144. }
  1145. func (s *ErrorHandler) MarshalJSON() ([]byte, error) {
  1146. type NoMethod ErrorHandler
  1147. raw := NoMethod(*s)
  1148. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1149. }
  1150. // FeatureSettings: The feature specific settings to be used in the
  1151. // application. These define behaviors that are user configurable.
  1152. type FeatureSettings struct {
  1153. // SplitHealthChecks: Boolean value indicating if split health checks
  1154. // should be used instead of the legacy health checks. At an app.yaml
  1155. // level, this means defaulting to 'readiness_check' and
  1156. // 'liveness_check' values instead of 'health_check' ones. Once the
  1157. // legacy 'health_check' behavior is deprecated, and this value is
  1158. // always true, this setting can be removed.
  1159. SplitHealthChecks bool `json:"splitHealthChecks,omitempty"`
  1160. // UseContainerOptimizedOs: If true, use Container-Optimized OS
  1161. // (https://cloud.google.com/container-optimized-os/) base image for
  1162. // VMs, rather than a base Debian image.
  1163. UseContainerOptimizedOs bool `json:"useContainerOptimizedOs,omitempty"`
  1164. // ForceSendFields is a list of field names (e.g. "SplitHealthChecks")
  1165. // to unconditionally include in API requests. By default, fields with
  1166. // empty values are omitted from API requests. However, any non-pointer,
  1167. // non-interface field appearing in ForceSendFields will be sent to the
  1168. // server regardless of whether the field is empty or not. This may be
  1169. // used to include empty fields in Patch requests.
  1170. ForceSendFields []string `json:"-"`
  1171. // NullFields is a list of field names (e.g. "SplitHealthChecks") to
  1172. // include in API requests with the JSON null value. By default, fields
  1173. // with empty values are omitted from API requests. However, any field
  1174. // with an empty value appearing in NullFields will be sent to the
  1175. // server as null. It is an error if a field in this list has a
  1176. // non-empty value. This may be used to include null fields in Patch
  1177. // requests.
  1178. NullFields []string `json:"-"`
  1179. }
  1180. func (s *FeatureSettings) MarshalJSON() ([]byte, error) {
  1181. type NoMethod FeatureSettings
  1182. raw := NoMethod(*s)
  1183. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1184. }
  1185. // FileInfo: Single source file that is part of the version to be
  1186. // deployed. Each source file that is deployed must be specified
  1187. // separately.
  1188. type FileInfo struct {
  1189. // MimeType: The MIME type of the file.Defaults to the value from Google
  1190. // Cloud Storage.
  1191. MimeType string `json:"mimeType,omitempty"`
  1192. // Sha1Sum: The SHA1 hash of the file, in hex.
  1193. Sha1Sum string `json:"sha1Sum,omitempty"`
  1194. // SourceUrl: URL source to use to fetch this file. Must be a URL to a
  1195. // resource in Google Cloud Storage in the form
  1196. // 'http(s)://storage.googleapis.com/<bucket>/<object>'.
  1197. SourceUrl string `json:"sourceUrl,omitempty"`
  1198. // ForceSendFields is a list of field names (e.g. "MimeType") to
  1199. // unconditionally include in API requests. By default, fields with
  1200. // empty values are omitted from API requests. However, any non-pointer,
  1201. // non-interface field appearing in ForceSendFields will be sent to the
  1202. // server regardless of whether the field is empty or not. This may be
  1203. // used to include empty fields in Patch requests.
  1204. ForceSendFields []string `json:"-"`
  1205. // NullFields is a list of field names (e.g. "MimeType") to include in
  1206. // API requests with the JSON null value. By default, fields with empty
  1207. // values are omitted from API requests. However, any field with an
  1208. // empty value appearing in NullFields will be sent to the server as
  1209. // null. It is an error if a field in this list has a non-empty value.
  1210. // This may be used to include null fields in Patch requests.
  1211. NullFields []string `json:"-"`
  1212. }
  1213. func (s *FileInfo) MarshalJSON() ([]byte, error) {
  1214. type NoMethod FileInfo
  1215. raw := NoMethod(*s)
  1216. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1217. }
  1218. // FirewallRule: A single firewall rule that is evaluated against
  1219. // incoming traffic and provides an action to take on matched requests.
  1220. type FirewallRule struct {
  1221. // Action: The action to take on matched requests.
  1222. //
  1223. // Possible values:
  1224. // "UNSPECIFIED_ACTION"
  1225. // "ALLOW" - Matching requests are allowed.
  1226. // "DENY" - Matching requests are denied.
  1227. Action string `json:"action,omitempty"`
  1228. // Description: An optional string description of this rule. This field
  1229. // has a maximum length of 100 characters.
  1230. Description string `json:"description,omitempty"`
  1231. // Priority: A positive integer between 1, Int32.MaxValue-1 that defines
  1232. // the order of rule evaluation. Rules with the lowest priority are
  1233. // evaluated first.A default rule at priority Int32.MaxValue matches all
  1234. // IPv4 and IPv6 traffic when no previous rule matches. Only the action
  1235. // of this rule can be modified by the user.
  1236. Priority int64 `json:"priority,omitempty"`
  1237. // SourceRange: IP address or range, defined using CIDR notation, of
  1238. // requests that this rule applies to. You can use the wildcard
  1239. // character "*" to match all IPs equivalent to "0/0" and "::/0"
  1240. // together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32
  1241. // or 2001:0db8:0000:0042:0000:8a2e:0370:7334.<p>Truncation will be
  1242. // silently performed on addresses which are not properly truncated. For
  1243. // example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24.
  1244. // Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address
  1245. // as 2001:db8::/32.
  1246. SourceRange string `json:"sourceRange,omitempty"`
  1247. // ServerResponse contains the HTTP response code and headers from the
  1248. // server.
  1249. googleapi.ServerResponse `json:"-"`
  1250. // ForceSendFields is a list of field names (e.g. "Action") to
  1251. // unconditionally include in API requests. By default, fields with
  1252. // empty values are omitted from API requests. However, any non-pointer,
  1253. // non-interface field appearing in ForceSendFields will be sent to the
  1254. // server regardless of whether the field is empty or not. This may be
  1255. // used to include empty fields in Patch requests.
  1256. ForceSendFields []string `json:"-"`
  1257. // NullFields is a list of field names (e.g. "Action") to include in API
  1258. // requests with the JSON null value. By default, fields with empty
  1259. // values are omitted from API requests. However, any field with an
  1260. // empty value appearing in NullFields will be sent to the server as
  1261. // null. It is an error if a field in this list has a non-empty value.
  1262. // This may be used to include null fields in Patch requests.
  1263. NullFields []string `json:"-"`
  1264. }
  1265. func (s *FirewallRule) MarshalJSON() ([]byte, error) {
  1266. type NoMethod FirewallRule
  1267. raw := NoMethod(*s)
  1268. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1269. }
  1270. // HealthCheck: Health checking configuration for VM instances.
  1271. // Unhealthy instances are killed and replaced with new instances. Only
  1272. // applicable for instances in App Engine flexible environment.
  1273. type HealthCheck struct {
  1274. // CheckInterval: Interval between health checks.
  1275. CheckInterval string `json:"checkInterval,omitempty"`
  1276. // DisableHealthCheck: Whether to explicitly disable health checks for
  1277. // this instance.
  1278. DisableHealthCheck bool `json:"disableHealthCheck,omitempty"`
  1279. // HealthyThreshold: Number of consecutive successful health checks
  1280. // required before receiving traffic.
  1281. HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
  1282. // Host: Host header to send when performing an HTTP health check.
  1283. // Example: "myapp.appspot.com"
  1284. Host string `json:"host,omitempty"`
  1285. // RestartThreshold: Number of consecutive failed health checks required
  1286. // before an instance is restarted.
  1287. RestartThreshold int64 `json:"restartThreshold,omitempty"`
  1288. // Timeout: Time before the health check is considered failed.
  1289. Timeout string `json:"timeout,omitempty"`
  1290. // UnhealthyThreshold: Number of consecutive failed health checks
  1291. // required before removing traffic.
  1292. UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
  1293. // ForceSendFields is a list of field names (e.g. "CheckInterval") to
  1294. // unconditionally include in API requests. By default, fields with
  1295. // empty values are omitted from API requests. However, any non-pointer,
  1296. // non-interface field appearing in ForceSendFields will be sent to the
  1297. // server regardless of whether the field is empty or not. This may be
  1298. // used to include empty fields in Patch requests.
  1299. ForceSendFields []string `json:"-"`
  1300. // NullFields is a list of field names (e.g. "CheckInterval") to include
  1301. // in API requests with the JSON null value. By default, fields with
  1302. // empty values are omitted from API requests. However, any field with
  1303. // an empty value appearing in NullFields will be sent to the server as
  1304. // null. It is an error if a field in this list has a non-empty value.
  1305. // This may be used to include null fields in Patch requests.
  1306. NullFields []string `json:"-"`
  1307. }
  1308. func (s *HealthCheck) MarshalJSON() ([]byte, error) {
  1309. type NoMethod HealthCheck
  1310. raw := NoMethod(*s)
  1311. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1312. }
  1313. // IdentityAwareProxy: Identity-Aware Proxy
  1314. type IdentityAwareProxy struct {
  1315. // Enabled: Whether the serving infrastructure will authenticate and
  1316. // authorize all incoming requests.If true, the oauth2_client_id and
  1317. // oauth2_client_secret fields must be non-empty.
  1318. Enabled bool `json:"enabled,omitempty"`
  1319. // Oauth2ClientId: OAuth2 client ID to use for the authentication flow.
  1320. Oauth2ClientId string `json:"oauth2ClientId,omitempty"`
  1321. // Oauth2ClientSecret: OAuth2 client secret to use for the
  1322. // authentication flow.For security reasons, this value cannot be
  1323. // retrieved via the API. Instead, the SHA-256 hash of the value is
  1324. // returned in the oauth2_client_secret_sha256 field.@InputOnly
  1325. Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"`
  1326. // Oauth2ClientSecretSha256: Hex-encoded SHA-256 hash of the client
  1327. // secret.@OutputOnly
  1328. Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"`
  1329. // ForceSendFields is a list of field names (e.g. "Enabled") to
  1330. // unconditionally include in API requests. By default, fields with
  1331. // empty values are omitted from API requests. However, any non-pointer,
  1332. // non-interface field appearing in ForceSendFields will be sent to the
  1333. // server regardless of whether the field is empty or not. This may be
  1334. // used to include empty fields in Patch requests.
  1335. ForceSendFields []string `json:"-"`
  1336. // NullFields is a list of field names (e.g. "Enabled") to include in
  1337. // API requests with the JSON null value. By default, fields with empty
  1338. // values are omitted from API requests. However, any field with an
  1339. // empty value appearing in NullFields will be sent to the server as
  1340. // null. It is an error if a field in this list has a non-empty value.
  1341. // This may be used to include null fields in Patch requests.
  1342. NullFields []string `json:"-"`
  1343. }
  1344. func (s *IdentityAwareProxy) MarshalJSON() ([]byte, error) {
  1345. type NoMethod IdentityAwareProxy
  1346. raw := NoMethod(*s)
  1347. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1348. }
  1349. // Instance: An Instance resource is the computing unit that App Engine
  1350. // uses to automatically scale an application.
  1351. type Instance struct {
  1352. // AppEngineRelease: App Engine release this instance is running
  1353. // on.@OutputOnly
  1354. AppEngineRelease string `json:"appEngineRelease,omitempty"`
  1355. // Availability: Availability of the instance.@OutputOnly
  1356. //
  1357. // Possible values:
  1358. // "UNSPECIFIED"
  1359. // "RESIDENT"
  1360. // "DYNAMIC"
  1361. Availability string `json:"availability,omitempty"`
  1362. // AverageLatency: Average latency (ms) over the last minute.@OutputOnly
  1363. AverageLatency int64 `json:"averageLatency,omitempty"`
  1364. // Errors: Number of errors since this instance was started.@OutputOnly
  1365. Errors int64 `json:"errors,omitempty"`
  1366. // Id: Relative name of the instance within the version. Example:
  1367. // instance-1.@OutputOnly
  1368. Id string `json:"id,omitempty"`
  1369. // MemoryUsage: Total memory in use (bytes).@OutputOnly
  1370. MemoryUsage int64 `json:"memoryUsage,omitempty,string"`
  1371. // Name: Full path to the Instance resource in the API. Example:
  1372. // apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOn
  1373. // ly
  1374. Name string `json:"name,omitempty"`
  1375. // Qps: Average queries per second (QPS) over the last
  1376. // minute.@OutputOnly
  1377. Qps float64 `json:"qps,omitempty"`
  1378. // Requests: Number of requests since this instance was
  1379. // started.@OutputOnly
  1380. Requests int64 `json:"requests,omitempty"`
  1381. // StartTime: Time that this instance was started.@OutputOnly
  1382. StartTime string `json:"startTime,omitempty"`
  1383. // VmDebugEnabled: Whether this instance is in debug mode. Only
  1384. // applicable for instances in App Engine flexible
  1385. // environment.@OutputOnly
  1386. VmDebugEnabled bool `json:"vmDebugEnabled,omitempty"`
  1387. // VmId: Virtual machine ID of this instance. Only applicable for
  1388. // instances in App Engine flexible environment.@OutputOnly
  1389. VmId string `json:"vmId,omitempty"`
  1390. // VmIp: The IP address of this instance. Only applicable for instances
  1391. // in App Engine flexible environment.@OutputOnly
  1392. VmIp string `json:"vmIp,omitempty"`
  1393. // VmName: Name of the virtual machine where this instance lives. Only
  1394. // applicable for instances in App Engine flexible
  1395. // environment.@OutputOnly
  1396. VmName string `json:"vmName,omitempty"`
  1397. // VmStatus: Status of the virtual machine where this instance lives.
  1398. // Only applicable for instances in App Engine flexible
  1399. // environment.@OutputOnly
  1400. VmStatus string `json:"vmStatus,omitempty"`
  1401. // VmZoneName: Zone where the virtual machine is located. Only
  1402. // applicable for instances in App Engine flexible
  1403. // environment.@OutputOnly
  1404. VmZoneName string `json:"vmZoneName,omitempty"`
  1405. // ServerResponse contains the HTTP response code and headers from the
  1406. // server.
  1407. googleapi.ServerResponse `json:"-"`
  1408. // ForceSendFields is a list of field names (e.g. "AppEngineRelease") to
  1409. // unconditionally include in API requests. By default, fields with
  1410. // empty values are omitted from API requests. However, any non-pointer,
  1411. // non-interface field appearing in ForceSendFields will be sent to the
  1412. // server regardless of whether the field is empty or not. This may be
  1413. // used to include empty fields in Patch requests.
  1414. ForceSendFields []string `json:"-"`
  1415. // NullFields is a list of field names (e.g. "AppEngineRelease") to
  1416. // include in API requests with the JSON null value. By default, fields
  1417. // with empty values are omitted from API requests. However, any field
  1418. // with an empty value appearing in NullFields will be sent to the
  1419. // server as null. It is an error if a field in this list has a
  1420. // non-empty value. This may be used to include null fields in Patch
  1421. // requests.
  1422. NullFields []string `json:"-"`
  1423. }
  1424. func (s *Instance) MarshalJSON() ([]byte, error) {
  1425. type NoMethod Instance
  1426. raw := NoMethod(*s)
  1427. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1428. }
  1429. func (s *Instance) UnmarshalJSON(data []byte) error {
  1430. type NoMethod Instance
  1431. var s1 struct {
  1432. Qps gensupport.JSONFloat64 `json:"qps"`
  1433. *NoMethod
  1434. }
  1435. s1.NoMethod = (*NoMethod)(s)
  1436. if err := json.Unmarshal(data, &s1); err != nil {
  1437. return err
  1438. }
  1439. s.Qps = float64(s1.Qps)
  1440. return nil
  1441. }
  1442. // Library: Third-party Python runtime library that is required by the
  1443. // application.
  1444. type Library struct {
  1445. // Name: Name of the library. Example: "django".
  1446. Name string `json:"name,omitempty"`
  1447. // Version: Version of the library to select, or "latest".
  1448. Version string `json:"version,omitempty"`
  1449. // ForceSendFields is a list of field names (e.g. "Name") to
  1450. // unconditionally include in API requests. By default, fields with
  1451. // empty values are omitted from API requests. However, any non-pointer,
  1452. // non-interface field appearing in ForceSendFields will be sent to the
  1453. // server regardless of whether the field is empty or not. This may be
  1454. // used to include empty fields in Patch requests.
  1455. ForceSendFields []string `json:"-"`
  1456. // NullFields is a list of field names (e.g. "Name") to include in API
  1457. // requests with the JSON null value. By default, fields with empty
  1458. // values are omitted from API requests. However, any field with an
  1459. // empty value appearing in NullFields will be sent to the server as
  1460. // null. It is an error if a field in this list has a non-empty value.
  1461. // This may be used to include null fields in Patch requests.
  1462. NullFields []string `json:"-"`
  1463. }
  1464. func (s *Library) MarshalJSON() ([]byte, error) {
  1465. type NoMethod Library
  1466. raw := NoMethod(*s)
  1467. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1468. }
  1469. // ListAuthorizedCertificatesResponse: Response message for
  1470. // AuthorizedCertificates.ListAuthorizedCertificates.
  1471. type ListAuthorizedCertificatesResponse struct {
  1472. // Certificates: The SSL certificates the user is authorized to
  1473. // administer.
  1474. Certificates []*AuthorizedCertificate `json:"certificates,omitempty"`
  1475. // NextPageToken: Continuation token for fetching the next page of
  1476. // results.
  1477. NextPageToken string `json:"nextPageToken,omitempty"`
  1478. // ServerResponse contains the HTTP response code and headers from the
  1479. // server.
  1480. googleapi.ServerResponse `json:"-"`
  1481. // ForceSendFields is a list of field names (e.g. "Certificates") to
  1482. // unconditionally include in API requests. By default, fields with
  1483. // empty values are omitted from API requests. However, any non-pointer,
  1484. // non-interface field appearing in ForceSendFields will be sent to the
  1485. // server regardless of whether the field is empty or not. This may be
  1486. // used to include empty fields in Patch requests.
  1487. ForceSendFields []string `json:"-"`
  1488. // NullFields is a list of field names (e.g. "Certificates") to include
  1489. // in API requests with the JSON null value. By default, fields with
  1490. // empty values are omitted from API requests. However, any field with
  1491. // an empty value appearing in NullFields will be sent to the server as
  1492. // null. It is an error if a field in this list has a non-empty value.
  1493. // This may be used to include null fields in Patch requests.
  1494. NullFields []string `json:"-"`
  1495. }
  1496. func (s *ListAuthorizedCertificatesResponse) MarshalJSON() ([]byte, error) {
  1497. type NoMethod ListAuthorizedCertificatesResponse
  1498. raw := NoMethod(*s)
  1499. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1500. }
  1501. // ListAuthorizedDomainsResponse: Response message for
  1502. // AuthorizedDomains.ListAuthorizedDomains.
  1503. type ListAuthorizedDomainsResponse struct {
  1504. // Domains: The authorized domains belonging to the user.
  1505. Domains []*AuthorizedDomain `json:"domains,omitempty"`
  1506. // NextPageToken: Continuation token for fetching the next page of
  1507. // results.
  1508. NextPageToken string `json:"nextPageToken,omitempty"`
  1509. // ServerResponse contains the HTTP response code and headers from the
  1510. // server.
  1511. googleapi.ServerResponse `json:"-"`
  1512. // ForceSendFields is a list of field names (e.g. "Domains") to
  1513. // unconditionally include in API requests. By default, fields with
  1514. // empty values are omitted from API requests. However, any non-pointer,
  1515. // non-interface field appearing in ForceSendFields will be sent to the
  1516. // server regardless of whether the field is empty or not. This may be
  1517. // used to include empty fields in Patch requests.
  1518. ForceSendFields []string `json:"-"`
  1519. // NullFields is a list of field names (e.g. "Domains") to include in
  1520. // API requests with the JSON null value. By default, fields with empty
  1521. // values are omitted from API requests. However, any field with an
  1522. // empty value appearing in NullFields will be sent to the server as
  1523. // null. It is an error if a field in this list has a non-empty value.
  1524. // This may be used to include null fields in Patch requests.
  1525. NullFields []string `json:"-"`
  1526. }
  1527. func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) {
  1528. type NoMethod ListAuthorizedDomainsResponse
  1529. raw := NoMethod(*s)
  1530. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1531. }
  1532. // ListDomainMappingsResponse: Response message for
  1533. // DomainMappings.ListDomainMappings.
  1534. type ListDomainMappingsResponse struct {
  1535. // DomainMappings: The domain mappings for the application.
  1536. DomainMappings []*DomainMapping `json:"domainMappings,omitempty"`
  1537. // NextPageToken: Continuation token for fetching the next page of
  1538. // results.
  1539. NextPageToken string `json:"nextPageToken,omitempty"`
  1540. // ServerResponse contains the HTTP response code and headers from the
  1541. // server.
  1542. googleapi.ServerResponse `json:"-"`
  1543. // ForceSendFields is a list of field names (e.g. "DomainMappings") to
  1544. // unconditionally include in API requests. By default, fields with
  1545. // empty values are omitted from API requests. However, any non-pointer,
  1546. // non-interface field appearing in ForceSendFields will be sent to the
  1547. // server regardless of whether the field is empty or not. This may be
  1548. // used to include empty fields in Patch requests.
  1549. ForceSendFields []string `json:"-"`
  1550. // NullFields is a list of field names (e.g. "DomainMappings") to
  1551. // include in API requests with the JSON null value. By default, fields
  1552. // with empty values are omitted from API requests. However, any field
  1553. // with an empty value appearing in NullFields will be sent to the
  1554. // server as null. It is an error if a field in this list has a
  1555. // non-empty value. This may be used to include null fields in Patch
  1556. // requests.
  1557. NullFields []string `json:"-"`
  1558. }
  1559. func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) {
  1560. type NoMethod ListDomainMappingsResponse
  1561. raw := NoMethod(*s)
  1562. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1563. }
  1564. // ListIngressRulesResponse: Response message for
  1565. // Firewall.ListIngressRules.
  1566. type ListIngressRulesResponse struct {
  1567. // IngressRules: The ingress FirewallRules for this application.
  1568. IngressRules []*FirewallRule `json:"ingressRules,omitempty"`
  1569. // NextPageToken: Continuation token for fetching the next page of
  1570. // results.
  1571. NextPageToken string `json:"nextPageToken,omitempty"`
  1572. // ServerResponse contains the HTTP response code and headers from the
  1573. // server.
  1574. googleapi.ServerResponse `json:"-"`
  1575. // ForceSendFields is a list of field names (e.g. "IngressRules") to
  1576. // unconditionally include in API requests. By default, fields with
  1577. // empty values are omitted from API requests. However, any non-pointer,
  1578. // non-interface field appearing in ForceSendFields will be sent to the
  1579. // server regardless of whether the field is empty or not. This may be
  1580. // used to include empty fields in Patch requests.
  1581. ForceSendFields []string `json:"-"`
  1582. // NullFields is a list of field names (e.g. "IngressRules") to include
  1583. // in API requests with the JSON null value. By default, fields with
  1584. // empty values are omitted from API requests. However, any field with
  1585. // an empty value appearing in NullFields will be sent to the server as
  1586. // null. It is an error if a field in this list has a non-empty value.
  1587. // This may be used to include null fields in Patch requests.
  1588. NullFields []string `json:"-"`
  1589. }
  1590. func (s *ListIngressRulesResponse) MarshalJSON() ([]byte, error) {
  1591. type NoMethod ListIngressRulesResponse
  1592. raw := NoMethod(*s)
  1593. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1594. }
  1595. // ListInstancesResponse: Response message for Instances.ListInstances.
  1596. type ListInstancesResponse struct {
  1597. // Instances: The instances belonging to the requested version.
  1598. Instances []*Instance `json:"instances,omitempty"`
  1599. // NextPageToken: Continuation token for fetching the next page of
  1600. // results.
  1601. NextPageToken string `json:"nextPageToken,omitempty"`
  1602. // ServerResponse contains the HTTP response code and headers from the
  1603. // server.
  1604. googleapi.ServerResponse `json:"-"`
  1605. // ForceSendFields is a list of field names (e.g. "Instances") to
  1606. // unconditionally include in API requests. By default, fields with
  1607. // empty values are omitted from API requests. However, any non-pointer,
  1608. // non-interface field appearing in ForceSendFields will be sent to the
  1609. // server regardless of whether the field is empty or not. This may be
  1610. // used to include empty fields in Patch requests.
  1611. ForceSendFields []string `json:"-"`
  1612. // NullFields is a list of field names (e.g. "Instances") to include in
  1613. // API requests with the JSON null value. By default, fields with empty
  1614. // values are omitted from API requests. However, any field with an
  1615. // empty value appearing in NullFields will be sent to the server as
  1616. // null. It is an error if a field in this list has a non-empty value.
  1617. // This may be used to include null fields in Patch requests.
  1618. NullFields []string `json:"-"`
  1619. }
  1620. func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
  1621. type NoMethod ListInstancesResponse
  1622. raw := NoMethod(*s)
  1623. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1624. }
  1625. // ListLocationsResponse: The response message for
  1626. // Locations.ListLocations.
  1627. type ListLocationsResponse struct {
  1628. // Locations: A list of locations that matches the specified filter in
  1629. // the request.
  1630. Locations []*Location `json:"locations,omitempty"`
  1631. // NextPageToken: The standard List next-page token.
  1632. NextPageToken string `json:"nextPageToken,omitempty"`
  1633. // ServerResponse contains the HTTP response code and headers from the
  1634. // server.
  1635. googleapi.ServerResponse `json:"-"`
  1636. // ForceSendFields is a list of field names (e.g. "Locations") to
  1637. // unconditionally include in API requests. By default, fields with
  1638. // empty values are omitted from API requests. However, any non-pointer,
  1639. // non-interface field appearing in ForceSendFields will be sent to the
  1640. // server regardless of whether the field is empty or not. This may be
  1641. // used to include empty fields in Patch requests.
  1642. ForceSendFields []string `json:"-"`
  1643. // NullFields is a list of field names (e.g. "Locations") to include in
  1644. // API requests with the JSON null value. By default, fields with empty
  1645. // values are omitted from API requests. However, any field with an
  1646. // empty value appearing in NullFields will be sent to the server as
  1647. // null. It is an error if a field in this list has a non-empty value.
  1648. // This may be used to include null fields in Patch requests.
  1649. NullFields []string `json:"-"`
  1650. }
  1651. func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1652. type NoMethod ListLocationsResponse
  1653. raw := NoMethod(*s)
  1654. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1655. }
  1656. // ListOperationsResponse: The response message for
  1657. // Operations.ListOperations.
  1658. type ListOperationsResponse struct {
  1659. // NextPageToken: The standard List next-page token.
  1660. NextPageToken string `json:"nextPageToken,omitempty"`
  1661. // Operations: A list of operations that matches the specified filter in
  1662. // the request.
  1663. Operations []*Operation `json:"operations,omitempty"`
  1664. // ServerResponse contains the HTTP response code and headers from the
  1665. // server.
  1666. googleapi.ServerResponse `json:"-"`
  1667. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1668. // unconditionally include in API requests. By default, fields with
  1669. // empty values are omitted from API requests. However, any non-pointer,
  1670. // non-interface field appearing in ForceSendFields will be sent to the
  1671. // server regardless of whether the field is empty or not. This may be
  1672. // used to include empty fields in Patch requests.
  1673. ForceSendFields []string `json:"-"`
  1674. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1675. // in API requests with the JSON null value. By default, fields with
  1676. // empty values are omitted from API requests. However, any field with
  1677. // an empty value appearing in NullFields will be sent to the server as
  1678. // null. It is an error if a field in this list has a non-empty value.
  1679. // This may be used to include null fields in Patch requests.
  1680. NullFields []string `json:"-"`
  1681. }
  1682. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1683. type NoMethod ListOperationsResponse
  1684. raw := NoMethod(*s)
  1685. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1686. }
  1687. // ListServicesResponse: Response message for Services.ListServices.
  1688. type ListServicesResponse struct {
  1689. // NextPageToken: Continuation token for fetching the next page of
  1690. // results.
  1691. NextPageToken string `json:"nextPageToken,omitempty"`
  1692. // Services: The services belonging to the requested application.
  1693. Services []*Service `json:"services,omitempty"`
  1694. // ServerResponse contains the HTTP response code and headers from the
  1695. // server.
  1696. googleapi.ServerResponse `json:"-"`
  1697. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1698. // unconditionally include in API requests. By default, fields with
  1699. // empty values are omitted from API requests. However, any non-pointer,
  1700. // non-interface field appearing in ForceSendFields will be sent to the
  1701. // server regardless of whether the field is empty or not. This may be
  1702. // used to include empty fields in Patch requests.
  1703. ForceSendFields []string `json:"-"`
  1704. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1705. // in API requests with the JSON null value. By default, fields with
  1706. // empty values are omitted from API requests. However, any field with
  1707. // an empty value appearing in NullFields will be sent to the server as
  1708. // null. It is an error if a field in this list has a non-empty value.
  1709. // This may be used to include null fields in Patch requests.
  1710. NullFields []string `json:"-"`
  1711. }
  1712. func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
  1713. type NoMethod ListServicesResponse
  1714. raw := NoMethod(*s)
  1715. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1716. }
  1717. // ListVersionsResponse: Response message for Versions.ListVersions.
  1718. type ListVersionsResponse struct {
  1719. // NextPageToken: Continuation token for fetching the next page of
  1720. // results.
  1721. NextPageToken string `json:"nextPageToken,omitempty"`
  1722. // Versions: The versions belonging to the requested service.
  1723. Versions []*Version `json:"versions,omitempty"`
  1724. // ServerResponse contains the HTTP response code and headers from the
  1725. // server.
  1726. googleapi.ServerResponse `json:"-"`
  1727. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1728. // unconditionally include in API requests. By default, fields with
  1729. // empty values are omitted from API requests. However, any non-pointer,
  1730. // non-interface field appearing in ForceSendFields will be sent to the
  1731. // server regardless of whether the field is empty or not. This may be
  1732. // used to include empty fields in Patch requests.
  1733. ForceSendFields []string `json:"-"`
  1734. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1735. // in API requests with the JSON null value. By default, fields with
  1736. // empty values are omitted from API requests. However, any field with
  1737. // an empty value appearing in NullFields will be sent to the server as
  1738. // null. It is an error if a field in this list has a non-empty value.
  1739. // This may be used to include null fields in Patch requests.
  1740. NullFields []string `json:"-"`
  1741. }
  1742. func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
  1743. type NoMethod ListVersionsResponse
  1744. raw := NoMethod(*s)
  1745. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1746. }
  1747. // LivenessCheck: Health checking configuration for VM instances.
  1748. // Unhealthy instances are killed and replaced with new instances.
  1749. type LivenessCheck struct {
  1750. // CheckInterval: Interval between health checks.
  1751. CheckInterval string `json:"checkInterval,omitempty"`
  1752. // FailureThreshold: Number of consecutive failed checks required before
  1753. // considering the VM unhealthy.
  1754. FailureThreshold int64 `json:"failureThreshold,omitempty"`
  1755. // Host: Host header to send when performing a HTTP Liveness check.
  1756. // Example: "myapp.appspot.com"
  1757. Host string `json:"host,omitempty"`
  1758. // InitialDelay: The initial delay before starting to execute the
  1759. // checks.
  1760. InitialDelay string `json:"initialDelay,omitempty"`
  1761. // Path: The request path.
  1762. Path string `json:"path,omitempty"`
  1763. // SuccessThreshold: Number of consecutive successful checks required
  1764. // before considering the VM healthy.
  1765. SuccessThreshold int64 `json:"successThreshold,omitempty"`
  1766. // Timeout: Time before the check is considered failed.
  1767. Timeout string `json:"timeout,omitempty"`
  1768. // ForceSendFields is a list of field names (e.g. "CheckInterval") to
  1769. // unconditionally include in API requests. By default, fields with
  1770. // empty values are omitted from API requests. However, any non-pointer,
  1771. // non-interface field appearing in ForceSendFields will be sent to the
  1772. // server regardless of whether the field is empty or not. This may be
  1773. // used to include empty fields in Patch requests.
  1774. ForceSendFields []string `json:"-"`
  1775. // NullFields is a list of field names (e.g. "CheckInterval") to include
  1776. // in API requests with the JSON null value. By default, fields with
  1777. // empty values are omitted from API requests. However, any field with
  1778. // an empty value appearing in NullFields will be sent to the server as
  1779. // null. It is an error if a field in this list has a non-empty value.
  1780. // This may be used to include null fields in Patch requests.
  1781. NullFields []string `json:"-"`
  1782. }
  1783. func (s *LivenessCheck) MarshalJSON() ([]byte, error) {
  1784. type NoMethod LivenessCheck
  1785. raw := NoMethod(*s)
  1786. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1787. }
  1788. // Location: A resource that represents Google Cloud Platform location.
  1789. type Location struct {
  1790. // DisplayName: The friendly name for this location, typically a nearby
  1791. // city name. For example, "Tokyo".
  1792. DisplayName string `json:"displayName,omitempty"`
  1793. // Labels: Cross-service attributes for the location. For
  1794. // example
  1795. // {"cloud.googleapis.com/region": "us-east1"}
  1796. //
  1797. Labels map[string]string `json:"labels,omitempty"`
  1798. // LocationId: The canonical id for this location. For example:
  1799. // "us-east1".
  1800. LocationId string `json:"locationId,omitempty"`
  1801. // Metadata: Service-specific metadata. For example the available
  1802. // capacity at the given location.
  1803. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1804. // Name: Resource name for the location, which may vary between
  1805. // implementations. For example:
  1806. // "projects/example-project/locations/us-east1"
  1807. Name string `json:"name,omitempty"`
  1808. // ServerResponse contains the HTTP response code and headers from the
  1809. // server.
  1810. googleapi.ServerResponse `json:"-"`
  1811. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1812. // unconditionally include in API requests. By default, fields with
  1813. // empty values are omitted from API requests. However, any non-pointer,
  1814. // non-interface field appearing in ForceSendFields will be sent to the
  1815. // server regardless of whether the field is empty or not. This may be
  1816. // used to include empty fields in Patch requests.
  1817. ForceSendFields []string `json:"-"`
  1818. // NullFields is a list of field names (e.g. "DisplayName") to include
  1819. // in API requests with the JSON null value. By default, fields with
  1820. // empty values are omitted from API requests. However, any field with
  1821. // an empty value appearing in NullFields will be sent to the server as
  1822. // null. It is an error if a field in this list has a non-empty value.
  1823. // This may be used to include null fields in Patch requests.
  1824. NullFields []string `json:"-"`
  1825. }
  1826. func (s *Location) MarshalJSON() ([]byte, error) {
  1827. type NoMethod Location
  1828. raw := NoMethod(*s)
  1829. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1830. }
  1831. // LocationMetadata: Metadata for the given
  1832. // google.cloud.location.Location.
  1833. type LocationMetadata struct {
  1834. // FlexibleEnvironmentAvailable: App Engine flexible environment is
  1835. // available in the given location.@OutputOnly
  1836. FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"`
  1837. // StandardEnvironmentAvailable: App Engine standard environment is
  1838. // available in the given location.@OutputOnly
  1839. StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"`
  1840. // ForceSendFields is a list of field names (e.g.
  1841. // "FlexibleEnvironmentAvailable") to unconditionally include in API
  1842. // requests. By default, fields with empty values are omitted from API
  1843. // requests. However, any non-pointer, non-interface field appearing in
  1844. // ForceSendFields will be sent to the server regardless of whether the
  1845. // field is empty or not. This may be used to include empty fields in
  1846. // Patch requests.
  1847. ForceSendFields []string `json:"-"`
  1848. // NullFields is a list of field names (e.g.
  1849. // "FlexibleEnvironmentAvailable") to include in API requests with the
  1850. // JSON null value. By default, fields with empty values are omitted
  1851. // from API requests. However, any field with an empty value appearing
  1852. // in NullFields will be sent to the server as null. It is an error if a
  1853. // field in this list has a non-empty value. This may be used to include
  1854. // null fields in Patch requests.
  1855. NullFields []string `json:"-"`
  1856. }
  1857. func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
  1858. type NoMethod LocationMetadata
  1859. raw := NoMethod(*s)
  1860. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1861. }
  1862. // ManagedCertificate: A certificate managed by App Engine.
  1863. type ManagedCertificate struct {
  1864. // LastRenewalTime: Time at which the certificate was last renewed. The
  1865. // renewal process is fully managed. Certificate renewal will
  1866. // automatically occur before the certificate expires. Renewal errors
  1867. // can be tracked via ManagementStatus.@OutputOnly
  1868. LastRenewalTime string `json:"lastRenewalTime,omitempty"`
  1869. // Status: Status of certificate management. Refers to the most recent
  1870. // certificate acquisition or renewal attempt.@OutputOnly
  1871. //
  1872. // Possible values:
  1873. // "MANAGEMENT_STATUS_UNSPECIFIED"
  1874. // "OK" - Certificate was successfully obtained and inserted into the
  1875. // serving system.
  1876. // "PENDING" - Certificate is under active attempts to acquire or
  1877. // renew.
  1878. // "FAILED_RETRYING_NOT_VISIBLE" - Most recent renewal failed due to
  1879. // an invalid DNS setup and will be retried. Renewal attempts will
  1880. // continue to fail until the certificate domain's DNS configuration is
  1881. // fixed. The last successfully provisioned certificate may still be
  1882. // serving.
  1883. // "FAILED_PERMANENT" - All renewal attempts have been exhausted,
  1884. // likely due to an invalid DNS setup.
  1885. // "FAILED_RETRYING_CAA_FORBIDDEN" - Most recent renewal failed due to
  1886. // an explicit CAA record that does not include the in-use CA, Let's
  1887. // Encrypt. Renewals will continue to fail until the CAA is
  1888. // reconfigured. The last successfully provisioned certificate may still
  1889. // be serving.
  1890. // "FAILED_RETRYING_CAA_CHECKING" - Most recent renewal failed due to
  1891. // a CAA retrieval failure. This means that the domain's DNS provider
  1892. // does not properly handle CAA records, failing requests for CAA
  1893. // records when no CAA records are defined. Renewals will continue to
  1894. // fail until the DNS provider is changed or a CAA record is added for
  1895. // the given domain. The last successfully provisioned certificate may
  1896. // still be serving.
  1897. Status string `json:"status,omitempty"`
  1898. // ForceSendFields is a list of field names (e.g. "LastRenewalTime") to
  1899. // unconditionally include in API requests. By default, fields with
  1900. // empty values are omitted from API requests. However, any non-pointer,
  1901. // non-interface field appearing in ForceSendFields will be sent to the
  1902. // server regardless of whether the field is empty or not. This may be
  1903. // used to include empty fields in Patch requests.
  1904. ForceSendFields []string `json:"-"`
  1905. // NullFields is a list of field names (e.g. "LastRenewalTime") to
  1906. // include in API requests with the JSON null value. By default, fields
  1907. // with empty values are omitted from API requests. However, any field
  1908. // with an empty value appearing in NullFields will be sent to the
  1909. // server as null. It is an error if a field in this list has a
  1910. // non-empty value. This may be used to include null fields in Patch
  1911. // requests.
  1912. NullFields []string `json:"-"`
  1913. }
  1914. func (s *ManagedCertificate) MarshalJSON() ([]byte, error) {
  1915. type NoMethod ManagedCertificate
  1916. raw := NoMethod(*s)
  1917. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1918. }
  1919. // ManualScaling: A service with manual scaling runs continuously,
  1920. // allowing you to perform complex initialization and rely on the state
  1921. // of its memory over time.
  1922. type ManualScaling struct {
  1923. // Instances: Number of instances to assign to the service at the start.
  1924. // This number can later be altered by using the Modules API
  1925. // (https://cloud.google.com/appengine/docs/python/modules/functions)
  1926. // set_num_instances() function.
  1927. Instances int64 `json:"instances,omitempty"`
  1928. // ForceSendFields is a list of field names (e.g. "Instances") to
  1929. // unconditionally include in API requests. By default, fields with
  1930. // empty values are omitted from API requests. However, any non-pointer,
  1931. // non-interface field appearing in ForceSendFields will be sent to the
  1932. // server regardless of whether the field is empty or not. This may be
  1933. // used to include empty fields in Patch requests.
  1934. ForceSendFields []string `json:"-"`
  1935. // NullFields is a list of field names (e.g. "Instances") to include in
  1936. // API requests with the JSON null value. By default, fields with empty
  1937. // values are omitted from API requests. However, any field with an
  1938. // empty value appearing in NullFields will be sent to the server as
  1939. // null. It is an error if a field in this list has a non-empty value.
  1940. // This may be used to include null fields in Patch requests.
  1941. NullFields []string `json:"-"`
  1942. }
  1943. func (s *ManualScaling) MarshalJSON() ([]byte, error) {
  1944. type NoMethod ManualScaling
  1945. raw := NoMethod(*s)
  1946. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1947. }
  1948. // Network: Extra network settings. Only applicable in the App Engine
  1949. // flexible environment.
  1950. type Network struct {
  1951. // ForwardedPorts: List of ports, or port pairs, to forward from the
  1952. // virtual machine to the application container. Only applicable in the
  1953. // App Engine flexible environment.
  1954. ForwardedPorts []string `json:"forwardedPorts,omitempty"`
  1955. // InstanceTag: Tag to apply to the instance during creation. Only
  1956. // applicable in the App Engine flexible environment.
  1957. InstanceTag string `json:"instanceTag,omitempty"`
  1958. // Name: Google Compute Engine network where the virtual machines are
  1959. // created. Specify the short name, not the resource path.Defaults to
  1960. // default.
  1961. Name string `json:"name,omitempty"`
  1962. // SessionAffinity: Enable session affinity.
  1963. SessionAffinity bool `json:"sessionAffinity,omitempty"`
  1964. // SubnetworkName: Google Cloud Platform sub-network where the virtual
  1965. // machines are created. Specify the short name, not the resource
  1966. // path.If a subnetwork name is specified, a network name will also be
  1967. // required unless it is for the default network.
  1968. // If the network that the instance is being created in is a Legacy
  1969. // network, then the IP address is allocated from the IPv4Range.
  1970. // If the network that the instance is being created in is an auto
  1971. // Subnet Mode Network, then only network name should be specified (not
  1972. // the subnetwork_name) and the IP address is created from the
  1973. // IPCidrRange of the subnetwork that exists in that zone for that
  1974. // network.
  1975. // If the network that the instance is being created in is a custom
  1976. // Subnet Mode Network, then the subnetwork_name must be specified and
  1977. // the IP address is created from the IPCidrRange of the subnetwork.If
  1978. // specified, the subnetwork must exist in the same region as the App
  1979. // Engine flexible environment application.
  1980. SubnetworkName string `json:"subnetworkName,omitempty"`
  1981. // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to
  1982. // unconditionally include in API requests. By default, fields with
  1983. // empty values are omitted from API requests. However, any non-pointer,
  1984. // non-interface field appearing in ForceSendFields will be sent to the
  1985. // server regardless of whether the field is empty or not. This may be
  1986. // used to include empty fields in Patch requests.
  1987. ForceSendFields []string `json:"-"`
  1988. // NullFields is a list of field names (e.g. "ForwardedPorts") to
  1989. // include in API requests with the JSON null value. By default, fields
  1990. // with empty values are omitted from API requests. However, any field
  1991. // with an empty value appearing in NullFields will be sent to the
  1992. // server as null. It is an error if a field in this list has a
  1993. // non-empty value. This may be used to include null fields in Patch
  1994. // requests.
  1995. NullFields []string `json:"-"`
  1996. }
  1997. func (s *Network) MarshalJSON() ([]byte, error) {
  1998. type NoMethod Network
  1999. raw := NoMethod(*s)
  2000. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2001. }
  2002. // NetworkUtilization: Target scaling by network usage. Only applicable
  2003. // in the App Engine flexible environment.
  2004. type NetworkUtilization struct {
  2005. // TargetReceivedBytesPerSecond: Target bytes received per second.
  2006. TargetReceivedBytesPerSecond int64 `json:"targetReceivedBytesPerSecond,omitempty"`
  2007. // TargetReceivedPacketsPerSecond: Target packets received per second.
  2008. TargetReceivedPacketsPerSecond int64 `json:"targetReceivedPacketsPerSecond,omitempty"`
  2009. // TargetSentBytesPerSecond: Target bytes sent per second.
  2010. TargetSentBytesPerSecond int64 `json:"targetSentBytesPerSecond,omitempty"`
  2011. // TargetSentPacketsPerSecond: Target packets sent per second.
  2012. TargetSentPacketsPerSecond int64 `json:"targetSentPacketsPerSecond,omitempty"`
  2013. // ForceSendFields is a list of field names (e.g.
  2014. // "TargetReceivedBytesPerSecond") to unconditionally include in API
  2015. // requests. By default, fields with empty values are omitted from API
  2016. // requests. However, any non-pointer, non-interface field appearing in
  2017. // ForceSendFields will be sent to the server regardless of whether the
  2018. // field is empty or not. This may be used to include empty fields in
  2019. // Patch requests.
  2020. ForceSendFields []string `json:"-"`
  2021. // NullFields is a list of field names (e.g.
  2022. // "TargetReceivedBytesPerSecond") to include in API requests with the
  2023. // JSON null value. By default, fields with empty values are omitted
  2024. // from API requests. However, any field with an empty value appearing
  2025. // in NullFields will be sent to the server as null. It is an error if a
  2026. // field in this list has a non-empty value. This may be used to include
  2027. // null fields in Patch requests.
  2028. NullFields []string `json:"-"`
  2029. }
  2030. func (s *NetworkUtilization) MarshalJSON() ([]byte, error) {
  2031. type NoMethod NetworkUtilization
  2032. raw := NoMethod(*s)
  2033. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2034. }
  2035. // Operation: This resource represents a long-running operation that is
  2036. // the result of a network API call.
  2037. type Operation struct {
  2038. // Done: If the value is false, it means the operation is still in
  2039. // progress. If true, the operation is completed, and either error or
  2040. // response is available.
  2041. Done bool `json:"done,omitempty"`
  2042. // Error: The error result of the operation in case of failure or
  2043. // cancellation.
  2044. Error *Status `json:"error,omitempty"`
  2045. // Metadata: Service-specific metadata associated with the operation. It
  2046. // typically contains progress information and common metadata such as
  2047. // create time. Some services might not provide such metadata. Any
  2048. // method that returns a long-running operation should document the
  2049. // metadata type, if any.
  2050. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2051. // Name: The server-assigned name, which is only unique within the same
  2052. // service that originally returns it. If you use the default HTTP
  2053. // mapping, the name should have the format of
  2054. // operations/some/unique/name.
  2055. Name string `json:"name,omitempty"`
  2056. // Response: The normal response of the operation in case of success. If
  2057. // the original method returns no data on success, such as Delete, the
  2058. // response is google.protobuf.Empty. If the original method is standard
  2059. // Get/Create/Update, the response should be the resource. For other
  2060. // methods, the response should have the type XxxResponse, where Xxx is
  2061. // the original method name. For example, if the original method name is
  2062. // TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
  2063. Response googleapi.RawMessage `json:"response,omitempty"`
  2064. // ServerResponse contains the HTTP response code and headers from the
  2065. // server.
  2066. googleapi.ServerResponse `json:"-"`
  2067. // ForceSendFields is a list of field names (e.g. "Done") to
  2068. // unconditionally include in API requests. By default, fields with
  2069. // empty values are omitted from API requests. However, any non-pointer,
  2070. // non-interface field appearing in ForceSendFields will be sent to the
  2071. // server regardless of whether the field is empty or not. This may be
  2072. // used to include empty fields in Patch requests.
  2073. ForceSendFields []string `json:"-"`
  2074. // NullFields is a list of field names (e.g. "Done") to include in API
  2075. // requests with the JSON null value. By default, fields with empty
  2076. // values are omitted from API requests. However, any field with an
  2077. // empty value appearing in NullFields will be sent to the server as
  2078. // null. It is an error if a field in this list has a non-empty value.
  2079. // This may be used to include null fields in Patch requests.
  2080. NullFields []string `json:"-"`
  2081. }
  2082. func (s *Operation) MarshalJSON() ([]byte, error) {
  2083. type NoMethod Operation
  2084. raw := NoMethod(*s)
  2085. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2086. }
  2087. // OperationMetadata: Metadata for the given
  2088. // google.longrunning.Operation.
  2089. type OperationMetadata struct {
  2090. // EndTime: Timestamp that this operation completed.@OutputOnly
  2091. EndTime string `json:"endTime,omitempty"`
  2092. // InsertTime: Timestamp that this operation was created.@OutputOnly
  2093. InsertTime string `json:"insertTime,omitempty"`
  2094. // Method: API method that initiated this operation. Example:
  2095. // google.appengine.v1beta4.Version.CreateVersion.@OutputOnly
  2096. Method string `json:"method,omitempty"`
  2097. // OperationType: Type of this operation. Deprecated, use method field
  2098. // instead. Example: "create_version".@OutputOnly
  2099. OperationType string `json:"operationType,omitempty"`
  2100. // Target: Name of the resource that this operation is acting on.
  2101. // Example: apps/myapp/modules/default.@OutputOnly
  2102. Target string `json:"target,omitempty"`
  2103. // User: User who requested this operation.@OutputOnly
  2104. User string `json:"user,omitempty"`
  2105. // ForceSendFields is a list of field names (e.g. "EndTime") to
  2106. // unconditionally include in API requests. By default, fields with
  2107. // empty values are omitted from API requests. However, any non-pointer,
  2108. // non-interface field appearing in ForceSendFields will be sent to the
  2109. // server regardless of whether the field is empty or not. This may be
  2110. // used to include empty fields in Patch requests.
  2111. ForceSendFields []string `json:"-"`
  2112. // NullFields is a list of field names (e.g. "EndTime") to include in
  2113. // API requests with the JSON null value. By default, fields with empty
  2114. // values are omitted from API requests. However, any field with an
  2115. // empty value appearing in NullFields will be sent to the server as
  2116. // null. It is an error if a field in this list has a non-empty value.
  2117. // This may be used to include null fields in Patch requests.
  2118. NullFields []string `json:"-"`
  2119. }
  2120. func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  2121. type NoMethod OperationMetadata
  2122. raw := NoMethod(*s)
  2123. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2124. }
  2125. // OperationMetadataV1: Metadata for the given
  2126. // google.longrunning.Operation.
  2127. type OperationMetadataV1 struct {
  2128. CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"`
  2129. // EndTime: Time that this operation completed.@OutputOnly
  2130. EndTime string `json:"endTime,omitempty"`
  2131. // EphemeralMessage: Ephemeral message that may change every time the
  2132. // operation is polled. @OutputOnly
  2133. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2134. // InsertTime: Time that this operation was created.@OutputOnly
  2135. InsertTime string `json:"insertTime,omitempty"`
  2136. // Method: API method that initiated this operation. Example:
  2137. // google.appengine.v1.Versions.CreateVersion.@OutputOnly
  2138. Method string `json:"method,omitempty"`
  2139. // Target: Name of the resource that this operation is acting on.
  2140. // Example: apps/myapp/services/default.@OutputOnly
  2141. Target string `json:"target,omitempty"`
  2142. // User: User who requested this operation.@OutputOnly
  2143. User string `json:"user,omitempty"`
  2144. // Warning: Durable messages that persist on every operation poll.
  2145. // @OutputOnly
  2146. Warning []string `json:"warning,omitempty"`
  2147. // ForceSendFields is a list of field names (e.g.
  2148. // "CreateVersionMetadata") to unconditionally include in API requests.
  2149. // By default, fields with empty values are omitted from API requests.
  2150. // However, any non-pointer, non-interface field appearing in
  2151. // ForceSendFields will be sent to the server regardless of whether the
  2152. // field is empty or not. This may be used to include empty fields in
  2153. // Patch requests.
  2154. ForceSendFields []string `json:"-"`
  2155. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2156. // include in API requests with the JSON null value. By default, fields
  2157. // with empty values are omitted from API requests. However, any field
  2158. // with an empty value appearing in NullFields will be sent to the
  2159. // server as null. It is an error if a field in this list has a
  2160. // non-empty value. This may be used to include null fields in Patch
  2161. // requests.
  2162. NullFields []string `json:"-"`
  2163. }
  2164. func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) {
  2165. type NoMethod OperationMetadataV1
  2166. raw := NoMethod(*s)
  2167. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2168. }
  2169. // OperationMetadataV1Alpha: Metadata for the given
  2170. // google.longrunning.Operation.
  2171. type OperationMetadataV1Alpha struct {
  2172. CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"`
  2173. // EndTime: Time that this operation completed.@OutputOnly
  2174. EndTime string `json:"endTime,omitempty"`
  2175. // EphemeralMessage: Ephemeral message that may change every time the
  2176. // operation is polled. @OutputOnly
  2177. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2178. // InsertTime: Time that this operation was created.@OutputOnly
  2179. InsertTime string `json:"insertTime,omitempty"`
  2180. // Method: API method that initiated this operation. Example:
  2181. // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly
  2182. Method string `json:"method,omitempty"`
  2183. // Target: Name of the resource that this operation is acting on.
  2184. // Example: apps/myapp/services/default.@OutputOnly
  2185. Target string `json:"target,omitempty"`
  2186. // User: User who requested this operation.@OutputOnly
  2187. User string `json:"user,omitempty"`
  2188. // Warning: Durable messages that persist on every operation poll.
  2189. // @OutputOnly
  2190. Warning []string `json:"warning,omitempty"`
  2191. // ForceSendFields is a list of field names (e.g.
  2192. // "CreateVersionMetadata") to unconditionally include in API requests.
  2193. // By default, fields with empty values are omitted from API requests.
  2194. // However, any non-pointer, non-interface field appearing in
  2195. // ForceSendFields will be sent to the server regardless of whether the
  2196. // field is empty or not. This may be used to include empty fields in
  2197. // Patch requests.
  2198. ForceSendFields []string `json:"-"`
  2199. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2200. // include in API requests with the JSON null value. By default, fields
  2201. // with empty values are omitted from API requests. However, any field
  2202. // with an empty value appearing in NullFields will be sent to the
  2203. // server as null. It is an error if a field in this list has a
  2204. // non-empty value. This may be used to include null fields in Patch
  2205. // requests.
  2206. NullFields []string `json:"-"`
  2207. }
  2208. func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) {
  2209. type NoMethod OperationMetadataV1Alpha
  2210. raw := NoMethod(*s)
  2211. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2212. }
  2213. // OperationMetadataV1Beta: Metadata for the given
  2214. // google.longrunning.Operation.
  2215. type OperationMetadataV1Beta struct {
  2216. CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"`
  2217. // EndTime: Time that this operation completed.@OutputOnly
  2218. EndTime string `json:"endTime,omitempty"`
  2219. // EphemeralMessage: Ephemeral message that may change every time the
  2220. // operation is polled. @OutputOnly
  2221. EphemeralMessage string `json:"ephemeralMessage,omitempty"`
  2222. // InsertTime: Time that this operation was created.@OutputOnly
  2223. InsertTime string `json:"insertTime,omitempty"`
  2224. // Method: API method that initiated this operation. Example:
  2225. // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly
  2226. Method string `json:"method,omitempty"`
  2227. // Target: Name of the resource that this operation is acting on.
  2228. // Example: apps/myapp/services/default.@OutputOnly
  2229. Target string `json:"target,omitempty"`
  2230. // User: User who requested this operation.@OutputOnly
  2231. User string `json:"user,omitempty"`
  2232. // Warning: Durable messages that persist on every operation poll.
  2233. // @OutputOnly
  2234. Warning []string `json:"warning,omitempty"`
  2235. // ForceSendFields is a list of field names (e.g.
  2236. // "CreateVersionMetadata") to unconditionally include in API requests.
  2237. // By default, fields with empty values are omitted from API requests.
  2238. // However, any non-pointer, non-interface field appearing in
  2239. // ForceSendFields will be sent to the server regardless of whether the
  2240. // field is empty or not. This may be used to include empty fields in
  2241. // Patch requests.
  2242. ForceSendFields []string `json:"-"`
  2243. // NullFields is a list of field names (e.g. "CreateVersionMetadata") to
  2244. // include in API requests with the JSON null value. By default, fields
  2245. // with empty values are omitted from API requests. However, any field
  2246. // with an empty value appearing in NullFields will be sent to the
  2247. // server as null. It is an error if a field in this list has a
  2248. // non-empty value. This may be used to include null fields in Patch
  2249. // requests.
  2250. NullFields []string `json:"-"`
  2251. }
  2252. func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) {
  2253. type NoMethod OperationMetadataV1Beta
  2254. raw := NoMethod(*s)
  2255. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2256. }
  2257. // OperationMetadataV1Beta5: Metadata for the given
  2258. // google.longrunning.Operation.
  2259. type OperationMetadataV1Beta5 struct {
  2260. // EndTime: Timestamp that this operation completed.@OutputOnly
  2261. EndTime string `json:"endTime,omitempty"`
  2262. // InsertTime: Timestamp that this operation was created.@OutputOnly
  2263. InsertTime string `json:"insertTime,omitempty"`
  2264. // Method: API method name that initiated this operation. Example:
  2265. // google.appengine.v1beta5.Version.CreateVersion.@OutputOnly
  2266. Method string `json:"method,omitempty"`
  2267. // Target: Name of the resource that this operation is acting on.
  2268. // Example: apps/myapp/services/default.@OutputOnly
  2269. Target string `json:"target,omitempty"`
  2270. // User: User who requested this operation.@OutputOnly
  2271. User string `json:"user,omitempty"`
  2272. // ForceSendFields is a list of field names (e.g. "EndTime") to
  2273. // unconditionally include in API requests. By default, fields with
  2274. // empty values are omitted from API requests. However, any non-pointer,
  2275. // non-interface field appearing in ForceSendFields will be sent to the
  2276. // server regardless of whether the field is empty or not. This may be
  2277. // used to include empty fields in Patch requests.
  2278. ForceSendFields []string `json:"-"`
  2279. // NullFields is a list of field names (e.g. "EndTime") to include in
  2280. // API requests with the JSON null value. By default, fields with empty
  2281. // values are omitted from API requests. However, any field with an
  2282. // empty value appearing in NullFields will be sent to the server as
  2283. // null. It is an error if a field in this list has a non-empty value.
  2284. // This may be used to include null fields in Patch requests.
  2285. NullFields []string `json:"-"`
  2286. }
  2287. func (s *OperationMetadataV1Beta5) MarshalJSON() ([]byte, error) {
  2288. type NoMethod OperationMetadataV1Beta5
  2289. raw := NoMethod(*s)
  2290. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2291. }
  2292. // ReadinessCheck: Readiness checking configuration for VM instances.
  2293. // Unhealthy instances are removed from traffic rotation.
  2294. type ReadinessCheck struct {
  2295. // AppStartTimeout: A maximum time limit on application initialization,
  2296. // measured from moment the application successfully replies to a
  2297. // healthcheck until it is ready to serve traffic.
  2298. AppStartTimeout string `json:"appStartTimeout,omitempty"`
  2299. // CheckInterval: Interval between health checks.
  2300. CheckInterval string `json:"checkInterval,omitempty"`
  2301. // FailureThreshold: Number of consecutive failed checks required before
  2302. // removing traffic.
  2303. FailureThreshold int64 `json:"failureThreshold,omitempty"`
  2304. // Host: Host header to send when performing a HTTP Readiness check.
  2305. // Example: "myapp.appspot.com"
  2306. Host string `json:"host,omitempty"`
  2307. // Path: The request path.
  2308. Path string `json:"path,omitempty"`
  2309. // SuccessThreshold: Number of consecutive successful checks required
  2310. // before receiving traffic.
  2311. SuccessThreshold int64 `json:"successThreshold,omitempty"`
  2312. // Timeout: Time before the check is considered failed.
  2313. Timeout string `json:"timeout,omitempty"`
  2314. // ForceSendFields is a list of field names (e.g. "AppStartTimeout") to
  2315. // unconditionally include in API requests. By default, fields with
  2316. // empty values are omitted from API requests. However, any non-pointer,
  2317. // non-interface field appearing in ForceSendFields will be sent to the
  2318. // server regardless of whether the field is empty or not. This may be
  2319. // used to include empty fields in Patch requests.
  2320. ForceSendFields []string `json:"-"`
  2321. // NullFields is a list of field names (e.g. "AppStartTimeout") to
  2322. // include in API requests with the JSON null value. By default, fields
  2323. // with empty values are omitted from API requests. However, any field
  2324. // with an empty value appearing in NullFields will be sent to the
  2325. // server as null. It is an error if a field in this list has a
  2326. // non-empty value. This may be used to include null fields in Patch
  2327. // requests.
  2328. NullFields []string `json:"-"`
  2329. }
  2330. func (s *ReadinessCheck) MarshalJSON() ([]byte, error) {
  2331. type NoMethod ReadinessCheck
  2332. raw := NoMethod(*s)
  2333. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2334. }
  2335. // RepairApplicationRequest: Request message for
  2336. // 'Applications.RepairApplication'.
  2337. type RepairApplicationRequest struct {
  2338. }
  2339. // RequestUtilization: Target scaling by request utilization. Only
  2340. // applicable in the App Engine flexible environment.
  2341. type RequestUtilization struct {
  2342. // TargetConcurrentRequests: Target number of concurrent requests.
  2343. TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"`
  2344. // TargetRequestCountPerSecond: Target requests per second.
  2345. TargetRequestCountPerSecond int64 `json:"targetRequestCountPerSecond,omitempty"`
  2346. // ForceSendFields is a list of field names (e.g.
  2347. // "TargetConcurrentRequests") to unconditionally include in API
  2348. // requests. By default, fields with empty values are omitted from API
  2349. // requests. However, any non-pointer, non-interface field appearing in
  2350. // ForceSendFields will be sent to the server regardless of whether the
  2351. // field is empty or not. This may be used to include empty fields in
  2352. // Patch requests.
  2353. ForceSendFields []string `json:"-"`
  2354. // NullFields is a list of field names (e.g. "TargetConcurrentRequests")
  2355. // to include in API requests with the JSON null value. By default,
  2356. // fields with empty values are omitted from API requests. However, any
  2357. // field with an empty value appearing in NullFields will be sent to the
  2358. // server as null. It is an error if a field in this list has a
  2359. // non-empty value. This may be used to include null fields in Patch
  2360. // requests.
  2361. NullFields []string `json:"-"`
  2362. }
  2363. func (s *RequestUtilization) MarshalJSON() ([]byte, error) {
  2364. type NoMethod RequestUtilization
  2365. raw := NoMethod(*s)
  2366. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2367. }
  2368. // ResourceRecord: A DNS resource record.
  2369. type ResourceRecord struct {
  2370. // Name: Relative name of the object affected by this record. Only
  2371. // applicable for CNAME records. Example: 'www'.
  2372. Name string `json:"name,omitempty"`
  2373. // Rrdata: Data for this record. Values vary by record type, as defined
  2374. // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).
  2375. Rrdata string `json:"rrdata,omitempty"`
  2376. // Type: Resource record type. Example: AAAA.
  2377. //
  2378. // Possible values:
  2379. // "A" - An A resource record. Data is an IPv4 address.
  2380. // "AAAA" - An AAAA resource record. Data is an IPv6 address.
  2381. // "CNAME" - A CNAME resource record. Data is a domain name to be
  2382. // aliased.
  2383. Type string `json:"type,omitempty"`
  2384. // ForceSendFields is a list of field names (e.g. "Name") to
  2385. // unconditionally include in API requests. By default, fields with
  2386. // empty values are omitted from API requests. However, any non-pointer,
  2387. // non-interface field appearing in ForceSendFields will be sent to the
  2388. // server regardless of whether the field is empty or not. This may be
  2389. // used to include empty fields in Patch requests.
  2390. ForceSendFields []string `json:"-"`
  2391. // NullFields is a list of field names (e.g. "Name") to include in API
  2392. // requests with the JSON null value. By default, fields with empty
  2393. // values are omitted from API requests. However, any field with an
  2394. // empty value appearing in NullFields will be sent to the server as
  2395. // null. It is an error if a field in this list has a non-empty value.
  2396. // This may be used to include null fields in Patch requests.
  2397. NullFields []string `json:"-"`
  2398. }
  2399. func (s *ResourceRecord) MarshalJSON() ([]byte, error) {
  2400. type NoMethod ResourceRecord
  2401. raw := NoMethod(*s)
  2402. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2403. }
  2404. // Resources: Machine resources for a version.
  2405. type Resources struct {
  2406. // Cpu: Number of CPU cores needed.
  2407. Cpu float64 `json:"cpu,omitempty"`
  2408. // DiskGb: Disk size (GB) needed.
  2409. DiskGb float64 `json:"diskGb,omitempty"`
  2410. // MemoryGb: Memory (GB) needed.
  2411. MemoryGb float64 `json:"memoryGb,omitempty"`
  2412. // Volumes: User specified volumes.
  2413. Volumes []*Volume `json:"volumes,omitempty"`
  2414. // ForceSendFields is a list of field names (e.g. "Cpu") to
  2415. // unconditionally include in API requests. By default, fields with
  2416. // empty values are omitted from API requests. However, any non-pointer,
  2417. // non-interface field appearing in ForceSendFields will be sent to the
  2418. // server regardless of whether the field is empty or not. This may be
  2419. // used to include empty fields in Patch requests.
  2420. ForceSendFields []string `json:"-"`
  2421. // NullFields is a list of field names (e.g. "Cpu") to include in API
  2422. // requests with the JSON null value. By default, fields with empty
  2423. // values are omitted from API requests. However, any field with an
  2424. // empty value appearing in NullFields will be sent to the server as
  2425. // null. It is an error if a field in this list has a non-empty value.
  2426. // This may be used to include null fields in Patch requests.
  2427. NullFields []string `json:"-"`
  2428. }
  2429. func (s *Resources) MarshalJSON() ([]byte, error) {
  2430. type NoMethod Resources
  2431. raw := NoMethod(*s)
  2432. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2433. }
  2434. func (s *Resources) UnmarshalJSON(data []byte) error {
  2435. type NoMethod Resources
  2436. var s1 struct {
  2437. Cpu gensupport.JSONFloat64 `json:"cpu"`
  2438. DiskGb gensupport.JSONFloat64 `json:"diskGb"`
  2439. MemoryGb gensupport.JSONFloat64 `json:"memoryGb"`
  2440. *NoMethod
  2441. }
  2442. s1.NoMethod = (*NoMethod)(s)
  2443. if err := json.Unmarshal(data, &s1); err != nil {
  2444. return err
  2445. }
  2446. s.Cpu = float64(s1.Cpu)
  2447. s.DiskGb = float64(s1.DiskGb)
  2448. s.MemoryGb = float64(s1.MemoryGb)
  2449. return nil
  2450. }
  2451. // ScriptHandler: Executes a script to handle the request that matches
  2452. // the URL pattern.
  2453. type ScriptHandler struct {
  2454. // ScriptPath: Path to the script from the application root directory.
  2455. ScriptPath string `json:"scriptPath,omitempty"`
  2456. // ForceSendFields is a list of field names (e.g. "ScriptPath") to
  2457. // unconditionally include in API requests. By default, fields with
  2458. // empty values are omitted from API requests. However, any non-pointer,
  2459. // non-interface field appearing in ForceSendFields will be sent to the
  2460. // server regardless of whether the field is empty or not. This may be
  2461. // used to include empty fields in Patch requests.
  2462. ForceSendFields []string `json:"-"`
  2463. // NullFields is a list of field names (e.g. "ScriptPath") to include in
  2464. // API requests with the JSON null value. By default, fields with empty
  2465. // values are omitted from API requests. However, any field with an
  2466. // empty value appearing in NullFields will be sent to the server as
  2467. // null. It is an error if a field in this list has a non-empty value.
  2468. // This may be used to include null fields in Patch requests.
  2469. NullFields []string `json:"-"`
  2470. }
  2471. func (s *ScriptHandler) MarshalJSON() ([]byte, error) {
  2472. type NoMethod ScriptHandler
  2473. raw := NoMethod(*s)
  2474. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2475. }
  2476. // Service: A Service resource is a logical component of an application
  2477. // that can share state and communicate in a secure fashion with other
  2478. // services. For example, an application that handles customer requests
  2479. // might include separate services to handle tasks such as backend data
  2480. // analysis or API requests from mobile devices. Each service has a
  2481. // collection of versions that define a specific set of code used to
  2482. // implement the functionality of that service.
  2483. type Service struct {
  2484. // Id: Relative name of the service within the application. Example:
  2485. // default.@OutputOnly
  2486. Id string `json:"id,omitempty"`
  2487. // Name: Full path to the Service resource in the API. Example:
  2488. // apps/myapp/services/default.@OutputOnly
  2489. Name string `json:"name,omitempty"`
  2490. // Split: Mapping that defines fractional HTTP traffic diversion to
  2491. // different versions within the service.
  2492. Split *TrafficSplit `json:"split,omitempty"`
  2493. // ServerResponse contains the HTTP response code and headers from the
  2494. // server.
  2495. googleapi.ServerResponse `json:"-"`
  2496. // ForceSendFields is a list of field names (e.g. "Id") to
  2497. // unconditionally include in API requests. By default, fields with
  2498. // empty values are omitted from API requests. However, any non-pointer,
  2499. // non-interface field appearing in ForceSendFields will be sent to the
  2500. // server regardless of whether the field is empty or not. This may be
  2501. // used to include empty fields in Patch requests.
  2502. ForceSendFields []string `json:"-"`
  2503. // NullFields is a list of field names (e.g. "Id") to include in API
  2504. // requests with the JSON null value. By default, fields with empty
  2505. // values are omitted from API requests. However, any field with an
  2506. // empty value appearing in NullFields will be sent to the server as
  2507. // null. It is an error if a field in this list has a non-empty value.
  2508. // This may be used to include null fields in Patch requests.
  2509. NullFields []string `json:"-"`
  2510. }
  2511. func (s *Service) MarshalJSON() ([]byte, error) {
  2512. type NoMethod Service
  2513. raw := NoMethod(*s)
  2514. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2515. }
  2516. // SslSettings: SSL configuration for a DomainMapping resource.
  2517. type SslSettings struct {
  2518. // CertificateId: ID of the AuthorizedCertificate resource configuring
  2519. // SSL for the application. Clearing this field will remove SSL
  2520. // support.By default, a managed certificate is automatically created
  2521. // for every domain mapping. To omit SSL support or to configure SSL
  2522. // manually, specify SslManagementType.MANUAL on a CREATE or UPDATE
  2523. // request. You must be authorized to administer the
  2524. // AuthorizedCertificate resource to manually map it to a DomainMapping
  2525. // resource. Example: 12345.
  2526. CertificateId string `json:"certificateId,omitempty"`
  2527. // PendingManagedCertificateId: ID of the managed AuthorizedCertificate
  2528. // resource currently being provisioned, if applicable. Until the new
  2529. // managed certificate has been successfully provisioned, the previous
  2530. // SSL state will be preserved. Once the provisioning process completes,
  2531. // the certificate_id field will reflect the new managed certificate and
  2532. // this field will be left empty. To remove SSL support while there is
  2533. // still a pending managed certificate, clear the certificate_id field
  2534. // with an UpdateDomainMappingRequest.@OutputOnly
  2535. PendingManagedCertificateId string `json:"pendingManagedCertificateId,omitempty"`
  2536. // SslManagementType: SSL management type for this domain. If AUTOMATIC,
  2537. // a managed certificate is automatically provisioned. If MANUAL,
  2538. // certificate_id must be manually specified in order to configure SSL
  2539. // for this domain.
  2540. //
  2541. // Possible values:
  2542. // "AUTOMATIC" - SSL support for this domain is configured
  2543. // automatically. The mapped SSL certificate will be automatically
  2544. // renewed.
  2545. // "MANUAL" - SSL support for this domain is configured manually by
  2546. // the user. Either the domain has no SSL support or a user-obtained SSL
  2547. // certificate has been explictly mapped to this domain.
  2548. SslManagementType string `json:"sslManagementType,omitempty"`
  2549. // ForceSendFields is a list of field names (e.g. "CertificateId") to
  2550. // unconditionally include in API requests. By default, fields with
  2551. // empty values are omitted from API requests. However, any non-pointer,
  2552. // non-interface field appearing in ForceSendFields will be sent to the
  2553. // server regardless of whether the field is empty or not. This may be
  2554. // used to include empty fields in Patch requests.
  2555. ForceSendFields []string `json:"-"`
  2556. // NullFields is a list of field names (e.g. "CertificateId") to include
  2557. // in API requests with the JSON null value. By default, fields with
  2558. // empty values are omitted from API requests. However, any field with
  2559. // an empty value appearing in NullFields will be sent to the server as
  2560. // null. It is an error if a field in this list has a non-empty value.
  2561. // This may be used to include null fields in Patch requests.
  2562. NullFields []string `json:"-"`
  2563. }
  2564. func (s *SslSettings) MarshalJSON() ([]byte, error) {
  2565. type NoMethod SslSettings
  2566. raw := NoMethod(*s)
  2567. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2568. }
  2569. // StandardSchedulerSettings: Scheduler settings for standard
  2570. // environment.
  2571. type StandardSchedulerSettings struct {
  2572. // MaxInstances: Maximum number of instances to run for this version.
  2573. // Set to zero to disable max_instances configuration.
  2574. MaxInstances int64 `json:"maxInstances,omitempty"`
  2575. // MinInstances: Minimum number of instances to run for this version.
  2576. // Set to zero to disable min_instances configuration.
  2577. MinInstances int64 `json:"minInstances,omitempty"`
  2578. // TargetCpuUtilization: Target CPU utilization ratio to maintain when
  2579. // scaling.
  2580. TargetCpuUtilization float64 `json:"targetCpuUtilization,omitempty"`
  2581. // TargetThroughputUtilization: Target throughput utilization ratio to
  2582. // maintain when scaling
  2583. TargetThroughputUtilization float64 `json:"targetThroughputUtilization,omitempty"`
  2584. // ForceSendFields is a list of field names (e.g. "MaxInstances") to
  2585. // unconditionally include in API requests. By default, fields with
  2586. // empty values are omitted from API requests. However, any non-pointer,
  2587. // non-interface field appearing in ForceSendFields will be sent to the
  2588. // server regardless of whether the field is empty or not. This may be
  2589. // used to include empty fields in Patch requests.
  2590. ForceSendFields []string `json:"-"`
  2591. // NullFields is a list of field names (e.g. "MaxInstances") to include
  2592. // in API requests with the JSON null value. By default, fields with
  2593. // empty values are omitted from API requests. However, any field with
  2594. // an empty value appearing in NullFields will be sent to the server as
  2595. // null. It is an error if a field in this list has a non-empty value.
  2596. // This may be used to include null fields in Patch requests.
  2597. NullFields []string `json:"-"`
  2598. }
  2599. func (s *StandardSchedulerSettings) MarshalJSON() ([]byte, error) {
  2600. type NoMethod StandardSchedulerSettings
  2601. raw := NoMethod(*s)
  2602. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2603. }
  2604. func (s *StandardSchedulerSettings) UnmarshalJSON(data []byte) error {
  2605. type NoMethod StandardSchedulerSettings
  2606. var s1 struct {
  2607. TargetCpuUtilization gensupport.JSONFloat64 `json:"targetCpuUtilization"`
  2608. TargetThroughputUtilization gensupport.JSONFloat64 `json:"targetThroughputUtilization"`
  2609. *NoMethod
  2610. }
  2611. s1.NoMethod = (*NoMethod)(s)
  2612. if err := json.Unmarshal(data, &s1); err != nil {
  2613. return err
  2614. }
  2615. s.TargetCpuUtilization = float64(s1.TargetCpuUtilization)
  2616. s.TargetThroughputUtilization = float64(s1.TargetThroughputUtilization)
  2617. return nil
  2618. }
  2619. // StaticFilesHandler: Files served directly to the user for a given
  2620. // URL, such as images, CSS stylesheets, or JavaScript source files.
  2621. // Static file handlers describe which files in the application
  2622. // directory are static files, and which URLs serve them.
  2623. type StaticFilesHandler struct {
  2624. // ApplicationReadable: Whether files should also be uploaded as code
  2625. // data. By default, files declared in static file handlers are uploaded
  2626. // as static data and are only served to end users; they cannot be read
  2627. // by the application. If enabled, uploads are charged against both your
  2628. // code and static data storage resource quotas.
  2629. ApplicationReadable bool `json:"applicationReadable,omitempty"`
  2630. // Expiration: Time a static file served by this handler should be
  2631. // cached by web proxies and browsers.
  2632. Expiration string `json:"expiration,omitempty"`
  2633. // HttpHeaders: HTTP headers to use for all responses from these URLs.
  2634. HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
  2635. // MimeType: MIME type used to serve all files served by this
  2636. // handler.Defaults to file-specific MIME types, which are derived from
  2637. // each file's filename extension.
  2638. MimeType string `json:"mimeType,omitempty"`
  2639. // Path: Path to the static files matched by the URL pattern, from the
  2640. // application root directory. The path can refer to text matched in
  2641. // groupings in the URL pattern.
  2642. Path string `json:"path,omitempty"`
  2643. // RequireMatchingFile: Whether this handler should match the request if
  2644. // the file referenced by the handler does not exist.
  2645. RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
  2646. // UploadPathRegex: Regular expression that matches the file paths for
  2647. // all files that should be referenced by this handler.
  2648. UploadPathRegex string `json:"uploadPathRegex,omitempty"`
  2649. // ForceSendFields is a list of field names (e.g. "ApplicationReadable")
  2650. // to unconditionally include in API requests. By default, fields with
  2651. // empty values are omitted from API requests. However, any non-pointer,
  2652. // non-interface field appearing in ForceSendFields will be sent to the
  2653. // server regardless of whether the field is empty or not. This may be
  2654. // used to include empty fields in Patch requests.
  2655. ForceSendFields []string `json:"-"`
  2656. // NullFields is a list of field names (e.g. "ApplicationReadable") to
  2657. // include in API requests with the JSON null value. By default, fields
  2658. // with empty values are omitted from API requests. However, any field
  2659. // with an empty value appearing in NullFields will be sent to the
  2660. // server as null. It is an error if a field in this list has a
  2661. // non-empty value. This may be used to include null fields in Patch
  2662. // requests.
  2663. NullFields []string `json:"-"`
  2664. }
  2665. func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) {
  2666. type NoMethod StaticFilesHandler
  2667. raw := NoMethod(*s)
  2668. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2669. }
  2670. // Status: The Status type defines a logical error model that is
  2671. // suitable for different programming environments, including REST APIs
  2672. // and RPC APIs. It is used by gRPC (https://github.com/grpc). The error
  2673. // model is designed to be:
  2674. // Simple to use and understand for most users
  2675. // Flexible enough to meet unexpected needsOverviewThe Status message
  2676. // contains three pieces of data: error code, error message, and error
  2677. // details. The error code should be an enum value of google.rpc.Code,
  2678. // but it may accept additional error codes if needed. The error message
  2679. // should be a developer-facing English message that helps developers
  2680. // understand and resolve the error. If a localized user-facing error
  2681. // message is needed, put the localized message in the error details or
  2682. // localize it in the client. The optional error details may contain
  2683. // arbitrary information about the error. There is a predefined set of
  2684. // error detail types in the package google.rpc that can be used for
  2685. // common error conditions.Language mappingThe Status message is the
  2686. // logical representation of the error model, but it is not necessarily
  2687. // the actual wire format. When the Status message is exposed in
  2688. // different client libraries and different wire protocols, it can be
  2689. // mapped differently. For example, it will likely be mapped to some
  2690. // exceptions in Java, but more likely mapped to some error codes in
  2691. // C.Other usesThe error model and the Status message can be used in a
  2692. // variety of environments, either with or without APIs, to provide a
  2693. // consistent developer experience across different environments.Example
  2694. // uses of this error model include:
  2695. // Partial errors. If a service needs to return partial errors to the
  2696. // client, it may embed the Status in the normal response to indicate
  2697. // the partial errors.
  2698. // Workflow errors. A typical workflow has multiple steps. Each step may
  2699. // have a Status message for error reporting.
  2700. // Batch operations. If a client uses batch request and batch response,
  2701. // the Status message should be used directly inside batch response, one
  2702. // for each error sub-response.
  2703. // Asynchronous operations. If an API call embeds asynchronous operation
  2704. // results in its response, the status of those operations should be
  2705. // represented directly using the Status message.
  2706. // Logging. If some API errors are stored in logs, the message Status
  2707. // could be used directly after any stripping needed for
  2708. // security/privacy reasons.
  2709. type Status struct {
  2710. // Code: The status code, which should be an enum value of
  2711. // google.rpc.Code.
  2712. Code int64 `json:"code,omitempty"`
  2713. // Details: A list of messages that carry the error details. There is a
  2714. // common set of message types for APIs to use.
  2715. Details []googleapi.RawMessage `json:"details,omitempty"`
  2716. // Message: A developer-facing error message, which should be in
  2717. // English. Any user-facing error message should be localized and sent
  2718. // in the google.rpc.Status.details field, or localized by the client.
  2719. Message string `json:"message,omitempty"`
  2720. // ForceSendFields is a list of field names (e.g. "Code") to
  2721. // unconditionally include in API requests. By default, fields with
  2722. // empty values are omitted from API requests. However, any non-pointer,
  2723. // non-interface field appearing in ForceSendFields will be sent to the
  2724. // server regardless of whether the field is empty or not. This may be
  2725. // used to include empty fields in Patch requests.
  2726. ForceSendFields []string `json:"-"`
  2727. // NullFields is a list of field names (e.g. "Code") to include in API
  2728. // requests with the JSON null value. By default, fields with empty
  2729. // values are omitted from API requests. However, any field with an
  2730. // empty value appearing in NullFields will be sent to the server as
  2731. // null. It is an error if a field in this list has a non-empty value.
  2732. // This may be used to include null fields in Patch requests.
  2733. NullFields []string `json:"-"`
  2734. }
  2735. func (s *Status) MarshalJSON() ([]byte, error) {
  2736. type NoMethod Status
  2737. raw := NoMethod(*s)
  2738. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2739. }
  2740. // TrafficSplit: Traffic routing configuration for versions within a
  2741. // single service. Traffic splits define how traffic directed to the
  2742. // service is assigned to versions.
  2743. type TrafficSplit struct {
  2744. // Allocations: Mapping from version IDs within the service to
  2745. // fractional (0.000, 1] allocations of traffic for that version. Each
  2746. // version can be specified only once, but some versions in the service
  2747. // may not have any traffic allocation. Services that have traffic
  2748. // allocated cannot be deleted until either the service is deleted or
  2749. // their traffic allocation is removed. Allocations must sum to 1. Up to
  2750. // two decimal place precision is supported for IP-based splits and up
  2751. // to three decimal places is supported for cookie-based splits.
  2752. Allocations map[string]float64 `json:"allocations,omitempty"`
  2753. // ShardBy: Mechanism used to determine which version a request is sent
  2754. // to. The traffic selection algorithm will be stable for either type
  2755. // until allocations are changed.
  2756. //
  2757. // Possible values:
  2758. // "UNSPECIFIED" - Diversion method unspecified.
  2759. // "COOKIE" - Diversion based on a specially named cookie,
  2760. // "GOOGAPPUID." The cookie must be set by the application itself or no
  2761. // diversion will occur.
  2762. // "IP" - Diversion based on applying the modulus operation to a
  2763. // fingerprint of the IP address.
  2764. // "RANDOM" - Diversion based on weighted random assignment. An
  2765. // incoming request is randomly routed to a version in the traffic
  2766. // split, with probability proportional to the version's traffic share.
  2767. ShardBy string `json:"shardBy,omitempty"`
  2768. // ForceSendFields is a list of field names (e.g. "Allocations") to
  2769. // unconditionally include in API requests. By default, fields with
  2770. // empty values are omitted from API requests. However, any non-pointer,
  2771. // non-interface field appearing in ForceSendFields will be sent to the
  2772. // server regardless of whether the field is empty or not. This may be
  2773. // used to include empty fields in Patch requests.
  2774. ForceSendFields []string `json:"-"`
  2775. // NullFields is a list of field names (e.g. "Allocations") to include
  2776. // in API requests with the JSON null value. By default, fields with
  2777. // empty values are omitted from API requests. However, any field with
  2778. // an empty value appearing in NullFields will be sent to the server as
  2779. // null. It is an error if a field in this list has a non-empty value.
  2780. // This may be used to include null fields in Patch requests.
  2781. NullFields []string `json:"-"`
  2782. }
  2783. func (s *TrafficSplit) MarshalJSON() ([]byte, error) {
  2784. type NoMethod TrafficSplit
  2785. raw := NoMethod(*s)
  2786. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2787. }
  2788. // UrlDispatchRule: Rules to match an HTTP request and dispatch that
  2789. // request to a service.
  2790. type UrlDispatchRule struct {
  2791. // Domain: Domain name to match against. The wildcard "*" is supported
  2792. // if specified before a period: "*.".Defaults to matching all domains:
  2793. // "*".
  2794. Domain string `json:"domain,omitempty"`
  2795. // Path: Pathname within the host. Must start with a "/". A single "*"
  2796. // can be included at the end of the path.The sum of the lengths of the
  2797. // domain and path may not exceed 100 characters.
  2798. Path string `json:"path,omitempty"`
  2799. // Service: Resource ID of a service in this application that should
  2800. // serve the matched request. The service must already exist. Example:
  2801. // default.
  2802. Service string `json:"service,omitempty"`
  2803. // ForceSendFields is a list of field names (e.g. "Domain") to
  2804. // unconditionally include in API requests. By default, fields with
  2805. // empty values are omitted from API requests. However, any non-pointer,
  2806. // non-interface field appearing in ForceSendFields will be sent to the
  2807. // server regardless of whether the field is empty or not. This may be
  2808. // used to include empty fields in Patch requests.
  2809. ForceSendFields []string `json:"-"`
  2810. // NullFields is a list of field names (e.g. "Domain") to include in API
  2811. // requests with the JSON null value. By default, fields with empty
  2812. // values are omitted from API requests. However, any field with an
  2813. // empty value appearing in NullFields will be sent to the server as
  2814. // null. It is an error if a field in this list has a non-empty value.
  2815. // This may be used to include null fields in Patch requests.
  2816. NullFields []string `json:"-"`
  2817. }
  2818. func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) {
  2819. type NoMethod UrlDispatchRule
  2820. raw := NoMethod(*s)
  2821. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2822. }
  2823. // UrlMap: URL pattern and description of how the URL should be handled.
  2824. // App Engine can handle URLs by executing application code or by
  2825. // serving static files uploaded with the version, such as images, CSS,
  2826. // or JavaScript.
  2827. type UrlMap struct {
  2828. // ApiEndpoint: Uses API Endpoints to handle requests.
  2829. ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"`
  2830. // AuthFailAction: Action to take when users access resources that
  2831. // require authentication. Defaults to redirect.
  2832. //
  2833. // Possible values:
  2834. // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified.
  2835. // AUTH_FAIL_ACTION_REDIRECT is assumed.
  2836. // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to
  2837. // "accounts.google.com". The user is redirected back to the application
  2838. // URL after signing in or creating an account.
  2839. // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP
  2840. // status code and an error message.
  2841. AuthFailAction string `json:"authFailAction,omitempty"`
  2842. // Login: Level of login required to access this resource.
  2843. //
  2844. // Possible values:
  2845. // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed.
  2846. // "LOGIN_OPTIONAL" - Does not require that the user is signed in.
  2847. // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action
  2848. // is taken. In addition, if the user is not an administrator for the
  2849. // application, they are given an error message regardless of
  2850. // auth_fail_action. If the user is an administrator, the handler
  2851. // proceeds.
  2852. // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds
  2853. // normally. Otherwise, the auth_fail_action is taken.
  2854. Login string `json:"login,omitempty"`
  2855. // RedirectHttpResponseCode: 30x code to use when performing redirects
  2856. // for the secure field. Defaults to 302.
  2857. //
  2858. // Possible values:
  2859. // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" - Not specified. 302 is
  2860. // assumed.
  2861. // "REDIRECT_HTTP_RESPONSE_CODE_301" - 301 Moved Permanently code.
  2862. // "REDIRECT_HTTP_RESPONSE_CODE_302" - 302 Moved Temporarily code.
  2863. // "REDIRECT_HTTP_RESPONSE_CODE_303" - 303 See Other code.
  2864. // "REDIRECT_HTTP_RESPONSE_CODE_307" - 307 Temporary Redirect code.
  2865. RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"`
  2866. // Script: Executes a script to handle the request that matches this URL
  2867. // pattern.
  2868. Script *ScriptHandler `json:"script,omitempty"`
  2869. // SecurityLevel: Security (HTTPS) enforcement for this URL.
  2870. //
  2871. // Possible values:
  2872. // "SECURE_UNSPECIFIED" - Not specified.
  2873. // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that
  2874. // match the handler succeed without redirects. The application can
  2875. // examine the request to determine which protocol was used, and respond
  2876. // accordingly.
  2877. // "SECURE_NEVER" - Requests for a URL that match this handler that
  2878. // use HTTPS are automatically redirected to the HTTP equivalent URL.
  2879. // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that
  2880. // match the handler succeed without redirects. The application can
  2881. // examine the request to determine which protocol was used and respond
  2882. // accordingly.
  2883. // "SECURE_ALWAYS" - Requests for a URL that match this handler that
  2884. // do not use HTTPS are automatically redirected to the HTTPS URL with
  2885. // the same path. Query parameters are reserved for the redirect.
  2886. SecurityLevel string `json:"securityLevel,omitempty"`
  2887. // StaticFiles: Returns the contents of a file, such as an image, as the
  2888. // response.
  2889. StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"`
  2890. // UrlRegex: URL prefix. Uses regular expression syntax, which means
  2891. // regexp special characters must be escaped, but should not contain
  2892. // groupings. All URLs that begin with this prefix are handled by this
  2893. // handler, using the portion of the URL after the prefix as part of the
  2894. // file path.
  2895. UrlRegex string `json:"urlRegex,omitempty"`
  2896. // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to
  2897. // unconditionally include in API requests. By default, fields with
  2898. // empty values are omitted from API requests. However, any non-pointer,
  2899. // non-interface field appearing in ForceSendFields will be sent to the
  2900. // server regardless of whether the field is empty or not. This may be
  2901. // used to include empty fields in Patch requests.
  2902. ForceSendFields []string `json:"-"`
  2903. // NullFields is a list of field names (e.g. "ApiEndpoint") to include
  2904. // in API requests with the JSON null value. By default, fields with
  2905. // empty values are omitted from API requests. However, any field with
  2906. // an empty value appearing in NullFields will be sent to the server as
  2907. // null. It is an error if a field in this list has a non-empty value.
  2908. // This may be used to include null fields in Patch requests.
  2909. NullFields []string `json:"-"`
  2910. }
  2911. func (s *UrlMap) MarshalJSON() ([]byte, error) {
  2912. type NoMethod UrlMap
  2913. raw := NoMethod(*s)
  2914. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2915. }
  2916. // Version: A Version resource is a specific set of source code and
  2917. // configuration files that are deployed into a service.
  2918. type Version struct {
  2919. // ApiConfig: Serving configuration for Google Cloud Endpoints
  2920. // (https://cloud.google.com/appengine/docs/python/endpoints/).Only
  2921. // returned in GET requests if view=FULL is set.
  2922. ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"`
  2923. // AutomaticScaling: Automatic scaling is based on request rate,
  2924. // response latencies, and other application metrics.
  2925. AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"`
  2926. // BasicScaling: A service with basic scaling will create an instance
  2927. // when the application receives a request. The instance will be turned
  2928. // down when the app becomes idle. Basic scaling is ideal for work that
  2929. // is intermittent or driven by user activity.
  2930. BasicScaling *BasicScaling `json:"basicScaling,omitempty"`
  2931. // BetaSettings: Metadata settings that are supplied to this version to
  2932. // enable beta runtime features.
  2933. BetaSettings map[string]string `json:"betaSettings,omitempty"`
  2934. // CreateTime: Time that this version was created.@OutputOnly
  2935. CreateTime string `json:"createTime,omitempty"`
  2936. // CreatedBy: Email address of the user who created this
  2937. // version.@OutputOnly
  2938. CreatedBy string `json:"createdBy,omitempty"`
  2939. // DefaultExpiration: Duration that static files should be cached by web
  2940. // proxies and browsers. Only applicable if the corresponding
  2941. // StaticFilesHandler
  2942. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  2943. // ta/apps.services.versions#staticfileshandler) does not specify its
  2944. // own expiration time.Only returned in GET requests if view=FULL is
  2945. // set.
  2946. DefaultExpiration string `json:"defaultExpiration,omitempty"`
  2947. // Deployment: Code and application artifacts that make up this
  2948. // version.Only returned in GET requests if view=FULL is set.
  2949. Deployment *Deployment `json:"deployment,omitempty"`
  2950. // DiskUsageBytes: Total size in bytes of all the files that are
  2951. // included in this version and currently hosted on the App Engine
  2952. // disk.@OutputOnly
  2953. DiskUsageBytes int64 `json:"diskUsageBytes,omitempty,string"`
  2954. // EndpointsApiService: Cloud Endpoints configuration.If
  2955. // endpoints_api_service is set, the Cloud Endpoints Extensible Service
  2956. // Proxy will be provided to serve the API implemented by the app.
  2957. EndpointsApiService *EndpointsApiService `json:"endpointsApiService,omitempty"`
  2958. // Env: App Engine execution environment for this version.Defaults to
  2959. // standard.
  2960. Env string `json:"env,omitempty"`
  2961. // EnvVariables: Environment variables available to the application.Only
  2962. // returned in GET requests if view=FULL is set.
  2963. EnvVariables map[string]string `json:"envVariables,omitempty"`
  2964. // ErrorHandlers: Custom static error pages. Limited to 10KB per
  2965. // page.Only returned in GET requests if view=FULL is set.
  2966. ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"`
  2967. // Handlers: An ordered list of URL-matching patterns that should be
  2968. // applied to incoming requests. The first matching URL handles the
  2969. // request and other request handlers are not attempted.Only returned in
  2970. // GET requests if view=FULL is set.
  2971. Handlers []*UrlMap `json:"handlers,omitempty"`
  2972. // HealthCheck: Configures health checking for instances. Unhealthy
  2973. // instances are stopped and replaced with new instances. Only
  2974. // applicable in the App Engine flexible environment.Only returned in
  2975. // GET requests if view=FULL is set.
  2976. HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
  2977. // Id: Relative name of the version within the service. Example: v1.
  2978. // Version names can contain only lowercase letters, numbers, or
  2979. // hyphens. Reserved names: "default", "latest", and any name with the
  2980. // prefix "ah-".
  2981. Id string `json:"id,omitempty"`
  2982. // InboundServices: Before an application can receive email or XMPP
  2983. // messages, the application must be configured to enable the service.
  2984. //
  2985. // Possible values:
  2986. // "INBOUND_SERVICE_UNSPECIFIED" - Not specified.
  2987. // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail.
  2988. // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive
  2989. // email-bound notifications.
  2990. // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive
  2991. // error stanzas.
  2992. // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive
  2993. // instant messages.
  2994. // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive
  2995. // user subscription POSTs.
  2996. // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive
  2997. // a user's chat presence.
  2998. // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for
  2999. // notifications when a client connects or disconnects from a channel.
  3000. // "INBOUND_SERVICE_WARMUP" - Enables warmup requests.
  3001. InboundServices []string `json:"inboundServices,omitempty"`
  3002. // InstanceClass: Instance class that is used to run this version. Valid
  3003. // values are:
  3004. // AutomaticScaling: F1, F2, F4, F4_1G
  3005. // ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1
  3006. // for AutomaticScaling and B1 for ManualScaling or BasicScaling.
  3007. InstanceClass string `json:"instanceClass,omitempty"`
  3008. // Libraries: Configuration for third-party Python runtime libraries
  3009. // that are required by the application.Only returned in GET requests if
  3010. // view=FULL is set.
  3011. Libraries []*Library `json:"libraries,omitempty"`
  3012. // LivenessCheck: Configures liveness health checking for instances.
  3013. // Unhealthy instances are stopped and replaced with new instancesOnly
  3014. // returned in GET requests if view=FULL is set.
  3015. LivenessCheck *LivenessCheck `json:"livenessCheck,omitempty"`
  3016. // ManualScaling: A service with manual scaling runs continuously,
  3017. // allowing you to perform complex initialization and rely on the state
  3018. // of its memory over time.
  3019. ManualScaling *ManualScaling `json:"manualScaling,omitempty"`
  3020. // Name: Full path to the Version resource in the API. Example:
  3021. // apps/myapp/services/default/versions/v1.@OutputOnly
  3022. Name string `json:"name,omitempty"`
  3023. // Network: Extra network settings. Only applicable in the App Engine
  3024. // flexible environment.
  3025. Network *Network `json:"network,omitempty"`
  3026. // NobuildFilesRegex: Files that match this pattern will not be built
  3027. // into this version. Only applicable for Go runtimes.Only returned in
  3028. // GET requests if view=FULL is set.
  3029. NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"`
  3030. // ReadinessCheck: Configures readiness health checking for instances.
  3031. // Unhealthy instances are not put into the backend traffic
  3032. // rotation.Only returned in GET requests if view=FULL is set.
  3033. ReadinessCheck *ReadinessCheck `json:"readinessCheck,omitempty"`
  3034. // Resources: Machine resources for this version. Only applicable in the
  3035. // App Engine flexible environment.
  3036. Resources *Resources `json:"resources,omitempty"`
  3037. // Runtime: Desired runtime. Example: python27.
  3038. Runtime string `json:"runtime,omitempty"`
  3039. // RuntimeApiVersion: The version of the API in the given runtime
  3040. // environment. Please see the app.yaml reference for valid values at
  3041. // https://cloud.google.com/appengine/docs/standard/<language>/config/appref
  3042. RuntimeApiVersion string `json:"runtimeApiVersion,omitempty"`
  3043. // RuntimeChannel: The channel of the runtime to use. Only available for
  3044. // some runtimes. Defaults to the default channel.
  3045. RuntimeChannel string `json:"runtimeChannel,omitempty"`
  3046. // ServingStatus: Current serving status of this version. Only the
  3047. // versions with a SERVING status create instances and can be
  3048. // billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to
  3049. // SERVING.
  3050. //
  3051. // Possible values:
  3052. // "SERVING_STATUS_UNSPECIFIED" - Not specified.
  3053. // "SERVING" - Currently serving. Instances are created according to
  3054. // the scaling settings of the version.
  3055. // "STOPPED" - Disabled. No instances will be created and the scaling
  3056. // settings are ignored until the state of the version changes to
  3057. // SERVING.
  3058. ServingStatus string `json:"servingStatus,omitempty"`
  3059. // Threadsafe: Whether multiple requests can be dispatched to this
  3060. // version at once.
  3061. Threadsafe bool `json:"threadsafe,omitempty"`
  3062. // VersionUrl: Serving URL for this version. Example:
  3063. // "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly
  3064. VersionUrl string `json:"versionUrl,omitempty"`
  3065. // Vm: Whether to deploy this version in a container on a virtual
  3066. // machine.
  3067. Vm bool `json:"vm,omitempty"`
  3068. // Zones: The Google Compute Engine zones that are supported by this
  3069. // version in the App Engine flexible environment.
  3070. Zones []string `json:"zones,omitempty"`
  3071. // ServerResponse contains the HTTP response code and headers from the
  3072. // server.
  3073. googleapi.ServerResponse `json:"-"`
  3074. // ForceSendFields is a list of field names (e.g. "ApiConfig") to
  3075. // unconditionally include in API requests. By default, fields with
  3076. // empty values are omitted from API requests. However, any non-pointer,
  3077. // non-interface field appearing in ForceSendFields will be sent to the
  3078. // server regardless of whether the field is empty or not. This may be
  3079. // used to include empty fields in Patch requests.
  3080. ForceSendFields []string `json:"-"`
  3081. // NullFields is a list of field names (e.g. "ApiConfig") to include in
  3082. // API requests with the JSON null value. By default, fields with empty
  3083. // values are omitted from API requests. However, any field with an
  3084. // empty value appearing in NullFields will be sent to the server as
  3085. // null. It is an error if a field in this list has a non-empty value.
  3086. // This may be used to include null fields in Patch requests.
  3087. NullFields []string `json:"-"`
  3088. }
  3089. func (s *Version) MarshalJSON() ([]byte, error) {
  3090. type NoMethod Version
  3091. raw := NoMethod(*s)
  3092. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3093. }
  3094. // Volume: Volumes mounted within the app container. Only applicable in
  3095. // the App Engine flexible environment.
  3096. type Volume struct {
  3097. // Name: Unique name for the volume.
  3098. Name string `json:"name,omitempty"`
  3099. // SizeGb: Volume size in gigabytes.
  3100. SizeGb float64 `json:"sizeGb,omitempty"`
  3101. // VolumeType: Underlying volume type, e.g. 'tmpfs'.
  3102. VolumeType string `json:"volumeType,omitempty"`
  3103. // ForceSendFields is a list of field names (e.g. "Name") to
  3104. // unconditionally include in API requests. By default, fields with
  3105. // empty values are omitted from API requests. However, any non-pointer,
  3106. // non-interface field appearing in ForceSendFields will be sent to the
  3107. // server regardless of whether the field is empty or not. This may be
  3108. // used to include empty fields in Patch requests.
  3109. ForceSendFields []string `json:"-"`
  3110. // NullFields is a list of field names (e.g. "Name") to include in API
  3111. // requests with the JSON null value. By default, fields with empty
  3112. // values are omitted from API requests. However, any field with an
  3113. // empty value appearing in NullFields will be sent to the server as
  3114. // null. It is an error if a field in this list has a non-empty value.
  3115. // This may be used to include null fields in Patch requests.
  3116. NullFields []string `json:"-"`
  3117. }
  3118. func (s *Volume) MarshalJSON() ([]byte, error) {
  3119. type NoMethod Volume
  3120. raw := NoMethod(*s)
  3121. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3122. }
  3123. func (s *Volume) UnmarshalJSON(data []byte) error {
  3124. type NoMethod Volume
  3125. var s1 struct {
  3126. SizeGb gensupport.JSONFloat64 `json:"sizeGb"`
  3127. *NoMethod
  3128. }
  3129. s1.NoMethod = (*NoMethod)(s)
  3130. if err := json.Unmarshal(data, &s1); err != nil {
  3131. return err
  3132. }
  3133. s.SizeGb = float64(s1.SizeGb)
  3134. return nil
  3135. }
  3136. // ZipInfo: The zip file information for a zip deployment.
  3137. type ZipInfo struct {
  3138. // FilesCount: An estimate of the number of files in a zip for a zip
  3139. // deployment. If set, must be greater than or equal to the actual
  3140. // number of files. Used for optimizing performance; if not provided,
  3141. // deployment may be slow.
  3142. FilesCount int64 `json:"filesCount,omitempty"`
  3143. // SourceUrl: URL of the zip file to deploy from. Must be a URL to a
  3144. // resource in Google Cloud Storage in the form
  3145. // 'http(s)://storage.googleapis.com/<bucket>/<object>'.
  3146. SourceUrl string `json:"sourceUrl,omitempty"`
  3147. // ForceSendFields is a list of field names (e.g. "FilesCount") to
  3148. // unconditionally include in API requests. By default, fields with
  3149. // empty values are omitted from API requests. However, any non-pointer,
  3150. // non-interface field appearing in ForceSendFields will be sent to the
  3151. // server regardless of whether the field is empty or not. This may be
  3152. // used to include empty fields in Patch requests.
  3153. ForceSendFields []string `json:"-"`
  3154. // NullFields is a list of field names (e.g. "FilesCount") to include in
  3155. // API requests with the JSON null value. By default, fields with empty
  3156. // values are omitted from API requests. However, any field with an
  3157. // empty value appearing in NullFields will be sent to the server as
  3158. // null. It is an error if a field in this list has a non-empty value.
  3159. // This may be used to include null fields in Patch requests.
  3160. NullFields []string `json:"-"`
  3161. }
  3162. func (s *ZipInfo) MarshalJSON() ([]byte, error) {
  3163. type NoMethod ZipInfo
  3164. raw := NoMethod(*s)
  3165. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3166. }
  3167. // method id "appengine.apps.create":
  3168. type AppsCreateCall struct {
  3169. s *APIService
  3170. application *Application
  3171. urlParams_ gensupport.URLParams
  3172. ctx_ context.Context
  3173. header_ http.Header
  3174. }
  3175. // Create: Creates an App Engine application for a Google Cloud Platform
  3176. // project. Required fields:
  3177. // id - The ID of the target Cloud Platform project.
  3178. // location - The region
  3179. // (https://cloud.google.com/appengine/docs/locations) where you want
  3180. // the App Engine application located.For more information about App
  3181. // Engine applications, see Managing Projects, Applications, and Billing
  3182. // (https://cloud.google.com/appengine/docs/standard/python/console/).
  3183. func (r *AppsService) Create(application *Application) *AppsCreateCall {
  3184. c := &AppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3185. c.application = application
  3186. return c
  3187. }
  3188. // Fields allows partial responses to be retrieved. See
  3189. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3190. // for more information.
  3191. func (c *AppsCreateCall) Fields(s ...googleapi.Field) *AppsCreateCall {
  3192. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3193. return c
  3194. }
  3195. // Context sets the context to be used in this call's Do method. Any
  3196. // pending HTTP request will be aborted if the provided context is
  3197. // canceled.
  3198. func (c *AppsCreateCall) Context(ctx context.Context) *AppsCreateCall {
  3199. c.ctx_ = ctx
  3200. return c
  3201. }
  3202. // Header returns an http.Header that can be modified by the caller to
  3203. // add HTTP headers to the request.
  3204. func (c *AppsCreateCall) Header() http.Header {
  3205. if c.header_ == nil {
  3206. c.header_ = make(http.Header)
  3207. }
  3208. return c.header_
  3209. }
  3210. func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) {
  3211. reqHeaders := make(http.Header)
  3212. for k, v := range c.header_ {
  3213. reqHeaders[k] = v
  3214. }
  3215. reqHeaders.Set("User-Agent", c.s.userAgent())
  3216. var body io.Reader = nil
  3217. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  3218. if err != nil {
  3219. return nil, err
  3220. }
  3221. reqHeaders.Set("Content-Type", "application/json")
  3222. c.urlParams_.Set("alt", alt)
  3223. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps")
  3224. urls += "?" + c.urlParams_.Encode()
  3225. req, _ := http.NewRequest("POST", urls, body)
  3226. req.Header = reqHeaders
  3227. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3228. }
  3229. // Do executes the "appengine.apps.create" call.
  3230. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3231. // status code is an error. Response headers are in either
  3232. // *Operation.ServerResponse.Header or (if a response was returned at
  3233. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3234. // to check whether the returned error was because
  3235. // http.StatusNotModified was returned.
  3236. func (c *AppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3237. gensupport.SetOptions(c.urlParams_, opts...)
  3238. res, err := c.doRequest("json")
  3239. if res != nil && res.StatusCode == http.StatusNotModified {
  3240. if res.Body != nil {
  3241. res.Body.Close()
  3242. }
  3243. return nil, &googleapi.Error{
  3244. Code: res.StatusCode,
  3245. Header: res.Header,
  3246. }
  3247. }
  3248. if err != nil {
  3249. return nil, err
  3250. }
  3251. defer googleapi.CloseBody(res)
  3252. if err := googleapi.CheckResponse(res); err != nil {
  3253. return nil, err
  3254. }
  3255. ret := &Operation{
  3256. ServerResponse: googleapi.ServerResponse{
  3257. Header: res.Header,
  3258. HTTPStatusCode: res.StatusCode,
  3259. },
  3260. }
  3261. target := &ret
  3262. if err := gensupport.DecodeResponse(target, res); err != nil {
  3263. return nil, err
  3264. }
  3265. return ret, nil
  3266. // {
  3267. // "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/).",
  3268. // "flatPath": "v1beta/apps",
  3269. // "httpMethod": "POST",
  3270. // "id": "appengine.apps.create",
  3271. // "parameterOrder": [],
  3272. // "parameters": {},
  3273. // "path": "v1beta/apps",
  3274. // "request": {
  3275. // "$ref": "Application"
  3276. // },
  3277. // "response": {
  3278. // "$ref": "Operation"
  3279. // },
  3280. // "scopes": [
  3281. // "https://www.googleapis.com/auth/cloud-platform"
  3282. // ]
  3283. // }
  3284. }
  3285. // method id "appengine.apps.get":
  3286. type AppsGetCall struct {
  3287. s *APIService
  3288. appsId string
  3289. urlParams_ gensupport.URLParams
  3290. ifNoneMatch_ string
  3291. ctx_ context.Context
  3292. header_ http.Header
  3293. }
  3294. // Get: Gets information about an application.
  3295. func (r *AppsService) Get(appsId string) *AppsGetCall {
  3296. c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3297. c.appsId = appsId
  3298. return c
  3299. }
  3300. // Fields allows partial responses to be retrieved. See
  3301. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3302. // for more information.
  3303. func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
  3304. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3305. return c
  3306. }
  3307. // IfNoneMatch sets the optional parameter which makes the operation
  3308. // fail if the object's ETag matches the given value. This is useful for
  3309. // getting updates only after the object has changed since the last
  3310. // request. Use googleapi.IsNotModified to check whether the response
  3311. // error from Do is the result of In-None-Match.
  3312. func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
  3313. c.ifNoneMatch_ = entityTag
  3314. return c
  3315. }
  3316. // Context sets the context to be used in this call's Do method. Any
  3317. // pending HTTP request will be aborted if the provided context is
  3318. // canceled.
  3319. func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
  3320. c.ctx_ = ctx
  3321. return c
  3322. }
  3323. // Header returns an http.Header that can be modified by the caller to
  3324. // add HTTP headers to the request.
  3325. func (c *AppsGetCall) Header() http.Header {
  3326. if c.header_ == nil {
  3327. c.header_ = make(http.Header)
  3328. }
  3329. return c.header_
  3330. }
  3331. func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
  3332. reqHeaders := make(http.Header)
  3333. for k, v := range c.header_ {
  3334. reqHeaders[k] = v
  3335. }
  3336. reqHeaders.Set("User-Agent", c.s.userAgent())
  3337. if c.ifNoneMatch_ != "" {
  3338. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3339. }
  3340. var body io.Reader = nil
  3341. c.urlParams_.Set("alt", alt)
  3342. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}")
  3343. urls += "?" + c.urlParams_.Encode()
  3344. req, _ := http.NewRequest("GET", urls, body)
  3345. req.Header = reqHeaders
  3346. googleapi.Expand(req.URL, map[string]string{
  3347. "appsId": c.appsId,
  3348. })
  3349. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3350. }
  3351. // Do executes the "appengine.apps.get" call.
  3352. // Exactly one of *Application or error will be non-nil. Any non-2xx
  3353. // status code is an error. Response headers are in either
  3354. // *Application.ServerResponse.Header or (if a response was returned at
  3355. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3356. // to check whether the returned error was because
  3357. // http.StatusNotModified was returned.
  3358. func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
  3359. gensupport.SetOptions(c.urlParams_, opts...)
  3360. res, err := c.doRequest("json")
  3361. if res != nil && res.StatusCode == http.StatusNotModified {
  3362. if res.Body != nil {
  3363. res.Body.Close()
  3364. }
  3365. return nil, &googleapi.Error{
  3366. Code: res.StatusCode,
  3367. Header: res.Header,
  3368. }
  3369. }
  3370. if err != nil {
  3371. return nil, err
  3372. }
  3373. defer googleapi.CloseBody(res)
  3374. if err := googleapi.CheckResponse(res); err != nil {
  3375. return nil, err
  3376. }
  3377. ret := &Application{
  3378. ServerResponse: googleapi.ServerResponse{
  3379. Header: res.Header,
  3380. HTTPStatusCode: res.StatusCode,
  3381. },
  3382. }
  3383. target := &ret
  3384. if err := gensupport.DecodeResponse(target, res); err != nil {
  3385. return nil, err
  3386. }
  3387. return ret, nil
  3388. // {
  3389. // "description": "Gets information about an application.",
  3390. // "flatPath": "v1beta/apps/{appsId}",
  3391. // "httpMethod": "GET",
  3392. // "id": "appengine.apps.get",
  3393. // "parameterOrder": [
  3394. // "appsId"
  3395. // ],
  3396. // "parameters": {
  3397. // "appsId": {
  3398. // "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.",
  3399. // "location": "path",
  3400. // "required": true,
  3401. // "type": "string"
  3402. // }
  3403. // },
  3404. // "path": "v1beta/apps/{appsId}",
  3405. // "response": {
  3406. // "$ref": "Application"
  3407. // },
  3408. // "scopes": [
  3409. // "https://www.googleapis.com/auth/appengine.admin",
  3410. // "https://www.googleapis.com/auth/cloud-platform",
  3411. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  3412. // ]
  3413. // }
  3414. }
  3415. // method id "appengine.apps.patch":
  3416. type AppsPatchCall struct {
  3417. s *APIService
  3418. appsId string
  3419. application *Application
  3420. urlParams_ gensupport.URLParams
  3421. ctx_ context.Context
  3422. header_ http.Header
  3423. }
  3424. // Patch: Updates the specified Application resource. You can update the
  3425. // following fields:
  3426. // auth_domain - Google authentication domain for controlling user
  3427. // access to the application.
  3428. // default_cookie_expiration - Cookie expiration policy for the
  3429. // application.
  3430. func (r *AppsService) Patch(appsId string, application *Application) *AppsPatchCall {
  3431. c := &AppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3432. c.appsId = appsId
  3433. c.application = application
  3434. return c
  3435. }
  3436. // UpdateMask sets the optional parameter "updateMask": Standard field
  3437. // mask for the set of fields to be updated.
  3438. func (c *AppsPatchCall) UpdateMask(updateMask string) *AppsPatchCall {
  3439. c.urlParams_.Set("updateMask", updateMask)
  3440. return c
  3441. }
  3442. // Fields allows partial responses to be retrieved. See
  3443. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3444. // for more information.
  3445. func (c *AppsPatchCall) Fields(s ...googleapi.Field) *AppsPatchCall {
  3446. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3447. return c
  3448. }
  3449. // Context sets the context to be used in this call's Do method. Any
  3450. // pending HTTP request will be aborted if the provided context is
  3451. // canceled.
  3452. func (c *AppsPatchCall) Context(ctx context.Context) *AppsPatchCall {
  3453. c.ctx_ = ctx
  3454. return c
  3455. }
  3456. // Header returns an http.Header that can be modified by the caller to
  3457. // add HTTP headers to the request.
  3458. func (c *AppsPatchCall) Header() http.Header {
  3459. if c.header_ == nil {
  3460. c.header_ = make(http.Header)
  3461. }
  3462. return c.header_
  3463. }
  3464. func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) {
  3465. reqHeaders := make(http.Header)
  3466. for k, v := range c.header_ {
  3467. reqHeaders[k] = v
  3468. }
  3469. reqHeaders.Set("User-Agent", c.s.userAgent())
  3470. var body io.Reader = nil
  3471. body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  3472. if err != nil {
  3473. return nil, err
  3474. }
  3475. reqHeaders.Set("Content-Type", "application/json")
  3476. c.urlParams_.Set("alt", alt)
  3477. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}")
  3478. urls += "?" + c.urlParams_.Encode()
  3479. req, _ := http.NewRequest("PATCH", urls, body)
  3480. req.Header = reqHeaders
  3481. googleapi.Expand(req.URL, map[string]string{
  3482. "appsId": c.appsId,
  3483. })
  3484. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3485. }
  3486. // Do executes the "appengine.apps.patch" call.
  3487. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3488. // status code is an error. Response headers are in either
  3489. // *Operation.ServerResponse.Header or (if a response was returned at
  3490. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3491. // to check whether the returned error was because
  3492. // http.StatusNotModified was returned.
  3493. func (c *AppsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3494. gensupport.SetOptions(c.urlParams_, opts...)
  3495. res, err := c.doRequest("json")
  3496. if res != nil && res.StatusCode == http.StatusNotModified {
  3497. if res.Body != nil {
  3498. res.Body.Close()
  3499. }
  3500. return nil, &googleapi.Error{
  3501. Code: res.StatusCode,
  3502. Header: res.Header,
  3503. }
  3504. }
  3505. if err != nil {
  3506. return nil, err
  3507. }
  3508. defer googleapi.CloseBody(res)
  3509. if err := googleapi.CheckResponse(res); err != nil {
  3510. return nil, err
  3511. }
  3512. ret := &Operation{
  3513. ServerResponse: googleapi.ServerResponse{
  3514. Header: res.Header,
  3515. HTTPStatusCode: res.StatusCode,
  3516. },
  3517. }
  3518. target := &ret
  3519. if err := gensupport.DecodeResponse(target, res); err != nil {
  3520. return nil, err
  3521. }
  3522. return ret, nil
  3523. // {
  3524. // "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.",
  3525. // "flatPath": "v1beta/apps/{appsId}",
  3526. // "httpMethod": "PATCH",
  3527. // "id": "appengine.apps.patch",
  3528. // "parameterOrder": [
  3529. // "appsId"
  3530. // ],
  3531. // "parameters": {
  3532. // "appsId": {
  3533. // "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.",
  3534. // "location": "path",
  3535. // "required": true,
  3536. // "type": "string"
  3537. // },
  3538. // "updateMask": {
  3539. // "description": "Standard field mask for the set of fields to be updated.",
  3540. // "format": "google-fieldmask",
  3541. // "location": "query",
  3542. // "type": "string"
  3543. // }
  3544. // },
  3545. // "path": "v1beta/apps/{appsId}",
  3546. // "request": {
  3547. // "$ref": "Application"
  3548. // },
  3549. // "response": {
  3550. // "$ref": "Operation"
  3551. // },
  3552. // "scopes": [
  3553. // "https://www.googleapis.com/auth/cloud-platform"
  3554. // ]
  3555. // }
  3556. }
  3557. // method id "appengine.apps.repair":
  3558. type AppsRepairCall struct {
  3559. s *APIService
  3560. appsId string
  3561. repairapplicationrequest *RepairApplicationRequest
  3562. urlParams_ gensupport.URLParams
  3563. ctx_ context.Context
  3564. header_ http.Header
  3565. }
  3566. // Repair: Recreates the required App Engine features for the specified
  3567. // App Engine application, for example a Cloud Storage bucket or App
  3568. // Engine service account. Use this method if you receive an error
  3569. // message about a missing feature, for example, Error retrieving the
  3570. // App Engine service account.
  3571. func (r *AppsService) Repair(appsId string, repairapplicationrequest *RepairApplicationRequest) *AppsRepairCall {
  3572. c := &AppsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3573. c.appsId = appsId
  3574. c.repairapplicationrequest = repairapplicationrequest
  3575. return c
  3576. }
  3577. // Fields allows partial responses to be retrieved. See
  3578. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3579. // for more information.
  3580. func (c *AppsRepairCall) Fields(s ...googleapi.Field) *AppsRepairCall {
  3581. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3582. return c
  3583. }
  3584. // Context sets the context to be used in this call's Do method. Any
  3585. // pending HTTP request will be aborted if the provided context is
  3586. // canceled.
  3587. func (c *AppsRepairCall) Context(ctx context.Context) *AppsRepairCall {
  3588. c.ctx_ = ctx
  3589. return c
  3590. }
  3591. // Header returns an http.Header that can be modified by the caller to
  3592. // add HTTP headers to the request.
  3593. func (c *AppsRepairCall) Header() http.Header {
  3594. if c.header_ == nil {
  3595. c.header_ = make(http.Header)
  3596. }
  3597. return c.header_
  3598. }
  3599. func (c *AppsRepairCall) doRequest(alt string) (*http.Response, error) {
  3600. reqHeaders := make(http.Header)
  3601. for k, v := range c.header_ {
  3602. reqHeaders[k] = v
  3603. }
  3604. reqHeaders.Set("User-Agent", c.s.userAgent())
  3605. var body io.Reader = nil
  3606. body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairapplicationrequest)
  3607. if err != nil {
  3608. return nil, err
  3609. }
  3610. reqHeaders.Set("Content-Type", "application/json")
  3611. c.urlParams_.Set("alt", alt)
  3612. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}:repair")
  3613. urls += "?" + c.urlParams_.Encode()
  3614. req, _ := http.NewRequest("POST", urls, body)
  3615. req.Header = reqHeaders
  3616. googleapi.Expand(req.URL, map[string]string{
  3617. "appsId": c.appsId,
  3618. })
  3619. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3620. }
  3621. // Do executes the "appengine.apps.repair" call.
  3622. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3623. // status code is an error. Response headers are in either
  3624. // *Operation.ServerResponse.Header or (if a response was returned at
  3625. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3626. // to check whether the returned error was because
  3627. // http.StatusNotModified was returned.
  3628. func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3629. gensupport.SetOptions(c.urlParams_, opts...)
  3630. res, err := c.doRequest("json")
  3631. if res != nil && res.StatusCode == http.StatusNotModified {
  3632. if res.Body != nil {
  3633. res.Body.Close()
  3634. }
  3635. return nil, &googleapi.Error{
  3636. Code: res.StatusCode,
  3637. Header: res.Header,
  3638. }
  3639. }
  3640. if err != nil {
  3641. return nil, err
  3642. }
  3643. defer googleapi.CloseBody(res)
  3644. if err := googleapi.CheckResponse(res); err != nil {
  3645. return nil, err
  3646. }
  3647. ret := &Operation{
  3648. ServerResponse: googleapi.ServerResponse{
  3649. Header: res.Header,
  3650. HTTPStatusCode: res.StatusCode,
  3651. },
  3652. }
  3653. target := &ret
  3654. if err := gensupport.DecodeResponse(target, res); err != nil {
  3655. return nil, err
  3656. }
  3657. return ret, nil
  3658. // {
  3659. // "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.",
  3660. // "flatPath": "v1beta/apps/{appsId}:repair",
  3661. // "httpMethod": "POST",
  3662. // "id": "appengine.apps.repair",
  3663. // "parameterOrder": [
  3664. // "appsId"
  3665. // ],
  3666. // "parameters": {
  3667. // "appsId": {
  3668. // "description": "Part of `name`. Name of the application to repair. Example: apps/myapp",
  3669. // "location": "path",
  3670. // "required": true,
  3671. // "type": "string"
  3672. // }
  3673. // },
  3674. // "path": "v1beta/apps/{appsId}:repair",
  3675. // "request": {
  3676. // "$ref": "RepairApplicationRequest"
  3677. // },
  3678. // "response": {
  3679. // "$ref": "Operation"
  3680. // },
  3681. // "scopes": [
  3682. // "https://www.googleapis.com/auth/cloud-platform"
  3683. // ]
  3684. // }
  3685. }
  3686. // method id "appengine.apps.authorizedCertificates.create":
  3687. type AppsAuthorizedCertificatesCreateCall struct {
  3688. s *APIService
  3689. appsId string
  3690. authorizedcertificate *AuthorizedCertificate
  3691. urlParams_ gensupport.URLParams
  3692. ctx_ context.Context
  3693. header_ http.Header
  3694. }
  3695. // Create: Uploads the specified SSL certificate.
  3696. func (r *AppsAuthorizedCertificatesService) Create(appsId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesCreateCall {
  3697. c := &AppsAuthorizedCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3698. c.appsId = appsId
  3699. c.authorizedcertificate = authorizedcertificate
  3700. return c
  3701. }
  3702. // Fields allows partial responses to be retrieved. See
  3703. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3704. // for more information.
  3705. func (c *AppsAuthorizedCertificatesCreateCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesCreateCall {
  3706. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3707. return c
  3708. }
  3709. // Context sets the context to be used in this call's Do method. Any
  3710. // pending HTTP request will be aborted if the provided context is
  3711. // canceled.
  3712. func (c *AppsAuthorizedCertificatesCreateCall) Context(ctx context.Context) *AppsAuthorizedCertificatesCreateCall {
  3713. c.ctx_ = ctx
  3714. return c
  3715. }
  3716. // Header returns an http.Header that can be modified by the caller to
  3717. // add HTTP headers to the request.
  3718. func (c *AppsAuthorizedCertificatesCreateCall) Header() http.Header {
  3719. if c.header_ == nil {
  3720. c.header_ = make(http.Header)
  3721. }
  3722. return c.header_
  3723. }
  3724. func (c *AppsAuthorizedCertificatesCreateCall) doRequest(alt string) (*http.Response, error) {
  3725. reqHeaders := make(http.Header)
  3726. for k, v := range c.header_ {
  3727. reqHeaders[k] = v
  3728. }
  3729. reqHeaders.Set("User-Agent", c.s.userAgent())
  3730. var body io.Reader = nil
  3731. body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate)
  3732. if err != nil {
  3733. return nil, err
  3734. }
  3735. reqHeaders.Set("Content-Type", "application/json")
  3736. c.urlParams_.Set("alt", alt)
  3737. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates")
  3738. urls += "?" + c.urlParams_.Encode()
  3739. req, _ := http.NewRequest("POST", urls, body)
  3740. req.Header = reqHeaders
  3741. googleapi.Expand(req.URL, map[string]string{
  3742. "appsId": c.appsId,
  3743. })
  3744. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3745. }
  3746. // Do executes the "appengine.apps.authorizedCertificates.create" call.
  3747. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  3748. // non-2xx status code is an error. Response headers are in either
  3749. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  3750. // returned at all) in error.(*googleapi.Error).Header. Use
  3751. // googleapi.IsNotModified to check whether the returned error was
  3752. // because http.StatusNotModified was returned.
  3753. func (c *AppsAuthorizedCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  3754. gensupport.SetOptions(c.urlParams_, opts...)
  3755. res, err := c.doRequest("json")
  3756. if res != nil && res.StatusCode == http.StatusNotModified {
  3757. if res.Body != nil {
  3758. res.Body.Close()
  3759. }
  3760. return nil, &googleapi.Error{
  3761. Code: res.StatusCode,
  3762. Header: res.Header,
  3763. }
  3764. }
  3765. if err != nil {
  3766. return nil, err
  3767. }
  3768. defer googleapi.CloseBody(res)
  3769. if err := googleapi.CheckResponse(res); err != nil {
  3770. return nil, err
  3771. }
  3772. ret := &AuthorizedCertificate{
  3773. ServerResponse: googleapi.ServerResponse{
  3774. Header: res.Header,
  3775. HTTPStatusCode: res.StatusCode,
  3776. },
  3777. }
  3778. target := &ret
  3779. if err := gensupport.DecodeResponse(target, res); err != nil {
  3780. return nil, err
  3781. }
  3782. return ret, nil
  3783. // {
  3784. // "description": "Uploads the specified SSL certificate.",
  3785. // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates",
  3786. // "httpMethod": "POST",
  3787. // "id": "appengine.apps.authorizedCertificates.create",
  3788. // "parameterOrder": [
  3789. // "appsId"
  3790. // ],
  3791. // "parameters": {
  3792. // "appsId": {
  3793. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  3794. // "location": "path",
  3795. // "required": true,
  3796. // "type": "string"
  3797. // }
  3798. // },
  3799. // "path": "v1beta/apps/{appsId}/authorizedCertificates",
  3800. // "request": {
  3801. // "$ref": "AuthorizedCertificate"
  3802. // },
  3803. // "response": {
  3804. // "$ref": "AuthorizedCertificate"
  3805. // },
  3806. // "scopes": [
  3807. // "https://www.googleapis.com/auth/cloud-platform"
  3808. // ]
  3809. // }
  3810. }
  3811. // method id "appengine.apps.authorizedCertificates.delete":
  3812. type AppsAuthorizedCertificatesDeleteCall struct {
  3813. s *APIService
  3814. appsId string
  3815. authorizedCertificatesId string
  3816. urlParams_ gensupport.URLParams
  3817. ctx_ context.Context
  3818. header_ http.Header
  3819. }
  3820. // Delete: Deletes the specified SSL certificate.
  3821. func (r *AppsAuthorizedCertificatesService) Delete(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesDeleteCall {
  3822. c := &AppsAuthorizedCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3823. c.appsId = appsId
  3824. c.authorizedCertificatesId = authorizedCertificatesId
  3825. return c
  3826. }
  3827. // Fields allows partial responses to be retrieved. See
  3828. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3829. // for more information.
  3830. func (c *AppsAuthorizedCertificatesDeleteCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesDeleteCall {
  3831. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3832. return c
  3833. }
  3834. // Context sets the context to be used in this call's Do method. Any
  3835. // pending HTTP request will be aborted if the provided context is
  3836. // canceled.
  3837. func (c *AppsAuthorizedCertificatesDeleteCall) Context(ctx context.Context) *AppsAuthorizedCertificatesDeleteCall {
  3838. c.ctx_ = ctx
  3839. return c
  3840. }
  3841. // Header returns an http.Header that can be modified by the caller to
  3842. // add HTTP headers to the request.
  3843. func (c *AppsAuthorizedCertificatesDeleteCall) Header() http.Header {
  3844. if c.header_ == nil {
  3845. c.header_ = make(http.Header)
  3846. }
  3847. return c.header_
  3848. }
  3849. func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3850. reqHeaders := make(http.Header)
  3851. for k, v := range c.header_ {
  3852. reqHeaders[k] = v
  3853. }
  3854. reqHeaders.Set("User-Agent", c.s.userAgent())
  3855. var body io.Reader = nil
  3856. c.urlParams_.Set("alt", alt)
  3857. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  3858. urls += "?" + c.urlParams_.Encode()
  3859. req, _ := http.NewRequest("DELETE", urls, body)
  3860. req.Header = reqHeaders
  3861. googleapi.Expand(req.URL, map[string]string{
  3862. "appsId": c.appsId,
  3863. "authorizedCertificatesId": c.authorizedCertificatesId,
  3864. })
  3865. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3866. }
  3867. // Do executes the "appengine.apps.authorizedCertificates.delete" call.
  3868. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  3869. // code is an error. Response headers are in either
  3870. // *Empty.ServerResponse.Header or (if a response was returned at all)
  3871. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3872. // check whether the returned error was because http.StatusNotModified
  3873. // was returned.
  3874. func (c *AppsAuthorizedCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3875. gensupport.SetOptions(c.urlParams_, opts...)
  3876. res, err := c.doRequest("json")
  3877. if res != nil && res.StatusCode == http.StatusNotModified {
  3878. if res.Body != nil {
  3879. res.Body.Close()
  3880. }
  3881. return nil, &googleapi.Error{
  3882. Code: res.StatusCode,
  3883. Header: res.Header,
  3884. }
  3885. }
  3886. if err != nil {
  3887. return nil, err
  3888. }
  3889. defer googleapi.CloseBody(res)
  3890. if err := googleapi.CheckResponse(res); err != nil {
  3891. return nil, err
  3892. }
  3893. ret := &Empty{
  3894. ServerResponse: googleapi.ServerResponse{
  3895. Header: res.Header,
  3896. HTTPStatusCode: res.StatusCode,
  3897. },
  3898. }
  3899. target := &ret
  3900. if err := gensupport.DecodeResponse(target, res); err != nil {
  3901. return nil, err
  3902. }
  3903. return ret, nil
  3904. // {
  3905. // "description": "Deletes the specified SSL certificate.",
  3906. // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  3907. // "httpMethod": "DELETE",
  3908. // "id": "appengine.apps.authorizedCertificates.delete",
  3909. // "parameterOrder": [
  3910. // "appsId",
  3911. // "authorizedCertificatesId"
  3912. // ],
  3913. // "parameters": {
  3914. // "appsId": {
  3915. // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.",
  3916. // "location": "path",
  3917. // "required": true,
  3918. // "type": "string"
  3919. // },
  3920. // "authorizedCertificatesId": {
  3921. // "description": "Part of `name`. See documentation of `appsId`.",
  3922. // "location": "path",
  3923. // "required": true,
  3924. // "type": "string"
  3925. // }
  3926. // },
  3927. // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  3928. // "response": {
  3929. // "$ref": "Empty"
  3930. // },
  3931. // "scopes": [
  3932. // "https://www.googleapis.com/auth/cloud-platform"
  3933. // ]
  3934. // }
  3935. }
  3936. // method id "appengine.apps.authorizedCertificates.get":
  3937. type AppsAuthorizedCertificatesGetCall struct {
  3938. s *APIService
  3939. appsId string
  3940. authorizedCertificatesId string
  3941. urlParams_ gensupport.URLParams
  3942. ifNoneMatch_ string
  3943. ctx_ context.Context
  3944. header_ http.Header
  3945. }
  3946. // Get: Gets the specified SSL certificate.
  3947. func (r *AppsAuthorizedCertificatesService) Get(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesGetCall {
  3948. c := &AppsAuthorizedCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3949. c.appsId = appsId
  3950. c.authorizedCertificatesId = authorizedCertificatesId
  3951. return c
  3952. }
  3953. // View sets the optional parameter "view": Controls the set of fields
  3954. // returned in the GET response.
  3955. //
  3956. // Possible values:
  3957. // "BASIC_CERTIFICATE"
  3958. // "FULL_CERTIFICATE"
  3959. func (c *AppsAuthorizedCertificatesGetCall) View(view string) *AppsAuthorizedCertificatesGetCall {
  3960. c.urlParams_.Set("view", view)
  3961. return c
  3962. }
  3963. // Fields allows partial responses to be retrieved. See
  3964. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3965. // for more information.
  3966. func (c *AppsAuthorizedCertificatesGetCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesGetCall {
  3967. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3968. return c
  3969. }
  3970. // IfNoneMatch sets the optional parameter which makes the operation
  3971. // fail if the object's ETag matches the given value. This is useful for
  3972. // getting updates only after the object has changed since the last
  3973. // request. Use googleapi.IsNotModified to check whether the response
  3974. // error from Do is the result of In-None-Match.
  3975. func (c *AppsAuthorizedCertificatesGetCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesGetCall {
  3976. c.ifNoneMatch_ = entityTag
  3977. return c
  3978. }
  3979. // Context sets the context to be used in this call's Do method. Any
  3980. // pending HTTP request will be aborted if the provided context is
  3981. // canceled.
  3982. func (c *AppsAuthorizedCertificatesGetCall) Context(ctx context.Context) *AppsAuthorizedCertificatesGetCall {
  3983. c.ctx_ = ctx
  3984. return c
  3985. }
  3986. // Header returns an http.Header that can be modified by the caller to
  3987. // add HTTP headers to the request.
  3988. func (c *AppsAuthorizedCertificatesGetCall) Header() http.Header {
  3989. if c.header_ == nil {
  3990. c.header_ = make(http.Header)
  3991. }
  3992. return c.header_
  3993. }
  3994. func (c *AppsAuthorizedCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
  3995. reqHeaders := make(http.Header)
  3996. for k, v := range c.header_ {
  3997. reqHeaders[k] = v
  3998. }
  3999. reqHeaders.Set("User-Agent", c.s.userAgent())
  4000. if c.ifNoneMatch_ != "" {
  4001. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4002. }
  4003. var body io.Reader = nil
  4004. c.urlParams_.Set("alt", alt)
  4005. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  4006. urls += "?" + c.urlParams_.Encode()
  4007. req, _ := http.NewRequest("GET", urls, body)
  4008. req.Header = reqHeaders
  4009. googleapi.Expand(req.URL, map[string]string{
  4010. "appsId": c.appsId,
  4011. "authorizedCertificatesId": c.authorizedCertificatesId,
  4012. })
  4013. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4014. }
  4015. // Do executes the "appengine.apps.authorizedCertificates.get" call.
  4016. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  4017. // non-2xx status code is an error. Response headers are in either
  4018. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  4019. // returned at all) in error.(*googleapi.Error).Header. Use
  4020. // googleapi.IsNotModified to check whether the returned error was
  4021. // because http.StatusNotModified was returned.
  4022. func (c *AppsAuthorizedCertificatesGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  4023. gensupport.SetOptions(c.urlParams_, opts...)
  4024. res, err := c.doRequest("json")
  4025. if res != nil && res.StatusCode == http.StatusNotModified {
  4026. if res.Body != nil {
  4027. res.Body.Close()
  4028. }
  4029. return nil, &googleapi.Error{
  4030. Code: res.StatusCode,
  4031. Header: res.Header,
  4032. }
  4033. }
  4034. if err != nil {
  4035. return nil, err
  4036. }
  4037. defer googleapi.CloseBody(res)
  4038. if err := googleapi.CheckResponse(res); err != nil {
  4039. return nil, err
  4040. }
  4041. ret := &AuthorizedCertificate{
  4042. ServerResponse: googleapi.ServerResponse{
  4043. Header: res.Header,
  4044. HTTPStatusCode: res.StatusCode,
  4045. },
  4046. }
  4047. target := &ret
  4048. if err := gensupport.DecodeResponse(target, res); err != nil {
  4049. return nil, err
  4050. }
  4051. return ret, nil
  4052. // {
  4053. // "description": "Gets the specified SSL certificate.",
  4054. // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4055. // "httpMethod": "GET",
  4056. // "id": "appengine.apps.authorizedCertificates.get",
  4057. // "parameterOrder": [
  4058. // "appsId",
  4059. // "authorizedCertificatesId"
  4060. // ],
  4061. // "parameters": {
  4062. // "appsId": {
  4063. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.",
  4064. // "location": "path",
  4065. // "required": true,
  4066. // "type": "string"
  4067. // },
  4068. // "authorizedCertificatesId": {
  4069. // "description": "Part of `name`. See documentation of `appsId`.",
  4070. // "location": "path",
  4071. // "required": true,
  4072. // "type": "string"
  4073. // },
  4074. // "view": {
  4075. // "description": "Controls the set of fields returned in the GET response.",
  4076. // "enum": [
  4077. // "BASIC_CERTIFICATE",
  4078. // "FULL_CERTIFICATE"
  4079. // ],
  4080. // "location": "query",
  4081. // "type": "string"
  4082. // }
  4083. // },
  4084. // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4085. // "response": {
  4086. // "$ref": "AuthorizedCertificate"
  4087. // },
  4088. // "scopes": [
  4089. // "https://www.googleapis.com/auth/appengine.admin",
  4090. // "https://www.googleapis.com/auth/cloud-platform",
  4091. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4092. // ]
  4093. // }
  4094. }
  4095. // method id "appengine.apps.authorizedCertificates.list":
  4096. type AppsAuthorizedCertificatesListCall struct {
  4097. s *APIService
  4098. appsId string
  4099. urlParams_ gensupport.URLParams
  4100. ifNoneMatch_ string
  4101. ctx_ context.Context
  4102. header_ http.Header
  4103. }
  4104. // List: Lists all SSL certificates the user is authorized to
  4105. // administer.
  4106. func (r *AppsAuthorizedCertificatesService) List(appsId string) *AppsAuthorizedCertificatesListCall {
  4107. c := &AppsAuthorizedCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4108. c.appsId = appsId
  4109. return c
  4110. }
  4111. // PageSize sets the optional parameter "pageSize": Maximum results to
  4112. // return per page.
  4113. func (c *AppsAuthorizedCertificatesListCall) PageSize(pageSize int64) *AppsAuthorizedCertificatesListCall {
  4114. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4115. return c
  4116. }
  4117. // PageToken sets the optional parameter "pageToken": Continuation token
  4118. // for fetching the next page of results.
  4119. func (c *AppsAuthorizedCertificatesListCall) PageToken(pageToken string) *AppsAuthorizedCertificatesListCall {
  4120. c.urlParams_.Set("pageToken", pageToken)
  4121. return c
  4122. }
  4123. // View sets the optional parameter "view": Controls the set of fields
  4124. // returned in the LIST response.
  4125. //
  4126. // Possible values:
  4127. // "BASIC_CERTIFICATE"
  4128. // "FULL_CERTIFICATE"
  4129. func (c *AppsAuthorizedCertificatesListCall) View(view string) *AppsAuthorizedCertificatesListCall {
  4130. c.urlParams_.Set("view", view)
  4131. return c
  4132. }
  4133. // Fields allows partial responses to be retrieved. See
  4134. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4135. // for more information.
  4136. func (c *AppsAuthorizedCertificatesListCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesListCall {
  4137. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4138. return c
  4139. }
  4140. // IfNoneMatch sets the optional parameter which makes the operation
  4141. // fail if the object's ETag matches the given value. This is useful for
  4142. // getting updates only after the object has changed since the last
  4143. // request. Use googleapi.IsNotModified to check whether the response
  4144. // error from Do is the result of In-None-Match.
  4145. func (c *AppsAuthorizedCertificatesListCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesListCall {
  4146. c.ifNoneMatch_ = entityTag
  4147. return c
  4148. }
  4149. // Context sets the context to be used in this call's Do method. Any
  4150. // pending HTTP request will be aborted if the provided context is
  4151. // canceled.
  4152. func (c *AppsAuthorizedCertificatesListCall) Context(ctx context.Context) *AppsAuthorizedCertificatesListCall {
  4153. c.ctx_ = ctx
  4154. return c
  4155. }
  4156. // Header returns an http.Header that can be modified by the caller to
  4157. // add HTTP headers to the request.
  4158. func (c *AppsAuthorizedCertificatesListCall) Header() http.Header {
  4159. if c.header_ == nil {
  4160. c.header_ = make(http.Header)
  4161. }
  4162. return c.header_
  4163. }
  4164. func (c *AppsAuthorizedCertificatesListCall) doRequest(alt string) (*http.Response, error) {
  4165. reqHeaders := make(http.Header)
  4166. for k, v := range c.header_ {
  4167. reqHeaders[k] = v
  4168. }
  4169. reqHeaders.Set("User-Agent", c.s.userAgent())
  4170. if c.ifNoneMatch_ != "" {
  4171. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4172. }
  4173. var body io.Reader = nil
  4174. c.urlParams_.Set("alt", alt)
  4175. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates")
  4176. urls += "?" + c.urlParams_.Encode()
  4177. req, _ := http.NewRequest("GET", urls, body)
  4178. req.Header = reqHeaders
  4179. googleapi.Expand(req.URL, map[string]string{
  4180. "appsId": c.appsId,
  4181. })
  4182. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4183. }
  4184. // Do executes the "appengine.apps.authorizedCertificates.list" call.
  4185. // Exactly one of *ListAuthorizedCertificatesResponse or error will be
  4186. // non-nil. Any non-2xx status code is an error. Response headers are in
  4187. // either *ListAuthorizedCertificatesResponse.ServerResponse.Header or
  4188. // (if a response was returned at all) in
  4189. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4190. // whether the returned error was because http.StatusNotModified was
  4191. // returned.
  4192. func (c *AppsAuthorizedCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedCertificatesResponse, error) {
  4193. gensupport.SetOptions(c.urlParams_, opts...)
  4194. res, err := c.doRequest("json")
  4195. if res != nil && res.StatusCode == http.StatusNotModified {
  4196. if res.Body != nil {
  4197. res.Body.Close()
  4198. }
  4199. return nil, &googleapi.Error{
  4200. Code: res.StatusCode,
  4201. Header: res.Header,
  4202. }
  4203. }
  4204. if err != nil {
  4205. return nil, err
  4206. }
  4207. defer googleapi.CloseBody(res)
  4208. if err := googleapi.CheckResponse(res); err != nil {
  4209. return nil, err
  4210. }
  4211. ret := &ListAuthorizedCertificatesResponse{
  4212. ServerResponse: googleapi.ServerResponse{
  4213. Header: res.Header,
  4214. HTTPStatusCode: res.StatusCode,
  4215. },
  4216. }
  4217. target := &ret
  4218. if err := gensupport.DecodeResponse(target, res); err != nil {
  4219. return nil, err
  4220. }
  4221. return ret, nil
  4222. // {
  4223. // "description": "Lists all SSL certificates the user is authorized to administer.",
  4224. // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates",
  4225. // "httpMethod": "GET",
  4226. // "id": "appengine.apps.authorizedCertificates.list",
  4227. // "parameterOrder": [
  4228. // "appsId"
  4229. // ],
  4230. // "parameters": {
  4231. // "appsId": {
  4232. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4233. // "location": "path",
  4234. // "required": true,
  4235. // "type": "string"
  4236. // },
  4237. // "pageSize": {
  4238. // "description": "Maximum results to return per page.",
  4239. // "format": "int32",
  4240. // "location": "query",
  4241. // "type": "integer"
  4242. // },
  4243. // "pageToken": {
  4244. // "description": "Continuation token for fetching the next page of results.",
  4245. // "location": "query",
  4246. // "type": "string"
  4247. // },
  4248. // "view": {
  4249. // "description": "Controls the set of fields returned in the LIST response.",
  4250. // "enum": [
  4251. // "BASIC_CERTIFICATE",
  4252. // "FULL_CERTIFICATE"
  4253. // ],
  4254. // "location": "query",
  4255. // "type": "string"
  4256. // }
  4257. // },
  4258. // "path": "v1beta/apps/{appsId}/authorizedCertificates",
  4259. // "response": {
  4260. // "$ref": "ListAuthorizedCertificatesResponse"
  4261. // },
  4262. // "scopes": [
  4263. // "https://www.googleapis.com/auth/appengine.admin",
  4264. // "https://www.googleapis.com/auth/cloud-platform",
  4265. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4266. // ]
  4267. // }
  4268. }
  4269. // Pages invokes f for each page of results.
  4270. // A non-nil error returned from f will halt the iteration.
  4271. // The provided context supersedes any context provided to the Context method.
  4272. func (c *AppsAuthorizedCertificatesListCall) Pages(ctx context.Context, f func(*ListAuthorizedCertificatesResponse) error) error {
  4273. c.ctx_ = ctx
  4274. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4275. for {
  4276. x, err := c.Do()
  4277. if err != nil {
  4278. return err
  4279. }
  4280. if err := f(x); err != nil {
  4281. return err
  4282. }
  4283. if x.NextPageToken == "" {
  4284. return nil
  4285. }
  4286. c.PageToken(x.NextPageToken)
  4287. }
  4288. }
  4289. // method id "appengine.apps.authorizedCertificates.patch":
  4290. type AppsAuthorizedCertificatesPatchCall struct {
  4291. s *APIService
  4292. appsId string
  4293. authorizedCertificatesId string
  4294. authorizedcertificate *AuthorizedCertificate
  4295. urlParams_ gensupport.URLParams
  4296. ctx_ context.Context
  4297. header_ http.Header
  4298. }
  4299. // Patch: Updates the specified SSL certificate. To renew a certificate
  4300. // and maintain its existing domain mappings, update certificate_data
  4301. // with a new certificate. The new certificate must be applicable to the
  4302. // same domains as the original certificate. The certificate
  4303. // display_name may also be updated.
  4304. func (r *AppsAuthorizedCertificatesService) Patch(appsId string, authorizedCertificatesId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesPatchCall {
  4305. c := &AppsAuthorizedCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4306. c.appsId = appsId
  4307. c.authorizedCertificatesId = authorizedCertificatesId
  4308. c.authorizedcertificate = authorizedcertificate
  4309. return c
  4310. }
  4311. // UpdateMask sets the optional parameter "updateMask": Standard field
  4312. // mask for the set of fields to be updated. Updates are only supported
  4313. // on the certificate_raw_data and display_name fields.
  4314. func (c *AppsAuthorizedCertificatesPatchCall) UpdateMask(updateMask string) *AppsAuthorizedCertificatesPatchCall {
  4315. c.urlParams_.Set("updateMask", updateMask)
  4316. return c
  4317. }
  4318. // Fields allows partial responses to be retrieved. See
  4319. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4320. // for more information.
  4321. func (c *AppsAuthorizedCertificatesPatchCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesPatchCall {
  4322. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4323. return c
  4324. }
  4325. // Context sets the context to be used in this call's Do method. Any
  4326. // pending HTTP request will be aborted if the provided context is
  4327. // canceled.
  4328. func (c *AppsAuthorizedCertificatesPatchCall) Context(ctx context.Context) *AppsAuthorizedCertificatesPatchCall {
  4329. c.ctx_ = ctx
  4330. return c
  4331. }
  4332. // Header returns an http.Header that can be modified by the caller to
  4333. // add HTTP headers to the request.
  4334. func (c *AppsAuthorizedCertificatesPatchCall) Header() http.Header {
  4335. if c.header_ == nil {
  4336. c.header_ = make(http.Header)
  4337. }
  4338. return c.header_
  4339. }
  4340. func (c *AppsAuthorizedCertificatesPatchCall) doRequest(alt string) (*http.Response, error) {
  4341. reqHeaders := make(http.Header)
  4342. for k, v := range c.header_ {
  4343. reqHeaders[k] = v
  4344. }
  4345. reqHeaders.Set("User-Agent", c.s.userAgent())
  4346. var body io.Reader = nil
  4347. body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate)
  4348. if err != nil {
  4349. return nil, err
  4350. }
  4351. reqHeaders.Set("Content-Type", "application/json")
  4352. c.urlParams_.Set("alt", alt)
  4353. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}")
  4354. urls += "?" + c.urlParams_.Encode()
  4355. req, _ := http.NewRequest("PATCH", urls, body)
  4356. req.Header = reqHeaders
  4357. googleapi.Expand(req.URL, map[string]string{
  4358. "appsId": c.appsId,
  4359. "authorizedCertificatesId": c.authorizedCertificatesId,
  4360. })
  4361. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4362. }
  4363. // Do executes the "appengine.apps.authorizedCertificates.patch" call.
  4364. // Exactly one of *AuthorizedCertificate or error will be non-nil. Any
  4365. // non-2xx status code is an error. Response headers are in either
  4366. // *AuthorizedCertificate.ServerResponse.Header or (if a response was
  4367. // returned at all) in error.(*googleapi.Error).Header. Use
  4368. // googleapi.IsNotModified to check whether the returned error was
  4369. // because http.StatusNotModified was returned.
  4370. func (c *AppsAuthorizedCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) {
  4371. gensupport.SetOptions(c.urlParams_, opts...)
  4372. res, err := c.doRequest("json")
  4373. if res != nil && res.StatusCode == http.StatusNotModified {
  4374. if res.Body != nil {
  4375. res.Body.Close()
  4376. }
  4377. return nil, &googleapi.Error{
  4378. Code: res.StatusCode,
  4379. Header: res.Header,
  4380. }
  4381. }
  4382. if err != nil {
  4383. return nil, err
  4384. }
  4385. defer googleapi.CloseBody(res)
  4386. if err := googleapi.CheckResponse(res); err != nil {
  4387. return nil, err
  4388. }
  4389. ret := &AuthorizedCertificate{
  4390. ServerResponse: googleapi.ServerResponse{
  4391. Header: res.Header,
  4392. HTTPStatusCode: res.StatusCode,
  4393. },
  4394. }
  4395. target := &ret
  4396. if err := gensupport.DecodeResponse(target, res); err != nil {
  4397. return nil, err
  4398. }
  4399. return ret, nil
  4400. // {
  4401. // "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.",
  4402. // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4403. // "httpMethod": "PATCH",
  4404. // "id": "appengine.apps.authorizedCertificates.patch",
  4405. // "parameterOrder": [
  4406. // "appsId",
  4407. // "authorizedCertificatesId"
  4408. // ],
  4409. // "parameters": {
  4410. // "appsId": {
  4411. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.",
  4412. // "location": "path",
  4413. // "required": true,
  4414. // "type": "string"
  4415. // },
  4416. // "authorizedCertificatesId": {
  4417. // "description": "Part of `name`. See documentation of `appsId`.",
  4418. // "location": "path",
  4419. // "required": true,
  4420. // "type": "string"
  4421. // },
  4422. // "updateMask": {
  4423. // "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.",
  4424. // "format": "google-fieldmask",
  4425. // "location": "query",
  4426. // "type": "string"
  4427. // }
  4428. // },
  4429. // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}",
  4430. // "request": {
  4431. // "$ref": "AuthorizedCertificate"
  4432. // },
  4433. // "response": {
  4434. // "$ref": "AuthorizedCertificate"
  4435. // },
  4436. // "scopes": [
  4437. // "https://www.googleapis.com/auth/cloud-platform"
  4438. // ]
  4439. // }
  4440. }
  4441. // method id "appengine.apps.authorizedDomains.list":
  4442. type AppsAuthorizedDomainsListCall struct {
  4443. s *APIService
  4444. appsId string
  4445. urlParams_ gensupport.URLParams
  4446. ifNoneMatch_ string
  4447. ctx_ context.Context
  4448. header_ http.Header
  4449. }
  4450. // List: Lists all domains the user is authorized to administer.
  4451. func (r *AppsAuthorizedDomainsService) List(appsId string) *AppsAuthorizedDomainsListCall {
  4452. c := &AppsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4453. c.appsId = appsId
  4454. return c
  4455. }
  4456. // PageSize sets the optional parameter "pageSize": Maximum results to
  4457. // return per page.
  4458. func (c *AppsAuthorizedDomainsListCall) PageSize(pageSize int64) *AppsAuthorizedDomainsListCall {
  4459. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4460. return c
  4461. }
  4462. // PageToken sets the optional parameter "pageToken": Continuation token
  4463. // for fetching the next page of results.
  4464. func (c *AppsAuthorizedDomainsListCall) PageToken(pageToken string) *AppsAuthorizedDomainsListCall {
  4465. c.urlParams_.Set("pageToken", pageToken)
  4466. return c
  4467. }
  4468. // Fields allows partial responses to be retrieved. See
  4469. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4470. // for more information.
  4471. func (c *AppsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *AppsAuthorizedDomainsListCall {
  4472. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4473. return c
  4474. }
  4475. // IfNoneMatch sets the optional parameter which makes the operation
  4476. // fail if the object's ETag matches the given value. This is useful for
  4477. // getting updates only after the object has changed since the last
  4478. // request. Use googleapi.IsNotModified to check whether the response
  4479. // error from Do is the result of In-None-Match.
  4480. func (c *AppsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *AppsAuthorizedDomainsListCall {
  4481. c.ifNoneMatch_ = entityTag
  4482. return c
  4483. }
  4484. // Context sets the context to be used in this call's Do method. Any
  4485. // pending HTTP request will be aborted if the provided context is
  4486. // canceled.
  4487. func (c *AppsAuthorizedDomainsListCall) Context(ctx context.Context) *AppsAuthorizedDomainsListCall {
  4488. c.ctx_ = ctx
  4489. return c
  4490. }
  4491. // Header returns an http.Header that can be modified by the caller to
  4492. // add HTTP headers to the request.
  4493. func (c *AppsAuthorizedDomainsListCall) Header() http.Header {
  4494. if c.header_ == nil {
  4495. c.header_ = make(http.Header)
  4496. }
  4497. return c.header_
  4498. }
  4499. func (c *AppsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) {
  4500. reqHeaders := make(http.Header)
  4501. for k, v := range c.header_ {
  4502. reqHeaders[k] = v
  4503. }
  4504. reqHeaders.Set("User-Agent", c.s.userAgent())
  4505. if c.ifNoneMatch_ != "" {
  4506. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4507. }
  4508. var body io.Reader = nil
  4509. c.urlParams_.Set("alt", alt)
  4510. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedDomains")
  4511. urls += "?" + c.urlParams_.Encode()
  4512. req, _ := http.NewRequest("GET", urls, body)
  4513. req.Header = reqHeaders
  4514. googleapi.Expand(req.URL, map[string]string{
  4515. "appsId": c.appsId,
  4516. })
  4517. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4518. }
  4519. // Do executes the "appengine.apps.authorizedDomains.list" call.
  4520. // Exactly one of *ListAuthorizedDomainsResponse or error will be
  4521. // non-nil. Any non-2xx status code is an error. Response headers are in
  4522. // either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a
  4523. // response was returned at all) in error.(*googleapi.Error).Header. Use
  4524. // googleapi.IsNotModified to check whether the returned error was
  4525. // because http.StatusNotModified was returned.
  4526. func (c *AppsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) {
  4527. gensupport.SetOptions(c.urlParams_, opts...)
  4528. res, err := c.doRequest("json")
  4529. if res != nil && res.StatusCode == http.StatusNotModified {
  4530. if res.Body != nil {
  4531. res.Body.Close()
  4532. }
  4533. return nil, &googleapi.Error{
  4534. Code: res.StatusCode,
  4535. Header: res.Header,
  4536. }
  4537. }
  4538. if err != nil {
  4539. return nil, err
  4540. }
  4541. defer googleapi.CloseBody(res)
  4542. if err := googleapi.CheckResponse(res); err != nil {
  4543. return nil, err
  4544. }
  4545. ret := &ListAuthorizedDomainsResponse{
  4546. ServerResponse: googleapi.ServerResponse{
  4547. Header: res.Header,
  4548. HTTPStatusCode: res.StatusCode,
  4549. },
  4550. }
  4551. target := &ret
  4552. if err := gensupport.DecodeResponse(target, res); err != nil {
  4553. return nil, err
  4554. }
  4555. return ret, nil
  4556. // {
  4557. // "description": "Lists all domains the user is authorized to administer.",
  4558. // "flatPath": "v1beta/apps/{appsId}/authorizedDomains",
  4559. // "httpMethod": "GET",
  4560. // "id": "appengine.apps.authorizedDomains.list",
  4561. // "parameterOrder": [
  4562. // "appsId"
  4563. // ],
  4564. // "parameters": {
  4565. // "appsId": {
  4566. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4567. // "location": "path",
  4568. // "required": true,
  4569. // "type": "string"
  4570. // },
  4571. // "pageSize": {
  4572. // "description": "Maximum results to return per page.",
  4573. // "format": "int32",
  4574. // "location": "query",
  4575. // "type": "integer"
  4576. // },
  4577. // "pageToken": {
  4578. // "description": "Continuation token for fetching the next page of results.",
  4579. // "location": "query",
  4580. // "type": "string"
  4581. // }
  4582. // },
  4583. // "path": "v1beta/apps/{appsId}/authorizedDomains",
  4584. // "response": {
  4585. // "$ref": "ListAuthorizedDomainsResponse"
  4586. // },
  4587. // "scopes": [
  4588. // "https://www.googleapis.com/auth/appengine.admin",
  4589. // "https://www.googleapis.com/auth/cloud-platform",
  4590. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  4591. // ]
  4592. // }
  4593. }
  4594. // Pages invokes f for each page of results.
  4595. // A non-nil error returned from f will halt the iteration.
  4596. // The provided context supersedes any context provided to the Context method.
  4597. func (c *AppsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error {
  4598. c.ctx_ = ctx
  4599. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4600. for {
  4601. x, err := c.Do()
  4602. if err != nil {
  4603. return err
  4604. }
  4605. if err := f(x); err != nil {
  4606. return err
  4607. }
  4608. if x.NextPageToken == "" {
  4609. return nil
  4610. }
  4611. c.PageToken(x.NextPageToken)
  4612. }
  4613. }
  4614. // method id "appengine.apps.domainMappings.create":
  4615. type AppsDomainMappingsCreateCall struct {
  4616. s *APIService
  4617. appsId string
  4618. domainmapping *DomainMapping
  4619. urlParams_ gensupport.URLParams
  4620. ctx_ context.Context
  4621. header_ http.Header
  4622. }
  4623. // Create: Maps a domain to an application. A user must be authorized to
  4624. // administer a domain in order to map it to an application. For a list
  4625. // of available authorized domains, see
  4626. // AuthorizedDomains.ListAuthorizedDomains.
  4627. func (r *AppsDomainMappingsService) Create(appsId string, domainmapping *DomainMapping) *AppsDomainMappingsCreateCall {
  4628. c := &AppsDomainMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4629. c.appsId = appsId
  4630. c.domainmapping = domainmapping
  4631. return c
  4632. }
  4633. // OverrideStrategy sets the optional parameter "overrideStrategy":
  4634. // Whether the domain creation should override any existing mappings for
  4635. // this domain. By default, overrides are rejected.
  4636. //
  4637. // Possible values:
  4638. // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY"
  4639. // "STRICT"
  4640. // "OVERRIDE"
  4641. func (c *AppsDomainMappingsCreateCall) OverrideStrategy(overrideStrategy string) *AppsDomainMappingsCreateCall {
  4642. c.urlParams_.Set("overrideStrategy", overrideStrategy)
  4643. return c
  4644. }
  4645. // Fields allows partial responses to be retrieved. See
  4646. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4647. // for more information.
  4648. func (c *AppsDomainMappingsCreateCall) Fields(s ...googleapi.Field) *AppsDomainMappingsCreateCall {
  4649. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4650. return c
  4651. }
  4652. // Context sets the context to be used in this call's Do method. Any
  4653. // pending HTTP request will be aborted if the provided context is
  4654. // canceled.
  4655. func (c *AppsDomainMappingsCreateCall) Context(ctx context.Context) *AppsDomainMappingsCreateCall {
  4656. c.ctx_ = ctx
  4657. return c
  4658. }
  4659. // Header returns an http.Header that can be modified by the caller to
  4660. // add HTTP headers to the request.
  4661. func (c *AppsDomainMappingsCreateCall) Header() http.Header {
  4662. if c.header_ == nil {
  4663. c.header_ = make(http.Header)
  4664. }
  4665. return c.header_
  4666. }
  4667. func (c *AppsDomainMappingsCreateCall) doRequest(alt string) (*http.Response, error) {
  4668. reqHeaders := make(http.Header)
  4669. for k, v := range c.header_ {
  4670. reqHeaders[k] = v
  4671. }
  4672. reqHeaders.Set("User-Agent", c.s.userAgent())
  4673. var body io.Reader = nil
  4674. body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping)
  4675. if err != nil {
  4676. return nil, err
  4677. }
  4678. reqHeaders.Set("Content-Type", "application/json")
  4679. c.urlParams_.Set("alt", alt)
  4680. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings")
  4681. urls += "?" + c.urlParams_.Encode()
  4682. req, _ := http.NewRequest("POST", urls, body)
  4683. req.Header = reqHeaders
  4684. googleapi.Expand(req.URL, map[string]string{
  4685. "appsId": c.appsId,
  4686. })
  4687. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4688. }
  4689. // Do executes the "appengine.apps.domainMappings.create" call.
  4690. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4691. // status code is an error. Response headers are in either
  4692. // *Operation.ServerResponse.Header or (if a response was returned at
  4693. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4694. // to check whether the returned error was because
  4695. // http.StatusNotModified was returned.
  4696. func (c *AppsDomainMappingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4697. gensupport.SetOptions(c.urlParams_, opts...)
  4698. res, err := c.doRequest("json")
  4699. if res != nil && res.StatusCode == http.StatusNotModified {
  4700. if res.Body != nil {
  4701. res.Body.Close()
  4702. }
  4703. return nil, &googleapi.Error{
  4704. Code: res.StatusCode,
  4705. Header: res.Header,
  4706. }
  4707. }
  4708. if err != nil {
  4709. return nil, err
  4710. }
  4711. defer googleapi.CloseBody(res)
  4712. if err := googleapi.CheckResponse(res); err != nil {
  4713. return nil, err
  4714. }
  4715. ret := &Operation{
  4716. ServerResponse: googleapi.ServerResponse{
  4717. Header: res.Header,
  4718. HTTPStatusCode: res.StatusCode,
  4719. },
  4720. }
  4721. target := &ret
  4722. if err := gensupport.DecodeResponse(target, res); err != nil {
  4723. return nil, err
  4724. }
  4725. return ret, nil
  4726. // {
  4727. // "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.",
  4728. // "flatPath": "v1beta/apps/{appsId}/domainMappings",
  4729. // "httpMethod": "POST",
  4730. // "id": "appengine.apps.domainMappings.create",
  4731. // "parameterOrder": [
  4732. // "appsId"
  4733. // ],
  4734. // "parameters": {
  4735. // "appsId": {
  4736. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  4737. // "location": "path",
  4738. // "required": true,
  4739. // "type": "string"
  4740. // },
  4741. // "overrideStrategy": {
  4742. // "description": "Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.",
  4743. // "enum": [
  4744. // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY",
  4745. // "STRICT",
  4746. // "OVERRIDE"
  4747. // ],
  4748. // "location": "query",
  4749. // "type": "string"
  4750. // }
  4751. // },
  4752. // "path": "v1beta/apps/{appsId}/domainMappings",
  4753. // "request": {
  4754. // "$ref": "DomainMapping"
  4755. // },
  4756. // "response": {
  4757. // "$ref": "Operation"
  4758. // },
  4759. // "scopes": [
  4760. // "https://www.googleapis.com/auth/cloud-platform"
  4761. // ]
  4762. // }
  4763. }
  4764. // method id "appengine.apps.domainMappings.delete":
  4765. type AppsDomainMappingsDeleteCall struct {
  4766. s *APIService
  4767. appsId string
  4768. domainMappingsId string
  4769. urlParams_ gensupport.URLParams
  4770. ctx_ context.Context
  4771. header_ http.Header
  4772. }
  4773. // Delete: Deletes the specified domain mapping. A user must be
  4774. // authorized to administer the associated domain in order to delete a
  4775. // DomainMapping resource.
  4776. func (r *AppsDomainMappingsService) Delete(appsId string, domainMappingsId string) *AppsDomainMappingsDeleteCall {
  4777. c := &AppsDomainMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4778. c.appsId = appsId
  4779. c.domainMappingsId = domainMappingsId
  4780. return c
  4781. }
  4782. // Fields allows partial responses to be retrieved. See
  4783. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4784. // for more information.
  4785. func (c *AppsDomainMappingsDeleteCall) Fields(s ...googleapi.Field) *AppsDomainMappingsDeleteCall {
  4786. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4787. return c
  4788. }
  4789. // Context sets the context to be used in this call's Do method. Any
  4790. // pending HTTP request will be aborted if the provided context is
  4791. // canceled.
  4792. func (c *AppsDomainMappingsDeleteCall) Context(ctx context.Context) *AppsDomainMappingsDeleteCall {
  4793. c.ctx_ = ctx
  4794. return c
  4795. }
  4796. // Header returns an http.Header that can be modified by the caller to
  4797. // add HTTP headers to the request.
  4798. func (c *AppsDomainMappingsDeleteCall) Header() http.Header {
  4799. if c.header_ == nil {
  4800. c.header_ = make(http.Header)
  4801. }
  4802. return c.header_
  4803. }
  4804. func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4805. reqHeaders := make(http.Header)
  4806. for k, v := range c.header_ {
  4807. reqHeaders[k] = v
  4808. }
  4809. reqHeaders.Set("User-Agent", c.s.userAgent())
  4810. var body io.Reader = nil
  4811. c.urlParams_.Set("alt", alt)
  4812. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}")
  4813. urls += "?" + c.urlParams_.Encode()
  4814. req, _ := http.NewRequest("DELETE", urls, body)
  4815. req.Header = reqHeaders
  4816. googleapi.Expand(req.URL, map[string]string{
  4817. "appsId": c.appsId,
  4818. "domainMappingsId": c.domainMappingsId,
  4819. })
  4820. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4821. }
  4822. // Do executes the "appengine.apps.domainMappings.delete" call.
  4823. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4824. // status code is an error. Response headers are in either
  4825. // *Operation.ServerResponse.Header or (if a response was returned at
  4826. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4827. // to check whether the returned error was because
  4828. // http.StatusNotModified was returned.
  4829. func (c *AppsDomainMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4830. gensupport.SetOptions(c.urlParams_, opts...)
  4831. res, err := c.doRequest("json")
  4832. if res != nil && res.StatusCode == http.StatusNotModified {
  4833. if res.Body != nil {
  4834. res.Body.Close()
  4835. }
  4836. return nil, &googleapi.Error{
  4837. Code: res.StatusCode,
  4838. Header: res.Header,
  4839. }
  4840. }
  4841. if err != nil {
  4842. return nil, err
  4843. }
  4844. defer googleapi.CloseBody(res)
  4845. if err := googleapi.CheckResponse(res); err != nil {
  4846. return nil, err
  4847. }
  4848. ret := &Operation{
  4849. ServerResponse: googleapi.ServerResponse{
  4850. Header: res.Header,
  4851. HTTPStatusCode: res.StatusCode,
  4852. },
  4853. }
  4854. target := &ret
  4855. if err := gensupport.DecodeResponse(target, res); err != nil {
  4856. return nil, err
  4857. }
  4858. return ret, nil
  4859. // {
  4860. // "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.",
  4861. // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  4862. // "httpMethod": "DELETE",
  4863. // "id": "appengine.apps.domainMappings.delete",
  4864. // "parameterOrder": [
  4865. // "appsId",
  4866. // "domainMappingsId"
  4867. // ],
  4868. // "parameters": {
  4869. // "appsId": {
  4870. // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.",
  4871. // "location": "path",
  4872. // "required": true,
  4873. // "type": "string"
  4874. // },
  4875. // "domainMappingsId": {
  4876. // "description": "Part of `name`. See documentation of `appsId`.",
  4877. // "location": "path",
  4878. // "required": true,
  4879. // "type": "string"
  4880. // }
  4881. // },
  4882. // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  4883. // "response": {
  4884. // "$ref": "Operation"
  4885. // },
  4886. // "scopes": [
  4887. // "https://www.googleapis.com/auth/cloud-platform"
  4888. // ]
  4889. // }
  4890. }
  4891. // method id "appengine.apps.domainMappings.get":
  4892. type AppsDomainMappingsGetCall struct {
  4893. s *APIService
  4894. appsId string
  4895. domainMappingsId string
  4896. urlParams_ gensupport.URLParams
  4897. ifNoneMatch_ string
  4898. ctx_ context.Context
  4899. header_ http.Header
  4900. }
  4901. // Get: Gets the specified domain mapping.
  4902. func (r *AppsDomainMappingsService) Get(appsId string, domainMappingsId string) *AppsDomainMappingsGetCall {
  4903. c := &AppsDomainMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4904. c.appsId = appsId
  4905. c.domainMappingsId = domainMappingsId
  4906. return c
  4907. }
  4908. // Fields allows partial responses to be retrieved. See
  4909. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4910. // for more information.
  4911. func (c *AppsDomainMappingsGetCall) Fields(s ...googleapi.Field) *AppsDomainMappingsGetCall {
  4912. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4913. return c
  4914. }
  4915. // IfNoneMatch sets the optional parameter which makes the operation
  4916. // fail if the object's ETag matches the given value. This is useful for
  4917. // getting updates only after the object has changed since the last
  4918. // request. Use googleapi.IsNotModified to check whether the response
  4919. // error from Do is the result of In-None-Match.
  4920. func (c *AppsDomainMappingsGetCall) IfNoneMatch(entityTag string) *AppsDomainMappingsGetCall {
  4921. c.ifNoneMatch_ = entityTag
  4922. return c
  4923. }
  4924. // Context sets the context to be used in this call's Do method. Any
  4925. // pending HTTP request will be aborted if the provided context is
  4926. // canceled.
  4927. func (c *AppsDomainMappingsGetCall) Context(ctx context.Context) *AppsDomainMappingsGetCall {
  4928. c.ctx_ = ctx
  4929. return c
  4930. }
  4931. // Header returns an http.Header that can be modified by the caller to
  4932. // add HTTP headers to the request.
  4933. func (c *AppsDomainMappingsGetCall) Header() http.Header {
  4934. if c.header_ == nil {
  4935. c.header_ = make(http.Header)
  4936. }
  4937. return c.header_
  4938. }
  4939. func (c *AppsDomainMappingsGetCall) doRequest(alt string) (*http.Response, error) {
  4940. reqHeaders := make(http.Header)
  4941. for k, v := range c.header_ {
  4942. reqHeaders[k] = v
  4943. }
  4944. reqHeaders.Set("User-Agent", c.s.userAgent())
  4945. if c.ifNoneMatch_ != "" {
  4946. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4947. }
  4948. var body io.Reader = nil
  4949. c.urlParams_.Set("alt", alt)
  4950. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}")
  4951. urls += "?" + c.urlParams_.Encode()
  4952. req, _ := http.NewRequest("GET", urls, body)
  4953. req.Header = reqHeaders
  4954. googleapi.Expand(req.URL, map[string]string{
  4955. "appsId": c.appsId,
  4956. "domainMappingsId": c.domainMappingsId,
  4957. })
  4958. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4959. }
  4960. // Do executes the "appengine.apps.domainMappings.get" call.
  4961. // Exactly one of *DomainMapping or error will be non-nil. Any non-2xx
  4962. // status code is an error. Response headers are in either
  4963. // *DomainMapping.ServerResponse.Header or (if a response was returned
  4964. // at all) in error.(*googleapi.Error).Header. Use
  4965. // googleapi.IsNotModified to check whether the returned error was
  4966. // because http.StatusNotModified was returned.
  4967. func (c *AppsDomainMappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) {
  4968. gensupport.SetOptions(c.urlParams_, opts...)
  4969. res, err := c.doRequest("json")
  4970. if res != nil && res.StatusCode == http.StatusNotModified {
  4971. if res.Body != nil {
  4972. res.Body.Close()
  4973. }
  4974. return nil, &googleapi.Error{
  4975. Code: res.StatusCode,
  4976. Header: res.Header,
  4977. }
  4978. }
  4979. if err != nil {
  4980. return nil, err
  4981. }
  4982. defer googleapi.CloseBody(res)
  4983. if err := googleapi.CheckResponse(res); err != nil {
  4984. return nil, err
  4985. }
  4986. ret := &DomainMapping{
  4987. ServerResponse: googleapi.ServerResponse{
  4988. Header: res.Header,
  4989. HTTPStatusCode: res.StatusCode,
  4990. },
  4991. }
  4992. target := &ret
  4993. if err := gensupport.DecodeResponse(target, res); err != nil {
  4994. return nil, err
  4995. }
  4996. return ret, nil
  4997. // {
  4998. // "description": "Gets the specified domain mapping.",
  4999. // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  5000. // "httpMethod": "GET",
  5001. // "id": "appengine.apps.domainMappings.get",
  5002. // "parameterOrder": [
  5003. // "appsId",
  5004. // "domainMappingsId"
  5005. // ],
  5006. // "parameters": {
  5007. // "appsId": {
  5008. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.",
  5009. // "location": "path",
  5010. // "required": true,
  5011. // "type": "string"
  5012. // },
  5013. // "domainMappingsId": {
  5014. // "description": "Part of `name`. See documentation of `appsId`.",
  5015. // "location": "path",
  5016. // "required": true,
  5017. // "type": "string"
  5018. // }
  5019. // },
  5020. // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  5021. // "response": {
  5022. // "$ref": "DomainMapping"
  5023. // },
  5024. // "scopes": [
  5025. // "https://www.googleapis.com/auth/appengine.admin",
  5026. // "https://www.googleapis.com/auth/cloud-platform",
  5027. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5028. // ]
  5029. // }
  5030. }
  5031. // method id "appengine.apps.domainMappings.list":
  5032. type AppsDomainMappingsListCall struct {
  5033. s *APIService
  5034. appsId string
  5035. urlParams_ gensupport.URLParams
  5036. ifNoneMatch_ string
  5037. ctx_ context.Context
  5038. header_ http.Header
  5039. }
  5040. // List: Lists the domain mappings on an application.
  5041. func (r *AppsDomainMappingsService) List(appsId string) *AppsDomainMappingsListCall {
  5042. c := &AppsDomainMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5043. c.appsId = appsId
  5044. return c
  5045. }
  5046. // PageSize sets the optional parameter "pageSize": Maximum results to
  5047. // return per page.
  5048. func (c *AppsDomainMappingsListCall) PageSize(pageSize int64) *AppsDomainMappingsListCall {
  5049. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5050. return c
  5051. }
  5052. // PageToken sets the optional parameter "pageToken": Continuation token
  5053. // for fetching the next page of results.
  5054. func (c *AppsDomainMappingsListCall) PageToken(pageToken string) *AppsDomainMappingsListCall {
  5055. c.urlParams_.Set("pageToken", pageToken)
  5056. return c
  5057. }
  5058. // Fields allows partial responses to be retrieved. See
  5059. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5060. // for more information.
  5061. func (c *AppsDomainMappingsListCall) Fields(s ...googleapi.Field) *AppsDomainMappingsListCall {
  5062. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5063. return c
  5064. }
  5065. // IfNoneMatch sets the optional parameter which makes the operation
  5066. // fail if the object's ETag matches the given value. This is useful for
  5067. // getting updates only after the object has changed since the last
  5068. // request. Use googleapi.IsNotModified to check whether the response
  5069. // error from Do is the result of In-None-Match.
  5070. func (c *AppsDomainMappingsListCall) IfNoneMatch(entityTag string) *AppsDomainMappingsListCall {
  5071. c.ifNoneMatch_ = entityTag
  5072. return c
  5073. }
  5074. // Context sets the context to be used in this call's Do method. Any
  5075. // pending HTTP request will be aborted if the provided context is
  5076. // canceled.
  5077. func (c *AppsDomainMappingsListCall) Context(ctx context.Context) *AppsDomainMappingsListCall {
  5078. c.ctx_ = ctx
  5079. return c
  5080. }
  5081. // Header returns an http.Header that can be modified by the caller to
  5082. // add HTTP headers to the request.
  5083. func (c *AppsDomainMappingsListCall) Header() http.Header {
  5084. if c.header_ == nil {
  5085. c.header_ = make(http.Header)
  5086. }
  5087. return c.header_
  5088. }
  5089. func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, error) {
  5090. reqHeaders := make(http.Header)
  5091. for k, v := range c.header_ {
  5092. reqHeaders[k] = v
  5093. }
  5094. reqHeaders.Set("User-Agent", c.s.userAgent())
  5095. if c.ifNoneMatch_ != "" {
  5096. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5097. }
  5098. var body io.Reader = nil
  5099. c.urlParams_.Set("alt", alt)
  5100. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings")
  5101. urls += "?" + c.urlParams_.Encode()
  5102. req, _ := http.NewRequest("GET", urls, body)
  5103. req.Header = reqHeaders
  5104. googleapi.Expand(req.URL, map[string]string{
  5105. "appsId": c.appsId,
  5106. })
  5107. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5108. }
  5109. // Do executes the "appengine.apps.domainMappings.list" call.
  5110. // Exactly one of *ListDomainMappingsResponse or error will be non-nil.
  5111. // Any non-2xx status code is an error. Response headers are in either
  5112. // *ListDomainMappingsResponse.ServerResponse.Header or (if a response
  5113. // was returned at all) in error.(*googleapi.Error).Header. Use
  5114. // googleapi.IsNotModified to check whether the returned error was
  5115. // because http.StatusNotModified was returned.
  5116. func (c *AppsDomainMappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) {
  5117. gensupport.SetOptions(c.urlParams_, opts...)
  5118. res, err := c.doRequest("json")
  5119. if res != nil && res.StatusCode == http.StatusNotModified {
  5120. if res.Body != nil {
  5121. res.Body.Close()
  5122. }
  5123. return nil, &googleapi.Error{
  5124. Code: res.StatusCode,
  5125. Header: res.Header,
  5126. }
  5127. }
  5128. if err != nil {
  5129. return nil, err
  5130. }
  5131. defer googleapi.CloseBody(res)
  5132. if err := googleapi.CheckResponse(res); err != nil {
  5133. return nil, err
  5134. }
  5135. ret := &ListDomainMappingsResponse{
  5136. ServerResponse: googleapi.ServerResponse{
  5137. Header: res.Header,
  5138. HTTPStatusCode: res.StatusCode,
  5139. },
  5140. }
  5141. target := &ret
  5142. if err := gensupport.DecodeResponse(target, res); err != nil {
  5143. return nil, err
  5144. }
  5145. return ret, nil
  5146. // {
  5147. // "description": "Lists the domain mappings on an application.",
  5148. // "flatPath": "v1beta/apps/{appsId}/domainMappings",
  5149. // "httpMethod": "GET",
  5150. // "id": "appengine.apps.domainMappings.list",
  5151. // "parameterOrder": [
  5152. // "appsId"
  5153. // ],
  5154. // "parameters": {
  5155. // "appsId": {
  5156. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  5157. // "location": "path",
  5158. // "required": true,
  5159. // "type": "string"
  5160. // },
  5161. // "pageSize": {
  5162. // "description": "Maximum results to return per page.",
  5163. // "format": "int32",
  5164. // "location": "query",
  5165. // "type": "integer"
  5166. // },
  5167. // "pageToken": {
  5168. // "description": "Continuation token for fetching the next page of results.",
  5169. // "location": "query",
  5170. // "type": "string"
  5171. // }
  5172. // },
  5173. // "path": "v1beta/apps/{appsId}/domainMappings",
  5174. // "response": {
  5175. // "$ref": "ListDomainMappingsResponse"
  5176. // },
  5177. // "scopes": [
  5178. // "https://www.googleapis.com/auth/appengine.admin",
  5179. // "https://www.googleapis.com/auth/cloud-platform",
  5180. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5181. // ]
  5182. // }
  5183. }
  5184. // Pages invokes f for each page of results.
  5185. // A non-nil error returned from f will halt the iteration.
  5186. // The provided context supersedes any context provided to the Context method.
  5187. func (c *AppsDomainMappingsListCall) Pages(ctx context.Context, f func(*ListDomainMappingsResponse) error) error {
  5188. c.ctx_ = ctx
  5189. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5190. for {
  5191. x, err := c.Do()
  5192. if err != nil {
  5193. return err
  5194. }
  5195. if err := f(x); err != nil {
  5196. return err
  5197. }
  5198. if x.NextPageToken == "" {
  5199. return nil
  5200. }
  5201. c.PageToken(x.NextPageToken)
  5202. }
  5203. }
  5204. // method id "appengine.apps.domainMappings.patch":
  5205. type AppsDomainMappingsPatchCall struct {
  5206. s *APIService
  5207. appsId string
  5208. domainMappingsId string
  5209. domainmapping *DomainMapping
  5210. urlParams_ gensupport.URLParams
  5211. ctx_ context.Context
  5212. header_ http.Header
  5213. }
  5214. // Patch: Updates the specified domain mapping. To map an SSL
  5215. // certificate to a domain mapping, update certificate_id to point to an
  5216. // AuthorizedCertificate resource. A user must be authorized to
  5217. // administer the associated domain in order to update a DomainMapping
  5218. // resource.
  5219. func (r *AppsDomainMappingsService) Patch(appsId string, domainMappingsId string, domainmapping *DomainMapping) *AppsDomainMappingsPatchCall {
  5220. c := &AppsDomainMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5221. c.appsId = appsId
  5222. c.domainMappingsId = domainMappingsId
  5223. c.domainmapping = domainmapping
  5224. return c
  5225. }
  5226. // UpdateMask sets the optional parameter "updateMask": Standard field
  5227. // mask for the set of fields to be updated.
  5228. func (c *AppsDomainMappingsPatchCall) UpdateMask(updateMask string) *AppsDomainMappingsPatchCall {
  5229. c.urlParams_.Set("updateMask", updateMask)
  5230. return c
  5231. }
  5232. // Fields allows partial responses to be retrieved. See
  5233. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5234. // for more information.
  5235. func (c *AppsDomainMappingsPatchCall) Fields(s ...googleapi.Field) *AppsDomainMappingsPatchCall {
  5236. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5237. return c
  5238. }
  5239. // Context sets the context to be used in this call's Do method. Any
  5240. // pending HTTP request will be aborted if the provided context is
  5241. // canceled.
  5242. func (c *AppsDomainMappingsPatchCall) Context(ctx context.Context) *AppsDomainMappingsPatchCall {
  5243. c.ctx_ = ctx
  5244. return c
  5245. }
  5246. // Header returns an http.Header that can be modified by the caller to
  5247. // add HTTP headers to the request.
  5248. func (c *AppsDomainMappingsPatchCall) Header() http.Header {
  5249. if c.header_ == nil {
  5250. c.header_ = make(http.Header)
  5251. }
  5252. return c.header_
  5253. }
  5254. func (c *AppsDomainMappingsPatchCall) doRequest(alt string) (*http.Response, error) {
  5255. reqHeaders := make(http.Header)
  5256. for k, v := range c.header_ {
  5257. reqHeaders[k] = v
  5258. }
  5259. reqHeaders.Set("User-Agent", c.s.userAgent())
  5260. var body io.Reader = nil
  5261. body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping)
  5262. if err != nil {
  5263. return nil, err
  5264. }
  5265. reqHeaders.Set("Content-Type", "application/json")
  5266. c.urlParams_.Set("alt", alt)
  5267. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}")
  5268. urls += "?" + c.urlParams_.Encode()
  5269. req, _ := http.NewRequest("PATCH", urls, body)
  5270. req.Header = reqHeaders
  5271. googleapi.Expand(req.URL, map[string]string{
  5272. "appsId": c.appsId,
  5273. "domainMappingsId": c.domainMappingsId,
  5274. })
  5275. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5276. }
  5277. // Do executes the "appengine.apps.domainMappings.patch" call.
  5278. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5279. // status code is an error. Response headers are in either
  5280. // *Operation.ServerResponse.Header or (if a response was returned at
  5281. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5282. // to check whether the returned error was because
  5283. // http.StatusNotModified was returned.
  5284. func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5285. gensupport.SetOptions(c.urlParams_, opts...)
  5286. res, err := c.doRequest("json")
  5287. if res != nil && res.StatusCode == http.StatusNotModified {
  5288. if res.Body != nil {
  5289. res.Body.Close()
  5290. }
  5291. return nil, &googleapi.Error{
  5292. Code: res.StatusCode,
  5293. Header: res.Header,
  5294. }
  5295. }
  5296. if err != nil {
  5297. return nil, err
  5298. }
  5299. defer googleapi.CloseBody(res)
  5300. if err := googleapi.CheckResponse(res); err != nil {
  5301. return nil, err
  5302. }
  5303. ret := &Operation{
  5304. ServerResponse: googleapi.ServerResponse{
  5305. Header: res.Header,
  5306. HTTPStatusCode: res.StatusCode,
  5307. },
  5308. }
  5309. target := &ret
  5310. if err := gensupport.DecodeResponse(target, res); err != nil {
  5311. return nil, err
  5312. }
  5313. return ret, nil
  5314. // {
  5315. // "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.",
  5316. // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  5317. // "httpMethod": "PATCH",
  5318. // "id": "appengine.apps.domainMappings.patch",
  5319. // "parameterOrder": [
  5320. // "appsId",
  5321. // "domainMappingsId"
  5322. // ],
  5323. // "parameters": {
  5324. // "appsId": {
  5325. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.",
  5326. // "location": "path",
  5327. // "required": true,
  5328. // "type": "string"
  5329. // },
  5330. // "domainMappingsId": {
  5331. // "description": "Part of `name`. See documentation of `appsId`.",
  5332. // "location": "path",
  5333. // "required": true,
  5334. // "type": "string"
  5335. // },
  5336. // "updateMask": {
  5337. // "description": "Standard field mask for the set of fields to be updated.",
  5338. // "format": "google-fieldmask",
  5339. // "location": "query",
  5340. // "type": "string"
  5341. // }
  5342. // },
  5343. // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}",
  5344. // "request": {
  5345. // "$ref": "DomainMapping"
  5346. // },
  5347. // "response": {
  5348. // "$ref": "Operation"
  5349. // },
  5350. // "scopes": [
  5351. // "https://www.googleapis.com/auth/cloud-platform"
  5352. // ]
  5353. // }
  5354. }
  5355. // method id "appengine.apps.firewall.ingressRules.batchUpdate":
  5356. type AppsFirewallIngressRulesBatchUpdateCall struct {
  5357. s *APIService
  5358. appsId string
  5359. batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest
  5360. urlParams_ gensupport.URLParams
  5361. ctx_ context.Context
  5362. header_ http.Header
  5363. }
  5364. // BatchUpdate: Replaces the entire firewall ruleset in one bulk
  5365. // operation. This overrides and replaces the rules of an existing
  5366. // firewall with the new rules.If the final rule does not match traffic
  5367. // with the '*' wildcard IP range, then an "allow all" rule is
  5368. // explicitly added to the end of the list.
  5369. func (r *AppsFirewallIngressRulesService) BatchUpdate(appsId string, batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest) *AppsFirewallIngressRulesBatchUpdateCall {
  5370. c := &AppsFirewallIngressRulesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5371. c.appsId = appsId
  5372. c.batchupdateingressrulesrequest = batchupdateingressrulesrequest
  5373. return c
  5374. }
  5375. // Fields allows partial responses to be retrieved. See
  5376. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5377. // for more information.
  5378. func (c *AppsFirewallIngressRulesBatchUpdateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesBatchUpdateCall {
  5379. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5380. return c
  5381. }
  5382. // Context sets the context to be used in this call's Do method. Any
  5383. // pending HTTP request will be aborted if the provided context is
  5384. // canceled.
  5385. func (c *AppsFirewallIngressRulesBatchUpdateCall) Context(ctx context.Context) *AppsFirewallIngressRulesBatchUpdateCall {
  5386. c.ctx_ = ctx
  5387. return c
  5388. }
  5389. // Header returns an http.Header that can be modified by the caller to
  5390. // add HTTP headers to the request.
  5391. func (c *AppsFirewallIngressRulesBatchUpdateCall) Header() http.Header {
  5392. if c.header_ == nil {
  5393. c.header_ = make(http.Header)
  5394. }
  5395. return c.header_
  5396. }
  5397. func (c *AppsFirewallIngressRulesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  5398. reqHeaders := make(http.Header)
  5399. for k, v := range c.header_ {
  5400. reqHeaders[k] = v
  5401. }
  5402. reqHeaders.Set("User-Agent", c.s.userAgent())
  5403. var body io.Reader = nil
  5404. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdateingressrulesrequest)
  5405. if err != nil {
  5406. return nil, err
  5407. }
  5408. reqHeaders.Set("Content-Type", "application/json")
  5409. c.urlParams_.Set("alt", alt)
  5410. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate")
  5411. urls += "?" + c.urlParams_.Encode()
  5412. req, _ := http.NewRequest("POST", urls, body)
  5413. req.Header = reqHeaders
  5414. googleapi.Expand(req.URL, map[string]string{
  5415. "appsId": c.appsId,
  5416. })
  5417. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5418. }
  5419. // Do executes the "appengine.apps.firewall.ingressRules.batchUpdate" call.
  5420. // Exactly one of *BatchUpdateIngressRulesResponse or error will be
  5421. // non-nil. Any non-2xx status code is an error. Response headers are in
  5422. // either *BatchUpdateIngressRulesResponse.ServerResponse.Header or (if
  5423. // a response was returned at all) in error.(*googleapi.Error).Header.
  5424. // Use googleapi.IsNotModified to check whether the returned error was
  5425. // because http.StatusNotModified was returned.
  5426. func (c *AppsFirewallIngressRulesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateIngressRulesResponse, error) {
  5427. gensupport.SetOptions(c.urlParams_, opts...)
  5428. res, err := c.doRequest("json")
  5429. if res != nil && res.StatusCode == http.StatusNotModified {
  5430. if res.Body != nil {
  5431. res.Body.Close()
  5432. }
  5433. return nil, &googleapi.Error{
  5434. Code: res.StatusCode,
  5435. Header: res.Header,
  5436. }
  5437. }
  5438. if err != nil {
  5439. return nil, err
  5440. }
  5441. defer googleapi.CloseBody(res)
  5442. if err := googleapi.CheckResponse(res); err != nil {
  5443. return nil, err
  5444. }
  5445. ret := &BatchUpdateIngressRulesResponse{
  5446. ServerResponse: googleapi.ServerResponse{
  5447. Header: res.Header,
  5448. HTTPStatusCode: res.StatusCode,
  5449. },
  5450. }
  5451. target := &ret
  5452. if err := gensupport.DecodeResponse(target, res); err != nil {
  5453. return nil, err
  5454. }
  5455. return ret, nil
  5456. // {
  5457. // "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.",
  5458. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate",
  5459. // "httpMethod": "POST",
  5460. // "id": "appengine.apps.firewall.ingressRules.batchUpdate",
  5461. // "parameterOrder": [
  5462. // "appsId"
  5463. // ],
  5464. // "parameters": {
  5465. // "appsId": {
  5466. // "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.",
  5467. // "location": "path",
  5468. // "required": true,
  5469. // "type": "string"
  5470. // }
  5471. // },
  5472. // "path": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate",
  5473. // "request": {
  5474. // "$ref": "BatchUpdateIngressRulesRequest"
  5475. // },
  5476. // "response": {
  5477. // "$ref": "BatchUpdateIngressRulesResponse"
  5478. // },
  5479. // "scopes": [
  5480. // "https://www.googleapis.com/auth/cloud-platform"
  5481. // ]
  5482. // }
  5483. }
  5484. // method id "appengine.apps.firewall.ingressRules.create":
  5485. type AppsFirewallIngressRulesCreateCall struct {
  5486. s *APIService
  5487. appsId string
  5488. firewallrule *FirewallRule
  5489. urlParams_ gensupport.URLParams
  5490. ctx_ context.Context
  5491. header_ http.Header
  5492. }
  5493. // Create: Creates a firewall rule for the application.
  5494. func (r *AppsFirewallIngressRulesService) Create(appsId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesCreateCall {
  5495. c := &AppsFirewallIngressRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5496. c.appsId = appsId
  5497. c.firewallrule = firewallrule
  5498. return c
  5499. }
  5500. // Fields allows partial responses to be retrieved. See
  5501. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5502. // for more information.
  5503. func (c *AppsFirewallIngressRulesCreateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesCreateCall {
  5504. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5505. return c
  5506. }
  5507. // Context sets the context to be used in this call's Do method. Any
  5508. // pending HTTP request will be aborted if the provided context is
  5509. // canceled.
  5510. func (c *AppsFirewallIngressRulesCreateCall) Context(ctx context.Context) *AppsFirewallIngressRulesCreateCall {
  5511. c.ctx_ = ctx
  5512. return c
  5513. }
  5514. // Header returns an http.Header that can be modified by the caller to
  5515. // add HTTP headers to the request.
  5516. func (c *AppsFirewallIngressRulesCreateCall) Header() http.Header {
  5517. if c.header_ == nil {
  5518. c.header_ = make(http.Header)
  5519. }
  5520. return c.header_
  5521. }
  5522. func (c *AppsFirewallIngressRulesCreateCall) doRequest(alt string) (*http.Response, error) {
  5523. reqHeaders := make(http.Header)
  5524. for k, v := range c.header_ {
  5525. reqHeaders[k] = v
  5526. }
  5527. reqHeaders.Set("User-Agent", c.s.userAgent())
  5528. var body io.Reader = nil
  5529. body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule)
  5530. if err != nil {
  5531. return nil, err
  5532. }
  5533. reqHeaders.Set("Content-Type", "application/json")
  5534. c.urlParams_.Set("alt", alt)
  5535. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules")
  5536. urls += "?" + c.urlParams_.Encode()
  5537. req, _ := http.NewRequest("POST", urls, body)
  5538. req.Header = reqHeaders
  5539. googleapi.Expand(req.URL, map[string]string{
  5540. "appsId": c.appsId,
  5541. })
  5542. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5543. }
  5544. // Do executes the "appengine.apps.firewall.ingressRules.create" call.
  5545. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  5546. // status code is an error. Response headers are in either
  5547. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  5548. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5549. // to check whether the returned error was because
  5550. // http.StatusNotModified was returned.
  5551. func (c *AppsFirewallIngressRulesCreateCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  5552. gensupport.SetOptions(c.urlParams_, opts...)
  5553. res, err := c.doRequest("json")
  5554. if res != nil && res.StatusCode == http.StatusNotModified {
  5555. if res.Body != nil {
  5556. res.Body.Close()
  5557. }
  5558. return nil, &googleapi.Error{
  5559. Code: res.StatusCode,
  5560. Header: res.Header,
  5561. }
  5562. }
  5563. if err != nil {
  5564. return nil, err
  5565. }
  5566. defer googleapi.CloseBody(res)
  5567. if err := googleapi.CheckResponse(res); err != nil {
  5568. return nil, err
  5569. }
  5570. ret := &FirewallRule{
  5571. ServerResponse: googleapi.ServerResponse{
  5572. Header: res.Header,
  5573. HTTPStatusCode: res.StatusCode,
  5574. },
  5575. }
  5576. target := &ret
  5577. if err := gensupport.DecodeResponse(target, res); err != nil {
  5578. return nil, err
  5579. }
  5580. return ret, nil
  5581. // {
  5582. // "description": "Creates a firewall rule for the application.",
  5583. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules",
  5584. // "httpMethod": "POST",
  5585. // "id": "appengine.apps.firewall.ingressRules.create",
  5586. // "parameterOrder": [
  5587. // "appsId"
  5588. // ],
  5589. // "parameters": {
  5590. // "appsId": {
  5591. // "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.",
  5592. // "location": "path",
  5593. // "required": true,
  5594. // "type": "string"
  5595. // }
  5596. // },
  5597. // "path": "v1beta/apps/{appsId}/firewall/ingressRules",
  5598. // "request": {
  5599. // "$ref": "FirewallRule"
  5600. // },
  5601. // "response": {
  5602. // "$ref": "FirewallRule"
  5603. // },
  5604. // "scopes": [
  5605. // "https://www.googleapis.com/auth/cloud-platform"
  5606. // ]
  5607. // }
  5608. }
  5609. // method id "appengine.apps.firewall.ingressRules.delete":
  5610. type AppsFirewallIngressRulesDeleteCall struct {
  5611. s *APIService
  5612. appsId string
  5613. ingressRulesId string
  5614. urlParams_ gensupport.URLParams
  5615. ctx_ context.Context
  5616. header_ http.Header
  5617. }
  5618. // Delete: Deletes the specified firewall rule.
  5619. func (r *AppsFirewallIngressRulesService) Delete(appsId string, ingressRulesId string) *AppsFirewallIngressRulesDeleteCall {
  5620. c := &AppsFirewallIngressRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5621. c.appsId = appsId
  5622. c.ingressRulesId = ingressRulesId
  5623. return c
  5624. }
  5625. // Fields allows partial responses to be retrieved. See
  5626. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5627. // for more information.
  5628. func (c *AppsFirewallIngressRulesDeleteCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesDeleteCall {
  5629. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5630. return c
  5631. }
  5632. // Context sets the context to be used in this call's Do method. Any
  5633. // pending HTTP request will be aborted if the provided context is
  5634. // canceled.
  5635. func (c *AppsFirewallIngressRulesDeleteCall) Context(ctx context.Context) *AppsFirewallIngressRulesDeleteCall {
  5636. c.ctx_ = ctx
  5637. return c
  5638. }
  5639. // Header returns an http.Header that can be modified by the caller to
  5640. // add HTTP headers to the request.
  5641. func (c *AppsFirewallIngressRulesDeleteCall) Header() http.Header {
  5642. if c.header_ == nil {
  5643. c.header_ = make(http.Header)
  5644. }
  5645. return c.header_
  5646. }
  5647. func (c *AppsFirewallIngressRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5648. reqHeaders := make(http.Header)
  5649. for k, v := range c.header_ {
  5650. reqHeaders[k] = v
  5651. }
  5652. reqHeaders.Set("User-Agent", c.s.userAgent())
  5653. var body io.Reader = nil
  5654. c.urlParams_.Set("alt", alt)
  5655. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  5656. urls += "?" + c.urlParams_.Encode()
  5657. req, _ := http.NewRequest("DELETE", urls, body)
  5658. req.Header = reqHeaders
  5659. googleapi.Expand(req.URL, map[string]string{
  5660. "appsId": c.appsId,
  5661. "ingressRulesId": c.ingressRulesId,
  5662. })
  5663. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5664. }
  5665. // Do executes the "appengine.apps.firewall.ingressRules.delete" call.
  5666. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5667. // code is an error. Response headers are in either
  5668. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5669. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5670. // check whether the returned error was because http.StatusNotModified
  5671. // was returned.
  5672. func (c *AppsFirewallIngressRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5673. gensupport.SetOptions(c.urlParams_, opts...)
  5674. res, err := c.doRequest("json")
  5675. if res != nil && res.StatusCode == http.StatusNotModified {
  5676. if res.Body != nil {
  5677. res.Body.Close()
  5678. }
  5679. return nil, &googleapi.Error{
  5680. Code: res.StatusCode,
  5681. Header: res.Header,
  5682. }
  5683. }
  5684. if err != nil {
  5685. return nil, err
  5686. }
  5687. defer googleapi.CloseBody(res)
  5688. if err := googleapi.CheckResponse(res); err != nil {
  5689. return nil, err
  5690. }
  5691. ret := &Empty{
  5692. ServerResponse: googleapi.ServerResponse{
  5693. Header: res.Header,
  5694. HTTPStatusCode: res.StatusCode,
  5695. },
  5696. }
  5697. target := &ret
  5698. if err := gensupport.DecodeResponse(target, res); err != nil {
  5699. return nil, err
  5700. }
  5701. return ret, nil
  5702. // {
  5703. // "description": "Deletes the specified firewall rule.",
  5704. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5705. // "httpMethod": "DELETE",
  5706. // "id": "appengine.apps.firewall.ingressRules.delete",
  5707. // "parameterOrder": [
  5708. // "appsId",
  5709. // "ingressRulesId"
  5710. // ],
  5711. // "parameters": {
  5712. // "appsId": {
  5713. // "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.",
  5714. // "location": "path",
  5715. // "required": true,
  5716. // "type": "string"
  5717. // },
  5718. // "ingressRulesId": {
  5719. // "description": "Part of `name`. See documentation of `appsId`.",
  5720. // "location": "path",
  5721. // "required": true,
  5722. // "type": "string"
  5723. // }
  5724. // },
  5725. // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5726. // "response": {
  5727. // "$ref": "Empty"
  5728. // },
  5729. // "scopes": [
  5730. // "https://www.googleapis.com/auth/cloud-platform"
  5731. // ]
  5732. // }
  5733. }
  5734. // method id "appengine.apps.firewall.ingressRules.get":
  5735. type AppsFirewallIngressRulesGetCall struct {
  5736. s *APIService
  5737. appsId string
  5738. ingressRulesId string
  5739. urlParams_ gensupport.URLParams
  5740. ifNoneMatch_ string
  5741. ctx_ context.Context
  5742. header_ http.Header
  5743. }
  5744. // Get: Gets the specified firewall rule.
  5745. func (r *AppsFirewallIngressRulesService) Get(appsId string, ingressRulesId string) *AppsFirewallIngressRulesGetCall {
  5746. c := &AppsFirewallIngressRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5747. c.appsId = appsId
  5748. c.ingressRulesId = ingressRulesId
  5749. return c
  5750. }
  5751. // Fields allows partial responses to be retrieved. See
  5752. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5753. // for more information.
  5754. func (c *AppsFirewallIngressRulesGetCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesGetCall {
  5755. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5756. return c
  5757. }
  5758. // IfNoneMatch sets the optional parameter which makes the operation
  5759. // fail if the object's ETag matches the given value. This is useful for
  5760. // getting updates only after the object has changed since the last
  5761. // request. Use googleapi.IsNotModified to check whether the response
  5762. // error from Do is the result of In-None-Match.
  5763. func (c *AppsFirewallIngressRulesGetCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesGetCall {
  5764. c.ifNoneMatch_ = entityTag
  5765. return c
  5766. }
  5767. // Context sets the context to be used in this call's Do method. Any
  5768. // pending HTTP request will be aborted if the provided context is
  5769. // canceled.
  5770. func (c *AppsFirewallIngressRulesGetCall) Context(ctx context.Context) *AppsFirewallIngressRulesGetCall {
  5771. c.ctx_ = ctx
  5772. return c
  5773. }
  5774. // Header returns an http.Header that can be modified by the caller to
  5775. // add HTTP headers to the request.
  5776. func (c *AppsFirewallIngressRulesGetCall) Header() http.Header {
  5777. if c.header_ == nil {
  5778. c.header_ = make(http.Header)
  5779. }
  5780. return c.header_
  5781. }
  5782. func (c *AppsFirewallIngressRulesGetCall) doRequest(alt string) (*http.Response, error) {
  5783. reqHeaders := make(http.Header)
  5784. for k, v := range c.header_ {
  5785. reqHeaders[k] = v
  5786. }
  5787. reqHeaders.Set("User-Agent", c.s.userAgent())
  5788. if c.ifNoneMatch_ != "" {
  5789. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5790. }
  5791. var body io.Reader = nil
  5792. c.urlParams_.Set("alt", alt)
  5793. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  5794. urls += "?" + c.urlParams_.Encode()
  5795. req, _ := http.NewRequest("GET", urls, body)
  5796. req.Header = reqHeaders
  5797. googleapi.Expand(req.URL, map[string]string{
  5798. "appsId": c.appsId,
  5799. "ingressRulesId": c.ingressRulesId,
  5800. })
  5801. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5802. }
  5803. // Do executes the "appengine.apps.firewall.ingressRules.get" call.
  5804. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  5805. // status code is an error. Response headers are in either
  5806. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  5807. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5808. // to check whether the returned error was because
  5809. // http.StatusNotModified was returned.
  5810. func (c *AppsFirewallIngressRulesGetCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  5811. gensupport.SetOptions(c.urlParams_, opts...)
  5812. res, err := c.doRequest("json")
  5813. if res != nil && res.StatusCode == http.StatusNotModified {
  5814. if res.Body != nil {
  5815. res.Body.Close()
  5816. }
  5817. return nil, &googleapi.Error{
  5818. Code: res.StatusCode,
  5819. Header: res.Header,
  5820. }
  5821. }
  5822. if err != nil {
  5823. return nil, err
  5824. }
  5825. defer googleapi.CloseBody(res)
  5826. if err := googleapi.CheckResponse(res); err != nil {
  5827. return nil, err
  5828. }
  5829. ret := &FirewallRule{
  5830. ServerResponse: googleapi.ServerResponse{
  5831. Header: res.Header,
  5832. HTTPStatusCode: res.StatusCode,
  5833. },
  5834. }
  5835. target := &ret
  5836. if err := gensupport.DecodeResponse(target, res); err != nil {
  5837. return nil, err
  5838. }
  5839. return ret, nil
  5840. // {
  5841. // "description": "Gets the specified firewall rule.",
  5842. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5843. // "httpMethod": "GET",
  5844. // "id": "appengine.apps.firewall.ingressRules.get",
  5845. // "parameterOrder": [
  5846. // "appsId",
  5847. // "ingressRulesId"
  5848. // ],
  5849. // "parameters": {
  5850. // "appsId": {
  5851. // "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.",
  5852. // "location": "path",
  5853. // "required": true,
  5854. // "type": "string"
  5855. // },
  5856. // "ingressRulesId": {
  5857. // "description": "Part of `name`. See documentation of `appsId`.",
  5858. // "location": "path",
  5859. // "required": true,
  5860. // "type": "string"
  5861. // }
  5862. // },
  5863. // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  5864. // "response": {
  5865. // "$ref": "FirewallRule"
  5866. // },
  5867. // "scopes": [
  5868. // "https://www.googleapis.com/auth/appengine.admin",
  5869. // "https://www.googleapis.com/auth/cloud-platform",
  5870. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  5871. // ]
  5872. // }
  5873. }
  5874. // method id "appengine.apps.firewall.ingressRules.list":
  5875. type AppsFirewallIngressRulesListCall struct {
  5876. s *APIService
  5877. appsId string
  5878. urlParams_ gensupport.URLParams
  5879. ifNoneMatch_ string
  5880. ctx_ context.Context
  5881. header_ http.Header
  5882. }
  5883. // List: Lists the firewall rules of an application.
  5884. func (r *AppsFirewallIngressRulesService) List(appsId string) *AppsFirewallIngressRulesListCall {
  5885. c := &AppsFirewallIngressRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5886. c.appsId = appsId
  5887. return c
  5888. }
  5889. // MatchingAddress sets the optional parameter "matchingAddress": A
  5890. // valid IP Address. If set, only rules matching this address will be
  5891. // returned. The first returned rule will be the rule that fires on
  5892. // requests from this IP.
  5893. func (c *AppsFirewallIngressRulesListCall) MatchingAddress(matchingAddress string) *AppsFirewallIngressRulesListCall {
  5894. c.urlParams_.Set("matchingAddress", matchingAddress)
  5895. return c
  5896. }
  5897. // PageSize sets the optional parameter "pageSize": Maximum results to
  5898. // return per page.
  5899. func (c *AppsFirewallIngressRulesListCall) PageSize(pageSize int64) *AppsFirewallIngressRulesListCall {
  5900. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5901. return c
  5902. }
  5903. // PageToken sets the optional parameter "pageToken": Continuation token
  5904. // for fetching the next page of results.
  5905. func (c *AppsFirewallIngressRulesListCall) PageToken(pageToken string) *AppsFirewallIngressRulesListCall {
  5906. c.urlParams_.Set("pageToken", pageToken)
  5907. return c
  5908. }
  5909. // Fields allows partial responses to be retrieved. See
  5910. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5911. // for more information.
  5912. func (c *AppsFirewallIngressRulesListCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesListCall {
  5913. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5914. return c
  5915. }
  5916. // IfNoneMatch sets the optional parameter which makes the operation
  5917. // fail if the object's ETag matches the given value. This is useful for
  5918. // getting updates only after the object has changed since the last
  5919. // request. Use googleapi.IsNotModified to check whether the response
  5920. // error from Do is the result of In-None-Match.
  5921. func (c *AppsFirewallIngressRulesListCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesListCall {
  5922. c.ifNoneMatch_ = entityTag
  5923. return c
  5924. }
  5925. // Context sets the context to be used in this call's Do method. Any
  5926. // pending HTTP request will be aborted if the provided context is
  5927. // canceled.
  5928. func (c *AppsFirewallIngressRulesListCall) Context(ctx context.Context) *AppsFirewallIngressRulesListCall {
  5929. c.ctx_ = ctx
  5930. return c
  5931. }
  5932. // Header returns an http.Header that can be modified by the caller to
  5933. // add HTTP headers to the request.
  5934. func (c *AppsFirewallIngressRulesListCall) Header() http.Header {
  5935. if c.header_ == nil {
  5936. c.header_ = make(http.Header)
  5937. }
  5938. return c.header_
  5939. }
  5940. func (c *AppsFirewallIngressRulesListCall) doRequest(alt string) (*http.Response, error) {
  5941. reqHeaders := make(http.Header)
  5942. for k, v := range c.header_ {
  5943. reqHeaders[k] = v
  5944. }
  5945. reqHeaders.Set("User-Agent", c.s.userAgent())
  5946. if c.ifNoneMatch_ != "" {
  5947. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5948. }
  5949. var body io.Reader = nil
  5950. c.urlParams_.Set("alt", alt)
  5951. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules")
  5952. urls += "?" + c.urlParams_.Encode()
  5953. req, _ := http.NewRequest("GET", urls, body)
  5954. req.Header = reqHeaders
  5955. googleapi.Expand(req.URL, map[string]string{
  5956. "appsId": c.appsId,
  5957. })
  5958. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5959. }
  5960. // Do executes the "appengine.apps.firewall.ingressRules.list" call.
  5961. // Exactly one of *ListIngressRulesResponse or error will be non-nil.
  5962. // Any non-2xx status code is an error. Response headers are in either
  5963. // *ListIngressRulesResponse.ServerResponse.Header or (if a response was
  5964. // returned at all) in error.(*googleapi.Error).Header. Use
  5965. // googleapi.IsNotModified to check whether the returned error was
  5966. // because http.StatusNotModified was returned.
  5967. func (c *AppsFirewallIngressRulesListCall) Do(opts ...googleapi.CallOption) (*ListIngressRulesResponse, error) {
  5968. gensupport.SetOptions(c.urlParams_, opts...)
  5969. res, err := c.doRequest("json")
  5970. if res != nil && res.StatusCode == http.StatusNotModified {
  5971. if res.Body != nil {
  5972. res.Body.Close()
  5973. }
  5974. return nil, &googleapi.Error{
  5975. Code: res.StatusCode,
  5976. Header: res.Header,
  5977. }
  5978. }
  5979. if err != nil {
  5980. return nil, err
  5981. }
  5982. defer googleapi.CloseBody(res)
  5983. if err := googleapi.CheckResponse(res); err != nil {
  5984. return nil, err
  5985. }
  5986. ret := &ListIngressRulesResponse{
  5987. ServerResponse: googleapi.ServerResponse{
  5988. Header: res.Header,
  5989. HTTPStatusCode: res.StatusCode,
  5990. },
  5991. }
  5992. target := &ret
  5993. if err := gensupport.DecodeResponse(target, res); err != nil {
  5994. return nil, err
  5995. }
  5996. return ret, nil
  5997. // {
  5998. // "description": "Lists the firewall rules of an application.",
  5999. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules",
  6000. // "httpMethod": "GET",
  6001. // "id": "appengine.apps.firewall.ingressRules.list",
  6002. // "parameterOrder": [
  6003. // "appsId"
  6004. // ],
  6005. // "parameters": {
  6006. // "appsId": {
  6007. // "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.",
  6008. // "location": "path",
  6009. // "required": true,
  6010. // "type": "string"
  6011. // },
  6012. // "matchingAddress": {
  6013. // "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.",
  6014. // "location": "query",
  6015. // "type": "string"
  6016. // },
  6017. // "pageSize": {
  6018. // "description": "Maximum results to return per page.",
  6019. // "format": "int32",
  6020. // "location": "query",
  6021. // "type": "integer"
  6022. // },
  6023. // "pageToken": {
  6024. // "description": "Continuation token for fetching the next page of results.",
  6025. // "location": "query",
  6026. // "type": "string"
  6027. // }
  6028. // },
  6029. // "path": "v1beta/apps/{appsId}/firewall/ingressRules",
  6030. // "response": {
  6031. // "$ref": "ListIngressRulesResponse"
  6032. // },
  6033. // "scopes": [
  6034. // "https://www.googleapis.com/auth/appengine.admin",
  6035. // "https://www.googleapis.com/auth/cloud-platform",
  6036. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6037. // ]
  6038. // }
  6039. }
  6040. // Pages invokes f for each page of results.
  6041. // A non-nil error returned from f will halt the iteration.
  6042. // The provided context supersedes any context provided to the Context method.
  6043. func (c *AppsFirewallIngressRulesListCall) Pages(ctx context.Context, f func(*ListIngressRulesResponse) error) error {
  6044. c.ctx_ = ctx
  6045. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6046. for {
  6047. x, err := c.Do()
  6048. if err != nil {
  6049. return err
  6050. }
  6051. if err := f(x); err != nil {
  6052. return err
  6053. }
  6054. if x.NextPageToken == "" {
  6055. return nil
  6056. }
  6057. c.PageToken(x.NextPageToken)
  6058. }
  6059. }
  6060. // method id "appengine.apps.firewall.ingressRules.patch":
  6061. type AppsFirewallIngressRulesPatchCall struct {
  6062. s *APIService
  6063. appsId string
  6064. ingressRulesId string
  6065. firewallrule *FirewallRule
  6066. urlParams_ gensupport.URLParams
  6067. ctx_ context.Context
  6068. header_ http.Header
  6069. }
  6070. // Patch: Updates the specified firewall rule.
  6071. func (r *AppsFirewallIngressRulesService) Patch(appsId string, ingressRulesId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesPatchCall {
  6072. c := &AppsFirewallIngressRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6073. c.appsId = appsId
  6074. c.ingressRulesId = ingressRulesId
  6075. c.firewallrule = firewallrule
  6076. return c
  6077. }
  6078. // UpdateMask sets the optional parameter "updateMask": Standard field
  6079. // mask for the set of fields to be updated.
  6080. func (c *AppsFirewallIngressRulesPatchCall) UpdateMask(updateMask string) *AppsFirewallIngressRulesPatchCall {
  6081. c.urlParams_.Set("updateMask", updateMask)
  6082. return c
  6083. }
  6084. // Fields allows partial responses to be retrieved. See
  6085. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6086. // for more information.
  6087. func (c *AppsFirewallIngressRulesPatchCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesPatchCall {
  6088. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6089. return c
  6090. }
  6091. // Context sets the context to be used in this call's Do method. Any
  6092. // pending HTTP request will be aborted if the provided context is
  6093. // canceled.
  6094. func (c *AppsFirewallIngressRulesPatchCall) Context(ctx context.Context) *AppsFirewallIngressRulesPatchCall {
  6095. c.ctx_ = ctx
  6096. return c
  6097. }
  6098. // Header returns an http.Header that can be modified by the caller to
  6099. // add HTTP headers to the request.
  6100. func (c *AppsFirewallIngressRulesPatchCall) Header() http.Header {
  6101. if c.header_ == nil {
  6102. c.header_ = make(http.Header)
  6103. }
  6104. return c.header_
  6105. }
  6106. func (c *AppsFirewallIngressRulesPatchCall) doRequest(alt string) (*http.Response, error) {
  6107. reqHeaders := make(http.Header)
  6108. for k, v := range c.header_ {
  6109. reqHeaders[k] = v
  6110. }
  6111. reqHeaders.Set("User-Agent", c.s.userAgent())
  6112. var body io.Reader = nil
  6113. body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule)
  6114. if err != nil {
  6115. return nil, err
  6116. }
  6117. reqHeaders.Set("Content-Type", "application/json")
  6118. c.urlParams_.Set("alt", alt)
  6119. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}")
  6120. urls += "?" + c.urlParams_.Encode()
  6121. req, _ := http.NewRequest("PATCH", urls, body)
  6122. req.Header = reqHeaders
  6123. googleapi.Expand(req.URL, map[string]string{
  6124. "appsId": c.appsId,
  6125. "ingressRulesId": c.ingressRulesId,
  6126. })
  6127. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6128. }
  6129. // Do executes the "appengine.apps.firewall.ingressRules.patch" call.
  6130. // Exactly one of *FirewallRule or error will be non-nil. Any non-2xx
  6131. // status code is an error. Response headers are in either
  6132. // *FirewallRule.ServerResponse.Header or (if a response was returned at
  6133. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6134. // to check whether the returned error was because
  6135. // http.StatusNotModified was returned.
  6136. func (c *AppsFirewallIngressRulesPatchCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) {
  6137. gensupport.SetOptions(c.urlParams_, opts...)
  6138. res, err := c.doRequest("json")
  6139. if res != nil && res.StatusCode == http.StatusNotModified {
  6140. if res.Body != nil {
  6141. res.Body.Close()
  6142. }
  6143. return nil, &googleapi.Error{
  6144. Code: res.StatusCode,
  6145. Header: res.Header,
  6146. }
  6147. }
  6148. if err != nil {
  6149. return nil, err
  6150. }
  6151. defer googleapi.CloseBody(res)
  6152. if err := googleapi.CheckResponse(res); err != nil {
  6153. return nil, err
  6154. }
  6155. ret := &FirewallRule{
  6156. ServerResponse: googleapi.ServerResponse{
  6157. Header: res.Header,
  6158. HTTPStatusCode: res.StatusCode,
  6159. },
  6160. }
  6161. target := &ret
  6162. if err := gensupport.DecodeResponse(target, res); err != nil {
  6163. return nil, err
  6164. }
  6165. return ret, nil
  6166. // {
  6167. // "description": "Updates the specified firewall rule.",
  6168. // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  6169. // "httpMethod": "PATCH",
  6170. // "id": "appengine.apps.firewall.ingressRules.patch",
  6171. // "parameterOrder": [
  6172. // "appsId",
  6173. // "ingressRulesId"
  6174. // ],
  6175. // "parameters": {
  6176. // "appsId": {
  6177. // "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.",
  6178. // "location": "path",
  6179. // "required": true,
  6180. // "type": "string"
  6181. // },
  6182. // "ingressRulesId": {
  6183. // "description": "Part of `name`. See documentation of `appsId`.",
  6184. // "location": "path",
  6185. // "required": true,
  6186. // "type": "string"
  6187. // },
  6188. // "updateMask": {
  6189. // "description": "Standard field mask for the set of fields to be updated.",
  6190. // "format": "google-fieldmask",
  6191. // "location": "query",
  6192. // "type": "string"
  6193. // }
  6194. // },
  6195. // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}",
  6196. // "request": {
  6197. // "$ref": "FirewallRule"
  6198. // },
  6199. // "response": {
  6200. // "$ref": "FirewallRule"
  6201. // },
  6202. // "scopes": [
  6203. // "https://www.googleapis.com/auth/cloud-platform"
  6204. // ]
  6205. // }
  6206. }
  6207. // method id "appengine.apps.locations.get":
  6208. type AppsLocationsGetCall struct {
  6209. s *APIService
  6210. appsId string
  6211. locationsId string
  6212. urlParams_ gensupport.URLParams
  6213. ifNoneMatch_ string
  6214. ctx_ context.Context
  6215. header_ http.Header
  6216. }
  6217. // Get: Gets information about a location.
  6218. func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall {
  6219. c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6220. c.appsId = appsId
  6221. c.locationsId = locationsId
  6222. return c
  6223. }
  6224. // Fields allows partial responses to be retrieved. See
  6225. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6226. // for more information.
  6227. func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall {
  6228. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6229. return c
  6230. }
  6231. // IfNoneMatch sets the optional parameter which makes the operation
  6232. // fail if the object's ETag matches the given value. This is useful for
  6233. // getting updates only after the object has changed since the last
  6234. // request. Use googleapi.IsNotModified to check whether the response
  6235. // error from Do is the result of In-None-Match.
  6236. func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall {
  6237. c.ifNoneMatch_ = entityTag
  6238. return c
  6239. }
  6240. // Context sets the context to be used in this call's Do method. Any
  6241. // pending HTTP request will be aborted if the provided context is
  6242. // canceled.
  6243. func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall {
  6244. c.ctx_ = ctx
  6245. return c
  6246. }
  6247. // Header returns an http.Header that can be modified by the caller to
  6248. // add HTTP headers to the request.
  6249. func (c *AppsLocationsGetCall) Header() http.Header {
  6250. if c.header_ == nil {
  6251. c.header_ = make(http.Header)
  6252. }
  6253. return c.header_
  6254. }
  6255. func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  6256. reqHeaders := make(http.Header)
  6257. for k, v := range c.header_ {
  6258. reqHeaders[k] = v
  6259. }
  6260. reqHeaders.Set("User-Agent", c.s.userAgent())
  6261. if c.ifNoneMatch_ != "" {
  6262. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6263. }
  6264. var body io.Reader = nil
  6265. c.urlParams_.Set("alt", alt)
  6266. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/locations/{locationsId}")
  6267. urls += "?" + c.urlParams_.Encode()
  6268. req, _ := http.NewRequest("GET", urls, body)
  6269. req.Header = reqHeaders
  6270. googleapi.Expand(req.URL, map[string]string{
  6271. "appsId": c.appsId,
  6272. "locationsId": c.locationsId,
  6273. })
  6274. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6275. }
  6276. // Do executes the "appengine.apps.locations.get" call.
  6277. // Exactly one of *Location or error will be non-nil. Any non-2xx status
  6278. // code is an error. Response headers are in either
  6279. // *Location.ServerResponse.Header or (if a response was returned at
  6280. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6281. // to check whether the returned error was because
  6282. // http.StatusNotModified was returned.
  6283. func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  6284. gensupport.SetOptions(c.urlParams_, opts...)
  6285. res, err := c.doRequest("json")
  6286. if res != nil && res.StatusCode == http.StatusNotModified {
  6287. if res.Body != nil {
  6288. res.Body.Close()
  6289. }
  6290. return nil, &googleapi.Error{
  6291. Code: res.StatusCode,
  6292. Header: res.Header,
  6293. }
  6294. }
  6295. if err != nil {
  6296. return nil, err
  6297. }
  6298. defer googleapi.CloseBody(res)
  6299. if err := googleapi.CheckResponse(res); err != nil {
  6300. return nil, err
  6301. }
  6302. ret := &Location{
  6303. ServerResponse: googleapi.ServerResponse{
  6304. Header: res.Header,
  6305. HTTPStatusCode: res.StatusCode,
  6306. },
  6307. }
  6308. target := &ret
  6309. if err := gensupport.DecodeResponse(target, res); err != nil {
  6310. return nil, err
  6311. }
  6312. return ret, nil
  6313. // {
  6314. // "description": "Gets information about a location.",
  6315. // "flatPath": "v1beta/apps/{appsId}/locations/{locationsId}",
  6316. // "httpMethod": "GET",
  6317. // "id": "appengine.apps.locations.get",
  6318. // "parameterOrder": [
  6319. // "appsId",
  6320. // "locationsId"
  6321. // ],
  6322. // "parameters": {
  6323. // "appsId": {
  6324. // "description": "Part of `name`. Resource name for the location.",
  6325. // "location": "path",
  6326. // "required": true,
  6327. // "type": "string"
  6328. // },
  6329. // "locationsId": {
  6330. // "description": "Part of `name`. See documentation of `appsId`.",
  6331. // "location": "path",
  6332. // "required": true,
  6333. // "type": "string"
  6334. // }
  6335. // },
  6336. // "path": "v1beta/apps/{appsId}/locations/{locationsId}",
  6337. // "response": {
  6338. // "$ref": "Location"
  6339. // },
  6340. // "scopes": [
  6341. // "https://www.googleapis.com/auth/appengine.admin",
  6342. // "https://www.googleapis.com/auth/cloud-platform",
  6343. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6344. // ]
  6345. // }
  6346. }
  6347. // method id "appengine.apps.locations.list":
  6348. type AppsLocationsListCall struct {
  6349. s *APIService
  6350. appsId string
  6351. urlParams_ gensupport.URLParams
  6352. ifNoneMatch_ string
  6353. ctx_ context.Context
  6354. header_ http.Header
  6355. }
  6356. // List: Lists information about the supported locations for this
  6357. // service.
  6358. func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall {
  6359. c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6360. c.appsId = appsId
  6361. return c
  6362. }
  6363. // Filter sets the optional parameter "filter": The standard list
  6364. // filter.
  6365. func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall {
  6366. c.urlParams_.Set("filter", filter)
  6367. return c
  6368. }
  6369. // PageSize sets the optional parameter "pageSize": The standard list
  6370. // page size.
  6371. func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall {
  6372. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6373. return c
  6374. }
  6375. // PageToken sets the optional parameter "pageToken": The standard list
  6376. // page token.
  6377. func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall {
  6378. c.urlParams_.Set("pageToken", pageToken)
  6379. return c
  6380. }
  6381. // Fields allows partial responses to be retrieved. See
  6382. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6383. // for more information.
  6384. func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall {
  6385. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6386. return c
  6387. }
  6388. // IfNoneMatch sets the optional parameter which makes the operation
  6389. // fail if the object's ETag matches the given value. This is useful for
  6390. // getting updates only after the object has changed since the last
  6391. // request. Use googleapi.IsNotModified to check whether the response
  6392. // error from Do is the result of In-None-Match.
  6393. func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall {
  6394. c.ifNoneMatch_ = entityTag
  6395. return c
  6396. }
  6397. // Context sets the context to be used in this call's Do method. Any
  6398. // pending HTTP request will be aborted if the provided context is
  6399. // canceled.
  6400. func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall {
  6401. c.ctx_ = ctx
  6402. return c
  6403. }
  6404. // Header returns an http.Header that can be modified by the caller to
  6405. // add HTTP headers to the request.
  6406. func (c *AppsLocationsListCall) Header() http.Header {
  6407. if c.header_ == nil {
  6408. c.header_ = make(http.Header)
  6409. }
  6410. return c.header_
  6411. }
  6412. func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  6413. reqHeaders := make(http.Header)
  6414. for k, v := range c.header_ {
  6415. reqHeaders[k] = v
  6416. }
  6417. reqHeaders.Set("User-Agent", c.s.userAgent())
  6418. if c.ifNoneMatch_ != "" {
  6419. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6420. }
  6421. var body io.Reader = nil
  6422. c.urlParams_.Set("alt", alt)
  6423. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/locations")
  6424. urls += "?" + c.urlParams_.Encode()
  6425. req, _ := http.NewRequest("GET", urls, body)
  6426. req.Header = reqHeaders
  6427. googleapi.Expand(req.URL, map[string]string{
  6428. "appsId": c.appsId,
  6429. })
  6430. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6431. }
  6432. // Do executes the "appengine.apps.locations.list" call.
  6433. // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  6434. // non-2xx status code is an error. Response headers are in either
  6435. // *ListLocationsResponse.ServerResponse.Header or (if a response was
  6436. // returned at all) in error.(*googleapi.Error).Header. Use
  6437. // googleapi.IsNotModified to check whether the returned error was
  6438. // because http.StatusNotModified was returned.
  6439. func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  6440. gensupport.SetOptions(c.urlParams_, opts...)
  6441. res, err := c.doRequest("json")
  6442. if res != nil && res.StatusCode == http.StatusNotModified {
  6443. if res.Body != nil {
  6444. res.Body.Close()
  6445. }
  6446. return nil, &googleapi.Error{
  6447. Code: res.StatusCode,
  6448. Header: res.Header,
  6449. }
  6450. }
  6451. if err != nil {
  6452. return nil, err
  6453. }
  6454. defer googleapi.CloseBody(res)
  6455. if err := googleapi.CheckResponse(res); err != nil {
  6456. return nil, err
  6457. }
  6458. ret := &ListLocationsResponse{
  6459. ServerResponse: googleapi.ServerResponse{
  6460. Header: res.Header,
  6461. HTTPStatusCode: res.StatusCode,
  6462. },
  6463. }
  6464. target := &ret
  6465. if err := gensupport.DecodeResponse(target, res); err != nil {
  6466. return nil, err
  6467. }
  6468. return ret, nil
  6469. // {
  6470. // "description": "Lists information about the supported locations for this service.",
  6471. // "flatPath": "v1beta/apps/{appsId}/locations",
  6472. // "httpMethod": "GET",
  6473. // "id": "appengine.apps.locations.list",
  6474. // "parameterOrder": [
  6475. // "appsId"
  6476. // ],
  6477. // "parameters": {
  6478. // "appsId": {
  6479. // "description": "Part of `name`. The resource that owns the locations collection, if applicable.",
  6480. // "location": "path",
  6481. // "required": true,
  6482. // "type": "string"
  6483. // },
  6484. // "filter": {
  6485. // "description": "The standard list filter.",
  6486. // "location": "query",
  6487. // "type": "string"
  6488. // },
  6489. // "pageSize": {
  6490. // "description": "The standard list page size.",
  6491. // "format": "int32",
  6492. // "location": "query",
  6493. // "type": "integer"
  6494. // },
  6495. // "pageToken": {
  6496. // "description": "The standard list page token.",
  6497. // "location": "query",
  6498. // "type": "string"
  6499. // }
  6500. // },
  6501. // "path": "v1beta/apps/{appsId}/locations",
  6502. // "response": {
  6503. // "$ref": "ListLocationsResponse"
  6504. // },
  6505. // "scopes": [
  6506. // "https://www.googleapis.com/auth/appengine.admin",
  6507. // "https://www.googleapis.com/auth/cloud-platform",
  6508. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6509. // ]
  6510. // }
  6511. }
  6512. // Pages invokes f for each page of results.
  6513. // A non-nil error returned from f will halt the iteration.
  6514. // The provided context supersedes any context provided to the Context method.
  6515. func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  6516. c.ctx_ = ctx
  6517. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6518. for {
  6519. x, err := c.Do()
  6520. if err != nil {
  6521. return err
  6522. }
  6523. if err := f(x); err != nil {
  6524. return err
  6525. }
  6526. if x.NextPageToken == "" {
  6527. return nil
  6528. }
  6529. c.PageToken(x.NextPageToken)
  6530. }
  6531. }
  6532. // method id "appengine.apps.operations.get":
  6533. type AppsOperationsGetCall struct {
  6534. s *APIService
  6535. appsId string
  6536. operationsId string
  6537. urlParams_ gensupport.URLParams
  6538. ifNoneMatch_ string
  6539. ctx_ context.Context
  6540. header_ http.Header
  6541. }
  6542. // Get: Gets the latest state of a long-running operation. Clients can
  6543. // use this method to poll the operation result at intervals as
  6544. // recommended by the API service.
  6545. func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall {
  6546. c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6547. c.appsId = appsId
  6548. c.operationsId = operationsId
  6549. return c
  6550. }
  6551. // Fields allows partial responses to be retrieved. See
  6552. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6553. // for more information.
  6554. func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall {
  6555. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6556. return c
  6557. }
  6558. // IfNoneMatch sets the optional parameter which makes the operation
  6559. // fail if the object's ETag matches the given value. This is useful for
  6560. // getting updates only after the object has changed since the last
  6561. // request. Use googleapi.IsNotModified to check whether the response
  6562. // error from Do is the result of In-None-Match.
  6563. func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall {
  6564. c.ifNoneMatch_ = entityTag
  6565. return c
  6566. }
  6567. // Context sets the context to be used in this call's Do method. Any
  6568. // pending HTTP request will be aborted if the provided context is
  6569. // canceled.
  6570. func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall {
  6571. c.ctx_ = ctx
  6572. return c
  6573. }
  6574. // Header returns an http.Header that can be modified by the caller to
  6575. // add HTTP headers to the request.
  6576. func (c *AppsOperationsGetCall) Header() http.Header {
  6577. if c.header_ == nil {
  6578. c.header_ = make(http.Header)
  6579. }
  6580. return c.header_
  6581. }
  6582. func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  6583. reqHeaders := make(http.Header)
  6584. for k, v := range c.header_ {
  6585. reqHeaders[k] = v
  6586. }
  6587. reqHeaders.Set("User-Agent", c.s.userAgent())
  6588. if c.ifNoneMatch_ != "" {
  6589. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6590. }
  6591. var body io.Reader = nil
  6592. c.urlParams_.Set("alt", alt)
  6593. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/operations/{operationsId}")
  6594. urls += "?" + c.urlParams_.Encode()
  6595. req, _ := http.NewRequest("GET", urls, body)
  6596. req.Header = reqHeaders
  6597. googleapi.Expand(req.URL, map[string]string{
  6598. "appsId": c.appsId,
  6599. "operationsId": c.operationsId,
  6600. })
  6601. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6602. }
  6603. // Do executes the "appengine.apps.operations.get" call.
  6604. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6605. // status code is an error. Response headers are in either
  6606. // *Operation.ServerResponse.Header or (if a response was returned at
  6607. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6608. // to check whether the returned error was because
  6609. // http.StatusNotModified was returned.
  6610. func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6611. gensupport.SetOptions(c.urlParams_, opts...)
  6612. res, err := c.doRequest("json")
  6613. if res != nil && res.StatusCode == http.StatusNotModified {
  6614. if res.Body != nil {
  6615. res.Body.Close()
  6616. }
  6617. return nil, &googleapi.Error{
  6618. Code: res.StatusCode,
  6619. Header: res.Header,
  6620. }
  6621. }
  6622. if err != nil {
  6623. return nil, err
  6624. }
  6625. defer googleapi.CloseBody(res)
  6626. if err := googleapi.CheckResponse(res); err != nil {
  6627. return nil, err
  6628. }
  6629. ret := &Operation{
  6630. ServerResponse: googleapi.ServerResponse{
  6631. Header: res.Header,
  6632. HTTPStatusCode: res.StatusCode,
  6633. },
  6634. }
  6635. target := &ret
  6636. if err := gensupport.DecodeResponse(target, res); err != nil {
  6637. return nil, err
  6638. }
  6639. return ret, nil
  6640. // {
  6641. // "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.",
  6642. // "flatPath": "v1beta/apps/{appsId}/operations/{operationsId}",
  6643. // "httpMethod": "GET",
  6644. // "id": "appengine.apps.operations.get",
  6645. // "parameterOrder": [
  6646. // "appsId",
  6647. // "operationsId"
  6648. // ],
  6649. // "parameters": {
  6650. // "appsId": {
  6651. // "description": "Part of `name`. The name of the operation resource.",
  6652. // "location": "path",
  6653. // "required": true,
  6654. // "type": "string"
  6655. // },
  6656. // "operationsId": {
  6657. // "description": "Part of `name`. See documentation of `appsId`.",
  6658. // "location": "path",
  6659. // "required": true,
  6660. // "type": "string"
  6661. // }
  6662. // },
  6663. // "path": "v1beta/apps/{appsId}/operations/{operationsId}",
  6664. // "response": {
  6665. // "$ref": "Operation"
  6666. // },
  6667. // "scopes": [
  6668. // "https://www.googleapis.com/auth/appengine.admin",
  6669. // "https://www.googleapis.com/auth/cloud-platform",
  6670. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6671. // ]
  6672. // }
  6673. }
  6674. // method id "appengine.apps.operations.list":
  6675. type AppsOperationsListCall struct {
  6676. s *APIService
  6677. appsId string
  6678. urlParams_ gensupport.URLParams
  6679. ifNoneMatch_ string
  6680. ctx_ context.Context
  6681. header_ http.Header
  6682. }
  6683. // List: Lists operations that match the specified filter in the
  6684. // request. If the server doesn't support this method, it returns
  6685. // UNIMPLEMENTED.NOTE: the name binding allows API services to override
  6686. // the binding to use different resource name schemes, such as
  6687. // users/*/operations. To override the binding, API services can add a
  6688. // binding such as "/v1/{name=users/*}/operations" to their service
  6689. // configuration. For backwards compatibility, the default name includes
  6690. // the operations collection id, however overriding users must ensure
  6691. // the name binding is the parent resource, without the operations
  6692. // collection id.
  6693. func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall {
  6694. c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6695. c.appsId = appsId
  6696. return c
  6697. }
  6698. // Filter sets the optional parameter "filter": The standard list
  6699. // filter.
  6700. func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall {
  6701. c.urlParams_.Set("filter", filter)
  6702. return c
  6703. }
  6704. // PageSize sets the optional parameter "pageSize": The standard list
  6705. // page size.
  6706. func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall {
  6707. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6708. return c
  6709. }
  6710. // PageToken sets the optional parameter "pageToken": The standard list
  6711. // page token.
  6712. func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall {
  6713. c.urlParams_.Set("pageToken", pageToken)
  6714. return c
  6715. }
  6716. // Fields allows partial responses to be retrieved. See
  6717. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6718. // for more information.
  6719. func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall {
  6720. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6721. return c
  6722. }
  6723. // IfNoneMatch sets the optional parameter which makes the operation
  6724. // fail if the object's ETag matches the given value. This is useful for
  6725. // getting updates only after the object has changed since the last
  6726. // request. Use googleapi.IsNotModified to check whether the response
  6727. // error from Do is the result of In-None-Match.
  6728. func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall {
  6729. c.ifNoneMatch_ = entityTag
  6730. return c
  6731. }
  6732. // Context sets the context to be used in this call's Do method. Any
  6733. // pending HTTP request will be aborted if the provided context is
  6734. // canceled.
  6735. func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall {
  6736. c.ctx_ = ctx
  6737. return c
  6738. }
  6739. // Header returns an http.Header that can be modified by the caller to
  6740. // add HTTP headers to the request.
  6741. func (c *AppsOperationsListCall) Header() http.Header {
  6742. if c.header_ == nil {
  6743. c.header_ = make(http.Header)
  6744. }
  6745. return c.header_
  6746. }
  6747. func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  6748. reqHeaders := make(http.Header)
  6749. for k, v := range c.header_ {
  6750. reqHeaders[k] = v
  6751. }
  6752. reqHeaders.Set("User-Agent", c.s.userAgent())
  6753. if c.ifNoneMatch_ != "" {
  6754. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6755. }
  6756. var body io.Reader = nil
  6757. c.urlParams_.Set("alt", alt)
  6758. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/operations")
  6759. urls += "?" + c.urlParams_.Encode()
  6760. req, _ := http.NewRequest("GET", urls, body)
  6761. req.Header = reqHeaders
  6762. googleapi.Expand(req.URL, map[string]string{
  6763. "appsId": c.appsId,
  6764. })
  6765. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6766. }
  6767. // Do executes the "appengine.apps.operations.list" call.
  6768. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  6769. // non-2xx status code is an error. Response headers are in either
  6770. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  6771. // returned at all) in error.(*googleapi.Error).Header. Use
  6772. // googleapi.IsNotModified to check whether the returned error was
  6773. // because http.StatusNotModified was returned.
  6774. func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  6775. gensupport.SetOptions(c.urlParams_, opts...)
  6776. res, err := c.doRequest("json")
  6777. if res != nil && res.StatusCode == http.StatusNotModified {
  6778. if res.Body != nil {
  6779. res.Body.Close()
  6780. }
  6781. return nil, &googleapi.Error{
  6782. Code: res.StatusCode,
  6783. Header: res.Header,
  6784. }
  6785. }
  6786. if err != nil {
  6787. return nil, err
  6788. }
  6789. defer googleapi.CloseBody(res)
  6790. if err := googleapi.CheckResponse(res); err != nil {
  6791. return nil, err
  6792. }
  6793. ret := &ListOperationsResponse{
  6794. ServerResponse: googleapi.ServerResponse{
  6795. Header: res.Header,
  6796. HTTPStatusCode: res.StatusCode,
  6797. },
  6798. }
  6799. target := &ret
  6800. if err := gensupport.DecodeResponse(target, res); err != nil {
  6801. return nil, err
  6802. }
  6803. return ret, nil
  6804. // {
  6805. // "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.",
  6806. // "flatPath": "v1beta/apps/{appsId}/operations",
  6807. // "httpMethod": "GET",
  6808. // "id": "appengine.apps.operations.list",
  6809. // "parameterOrder": [
  6810. // "appsId"
  6811. // ],
  6812. // "parameters": {
  6813. // "appsId": {
  6814. // "description": "Part of `name`. The name of the operation's parent resource.",
  6815. // "location": "path",
  6816. // "required": true,
  6817. // "type": "string"
  6818. // },
  6819. // "filter": {
  6820. // "description": "The standard list filter.",
  6821. // "location": "query",
  6822. // "type": "string"
  6823. // },
  6824. // "pageSize": {
  6825. // "description": "The standard list page size.",
  6826. // "format": "int32",
  6827. // "location": "query",
  6828. // "type": "integer"
  6829. // },
  6830. // "pageToken": {
  6831. // "description": "The standard list page token.",
  6832. // "location": "query",
  6833. // "type": "string"
  6834. // }
  6835. // },
  6836. // "path": "v1beta/apps/{appsId}/operations",
  6837. // "response": {
  6838. // "$ref": "ListOperationsResponse"
  6839. // },
  6840. // "scopes": [
  6841. // "https://www.googleapis.com/auth/appengine.admin",
  6842. // "https://www.googleapis.com/auth/cloud-platform",
  6843. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  6844. // ]
  6845. // }
  6846. }
  6847. // Pages invokes f for each page of results.
  6848. // A non-nil error returned from f will halt the iteration.
  6849. // The provided context supersedes any context provided to the Context method.
  6850. func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  6851. c.ctx_ = ctx
  6852. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6853. for {
  6854. x, err := c.Do()
  6855. if err != nil {
  6856. return err
  6857. }
  6858. if err := f(x); err != nil {
  6859. return err
  6860. }
  6861. if x.NextPageToken == "" {
  6862. return nil
  6863. }
  6864. c.PageToken(x.NextPageToken)
  6865. }
  6866. }
  6867. // method id "appengine.apps.services.delete":
  6868. type AppsServicesDeleteCall struct {
  6869. s *APIService
  6870. appsId string
  6871. servicesId string
  6872. urlParams_ gensupport.URLParams
  6873. ctx_ context.Context
  6874. header_ http.Header
  6875. }
  6876. // Delete: Deletes the specified service and all enclosed versions.
  6877. func (r *AppsServicesService) Delete(appsId string, servicesId string) *AppsServicesDeleteCall {
  6878. c := &AppsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6879. c.appsId = appsId
  6880. c.servicesId = servicesId
  6881. return c
  6882. }
  6883. // Fields allows partial responses to be retrieved. See
  6884. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6885. // for more information.
  6886. func (c *AppsServicesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesDeleteCall {
  6887. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6888. return c
  6889. }
  6890. // Context sets the context to be used in this call's Do method. Any
  6891. // pending HTTP request will be aborted if the provided context is
  6892. // canceled.
  6893. func (c *AppsServicesDeleteCall) Context(ctx context.Context) *AppsServicesDeleteCall {
  6894. c.ctx_ = ctx
  6895. return c
  6896. }
  6897. // Header returns an http.Header that can be modified by the caller to
  6898. // add HTTP headers to the request.
  6899. func (c *AppsServicesDeleteCall) Header() http.Header {
  6900. if c.header_ == nil {
  6901. c.header_ = make(http.Header)
  6902. }
  6903. return c.header_
  6904. }
  6905. func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6906. reqHeaders := make(http.Header)
  6907. for k, v := range c.header_ {
  6908. reqHeaders[k] = v
  6909. }
  6910. reqHeaders.Set("User-Agent", c.s.userAgent())
  6911. var body io.Reader = nil
  6912. c.urlParams_.Set("alt", alt)
  6913. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}")
  6914. urls += "?" + c.urlParams_.Encode()
  6915. req, _ := http.NewRequest("DELETE", urls, body)
  6916. req.Header = reqHeaders
  6917. googleapi.Expand(req.URL, map[string]string{
  6918. "appsId": c.appsId,
  6919. "servicesId": c.servicesId,
  6920. })
  6921. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6922. }
  6923. // Do executes the "appengine.apps.services.delete" call.
  6924. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6925. // status code is an error. Response headers are in either
  6926. // *Operation.ServerResponse.Header or (if a response was returned at
  6927. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6928. // to check whether the returned error was because
  6929. // http.StatusNotModified was returned.
  6930. func (c *AppsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6931. gensupport.SetOptions(c.urlParams_, opts...)
  6932. res, err := c.doRequest("json")
  6933. if res != nil && res.StatusCode == http.StatusNotModified {
  6934. if res.Body != nil {
  6935. res.Body.Close()
  6936. }
  6937. return nil, &googleapi.Error{
  6938. Code: res.StatusCode,
  6939. Header: res.Header,
  6940. }
  6941. }
  6942. if err != nil {
  6943. return nil, err
  6944. }
  6945. defer googleapi.CloseBody(res)
  6946. if err := googleapi.CheckResponse(res); err != nil {
  6947. return nil, err
  6948. }
  6949. ret := &Operation{
  6950. ServerResponse: googleapi.ServerResponse{
  6951. Header: res.Header,
  6952. HTTPStatusCode: res.StatusCode,
  6953. },
  6954. }
  6955. target := &ret
  6956. if err := gensupport.DecodeResponse(target, res); err != nil {
  6957. return nil, err
  6958. }
  6959. return ret, nil
  6960. // {
  6961. // "description": "Deletes the specified service and all enclosed versions.",
  6962. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}",
  6963. // "httpMethod": "DELETE",
  6964. // "id": "appengine.apps.services.delete",
  6965. // "parameterOrder": [
  6966. // "appsId",
  6967. // "servicesId"
  6968. // ],
  6969. // "parameters": {
  6970. // "appsId": {
  6971. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  6972. // "location": "path",
  6973. // "required": true,
  6974. // "type": "string"
  6975. // },
  6976. // "servicesId": {
  6977. // "description": "Part of `name`. See documentation of `appsId`.",
  6978. // "location": "path",
  6979. // "required": true,
  6980. // "type": "string"
  6981. // }
  6982. // },
  6983. // "path": "v1beta/apps/{appsId}/services/{servicesId}",
  6984. // "response": {
  6985. // "$ref": "Operation"
  6986. // },
  6987. // "scopes": [
  6988. // "https://www.googleapis.com/auth/cloud-platform"
  6989. // ]
  6990. // }
  6991. }
  6992. // method id "appengine.apps.services.get":
  6993. type AppsServicesGetCall struct {
  6994. s *APIService
  6995. appsId string
  6996. servicesId string
  6997. urlParams_ gensupport.URLParams
  6998. ifNoneMatch_ string
  6999. ctx_ context.Context
  7000. header_ http.Header
  7001. }
  7002. // Get: Gets the current configuration of the specified service.
  7003. func (r *AppsServicesService) Get(appsId string, servicesId string) *AppsServicesGetCall {
  7004. c := &AppsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7005. c.appsId = appsId
  7006. c.servicesId = servicesId
  7007. return c
  7008. }
  7009. // Fields allows partial responses to be retrieved. See
  7010. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7011. // for more information.
  7012. func (c *AppsServicesGetCall) Fields(s ...googleapi.Field) *AppsServicesGetCall {
  7013. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7014. return c
  7015. }
  7016. // IfNoneMatch sets the optional parameter which makes the operation
  7017. // fail if the object's ETag matches the given value. This is useful for
  7018. // getting updates only after the object has changed since the last
  7019. // request. Use googleapi.IsNotModified to check whether the response
  7020. // error from Do is the result of In-None-Match.
  7021. func (c *AppsServicesGetCall) IfNoneMatch(entityTag string) *AppsServicesGetCall {
  7022. c.ifNoneMatch_ = entityTag
  7023. return c
  7024. }
  7025. // Context sets the context to be used in this call's Do method. Any
  7026. // pending HTTP request will be aborted if the provided context is
  7027. // canceled.
  7028. func (c *AppsServicesGetCall) Context(ctx context.Context) *AppsServicesGetCall {
  7029. c.ctx_ = ctx
  7030. return c
  7031. }
  7032. // Header returns an http.Header that can be modified by the caller to
  7033. // add HTTP headers to the request.
  7034. func (c *AppsServicesGetCall) Header() http.Header {
  7035. if c.header_ == nil {
  7036. c.header_ = make(http.Header)
  7037. }
  7038. return c.header_
  7039. }
  7040. func (c *AppsServicesGetCall) doRequest(alt string) (*http.Response, error) {
  7041. reqHeaders := make(http.Header)
  7042. for k, v := range c.header_ {
  7043. reqHeaders[k] = v
  7044. }
  7045. reqHeaders.Set("User-Agent", c.s.userAgent())
  7046. if c.ifNoneMatch_ != "" {
  7047. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7048. }
  7049. var body io.Reader = nil
  7050. c.urlParams_.Set("alt", alt)
  7051. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}")
  7052. urls += "?" + c.urlParams_.Encode()
  7053. req, _ := http.NewRequest("GET", urls, body)
  7054. req.Header = reqHeaders
  7055. googleapi.Expand(req.URL, map[string]string{
  7056. "appsId": c.appsId,
  7057. "servicesId": c.servicesId,
  7058. })
  7059. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7060. }
  7061. // Do executes the "appengine.apps.services.get" call.
  7062. // Exactly one of *Service or error will be non-nil. Any non-2xx status
  7063. // code is an error. Response headers are in either
  7064. // *Service.ServerResponse.Header or (if a response was returned at all)
  7065. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7066. // check whether the returned error was because http.StatusNotModified
  7067. // was returned.
  7068. func (c *AppsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
  7069. gensupport.SetOptions(c.urlParams_, opts...)
  7070. res, err := c.doRequest("json")
  7071. if res != nil && res.StatusCode == http.StatusNotModified {
  7072. if res.Body != nil {
  7073. res.Body.Close()
  7074. }
  7075. return nil, &googleapi.Error{
  7076. Code: res.StatusCode,
  7077. Header: res.Header,
  7078. }
  7079. }
  7080. if err != nil {
  7081. return nil, err
  7082. }
  7083. defer googleapi.CloseBody(res)
  7084. if err := googleapi.CheckResponse(res); err != nil {
  7085. return nil, err
  7086. }
  7087. ret := &Service{
  7088. ServerResponse: googleapi.ServerResponse{
  7089. Header: res.Header,
  7090. HTTPStatusCode: res.StatusCode,
  7091. },
  7092. }
  7093. target := &ret
  7094. if err := gensupport.DecodeResponse(target, res); err != nil {
  7095. return nil, err
  7096. }
  7097. return ret, nil
  7098. // {
  7099. // "description": "Gets the current configuration of the specified service.",
  7100. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}",
  7101. // "httpMethod": "GET",
  7102. // "id": "appengine.apps.services.get",
  7103. // "parameterOrder": [
  7104. // "appsId",
  7105. // "servicesId"
  7106. // ],
  7107. // "parameters": {
  7108. // "appsId": {
  7109. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.",
  7110. // "location": "path",
  7111. // "required": true,
  7112. // "type": "string"
  7113. // },
  7114. // "servicesId": {
  7115. // "description": "Part of `name`. See documentation of `appsId`.",
  7116. // "location": "path",
  7117. // "required": true,
  7118. // "type": "string"
  7119. // }
  7120. // },
  7121. // "path": "v1beta/apps/{appsId}/services/{servicesId}",
  7122. // "response": {
  7123. // "$ref": "Service"
  7124. // },
  7125. // "scopes": [
  7126. // "https://www.googleapis.com/auth/appengine.admin",
  7127. // "https://www.googleapis.com/auth/cloud-platform",
  7128. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7129. // ]
  7130. // }
  7131. }
  7132. // method id "appengine.apps.services.list":
  7133. type AppsServicesListCall struct {
  7134. s *APIService
  7135. appsId string
  7136. urlParams_ gensupport.URLParams
  7137. ifNoneMatch_ string
  7138. ctx_ context.Context
  7139. header_ http.Header
  7140. }
  7141. // List: Lists all the services in the application.
  7142. func (r *AppsServicesService) List(appsId string) *AppsServicesListCall {
  7143. c := &AppsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7144. c.appsId = appsId
  7145. return c
  7146. }
  7147. // PageSize sets the optional parameter "pageSize": Maximum results to
  7148. // return per page.
  7149. func (c *AppsServicesListCall) PageSize(pageSize int64) *AppsServicesListCall {
  7150. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7151. return c
  7152. }
  7153. // PageToken sets the optional parameter "pageToken": Continuation token
  7154. // for fetching the next page of results.
  7155. func (c *AppsServicesListCall) PageToken(pageToken string) *AppsServicesListCall {
  7156. c.urlParams_.Set("pageToken", pageToken)
  7157. return c
  7158. }
  7159. // Fields allows partial responses to be retrieved. See
  7160. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7161. // for more information.
  7162. func (c *AppsServicesListCall) Fields(s ...googleapi.Field) *AppsServicesListCall {
  7163. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7164. return c
  7165. }
  7166. // IfNoneMatch sets the optional parameter which makes the operation
  7167. // fail if the object's ETag matches the given value. This is useful for
  7168. // getting updates only after the object has changed since the last
  7169. // request. Use googleapi.IsNotModified to check whether the response
  7170. // error from Do is the result of In-None-Match.
  7171. func (c *AppsServicesListCall) IfNoneMatch(entityTag string) *AppsServicesListCall {
  7172. c.ifNoneMatch_ = entityTag
  7173. return c
  7174. }
  7175. // Context sets the context to be used in this call's Do method. Any
  7176. // pending HTTP request will be aborted if the provided context is
  7177. // canceled.
  7178. func (c *AppsServicesListCall) Context(ctx context.Context) *AppsServicesListCall {
  7179. c.ctx_ = ctx
  7180. return c
  7181. }
  7182. // Header returns an http.Header that can be modified by the caller to
  7183. // add HTTP headers to the request.
  7184. func (c *AppsServicesListCall) Header() http.Header {
  7185. if c.header_ == nil {
  7186. c.header_ = make(http.Header)
  7187. }
  7188. return c.header_
  7189. }
  7190. func (c *AppsServicesListCall) doRequest(alt string) (*http.Response, error) {
  7191. reqHeaders := make(http.Header)
  7192. for k, v := range c.header_ {
  7193. reqHeaders[k] = v
  7194. }
  7195. reqHeaders.Set("User-Agent", c.s.userAgent())
  7196. if c.ifNoneMatch_ != "" {
  7197. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7198. }
  7199. var body io.Reader = nil
  7200. c.urlParams_.Set("alt", alt)
  7201. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services")
  7202. urls += "?" + c.urlParams_.Encode()
  7203. req, _ := http.NewRequest("GET", urls, body)
  7204. req.Header = reqHeaders
  7205. googleapi.Expand(req.URL, map[string]string{
  7206. "appsId": c.appsId,
  7207. })
  7208. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7209. }
  7210. // Do executes the "appengine.apps.services.list" call.
  7211. // Exactly one of *ListServicesResponse or error will be non-nil. Any
  7212. // non-2xx status code is an error. Response headers are in either
  7213. // *ListServicesResponse.ServerResponse.Header or (if a response was
  7214. // returned at all) in error.(*googleapi.Error).Header. Use
  7215. // googleapi.IsNotModified to check whether the returned error was
  7216. // because http.StatusNotModified was returned.
  7217. func (c *AppsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
  7218. gensupport.SetOptions(c.urlParams_, opts...)
  7219. res, err := c.doRequest("json")
  7220. if res != nil && res.StatusCode == http.StatusNotModified {
  7221. if res.Body != nil {
  7222. res.Body.Close()
  7223. }
  7224. return nil, &googleapi.Error{
  7225. Code: res.StatusCode,
  7226. Header: res.Header,
  7227. }
  7228. }
  7229. if err != nil {
  7230. return nil, err
  7231. }
  7232. defer googleapi.CloseBody(res)
  7233. if err := googleapi.CheckResponse(res); err != nil {
  7234. return nil, err
  7235. }
  7236. ret := &ListServicesResponse{
  7237. ServerResponse: googleapi.ServerResponse{
  7238. Header: res.Header,
  7239. HTTPStatusCode: res.StatusCode,
  7240. },
  7241. }
  7242. target := &ret
  7243. if err := gensupport.DecodeResponse(target, res); err != nil {
  7244. return nil, err
  7245. }
  7246. return ret, nil
  7247. // {
  7248. // "description": "Lists all the services in the application.",
  7249. // "flatPath": "v1beta/apps/{appsId}/services",
  7250. // "httpMethod": "GET",
  7251. // "id": "appengine.apps.services.list",
  7252. // "parameterOrder": [
  7253. // "appsId"
  7254. // ],
  7255. // "parameters": {
  7256. // "appsId": {
  7257. // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.",
  7258. // "location": "path",
  7259. // "required": true,
  7260. // "type": "string"
  7261. // },
  7262. // "pageSize": {
  7263. // "description": "Maximum results to return per page.",
  7264. // "format": "int32",
  7265. // "location": "query",
  7266. // "type": "integer"
  7267. // },
  7268. // "pageToken": {
  7269. // "description": "Continuation token for fetching the next page of results.",
  7270. // "location": "query",
  7271. // "type": "string"
  7272. // }
  7273. // },
  7274. // "path": "v1beta/apps/{appsId}/services",
  7275. // "response": {
  7276. // "$ref": "ListServicesResponse"
  7277. // },
  7278. // "scopes": [
  7279. // "https://www.googleapis.com/auth/appengine.admin",
  7280. // "https://www.googleapis.com/auth/cloud-platform",
  7281. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7282. // ]
  7283. // }
  7284. }
  7285. // Pages invokes f for each page of results.
  7286. // A non-nil error returned from f will halt the iteration.
  7287. // The provided context supersedes any context provided to the Context method.
  7288. func (c *AppsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
  7289. c.ctx_ = ctx
  7290. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7291. for {
  7292. x, err := c.Do()
  7293. if err != nil {
  7294. return err
  7295. }
  7296. if err := f(x); err != nil {
  7297. return err
  7298. }
  7299. if x.NextPageToken == "" {
  7300. return nil
  7301. }
  7302. c.PageToken(x.NextPageToken)
  7303. }
  7304. }
  7305. // method id "appengine.apps.services.patch":
  7306. type AppsServicesPatchCall struct {
  7307. s *APIService
  7308. appsId string
  7309. servicesId string
  7310. service *Service
  7311. urlParams_ gensupport.URLParams
  7312. ctx_ context.Context
  7313. header_ http.Header
  7314. }
  7315. // Patch: Updates the configuration of the specified service.
  7316. func (r *AppsServicesService) Patch(appsId string, servicesId string, service *Service) *AppsServicesPatchCall {
  7317. c := &AppsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7318. c.appsId = appsId
  7319. c.servicesId = servicesId
  7320. c.service = service
  7321. return c
  7322. }
  7323. // MigrateTraffic sets the optional parameter "migrateTraffic": Set to
  7324. // true to gradually shift traffic to one or more versions that you
  7325. // specify. By default, traffic is shifted immediately. For gradual
  7326. // traffic migration, the target versions must be located within
  7327. // instances that are configured for both warmup requests
  7328. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  7329. // ta/apps.services.versions#inboundservicetype) and automatic scaling
  7330. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  7331. // ta/apps.services.versions#automaticscaling). You must specify the
  7332. // shardBy
  7333. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  7334. // ta/apps.services#shardby) field in the Service resource. Gradual
  7335. // traffic migration is not supported in the App Engine flexible
  7336. // environment. For examples, see Migrating and Splitting Traffic
  7337. // (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting
  7338. // -traffic).
  7339. func (c *AppsServicesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsServicesPatchCall {
  7340. c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic))
  7341. return c
  7342. }
  7343. // UpdateMask sets the optional parameter "updateMask": Standard field
  7344. // mask for the set of fields to be updated.
  7345. func (c *AppsServicesPatchCall) UpdateMask(updateMask string) *AppsServicesPatchCall {
  7346. c.urlParams_.Set("updateMask", updateMask)
  7347. return c
  7348. }
  7349. // Fields allows partial responses to be retrieved. See
  7350. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7351. // for more information.
  7352. func (c *AppsServicesPatchCall) Fields(s ...googleapi.Field) *AppsServicesPatchCall {
  7353. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7354. return c
  7355. }
  7356. // Context sets the context to be used in this call's Do method. Any
  7357. // pending HTTP request will be aborted if the provided context is
  7358. // canceled.
  7359. func (c *AppsServicesPatchCall) Context(ctx context.Context) *AppsServicesPatchCall {
  7360. c.ctx_ = ctx
  7361. return c
  7362. }
  7363. // Header returns an http.Header that can be modified by the caller to
  7364. // add HTTP headers to the request.
  7365. func (c *AppsServicesPatchCall) Header() http.Header {
  7366. if c.header_ == nil {
  7367. c.header_ = make(http.Header)
  7368. }
  7369. return c.header_
  7370. }
  7371. func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
  7372. reqHeaders := make(http.Header)
  7373. for k, v := range c.header_ {
  7374. reqHeaders[k] = v
  7375. }
  7376. reqHeaders.Set("User-Agent", c.s.userAgent())
  7377. var body io.Reader = nil
  7378. body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
  7379. if err != nil {
  7380. return nil, err
  7381. }
  7382. reqHeaders.Set("Content-Type", "application/json")
  7383. c.urlParams_.Set("alt", alt)
  7384. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}")
  7385. urls += "?" + c.urlParams_.Encode()
  7386. req, _ := http.NewRequest("PATCH", urls, body)
  7387. req.Header = reqHeaders
  7388. googleapi.Expand(req.URL, map[string]string{
  7389. "appsId": c.appsId,
  7390. "servicesId": c.servicesId,
  7391. })
  7392. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7393. }
  7394. // Do executes the "appengine.apps.services.patch" call.
  7395. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7396. // status code is an error. Response headers are in either
  7397. // *Operation.ServerResponse.Header or (if a response was returned at
  7398. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7399. // to check whether the returned error was because
  7400. // http.StatusNotModified was returned.
  7401. func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7402. gensupport.SetOptions(c.urlParams_, opts...)
  7403. res, err := c.doRequest("json")
  7404. if res != nil && res.StatusCode == http.StatusNotModified {
  7405. if res.Body != nil {
  7406. res.Body.Close()
  7407. }
  7408. return nil, &googleapi.Error{
  7409. Code: res.StatusCode,
  7410. Header: res.Header,
  7411. }
  7412. }
  7413. if err != nil {
  7414. return nil, err
  7415. }
  7416. defer googleapi.CloseBody(res)
  7417. if err := googleapi.CheckResponse(res); err != nil {
  7418. return nil, err
  7419. }
  7420. ret := &Operation{
  7421. ServerResponse: googleapi.ServerResponse{
  7422. Header: res.Header,
  7423. HTTPStatusCode: res.StatusCode,
  7424. },
  7425. }
  7426. target := &ret
  7427. if err := gensupport.DecodeResponse(target, res); err != nil {
  7428. return nil, err
  7429. }
  7430. return ret, nil
  7431. // {
  7432. // "description": "Updates the configuration of the specified service.",
  7433. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}",
  7434. // "httpMethod": "PATCH",
  7435. // "id": "appengine.apps.services.patch",
  7436. // "parameterOrder": [
  7437. // "appsId",
  7438. // "servicesId"
  7439. // ],
  7440. // "parameters": {
  7441. // "appsId": {
  7442. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.",
  7443. // "location": "path",
  7444. // "required": true,
  7445. // "type": "string"
  7446. // },
  7447. // "migrateTraffic": {
  7448. // "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).",
  7449. // "location": "query",
  7450. // "type": "boolean"
  7451. // },
  7452. // "servicesId": {
  7453. // "description": "Part of `name`. See documentation of `appsId`.",
  7454. // "location": "path",
  7455. // "required": true,
  7456. // "type": "string"
  7457. // },
  7458. // "updateMask": {
  7459. // "description": "Standard field mask for the set of fields to be updated.",
  7460. // "format": "google-fieldmask",
  7461. // "location": "query",
  7462. // "type": "string"
  7463. // }
  7464. // },
  7465. // "path": "v1beta/apps/{appsId}/services/{servicesId}",
  7466. // "request": {
  7467. // "$ref": "Service"
  7468. // },
  7469. // "response": {
  7470. // "$ref": "Operation"
  7471. // },
  7472. // "scopes": [
  7473. // "https://www.googleapis.com/auth/cloud-platform"
  7474. // ]
  7475. // }
  7476. }
  7477. // method id "appengine.apps.services.versions.create":
  7478. type AppsServicesVersionsCreateCall struct {
  7479. s *APIService
  7480. appsId string
  7481. servicesId string
  7482. version *Version
  7483. urlParams_ gensupport.URLParams
  7484. ctx_ context.Context
  7485. header_ http.Header
  7486. }
  7487. // Create: Deploys code and resource files to a new version.
  7488. func (r *AppsServicesVersionsService) Create(appsId string, servicesId string, version *Version) *AppsServicesVersionsCreateCall {
  7489. c := &AppsServicesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7490. c.appsId = appsId
  7491. c.servicesId = servicesId
  7492. c.version = version
  7493. return c
  7494. }
  7495. // Fields allows partial responses to be retrieved. See
  7496. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7497. // for more information.
  7498. func (c *AppsServicesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsServicesVersionsCreateCall {
  7499. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7500. return c
  7501. }
  7502. // Context sets the context to be used in this call's Do method. Any
  7503. // pending HTTP request will be aborted if the provided context is
  7504. // canceled.
  7505. func (c *AppsServicesVersionsCreateCall) Context(ctx context.Context) *AppsServicesVersionsCreateCall {
  7506. c.ctx_ = ctx
  7507. return c
  7508. }
  7509. // Header returns an http.Header that can be modified by the caller to
  7510. // add HTTP headers to the request.
  7511. func (c *AppsServicesVersionsCreateCall) Header() http.Header {
  7512. if c.header_ == nil {
  7513. c.header_ = make(http.Header)
  7514. }
  7515. return c.header_
  7516. }
  7517. func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  7518. reqHeaders := make(http.Header)
  7519. for k, v := range c.header_ {
  7520. reqHeaders[k] = v
  7521. }
  7522. reqHeaders.Set("User-Agent", c.s.userAgent())
  7523. var body io.Reader = nil
  7524. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  7525. if err != nil {
  7526. return nil, err
  7527. }
  7528. reqHeaders.Set("Content-Type", "application/json")
  7529. c.urlParams_.Set("alt", alt)
  7530. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions")
  7531. urls += "?" + c.urlParams_.Encode()
  7532. req, _ := http.NewRequest("POST", urls, body)
  7533. req.Header = reqHeaders
  7534. googleapi.Expand(req.URL, map[string]string{
  7535. "appsId": c.appsId,
  7536. "servicesId": c.servicesId,
  7537. })
  7538. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7539. }
  7540. // Do executes the "appengine.apps.services.versions.create" call.
  7541. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7542. // status code is an error. Response headers are in either
  7543. // *Operation.ServerResponse.Header or (if a response was returned at
  7544. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7545. // to check whether the returned error was because
  7546. // http.StatusNotModified was returned.
  7547. func (c *AppsServicesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7548. gensupport.SetOptions(c.urlParams_, opts...)
  7549. res, err := c.doRequest("json")
  7550. if res != nil && res.StatusCode == http.StatusNotModified {
  7551. if res.Body != nil {
  7552. res.Body.Close()
  7553. }
  7554. return nil, &googleapi.Error{
  7555. Code: res.StatusCode,
  7556. Header: res.Header,
  7557. }
  7558. }
  7559. if err != nil {
  7560. return nil, err
  7561. }
  7562. defer googleapi.CloseBody(res)
  7563. if err := googleapi.CheckResponse(res); err != nil {
  7564. return nil, err
  7565. }
  7566. ret := &Operation{
  7567. ServerResponse: googleapi.ServerResponse{
  7568. Header: res.Header,
  7569. HTTPStatusCode: res.StatusCode,
  7570. },
  7571. }
  7572. target := &ret
  7573. if err := gensupport.DecodeResponse(target, res); err != nil {
  7574. return nil, err
  7575. }
  7576. return ret, nil
  7577. // {
  7578. // "description": "Deploys code and resource files to a new version.",
  7579. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions",
  7580. // "httpMethod": "POST",
  7581. // "id": "appengine.apps.services.versions.create",
  7582. // "parameterOrder": [
  7583. // "appsId",
  7584. // "servicesId"
  7585. // ],
  7586. // "parameters": {
  7587. // "appsId": {
  7588. // "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.",
  7589. // "location": "path",
  7590. // "required": true,
  7591. // "type": "string"
  7592. // },
  7593. // "servicesId": {
  7594. // "description": "Part of `parent`. See documentation of `appsId`.",
  7595. // "location": "path",
  7596. // "required": true,
  7597. // "type": "string"
  7598. // }
  7599. // },
  7600. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions",
  7601. // "request": {
  7602. // "$ref": "Version"
  7603. // },
  7604. // "response": {
  7605. // "$ref": "Operation"
  7606. // },
  7607. // "scopes": [
  7608. // "https://www.googleapis.com/auth/cloud-platform"
  7609. // ]
  7610. // }
  7611. }
  7612. // method id "appengine.apps.services.versions.delete":
  7613. type AppsServicesVersionsDeleteCall struct {
  7614. s *APIService
  7615. appsId string
  7616. servicesId string
  7617. versionsId string
  7618. urlParams_ gensupport.URLParams
  7619. ctx_ context.Context
  7620. header_ http.Header
  7621. }
  7622. // Delete: Deletes an existing Version resource.
  7623. func (r *AppsServicesVersionsService) Delete(appsId string, servicesId string, versionsId string) *AppsServicesVersionsDeleteCall {
  7624. c := &AppsServicesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7625. c.appsId = appsId
  7626. c.servicesId = servicesId
  7627. c.versionsId = versionsId
  7628. return c
  7629. }
  7630. // Fields allows partial responses to be retrieved. See
  7631. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7632. // for more information.
  7633. func (c *AppsServicesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsDeleteCall {
  7634. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7635. return c
  7636. }
  7637. // Context sets the context to be used in this call's Do method. Any
  7638. // pending HTTP request will be aborted if the provided context is
  7639. // canceled.
  7640. func (c *AppsServicesVersionsDeleteCall) Context(ctx context.Context) *AppsServicesVersionsDeleteCall {
  7641. c.ctx_ = ctx
  7642. return c
  7643. }
  7644. // Header returns an http.Header that can be modified by the caller to
  7645. // add HTTP headers to the request.
  7646. func (c *AppsServicesVersionsDeleteCall) Header() http.Header {
  7647. if c.header_ == nil {
  7648. c.header_ = make(http.Header)
  7649. }
  7650. return c.header_
  7651. }
  7652. func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7653. reqHeaders := make(http.Header)
  7654. for k, v := range c.header_ {
  7655. reqHeaders[k] = v
  7656. }
  7657. reqHeaders.Set("User-Agent", c.s.userAgent())
  7658. var body io.Reader = nil
  7659. c.urlParams_.Set("alt", alt)
  7660. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  7661. urls += "?" + c.urlParams_.Encode()
  7662. req, _ := http.NewRequest("DELETE", urls, body)
  7663. req.Header = reqHeaders
  7664. googleapi.Expand(req.URL, map[string]string{
  7665. "appsId": c.appsId,
  7666. "servicesId": c.servicesId,
  7667. "versionsId": c.versionsId,
  7668. })
  7669. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7670. }
  7671. // Do executes the "appengine.apps.services.versions.delete" call.
  7672. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7673. // status code is an error. Response headers are in either
  7674. // *Operation.ServerResponse.Header or (if a response was returned at
  7675. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7676. // to check whether the returned error was because
  7677. // http.StatusNotModified was returned.
  7678. func (c *AppsServicesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7679. gensupport.SetOptions(c.urlParams_, opts...)
  7680. res, err := c.doRequest("json")
  7681. if res != nil && res.StatusCode == http.StatusNotModified {
  7682. if res.Body != nil {
  7683. res.Body.Close()
  7684. }
  7685. return nil, &googleapi.Error{
  7686. Code: res.StatusCode,
  7687. Header: res.Header,
  7688. }
  7689. }
  7690. if err != nil {
  7691. return nil, err
  7692. }
  7693. defer googleapi.CloseBody(res)
  7694. if err := googleapi.CheckResponse(res); err != nil {
  7695. return nil, err
  7696. }
  7697. ret := &Operation{
  7698. ServerResponse: googleapi.ServerResponse{
  7699. Header: res.Header,
  7700. HTTPStatusCode: res.StatusCode,
  7701. },
  7702. }
  7703. target := &ret
  7704. if err := gensupport.DecodeResponse(target, res); err != nil {
  7705. return nil, err
  7706. }
  7707. return ret, nil
  7708. // {
  7709. // "description": "Deletes an existing Version resource.",
  7710. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7711. // "httpMethod": "DELETE",
  7712. // "id": "appengine.apps.services.versions.delete",
  7713. // "parameterOrder": [
  7714. // "appsId",
  7715. // "servicesId",
  7716. // "versionsId"
  7717. // ],
  7718. // "parameters": {
  7719. // "appsId": {
  7720. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  7721. // "location": "path",
  7722. // "required": true,
  7723. // "type": "string"
  7724. // },
  7725. // "servicesId": {
  7726. // "description": "Part of `name`. See documentation of `appsId`.",
  7727. // "location": "path",
  7728. // "required": true,
  7729. // "type": "string"
  7730. // },
  7731. // "versionsId": {
  7732. // "description": "Part of `name`. See documentation of `appsId`.",
  7733. // "location": "path",
  7734. // "required": true,
  7735. // "type": "string"
  7736. // }
  7737. // },
  7738. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7739. // "response": {
  7740. // "$ref": "Operation"
  7741. // },
  7742. // "scopes": [
  7743. // "https://www.googleapis.com/auth/cloud-platform"
  7744. // ]
  7745. // }
  7746. }
  7747. // method id "appengine.apps.services.versions.get":
  7748. type AppsServicesVersionsGetCall struct {
  7749. s *APIService
  7750. appsId string
  7751. servicesId string
  7752. versionsId string
  7753. urlParams_ gensupport.URLParams
  7754. ifNoneMatch_ string
  7755. ctx_ context.Context
  7756. header_ http.Header
  7757. }
  7758. // Get: Gets the specified Version resource. By default, only a
  7759. // BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get
  7760. // the full resource.
  7761. func (r *AppsServicesVersionsService) Get(appsId string, servicesId string, versionsId string) *AppsServicesVersionsGetCall {
  7762. c := &AppsServicesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7763. c.appsId = appsId
  7764. c.servicesId = servicesId
  7765. c.versionsId = versionsId
  7766. return c
  7767. }
  7768. // View sets the optional parameter "view": Controls the set of fields
  7769. // returned in the Get response.
  7770. //
  7771. // Possible values:
  7772. // "BASIC"
  7773. // "FULL"
  7774. func (c *AppsServicesVersionsGetCall) View(view string) *AppsServicesVersionsGetCall {
  7775. c.urlParams_.Set("view", view)
  7776. return c
  7777. }
  7778. // Fields allows partial responses to be retrieved. See
  7779. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7780. // for more information.
  7781. func (c *AppsServicesVersionsGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsGetCall {
  7782. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7783. return c
  7784. }
  7785. // IfNoneMatch sets the optional parameter which makes the operation
  7786. // fail if the object's ETag matches the given value. This is useful for
  7787. // getting updates only after the object has changed since the last
  7788. // request. Use googleapi.IsNotModified to check whether the response
  7789. // error from Do is the result of In-None-Match.
  7790. func (c *AppsServicesVersionsGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsGetCall {
  7791. c.ifNoneMatch_ = entityTag
  7792. return c
  7793. }
  7794. // Context sets the context to be used in this call's Do method. Any
  7795. // pending HTTP request will be aborted if the provided context is
  7796. // canceled.
  7797. func (c *AppsServicesVersionsGetCall) Context(ctx context.Context) *AppsServicesVersionsGetCall {
  7798. c.ctx_ = ctx
  7799. return c
  7800. }
  7801. // Header returns an http.Header that can be modified by the caller to
  7802. // add HTTP headers to the request.
  7803. func (c *AppsServicesVersionsGetCall) Header() http.Header {
  7804. if c.header_ == nil {
  7805. c.header_ = make(http.Header)
  7806. }
  7807. return c.header_
  7808. }
  7809. func (c *AppsServicesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  7810. reqHeaders := make(http.Header)
  7811. for k, v := range c.header_ {
  7812. reqHeaders[k] = v
  7813. }
  7814. reqHeaders.Set("User-Agent", c.s.userAgent())
  7815. if c.ifNoneMatch_ != "" {
  7816. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7817. }
  7818. var body io.Reader = nil
  7819. c.urlParams_.Set("alt", alt)
  7820. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  7821. urls += "?" + c.urlParams_.Encode()
  7822. req, _ := http.NewRequest("GET", urls, body)
  7823. req.Header = reqHeaders
  7824. googleapi.Expand(req.URL, map[string]string{
  7825. "appsId": c.appsId,
  7826. "servicesId": c.servicesId,
  7827. "versionsId": c.versionsId,
  7828. })
  7829. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7830. }
  7831. // Do executes the "appengine.apps.services.versions.get" call.
  7832. // Exactly one of *Version or error will be non-nil. Any non-2xx status
  7833. // code is an error. Response headers are in either
  7834. // *Version.ServerResponse.Header or (if a response was returned at all)
  7835. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7836. // check whether the returned error was because http.StatusNotModified
  7837. // was returned.
  7838. func (c *AppsServicesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  7839. gensupport.SetOptions(c.urlParams_, opts...)
  7840. res, err := c.doRequest("json")
  7841. if res != nil && res.StatusCode == http.StatusNotModified {
  7842. if res.Body != nil {
  7843. res.Body.Close()
  7844. }
  7845. return nil, &googleapi.Error{
  7846. Code: res.StatusCode,
  7847. Header: res.Header,
  7848. }
  7849. }
  7850. if err != nil {
  7851. return nil, err
  7852. }
  7853. defer googleapi.CloseBody(res)
  7854. if err := googleapi.CheckResponse(res); err != nil {
  7855. return nil, err
  7856. }
  7857. ret := &Version{
  7858. ServerResponse: googleapi.ServerResponse{
  7859. Header: res.Header,
  7860. HTTPStatusCode: res.StatusCode,
  7861. },
  7862. }
  7863. target := &ret
  7864. if err := gensupport.DecodeResponse(target, res); err != nil {
  7865. return nil, err
  7866. }
  7867. return ret, nil
  7868. // {
  7869. // "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.",
  7870. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7871. // "httpMethod": "GET",
  7872. // "id": "appengine.apps.services.versions.get",
  7873. // "parameterOrder": [
  7874. // "appsId",
  7875. // "servicesId",
  7876. // "versionsId"
  7877. // ],
  7878. // "parameters": {
  7879. // "appsId": {
  7880. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.",
  7881. // "location": "path",
  7882. // "required": true,
  7883. // "type": "string"
  7884. // },
  7885. // "servicesId": {
  7886. // "description": "Part of `name`. See documentation of `appsId`.",
  7887. // "location": "path",
  7888. // "required": true,
  7889. // "type": "string"
  7890. // },
  7891. // "versionsId": {
  7892. // "description": "Part of `name`. See documentation of `appsId`.",
  7893. // "location": "path",
  7894. // "required": true,
  7895. // "type": "string"
  7896. // },
  7897. // "view": {
  7898. // "description": "Controls the set of fields returned in the Get response.",
  7899. // "enum": [
  7900. // "BASIC",
  7901. // "FULL"
  7902. // ],
  7903. // "location": "query",
  7904. // "type": "string"
  7905. // }
  7906. // },
  7907. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  7908. // "response": {
  7909. // "$ref": "Version"
  7910. // },
  7911. // "scopes": [
  7912. // "https://www.googleapis.com/auth/appengine.admin",
  7913. // "https://www.googleapis.com/auth/cloud-platform",
  7914. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  7915. // ]
  7916. // }
  7917. }
  7918. // method id "appengine.apps.services.versions.list":
  7919. type AppsServicesVersionsListCall struct {
  7920. s *APIService
  7921. appsId string
  7922. servicesId string
  7923. urlParams_ gensupport.URLParams
  7924. ifNoneMatch_ string
  7925. ctx_ context.Context
  7926. header_ http.Header
  7927. }
  7928. // List: Lists the versions of a service.
  7929. func (r *AppsServicesVersionsService) List(appsId string, servicesId string) *AppsServicesVersionsListCall {
  7930. c := &AppsServicesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7931. c.appsId = appsId
  7932. c.servicesId = servicesId
  7933. return c
  7934. }
  7935. // PageSize sets the optional parameter "pageSize": Maximum results to
  7936. // return per page.
  7937. func (c *AppsServicesVersionsListCall) PageSize(pageSize int64) *AppsServicesVersionsListCall {
  7938. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7939. return c
  7940. }
  7941. // PageToken sets the optional parameter "pageToken": Continuation token
  7942. // for fetching the next page of results.
  7943. func (c *AppsServicesVersionsListCall) PageToken(pageToken string) *AppsServicesVersionsListCall {
  7944. c.urlParams_.Set("pageToken", pageToken)
  7945. return c
  7946. }
  7947. // View sets the optional parameter "view": Controls the set of fields
  7948. // returned in the List response.
  7949. //
  7950. // Possible values:
  7951. // "BASIC"
  7952. // "FULL"
  7953. func (c *AppsServicesVersionsListCall) View(view string) *AppsServicesVersionsListCall {
  7954. c.urlParams_.Set("view", view)
  7955. return c
  7956. }
  7957. // Fields allows partial responses to be retrieved. See
  7958. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7959. // for more information.
  7960. func (c *AppsServicesVersionsListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsListCall {
  7961. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7962. return c
  7963. }
  7964. // IfNoneMatch sets the optional parameter which makes the operation
  7965. // fail if the object's ETag matches the given value. This is useful for
  7966. // getting updates only after the object has changed since the last
  7967. // request. Use googleapi.IsNotModified to check whether the response
  7968. // error from Do is the result of In-None-Match.
  7969. func (c *AppsServicesVersionsListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsListCall {
  7970. c.ifNoneMatch_ = entityTag
  7971. return c
  7972. }
  7973. // Context sets the context to be used in this call's Do method. Any
  7974. // pending HTTP request will be aborted if the provided context is
  7975. // canceled.
  7976. func (c *AppsServicesVersionsListCall) Context(ctx context.Context) *AppsServicesVersionsListCall {
  7977. c.ctx_ = ctx
  7978. return c
  7979. }
  7980. // Header returns an http.Header that can be modified by the caller to
  7981. // add HTTP headers to the request.
  7982. func (c *AppsServicesVersionsListCall) Header() http.Header {
  7983. if c.header_ == nil {
  7984. c.header_ = make(http.Header)
  7985. }
  7986. return c.header_
  7987. }
  7988. func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  7989. reqHeaders := make(http.Header)
  7990. for k, v := range c.header_ {
  7991. reqHeaders[k] = v
  7992. }
  7993. reqHeaders.Set("User-Agent", c.s.userAgent())
  7994. if c.ifNoneMatch_ != "" {
  7995. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7996. }
  7997. var body io.Reader = nil
  7998. c.urlParams_.Set("alt", alt)
  7999. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions")
  8000. urls += "?" + c.urlParams_.Encode()
  8001. req, _ := http.NewRequest("GET", urls, body)
  8002. req.Header = reqHeaders
  8003. googleapi.Expand(req.URL, map[string]string{
  8004. "appsId": c.appsId,
  8005. "servicesId": c.servicesId,
  8006. })
  8007. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8008. }
  8009. // Do executes the "appengine.apps.services.versions.list" call.
  8010. // Exactly one of *ListVersionsResponse or error will be non-nil. Any
  8011. // non-2xx status code is an error. Response headers are in either
  8012. // *ListVersionsResponse.ServerResponse.Header or (if a response was
  8013. // returned at all) in error.(*googleapi.Error).Header. Use
  8014. // googleapi.IsNotModified to check whether the returned error was
  8015. // because http.StatusNotModified was returned.
  8016. func (c *AppsServicesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  8017. gensupport.SetOptions(c.urlParams_, opts...)
  8018. res, err := c.doRequest("json")
  8019. if res != nil && res.StatusCode == http.StatusNotModified {
  8020. if res.Body != nil {
  8021. res.Body.Close()
  8022. }
  8023. return nil, &googleapi.Error{
  8024. Code: res.StatusCode,
  8025. Header: res.Header,
  8026. }
  8027. }
  8028. if err != nil {
  8029. return nil, err
  8030. }
  8031. defer googleapi.CloseBody(res)
  8032. if err := googleapi.CheckResponse(res); err != nil {
  8033. return nil, err
  8034. }
  8035. ret := &ListVersionsResponse{
  8036. ServerResponse: googleapi.ServerResponse{
  8037. Header: res.Header,
  8038. HTTPStatusCode: res.StatusCode,
  8039. },
  8040. }
  8041. target := &ret
  8042. if err := gensupport.DecodeResponse(target, res); err != nil {
  8043. return nil, err
  8044. }
  8045. return ret, nil
  8046. // {
  8047. // "description": "Lists the versions of a service.",
  8048. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions",
  8049. // "httpMethod": "GET",
  8050. // "id": "appengine.apps.services.versions.list",
  8051. // "parameterOrder": [
  8052. // "appsId",
  8053. // "servicesId"
  8054. // ],
  8055. // "parameters": {
  8056. // "appsId": {
  8057. // "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.",
  8058. // "location": "path",
  8059. // "required": true,
  8060. // "type": "string"
  8061. // },
  8062. // "pageSize": {
  8063. // "description": "Maximum results to return per page.",
  8064. // "format": "int32",
  8065. // "location": "query",
  8066. // "type": "integer"
  8067. // },
  8068. // "pageToken": {
  8069. // "description": "Continuation token for fetching the next page of results.",
  8070. // "location": "query",
  8071. // "type": "string"
  8072. // },
  8073. // "servicesId": {
  8074. // "description": "Part of `parent`. See documentation of `appsId`.",
  8075. // "location": "path",
  8076. // "required": true,
  8077. // "type": "string"
  8078. // },
  8079. // "view": {
  8080. // "description": "Controls the set of fields returned in the List response.",
  8081. // "enum": [
  8082. // "BASIC",
  8083. // "FULL"
  8084. // ],
  8085. // "location": "query",
  8086. // "type": "string"
  8087. // }
  8088. // },
  8089. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions",
  8090. // "response": {
  8091. // "$ref": "ListVersionsResponse"
  8092. // },
  8093. // "scopes": [
  8094. // "https://www.googleapis.com/auth/appengine.admin",
  8095. // "https://www.googleapis.com/auth/cloud-platform",
  8096. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  8097. // ]
  8098. // }
  8099. }
  8100. // Pages invokes f for each page of results.
  8101. // A non-nil error returned from f will halt the iteration.
  8102. // The provided context supersedes any context provided to the Context method.
  8103. func (c *AppsServicesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  8104. c.ctx_ = ctx
  8105. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8106. for {
  8107. x, err := c.Do()
  8108. if err != nil {
  8109. return err
  8110. }
  8111. if err := f(x); err != nil {
  8112. return err
  8113. }
  8114. if x.NextPageToken == "" {
  8115. return nil
  8116. }
  8117. c.PageToken(x.NextPageToken)
  8118. }
  8119. }
  8120. // method id "appengine.apps.services.versions.patch":
  8121. type AppsServicesVersionsPatchCall struct {
  8122. s *APIService
  8123. appsId string
  8124. servicesId string
  8125. versionsId string
  8126. version *Version
  8127. urlParams_ gensupport.URLParams
  8128. ctx_ context.Context
  8129. header_ http.Header
  8130. }
  8131. // Patch: Updates the specified Version resource. You can specify the
  8132. // following fields depending on the App Engine environment and type of
  8133. // scaling that the version resource uses:Standard
  8134. // environment
  8135. // instance_class
  8136. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8137. // ta/apps.services.versions#Version.FIELDS.instance_class)automatic
  8138. // scaling in the standard
  8139. // environment:
  8140. // automatic_scaling.min_idle_instances
  8141. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8142. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8143. // automatic_
  8144. // scaling.max_idle_instances
  8145. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8146. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8147. // automaticS
  8148. // caling.standard_scheduler_settings.max_instances
  8149. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8150. // ta/apps.services.versions#StandardSchedulerSettings)
  8151. // automaticScaling.
  8152. // standard_scheduler_settings.min_instances
  8153. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8154. // ta/apps.services.versions#StandardSchedulerSettings)
  8155. // automaticScaling.
  8156. // standard_scheduler_settings.target_cpu_utilization
  8157. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8158. // ta/apps.services.versions#StandardSchedulerSettings)
  8159. // automaticScaling.
  8160. // standard_scheduler_settings.target_throughput_utilization
  8161. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8162. // ta/apps.services.versions#StandardSchedulerSettings)basic scaling or
  8163. // manual scaling in the standard environment:
  8164. // serving_status
  8165. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8166. // ta/apps.services.versions#Version.FIELDS.serving_status)Flexible
  8167. // environment
  8168. // serving_status
  8169. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8170. // ta/apps.services.versions#Version.FIELDS.serving_status)automatic
  8171. // scaling in the flexible
  8172. // environment:
  8173. // automatic_scaling.min_total_instances
  8174. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8175. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8176. // automatic_
  8177. // scaling.max_total_instances
  8178. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8179. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8180. // automatic_
  8181. // scaling.cool_down_period_sec
  8182. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8183. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8184. // automatic_
  8185. // scaling.cpu_utilization.target_utilization
  8186. // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be
  8187. // ta/apps.services.versions#Version.FIELDS.automatic_scaling)
  8188. func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall {
  8189. c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8190. c.appsId = appsId
  8191. c.servicesId = servicesId
  8192. c.versionsId = versionsId
  8193. c.version = version
  8194. return c
  8195. }
  8196. // UpdateMask sets the optional parameter "updateMask": Standard field
  8197. // mask for the set of fields to be updated.
  8198. func (c *AppsServicesVersionsPatchCall) UpdateMask(updateMask string) *AppsServicesVersionsPatchCall {
  8199. c.urlParams_.Set("updateMask", updateMask)
  8200. return c
  8201. }
  8202. // Fields allows partial responses to be retrieved. See
  8203. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8204. // for more information.
  8205. func (c *AppsServicesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsServicesVersionsPatchCall {
  8206. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8207. return c
  8208. }
  8209. // Context sets the context to be used in this call's Do method. Any
  8210. // pending HTTP request will be aborted if the provided context is
  8211. // canceled.
  8212. func (c *AppsServicesVersionsPatchCall) Context(ctx context.Context) *AppsServicesVersionsPatchCall {
  8213. c.ctx_ = ctx
  8214. return c
  8215. }
  8216. // Header returns an http.Header that can be modified by the caller to
  8217. // add HTTP headers to the request.
  8218. func (c *AppsServicesVersionsPatchCall) Header() http.Header {
  8219. if c.header_ == nil {
  8220. c.header_ = make(http.Header)
  8221. }
  8222. return c.header_
  8223. }
  8224. func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
  8225. reqHeaders := make(http.Header)
  8226. for k, v := range c.header_ {
  8227. reqHeaders[k] = v
  8228. }
  8229. reqHeaders.Set("User-Agent", c.s.userAgent())
  8230. var body io.Reader = nil
  8231. body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  8232. if err != nil {
  8233. return nil, err
  8234. }
  8235. reqHeaders.Set("Content-Type", "application/json")
  8236. c.urlParams_.Set("alt", alt)
  8237. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
  8238. urls += "?" + c.urlParams_.Encode()
  8239. req, _ := http.NewRequest("PATCH", urls, body)
  8240. req.Header = reqHeaders
  8241. googleapi.Expand(req.URL, map[string]string{
  8242. "appsId": c.appsId,
  8243. "servicesId": c.servicesId,
  8244. "versionsId": c.versionsId,
  8245. })
  8246. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8247. }
  8248. // Do executes the "appengine.apps.services.versions.patch" call.
  8249. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8250. // status code is an error. Response headers are in either
  8251. // *Operation.ServerResponse.Header or (if a response was returned at
  8252. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8253. // to check whether the returned error was because
  8254. // http.StatusNotModified was returned.
  8255. func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8256. gensupport.SetOptions(c.urlParams_, opts...)
  8257. res, err := c.doRequest("json")
  8258. if res != nil && res.StatusCode == http.StatusNotModified {
  8259. if res.Body != nil {
  8260. res.Body.Close()
  8261. }
  8262. return nil, &googleapi.Error{
  8263. Code: res.StatusCode,
  8264. Header: res.Header,
  8265. }
  8266. }
  8267. if err != nil {
  8268. return nil, err
  8269. }
  8270. defer googleapi.CloseBody(res)
  8271. if err := googleapi.CheckResponse(res); err != nil {
  8272. return nil, err
  8273. }
  8274. ret := &Operation{
  8275. ServerResponse: googleapi.ServerResponse{
  8276. Header: res.Header,
  8277. HTTPStatusCode: res.StatusCode,
  8278. },
  8279. }
  8280. target := &ret
  8281. if err := gensupport.DecodeResponse(target, res); err != nil {
  8282. return nil, err
  8283. }
  8284. return ret, nil
  8285. // {
  8286. // "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:Standard environment\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.instance_class)automatic scaling in the standard environment:\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomaticScaling.standard_scheduler_settings.max_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.min_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.target_cpu_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.target_throughput_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)basic scaling or manual scaling in the standard environment:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status)Flexible environment\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status)automatic scaling in the flexible environment:\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)",
  8287. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  8288. // "httpMethod": "PATCH",
  8289. // "id": "appengine.apps.services.versions.patch",
  8290. // "parameterOrder": [
  8291. // "appsId",
  8292. // "servicesId",
  8293. // "versionsId"
  8294. // ],
  8295. // "parameters": {
  8296. // "appsId": {
  8297. // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.",
  8298. // "location": "path",
  8299. // "required": true,
  8300. // "type": "string"
  8301. // },
  8302. // "servicesId": {
  8303. // "description": "Part of `name`. See documentation of `appsId`.",
  8304. // "location": "path",
  8305. // "required": true,
  8306. // "type": "string"
  8307. // },
  8308. // "updateMask": {
  8309. // "description": "Standard field mask for the set of fields to be updated.",
  8310. // "format": "google-fieldmask",
  8311. // "location": "query",
  8312. // "type": "string"
  8313. // },
  8314. // "versionsId": {
  8315. // "description": "Part of `name`. See documentation of `appsId`.",
  8316. // "location": "path",
  8317. // "required": true,
  8318. // "type": "string"
  8319. // }
  8320. // },
  8321. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
  8322. // "request": {
  8323. // "$ref": "Version"
  8324. // },
  8325. // "response": {
  8326. // "$ref": "Operation"
  8327. // },
  8328. // "scopes": [
  8329. // "https://www.googleapis.com/auth/cloud-platform"
  8330. // ]
  8331. // }
  8332. }
  8333. // method id "appengine.apps.services.versions.instances.debug":
  8334. type AppsServicesVersionsInstancesDebugCall struct {
  8335. s *APIService
  8336. appsId string
  8337. servicesId string
  8338. versionsId string
  8339. instancesId string
  8340. debuginstancerequest *DebugInstanceRequest
  8341. urlParams_ gensupport.URLParams
  8342. ctx_ context.Context
  8343. header_ http.Header
  8344. }
  8345. // Debug: Enables debugging on a VM instance. This allows you to use the
  8346. // SSH command to connect to the virtual machine where the instance
  8347. // lives. While in "debug mode", the instance continues to serve live
  8348. // traffic. You should delete the instance when you are done debugging
  8349. // and then allow the system to take over and determine if another
  8350. // instance should be started.Only applicable for instances in App
  8351. // Engine flexible environment.
  8352. func (r *AppsServicesVersionsInstancesService) Debug(appsId string, servicesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsServicesVersionsInstancesDebugCall {
  8353. c := &AppsServicesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8354. c.appsId = appsId
  8355. c.servicesId = servicesId
  8356. c.versionsId = versionsId
  8357. c.instancesId = instancesId
  8358. c.debuginstancerequest = debuginstancerequest
  8359. return c
  8360. }
  8361. // Fields allows partial responses to be retrieved. See
  8362. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8363. // for more information.
  8364. func (c *AppsServicesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDebugCall {
  8365. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8366. return c
  8367. }
  8368. // Context sets the context to be used in this call's Do method. Any
  8369. // pending HTTP request will be aborted if the provided context is
  8370. // canceled.
  8371. func (c *AppsServicesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDebugCall {
  8372. c.ctx_ = ctx
  8373. return c
  8374. }
  8375. // Header returns an http.Header that can be modified by the caller to
  8376. // add HTTP headers to the request.
  8377. func (c *AppsServicesVersionsInstancesDebugCall) Header() http.Header {
  8378. if c.header_ == nil {
  8379. c.header_ = make(http.Header)
  8380. }
  8381. return c.header_
  8382. }
  8383. func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) {
  8384. reqHeaders := make(http.Header)
  8385. for k, v := range c.header_ {
  8386. reqHeaders[k] = v
  8387. }
  8388. reqHeaders.Set("User-Agent", c.s.userAgent())
  8389. var body io.Reader = nil
  8390. body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest)
  8391. if err != nil {
  8392. return nil, err
  8393. }
  8394. reqHeaders.Set("Content-Type", "application/json")
  8395. c.urlParams_.Set("alt", alt)
  8396. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug")
  8397. urls += "?" + c.urlParams_.Encode()
  8398. req, _ := http.NewRequest("POST", urls, body)
  8399. req.Header = reqHeaders
  8400. googleapi.Expand(req.URL, map[string]string{
  8401. "appsId": c.appsId,
  8402. "servicesId": c.servicesId,
  8403. "versionsId": c.versionsId,
  8404. "instancesId": c.instancesId,
  8405. })
  8406. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8407. }
  8408. // Do executes the "appengine.apps.services.versions.instances.debug" call.
  8409. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8410. // status code is an error. Response headers are in either
  8411. // *Operation.ServerResponse.Header or (if a response was returned at
  8412. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8413. // to check whether the returned error was because
  8414. // http.StatusNotModified was returned.
  8415. func (c *AppsServicesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8416. gensupport.SetOptions(c.urlParams_, opts...)
  8417. res, err := c.doRequest("json")
  8418. if res != nil && res.StatusCode == http.StatusNotModified {
  8419. if res.Body != nil {
  8420. res.Body.Close()
  8421. }
  8422. return nil, &googleapi.Error{
  8423. Code: res.StatusCode,
  8424. Header: res.Header,
  8425. }
  8426. }
  8427. if err != nil {
  8428. return nil, err
  8429. }
  8430. defer googleapi.CloseBody(res)
  8431. if err := googleapi.CheckResponse(res); err != nil {
  8432. return nil, err
  8433. }
  8434. ret := &Operation{
  8435. ServerResponse: googleapi.ServerResponse{
  8436. Header: res.Header,
  8437. HTTPStatusCode: res.StatusCode,
  8438. },
  8439. }
  8440. target := &ret
  8441. if err := gensupport.DecodeResponse(target, res); err != nil {
  8442. return nil, err
  8443. }
  8444. return ret, nil
  8445. // {
  8446. // "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.",
  8447. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
  8448. // "httpMethod": "POST",
  8449. // "id": "appengine.apps.services.versions.instances.debug",
  8450. // "parameterOrder": [
  8451. // "appsId",
  8452. // "servicesId",
  8453. // "versionsId",
  8454. // "instancesId"
  8455. // ],
  8456. // "parameters": {
  8457. // "appsId": {
  8458. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8459. // "location": "path",
  8460. // "required": true,
  8461. // "type": "string"
  8462. // },
  8463. // "instancesId": {
  8464. // "description": "Part of `name`. See documentation of `appsId`.",
  8465. // "location": "path",
  8466. // "required": true,
  8467. // "type": "string"
  8468. // },
  8469. // "servicesId": {
  8470. // "description": "Part of `name`. See documentation of `appsId`.",
  8471. // "location": "path",
  8472. // "required": true,
  8473. // "type": "string"
  8474. // },
  8475. // "versionsId": {
  8476. // "description": "Part of `name`. See documentation of `appsId`.",
  8477. // "location": "path",
  8478. // "required": true,
  8479. // "type": "string"
  8480. // }
  8481. // },
  8482. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
  8483. // "request": {
  8484. // "$ref": "DebugInstanceRequest"
  8485. // },
  8486. // "response": {
  8487. // "$ref": "Operation"
  8488. // },
  8489. // "scopes": [
  8490. // "https://www.googleapis.com/auth/cloud-platform"
  8491. // ]
  8492. // }
  8493. }
  8494. // method id "appengine.apps.services.versions.instances.delete":
  8495. type AppsServicesVersionsInstancesDeleteCall struct {
  8496. s *APIService
  8497. appsId string
  8498. servicesId string
  8499. versionsId string
  8500. instancesId string
  8501. urlParams_ gensupport.URLParams
  8502. ctx_ context.Context
  8503. header_ http.Header
  8504. }
  8505. // Delete: Stops a running instance.
  8506. func (r *AppsServicesVersionsInstancesService) Delete(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesDeleteCall {
  8507. c := &AppsServicesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8508. c.appsId = appsId
  8509. c.servicesId = servicesId
  8510. c.versionsId = versionsId
  8511. c.instancesId = instancesId
  8512. return c
  8513. }
  8514. // Fields allows partial responses to be retrieved. See
  8515. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8516. // for more information.
  8517. func (c *AppsServicesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDeleteCall {
  8518. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8519. return c
  8520. }
  8521. // Context sets the context to be used in this call's Do method. Any
  8522. // pending HTTP request will be aborted if the provided context is
  8523. // canceled.
  8524. func (c *AppsServicesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDeleteCall {
  8525. c.ctx_ = ctx
  8526. return c
  8527. }
  8528. // Header returns an http.Header that can be modified by the caller to
  8529. // add HTTP headers to the request.
  8530. func (c *AppsServicesVersionsInstancesDeleteCall) Header() http.Header {
  8531. if c.header_ == nil {
  8532. c.header_ = make(http.Header)
  8533. }
  8534. return c.header_
  8535. }
  8536. func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  8537. reqHeaders := make(http.Header)
  8538. for k, v := range c.header_ {
  8539. reqHeaders[k] = v
  8540. }
  8541. reqHeaders.Set("User-Agent", c.s.userAgent())
  8542. var body io.Reader = nil
  8543. c.urlParams_.Set("alt", alt)
  8544. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
  8545. urls += "?" + c.urlParams_.Encode()
  8546. req, _ := http.NewRequest("DELETE", urls, body)
  8547. req.Header = reqHeaders
  8548. googleapi.Expand(req.URL, map[string]string{
  8549. "appsId": c.appsId,
  8550. "servicesId": c.servicesId,
  8551. "versionsId": c.versionsId,
  8552. "instancesId": c.instancesId,
  8553. })
  8554. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8555. }
  8556. // Do executes the "appengine.apps.services.versions.instances.delete" call.
  8557. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8558. // status code is an error. Response headers are in either
  8559. // *Operation.ServerResponse.Header or (if a response was returned at
  8560. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8561. // to check whether the returned error was because
  8562. // http.StatusNotModified was returned.
  8563. func (c *AppsServicesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8564. gensupport.SetOptions(c.urlParams_, opts...)
  8565. res, err := c.doRequest("json")
  8566. if res != nil && res.StatusCode == http.StatusNotModified {
  8567. if res.Body != nil {
  8568. res.Body.Close()
  8569. }
  8570. return nil, &googleapi.Error{
  8571. Code: res.StatusCode,
  8572. Header: res.Header,
  8573. }
  8574. }
  8575. if err != nil {
  8576. return nil, err
  8577. }
  8578. defer googleapi.CloseBody(res)
  8579. if err := googleapi.CheckResponse(res); err != nil {
  8580. return nil, err
  8581. }
  8582. ret := &Operation{
  8583. ServerResponse: googleapi.ServerResponse{
  8584. Header: res.Header,
  8585. HTTPStatusCode: res.StatusCode,
  8586. },
  8587. }
  8588. target := &ret
  8589. if err := gensupport.DecodeResponse(target, res); err != nil {
  8590. return nil, err
  8591. }
  8592. return ret, nil
  8593. // {
  8594. // "description": "Stops a running instance.",
  8595. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8596. // "httpMethod": "DELETE",
  8597. // "id": "appengine.apps.services.versions.instances.delete",
  8598. // "parameterOrder": [
  8599. // "appsId",
  8600. // "servicesId",
  8601. // "versionsId",
  8602. // "instancesId"
  8603. // ],
  8604. // "parameters": {
  8605. // "appsId": {
  8606. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8607. // "location": "path",
  8608. // "required": true,
  8609. // "type": "string"
  8610. // },
  8611. // "instancesId": {
  8612. // "description": "Part of `name`. See documentation of `appsId`.",
  8613. // "location": "path",
  8614. // "required": true,
  8615. // "type": "string"
  8616. // },
  8617. // "servicesId": {
  8618. // "description": "Part of `name`. See documentation of `appsId`.",
  8619. // "location": "path",
  8620. // "required": true,
  8621. // "type": "string"
  8622. // },
  8623. // "versionsId": {
  8624. // "description": "Part of `name`. See documentation of `appsId`.",
  8625. // "location": "path",
  8626. // "required": true,
  8627. // "type": "string"
  8628. // }
  8629. // },
  8630. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8631. // "response": {
  8632. // "$ref": "Operation"
  8633. // },
  8634. // "scopes": [
  8635. // "https://www.googleapis.com/auth/cloud-platform"
  8636. // ]
  8637. // }
  8638. }
  8639. // method id "appengine.apps.services.versions.instances.get":
  8640. type AppsServicesVersionsInstancesGetCall struct {
  8641. s *APIService
  8642. appsId string
  8643. servicesId string
  8644. versionsId string
  8645. instancesId string
  8646. urlParams_ gensupport.URLParams
  8647. ifNoneMatch_ string
  8648. ctx_ context.Context
  8649. header_ http.Header
  8650. }
  8651. // Get: Gets instance information.
  8652. func (r *AppsServicesVersionsInstancesService) Get(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesGetCall {
  8653. c := &AppsServicesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8654. c.appsId = appsId
  8655. c.servicesId = servicesId
  8656. c.versionsId = versionsId
  8657. c.instancesId = instancesId
  8658. return c
  8659. }
  8660. // Fields allows partial responses to be retrieved. See
  8661. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8662. // for more information.
  8663. func (c *AppsServicesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesGetCall {
  8664. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8665. return c
  8666. }
  8667. // IfNoneMatch sets the optional parameter which makes the operation
  8668. // fail if the object's ETag matches the given value. This is useful for
  8669. // getting updates only after the object has changed since the last
  8670. // request. Use googleapi.IsNotModified to check whether the response
  8671. // error from Do is the result of In-None-Match.
  8672. func (c *AppsServicesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesGetCall {
  8673. c.ifNoneMatch_ = entityTag
  8674. return c
  8675. }
  8676. // Context sets the context to be used in this call's Do method. Any
  8677. // pending HTTP request will be aborted if the provided context is
  8678. // canceled.
  8679. func (c *AppsServicesVersionsInstancesGetCall) Context(ctx context.Context) *AppsServicesVersionsInstancesGetCall {
  8680. c.ctx_ = ctx
  8681. return c
  8682. }
  8683. // Header returns an http.Header that can be modified by the caller to
  8684. // add HTTP headers to the request.
  8685. func (c *AppsServicesVersionsInstancesGetCall) Header() http.Header {
  8686. if c.header_ == nil {
  8687. c.header_ = make(http.Header)
  8688. }
  8689. return c.header_
  8690. }
  8691. func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  8692. reqHeaders := make(http.Header)
  8693. for k, v := range c.header_ {
  8694. reqHeaders[k] = v
  8695. }
  8696. reqHeaders.Set("User-Agent", c.s.userAgent())
  8697. if c.ifNoneMatch_ != "" {
  8698. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8699. }
  8700. var body io.Reader = nil
  8701. c.urlParams_.Set("alt", alt)
  8702. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
  8703. urls += "?" + c.urlParams_.Encode()
  8704. req, _ := http.NewRequest("GET", urls, body)
  8705. req.Header = reqHeaders
  8706. googleapi.Expand(req.URL, map[string]string{
  8707. "appsId": c.appsId,
  8708. "servicesId": c.servicesId,
  8709. "versionsId": c.versionsId,
  8710. "instancesId": c.instancesId,
  8711. })
  8712. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8713. }
  8714. // Do executes the "appengine.apps.services.versions.instances.get" call.
  8715. // Exactly one of *Instance or error will be non-nil. Any non-2xx status
  8716. // code is an error. Response headers are in either
  8717. // *Instance.ServerResponse.Header or (if a response was returned at
  8718. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8719. // to check whether the returned error was because
  8720. // http.StatusNotModified was returned.
  8721. func (c *AppsServicesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  8722. gensupport.SetOptions(c.urlParams_, opts...)
  8723. res, err := c.doRequest("json")
  8724. if res != nil && res.StatusCode == http.StatusNotModified {
  8725. if res.Body != nil {
  8726. res.Body.Close()
  8727. }
  8728. return nil, &googleapi.Error{
  8729. Code: res.StatusCode,
  8730. Header: res.Header,
  8731. }
  8732. }
  8733. if err != nil {
  8734. return nil, err
  8735. }
  8736. defer googleapi.CloseBody(res)
  8737. if err := googleapi.CheckResponse(res); err != nil {
  8738. return nil, err
  8739. }
  8740. ret := &Instance{
  8741. ServerResponse: googleapi.ServerResponse{
  8742. Header: res.Header,
  8743. HTTPStatusCode: res.StatusCode,
  8744. },
  8745. }
  8746. target := &ret
  8747. if err := gensupport.DecodeResponse(target, res); err != nil {
  8748. return nil, err
  8749. }
  8750. return ret, nil
  8751. // {
  8752. // "description": "Gets instance information.",
  8753. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8754. // "httpMethod": "GET",
  8755. // "id": "appengine.apps.services.versions.instances.get",
  8756. // "parameterOrder": [
  8757. // "appsId",
  8758. // "servicesId",
  8759. // "versionsId",
  8760. // "instancesId"
  8761. // ],
  8762. // "parameters": {
  8763. // "appsId": {
  8764. // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.",
  8765. // "location": "path",
  8766. // "required": true,
  8767. // "type": "string"
  8768. // },
  8769. // "instancesId": {
  8770. // "description": "Part of `name`. See documentation of `appsId`.",
  8771. // "location": "path",
  8772. // "required": true,
  8773. // "type": "string"
  8774. // },
  8775. // "servicesId": {
  8776. // "description": "Part of `name`. See documentation of `appsId`.",
  8777. // "location": "path",
  8778. // "required": true,
  8779. // "type": "string"
  8780. // },
  8781. // "versionsId": {
  8782. // "description": "Part of `name`. See documentation of `appsId`.",
  8783. // "location": "path",
  8784. // "required": true,
  8785. // "type": "string"
  8786. // }
  8787. // },
  8788. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
  8789. // "response": {
  8790. // "$ref": "Instance"
  8791. // },
  8792. // "scopes": [
  8793. // "https://www.googleapis.com/auth/appengine.admin",
  8794. // "https://www.googleapis.com/auth/cloud-platform",
  8795. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  8796. // ]
  8797. // }
  8798. }
  8799. // method id "appengine.apps.services.versions.instances.list":
  8800. type AppsServicesVersionsInstancesListCall struct {
  8801. s *APIService
  8802. appsId string
  8803. servicesId string
  8804. versionsId string
  8805. urlParams_ gensupport.URLParams
  8806. ifNoneMatch_ string
  8807. ctx_ context.Context
  8808. header_ http.Header
  8809. }
  8810. // List: Lists the instances of a version.Tip: To aggregate details
  8811. // about instances over time, see the Stackdriver Monitoring API
  8812. // (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeS
  8813. // eries/list).
  8814. func (r *AppsServicesVersionsInstancesService) List(appsId string, servicesId string, versionsId string) *AppsServicesVersionsInstancesListCall {
  8815. c := &AppsServicesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8816. c.appsId = appsId
  8817. c.servicesId = servicesId
  8818. c.versionsId = versionsId
  8819. return c
  8820. }
  8821. // PageSize sets the optional parameter "pageSize": Maximum results to
  8822. // return per page.
  8823. func (c *AppsServicesVersionsInstancesListCall) PageSize(pageSize int64) *AppsServicesVersionsInstancesListCall {
  8824. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8825. return c
  8826. }
  8827. // PageToken sets the optional parameter "pageToken": Continuation token
  8828. // for fetching the next page of results.
  8829. func (c *AppsServicesVersionsInstancesListCall) PageToken(pageToken string) *AppsServicesVersionsInstancesListCall {
  8830. c.urlParams_.Set("pageToken", pageToken)
  8831. return c
  8832. }
  8833. // Fields allows partial responses to be retrieved. See
  8834. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8835. // for more information.
  8836. func (c *AppsServicesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesListCall {
  8837. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8838. return c
  8839. }
  8840. // IfNoneMatch sets the optional parameter which makes the operation
  8841. // fail if the object's ETag matches the given value. This is useful for
  8842. // getting updates only after the object has changed since the last
  8843. // request. Use googleapi.IsNotModified to check whether the response
  8844. // error from Do is the result of In-None-Match.
  8845. func (c *AppsServicesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesListCall {
  8846. c.ifNoneMatch_ = entityTag
  8847. return c
  8848. }
  8849. // Context sets the context to be used in this call's Do method. Any
  8850. // pending HTTP request will be aborted if the provided context is
  8851. // canceled.
  8852. func (c *AppsServicesVersionsInstancesListCall) Context(ctx context.Context) *AppsServicesVersionsInstancesListCall {
  8853. c.ctx_ = ctx
  8854. return c
  8855. }
  8856. // Header returns an http.Header that can be modified by the caller to
  8857. // add HTTP headers to the request.
  8858. func (c *AppsServicesVersionsInstancesListCall) Header() http.Header {
  8859. if c.header_ == nil {
  8860. c.header_ = make(http.Header)
  8861. }
  8862. return c.header_
  8863. }
  8864. func (c *AppsServicesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  8865. reqHeaders := make(http.Header)
  8866. for k, v := range c.header_ {
  8867. reqHeaders[k] = v
  8868. }
  8869. reqHeaders.Set("User-Agent", c.s.userAgent())
  8870. if c.ifNoneMatch_ != "" {
  8871. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8872. }
  8873. var body io.Reader = nil
  8874. c.urlParams_.Set("alt", alt)
  8875. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances")
  8876. urls += "?" + c.urlParams_.Encode()
  8877. req, _ := http.NewRequest("GET", urls, body)
  8878. req.Header = reqHeaders
  8879. googleapi.Expand(req.URL, map[string]string{
  8880. "appsId": c.appsId,
  8881. "servicesId": c.servicesId,
  8882. "versionsId": c.versionsId,
  8883. })
  8884. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8885. }
  8886. // Do executes the "appengine.apps.services.versions.instances.list" call.
  8887. // Exactly one of *ListInstancesResponse or error will be non-nil. Any
  8888. // non-2xx status code is an error. Response headers are in either
  8889. // *ListInstancesResponse.ServerResponse.Header or (if a response was
  8890. // returned at all) in error.(*googleapi.Error).Header. Use
  8891. // googleapi.IsNotModified to check whether the returned error was
  8892. // because http.StatusNotModified was returned.
  8893. func (c *AppsServicesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  8894. gensupport.SetOptions(c.urlParams_, opts...)
  8895. res, err := c.doRequest("json")
  8896. if res != nil && res.StatusCode == http.StatusNotModified {
  8897. if res.Body != nil {
  8898. res.Body.Close()
  8899. }
  8900. return nil, &googleapi.Error{
  8901. Code: res.StatusCode,
  8902. Header: res.Header,
  8903. }
  8904. }
  8905. if err != nil {
  8906. return nil, err
  8907. }
  8908. defer googleapi.CloseBody(res)
  8909. if err := googleapi.CheckResponse(res); err != nil {
  8910. return nil, err
  8911. }
  8912. ret := &ListInstancesResponse{
  8913. ServerResponse: googleapi.ServerResponse{
  8914. Header: res.Header,
  8915. HTTPStatusCode: res.StatusCode,
  8916. },
  8917. }
  8918. target := &ret
  8919. if err := gensupport.DecodeResponse(target, res); err != nil {
  8920. return nil, err
  8921. }
  8922. return ret, nil
  8923. // {
  8924. // "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).",
  8925. // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
  8926. // "httpMethod": "GET",
  8927. // "id": "appengine.apps.services.versions.instances.list",
  8928. // "parameterOrder": [
  8929. // "appsId",
  8930. // "servicesId",
  8931. // "versionsId"
  8932. // ],
  8933. // "parameters": {
  8934. // "appsId": {
  8935. // "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.",
  8936. // "location": "path",
  8937. // "required": true,
  8938. // "type": "string"
  8939. // },
  8940. // "pageSize": {
  8941. // "description": "Maximum results to return per page.",
  8942. // "format": "int32",
  8943. // "location": "query",
  8944. // "type": "integer"
  8945. // },
  8946. // "pageToken": {
  8947. // "description": "Continuation token for fetching the next page of results.",
  8948. // "location": "query",
  8949. // "type": "string"
  8950. // },
  8951. // "servicesId": {
  8952. // "description": "Part of `parent`. See documentation of `appsId`.",
  8953. // "location": "path",
  8954. // "required": true,
  8955. // "type": "string"
  8956. // },
  8957. // "versionsId": {
  8958. // "description": "Part of `parent`. See documentation of `appsId`.",
  8959. // "location": "path",
  8960. // "required": true,
  8961. // "type": "string"
  8962. // }
  8963. // },
  8964. // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
  8965. // "response": {
  8966. // "$ref": "ListInstancesResponse"
  8967. // },
  8968. // "scopes": [
  8969. // "https://www.googleapis.com/auth/appengine.admin",
  8970. // "https://www.googleapis.com/auth/cloud-platform",
  8971. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  8972. // ]
  8973. // }
  8974. }
  8975. // Pages invokes f for each page of results.
  8976. // A non-nil error returned from f will halt the iteration.
  8977. // The provided context supersedes any context provided to the Context method.
  8978. func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  8979. c.ctx_ = ctx
  8980. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8981. for {
  8982. x, err := c.Do()
  8983. if err != nil {
  8984. return err
  8985. }
  8986. if err := f(x); err != nil {
  8987. return err
  8988. }
  8989. if x.NextPageToken == "" {
  8990. return nil
  8991. }
  8992. c.PageToken(x.NextPageToken)
  8993. }
  8994. }